From a4e9ef03d7a7b5686e6c02e5a2617ed84073025b Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 6 Nov 2024 00:26:52 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.431.0 --- .speakeasy/gen.lock | 205 +++++++-- .speakeasy/gen.yaml | 3 +- .speakeasy/workflow.lock | 10 +- README.md | 13 + RELEASES.md | 12 +- codeSamples.yaml | 30 ++ docs/models/components/address.md | 2 +- .../components/advertisementcampaign.md | 10 +- .../advertisementcampaignlistresource.md | 16 +- .../components/advertisementsortproperty.md | 2 +- docs/models/components/article.md | 28 +- docs/models/components/articlepreview.md | 2 +- docs/models/components/articlereceivers.md | 6 +- docs/models/components/articlevisibility.md | 2 +- docs/models/components/assignee.md | 8 +- docs/models/components/attachedcustomfield.md | 36 ++ .../components/attachedcustomfieldcreate.md | 21 + docs/models/components/author.md | 8 +- docs/models/components/benefit.md | 53 +-- docs/models/components/benefitads.md | 6 +- docs/models/components/benefitadscreate.md | 3 +- .../models/components/benefitadssubscriber.md | 37 +- docs/models/components/benefitarticles.md | 7 +- .../components/benefitarticlessubscriber.md | 41 +- docs/models/components/benefitbase.md | 9 +- docs/models/components/benefitcustom.md | 6 +- docs/models/components/benefitcustomcreate.md | 2 +- .../components/benefitcustomsubscriber.md | 31 +- docs/models/components/benefitdiscord.md | 7 +- .../models/components/benefitdiscordcreate.md | 3 +- docs/models/components/benefitdiscordinput.md | 7 +- .../components/benefitdiscordsubscriber.md | 41 +- .../models/components/benefitdownloadables.md | 6 +- .../components/benefitdownloadablescreate.md | 2 +- .../benefitdownloadablessubscriber.md | 41 +- .../components/benefitgithubrepository.md | 9 +- .../benefitgithubrepositorycreate.md | 4 +- ...benefitgithubrepositorycreateproperties.md | 2 +- .../benefitgithubrepositoryproperties.md | 2 +- .../benefitgithubrepositorysubscriber.md | 41 +- .../benefitgithubrepositoryupdate.md | 2 +- docs/models/components/benefitgrant.md | 8 +- docs/models/components/benefitgrantads.md | 4 +- ...antgithubrepositorypropertiespermission.md | 2 +- .../components/benefitgrantlicensekeys.md | 4 +- .../components/benefitgrantsubscriber.md | 4 +- docs/models/components/benefitgrantwebhook.md | 22 +- docs/models/components/benefitinput.md | 56 ++- .../benefitlicensekeyactivationproperties.md | 2 +- .../benefitlicensekeyexpirationproperties.md | 4 +- docs/models/components/benefitlicensekeys.md | 14 +- .../components/benefitlicensekeyscreate.md | 2 +- .../benefitlicensekeysproperties.md | 8 +- .../benefitlicensekeyssubscriber.md | 60 ++- .../benefitlicensekeyssubscriberproperties.md | 8 +- docs/models/components/benefits.md | 14 +- docs/models/components/bylineprofile.md | 2 +- .../components/checkoutconfirmstripe.md | 19 +- .../checkoutconfirmstripecustomfielddata.md | 14 + docs/models/components/checkoutlink.md | 16 +- .../components/checkoutlinksortproperty.md | 2 +- docs/models/components/checkoutproduct.md | 82 ++++ ...benefits.md => checkoutproductbenefits.md} | 16 +- .../models/components/checkoutproductinput.md | 77 ++++ docs/models/components/checkoutpublic.md | 112 +++-- .../checkoutpubliccustomfielddata.md | 16 + .../models/components/checkoutsortproperty.md | 2 +- docs/models/components/checkoutstatus.md | 2 +- docs/models/components/checkoutupdate.md | 1 + .../models/components/checkoutupdatepublic.md | 17 +- .../checkoutupdatepubliccustomfielddata.md | 14 + docs/models/components/currencyamount.md | 4 +- docs/models/components/customfield.md | 97 +++++ docs/models/components/customfieldcheckbox.md | 36 ++ .../customfieldcheckboxproperties.md | 17 + .../components/customfieldcheckboxtype.md | 15 + docs/models/components/customfieldcreate.md | 62 +++ .../components/customfieldcreatecheckbox.md | 26 ++ .../customfieldcreatecheckboxtype.md | 15 + .../components/customfieldcreatedate.md | 26 ++ .../components/customfieldcreatedatetype.md | 15 + .../components/customfieldcreatenumber.md | 26 ++ .../components/customfieldcreatenumbertype.md | 15 + .../components/customfieldcreateselect.md | 33 ++ .../components/customfieldcreateselecttype.md | 15 + .../components/customfieldcreatetext.md | 26 ++ .../components/customfieldcreatetexttype.md | 15 + docs/models/components/customfielddata.md | 14 + docs/models/components/customfielddate.md | 36 ++ .../components/customfielddateproperties.md | 19 + docs/models/components/customfielddatetype.md | 15 + docs/models/components/customfieldnumber.md | 36 ++ .../components/customfieldnumberproperties.md | 19 + .../components/customfieldnumbertype.md | 15 + docs/models/components/customfieldselect.md | 43 ++ .../components/customfieldselectoption.md | 19 + .../components/customfieldselectproperties.md | 25 ++ .../components/customfieldselecttype.md | 15 + .../components/customfieldsortproperty.md | 15 + docs/models/components/customfieldtext.md | 36 ++ .../components/customfieldtextproperties.md | 20 + docs/models/components/customfieldtexttype.md | 15 + docs/models/components/customfieldtype.md | 15 + docs/models/components/customfieldupdate.md | 35 ++ .../components/customfieldupdatecheckbox.md | 21 + .../customfieldupdatecheckboxtype.md | 15 + .../components/customfieldupdatedate.md | 21 + .../components/customfieldupdatedatetype.md | 15 + .../components/customfieldupdatenumber.md | 21 + .../components/customfieldupdatenumbertype.md | 15 + .../components/customfieldupdateselect.md | 21 + .../components/customfieldupdateselecttype.md | 15 + .../components/customfieldupdatetext.md | 21 + .../components/customfieldupdatetexttype.md | 15 + docs/models/components/donation.md | 51 ++- .../models/components/donationorganization.md | 2 +- docs/models/components/donationuser.md | 2 +- docs/models/components/donor.md | 4 +- .../components/downloadablefilecreate.md | 8 +- .../models/components/downloadablefileread.md | 8 +- docs/models/components/downloadableread.md | 12 +- .../models/components/externalorganization.md | 8 +- docs/models/components/filedownload.md | 10 +- docs/models/components/fileread.md | 28 +- docs/models/components/fileservicetypes.md | 2 +- docs/models/components/fileupload.md | 20 +- docs/models/components/fileuploadcompleted.md | 4 +- docs/models/components/interval.md | 2 +- .../components/introspecttokenresponse.md | 6 +- .../introspecttokenresponsetokentype.md | 2 +- docs/models/components/issue.md | 40 +- docs/models/components/label.md | 2 +- .../components/licensekeyactivationbase.md | 4 +- .../components/licensekeyactivationread.md | 22 +- docs/models/components/licensekeyread.md | 18 +- docs/models/components/licensekeystatus.md | 2 +- docs/models/components/licensekeyuser.md | 4 +- .../components/licensekeywithactivations.md | 20 +- docs/models/components/listresource.md | 35 ++ docs/models/components/listresourcearticle.md | 30 +- docs/models/components/listresourcebenefit.md | 11 +- .../components/listresourcebenefitgrant.md | 8 +- .../models/components/listresourcecheckout.md | 94 ++-- .../components/listresourcecheckoutlink.md | 18 +- .../listresourcedownloadableread.md | 14 +- .../listresourceexternalorganization.md | 12 +- .../models/components/listresourcefileread.md | 14 +- .../components/listresourcelicensekeyread.md | 22 +- .../components/listresourceoauth2client.md | 14 +- docs/models/components/listresourceorder.md | 56 ++- .../components/listresourceorganization.md | 18 +- docs/models/components/listresourceproduct.md | 56 ++- .../components/listresourcerepository.md | 36 +- .../components/listresourcesubscription.md | 97 +++-- .../listresourceuseradvertisementcampaign.md | 18 +- .../components/listresourceuserbenefit.md | 53 ++- .../components/listresourceuserorder.md | 91 ++-- .../listresourceusersubscription.md | 85 ++-- docs/models/components/loc.md | 2 +- docs/models/components/metric.md | 2 +- docs/models/components/metricperiod.md | 24 +- docs/models/components/metrics.md | 34 +- .../models/components/metricsintervallimit.md | 2 +- .../components/metricsintervalslimits.md | 10 +- docs/models/components/metricslimits.md | 12 +- docs/models/components/metricsresponse.md | 58 +-- docs/models/components/oauth2client.md | 10 +- .../components/oauth2clientconfiguration.md | 2 +- ...entconfigurationtokenendpointauthmethod.md | 3 +- .../oauth2clientconfigurationupdate.md | 2 +- ...uth2clientconfigurationupdategranttypes.md | 2 +- ...figurationupdatetokenendpointauthmethod.md | 2 +- ...componentsauthorizationcodetokenrequest.md | 2 +- docs/models/components/order.md | 50 +-- docs/models/components/orderbillingreason.md | 2 +- .../models/components/ordercustomfielddata.md | 16 + docs/models/components/orderinvoice.md | 2 +- docs/models/components/orderproduct.md | 6 +- docs/models/components/ordersortproperty.md | 2 +- docs/models/components/ordersubscription.md | 18 +- docs/models/components/orderuser.md | 4 +- docs/models/components/organization.md | 14 +- .../organizationavatarfilecreate.md | 8 +- .../components/organizationavatarfileread.md | 10 +- .../components/organizationsortproperty.md | 2 +- docs/models/components/pagination.md | 4 +- docs/models/components/permission.md | 2 +- docs/models/components/pledge.md | 51 ++- docs/models/components/pledger.md | 2 +- docs/models/components/pledgetype.md | 2 +- .../polarcheckoutlegacyschemascheckout.md | 59 +-- ...olarcheckoutlegacyschemascheckoutcreate.md | 2 +- .../polarcheckoutschemascheckout.md | 91 ++-- .../polarcheckoutschemascheckoutcreate.md | 1 + ...outschemascheckoutcreatecustomfielddata.md | 16 + ...rcheckoutschemascheckoutcustomfielddata.md | 16 + .../polarcheckoutschemascheckoutinput.md | 87 ++-- docs/models/components/prices.md | 2 +- docs/models/components/product.md | 64 ++- docs/models/components/productinput.md | 69 ++- .../components/productmediafilecreate.md | 8 +- .../models/components/productmediafileread.md | 10 +- .../components/productmediafilereadinput.md | 8 +- .../models/components/productonetimecreate.md | 5 +- docs/models/components/productprice.md | 12 +- docs/models/components/productpriceonetime.md | 20 +- .../components/productpriceonetimecustom.md | 10 +- .../components/productpriceonetimefixed.md | 6 +- .../productpriceonetimefixedcreate.md | 2 +- .../components/productpriceonetimefree.md | 4 +- .../components/productpricerecurring.md | 24 +- .../components/productpricerecurringcustom.md | 10 +- .../components/productpricerecurringfixed.md | 8 +- .../productpricerecurringfixedcreate.md | 2 +- .../components/productpricerecurringfree.md | 6 +- docs/models/components/productpricetype.md | 2 +- .../components/productrecurringcreate.md | 4 +- .../productrecurringcreateprices.md | 2 +- docs/models/components/productupdate.md | 3 +- docs/models/components/productupdateprices.md | 6 +- docs/models/components/reactions.md | 18 +- docs/models/components/repository.md | 36 +- .../components/repositorysortproperty.md | 2 +- docs/models/components/s3downloadurl.md | 4 +- .../components/s3filecreatemultipart.md | 6 +- docs/models/components/s3filecreatepart.md | 6 +- .../components/s3fileuploadcompletedpart.md | 2 +- .../components/s3fileuploadmultipart.md | 12 +- docs/models/components/s3fileuploadpart.md | 10 +- docs/models/components/state.md | 2 +- docs/models/components/subscription.md | 87 ++-- .../components/subscriptioncustomfielddata.md | 16 + docs/models/components/subscriptioninput.md | 86 ++-- .../components/subscriptionsortproperty.md | 2 +- docs/models/components/subscriptionstatus.md | 2 +- docs/models/components/subscriptionuser.md | 4 +- docs/models/components/subtype.md | 2 +- .../components/tokenendpointauthmethod.md | 2 +- docs/models/components/tokenresponse.md | 2 +- .../components/useradvertisementcampaign.md | 14 +- .../useradvertisementcampaigncreate.md | 4 +- .../useradvertisementsortproperty.md | 2 +- docs/models/components/userbenefit.md | 274 ++++++++++-- .../components/userbenefitsortproperty.md | 2 +- docs/models/components/userorder.md | 95 ++-- docs/models/components/userorderinvoice.md | 2 +- docs/models/components/userorderproduct.md | 58 ++- .../components/userordersortproperty.md | 2 +- .../components/userordersubscription.md | 16 +- docs/models/components/usersubscription.md | 84 ++-- .../components/usersubscriptionproduct.md | 57 ++- .../usersubscriptionproductbenefits.md | 15 +- .../usersubscriptionsortproperty.md | 2 +- docs/models/components/validatedlicensekey.md | 16 +- docs/models/components/validationerror.md | 2 +- .../webhookbenefitcreatedpayload.md | 15 +- .../webhookbenefitgrantcreatedpayload.md | 19 +- .../webhookbenefitgrantrevokedpayload.md | 22 +- .../webhookbenefitgrantupdatedpayload.md | 14 +- .../webhookbenefitupdatedpayload.md | 15 +- .../webhookcheckoutcreatedpayload.md | 82 ++-- .../webhookcheckoutupdatedpayload.md | 87 ++-- .../webhookdonationcreatedpayload.md | 52 ++- .../components/webhookordercreatedpayload.md | 51 +-- .../webhookorganizationupdatedpayload.md | 14 +- .../components/webhookpledgecreatedpayload.md | 53 ++- .../components/webhookpledgeupdatedpayload.md | 50 ++- .../webhookproductcreatedpayload.md | 53 ++- .../webhookproductupdatedpayload.md | 60 ++- .../webhooksubscriptionactivepayload.md | 92 ++-- .../webhooksubscriptioncanceledpayload.md | 92 ++-- .../webhooksubscriptioncreatedpayload.md | 97 +++-- .../webhooksubscriptionrevokedpayload.md | 87 ++-- .../webhooksubscriptionupdatedpayload.md | 90 ++-- .../operations/advertisementslistresponse.md | 16 +- .../operations/articlesexportrequest.md | 2 +- .../models/operations/articleslistresponse.md | 30 +- .../operations/articlespreviewrequest.md | 2 +- .../operations/articlevisibilityfilter.md | 4 +- .../operations/benefitscreatebenefitcreate.md | 17 +- .../operations/benefitsgrantsresponse.md | 8 +- .../models/operations/benefitslistresponse.md | 23 +- .../operations/benefitsupdatebenefitupdate.md | 2 +- .../operations/benefitsupdaterequest.md | 8 +- .../operations/checkoutlinkslistresponse.md | 18 +- .../operations/checkoutscustomlistresponse.md | 84 ++-- .../operations/customfieldsdeleterequest.md | 17 + .../operations/customfieldsgetrequest.md | 17 + ...ieldslistqueryparamorganizationidfilter.md | 21 + .../operations/customfieldslistrequest.md | 20 + .../operations/customfieldslistresponse.md | 36 ++ .../operations/customfieldsupdaterequest.md | 19 + .../operations/customfieldtypefilter.md | 21 + .../externalorganizationslistresponse.md | 12 +- .../operations/filescreatefilecreate.md | 24 +- docs/models/operations/fileslistresponse.md | 13 +- .../filesupdateresponsefilesupdate.md | 28 +- .../models/operations/filesuploadedrequest.md | 4 +- .../filesuploadedresponsefilesuploaded.md | 26 +- .../operations/licensekeyslistresponse.md | 20 +- ...ricsgetqueryparamproductpricetypefilter.md | 4 +- docs/models/operations/metricsgetrequest.md | 6 +- .../operations/oauth2clientslistresponse.md | 14 +- .../oauth2clientsoauth2updateclientrequest.md | 2 +- .../oauth2introspecttokentokentypehint.md | 2 +- .../oauth2requesttokenrequestbody.md | 2 +- docs/models/operations/orderslistresponse.md | 51 +-- .../operations/organizationslistrequest.md | 1 - .../operations/organizationslistresponse.md | 18 +- .../operations/productscreateproductcreate.md | 3 +- ...ductslistqueryparamorganizationidfilter.md | 2 +- docs/models/operations/productslistrequest.md | 2 +- .../models/operations/productslistresponse.md | 63 ++- .../operations/queryparambenefittypefilter.md | 4 +- .../queryparamproductpricetypefilter.md | 2 +- .../operations/repositorieslistresponse.md | 36 +- .../operations/subscriptionslistresponse.md | 92 ++-- docs/models/operations/tokentypehint.md | 2 +- .../usersadvertisementslistresponse.md | 18 +- ...sersbenefitsgetresponseusersbenefitsget.md | 266 ++++++++++-- .../operations/usersbenefitslistresponse.md | 37 +- .../usersdownloadableslistresponse.md | 16 +- .../userslicensekeyslistresponse.md | 20 +- .../operations/usersorderslistresponse.md | 93 ++-- .../userssubscriptionslistresponse.md | 83 ++-- docs/sdks/customfields/README.md | 404 ++++++++++++++++++ jsr.json | 2 +- package-lock.json | 4 +- package.json | 2 +- src/funcs/advertisementsGet.ts | 12 +- src/funcs/advertisementsList.ts | 12 +- src/funcs/articlesCreate.ts | 12 +- src/funcs/articlesDelete.ts | 12 +- src/funcs/articlesExport.ts | 12 +- src/funcs/articlesGet.ts | 12 +- src/funcs/articlesList.ts | 12 +- src/funcs/articlesPreview.ts | 12 +- src/funcs/articlesReceivers.ts | 12 +- src/funcs/articlesSend.ts | 12 +- src/funcs/articlesUpdate.ts | 12 +- src/funcs/benefitsCreate.ts | 12 +- src/funcs/benefitsDelete.ts | 12 +- src/funcs/benefitsGet.ts | 12 +- src/funcs/benefitsGrants.ts | 12 +- src/funcs/benefitsList.ts | 12 +- src/funcs/benefitsUpdate.ts | 12 +- src/funcs/checkoutLinksCreate.ts | 12 +- src/funcs/checkoutLinksDelete.ts | 12 +- src/funcs/checkoutLinksGet.ts | 12 +- src/funcs/checkoutLinksList.ts | 12 +- src/funcs/checkoutLinksUpdate.ts | 12 +- src/funcs/checkoutsCreate.ts | 12 +- src/funcs/checkoutsCustomClientConfirm.ts | 12 +- src/funcs/checkoutsCustomClientGet.ts | 12 +- src/funcs/checkoutsCustomClientUpdate.ts | 12 +- src/funcs/checkoutsCustomCreate.ts | 12 +- src/funcs/checkoutsCustomGet.ts | 12 +- src/funcs/checkoutsCustomList.ts | 12 +- src/funcs/checkoutsCustomUpdate.ts | 12 +- src/funcs/checkoutsGet.ts | 12 +- src/funcs/customFieldsCreate.ts | 128 ++++++ src/funcs/customFieldsDelete.ts | 138 ++++++ src/funcs/customFieldsGet.ts | 138 ++++++ src/funcs/customFieldsList.ts | 194 +++++++++ src/funcs/customFieldsUpdate.ts | 139 ++++++ src/funcs/externalOrganizationsList.ts | 12 +- src/funcs/filesCreate.ts | 12 +- src/funcs/filesDelete.ts | 12 +- src/funcs/filesList.ts | 12 +- src/funcs/filesUpdate.ts | 12 +- src/funcs/filesUploaded.ts | 12 +- src/funcs/licenseKeysGet.ts | 12 +- src/funcs/licenseKeysGetActivation.ts | 12 +- src/funcs/licenseKeysList.ts | 12 +- src/funcs/licenseKeysUpdate.ts | 12 +- src/funcs/metricsGet.ts | 12 +- src/funcs/metricsLimits.ts | 12 +- src/funcs/oauth2ClientsCreate.ts | 12 +- src/funcs/oauth2ClientsDelete.ts | 12 +- src/funcs/oauth2ClientsGet.ts | 12 +- src/funcs/oauth2ClientsList.ts | 12 +- src/funcs/oauth2ClientsUpdate.ts | 12 +- src/funcs/oauth2Introspect.ts | 12 +- src/funcs/oauth2Revoke.ts | 12 +- src/funcs/oauth2Token.ts | 12 +- src/funcs/oauth2Userinfo.ts | 12 +- src/funcs/ordersGet.ts | 12 +- src/funcs/ordersInvoice.ts | 12 +- src/funcs/ordersList.ts | 12 +- src/funcs/organizationsCreate.ts | 12 +- src/funcs/organizationsGet.ts | 12 +- src/funcs/organizationsList.ts | 13 +- src/funcs/organizationsUpdate.ts | 12 +- src/funcs/productsCreate.ts | 12 +- src/funcs/productsGet.ts | 12 +- src/funcs/productsList.ts | 12 +- src/funcs/productsUpdate.ts | 12 +- src/funcs/productsUpdateBenefits.ts | 12 +- src/funcs/repositoriesGet.ts | 12 +- src/funcs/repositoriesList.ts | 12 +- src/funcs/repositoriesUpdate.ts | 12 +- src/funcs/subscriptionsExport.ts | 12 +- src/funcs/subscriptionsList.ts | 12 +- src/funcs/usersAdvertisementsCreate.ts | 12 +- src/funcs/usersAdvertisementsDelete.ts | 12 +- src/funcs/usersAdvertisementsEnable.ts | 12 +- src/funcs/usersAdvertisementsGet.ts | 12 +- src/funcs/usersAdvertisementsList.ts | 12 +- src/funcs/usersAdvertisementsUpdate.ts | 12 +- src/funcs/usersBenefitsGet.ts | 12 +- src/funcs/usersBenefitsList.ts | 12 +- src/funcs/usersDownloadablesGet.ts | 12 +- src/funcs/usersDownloadablesList.ts | 12 +- src/funcs/usersLicenseKeysActivate.ts | 12 +- src/funcs/usersLicenseKeysDeactivate.ts | 12 +- src/funcs/usersLicenseKeysGet.ts | 12 +- src/funcs/usersLicenseKeysList.ts | 12 +- src/funcs/usersLicenseKeysValidate.ts | 12 +- src/funcs/usersOrdersGet.ts | 12 +- src/funcs/usersOrdersInvoice.ts | 12 +- src/funcs/usersOrdersList.ts | 12 +- src/funcs/usersSubscriptionsCancel.ts | 12 +- src/funcs/usersSubscriptionsGet.ts | 12 +- src/funcs/usersSubscriptionsList.ts | 12 +- src/funcs/usersSubscriptionsUpdate.ts | 12 +- src/hooks/types.ts | 2 + src/lib/config.ts | 6 +- src/lib/retries.ts | 94 ++-- src/lib/sdks.ts | 34 +- src/models/components/attachedcustomfield.ts | 86 ++++ .../components/attachedcustomfieldcreate.ts | 67 +++ src/models/components/benefitadssubscriber.ts | 18 +- .../components/benefitarticlessubscriber.ts | 20 + .../components/benefitcustomsubscriber.ts | 10 + .../components/benefitdiscordsubscriber.ts | 20 + .../benefitdownloadablessubscriber.ts | 20 + .../benefitgithubrepositorysubscriber.ts | 20 + .../benefitlicensekeyssubscriber.ts | 18 +- .../components/checkoutconfirmstripe.ts | 50 +++ src/models/components/checkoutproduct.ts | 344 +++++++++++++++ src/models/components/checkoutpublic.ts | 88 +++- src/models/components/checkoutupdate.ts | 43 ++ src/models/components/checkoutupdatepublic.ts | 50 +++ src/models/components/customfield.ts | 121 ++++++ src/models/components/customfieldcheckbox.ts | 148 +++++++ .../customfieldcheckboxproperties.ts | 66 +++ src/models/components/customfieldcreate.ts | 121 ++++++ .../components/customfieldcreatecheckbox.ts | 130 ++++++ .../components/customfieldcreatedate.ts | 130 ++++++ .../components/customfieldcreatenumber.ts | 130 ++++++ .../components/customfieldcreateselect.ts | 130 ++++++ .../components/customfieldcreatetext.ts | 130 ++++++ src/models/components/customfielddate.ts | 146 +++++++ .../components/customfielddateproperties.ts | 74 ++++ src/models/components/customfieldnumber.ts | 146 +++++++ .../components/customfieldnumberproperties.ts | 74 ++++ src/models/components/customfieldselect.ts | 146 +++++++ .../components/customfieldselectoption.ts | 49 +++ .../components/customfieldselectproperties.ts | 76 ++++ .../components/customfieldsortproperty.ts | 41 ++ src/models/components/customfieldtext.ts | 146 +++++++ .../components/customfieldtextproperties.ts | 82 ++++ src/models/components/customfieldtype.ts | 36 ++ src/models/components/customfieldupdate.ts | 121 ++++++ .../components/customfieldupdatecheckbox.ts | 110 +++++ .../components/customfieldupdatedate.ts | 108 +++++ .../components/customfieldupdatenumber.ts | 108 +++++ .../components/customfieldupdateselect.ts | 108 +++++ .../components/customfieldupdatetext.ts | 108 +++++ src/models/components/index.ts | 32 +- src/models/components/listresource.ts | 61 +++ .../components/listresourceuserbenefit.ts | 88 ++-- src/models/components/oauth2client.ts | 4 +- .../components/oauth2clientconfiguration.ts | 4 +- .../oauth2clientconfigurationupdate.ts | 4 +- src/models/components/order.ts | 45 ++ .../polarcheckoutlegacyschemascheckout.ts | 20 +- .../polarcheckoutschemascheckout.ts | 127 +++++- .../polarcheckoutschemascheckoutcreate.ts | 57 +++ src/models/components/product.ts | 219 ++-------- src/models/components/productinput.ts | 173 ++++++++ src/models/components/productonetimecreate.ts | 19 + .../components/productrecurringcreate.ts | 19 + src/models/components/productupdate.ts | 19 + src/models/components/repository.ts | 12 + src/models/components/subscription.ts | 231 ++++++++++ src/models/components/subscriptioninput.ts | 202 --------- src/models/components/userorderproduct.ts | 16 +- .../components/usersubscriptionproduct.ts | 16 +- .../webhookproductcreatedpayload.ts | 2 +- .../webhookproductupdatedpayload.ts | 2 +- .../webhooksubscriptionactivepayload.ts | 2 +- .../webhooksubscriptioncanceledpayload.ts | 2 +- .../webhooksubscriptioncreatedpayload.ts | 2 +- .../webhooksubscriptionrevokedpayload.ts | 2 +- .../webhooksubscriptionupdatedpayload.ts | 2 +- src/models/operations/customfieldsdelete.ts | 48 +++ src/models/operations/customfieldsget.ts | 48 +++ src/models/operations/customfieldslist.ts | 249 +++++++++++ src/models/operations/customfieldsupdate.ts | 62 +++ src/models/operations/index.ts | 4 + src/models/operations/organizationslist.ts | 15 - src/models/operations/productslist.ts | 4 +- src/models/operations/usersbenefitsget.ts | 40 +- src/sdk/customfields.ts | 101 +++++ src/sdk/sdk.ts | 6 + 506 files changed, 12514 insertions(+), 3163 deletions(-) create mode 100644 docs/models/components/attachedcustomfield.md create mode 100644 docs/models/components/attachedcustomfieldcreate.md create mode 100644 docs/models/components/checkoutconfirmstripecustomfielddata.md create mode 100644 docs/models/components/checkoutproduct.md rename docs/models/components/{productbenefits.md => checkoutproductbenefits.md} (53%) create mode 100644 docs/models/components/checkoutproductinput.md create mode 100644 docs/models/components/checkoutpubliccustomfielddata.md create mode 100644 docs/models/components/checkoutupdatepubliccustomfielddata.md create mode 100644 docs/models/components/customfield.md create mode 100644 docs/models/components/customfieldcheckbox.md create mode 100644 docs/models/components/customfieldcheckboxproperties.md create mode 100644 docs/models/components/customfieldcheckboxtype.md create mode 100644 docs/models/components/customfieldcreate.md create mode 100644 docs/models/components/customfieldcreatecheckbox.md create mode 100644 docs/models/components/customfieldcreatecheckboxtype.md create mode 100644 docs/models/components/customfieldcreatedate.md create mode 100644 docs/models/components/customfieldcreatedatetype.md create mode 100644 docs/models/components/customfieldcreatenumber.md create mode 100644 docs/models/components/customfieldcreatenumbertype.md create mode 100644 docs/models/components/customfieldcreateselect.md create mode 100644 docs/models/components/customfieldcreateselecttype.md create mode 100644 docs/models/components/customfieldcreatetext.md create mode 100644 docs/models/components/customfieldcreatetexttype.md create mode 100644 docs/models/components/customfielddata.md create mode 100644 docs/models/components/customfielddate.md create mode 100644 docs/models/components/customfielddateproperties.md create mode 100644 docs/models/components/customfielddatetype.md create mode 100644 docs/models/components/customfieldnumber.md create mode 100644 docs/models/components/customfieldnumberproperties.md create mode 100644 docs/models/components/customfieldnumbertype.md create mode 100644 docs/models/components/customfieldselect.md create mode 100644 docs/models/components/customfieldselectoption.md create mode 100644 docs/models/components/customfieldselectproperties.md create mode 100644 docs/models/components/customfieldselecttype.md create mode 100644 docs/models/components/customfieldsortproperty.md create mode 100644 docs/models/components/customfieldtext.md create mode 100644 docs/models/components/customfieldtextproperties.md create mode 100644 docs/models/components/customfieldtexttype.md create mode 100644 docs/models/components/customfieldtype.md create mode 100644 docs/models/components/customfieldupdate.md create mode 100644 docs/models/components/customfieldupdatecheckbox.md create mode 100644 docs/models/components/customfieldupdatecheckboxtype.md create mode 100644 docs/models/components/customfieldupdatedate.md create mode 100644 docs/models/components/customfieldupdatedatetype.md create mode 100644 docs/models/components/customfieldupdatenumber.md create mode 100644 docs/models/components/customfieldupdatenumbertype.md create mode 100644 docs/models/components/customfieldupdateselect.md create mode 100644 docs/models/components/customfieldupdateselecttype.md create mode 100644 docs/models/components/customfieldupdatetext.md create mode 100644 docs/models/components/customfieldupdatetexttype.md create mode 100644 docs/models/components/listresource.md create mode 100644 docs/models/components/ordercustomfielddata.md create mode 100644 docs/models/components/polarcheckoutschemascheckoutcreatecustomfielddata.md create mode 100644 docs/models/components/polarcheckoutschemascheckoutcustomfielddata.md create mode 100644 docs/models/components/subscriptioncustomfielddata.md create mode 100644 docs/models/operations/customfieldsdeleterequest.md create mode 100644 docs/models/operations/customfieldsgetrequest.md create mode 100644 docs/models/operations/customfieldslistqueryparamorganizationidfilter.md create mode 100644 docs/models/operations/customfieldslistrequest.md create mode 100644 docs/models/operations/customfieldslistresponse.md create mode 100644 docs/models/operations/customfieldsupdaterequest.md create mode 100644 docs/models/operations/customfieldtypefilter.md create mode 100644 docs/sdks/customfields/README.md create mode 100644 src/funcs/customFieldsCreate.ts create mode 100644 src/funcs/customFieldsDelete.ts create mode 100644 src/funcs/customFieldsGet.ts create mode 100644 src/funcs/customFieldsList.ts create mode 100644 src/funcs/customFieldsUpdate.ts create mode 100644 src/models/components/attachedcustomfield.ts create mode 100644 src/models/components/attachedcustomfieldcreate.ts create mode 100644 src/models/components/checkoutproduct.ts create mode 100644 src/models/components/customfield.ts create mode 100644 src/models/components/customfieldcheckbox.ts create mode 100644 src/models/components/customfieldcheckboxproperties.ts create mode 100644 src/models/components/customfieldcreate.ts create mode 100644 src/models/components/customfieldcreatecheckbox.ts create mode 100644 src/models/components/customfieldcreatedate.ts create mode 100644 src/models/components/customfieldcreatenumber.ts create mode 100644 src/models/components/customfieldcreateselect.ts create mode 100644 src/models/components/customfieldcreatetext.ts create mode 100644 src/models/components/customfielddate.ts create mode 100644 src/models/components/customfielddateproperties.ts create mode 100644 src/models/components/customfieldnumber.ts create mode 100644 src/models/components/customfieldnumberproperties.ts create mode 100644 src/models/components/customfieldselect.ts create mode 100644 src/models/components/customfieldselectoption.ts create mode 100644 src/models/components/customfieldselectproperties.ts create mode 100644 src/models/components/customfieldsortproperty.ts create mode 100644 src/models/components/customfieldtext.ts create mode 100644 src/models/components/customfieldtextproperties.ts create mode 100644 src/models/components/customfieldtype.ts create mode 100644 src/models/components/customfieldupdate.ts create mode 100644 src/models/components/customfieldupdatecheckbox.ts create mode 100644 src/models/components/customfieldupdatedate.ts create mode 100644 src/models/components/customfieldupdatenumber.ts create mode 100644 src/models/components/customfieldupdateselect.ts create mode 100644 src/models/components/customfieldupdatetext.ts create mode 100644 src/models/components/listresource.ts create mode 100644 src/models/components/productinput.ts delete mode 100644 src/models/components/subscriptioninput.ts create mode 100644 src/models/operations/customfieldsdelete.ts create mode 100644 src/models/operations/customfieldsget.ts create mode 100644 src/models/operations/customfieldslist.ts create mode 100644 src/models/operations/customfieldsupdate.ts create mode 100644 src/sdk/customfields.ts diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index d0d0c586..2428785a 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 983150e6-ebc8-43fe-9b18-750461aad344 management: - docChecksum: 5f68bc61047e6d440a18800b4a8cc1c0 + docChecksum: 97175aedeb27944ebbd1d6d21457df2e docVersion: 0.1.0 - speakeasyVersion: 1.424.0 - generationVersion: 2.445.1 - releaseVersion: 0.14.0 - configChecksum: 8a61fcfc341898922e39d01aaed1626c + speakeasyVersion: 1.431.0 + generationVersion: 2.451.0 + releaseVersion: 0.15.0 + configChecksum: 275e2e2cd4d08b3a7afd92ac1c577a75 repoURL: https://github.com/polarsource/polar-js.git installationURL: https://github.com/polarsource/polar-js published: true @@ -14,12 +14,12 @@ features: typescript: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.11 - core: 3.18.2 + core: 3.18.3 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 devContainers: 2.90.0 enumUnions: 0.1.0 - envVarSecurityUsage: 0.1.1 + envVarSecurityUsage: 0.1.2 globalSecurity: 2.82.11 globalSecurityCallbacks: 0.1.0 globalSecurityFlattening: 0.1.0 @@ -32,10 +32,10 @@ features: pagination: 2.82.7 responseFormat: 0.2.3 retries: 2.83.0 - sdkHooks: 0.1.0 + sdkHooks: 0.2.0 serverIDs: 2.81.2 tests: 0.7.0 - unions: 2.85.7 + unions: 2.85.8 webhooks: 1.0.0 generatedFiles: - .devcontainer/README.md @@ -62,6 +62,8 @@ generatedFiles: - docs/models/components/articleupdate.md - docs/models/components/articlevisibility.md - docs/models/components/assignee.md + - docs/models/components/attachedcustomfield.md + - docs/models/components/attachedcustomfieldcreate.md - docs/models/components/author.md - docs/models/components/benefit.md - docs/models/components/benefitads.md @@ -161,19 +163,67 @@ generatedFiles: - docs/models/components/benefittype.md - docs/models/components/bylineprofile.md - docs/models/components/checkoutconfirmstripe.md + - docs/models/components/checkoutconfirmstripecustomfielddata.md - docs/models/components/checkoutlink.md - docs/models/components/checkoutlinkcreate.md - docs/models/components/checkoutlinkcreatepaymentprocessor.md - docs/models/components/checkoutlinksortproperty.md - docs/models/components/checkoutlinkupdate.md + - docs/models/components/checkoutproduct.md + - docs/models/components/checkoutproductbenefits.md + - docs/models/components/checkoutproductinput.md - docs/models/components/checkoutpublic.md + - docs/models/components/checkoutpubliccustomfielddata.md - docs/models/components/checkoutpublicpaymentprocessormetadata.md - docs/models/components/checkoutsortproperty.md - docs/models/components/checkoutstatus.md - docs/models/components/checkoutupdate.md - docs/models/components/checkoutupdatepublic.md + - docs/models/components/checkoutupdatepubliccustomfielddata.md - docs/models/components/conditions.md - docs/models/components/currencyamount.md + - docs/models/components/customfield.md + - docs/models/components/customfieldcheckbox.md + - docs/models/components/customfieldcheckboxproperties.md + - docs/models/components/customfieldcheckboxtype.md + - docs/models/components/customfieldcreate.md + - docs/models/components/customfieldcreatecheckbox.md + - docs/models/components/customfieldcreatecheckboxtype.md + - docs/models/components/customfieldcreatedate.md + - docs/models/components/customfieldcreatedatetype.md + - docs/models/components/customfieldcreatenumber.md + - docs/models/components/customfieldcreatenumbertype.md + - docs/models/components/customfieldcreateselect.md + - docs/models/components/customfieldcreateselecttype.md + - docs/models/components/customfieldcreatetext.md + - docs/models/components/customfieldcreatetexttype.md + - docs/models/components/customfielddata.md + - docs/models/components/customfielddate.md + - docs/models/components/customfielddateproperties.md + - docs/models/components/customfielddatetype.md + - docs/models/components/customfieldnumber.md + - docs/models/components/customfieldnumberproperties.md + - docs/models/components/customfieldnumbertype.md + - docs/models/components/customfieldselect.md + - docs/models/components/customfieldselectoption.md + - docs/models/components/customfieldselectproperties.md + - docs/models/components/customfieldselecttype.md + - docs/models/components/customfieldsortproperty.md + - docs/models/components/customfieldtext.md + - docs/models/components/customfieldtextproperties.md + - docs/models/components/customfieldtexttype.md + - docs/models/components/customfieldtype.md + - docs/models/components/customfieldupdate.md + - docs/models/components/customfieldupdatecheckbox.md + - docs/models/components/customfieldupdatecheckboxtype.md + - docs/models/components/customfieldupdatedate.md + - docs/models/components/customfieldupdatedatetype.md + - docs/models/components/customfieldupdatenumber.md + - docs/models/components/customfieldupdatenumbertype.md + - docs/models/components/customfieldupdateselect.md + - docs/models/components/customfieldupdateselecttype.md + - docs/models/components/customfieldupdatetext.md + - docs/models/components/customfieldupdatetexttype.md - docs/models/components/donation.md - docs/models/components/donationorganization.md - docs/models/components/donationuser.md @@ -213,6 +263,7 @@ generatedFiles: - docs/models/components/licensekeyuser.md - docs/models/components/licensekeyvalidate.md - docs/models/components/licensekeywithactivations.md + - docs/models/components/listresource.md - docs/models/components/listresourcearticle.md - docs/models/components/listresourcebenefit.md - docs/models/components/listresourcebenefitgrant.md @@ -256,6 +307,7 @@ generatedFiles: - docs/models/components/onev11oauth21tokenpostxcomponentsrefreshtokenrequestgranttype.md - docs/models/components/order.md - docs/models/components/orderbillingreason.md + - docs/models/components/ordercustomfielddata.md - docs/models/components/orderinvoice.md - docs/models/components/orderproduct.md - docs/models/components/ordersortproperty.md @@ -285,12 +337,13 @@ generatedFiles: - docs/models/components/polarcheckoutlegacyschemascheckoutcreate.md - docs/models/components/polarcheckoutschemascheckout.md - docs/models/components/polarcheckoutschemascheckoutcreate.md + - docs/models/components/polarcheckoutschemascheckoutcreatecustomfielddata.md + - docs/models/components/polarcheckoutschemascheckoutcustomfielddata.md - docs/models/components/polarcheckoutschemascheckoutinput.md - docs/models/components/polarenumspaymentprocessor.md - docs/models/components/previousproperties.md - docs/models/components/prices.md - docs/models/components/product.md - - docs/models/components/productbenefits.md - docs/models/components/productbenefitsupdate.md - docs/models/components/productinput.md - docs/models/components/productmediafilecreate.md @@ -358,6 +411,7 @@ generatedFiles: - docs/models/components/service.md - docs/models/components/state.md - docs/models/components/subscription.md + - docs/models/components/subscriptioncustomfielddata.md - docs/models/components/subscriptioninput.md - docs/models/components/subscriptionrecurringinterval.md - docs/models/components/subscriptionsortproperty.md @@ -482,6 +536,13 @@ generatedFiles: - docs/models/operations/checkoutscustomlistresponse.md - docs/models/operations/checkoutscustomupdaterequest.md - docs/models/operations/checkoutsgetrequest.md + - docs/models/operations/customfieldsdeleterequest.md + - docs/models/operations/customfieldsgetrequest.md + - docs/models/operations/customfieldslistqueryparamorganizationidfilter.md + - docs/models/operations/customfieldslistrequest.md + - docs/models/operations/customfieldslistresponse.md + - docs/models/operations/customfieldsupdaterequest.md + - docs/models/operations/customfieldtypefilter.md - docs/models/operations/externalorganizationnamefilter.md - docs/models/operations/externalorganizationslistqueryparamorganizationidfilter.md - docs/models/operations/externalorganizationslistrequest.md @@ -594,6 +655,7 @@ generatedFiles: - docs/sdks/checkouts/README.md - docs/sdks/clients/README.md - docs/sdks/custom/README.md + - docs/sdks/customfields/README.md - docs/sdks/downloadables/README.md - docs/sdks/externalorganizations/README.md - docs/sdks/files/README.md @@ -647,6 +709,11 @@ generatedFiles: - src/funcs/checkoutsCustomList.ts - src/funcs/checkoutsCustomUpdate.ts - src/funcs/checkoutsGet.ts + - src/funcs/customFieldsCreate.ts + - src/funcs/customFieldsDelete.ts + - src/funcs/customFieldsGet.ts + - src/funcs/customFieldsList.ts + - src/funcs/customFieldsUpdate.ts - src/funcs/externalOrganizationsList.ts - src/funcs/filesCreate.ts - src/funcs/filesDelete.ts @@ -739,6 +806,8 @@ generatedFiles: - src/models/components/articleupdate.ts - src/models/components/articlevisibility.ts - src/models/components/assignee.ts + - src/models/components/attachedcustomfield.ts + - src/models/components/attachedcustomfieldcreate.ts - src/models/components/author.ts - src/models/components/benefit.ts - src/models/components/benefitads.ts @@ -811,12 +880,39 @@ generatedFiles: - src/models/components/checkoutlinkcreate.ts - src/models/components/checkoutlinksortproperty.ts - src/models/components/checkoutlinkupdate.ts + - src/models/components/checkoutproduct.ts - src/models/components/checkoutpublic.ts - src/models/components/checkoutsortproperty.ts - src/models/components/checkoutstatus.ts - src/models/components/checkoutupdate.ts - src/models/components/checkoutupdatepublic.ts - src/models/components/currencyamount.ts + - src/models/components/customfield.ts + - src/models/components/customfieldcheckbox.ts + - src/models/components/customfieldcheckboxproperties.ts + - src/models/components/customfieldcreate.ts + - src/models/components/customfieldcreatecheckbox.ts + - src/models/components/customfieldcreatedate.ts + - src/models/components/customfieldcreatenumber.ts + - src/models/components/customfieldcreateselect.ts + - src/models/components/customfieldcreatetext.ts + - src/models/components/customfielddate.ts + - src/models/components/customfielddateproperties.ts + - src/models/components/customfieldnumber.ts + - src/models/components/customfieldnumberproperties.ts + - src/models/components/customfieldselect.ts + - src/models/components/customfieldselectoption.ts + - src/models/components/customfieldselectproperties.ts + - src/models/components/customfieldsortproperty.ts + - src/models/components/customfieldtext.ts + - src/models/components/customfieldtextproperties.ts + - src/models/components/customfieldtype.ts + - src/models/components/customfieldupdate.ts + - src/models/components/customfieldupdatecheckbox.ts + - src/models/components/customfieldupdatedate.ts + - src/models/components/customfieldupdatenumber.ts + - src/models/components/customfieldupdateselect.ts + - src/models/components/customfieldupdatetext.ts - src/models/components/donation.ts - src/models/components/donationorganization.ts - src/models/components/donationuser.ts @@ -847,6 +943,7 @@ generatedFiles: - src/models/components/licensekeyuser.ts - src/models/components/licensekeyvalidate.ts - src/models/components/licensekeywithactivations.ts + - src/models/components/listresource.ts - src/models/components/listresourcearticle.ts - src/models/components/listresourcebenefit.ts - src/models/components/listresourcebenefitgrant.ts @@ -908,6 +1005,7 @@ generatedFiles: - src/models/components/polarenumspaymentprocessor.ts - src/models/components/product.ts - src/models/components/productbenefitsupdate.ts + - src/models/components/productinput.ts - src/models/components/productmediafilecreate.ts - src/models/components/productmediafileread.ts - src/models/components/productonetimecreate.ts @@ -945,7 +1043,6 @@ generatedFiles: - src/models/components/security.ts - src/models/components/state.ts - src/models/components/subscription.ts - - src/models/components/subscriptioninput.ts - src/models/components/subscriptionrecurringinterval.ts - src/models/components/subscriptionsortproperty.ts - src/models/components/subscriptionstatus.ts @@ -1027,6 +1124,10 @@ generatedFiles: - src/models/operations/checkoutscustomlist.ts - src/models/operations/checkoutscustomupdate.ts - src/models/operations/checkoutsget.ts + - src/models/operations/customfieldsdelete.ts + - src/models/operations/customfieldsget.ts + - src/models/operations/customfieldslist.ts + - src/models/operations/customfieldsupdate.ts - src/models/operations/externalorganizationslist.ts - src/models/operations/filescreate.ts - src/models/operations/filesdelete.ts @@ -1088,6 +1189,7 @@ generatedFiles: - src/sdk/checkouts.ts - src/sdk/clients.ts - src/sdk/custom.ts + - src/sdk/customfields.ts - src/sdk/downloadables.ts - src/sdk/externalorganizations.ts - src/sdk/files.ts @@ -1130,7 +1232,7 @@ examples: id: "" responses: "200": - application/json: {"created_at": "2023-09-05T11:33:52.011Z", "modified_at": "2023-08-20T11:11:04.610Z", "id": "", "description": "hundred whereas dimly unused cone restructure gadzooks", "selectable": false, "deletable": false, "organization_id": "", "properties": {"repository_owner": "polarsource", "repository_name": "private_repo"}} + application/json: {"created_at": "2023-09-05T11:33:52.011Z", "modified_at": "2023-08-20T11:11:04.610Z", "id": "", "description": "hundred whereas dimly unused cone restructure gadzooks", "selectable": false, "deletable": false, "organization_id": "", "grants": [{"created_at": "2023-03-12T15:23:46.888Z", "modified_at": "2024-03-05T14:23:34.462Z", "id": "", "is_granted": true, "is_revoked": true, "subscription_id": "", "order_id": "", "user_id": "", "benefit_id": ""}, {"created_at": "2024-02-24T17:48:17.639Z", "modified_at": "2023-03-07T06:16:39.367Z", "id": "", "is_granted": false, "is_revoked": false, "subscription_id": "", "order_id": "", "user_id": "", "benefit_id": ""}, {"created_at": "2024-07-13T14:31:52.430Z", "modified_at": "2023-04-01T04:11:43.083Z", "id": "", "is_granted": true, "is_revoked": false, "subscription_id": "", "order_id": "", "user_id": "", "benefit_id": ""}], "organization": {"created_at": "2023-07-07T00:34:30.082Z", "modified_at": "2024-11-07T20:31:03.453Z", "id": "", "name": "", "slug": "", "avatar_url": "https://bleak-birdcage.com/", "bio": "", "company": "Orn and Sons", "blog": "", "location": "", "email": "Lowell_Greenholt28@gmail.com", "twitter_username": "", "pledge_minimum_amount": 710636, "pledge_badge_show_amount": true, "default_upfront_split_to_contributors": 786952, "donations_enabled": false}, "properties": {"repository_owner": "polarsource", "repository_name": "private_repo"}} "404": application/json: {"detail": ""} "422": {} @@ -1147,7 +1249,7 @@ examples: id: "" responses: "200": - application/json: {"created_at": "2024-02-07T13:54:48.780Z", "modified_at": "2022-04-09T17:04:24.706Z", "id": "", "amount": 558834, "tax_amount": 844199, "currency": "Ouguiya", "user_id": "", "product_id": "", "product_price_id": "", "subscription_id": "", "product": {"created_at": "2024-06-29T09:01:50.308Z", "modified_at": "2023-07-26T06:33:15.886Z", "id": "", "name": "", "description": "Centralized well-modulated strategy", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": []}, "product_price": {"created_at": "2023-08-20T11:11:04.610Z", "modified_at": "2023-07-26T06:33:15.810Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "minimum_amount": 458049, "maximum_amount": 450824, "preset_amount": 262795}, "subscription": {"created_at": "2022-11-08T10:33:23.061Z", "modified_at": "2023-04-26T04:53:50.205Z", "id": "", "amount": 521235, "currency": "Bulgarian Lev", "recurring_interval": "year", "status": "trialing", "current_period_start": "2024-05-28T07:17:56.701Z", "current_period_end": "2024-03-20T23:00:26.309Z", "cancel_at_period_end": false, "started_at": "2024-12-06T14:08:11.458Z", "ended_at": "2022-08-30T01:43:46.083Z", "user_id": "", "product_id": "", "price_id": "", "checkout_id": ""}} + application/json: {"created_at": "2024-02-07T13:54:48.780Z", "modified_at": "2022-04-09T17:04:24.706Z", "id": "", "amount": 558834, "tax_amount": 844199, "currency": "Ouguiya", "user_id": "", "product_id": "", "product_price_id": "", "subscription_id": "", "product": {"created_at": "2024-06-29T09:01:50.308Z", "modified_at": "2023-07-26T06:33:15.886Z", "id": "", "name": "", "description": "Centralized well-modulated strategy", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": [], "organization": {"created_at": "2024-02-07T13:54:48.821Z", "modified_at": "2023-09-05T11:33:52.011Z", "id": "", "name": "", "slug": "", "avatar_url": "https://misguided-violin.info", "bio": "", "company": "Gislason Group", "blog": "", "location": "", "email": "Ian.Block31@hotmail.com", "twitter_username": "", "pledge_minimum_amount": 552582, "pledge_badge_show_amount": false, "default_upfront_split_to_contributors": 380699, "donations_enabled": false}}, "product_price": {"created_at": "2022-12-20T13:59:56.783Z", "modified_at": "2022-12-21T05:04:07.004Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 243354, "maximum_amount": 780262, "preset_amount": 284041}, "subscription": {"created_at": "2022-11-08T10:33:23.061Z", "modified_at": "2023-04-26T04:53:50.205Z", "id": "", "amount": 521235, "currency": "Bulgarian Lev", "recurring_interval": "year", "status": "trialing", "current_period_start": "2024-05-28T07:17:56.701Z", "current_period_end": "2024-03-20T23:00:26.309Z", "cancel_at_period_end": false, "started_at": "2024-12-06T14:08:11.458Z", "ended_at": "2022-08-30T01:43:46.083Z", "user_id": "", "product_id": "", "price_id": "", "checkout_id": ""}} "404": application/json: {"detail": ""} "422": {} @@ -1187,7 +1289,7 @@ examples: id: "" responses: "200": - application/json: {"created_at": "2024-02-07T13:54:48.780Z", "modified_at": "2022-04-09T17:04:24.706Z", "id": "", "amount": 700347, "currency": "Burundi Franc", "recurring_interval": "year", "status": "active", "current_period_start": "2024-07-14T05:47:45.857Z", "current_period_end": "2023-08-20T11:11:04.289Z", "cancel_at_period_end": false, "started_at": "2023-07-26T06:33:15.886Z", "ended_at": "2022-03-28T03:17:21.516Z", "user_id": "", "product_id": "", "price_id": "", "checkout_id": "", "product": {"created_at": "2024-11-29T01:50:48.387Z", "modified_at": "2024-08-07T07:28:43.175Z", "id": "", "name": "", "description": "Multi-channelled optimal hierarchy", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": []}, "price": {"created_at": "2023-08-20T11:11:04.610Z", "modified_at": "2023-07-26T06:33:15.810Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "minimum_amount": 458049, "maximum_amount": 450824, "preset_amount": 262795}} + application/json: {"created_at": "2024-02-07T13:54:48.780Z", "modified_at": "2022-04-09T17:04:24.706Z", "id": "", "amount": 700347, "currency": "Burundi Franc", "recurring_interval": "year", "status": "active", "current_period_start": "2024-07-14T05:47:45.857Z", "current_period_end": "2023-08-20T11:11:04.289Z", "cancel_at_period_end": false, "started_at": "2023-07-26T06:33:15.886Z", "ended_at": "2022-03-28T03:17:21.516Z", "user_id": "", "product_id": "", "price_id": "", "checkout_id": "", "product": {"created_at": "2024-11-29T01:50:48.387Z", "modified_at": "2024-08-07T07:28:43.175Z", "id": "", "name": "", "description": "Multi-channelled optimal hierarchy", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": [], "organization": {"created_at": "2024-02-07T13:54:48.821Z", "modified_at": "2023-09-05T11:33:52.011Z", "id": "", "name": "", "slug": "", "avatar_url": "https://misguided-violin.info", "bio": "", "company": "Gislason Group", "blog": "", "location": "", "email": "Ian.Block31@hotmail.com", "twitter_username": "", "pledge_minimum_amount": 552582, "pledge_badge_show_amount": false, "default_upfront_split_to_contributors": 380699, "donations_enabled": false}}, "price": {"created_at": "2022-12-20T13:59:56.783Z", "modified_at": "2022-12-21T05:04:07.004Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 243354, "maximum_amount": 780262, "preset_amount": 284041}} "404": application/json: {"detail": ""} "422": {} @@ -1200,7 +1302,7 @@ examples: application/json: {"product_price_id": ""} responses: "200": - application/json: {"created_at": "2024-07-28T19:04:48.900Z", "modified_at": "2022-01-27T21:53:39.052Z", "id": "", "amount": 857478, "currency": "Netherlands Antillian Guilder", "recurring_interval": "year", "status": "past_due", "current_period_start": "2022-01-18T03:43:33.232Z", "current_period_end": "2023-01-13T16:52:57.237Z", "cancel_at_period_end": true, "started_at": "2024-12-22T15:27:45.933Z", "ended_at": "2022-10-24T06:37:05.817Z", "user_id": "", "product_id": "", "price_id": "", "checkout_id": "", "product": {"created_at": "2023-11-19T22:44:57.818Z", "modified_at": "2024-01-20T21:09:11.127Z", "id": "", "name": "", "description": "Multi-tiered grid-enabled website", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [], "benefits": [], "medias": []}, "price": {"created_at": "2023-01-13T16:52:57.274Z", "modified_at": "2024-12-22T15:27:45.882Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "minimum_amount": 488852, "maximum_amount": 984008, "preset_amount": 54062}} + application/json: {"created_at": "2024-07-28T19:04:48.900Z", "modified_at": "2022-01-27T21:53:39.052Z", "id": "", "amount": 857478, "currency": "Netherlands Antillian Guilder", "recurring_interval": "year", "status": "past_due", "current_period_start": "2022-01-18T03:43:33.232Z", "current_period_end": "2023-01-13T16:52:57.237Z", "cancel_at_period_end": true, "started_at": "2024-12-22T15:27:45.933Z", "ended_at": "2022-10-24T06:37:05.817Z", "user_id": "", "product_id": "", "price_id": "", "checkout_id": "", "product": {"created_at": "2023-11-19T22:44:57.818Z", "modified_at": "2024-01-20T21:09:11.127Z", "id": "", "name": "", "description": "Multi-tiered grid-enabled website", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [], "benefits": [], "medias": [], "organization": {"created_at": "2024-07-28T19:04:48.565Z", "modified_at": "2023-10-17T10:52:42.015Z", "id": "", "name": "", "slug": "", "avatar_url": "https://yearly-order.info/", "bio": "", "company": "Becker, Treutel and King", "blog": "", "location": "", "email": "Delphia_Schamberger@gmail.com", "twitter_username": "", "pledge_minimum_amount": 771203, "pledge_badge_show_amount": false, "default_upfront_split_to_contributors": 404265, "donations_enabled": true}}, "price": {"created_at": "2023-04-27T07:27:10.489Z", "modified_at": "2023-07-04T05:50:56.527Z", "id": "", "is_archived": true, "product_id": ""}} "403": application/json: {"detail": ""} "404": @@ -1213,7 +1315,7 @@ examples: id: "" responses: "200": - application/json: {"created_at": "2022-01-28T04:39:19.402Z", "modified_at": "2022-07-26T00:54:13.634Z", "id": "", "amount": 24812, "currency": "Cuban Peso", "recurring_interval": "year", "status": "unpaid", "current_period_start": "2023-12-06T17:35:22.378Z", "current_period_end": "2023-06-04T09:53:22.955Z", "cancel_at_period_end": false, "started_at": "2022-04-04T13:59:58.493Z", "ended_at": "2022-07-16T10:00:54.807Z", "user_id": "", "product_id": "", "price_id": "", "checkout_id": "", "product": {"created_at": "2022-08-03T23:44:35.164Z", "modified_at": "2022-05-01T05:45:14.845Z", "id": "", "name": "", "description": "Fully-configurable multimedia alliance", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": []}, "price": {"created_at": "2023-06-04T09:53:22.758Z", "modified_at": "2022-04-04T13:59:58.090Z", "id": "", "is_archived": true, "product_id": "", "recurring_interval": "month"}} + application/json: {"created_at": "2022-01-28T04:39:19.402Z", "modified_at": "2022-07-26T00:54:13.634Z", "id": "", "amount": 24812, "currency": "Cuban Peso", "recurring_interval": "year", "status": "unpaid", "current_period_start": "2023-12-06T17:35:22.378Z", "current_period_end": "2023-06-04T09:53:22.955Z", "cancel_at_period_end": false, "started_at": "2022-04-04T13:59:58.493Z", "ended_at": "2022-07-16T10:00:54.807Z", "user_id": "", "product_id": "", "price_id": "", "checkout_id": "", "product": {"created_at": "2022-08-03T23:44:35.164Z", "modified_at": "2022-05-01T05:45:14.845Z", "id": "", "name": "", "description": "Fully-configurable multimedia alliance", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": [], "organization": {"created_at": "2022-01-28T04:39:19.513Z", "modified_at": "2024-12-24T10:36:51.473Z", "id": "", "name": "", "slug": "", "avatar_url": "https://brave-costume.biz/", "bio": "", "company": "Crooks - Marvin", "blog": "", "location": "", "email": "Dagmar41@gmail.com", "twitter_username": "", "pledge_minimum_amount": 730293, "pledge_badge_show_amount": false, "default_upfront_split_to_contributors": 786521, "donations_enabled": true}}, "price": {"created_at": "2024-03-25T08:27:38.783Z", "modified_at": "2023-06-25T17:34:35.287Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "price_amount": 816224, "recurring_interval": "year"}} "403": application/json: {"detail": ""} "404": @@ -1364,7 +1466,7 @@ examples: id: "" responses: "200": - application/json: {"id": "b18d8d81-fd7b-4764-a31e-475cb1f36591", "is_private": false, "name": "MyOrg", "description": "Optional reciprocal projection", "stars": 1337, "license": "", "homepage": "", "organization": {"id": "c65bc928-1545-452e-b0c0-48b8c2b5ed5f", "name": "", "avatar_url": "", "is_personal": true, "bio": "", "pretty_name": "", "company": "Windler, Bahringer and Kilback", "blog": "", "location": "", "email": "Herbert14@hotmail.com", "twitter_username": "", "organization_id": ""}} + application/json: {"id": "b18d8d81-fd7b-4764-a31e-475cb1f36591", "is_private": false, "name": "MyOrg", "description": "Optional reciprocal projection", "stars": 1337, "license": "", "homepage": "", "organization": {"id": "c65bc928-1545-452e-b0c0-48b8c2b5ed5f", "name": "", "avatar_url": "", "is_personal": true, "bio": "", "pretty_name": "", "company": "Windler, Bahringer and Kilback", "blog": "", "location": "", "email": "Herbert14@hotmail.com", "twitter_username": "", "organization_id": ""}, "internal_organization": {"created_at": "2024-02-07T13:54:48.821Z", "modified_at": "2023-09-05T11:33:52.011Z", "id": "", "name": "", "slug": "", "avatar_url": "https://misguided-violin.info", "bio": "", "company": "Gislason Group", "blog": "", "location": "", "email": "Ian.Block31@hotmail.com", "twitter_username": "", "pledge_minimum_amount": 552582, "pledge_badge_show_amount": false, "default_upfront_split_to_contributors": 380699, "donations_enabled": false}} "404": application/json: {"detail": ""} "422": {} @@ -1375,7 +1477,7 @@ examples: id: "" responses: "200": - application/json: {"id": "d0905bf4-aa77-4f20-8e77-54c352acfe54", "is_private": true, "name": "MyOrg", "description": "Multi-lateral grid-enabled product", "stars": 1337, "license": "", "homepage": "", "organization": {"id": "abf6805c-5ca7-4187-9435-5ad7d4e1b584", "name": "", "avatar_url": "", "is_personal": false, "bio": "", "pretty_name": "", "company": "Lubowitz - Wiza", "blog": "", "location": "", "email": "Reta_Larkin@yahoo.com", "twitter_username": "", "organization_id": ""}} + application/json: {"id": "d0905bf4-aa77-4f20-8e77-54c352acfe54", "is_private": true, "name": "MyOrg", "description": "Multi-lateral grid-enabled product", "stars": 1337, "license": "", "homepage": "", "organization": {"id": "abf6805c-5ca7-4187-9435-5ad7d4e1b584", "name": "", "avatar_url": "", "is_personal": false, "bio": "", "pretty_name": "", "company": "Lubowitz - Wiza", "blog": "", "location": "", "email": "Reta_Larkin@yahoo.com", "twitter_username": "", "organization_id": ""}, "internal_organization": {"created_at": "2024-07-28T19:04:48.565Z", "modified_at": "2023-10-17T10:52:42.015Z", "id": "", "name": "", "slug": "", "avatar_url": "https://yearly-order.info/", "bio": "", "company": "Becker, Treutel and King", "blog": "", "location": "", "email": "Delphia_Schamberger@gmail.com", "twitter_username": "", "pledge_minimum_amount": 771203, "pledge_badge_show_amount": false, "default_upfront_split_to_contributors": 404265, "donations_enabled": true}} "403": application/json: {"detail": ""} "404": @@ -1695,7 +1797,7 @@ examples: application/json: {"name": "", "prices": [{"recurring_interval": "month"}]} responses: "201": - application/json: {"created_at": "2023-12-01T17:06:07.793Z", "modified_at": "2024-07-30T16:43:31.437Z", "id": "", "name": "", "description": "Inverse discrete benchmark", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": []} + application/json: {"created_at": "2023-12-01T17:06:07.793Z", "modified_at": "2024-07-30T16:43:31.437Z", "id": "", "name": "", "description": "Inverse discrete benchmark", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": [], "attached_custom_fields": []} "422": {} products:get: speakeasy-default-products:get: @@ -1704,7 +1806,7 @@ examples: id: "" responses: "200": - application/json: {"created_at": "2024-02-07T13:54:48.780Z", "modified_at": "2022-04-09T17:04:24.706Z", "id": "", "name": "", "description": "Optional static intranet", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": []} + application/json: {"created_at": "2024-02-07T13:54:48.780Z", "modified_at": "2022-04-09T17:04:24.706Z", "id": "", "name": "", "description": "Optional static intranet", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": [], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2023-08-20T11:11:04.610Z", "modified_at": "2023-07-26T06:33:15.810Z", "id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 458049, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2022-08-22T22:47:10.166Z", "modified_at": "2024-10-24T02:41:21.259Z", "id": "", "metadata": {"key": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 801373, "required": true}]} "404": application/json: {"detail": ""} "422": {} @@ -1715,7 +1817,7 @@ examples: id: "" responses: "200": - application/json: {"created_at": "2024-07-28T19:04:48.900Z", "modified_at": "2022-01-27T21:53:39.052Z", "id": "", "name": "", "description": "Persistent 24/7 focus group", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [], "benefits": [], "medias": []} + application/json: {"created_at": "2024-07-28T19:04:48.900Z", "modified_at": "2022-01-27T21:53:39.052Z", "id": "", "name": "", "description": "Persistent 24/7 focus group", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [], "benefits": [], "medias": [], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2023-01-13T16:52:57.274Z", "modified_at": "2024-12-22T15:27:45.882Z", "id": "", "metadata": {"key": "", "key1": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 488852, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2024-09-09T13:32:29.600Z", "modified_at": "2023-05-05T18:16:40.936Z", "id": "", "metadata": {"key": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 249440, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2024-09-02T06:16:41.919Z", "modified_at": "2022-11-28T11:56:11.232Z", "id": "", "metadata": {"key": ""}, "slug": "", "name": "", "organization_id": "", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}, {"value": "", "label": ""}]}}, "order": 693508, "required": true}]} "403": application/json: {"detail": ""} "404": @@ -1730,7 +1832,7 @@ examples: application/json: {"benefits": []} responses: "200": - application/json: {"created_at": "2023-02-17T23:13:10.706Z", "modified_at": "2024-10-03T16:30:23.323Z", "id": "", "name": "", "description": "Intuitive object-oriented parallelism", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": []} + application/json: {"created_at": "2023-02-17T23:13:10.706Z", "modified_at": "2024-10-03T16:30:23.323Z", "id": "", "name": "", "description": "Intuitive object-oriented parallelism", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [], "benefits": [], "medias": [], "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-03-05T13:29:26.777Z", "modified_at": "2022-09-25T14:37:15.072Z", "id": "", "metadata": {"key": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 176757, "required": false}]} "403": application/json: {"detail": ""} "404": @@ -1896,7 +1998,7 @@ examples: speakeasy-default-checkouts:custom:list: responses: "200": - application/json: {"items": [{"created_at": "2023-08-23T19:26:20.850Z", "modified_at": "2024-01-14T10:26:00.433Z", "id": "", "status": "open", "client_secret": "", "url": "https://average-fedora.org/", "expires_at": "2022-09-09T18:28:08.953Z", "success_url": "https://primary-paintwork.com/", "embed_origin": "", "amount": 718303, "tax_amount": 86140, "currency": "Convertible Marks", "total_amount": 687960, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Adam7@yahoo.com", "customer_ip_address": "", "customer_billing_address": {"country": "Mauritius"}, "customer_tax_id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "product": {"created_at": "2024-04-22T08:39:55.981Z", "modified_at": "2023-08-23T19:26:20.850Z", "id": "", "name": "", "description": "mmm avalanche jungle unto meanwhile beside tromp worth", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [], "benefits": [{"created_at": "2023-08-23T19:26:20.850Z", "modified_at": "2024-01-14T10:26:00.433Z", "id": "", "description": "bob inwardly beautifully comparison", "selectable": true, "deletable": false, "organization_id": "", "properties": {"paid_articles": true}}, {"created_at": "2023-02-10T20:11:51.410Z", "modified_at": "2023-05-17T08:33:13.471Z", "id": "", "type": "articles", "description": "commonly softly boo massive sorrowful aw strict behind along energetic", "selectable": true, "deletable": false, "organization_id": ""}, {"created_at": "2023-04-12T03:59:08.538Z", "modified_at": "2023-04-20T11:47:41.889Z", "id": "", "type": "discord", "description": "cleverly blossom defiantly", "selectable": true, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/private/var", "mime_type": "", "size": 704478, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-05-27T06:03:00.110Z", "version": "", "is_uploaded": false, "created_at": "2024-01-10T05:13:52.456Z", "size_readable": "", "public_url": "https://jam-packed-median.net/"}, {"id": "", "organization_id": "", "name": "", "path": "/var/yp", "mime_type": "", "size": 186930, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2022-03-11T17:32:08.709Z", "version": "", "is_uploaded": false, "created_at": "2022-12-07T09:46:44.632Z", "size_readable": "", "public_url": "https://hateful-linseed.info"}, {"id": "", "organization_id": "", "name": "", "path": "/dev", "mime_type": "", "size": 694688, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2022-08-19T17:38:55.606Z", "version": "", "is_uploaded": false, "created_at": "2024-10-13T14:46:57.561Z", "size_readable": "", "public_url": "https://left-exterior.biz/"}]}, "product_price": {"created_at": "2023-12-29T19:56:44.465Z", "modified_at": "2022-11-08T21:35:05.868Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "price_amount": 544651}, "subscription_id": ""}, {"created_at": "2022-01-21T00:48:05.986Z", "modified_at": "2024-09-10T07:49:25.657Z", "id": "", "status": "confirmed", "client_secret": "", "url": "https://practical-trick.org/", "expires_at": "2024-09-28T03:47:03.515Z", "success_url": "https://blue-technologist.com/", "embed_origin": "", "amount": 460276, "tax_amount": 425334, "currency": "Kenyan Shilling", "total_amount": 480616, "product_id": "", "product_price_id": "", "is_payment_required": true, "customer_id": "", "customer_name": "", "customer_email": "Roman.Stracke39@yahoo.com", "customer_ip_address": "", "customer_billing_address": {"country": "China"}, "customer_tax_id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "product": {"created_at": "2023-12-15T18:53:29.970Z", "modified_at": "2023-10-06T17:09:46.559Z", "id": "", "name": "", "description": "soap cheerfully distinction range", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2022-11-19T07:34:10.466Z", "modified_at": "2024-12-24T15:52:28.107Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "price_amount": 258945, "recurring_interval": "month"}, {"created_at": "2023-05-04T10:59:46.313Z", "modified_at": "2022-01-06T17:33:20.863Z", "id": "", "is_archived": false, "product_id": "", "recurring_interval": "year"}, {"created_at": "2024-11-05T16:19:50.933Z", "modified_at": "2024-09-13T12:26:55.235Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 467775, "maximum_amount": 993677, "preset_amount": 726700}], "benefits": [], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/src", "mime_type": "", "size": 88338, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-06-07T09:30:51.196Z", "version": "", "is_uploaded": false, "created_at": "2024-10-06T07:08:41.329Z", "size_readable": "", "public_url": "https://damaged-tapioca.com"}, {"id": "", "organization_id": "", "name": "", "path": "/root", "mime_type": "", "size": 387926, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-10-05T10:11:23.447Z", "version": "", "is_uploaded": true, "created_at": "2024-05-23T21:54:30.697Z", "size_readable": "", "public_url": "https://favorite-digit.biz"}]}, "product_price": {"created_at": "2022-02-02T01:51:19.643Z", "modified_at": "2023-12-16T22:46:18.179Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "minimum_amount": 605070, "maximum_amount": 408066, "preset_amount": 41398}, "subscription_id": ""}, {"created_at": "2022-04-03T06:30:19.876Z", "modified_at": "2024-01-30T10:30:11.361Z", "id": "", "status": "confirmed", "client_secret": "", "url": "https://bustling-plastic.info/", "expires_at": "2024-07-08T11:13:00.198Z", "success_url": "https://yummy-birdcage.com", "embed_origin": "", "amount": 73973, "tax_amount": 836788, "currency": "Leone", "total_amount": 141764, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Oswald29@gmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Saint Helena"}, "customer_tax_id": "", "metadata": {"key": ""}, "product": {"created_at": "2022-04-29T02:27:27.855Z", "modified_at": "2024-09-02T23:08:00.186Z", "id": "", "name": "", "description": "frenetically from yuck failing consign tedious scar failing unknown in", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2023-03-22T09:41:56.524Z", "modified_at": "2022-03-28T18:28:26.777Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "price_amount": 943672}], "benefits": [{"created_at": "2023-04-09T13:05:11.917Z", "modified_at": "2023-02-10T20:11:51.410Z", "id": "", "description": "fooey a supposing regarding times uselessly", "selectable": true, "deletable": false, "organization_id": "", "properties": {"paid_articles": true}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/dev", "mime_type": "", "size": 679829, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-04-24T19:54:59.989Z", "version": "", "is_uploaded": false, "created_at": "2023-08-01T10:27:50.144Z", "size_readable": "", "public_url": "https://plump-markup.net"}]}, "product_price": {"created_at": "2022-10-09T03:58:07.827Z", "modified_at": "2024-10-07T04:54:41.981Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "price_amount": 806103}, "subscription_id": ""}], "pagination": {"total_count": 5229, "max_page": 810770}} + application/json: {"items": [{"created_at": "2023-08-23T19:26:20.850Z", "modified_at": "2024-01-14T10:26:00.433Z", "id": "", "status": "open", "client_secret": "", "url": "https://average-fedora.org/", "expires_at": "2022-09-09T18:28:08.953Z", "success_url": "https://primary-paintwork.com/", "embed_origin": "", "amount": 718303, "tax_amount": 86140, "currency": "Convertible Marks", "total_amount": 687960, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Adam7@yahoo.com", "customer_ip_address": "", "customer_billing_address": {"country": "Mauritius"}, "customer_tax_id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "product": {"created_at": "2024-04-22T08:39:55.981Z", "modified_at": "2023-08-23T19:26:20.850Z", "id": "", "name": "", "description": "mmm avalanche jungle unto meanwhile beside tromp worth", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [], "benefits": [{"created_at": "2023-08-23T19:26:20.850Z", "modified_at": "2024-01-14T10:26:00.433Z", "id": "", "description": "bob inwardly beautifully comparison", "selectable": true, "deletable": false, "organization_id": "", "properties": {"paid_articles": true}}, {"created_at": "2023-02-10T20:11:51.410Z", "modified_at": "2023-05-17T08:33:13.471Z", "id": "", "type": "articles", "description": "commonly softly boo massive sorrowful aw strict behind along energetic", "selectable": true, "deletable": false, "organization_id": ""}, {"created_at": "2023-04-12T03:59:08.538Z", "modified_at": "2023-04-20T11:47:41.889Z", "id": "", "type": "discord", "description": "cleverly blossom defiantly", "selectable": true, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/private/var", "mime_type": "", "size": 704478, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-05-27T06:03:00.110Z", "version": "", "is_uploaded": false, "created_at": "2024-01-10T05:13:52.456Z", "size_readable": "", "public_url": "https://jam-packed-median.net/"}, {"id": "", "organization_id": "", "name": "", "path": "/var/yp", "mime_type": "", "size": 186930, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2022-03-11T17:32:08.709Z", "version": "", "is_uploaded": false, "created_at": "2022-12-07T09:46:44.632Z", "size_readable": "", "public_url": "https://hateful-linseed.info"}, {"id": "", "organization_id": "", "name": "", "path": "/dev", "mime_type": "", "size": 694688, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2022-08-19T17:38:55.606Z", "version": "", "is_uploaded": false, "created_at": "2024-10-13T14:46:57.561Z", "size_readable": "", "public_url": "https://left-exterior.biz/"}]}, "product_price": {"created_at": "2023-04-20T11:47:41.889Z", "modified_at": "2023-06-11T18:07:18.321Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 523875, "maximum_amount": 841031, "preset_amount": 410206, "recurring_interval": "year"}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2022-05-05T09:08:16.530Z", "modified_at": "2022-07-18T12:08:53.113Z", "id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 33597, "required": false}]}, {"created_at": "2022-01-21T00:48:05.986Z", "modified_at": "2024-09-10T07:49:25.657Z", "id": "", "status": "confirmed", "client_secret": "", "url": "https://practical-trick.org/", "expires_at": "2024-09-28T03:47:03.515Z", "success_url": "https://blue-technologist.com/", "embed_origin": "", "amount": 460276, "tax_amount": 425334, "currency": "Kenyan Shilling", "total_amount": 480616, "product_id": "", "product_price_id": "", "is_payment_required": true, "customer_id": "", "customer_name": "", "customer_email": "Roman.Stracke39@yahoo.com", "customer_ip_address": "", "customer_billing_address": {"country": "China"}, "customer_tax_id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "product": {"created_at": "2023-12-15T18:53:29.970Z", "modified_at": "2023-10-06T17:09:46.559Z", "id": "", "name": "", "description": "soap cheerfully distinction range", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2022-04-03T06:30:19.876Z", "modified_at": "2024-01-30T10:30:11.361Z", "id": "", "is_archived": false, "product_id": ""}, {"created_at": "2024-12-27T15:09:02.427Z", "modified_at": "2022-03-31T02:45:39.610Z", "id": "", "is_archived": true, "product_id": ""}, {"created_at": "2024-05-01T20:38:29.097Z", "modified_at": "2022-06-05T08:58:03.644Z", "id": "", "is_archived": false, "product_id": "", "recurring_interval": "month"}], "benefits": [], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/usr/src", "mime_type": "", "size": 88338, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-06-07T09:30:51.196Z", "version": "", "is_uploaded": false, "created_at": "2024-10-06T07:08:41.329Z", "size_readable": "", "public_url": "https://damaged-tapioca.com"}, {"id": "", "organization_id": "", "name": "", "path": "/root", "mime_type": "", "size": 387926, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-10-05T10:11:23.447Z", "version": "", "is_uploaded": true, "created_at": "2024-05-23T21:54:30.697Z", "size_readable": "", "public_url": "https://favorite-digit.biz"}]}, "product_price": {"created_at": "2022-03-15T10:11:56.132Z", "modified_at": "2022-03-08T17:05:22.411Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 993305, "maximum_amount": 747562, "preset_amount": 258945}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-01-14T06:48:49.446Z", "modified_at": "2023-05-04T10:59:46.313Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": ""}, "order": 810770, "required": false}]}, {"created_at": "2022-04-03T06:30:19.876Z", "modified_at": "2024-01-30T10:30:11.361Z", "id": "", "status": "confirmed", "client_secret": "", "url": "https://bustling-plastic.info/", "expires_at": "2024-07-08T11:13:00.198Z", "success_url": "https://yummy-birdcage.com", "embed_origin": "", "amount": 73973, "tax_amount": 836788, "currency": "Leone", "total_amount": 141764, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Oswald29@gmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Saint Helena"}, "customer_tax_id": "", "metadata": {"key": ""}, "product": {"created_at": "2022-04-29T02:27:27.855Z", "modified_at": "2024-09-02T23:08:00.186Z", "id": "", "name": "", "description": "frenetically from yuck failing consign tedious scar failing unknown in", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2024-11-05T16:19:50.933Z", "modified_at": "2024-09-13T12:26:55.235Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 467775, "maximum_amount": 993677, "preset_amount": 726700}], "benefits": [{"created_at": "2023-03-22T14:01:55.283Z", "modified_at": "2022-02-02T01:51:19.643Z", "id": "", "description": "kindheartedly nor fooey a supposing regarding times uselessly", "selectable": true, "deletable": false, "organization_id": "", "properties": {"paid_articles": true}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/dev", "mime_type": "", "size": 679829, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-04-24T19:54:59.989Z", "version": "", "is_uploaded": false, "created_at": "2023-08-01T10:27:50.144Z", "size_readable": "", "public_url": "https://plump-markup.net"}]}, "product_price": {"created_at": "2022-10-09T03:58:07.827Z", "modified_at": "2024-10-07T04:54:41.981Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "price_amount": 806103}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2022-06-14T04:35:02.740Z", "modified_at": "2023-06-11T07:32:02.289Z", "id": "", "metadata": {"key": "", "key1": ""}, "slug": "", "name": "", "organization_id": "", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}, {"value": "", "label": ""}]}}, "order": 282091, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2022-07-28T12:54:58.990Z", "modified_at": "2024-06-29T11:50:30.649Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": ""}, "order": 634941, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2024-05-23T16:01:48.733Z", "modified_at": "2022-11-05T03:32:00.916Z", "id": "", "metadata": {"key": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 520064, "required": false}]}], "pagination": {"total_count": 5229, "max_page": 810770}} "422": {} checkouts:custom:create: speakeasy-default-checkouts:custom:create: @@ -1904,7 +2006,7 @@ examples: application/json: {"product_price_id": ""} responses: "201": - application/json: {"created_at": "2023-06-18T07:14:55.338Z", "modified_at": "2023-12-01T17:06:07.804Z", "id": "", "status": "confirmed", "client_secret": "", "url": "https://blind-breastplate.name/", "expires_at": "2022-05-28T06:20:22.766Z", "success_url": "https://standard-utilization.com/", "embed_origin": "", "amount": 169727, "tax_amount": 89964, "currency": "South Sudanese pound", "total_amount": 816588, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Vernice.Gerlach23@hotmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Bahamas"}, "customer_tax_id": "", "metadata": {"key": ""}, "product": {"created_at": "2023-06-18T07:14:55.338Z", "modified_at": "2023-12-01T17:06:07.804Z", "id": "", "name": "", "description": "calmly fortunately bench around igloo scaffold", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2023-04-03T12:48:32.253Z", "modified_at": "2022-05-28T06:20:22.766Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 796474, "maximum_amount": 951062, "preset_amount": 86, "recurring_interval": "month"}], "benefits": [{"created_at": "2024-05-18T17:03:53.906Z", "modified_at": "2024-06-13T23:30:51.782Z", "id": "", "type": "github_repository", "description": "barracks approximate though championship kookily attend alongside aw blend", "selectable": false, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/var/tmp", "mime_type": "", "size": 282436, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2022-06-30T08:34:56.549Z", "version": "", "is_uploaded": false, "created_at": "2024-05-17T00:17:31.738Z", "size_readable": "", "public_url": "https://vivid-understanding.org"}, {"id": "", "organization_id": "", "name": "", "path": "/opt/lib", "mime_type": "", "size": 78523, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-03-01T22:29:56.777Z", "version": "", "is_uploaded": false, "created_at": "2023-02-12T14:03:31.774Z", "size_readable": "", "public_url": "https://frequent-cope.net/"}, {"id": "", "organization_id": "", "name": "", "path": "/var/tmp", "mime_type": "", "size": 239872, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-09-18T18:56:43.213Z", "version": "", "is_uploaded": false, "created_at": "2023-06-02T16:37:35.306Z", "size_readable": "", "public_url": "https://spotless-catalyst.biz/"}]}, "product_price": {"created_at": "2022-08-11T18:29:05.567Z", "modified_at": "2023-04-20T19:31:49.649Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "price_amount": 995852}, "subscription_id": ""} + application/json: {"created_at": "2023-06-18T07:14:55.338Z", "modified_at": "2023-12-01T17:06:07.804Z", "id": "", "status": "confirmed", "client_secret": "", "url": "https://blind-breastplate.name/", "expires_at": "2022-05-28T06:20:22.766Z", "success_url": "https://standard-utilization.com/", "embed_origin": "", "amount": 169727, "tax_amount": 89964, "currency": "South Sudanese pound", "total_amount": 816588, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Vernice.Gerlach23@hotmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Bahamas"}, "customer_tax_id": "", "metadata": {"key": ""}, "product": {"created_at": "2023-06-18T07:14:55.338Z", "modified_at": "2023-12-01T17:06:07.804Z", "id": "", "name": "", "description": "calmly fortunately bench around igloo scaffold", "is_recurring": false, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2023-04-03T12:48:32.253Z", "modified_at": "2022-05-28T06:20:22.766Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 796474, "maximum_amount": 951062, "preset_amount": 86, "recurring_interval": "month"}], "benefits": [{"created_at": "2024-05-18T17:03:53.906Z", "modified_at": "2024-06-13T23:30:51.782Z", "id": "", "type": "github_repository", "description": "barracks approximate though championship kookily attend alongside aw blend", "selectable": false, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/var/tmp", "mime_type": "", "size": 282436, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2022-06-30T08:34:56.549Z", "version": "", "is_uploaded": false, "created_at": "2024-05-17T00:17:31.738Z", "size_readable": "", "public_url": "https://vivid-understanding.org"}, {"id": "", "organization_id": "", "name": "", "path": "/opt/lib", "mime_type": "", "size": 78523, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-03-01T22:29:56.777Z", "version": "", "is_uploaded": false, "created_at": "2023-02-12T14:03:31.774Z", "size_readable": "", "public_url": "https://frequent-cope.net/"}, {"id": "", "organization_id": "", "name": "", "path": "/var/tmp", "mime_type": "", "size": 239872, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-09-18T18:56:43.213Z", "version": "", "is_uploaded": false, "created_at": "2023-06-02T16:37:35.306Z", "size_readable": "", "public_url": "https://spotless-catalyst.biz/"}]}, "product_price": {"created_at": "2024-06-13T23:30:51.782Z", "modified_at": "2023-10-05T11:56:21.731Z", "id": "", "is_archived": false, "product_id": "", "recurring_interval": "year"}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2022-01-20T11:09:16.789Z", "modified_at": "2022-09-10T10:08:53.440Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": ""}, "order": 64738, "required": true}]} "422": {} checkouts:custom:get: speakeasy-default-checkouts:custom:get: @@ -1913,7 +2015,7 @@ examples: id: "" responses: "200": - application/json: {"created_at": "2024-02-07T13:54:48.821Z", "modified_at": "2023-09-05T11:33:52.011Z", "id": "", "status": "confirmed", "client_secret": "", "url": "https://glossy-concentration.biz/", "expires_at": "2023-07-26T06:33:15.810Z", "success_url": "https://lavish-ice-cream.biz", "embed_origin": "", "amount": 213457, "tax_amount": 937146, "currency": "Som", "total_amount": 801373, "product_id": "", "product_price_id": "", "is_payment_required": true, "customer_id": "", "customer_name": "", "customer_email": "Elyssa38@gmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Mozambique"}, "customer_tax_id": "", "metadata": {"key": "", "key1": ""}, "product": {"created_at": "2024-02-07T13:54:48.821Z", "modified_at": "2023-09-05T11:33:52.011Z", "id": "", "name": "", "description": "tune only fellow scary but embarrassment metabolise", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2023-08-20T11:11:04.610Z", "modified_at": "2023-07-26T06:33:15.810Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "minimum_amount": 458049, "maximum_amount": 450824, "preset_amount": 262795}, {"created_at": "2023-04-26T04:53:50.189Z", "modified_at": "2024-05-28T07:17:57.134Z", "id": "", "is_archived": true, "product_id": "", "recurring_interval": "month"}], "benefits": [{"created_at": "2022-04-14T16:04:46.468Z", "modified_at": "2023-08-29T15:06:35.685Z", "id": "", "type": "downloadables", "description": "disapprove glum ugh roundabout middle ha", "selectable": true, "deletable": false, "organization_id": ""}, {"created_at": "2024-07-13T14:31:52.430Z", "modified_at": "2023-04-01T04:11:43.083Z", "id": "", "description": "congregate ah ack aha", "selectable": true, "deletable": true, "organization_id": "", "properties": {"paid_articles": false}}], "medias": []}, "product_price": {"created_at": "2023-11-27T02:36:46.301Z", "modified_at": "2023-12-02T00:21:35.045Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 974994, "maximum_amount": 547184, "preset_amount": 786783, "recurring_interval": "year"}, "subscription_id": ""} + application/json: {"created_at": "2024-02-07T13:54:48.821Z", "modified_at": "2023-09-05T11:33:52.011Z", "id": "", "status": "confirmed", "client_secret": "", "url": "https://glossy-concentration.biz/", "expires_at": "2023-07-26T06:33:15.810Z", "success_url": "https://lavish-ice-cream.biz", "embed_origin": "", "amount": 213457, "tax_amount": 937146, "currency": "Som", "total_amount": 801373, "product_id": "", "product_price_id": "", "is_payment_required": true, "customer_id": "", "customer_name": "", "customer_email": "Elyssa38@gmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Mozambique"}, "customer_tax_id": "", "metadata": {"key": "", "key1": ""}, "product": {"created_at": "2024-02-07T13:54:48.821Z", "modified_at": "2023-09-05T11:33:52.011Z", "id": "", "name": "", "description": "tune only fellow scary but embarrassment metabolise", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2023-08-20T11:11:04.610Z", "modified_at": "2023-07-26T06:33:15.810Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "minimum_amount": 458049, "maximum_amount": 450824, "preset_amount": 262795}, {"created_at": "2023-04-26T04:53:50.189Z", "modified_at": "2024-05-28T07:17:57.134Z", "id": "", "is_archived": true, "product_id": "", "recurring_interval": "month"}], "benefits": [{"created_at": "2022-04-14T16:04:46.468Z", "modified_at": "2023-08-29T15:06:35.685Z", "id": "", "type": "downloadables", "description": "disapprove glum ugh roundabout middle ha", "selectable": true, "deletable": false, "organization_id": ""}, {"created_at": "2022-04-14T16:04:46.468Z", "modified_at": "2023-08-29T15:06:35.685Z", "id": "", "type": "downloadables", "description": "disapprove glum ugh roundabout middle ha", "selectable": true, "deletable": false, "organization_id": ""}], "medias": []}, "product_price": {"created_at": "2023-04-01T04:11:43.083Z", "modified_at": "2022-06-13T10:08:35.363Z", "id": "", "is_archived": false, "product_id": ""}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2023-06-18T09:19:42.888Z", "modified_at": "2022-03-21T00:44:28.600Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": ""}, "order": 165215, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2024-12-19T20:27:48.074Z", "modified_at": "2022-01-28T10:42:29.356Z", "id": "", "metadata": {"key": "", "key1": ""}, "slug": "", "name": "", "organization_id": "", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}]}}, "order": 292469, "required": false}]} "404": application/json: {"detail": ""} "422": {} @@ -1924,7 +2026,7 @@ examples: id: "" responses: "200": - application/json: {"created_at": "2024-07-28T19:04:48.565Z", "modified_at": "2023-10-17T10:52:42.015Z", "id": "", "status": "expired", "client_secret": "", "url": "https://joyful-knight.com", "expires_at": "2024-12-22T15:27:45.882Z", "success_url": "https://lumbering-wheel.com", "embed_origin": "", "amount": 896501, "tax_amount": 446863, "currency": "Gibraltar Pound", "total_amount": 249440, "product_id": "", "product_price_id": "", "is_payment_required": true, "customer_id": "", "customer_name": "", "customer_email": "Sienna_Kohler@hotmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Antarctica"}, "customer_tax_id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "product": {"created_at": "2024-07-28T19:04:48.565Z", "modified_at": "2023-10-17T10:52:42.015Z", "id": "", "name": "", "description": "hydrolyze for drat underneath sticky", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2023-01-13T16:52:57.274Z", "modified_at": "2024-12-22T15:27:45.882Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "minimum_amount": 488852, "maximum_amount": 984008, "preset_amount": 54062}], "benefits": [{"created_at": "2023-01-18T02:16:35.227Z", "modified_at": "2023-03-19T19:37:57.642Z", "id": "", "type": "articles", "description": "qualified cycle woot abseil perfumed fisherman with duh", "selectable": true, "deletable": true, "organization_id": ""}, {"created_at": "2022-01-23T15:34:13.017Z", "modified_at": "2023-07-24T20:53:49.881Z", "id": "", "type": "downloadables", "description": "urgently voluntarily scale gut", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2023-12-06T20:36:03.050Z", "modified_at": "2022-11-28T09:21:21.867Z", "id": "", "type": "discord", "description": "concerning statement nice consequently provided when rim league", "selectable": false, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/srv", "mime_type": "", "size": 249923, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-05-14T05:25:13.723Z", "version": "", "is_uploaded": true, "created_at": "2023-11-11T05:00:44.440Z", "size_readable": "", "public_url": "https://exotic-importance.info/"}, {"id": "", "organization_id": "", "name": "", "path": "/boot", "mime_type": "", "size": 472933, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2022-08-03T05:43:47.592Z", "version": "", "is_uploaded": false, "created_at": "2022-10-01T21:33:23.746Z", "size_readable": "", "public_url": "https://gigantic-reconsideration.info/"}]}, "product_price": {"created_at": "2022-12-08T09:52:54.805Z", "modified_at": "2022-10-01T09:16:09.932Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 789275, "maximum_amount": 889838, "preset_amount": 302461}, "subscription_id": ""} + application/json: {"created_at": "2024-07-28T19:04:48.565Z", "modified_at": "2023-10-17T10:52:42.015Z", "id": "", "status": "expired", "client_secret": "", "url": "https://joyful-knight.com", "expires_at": "2024-12-22T15:27:45.882Z", "success_url": "https://lumbering-wheel.com", "embed_origin": "", "amount": 896501, "tax_amount": 446863, "currency": "Gibraltar Pound", "total_amount": 249440, "product_id": "", "product_price_id": "", "is_payment_required": true, "customer_id": "", "customer_name": "", "customer_email": "Sienna_Kohler@hotmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Antarctica"}, "customer_tax_id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "product": {"created_at": "2024-07-28T19:04:48.565Z", "modified_at": "2023-10-17T10:52:42.015Z", "id": "", "name": "", "description": "hydrolyze for drat underneath sticky", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2023-01-13T16:52:57.274Z", "modified_at": "2024-12-22T15:27:45.882Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "minimum_amount": 488852, "maximum_amount": 984008, "preset_amount": 54062}], "benefits": [{"created_at": "2023-01-18T02:16:35.227Z", "modified_at": "2023-03-19T19:37:57.642Z", "id": "", "type": "articles", "description": "qualified cycle woot abseil perfumed fisherman with duh", "selectable": true, "deletable": true, "organization_id": ""}, {"created_at": "2022-01-23T15:34:13.017Z", "modified_at": "2023-07-24T20:53:49.881Z", "id": "", "type": "downloadables", "description": "urgently voluntarily scale gut", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2023-12-06T20:36:03.050Z", "modified_at": "2022-11-28T09:21:21.867Z", "id": "", "type": "discord", "description": "concerning statement nice consequently provided when rim league", "selectable": false, "deletable": false, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/srv", "mime_type": "", "size": 249923, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-05-14T05:25:13.723Z", "version": "", "is_uploaded": true, "created_at": "2023-11-11T05:00:44.440Z", "size_readable": "", "public_url": "https://exotic-importance.info/"}, {"id": "", "organization_id": "", "name": "", "path": "/boot", "mime_type": "", "size": 472933, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2022-08-03T05:43:47.592Z", "version": "", "is_uploaded": false, "created_at": "2022-10-01T21:33:23.746Z", "size_readable": "", "public_url": "https://gigantic-reconsideration.info/"}]}, "product_price": {"created_at": "2022-12-08T09:52:54.805Z", "modified_at": "2022-10-01T09:16:09.932Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 789275, "maximum_amount": 889838, "preset_amount": 302461}, "subscription_id": "", "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2024-01-31T02:01:14.461Z", "modified_at": "2023-03-20T01:46:46.018Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": "", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}, {"value": "", "label": ""}]}}, "order": 810877, "required": true}]} "404": application/json: {"detail": ""} "422": {} @@ -1935,7 +2037,7 @@ examples: client_secret: "" responses: "200": - application/json: {"created_at": "2022-06-23T19:45:02.115Z", "modified_at": "2022-11-26T05:04:17.930Z", "id": "", "status": "succeeded", "client_secret": "", "url": "https://lumpy-jellyfish.com", "expires_at": "2023-08-07T16:01:01.665Z", "success_url": "https://obedient-operating.org/", "embed_origin": "", "amount": 553902, "tax_amount": 201138, "currency": "Seychelles Rupee", "total_amount": 493334, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Coleman_Rutherford@hotmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Maldives"}, "customer_tax_id": "", "product": {"created_at": "2022-09-10T21:17:06.373Z", "modified_at": "2024-10-11T12:01:20.600Z", "id": "", "name": "", "description": "of grave parade whereas wherever", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [], "benefits": [{"created_at": "2022-11-26T05:04:17.930Z", "modified_at": "2024-04-14T21:02:40.457Z", "id": "", "type": "discord", "description": "given impolite how astride cap", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2024-07-23T16:17:04.686Z", "modified_at": "2024-10-15T01:25:33.429Z", "id": "", "type": "ads", "description": "definitive as fluffy", "selectable": false, "deletable": true, "organization_id": ""}, {"created_at": "2023-05-06T11:19:10.077Z", "modified_at": "2023-11-17T04:52:10.824Z", "id": "", "type": "downloadables", "description": "yum lecture against alienated meanwhile unabashedly", "selectable": true, "deletable": true, "organization_id": ""}], "medias": []}, "product_price": {"created_at": "2024-04-14T21:02:40.457Z", "modified_at": "2023-08-07T16:01:01.665Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "price_amount": 564186, "recurring_interval": "year"}} + application/json: {"created_at": "2022-06-23T19:45:02.115Z", "modified_at": "2022-11-26T05:04:17.930Z", "id": "", "status": "succeeded", "client_secret": "", "url": "https://lumpy-jellyfish.com", "expires_at": "2023-08-07T16:01:01.665Z", "success_url": "https://obedient-operating.org/", "embed_origin": "", "amount": 553902, "tax_amount": 201138, "currency": "Seychelles Rupee", "total_amount": 493334, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Coleman_Rutherford@hotmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Maldives"}, "customer_tax_id": "", "product": {"created_at": "2022-09-10T21:17:06.373Z", "modified_at": "2024-10-11T12:01:20.600Z", "id": "", "name": "", "description": "of grave parade whereas wherever", "is_recurring": false, "is_archived": false, "organization_id": "", "prices": [], "benefits": [{"created_at": "2022-11-26T05:04:17.930Z", "modified_at": "2024-04-14T21:02:40.457Z", "id": "", "type": "discord", "description": "given impolite how astride cap", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2024-07-23T16:17:04.686Z", "modified_at": "2024-10-15T01:25:33.429Z", "id": "", "type": "ads", "description": "definitive as fluffy", "selectable": false, "deletable": true, "organization_id": ""}, {"created_at": "2023-05-06T11:19:10.077Z", "modified_at": "2023-11-17T04:52:10.824Z", "id": "", "type": "downloadables", "description": "yum lecture against alienated meanwhile unabashedly", "selectable": true, "deletable": true, "organization_id": ""}], "medias": []}, "product_price": {"created_at": "2024-04-14T21:02:40.457Z", "modified_at": "2023-08-07T16:01:01.665Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "price_amount": 564186, "recurring_interval": "year"}, "organization": {"created_at": "2024-10-05T02:43:03.106Z", "modified_at": "2023-08-31T01:50:30.615Z", "id": "", "name": "", "slug": "", "avatar_url": "https://shy-kettledrum.name/", "bio": "", "company": "Douglas, Nolan and Rutherford", "blog": "", "location": "", "email": "Gregoria.Littel92@hotmail.com", "twitter_username": "", "pledge_minimum_amount": 528457, "pledge_badge_show_amount": true, "default_upfront_split_to_contributors": 944792, "donations_enabled": true}, "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2023-11-06T08:59:00.297Z", "modified_at": "2024-03-24T21:11:57.960Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": ""}, "order": 250741, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2024-11-17T17:15:41.835Z", "modified_at": "2023-01-01T21:38:27.210Z", "id": "", "metadata": {"key": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 113721, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2023-06-27T14:22:25.878Z", "modified_at": "2023-01-07T11:27:39.543Z", "id": "", "metadata": {"key": "", "key1": ""}, "slug": "", "name": "", "organization_id": "", "properties": {"options": []}}, "order": 241475, "required": true}]} "404": application/json: {"detail": ""} "422": {} @@ -1946,7 +2048,7 @@ examples: client_secret: "" responses: "200": - application/json: {"created_at": "2024-10-22T20:45:21.815Z", "modified_at": "2023-07-17T23:31:05.499Z", "id": "", "status": "expired", "client_secret": "", "url": "https://simple-flint.org/", "expires_at": "2023-07-14T01:44:24.320Z", "success_url": "https://passionate-understanding.com/", "embed_origin": "", "amount": 573767, "tax_amount": 903274, "currency": "Sudanese Pound", "total_amount": 813143, "product_id": "", "product_price_id": "", "is_payment_required": true, "customer_id": "", "customer_name": "", "customer_email": "Leonie50@hotmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Bulgaria"}, "customer_tax_id": "", "product": {"created_at": "2023-09-04T23:39:15.429Z", "modified_at": "2022-06-30T18:11:17.062Z", "id": "", "name": "", "description": "ack notwithstanding lively into trusty", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2022-11-16T20:51:18.745Z", "modified_at": "2023-07-14T01:44:24.320Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 597177, "maximum_amount": 947630, "preset_amount": 166401}, {"created_at": "2024-04-03T02:37:24.726Z", "modified_at": "2024-06-10T04:54:08.615Z", "id": "", "is_archived": true, "product_id": ""}, {"created_at": "2024-07-08T15:45:04.860Z", "modified_at": "2023-09-22T09:06:50.882Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 508864, "maximum_amount": 744619, "preset_amount": 137234}], "benefits": [{"created_at": "2024-04-13T01:40:05.694Z", "modified_at": "2024-07-12T13:33:11.703Z", "id": "", "type": "discord", "description": "prohibition where although negative where psst", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2022-11-01T16:37:11.315Z", "modified_at": "2024-11-11T09:22:51.554Z", "id": "", "type": "ads", "description": "anenst meanwhile little", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2023-12-08T07:51:27.800Z", "modified_at": "2022-03-18T21:13:49.993Z", "id": "", "type": "discord", "description": "long-term relative singe urgently questionably", "selectable": false, "deletable": true, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/opt/share", "mime_type": "", "size": 389948, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-01-06T16:44:49.420Z", "version": "", "is_uploaded": false, "created_at": "2024-04-09T09:13:22.245Z", "size_readable": "", "public_url": "https://smoggy-graffiti.net/"}, {"id": "", "organization_id": "", "name": "", "path": "/usr/obj", "mime_type": "", "size": 503125, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-06-27T13:22:35.587Z", "version": "", "is_uploaded": false, "created_at": "2022-06-08T06:40:16.558Z", "size_readable": "", "public_url": "https://lumbering-charlatan.biz/"}, {"id": "", "organization_id": "", "name": "", "path": "/var/mail", "mime_type": "", "size": 126531, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-10-20T22:04:15.588Z", "version": "", "is_uploaded": false, "created_at": "2023-02-02T22:10:58.341Z", "size_readable": "", "public_url": "https://which-entry.biz/"}]}, "product_price": {"created_at": "2022-10-09T22:41:34.766Z", "modified_at": "2024-06-14T00:54:00.547Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "price_amount": 172495}} + application/json: {"created_at": "2024-10-22T20:45:21.815Z", "modified_at": "2023-07-17T23:31:05.499Z", "id": "", "status": "expired", "client_secret": "", "url": "https://simple-flint.org/", "expires_at": "2023-07-14T01:44:24.320Z", "success_url": "https://passionate-understanding.com/", "embed_origin": "", "amount": 573767, "tax_amount": 903274, "currency": "Sudanese Pound", "total_amount": 813143, "product_id": "", "product_price_id": "", "is_payment_required": true, "customer_id": "", "customer_name": "", "customer_email": "Leonie50@hotmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Bulgaria"}, "customer_tax_id": "", "product": {"created_at": "2023-09-04T23:39:15.429Z", "modified_at": "2022-06-30T18:11:17.062Z", "id": "", "name": "", "description": "ack notwithstanding lively into trusty", "is_recurring": true, "is_archived": true, "organization_id": "", "prices": [{"created_at": "2022-11-16T20:51:18.745Z", "modified_at": "2023-07-14T01:44:24.320Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 597177, "maximum_amount": 947630, "preset_amount": 166401}, {"created_at": "2024-04-03T02:37:24.726Z", "modified_at": "2024-06-10T04:54:08.615Z", "id": "", "is_archived": true, "product_id": ""}, {"created_at": "2024-07-08T15:45:04.860Z", "modified_at": "2023-09-22T09:06:50.882Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "minimum_amount": 508864, "maximum_amount": 744619, "preset_amount": 137234}], "benefits": [{"created_at": "2024-04-13T01:40:05.694Z", "modified_at": "2024-07-12T13:33:11.703Z", "id": "", "type": "discord", "description": "prohibition where although negative where psst", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2022-11-01T16:37:11.315Z", "modified_at": "2024-11-11T09:22:51.554Z", "id": "", "type": "ads", "description": "anenst meanwhile little", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2023-12-08T07:51:27.800Z", "modified_at": "2022-03-18T21:13:49.993Z", "id": "", "type": "discord", "description": "long-term relative singe urgently questionably", "selectable": false, "deletable": true, "organization_id": ""}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/opt/share", "mime_type": "", "size": 389948, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-01-06T16:44:49.420Z", "version": "", "is_uploaded": false, "created_at": "2024-04-09T09:13:22.245Z", "size_readable": "", "public_url": "https://smoggy-graffiti.net/"}, {"id": "", "organization_id": "", "name": "", "path": "/usr/obj", "mime_type": "", "size": 503125, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-06-27T13:22:35.587Z", "version": "", "is_uploaded": false, "created_at": "2022-06-08T06:40:16.558Z", "size_readable": "", "public_url": "https://lumbering-charlatan.biz/"}, {"id": "", "organization_id": "", "name": "", "path": "/var/mail", "mime_type": "", "size": 126531, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2024-10-20T22:04:15.588Z", "version": "", "is_uploaded": false, "created_at": "2023-02-02T22:10:58.341Z", "size_readable": "", "public_url": "https://which-entry.biz/"}]}, "product_price": {"created_at": "2022-10-09T22:41:34.766Z", "modified_at": "2024-06-14T00:54:00.547Z", "id": "", "is_archived": true, "product_id": "", "price_currency": "", "price_amount": 172495}, "organization": {"created_at": "2023-07-15T16:51:46.519Z", "modified_at": "2023-07-18T07:58:43.752Z", "id": "", "name": "", "slug": "", "avatar_url": "https://squiggly-conservative.name/", "bio": "", "company": "Parker - Funk", "blog": "", "location": "", "email": "Lelia.Lind1@yahoo.com", "twitter_username": "", "pledge_minimum_amount": 359631, "pledge_badge_show_amount": true, "default_upfront_split_to_contributors": 600341, "donations_enabled": true}, "attached_custom_fields": [{"custom_field_id": "", "custom_field": {"created_at": "2023-12-05T04:32:54.622Z", "modified_at": "2022-01-11T00:30:48.312Z", "id": "", "metadata": {"key": "", "key1": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 278568, "required": false}, {"custom_field_id": "", "custom_field": {"created_at": "2024-08-15T02:59:51.195Z", "modified_at": "2023-10-21T13:26:17.528Z", "id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "slug": "", "name": "", "organization_id": ""}, "order": 873793, "required": true}, {"custom_field_id": "", "custom_field": {"created_at": "2024-10-29T00:58:59.731Z", "modified_at": "2023-12-13T05:03:13.184Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": ""}, "order": 458158, "required": true}]} "404": application/json: {"detail": ""} "422": {} @@ -1957,7 +2059,7 @@ examples: client_secret: "" responses: "200": - application/json: {"created_at": "2024-09-27T22:33:04.250Z", "modified_at": "2024-07-24T02:45:26.067Z", "id": "", "status": "succeeded", "client_secret": "", "url": "https://apt-devastation.biz/", "expires_at": "2022-07-30T06:29:51.767Z", "success_url": "https://secondary-gallery.net", "embed_origin": "", "amount": 662896, "tax_amount": 131007, "currency": "Nepalese Rupee", "total_amount": 714568, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Maggie18@gmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Nigeria"}, "customer_tax_id": "", "product": {"created_at": "2023-01-28T03:25:59.665Z", "modified_at": "2022-01-24T16:41:51.515Z", "id": "", "name": "", "description": "potentially thread toady subsidy probable motionless obedience clear-cut", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2023-11-15T07:38:37.445Z", "modified_at": "2022-07-30T06:29:51.767Z", "id": "", "is_archived": false, "product_id": ""}], "benefits": [{"created_at": "2022-10-20T16:59:20.255Z", "modified_at": "2023-01-30T20:43:56.426Z", "id": "", "type": "articles", "description": "editor until ah daintily oof aw tarry impanel", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2024-07-26T21:52:00.436Z", "modified_at": "2024-03-11T23:49:19.061Z", "id": "", "type": "license_keys", "description": "forenenst aw or distorted legal cycle posh off", "selectable": true, "deletable": false, "organization_id": ""}, {"created_at": "2023-02-11T02:25:13.433Z", "modified_at": "2024-01-07T19:25:42.663Z", "id": "", "description": "hovel yuck absentmindedly oh anti joyous psst tender", "selectable": false, "deletable": true, "organization_id": "", "properties": {"paid_articles": true}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/mnt", "mime_type": "", "size": 249646, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-06-10T13:10:48.480Z", "version": "", "is_uploaded": true, "created_at": "2022-02-28T04:49:04.106Z", "size_readable": "", "public_url": "https://glittering-confusion.biz/"}]}, "product_price": {"created_at": "2023-01-06T21:00:26.752Z", "modified_at": "2022-10-07T14:51:36.263Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "minimum_amount": 638939, "maximum_amount": 942266, "preset_amount": 508098}} + application/json: {"created_at": "2024-09-27T22:33:04.250Z", "modified_at": "2024-07-24T02:45:26.067Z", "id": "", "status": "succeeded", "client_secret": "", "url": "https://apt-devastation.biz/", "expires_at": "2022-07-30T06:29:51.767Z", "success_url": "https://secondary-gallery.net", "embed_origin": "", "amount": 662896, "tax_amount": 131007, "currency": "Nepalese Rupee", "total_amount": 714568, "product_id": "", "product_price_id": "", "is_payment_required": false, "customer_id": "", "customer_name": "", "customer_email": "Maggie18@gmail.com", "customer_ip_address": "", "customer_billing_address": {"country": "Nigeria"}, "customer_tax_id": "", "product": {"created_at": "2023-01-28T03:25:59.665Z", "modified_at": "2022-01-24T16:41:51.515Z", "id": "", "name": "", "description": "potentially thread toady subsidy probable motionless obedience clear-cut", "is_recurring": true, "is_archived": false, "organization_id": "", "prices": [{"created_at": "2023-11-15T07:38:37.445Z", "modified_at": "2022-07-30T06:29:51.767Z", "id": "", "is_archived": false, "product_id": ""}], "benefits": [{"created_at": "2022-10-20T16:59:20.255Z", "modified_at": "2023-01-30T20:43:56.426Z", "id": "", "type": "articles", "description": "editor until ah daintily oof aw tarry impanel", "selectable": false, "deletable": false, "organization_id": ""}, {"created_at": "2024-07-26T21:52:00.436Z", "modified_at": "2024-03-11T23:49:19.061Z", "id": "", "type": "license_keys", "description": "forenenst aw or distorted legal cycle posh off", "selectable": true, "deletable": false, "organization_id": ""}, {"created_at": "2023-02-11T02:25:13.433Z", "modified_at": "2024-01-07T19:25:42.663Z", "id": "", "description": "hovel yuck absentmindedly oh anti joyous psst tender", "selectable": false, "deletable": true, "organization_id": "", "properties": {"paid_articles": true}}], "medias": [{"id": "", "organization_id": "", "name": "", "path": "/mnt", "mime_type": "", "size": 249646, "storage_version": "", "checksum_etag": "", "checksum_sha256_base64": "", "checksum_sha256_hex": "", "last_modified_at": "2023-06-10T13:10:48.480Z", "version": "", "is_uploaded": true, "created_at": "2022-02-28T04:49:04.106Z", "size_readable": "", "public_url": "https://glittering-confusion.biz/"}]}, "product_price": {"created_at": "2023-01-06T21:00:26.752Z", "modified_at": "2022-10-07T14:51:36.263Z", "id": "", "is_archived": false, "product_id": "", "price_currency": "", "minimum_amount": 638939, "maximum_amount": 942266, "preset_amount": 508098}, "organization": {"created_at": "2024-01-09T08:11:20.495Z", "modified_at": "2024-08-15T01:27:14.128Z", "id": "", "name": "", "slug": "", "avatar_url": "https://clear-cut-deer.net", "bio": "", "company": "Hauck Inc", "blog": "", "location": "", "email": "Janae.Hirthe@hotmail.com", "twitter_username": "", "pledge_minimum_amount": 851973, "pledge_badge_show_amount": true, "default_upfront_split_to_contributors": 267069, "donations_enabled": true}, "attached_custom_fields": []} "404": application/json: {"detail": ""} "422": {} @@ -2015,3 +2117,48 @@ examples: "404": application/json: {"detail": ""} "422": {} + custom-fields:list: + speakeasy-default-custom-fields:list: + responses: + "200": + application/json: {"items": [{"created_at": "2024-01-14T10:26:00.433Z", "modified_at": "2022-07-14T18:23:27.528Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": ""}, {"created_at": "2023-11-28T13:02:27.296Z", "modified_at": "2023-12-02T18:25:37.169Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": ""}, {"created_at": "2022-04-05T09:49:38.010Z", "modified_at": "2022-03-17T01:57:00.187Z", "id": "", "metadata": {"key": "", "key1": ""}, "slug": "", "name": "", "organization_id": "", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}]}}], "pagination": {"total_count": 633911, "max_page": 7468}} + "422": {} + custom-fields:create: + speakeasy-default-custom-fields:create: + requestBody: + application/json: {"slug": "", "name": ""} + responses: + "201": + application/json: {"created_at": "2023-04-03T12:48:32.253Z", "modified_at": "2022-05-28T06:20:22.766Z", "id": "", "metadata": {}, "slug": "", "name": "", "organization_id": "", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}, {"value": "", "label": ""}]}} + "422": {} + custom-fields:get: + speakeasy-default-custom-fields:get: + parameters: + path: + id: "" + responses: + "200": + application/json: {"created_at": "2023-09-05T11:33:52.011Z", "modified_at": "2023-08-20T11:11:04.610Z", "id": "", "metadata": {"key": "", "key1": ""}, "slug": "", "name": "", "organization_id": "", "properties": {"options": [{"value": "", "label": ""}, {"value": "", "label": ""}, {"value": "", "label": ""}]}} + "404": + application/json: {"detail": ""} + "422": {} + custom-fields:update: + speakeasy-default-custom-fields:update: + parameters: + path: + id: "" + responses: + "200": + application/json: {"created_at": "2023-01-13T16:52:57.274Z", "modified_at": "2024-12-22T15:27:45.882Z", "id": "", "metadata": {"key": "", "key1": ""}, "slug": "", "name": "", "organization_id": ""} + "404": + application/json: {"detail": ""} + "422": {} + custom-fields:delete: + speakeasy-default-custom-fields:delete: + parameters: + path: + id: "" + responses: + "404": + application/json: {"detail": ""} + "422": {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 3628a8c3..9204b4ff 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -14,8 +14,9 @@ generation: requestResponseComponentNamesFeb2024: true auth: oAuth2ClientCredentialsEnabled: true + oAuth2PasswordEnabled: false typescript: - version: 0.14.0 + version: 0.15.0 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 0e56302c..f3955a7c 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.424.0 +speakeasyVersion: 1.431.0 sources: Polar-OAS: sourceNamespace: polar-oas - sourceRevisionDigest: sha256:e30177eddab893ea89998cc6684acf560f1561b6fca95ad03072054f7f0e23f4 - sourceBlobDigest: sha256:47c4285003255d7bf61593438fcc7f5cc4650bece8005ac801a6c26cd2eabba7 + sourceRevisionDigest: sha256:c7e33d349286ddccd4829c8a687488e4605b8e4ee1f7a1f292f49a74872f598e + sourceBlobDigest: sha256:7316038513ebb138e351a2af12f12b570b62f9691c2be6df032216ee0406f91a tags: - latest - main @@ -11,8 +11,8 @@ targets: polar: source: Polar-OAS sourceNamespace: polar-oas - sourceRevisionDigest: sha256:e30177eddab893ea89998cc6684acf560f1561b6fca95ad03072054f7f0e23f4 - sourceBlobDigest: sha256:47c4285003255d7bf61593438fcc7f5cc4650bece8005ac801a6c26cd2eabba7 + sourceRevisionDigest: sha256:c7e33d349286ddccd4829c8a687488e4605b8e4ee1f7a1f292f49a74872f598e + sourceBlobDigest: sha256:7316038513ebb138e351a2af12f12b570b62f9691c2be6df032216ee0406f91a workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index ae467d9e..e3fb3b2d 100644 --- a/README.md +++ b/README.md @@ -157,6 +157,14 @@ run(); * [clientUpdate](docs/sdks/custom/README.md#clientupdate) - Update Checkout Session from Client * [clientConfirm](docs/sdks/custom/README.md#clientconfirm) - Confirm Checkout Session from Client +### [customFields](docs/sdks/customfields/README.md) + +* [list](docs/sdks/customfields/README.md#list) - List Custom Fields +* [create](docs/sdks/customfields/README.md#create) - Create Custom Field +* [get](docs/sdks/customfields/README.md#get) - Get Custom Field +* [update](docs/sdks/customfields/README.md#update) - Update Custom Field +* [delete](docs/sdks/customfields/README.md#delete) - Delete Custom Field + ### [externalOrganizations](docs/sdks/externalorganizations/README.md) * [list](docs/sdks/externalorganizations/README.md#list) - List External Organizations @@ -319,6 +327,11 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`checkoutsCustomGet`](docs/sdks/custom/README.md#get) - Get Checkout Session - [`checkoutsCustomList`](docs/sdks/custom/README.md#list) - List Checkout Sessions - [`checkoutsCustomUpdate`](docs/sdks/custom/README.md#update) - Update Checkout Session +- [`customFieldsCreate`](docs/sdks/customfields/README.md#create) - Create Custom Field +- [`customFieldsDelete`](docs/sdks/customfields/README.md#delete) - Delete Custom Field +- [`customFieldsGet`](docs/sdks/customfields/README.md#get) - Get Custom Field +- [`customFieldsList`](docs/sdks/customfields/README.md#list) - List Custom Fields +- [`customFieldsUpdate`](docs/sdks/customfields/README.md#update) - Update Custom Field - [`externalOrganizationsList`](docs/sdks/externalorganizations/README.md#list) - List External Organizations - [`filesCreate`](docs/sdks/files/README.md#create) - Create File - [`filesDelete`](docs/sdks/files/README.md#delete) - Delete File diff --git a/RELEASES.md b/RELEASES.md index 8d5ccbc1..ee37adaf 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -178,4 +178,14 @@ Based on: ### Generated - [typescript v0.14.0] . ### Releases -- [NPM v0.14.0] https://www.npmjs.com/package/@polar-sh/sdk/v/0.14.0 - . \ No newline at end of file +- [NPM v0.14.0] https://www.npmjs.com/package/@polar-sh/sdk/v/0.14.0 - . + +## 2024-11-06 00:25:36 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.431.0 (2.451.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.15.0] . +### Releases +- [NPM v0.15.0] https://www.npmjs.com/package/@polar-sh/sdk/v/0.15.0 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 7960634e..d1e0fddb 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -177,6 +177,36 @@ actions: - "lang": "typescript" "label": "update" "source": "import { Polar } from \"@polar-sh/sdk\";\n\nconst polar = new Polar({\n accessToken: process.env[\"POLAR_ACCESS_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n const result = await polar.checkouts.custom.update({\n id: \"\",\n checkoutUpdate: {},\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/custom-fields/"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "list" + "source": "import { Polar } from \"@polar-sh/sdk\";\n\nconst polar = new Polar({\n accessToken: process.env[\"POLAR_ACCESS_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n const result = await polar.customFields.list({});\n\n for await (const page of result) {\n // Handle the page\n console.log(page);\n }\n}\n\nrun();" + - target: $["paths"]["/v1/custom-fields/"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "create" + "source": "import { Polar } from \"@polar-sh/sdk\";\n\nconst polar = new Polar({\n accessToken: process.env[\"POLAR_ACCESS_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n const result = await polar.customFields.create({\n slug: \"\",\n name: \"\",\n properties: {},\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/custom-fields/{id}"]["delete"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "delete" + "source": "import { Polar } from \"@polar-sh/sdk\";\n\nconst polar = new Polar({\n accessToken: process.env[\"POLAR_ACCESS_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n await polar.customFields.delete({\n id: \"\",\n });\n\n\n}\n\nrun();" + - target: $["paths"]["/v1/custom-fields/{id}"]["get"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "get" + "source": "import { Polar } from \"@polar-sh/sdk\";\n\nconst polar = new Polar({\n accessToken: process.env[\"POLAR_ACCESS_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n const result = await polar.customFields.get({\n id: \"\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/custom-fields/{id}"]["patch"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "update" + "source": "import { Polar } from \"@polar-sh/sdk\";\n\nconst polar = new Polar({\n accessToken: process.env[\"POLAR_ACCESS_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n const result = await polar.customFields.update({\n id: \"\",\n customFieldUpdate: {},\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/external_organizations/"]["get"] update: "x-codeSamples": diff --git a/docs/models/components/address.md b/docs/models/components/address.md index cb6323e7..fa54a941 100644 --- a/docs/models/components/address.md +++ b/docs/models/components/address.md @@ -6,7 +6,7 @@ import { Address } from "@polar-sh/sdk/models/components"; let value: Address = { - country: "Heard Island and McDonald Islands", + country: "Italy", }; ``` diff --git a/docs/models/components/advertisementcampaign.md b/docs/models/components/advertisementcampaign.md index ade1a784..9c4052d6 100644 --- a/docs/models/components/advertisementcampaign.md +++ b/docs/models/components/advertisementcampaign.md @@ -6,13 +6,13 @@ import { AdvertisementCampaign } from "@polar-sh/sdk/models/components"; let value: AdvertisementCampaign = { - createdAt: new Date("2023-12-22T00:45:52.216Z"), - modifiedAt: new Date("2022-10-03T04:08:49.934Z"), + createdAt: new Date("2023-07-24T07:58:55.379Z"), + modifiedAt: new Date("2023-08-15T05:41:44.857Z"), id: "", - imageUrl: "https://burly-replacement.info", - imageUrlDark: "https://damp-advertisement.net/", + imageUrl: "https://short-term-mentor.info", + imageUrlDark: "https://clean-essence.net/", text: "", - linkUrl: "https://lovely-excess.info", + linkUrl: "https://competent-bid.org/", }; ``` diff --git a/docs/models/components/advertisementcampaignlistresource.md b/docs/models/components/advertisementcampaignlistresource.md index e455920e..85e19bbb 100644 --- a/docs/models/components/advertisementcampaignlistresource.md +++ b/docs/models/components/advertisementcampaignlistresource.md @@ -8,21 +8,21 @@ import { AdvertisementCampaignListResource } from "@polar-sh/sdk/models/componen let value: AdvertisementCampaignListResource = { items: [ { - createdAt: new Date("2024-03-01T07:32:00.160Z"), - modifiedAt: new Date("2023-10-16T13:56:30.312Z"), + createdAt: new Date("2023-03-04T12:05:11.807Z"), + modifiedAt: new Date("2022-11-29T03:56:04.500Z"), id: "", - imageUrl: "https://extra-large-daughter.info/", - imageUrlDark: "https://forsaken-recommendation.name/", + imageUrl: "https://lovely-sandbar.net/", + imageUrlDark: "https://unfit-assist.org", text: "", - linkUrl: "https://silky-airbus.name", + linkUrl: "https://digital-vision.net/", }, ], pagination: { - totalCount: 438417, - maxPage: 361300, + totalCount: 929724, + maxPage: 523154, }, dimensions: [ - 992382, + 747742, ], }; ``` diff --git a/docs/models/components/advertisementsortproperty.md b/docs/models/components/advertisementsortproperty.md index 9842da04..2a89a502 100644 --- a/docs/models/components/advertisementsortproperty.md +++ b/docs/models/components/advertisementsortproperty.md @@ -5,7 +5,7 @@ ```typescript import { AdvertisementSortProperty } from "@polar-sh/sdk/models/components"; -let value: AdvertisementSortProperty = "-clicks"; +let value: AdvertisementSortProperty = "-created_at"; ``` ## Values diff --git a/docs/models/components/article.md b/docs/models/components/article.md index 334bed59..8bb08293 100644 --- a/docs/models/components/article.md +++ b/docs/models/components/article.md @@ -12,40 +12,40 @@ let value: Article = { body: "", byline: { name: "", - avatarUrl: "https://yellowish-resolve.info", + avatarUrl: "https://witty-scenario.com/", }, - visibility: "private", + visibility: "hidden", userId: "", organizationId: "", organization: { - createdAt: new Date("2024-03-11T04:48:45.754Z"), - modifiedAt: new Date("2022-12-10T00:54:33.907Z"), + createdAt: new Date("2023-06-22T00:09:40.274Z"), + modifiedAt: new Date("2022-07-19T21:06:20.014Z"), id: "", name: "", slug: "", - avatarUrl: "https://cooperative-fuel.name", + avatarUrl: "https://tempting-accelerator.com", bio: "", - company: "Pagac and Sons", + company: "Wyman - Jakubowski", blog: "", location: "", - email: "Noah.Grady@gmail.com", + email: "Bo53@gmail.com", twitterUsername: "", - pledgeMinimumAmount: 507819, + pledgeMinimumAmount: 318150, pledgeBadgeShowAmount: false, - defaultUpfrontSplitToContributors: 211584, + defaultUpfrontSplitToContributors: 639855, donationsEnabled: false, profileSettings: {}, featureSettings: {}, }, - publishedAt: new Date("2023-06-26T04:55:39.703Z"), + publishedAt: new Date("2024-03-18T13:58:56.966Z"), paidSubscribersOnly: false, - paidSubscribersOnlyEndsAt: new Date("2024-06-09T18:38:23.027Z"), + paidSubscribersOnlyEndsAt: new Date("2023-09-23T21:51:50.742Z"), isPreview: false, isPinned: false, notifySubscribers: false, - notificationsSentAt: new Date("2024-08-25T15:21:53.101Z"), - emailSentToCount: 666762, - ogImageUrl: "https://trusty-heroine.biz/", + notificationsSentAt: new Date("2022-07-04T22:19:31.096Z"), + emailSentToCount: 985905, + ogImageUrl: "https://lustrous-offset.net", ogDescription: "", }; ``` diff --git a/docs/models/components/articlepreview.md b/docs/models/components/articlepreview.md index c22de92e..979cafc6 100644 --- a/docs/models/components/articlepreview.md +++ b/docs/models/components/articlepreview.md @@ -6,7 +6,7 @@ import { ArticlePreview } from "@polar-sh/sdk/models/components"; let value: ArticlePreview = { - email: "Malachi_Windler38@hotmail.com", + email: "Kali.Schultz@hotmail.com", }; ``` diff --git a/docs/models/components/articlereceivers.md b/docs/models/components/articlereceivers.md index 4f373422..86b0e62f 100644 --- a/docs/models/components/articlereceivers.md +++ b/docs/models/components/articlereceivers.md @@ -6,9 +6,9 @@ import { ArticleReceivers } from "@polar-sh/sdk/models/components"; let value: ArticleReceivers = { - freeSubscribers: 194526, - premiumSubscribers: 736480, - organizationMembers: 165116, + freeSubscribers: 554289, + premiumSubscribers: 500494, + organizationMembers: 58582, }; ``` diff --git a/docs/models/components/articlevisibility.md b/docs/models/components/articlevisibility.md index 7a747e1c..6dc6eb82 100644 --- a/docs/models/components/articlevisibility.md +++ b/docs/models/components/articlevisibility.md @@ -5,7 +5,7 @@ ```typescript import { ArticleVisibility } from "@polar-sh/sdk/models/components"; -let value: ArticleVisibility = "public"; +let value: ArticleVisibility = "hidden"; ``` ## Values diff --git a/docs/models/components/assignee.md b/docs/models/components/assignee.md index 705d959b..40e174f2 100644 --- a/docs/models/components/assignee.md +++ b/docs/models/components/assignee.md @@ -6,10 +6,10 @@ import { Assignee } from "@polar-sh/sdk/models/components"; let value: Assignee = { - id: 462378, - login: "Dudley27", - htmlUrl: "https://thrifty-porter.com", - avatarUrl: "https://clear-cut-issue.net/", + id: 706309, + login: "Wilford.Bogisich78", + htmlUrl: "https://raw-farm.net/", + avatarUrl: "https://sweet-marimba.info", }; ``` diff --git a/docs/models/components/attachedcustomfield.md b/docs/models/components/attachedcustomfield.md new file mode 100644 index 00000000..f98b0597 --- /dev/null +++ b/docs/models/components/attachedcustomfield.md @@ -0,0 +1,36 @@ +# AttachedCustomField + +Schema of a custom field attached to a resource. + +## Example Usage + +```typescript +import { AttachedCustomField } from "@polar-sh/sdk/models/components"; + +let value: AttachedCustomField = { + customFieldId: "", + customField: { + createdAt: new Date("2023-05-30T01:41:52.063Z"), + modifiedAt: new Date("2022-06-22T02:05:53.320Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 241568, + required: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `customFieldId` | *string* | :heavy_check_mark: | ID of the custom field. | +| `customField` | *components.CustomField* | :heavy_check_mark: | N/A | +| `order` | *number* | :heavy_check_mark: | Order of the custom field in the resource. | +| `required` | *boolean* | :heavy_check_mark: | Whether the value is required for this custom field. | \ No newline at end of file diff --git a/docs/models/components/attachedcustomfieldcreate.md b/docs/models/components/attachedcustomfieldcreate.md new file mode 100644 index 00000000..9074209f --- /dev/null +++ b/docs/models/components/attachedcustomfieldcreate.md @@ -0,0 +1,21 @@ +# AttachedCustomFieldCreate + +Schema to attach a custom field to a resource. + +## Example Usage + +```typescript +import { AttachedCustomFieldCreate } from "@polar-sh/sdk/models/components"; + +let value: AttachedCustomFieldCreate = { + customFieldId: "", + required: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `customFieldId` | *string* | :heavy_check_mark: | ID of the custom field to attach. | +| `required` | *boolean* | :heavy_check_mark: | Whether the value is required for this custom field. | \ No newline at end of file diff --git a/docs/models/components/author.md b/docs/models/components/author.md index a2710abc..90bf8be1 100644 --- a/docs/models/components/author.md +++ b/docs/models/components/author.md @@ -6,10 +6,10 @@ import { Author } from "@polar-sh/sdk/models/components"; let value: Author = { - id: 718185, - login: "Coralie_Price", - htmlUrl: "https://puzzled-petticoat.org/", - avatarUrl: "https://mysterious-in-joke.net/", + id: 618463, + login: "Christy_Schuppe", + htmlUrl: "https://kooky-deduction.biz/", + avatarUrl: "https://raw-waist.com", }; ``` diff --git a/docs/models/components/benefit.md b/docs/models/components/benefit.md index d3628ed5..e0424b51 100644 --- a/docs/models/components/benefit.md +++ b/docs/models/components/benefit.md @@ -7,11 +7,11 @@ ```typescript const value: components.BenefitArticles = { - createdAt: new Date("2023-06-06T10:43:50.149Z"), - modifiedAt: new Date("2022-11-13T23:20:26.533Z"), + createdAt: new Date("2023-07-08T03:14:38.624Z"), + modifiedAt: new Date("2024-09-09T01:45:30.325Z"), id: "", description: - "yak chilly instantly foolishly quantify phooey as opera stabilise", + "tarragon design merit spook numeric round apropos separate impish whenever", selectable: false, deletable: false, organizationId: "", @@ -25,10 +25,10 @@ const value: components.BenefitArticles = { ```typescript const value: components.BenefitAds = { - createdAt: new Date("2022-02-07T17:40:49.949Z"), - modifiedAt: new Date("2022-04-12T05:09:19.218Z"), + createdAt: new Date("2022-05-23T09:32:37.289Z"), + modifiedAt: new Date("2024-12-17T11:03:47.381Z"), id: "", - description: "curl fully brook mmm bah carp gah off er bah", + description: "famously conservative scramble officially sticky versus", selectable: false, deletable: false, organizationId: "", @@ -40,10 +40,11 @@ const value: components.BenefitAds = { ```typescript const value: components.BenefitCustom = { - createdAt: new Date("2023-04-16T01:44:35.832Z"), - modifiedAt: new Date("2023-04-23T10:52:03.142Z"), + createdAt: new Date("2024-03-31T02:07:48.328Z"), + modifiedAt: new Date("2022-07-08T02:24:58.034Z"), id: "", - description: "lotion simple er doubtfully", + description: + "onto whenever pneumonia decriminalize wasteful who fat iridescence yahoo deer", selectable: false, deletable: false, organizationId: "", @@ -58,10 +59,10 @@ const value: components.BenefitCustom = { ```typescript const value: components.BenefitDiscord = { - createdAt: new Date("2023-04-11T20:54:26.937Z"), - modifiedAt: new Date("2023-02-23T06:18:24.673Z"), + createdAt: new Date("2023-07-02T23:56:35.113Z"), + modifiedAt: new Date("2023-10-03T12:55:16.245Z"), id: "", - description: "space informal minus dark while beyond untimely whenever", + description: "besmirch distinction adviser accompanist sport calmly", selectable: false, deletable: false, organizationId: "", @@ -77,10 +78,10 @@ const value: components.BenefitDiscord = { ```typescript const value: components.BenefitGitHubRepository = { - createdAt: new Date("2024-08-29T10:56:21.811Z"), - modifiedAt: new Date("2023-05-07T08:26:35.788Z"), + createdAt: new Date("2022-08-30T11:08:28.655Z"), + modifiedAt: new Date("2024-05-10T23:58:01.273Z"), id: "", - description: "save dapper untimely spark once charlatan hm except", + description: "worth tomorrow talkative soon alongside acidic jovially awful", selectable: false, deletable: false, organizationId: "", @@ -88,7 +89,7 @@ const value: components.BenefitGitHubRepository = { repositoryId: "", repositoryOwner: "polarsource", repositoryName: "private_repo", - permission: "pull", + permission: "admin", }, }; ``` @@ -97,10 +98,10 @@ const value: components.BenefitGitHubRepository = { ```typescript const value: components.BenefitDownloadables = { - createdAt: new Date("2024-10-06T08:46:10.626Z"), - modifiedAt: new Date("2022-08-21T10:30:21.944Z"), + createdAt: new Date("2022-07-16T03:22:51.500Z"), + modifiedAt: new Date("2024-04-07T19:20:03.652Z"), id: "", - description: "perky if defiantly reassemble information adrenalin", + description: "brr haunting bookend mispronounce goodwill fork pfft", selectable: false, deletable: false, organizationId: "", @@ -119,24 +120,24 @@ const value: components.BenefitDownloadables = { ```typescript const value: components.BenefitLicenseKeys = { - createdAt: new Date("2023-11-26T13:41:08.143Z"), - modifiedAt: new Date("2023-12-31T14:12:56.950Z"), + createdAt: new Date("2022-12-28T03:57:53.023Z"), + modifiedAt: new Date("2024-02-06T05:51:10.313Z"), id: "", - description: "underneath phew scholarship what shabby bloom blah", + description: "halt requite oh personal skateboard", selectable: false, deletable: false, organizationId: "", properties: { prefix: "", expires: { - ttl: 459112, - timeframe: "day", + ttl: 926479, + timeframe: "year", }, activations: { - limit: 316392, + limit: 624730, enableUserAdmin: false, }, - limitUsage: 906531, + limitUsage: 27877, }, }; ``` diff --git a/docs/models/components/benefitads.md b/docs/models/components/benefitads.md index ed4d4fdc..90c4cf58 100644 --- a/docs/models/components/benefitads.md +++ b/docs/models/components/benefitads.md @@ -10,10 +10,10 @@ Use it so your backers can display ads on your README, website, etc. import { BenefitAds } from "@polar-sh/sdk/models/components"; let value: BenefitAds = { - createdAt: new Date("2024-10-28T02:42:30.721Z"), - modifiedAt: new Date("2022-07-03T20:54:21.016Z"), + createdAt: new Date("2024-03-16T17:11:00.930Z"), + modifiedAt: new Date("2022-02-16T06:35:54.024Z"), id: "", - description: "eek override absent", + description: "quart carefully quicker sometimes um phew about helpless", selectable: false, deletable: false, organizationId: "", diff --git a/docs/models/components/benefitadscreate.md b/docs/models/components/benefitadscreate.md index 6537c239..b3dec7e7 100644 --- a/docs/models/components/benefitadscreate.md +++ b/docs/models/components/benefitadscreate.md @@ -6,8 +6,7 @@ import { BenefitAdsCreate } from "@polar-sh/sdk/models/components"; let value: BenefitAdsCreate = { - description: - "solemnly circa suspiciously every commonly meaningfully lender annual gummy", + description: "apologise um handy into", properties: {}, }; ``` diff --git a/docs/models/components/benefitadssubscriber.md b/docs/models/components/benefitadssubscriber.md index cfc5d714..18abb62e 100644 --- a/docs/models/components/benefitadssubscriber.md +++ b/docs/models/components/benefitadssubscriber.md @@ -6,19 +6,18 @@ import { BenefitAdsSubscriber } from "@polar-sh/sdk/models/components"; let value: BenefitAdsSubscriber = { - createdAt: new Date("2023-06-12T12:17:54.368Z"), - modifiedAt: new Date("2024-01-24T08:06:05.859Z"), + createdAt: new Date("2024-08-06T23:09:15.332Z"), + modifiedAt: new Date("2024-02-08T20:24:45.233Z"), id: "", description: - "unto excepting insidious please once louse deployment circa trolley", + "ah unique interestingly throughout mixture scenario why grandiose vainly", selectable: false, deletable: false, organizationId: "", - properties: {}, grants: [ { - createdAt: new Date("2022-06-05T14:48:44.098Z"), - modifiedAt: new Date("2022-10-12T06:34:08.121Z"), + createdAt: new Date("2023-02-09T06:12:33.108Z"), + modifiedAt: new Date("2023-06-04T12:09:50.425Z"), id: "", isGranted: false, isRevoked: false, @@ -29,6 +28,27 @@ let value: BenefitAdsSubscriber = { properties: {}, }, ], + organization: { + createdAt: new Date("2023-04-15T14:47:40.530Z"), + modifiedAt: new Date("2022-05-08T15:09:38.886Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://sick-airline.com/", + bio: "", + company: "Stiedemann - Morissette", + blog: "", + location: "", + email: "Odessa.Weber-Waelchi58@gmail.com", + twitterUsername: "", + pledgeMinimumAmount: 564647, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 318030, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, + properties: {}, }; ``` @@ -44,5 +64,6 @@ let value: BenefitAdsSubscriber = { | `selectable` | *boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | | `deletable` | *boolean* | :heavy_check_mark: | Whether the benefit is deletable. | | `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the benefit. | -| `properties` | [components.BenefitAdsProperties](../../models/components/benefitadsproperties.md) | :heavy_check_mark: | Properties for a benefit of type `ads`. | -| `grants` | [components.BenefitGrantAds](../../models/components/benefitgrantads.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file +| `grants` | [components.BenefitGrantAds](../../models/components/benefitgrantads.md)[] | :heavy_check_mark: | N/A | +| `organization` | [components.Organization](../../models/components/organization.md) | :heavy_check_mark: | N/A | +| `properties` | [components.BenefitAdsProperties](../../models/components/benefitadsproperties.md) | :heavy_check_mark: | Properties for a benefit of type `ads`. | \ No newline at end of file diff --git a/docs/models/components/benefitarticles.md b/docs/models/components/benefitarticles.md index 6c5b6ad3..1d50d66c 100644 --- a/docs/models/components/benefitarticles.md +++ b/docs/models/components/benefitarticles.md @@ -10,10 +10,11 @@ Use it to grant access to posts. import { BenefitArticles } from "@polar-sh/sdk/models/components"; let value: BenefitArticles = { - createdAt: new Date("2024-11-26T08:57:48.541Z"), - modifiedAt: new Date("2024-06-27T02:43:23.928Z"), + createdAt: new Date("2022-02-27T21:22:28.511Z"), + modifiedAt: new Date("2022-01-01T01:54:20.575Z"), id: "", - description: "a mmm upsell more short who sign flowery", + description: + "yum underneath off plain hmph however parody amidst before misappropriate", selectable: false, deletable: false, organizationId: "", diff --git a/docs/models/components/benefitarticlessubscriber.md b/docs/models/components/benefitarticlessubscriber.md index a3f46104..c1da3db9 100644 --- a/docs/models/components/benefitarticlessubscriber.md +++ b/docs/models/components/benefitarticlessubscriber.md @@ -6,13 +6,46 @@ import { BenefitArticlesSubscriber } from "@polar-sh/sdk/models/components"; let value: BenefitArticlesSubscriber = { - createdAt: new Date("2022-03-21T10:21:14.772Z"), - modifiedAt: new Date("2022-01-07T00:32:08.475Z"), + createdAt: new Date("2022-12-02T16:06:08.205Z"), + modifiedAt: new Date("2024-07-05T06:36:23.390Z"), id: "", - description: "silver unless save unlawful vague", + description: "if carefully eek clavicle cantaloupe inside towards ignorance", selectable: false, deletable: false, organizationId: "", + grants: [ + { + createdAt: new Date("2023-04-22T00:36:49.607Z"), + modifiedAt: new Date("2022-11-02T04:50:51.282Z"), + id: "", + isGranted: false, + isRevoked: false, + subscriptionId: "", + orderId: "", + userId: "", + benefitId: "", + }, + ], + organization: { + createdAt: new Date("2022-01-06T12:53:03.799Z"), + modifiedAt: new Date("2022-07-24T04:31:39.728Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://trim-doorpost.org", + bio: "", + company: "Gulgowski Group", + blog: "", + location: "", + email: "Wyman.Prosacco@hotmail.com", + twitterUsername: "", + pledgeMinimumAmount: 551570, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 123016, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, properties: { paidArticles: false, }, @@ -31,4 +64,6 @@ let value: BenefitArticlesSubscriber = { | `selectable` | *boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | | `deletable` | *boolean* | :heavy_check_mark: | Whether the benefit is deletable. | | `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `grants` | [components.BenefitGrantSubscriber](../../models/components/benefitgrantsubscriber.md)[] | :heavy_check_mark: | N/A | +| `organization` | [components.Organization](../../models/components/organization.md) | :heavy_check_mark: | N/A | | `properties` | [components.BenefitArticlesSubscriberProperties](../../models/components/benefitarticlessubscriberproperties.md) | :heavy_check_mark: | Properties available to subscribers for a benefit of type `articles`. | \ No newline at end of file diff --git a/docs/models/components/benefitbase.md b/docs/models/components/benefitbase.md index 092074c1..42d6143e 100644 --- a/docs/models/components/benefitbase.md +++ b/docs/models/components/benefitbase.md @@ -6,11 +6,12 @@ import { BenefitBase } from "@polar-sh/sdk/models/components"; let value: BenefitBase = { - createdAt: new Date("2023-02-08T00:40:57.806Z"), - modifiedAt: new Date("2024-04-15T22:56:43.340Z"), + createdAt: new Date("2023-10-28T17:13:19.444Z"), + modifiedAt: new Date("2022-08-25T12:45:17.173Z"), id: "", - type: "custom", - description: "gerbil angelic acquire", + type: "license_keys", + description: + "innovation and shark instead energetically alongside judgementally furthermore meh", selectable: false, deletable: false, organizationId: "", diff --git a/docs/models/components/benefitcustom.md b/docs/models/components/benefitcustom.md index 1d7dbd51..2cc198aa 100644 --- a/docs/models/components/benefitcustom.md +++ b/docs/models/components/benefitcustom.md @@ -10,10 +10,10 @@ Use it to grant any kind of benefit that doesn't fit in the other types. import { BenefitCustom } from "@polar-sh/sdk/models/components"; let value: BenefitCustom = { - createdAt: new Date("2024-05-18T02:46:56.122Z"), - modifiedAt: new Date("2024-01-08T16:05:33.519Z"), + createdAt: new Date("2022-01-09T20:21:22.672Z"), + modifiedAt: new Date("2022-04-26T15:33:11.600Z"), id: "", - description: "capsize ew as serpentine surprisingly orange", + description: "ack including angrily venom forenenst", selectable: false, deletable: false, organizationId: "", diff --git a/docs/models/components/benefitcustomcreate.md b/docs/models/components/benefitcustomcreate.md index 3d52e6aa..2bfa21ea 100644 --- a/docs/models/components/benefitcustomcreate.md +++ b/docs/models/components/benefitcustomcreate.md @@ -8,7 +8,7 @@ Schema to create a benefit of type `custom`. import { BenefitCustomCreate } from "@polar-sh/sdk/models/components"; let value: BenefitCustomCreate = { - description: "char notwithstanding yuck inside", + description: "now yawningly properly reconsideration", isTaxApplicable: false, properties: {}, }; diff --git a/docs/models/components/benefitcustomsubscriber.md b/docs/models/components/benefitcustomsubscriber.md index f4af5557..b6b46327 100644 --- a/docs/models/components/benefitcustomsubscriber.md +++ b/docs/models/components/benefitcustomsubscriber.md @@ -6,17 +6,17 @@ import { BenefitCustomSubscriber } from "@polar-sh/sdk/models/components"; let value: BenefitCustomSubscriber = { - createdAt: new Date("2022-07-24T02:06:35.279Z"), - modifiedAt: new Date("2022-07-26T11:39:39.770Z"), + createdAt: new Date("2022-04-13T15:39:03.902Z"), + modifiedAt: new Date("2022-11-04T15:42:22.170Z"), id: "", - description: "than sailor eventually phew violently quaff", + description: "rudely blah glossy substantial supposing gee", selectable: false, deletable: false, organizationId: "", grants: [ { - createdAt: new Date("2022-02-02T10:37:12.717Z"), - modifiedAt: new Date("2023-06-16T10:56:54.092Z"), + createdAt: new Date("2022-11-25T20:02:18.063Z"), + modifiedAt: new Date("2024-11-13T22:33:54.853Z"), id: "", isGranted: false, isRevoked: false, @@ -26,6 +26,26 @@ let value: BenefitCustomSubscriber = { benefitId: "", }, ], + organization: { + createdAt: new Date("2023-03-03T14:29:48.031Z"), + modifiedAt: new Date("2024-02-04T11:30:23.298Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://well-groomed-toaster.com", + bio: "", + company: "Schowalter - Ullrich", + blog: "", + location: "", + email: "Maryse.Erdman60@yahoo.com", + twitterUsername: "", + pledgeMinimumAmount: 59846, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 302207, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, properties: { note: "", }, @@ -45,4 +65,5 @@ let value: BenefitCustomSubscriber = { | `deletable` | *boolean* | :heavy_check_mark: | Whether the benefit is deletable. | | `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the benefit. | | `grants` | [components.BenefitGrantSubscriber](../../models/components/benefitgrantsubscriber.md)[] | :heavy_check_mark: | N/A | +| `organization` | [components.Organization](../../models/components/organization.md) | :heavy_check_mark: | N/A | | `properties` | [components.BenefitCustomSubscriberProperties](../../models/components/benefitcustomsubscriberproperties.md) | :heavy_check_mark: | Properties available to subscribers for a benefit of type `custom`. | \ No newline at end of file diff --git a/docs/models/components/benefitdiscord.md b/docs/models/components/benefitdiscord.md index e26a4989..1279f032 100644 --- a/docs/models/components/benefitdiscord.md +++ b/docs/models/components/benefitdiscord.md @@ -10,11 +10,10 @@ Use it to automatically invite your backers to a Discord server. import { BenefitDiscord } from "@polar-sh/sdk/models/components"; let value: BenefitDiscord = { - createdAt: new Date("2022-06-06T12:51:23.470Z"), - modifiedAt: new Date("2024-08-05T23:18:52.742Z"), + createdAt: new Date("2024-09-21T17:53:36.055Z"), + modifiedAt: new Date("2024-02-16T06:40:47.027Z"), id: "", - description: - "apropos separate impish whenever viability outside blissfully crocodile gladly", + description: "up chapel peppery woot handy ew ew", selectable: false, deletable: false, organizationId: "", diff --git a/docs/models/components/benefitdiscordcreate.md b/docs/models/components/benefitdiscordcreate.md index e969a6d5..0dd718de 100644 --- a/docs/models/components/benefitdiscordcreate.md +++ b/docs/models/components/benefitdiscordcreate.md @@ -6,7 +6,8 @@ import { BenefitDiscordCreate } from "@polar-sh/sdk/models/components"; let value: BenefitDiscordCreate = { - description: "whoa microblog overconfidently punctually", + description: + "heating stage what embossing than glittering sauerkraut off splurge", properties: { guildToken: "", roleId: "", diff --git a/docs/models/components/benefitdiscordinput.md b/docs/models/components/benefitdiscordinput.md index 83be038b..ef385bfe 100644 --- a/docs/models/components/benefitdiscordinput.md +++ b/docs/models/components/benefitdiscordinput.md @@ -10,10 +10,11 @@ Use it to automatically invite your backers to a Discord server. import { BenefitDiscordInput } from "@polar-sh/sdk/models/components"; let value: BenefitDiscordInput = { - createdAt: new Date("2023-04-20T19:40:49.785Z"), - modifiedAt: new Date("2023-05-20T04:29:31.559Z"), + createdAt: new Date("2023-09-24T14:39:14.681Z"), + modifiedAt: new Date("2022-02-11T22:59:09.682Z"), id: "", - description: "modulo since likewise lumpy while musty", + description: + "instead likewise afford truthfully around while petal forenenst", selectable: false, deletable: false, organizationId: "", diff --git a/docs/models/components/benefitdiscordsubscriber.md b/docs/models/components/benefitdiscordsubscriber.md index ca564f97..e2cc40d6 100644 --- a/docs/models/components/benefitdiscordsubscriber.md +++ b/docs/models/components/benefitdiscordsubscriber.md @@ -6,13 +6,46 @@ import { BenefitDiscordSubscriber } from "@polar-sh/sdk/models/components"; let value: BenefitDiscordSubscriber = { - createdAt: new Date("2022-03-18T12:23:43.530Z"), - modifiedAt: new Date("2022-09-06T05:37:35.670Z"), + createdAt: new Date("2023-06-27T15:00:49.644Z"), + modifiedAt: new Date("2024-12-20T18:47:30.812Z"), id: "", - description: "deduction yummy pish cluttered whose manipulate", + description: "made-up brr carelessly", selectable: false, deletable: false, organizationId: "", + grants: [ + { + createdAt: new Date("2022-02-07T09:13:36.865Z"), + modifiedAt: new Date("2023-12-30T07:02:08.293Z"), + id: "", + isGranted: false, + isRevoked: false, + subscriptionId: "", + orderId: "", + userId: "", + benefitId: "", + }, + ], + organization: { + createdAt: new Date("2024-08-08T23:38:36.457Z"), + modifiedAt: new Date("2023-01-05T23:27:19.376Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://clear-cut-descendant.org", + bio: "", + company: "Mohr Group", + blog: "", + location: "", + email: "Ana35@gmail.com", + twitterUsername: "", + pledgeMinimumAmount: 365043, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 267684, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, properties: { guildId: "", }, @@ -31,4 +64,6 @@ let value: BenefitDiscordSubscriber = { | `selectable` | *boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | | `deletable` | *boolean* | :heavy_check_mark: | Whether the benefit is deletable. | | `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `grants` | [components.BenefitGrantSubscriber](../../models/components/benefitgrantsubscriber.md)[] | :heavy_check_mark: | N/A | +| `organization` | [components.Organization](../../models/components/organization.md) | :heavy_check_mark: | N/A | | `properties` | [components.BenefitDiscordSubscriberProperties](../../models/components/benefitdiscordsubscriberproperties.md) | :heavy_check_mark: | Properties available to subscribers for a benefit of type `discord`. | \ No newline at end of file diff --git a/docs/models/components/benefitdownloadables.md b/docs/models/components/benefitdownloadables.md index 3e7370b6..88d9070b 100644 --- a/docs/models/components/benefitdownloadables.md +++ b/docs/models/components/benefitdownloadables.md @@ -6,10 +6,10 @@ import { BenefitDownloadables } from "@polar-sh/sdk/models/components"; let value: BenefitDownloadables = { - createdAt: new Date("2022-10-03T02:53:48.626Z"), - modifiedAt: new Date("2022-03-13T16:03:30.818Z"), + createdAt: new Date("2022-01-11T16:29:34.953Z"), + modifiedAt: new Date("2023-09-17T08:05:44.716Z"), id: "", - description: "psst liberalize besmirch distinction adviser accompanist", + description: "bore rotten fooey now incidentally saloon", selectable: false, deletable: false, organizationId: "", diff --git a/docs/models/components/benefitdownloadablescreate.md b/docs/models/components/benefitdownloadablescreate.md index 7eaa39f7..2c5fc310 100644 --- a/docs/models/components/benefitdownloadablescreate.md +++ b/docs/models/components/benefitdownloadablescreate.md @@ -6,7 +6,7 @@ import { BenefitDownloadablesCreate } from "@polar-sh/sdk/models/components"; let value: BenefitDownloadablesCreate = { - description: "flickering old-fashioned which", + description: "quit boyfriend cruel so ethical than lawmaker considering", properties: { files: [ "", diff --git a/docs/models/components/benefitdownloadablessubscriber.md b/docs/models/components/benefitdownloadablessubscriber.md index a9234137..830e4e18 100644 --- a/docs/models/components/benefitdownloadablessubscriber.md +++ b/docs/models/components/benefitdownloadablessubscriber.md @@ -6,13 +6,46 @@ import { BenefitDownloadablesSubscriber } from "@polar-sh/sdk/models/components"; let value: BenefitDownloadablesSubscriber = { - createdAt: new Date("2023-11-26T16:08:08.795Z"), - modifiedAt: new Date("2024-11-12T19:38:06.759Z"), + createdAt: new Date("2024-01-30T03:46:18.998Z"), + modifiedAt: new Date("2023-03-14T20:59:08.982Z"), id: "", - description: "edible ah twine modulo plugin", + description: "minus pish up", selectable: false, deletable: false, organizationId: "", + grants: [ + { + createdAt: new Date("2024-04-10T11:26:32.069Z"), + modifiedAt: new Date("2022-03-09T04:27:11.348Z"), + id: "", + isGranted: false, + isRevoked: false, + subscriptionId: "", + orderId: "", + userId: "", + benefitId: "", + }, + ], + organization: { + createdAt: new Date("2023-09-20T14:32:18.040Z"), + modifiedAt: new Date("2023-09-14T21:57:59.380Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://gray-impostor.com/", + bio: "", + company: "Cruickshank - Hoeger", + blog: "", + location: "", + email: "Ricky89@hotmail.com", + twitterUsername: "", + pledgeMinimumAmount: 124460, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 80673, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, properties: { activeFiles: [ "", @@ -33,4 +66,6 @@ let value: BenefitDownloadablesSubscriber = { | `selectable` | *boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | | `deletable` | *boolean* | :heavy_check_mark: | Whether the benefit is deletable. | | `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `grants` | [components.BenefitGrantSubscriber](../../models/components/benefitgrantsubscriber.md)[] | :heavy_check_mark: | N/A | +| `organization` | [components.Organization](../../models/components/organization.md) | :heavy_check_mark: | N/A | | `properties` | [components.BenefitDownloadablesSubscriberProperties](../../models/components/benefitdownloadablessubscriberproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/benefitgithubrepository.md b/docs/models/components/benefitgithubrepository.md index e1a1123b..ca03d92e 100644 --- a/docs/models/components/benefitgithubrepository.md +++ b/docs/models/components/benefitgithubrepository.md @@ -10,11 +10,10 @@ Use it to automatically invite your backers to a private GitHub repository. import { BenefitGitHubRepository } from "@polar-sh/sdk/models/components"; let value: BenefitGitHubRepository = { - createdAt: new Date("2023-02-10T13:04:40.129Z"), - modifiedAt: new Date("2023-09-24T23:30:10.421Z"), + createdAt: new Date("2023-06-09T00:28:28.491Z"), + modifiedAt: new Date("2022-10-08T06:48:53.375Z"), id: "", - description: - "versus shoulder whereas around generously from intensely underneath what", + description: "great chromakey gadzooks briefly between", selectable: false, deletable: false, organizationId: "", @@ -22,7 +21,7 @@ let value: BenefitGitHubRepository = { repositoryId: "", repositoryOwner: "polarsource", repositoryName: "private_repo", - permission: "admin", + permission: "triage", }, }; ``` diff --git a/docs/models/components/benefitgithubrepositorycreate.md b/docs/models/components/benefitgithubrepositorycreate.md index 9d312560..d0381884 100644 --- a/docs/models/components/benefitgithubrepositorycreate.md +++ b/docs/models/components/benefitgithubrepositorycreate.md @@ -6,11 +6,11 @@ import { BenefitGitHubRepositoryCreate } from "@polar-sh/sdk/models/components"; let value: BenefitGitHubRepositoryCreate = { - description: "what over suddenly ack volunteer", + description: "despite defendant reward", properties: { repositoryOwner: "polarsource", repositoryName: "private_repo", - permission: "pull", + permission: "push", }, }; ``` diff --git a/docs/models/components/benefitgithubrepositorycreateproperties.md b/docs/models/components/benefitgithubrepositorycreateproperties.md index a2ed38ca..02ba9dbb 100644 --- a/docs/models/components/benefitgithubrepositorycreateproperties.md +++ b/docs/models/components/benefitgithubrepositorycreateproperties.md @@ -10,7 +10,7 @@ import { BenefitGitHubRepositoryCreateProperties } from "@polar-sh/sdk/models/co let value: BenefitGitHubRepositoryCreateProperties = { repositoryOwner: "polarsource", repositoryName: "private_repo", - permission: "triage", + permission: "maintain", }; ``` diff --git a/docs/models/components/benefitgithubrepositoryproperties.md b/docs/models/components/benefitgithubrepositoryproperties.md index feea429f..61b29c53 100644 --- a/docs/models/components/benefitgithubrepositoryproperties.md +++ b/docs/models/components/benefitgithubrepositoryproperties.md @@ -11,7 +11,7 @@ let value: BenefitGitHubRepositoryProperties = { repositoryId: "", repositoryOwner: "polarsource", repositoryName: "private_repo", - permission: "push", + permission: "admin", }; ``` diff --git a/docs/models/components/benefitgithubrepositorysubscriber.md b/docs/models/components/benefitgithubrepositorysubscriber.md index 8a6bf973..570636cc 100644 --- a/docs/models/components/benefitgithubrepositorysubscriber.md +++ b/docs/models/components/benefitgithubrepositorysubscriber.md @@ -6,13 +6,46 @@ import { BenefitGitHubRepositorySubscriber } from "@polar-sh/sdk/models/components"; let value: BenefitGitHubRepositorySubscriber = { - createdAt: new Date("2022-06-14T08:03:29.925Z"), - modifiedAt: new Date("2024-04-06T11:35:34.778Z"), + createdAt: new Date("2024-01-13T05:23:44.648Z"), + modifiedAt: new Date("2023-09-26T08:07:38.651Z"), id: "", - description: "extent except instead aboard since hurtful forenenst solidly", + description: "huzzah impressive times inborn above", selectable: false, deletable: false, organizationId: "", + grants: [ + { + createdAt: new Date("2023-02-23T19:41:54.637Z"), + modifiedAt: new Date("2023-04-11T06:18:21.553Z"), + id: "", + isGranted: false, + isRevoked: false, + subscriptionId: "", + orderId: "", + userId: "", + benefitId: "", + }, + ], + organization: { + createdAt: new Date("2024-08-02T08:31:07.216Z"), + modifiedAt: new Date("2024-05-25T21:42:54.382Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://tedious-diagram.info/", + bio: "", + company: "Bednar - Parker", + blog: "", + location: "", + email: "Jerel97@hotmail.com", + twitterUsername: "", + pledgeMinimumAmount: 274844, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 789015, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, properties: { repositoryOwner: "polarsource", repositoryName: "private_repo", @@ -32,4 +65,6 @@ let value: BenefitGitHubRepositorySubscriber = { | `selectable` | *boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | | `deletable` | *boolean* | :heavy_check_mark: | Whether the benefit is deletable. | | `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the benefit. | +| `grants` | [components.BenefitGrantSubscriber](../../models/components/benefitgrantsubscriber.md)[] | :heavy_check_mark: | N/A | +| `organization` | [components.Organization](../../models/components/organization.md) | :heavy_check_mark: | N/A | | `properties` | [components.BenefitGitHubRepositorySubscriberProperties](../../models/components/benefitgithubrepositorysubscriberproperties.md) | :heavy_check_mark: | Properties available to subscribers for a benefit of type `github_repository`. | \ No newline at end of file diff --git a/docs/models/components/benefitgithubrepositoryupdate.md b/docs/models/components/benefitgithubrepositoryupdate.md index f0948d2e..c1c8d794 100644 --- a/docs/models/components/benefitgithubrepositoryupdate.md +++ b/docs/models/components/benefitgithubrepositoryupdate.md @@ -9,7 +9,7 @@ let value: BenefitGitHubRepositoryUpdate = { properties: { repositoryOwner: "polarsource", repositoryName: "private_repo", - permission: "triage", + permission: "pull", }, }; ``` diff --git a/docs/models/components/benefitgrant.md b/docs/models/components/benefitgrant.md index d16f7c85..1ec26b9e 100644 --- a/docs/models/components/benefitgrant.md +++ b/docs/models/components/benefitgrant.md @@ -6,8 +6,8 @@ import { BenefitGrant } from "@polar-sh/sdk/models/components"; let value: BenefitGrant = { - createdAt: new Date("2023-10-20T16:12:56.499Z"), - modifiedAt: new Date("2023-04-20T19:22:55.409Z"), + createdAt: new Date("2023-03-21T19:22:19.568Z"), + modifiedAt: new Date("2022-07-03T17:14:11.045Z"), id: "", isGranted: false, isRevoked: false, @@ -15,7 +15,9 @@ let value: BenefitGrant = { orderId: "", userId: "", benefitId: "", - properties: {}, + properties: { + advertisementCampaignId: "", + }, }; ``` diff --git a/docs/models/components/benefitgrantads.md b/docs/models/components/benefitgrantads.md index cd9c5370..78a08ff4 100644 --- a/docs/models/components/benefitgrantads.md +++ b/docs/models/components/benefitgrantads.md @@ -6,8 +6,8 @@ import { BenefitGrantAds } from "@polar-sh/sdk/models/components"; let value: BenefitGrantAds = { - createdAt: new Date("2023-04-14T11:56:41.335Z"), - modifiedAt: new Date("2022-01-01T23:45:36.080Z"), + createdAt: new Date("2022-06-18T10:02:41.068Z"), + modifiedAt: new Date("2023-05-03T03:57:46.437Z"), id: "", isGranted: false, isRevoked: false, diff --git a/docs/models/components/benefitgrantgithubrepositorypropertiespermission.md b/docs/models/components/benefitgrantgithubrepositorypropertiespermission.md index 445a6b33..bc6b928b 100644 --- a/docs/models/components/benefitgrantgithubrepositorypropertiespermission.md +++ b/docs/models/components/benefitgrantgithubrepositorypropertiespermission.md @@ -5,7 +5,7 @@ ```typescript import { BenefitGrantGitHubRepositoryPropertiesPermission } from "@polar-sh/sdk/models/components"; -let value: BenefitGrantGitHubRepositoryPropertiesPermission = "pull"; +let value: BenefitGrantGitHubRepositoryPropertiesPermission = "triage"; ``` ## Values diff --git a/docs/models/components/benefitgrantlicensekeys.md b/docs/models/components/benefitgrantlicensekeys.md index 151119b4..47d6757a 100644 --- a/docs/models/components/benefitgrantlicensekeys.md +++ b/docs/models/components/benefitgrantlicensekeys.md @@ -6,8 +6,8 @@ import { BenefitGrantLicenseKeys } from "@polar-sh/sdk/models/components"; let value: BenefitGrantLicenseKeys = { - createdAt: new Date("2022-01-16T17:26:23.935Z"), - modifiedAt: new Date("2023-11-02T04:30:35.857Z"), + createdAt: new Date("2022-11-30T19:27:00.258Z"), + modifiedAt: new Date("2022-01-16T00:03:35.865Z"), id: "", isGranted: false, isRevoked: false, diff --git a/docs/models/components/benefitgrantsubscriber.md b/docs/models/components/benefitgrantsubscriber.md index 69e33ebb..5feb6de5 100644 --- a/docs/models/components/benefitgrantsubscriber.md +++ b/docs/models/components/benefitgrantsubscriber.md @@ -6,8 +6,8 @@ import { BenefitGrantSubscriber } from "@polar-sh/sdk/models/components"; let value: BenefitGrantSubscriber = { - createdAt: new Date("2024-01-19T18:40:42.345Z"), - modifiedAt: new Date("2024-06-19T01:50:01.880Z"), + createdAt: new Date("2022-06-30T19:52:08.607Z"), + modifiedAt: new Date("2023-05-17T14:56:25.246Z"), id: "", isGranted: false, isRevoked: false, diff --git a/docs/models/components/benefitgrantwebhook.md b/docs/models/components/benefitgrantwebhook.md index e13886fe..1c67bfb4 100644 --- a/docs/models/components/benefitgrantwebhook.md +++ b/docs/models/components/benefitgrantwebhook.md @@ -6,8 +6,8 @@ import { BenefitGrantWebhook } from "@polar-sh/sdk/models/components"; let value: BenefitGrantWebhook = { - createdAt: new Date("2023-01-27T05:26:22.568Z"), - modifiedAt: new Date("2022-03-30T12:54:31.192Z"), + createdAt: new Date("2023-06-12T10:03:01.658Z"), + modifiedAt: new Date("2023-09-18T07:49:46.907Z"), id: "", isGranted: false, isRevoked: false, @@ -17,17 +17,25 @@ let value: BenefitGrantWebhook = { benefitId: "", properties: {}, benefit: { - createdAt: new Date("2023-12-05T13:48:33.318Z"), - modifiedAt: new Date("2022-07-09T02:51:12.374Z"), + createdAt: new Date("2024-09-08T22:46:10.175Z"), + modifiedAt: new Date("2024-12-18T04:45:58.619Z"), id: "", - description: "derby powerful how stoop that form hospitable consequently", + description: "light mechanically distorted onto", selectable: false, deletable: false, organizationId: "", properties: { - note: "", + prefix: "", + expires: { + ttl: 611534, + timeframe: "year", + }, + activations: { + limit: 348198, + enableUserAdmin: false, + }, + limitUsage: 382920, }, - isTaxApplicable: false, }, }; ``` diff --git a/docs/models/components/benefitinput.md b/docs/models/components/benefitinput.md index ddf8f53b..48d66c88 100644 --- a/docs/models/components/benefitinput.md +++ b/docs/models/components/benefitinput.md @@ -7,10 +7,11 @@ ```typescript const value: components.BenefitArticles = { - createdAt: new Date("2022-12-04T16:25:25.756Z"), - modifiedAt: new Date("2024-02-16T22:54:46.161Z"), + createdAt: new Date("2024-09-18T01:50:30.231Z"), + modifiedAt: new Date("2022-01-09T21:40:07.070Z"), id: "", - description: "astride yearly rowdy ouch after yuck wherever up reluctantly", + description: + "conjecture gah harmful unimpressively tarry wherever hypothesise helpfully", selectable: false, deletable: false, organizationId: "", @@ -24,11 +25,10 @@ const value: components.BenefitArticles = { ```typescript const value: components.BenefitAds = { - createdAt: new Date("2024-08-24T06:52:47.595Z"), - modifiedAt: new Date("2022-11-30T21:45:00.403Z"), + createdAt: new Date("2022-04-07T02:23:10.765Z"), + modifiedAt: new Date("2024-12-13T22:49:51.164Z"), id: "", - description: - "since governance formal plain across until toothpick uh-huh amidst broadcast", + description: "whopping dramatic glum but", selectable: false, deletable: false, organizationId: "", @@ -40,10 +40,10 @@ const value: components.BenefitAds = { ```typescript const value: components.BenefitCustom = { - createdAt: new Date("2024-01-19T04:12:42.334Z"), - modifiedAt: new Date("2022-02-26T09:31:45.655Z"), + createdAt: new Date("2022-12-18T17:37:05.328Z"), + modifiedAt: new Date("2023-05-01T14:21:51.139Z"), id: "", - description: "yowza warp statement snow", + description: "gosh huzzah until above tag grandpa", selectable: false, deletable: false, organizationId: "", @@ -58,10 +58,10 @@ const value: components.BenefitCustom = { ```typescript const value: components.BenefitDiscordInput = { - createdAt: new Date("2024-11-02T13:11:38.475Z"), - modifiedAt: new Date("2024-08-20T00:50:52.223Z"), + createdAt: new Date("2022-10-19T12:42:33.166Z"), + modifiedAt: new Date("2022-04-21T21:53:00.072Z"), id: "", - description: "avalanche squid noxious connect amused bowling", + description: "hassle whoever instead rubric thorny forenenst till", selectable: false, deletable: false, organizationId: "", @@ -76,11 +76,10 @@ const value: components.BenefitDiscordInput = { ```typescript const value: components.BenefitGitHubRepository = { - createdAt: new Date("2023-11-22T13:06:40.923Z"), - modifiedAt: new Date("2022-01-29T22:14:42.973Z"), + createdAt: new Date("2022-10-04T12:08:13.052Z"), + modifiedAt: new Date("2023-02-18T05:45:49.390Z"), id: "", - description: - "beyond yahoo incidentally profuse fun bandwidth throughout below", + description: "till ouch tuber soon gosh out lightly and pace crocodile", selectable: false, deletable: false, organizationId: "", @@ -88,7 +87,7 @@ const value: components.BenefitGitHubRepository = { repositoryId: "", repositoryOwner: "polarsource", repositoryName: "private_repo", - permission: "pull", + permission: "push", }, }; ``` @@ -97,11 +96,11 @@ const value: components.BenefitGitHubRepository = { ```typescript const value: components.BenefitDownloadables = { - createdAt: new Date("2023-06-17T12:06:28.738Z"), - modifiedAt: new Date("2023-10-14T21:42:37.950Z"), + createdAt: new Date("2024-02-05T08:02:46.013Z"), + modifiedAt: new Date("2024-09-07T05:56:52.203Z"), id: "", description: - "underneath completion before monthly daintily synergy yearn too fervently toward", + "obnoxiously when incidentally helplessly malfunction evenly put under casement the", selectable: false, deletable: false, organizationId: "", @@ -120,25 +119,24 @@ const value: components.BenefitDownloadables = { ```typescript const value: components.BenefitLicenseKeys = { - createdAt: new Date("2023-09-12T19:42:53.732Z"), - modifiedAt: new Date("2023-06-03T07:07:47.859Z"), + createdAt: new Date("2023-08-18T06:37:46.018Z"), + modifiedAt: new Date("2023-03-25T02:27:25.840Z"), id: "", - description: - "bah stint seemingly hoof dwell hygienic geez fatally disbar repeatedly", + description: "irritably consequently soap rule", selectable: false, deletable: false, organizationId: "", properties: { prefix: "", expires: { - ttl: 9143, - timeframe: "month", + ttl: 69978, + timeframe: "day", }, activations: { - limit: 290874, + limit: 257914, enableUserAdmin: false, }, - limitUsage: 335015, + limitUsage: 374102, }, }; ``` diff --git a/docs/models/components/benefitlicensekeyactivationproperties.md b/docs/models/components/benefitlicensekeyactivationproperties.md index d29fb562..fffe9e04 100644 --- a/docs/models/components/benefitlicensekeyactivationproperties.md +++ b/docs/models/components/benefitlicensekeyactivationproperties.md @@ -6,7 +6,7 @@ import { BenefitLicenseKeyActivationProperties } from "@polar-sh/sdk/models/components"; let value: BenefitLicenseKeyActivationProperties = { - limit: 813582, + limit: 865806, enableUserAdmin: false, }; ``` diff --git a/docs/models/components/benefitlicensekeyexpirationproperties.md b/docs/models/components/benefitlicensekeyexpirationproperties.md index ca891fe3..fd7c73a2 100644 --- a/docs/models/components/benefitlicensekeyexpirationproperties.md +++ b/docs/models/components/benefitlicensekeyexpirationproperties.md @@ -6,8 +6,8 @@ import { BenefitLicenseKeyExpirationProperties } from "@polar-sh/sdk/models/components"; let value: BenefitLicenseKeyExpirationProperties = { - ttl: 591220, - timeframe: "day", + ttl: 795337, + timeframe: "month", }; ``` diff --git a/docs/models/components/benefitlicensekeys.md b/docs/models/components/benefitlicensekeys.md index 39b0b283..59002daa 100644 --- a/docs/models/components/benefitlicensekeys.md +++ b/docs/models/components/benefitlicensekeys.md @@ -6,24 +6,24 @@ import { BenefitLicenseKeys } from "@polar-sh/sdk/models/components"; let value: BenefitLicenseKeys = { - createdAt: new Date("2023-04-18T20:26:13.694Z"), - modifiedAt: new Date("2022-01-28T05:14:01.831Z"), + createdAt: new Date("2022-02-01T17:24:49.733Z"), + modifiedAt: new Date("2022-02-19T00:25:38.865Z"), id: "", - description: "quixotic what worth tomorrow", + description: "stratify noisily delightfully ill-fated phooey baritone", selectable: false, deletable: false, organizationId: "", properties: { prefix: "", expires: { - ttl: 776593, - timeframe: "year", + ttl: 379054, + timeframe: "month", }, activations: { - limit: 246846, + limit: 646822, enableUserAdmin: false, }, - limitUsage: 472655, + limitUsage: 887921, }, }; ``` diff --git a/docs/models/components/benefitlicensekeyscreate.md b/docs/models/components/benefitlicensekeyscreate.md index d3f83c0f..be293080 100644 --- a/docs/models/components/benefitlicensekeyscreate.md +++ b/docs/models/components/benefitlicensekeyscreate.md @@ -6,7 +6,7 @@ import { BenefitLicenseKeysCreate } from "@polar-sh/sdk/models/components"; let value: BenefitLicenseKeysCreate = { - description: "editor ack including angrily venom forenenst lovable", + description: "because agreeable worth geez", properties: {}, }; ``` diff --git a/docs/models/components/benefitlicensekeysproperties.md b/docs/models/components/benefitlicensekeysproperties.md index 7f441f7d..0364f4cb 100644 --- a/docs/models/components/benefitlicensekeysproperties.md +++ b/docs/models/components/benefitlicensekeysproperties.md @@ -8,14 +8,14 @@ import { BenefitLicenseKeysProperties } from "@polar-sh/sdk/models/components"; let value: BenefitLicenseKeysProperties = { prefix: "", expires: { - ttl: 943603, - timeframe: "month", + ttl: 142989, + timeframe: "day", }, activations: { - limit: 832530, + limit: 609724, enableUserAdmin: false, }, - limitUsage: 867104, + limitUsage: 29242, }; ``` diff --git a/docs/models/components/benefitlicensekeyssubscriber.md b/docs/models/components/benefitlicensekeyssubscriber.md index ff051673..3e83c509 100644 --- a/docs/models/components/benefitlicensekeyssubscriber.md +++ b/docs/models/components/benefitlicensekeyssubscriber.md @@ -6,30 +6,17 @@ import { BenefitLicenseKeysSubscriber } from "@polar-sh/sdk/models/components"; let value: BenefitLicenseKeysSubscriber = { - createdAt: new Date("2023-07-23T02:21:25.780Z"), - modifiedAt: new Date("2022-07-15T03:50:42.259Z"), + createdAt: new Date("2024-05-26T12:06:04.723Z"), + modifiedAt: new Date("2022-06-27T17:44:33.524Z"), id: "", - description: - "by monumental mostly wallaby indeed stingy boyfriend providence until gracious", + description: "obvious past energetically gentle", selectable: false, deletable: false, organizationId: "", - properties: { - prefix: "", - expires: { - ttl: 845238, - timeframe: "month", - }, - activations: { - limit: 92685, - enableUserAdmin: false, - }, - limitUsage: 454904, - }, grants: [ { - createdAt: new Date("2024-08-13T16:15:24.093Z"), - modifiedAt: new Date("2023-05-07T07:36:48.931Z"), + createdAt: new Date("2023-10-15T20:28:38.974Z"), + modifiedAt: new Date("2022-07-10T19:03:58.934Z"), id: "", isGranted: false, isRevoked: false, @@ -40,6 +27,38 @@ let value: BenefitLicenseKeysSubscriber = { properties: {}, }, ], + organization: { + createdAt: new Date("2023-06-07T06:55:01.621Z"), + modifiedAt: new Date("2022-07-09T16:29:33.851Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://impartial-hovel.biz/", + bio: "", + company: "Gorczany - Fisher", + blog: "", + location: "", + email: "Mikayla_Bosco7@hotmail.com", + twitterUsername: "", + pledgeMinimumAmount: 352596, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 240545, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, + properties: { + prefix: "", + expires: { + ttl: 594648, + timeframe: "day", + }, + activations: { + limit: 719852, + enableUserAdmin: false, + }, + limitUsage: 767361, + }, }; ``` @@ -55,5 +74,6 @@ let value: BenefitLicenseKeysSubscriber = { | `selectable` | *boolean* | :heavy_check_mark: | Whether the benefit is selectable when creating a product. | | `deletable` | *boolean* | :heavy_check_mark: | Whether the benefit is deletable. | | `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the benefit. | -| `properties` | [components.BenefitLicenseKeysSubscriberProperties](../../models/components/benefitlicensekeyssubscriberproperties.md) | :heavy_check_mark: | N/A | -| `grants` | [components.BenefitGrantLicenseKeys](../../models/components/benefitgrantlicensekeys.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file +| `grants` | [components.BenefitGrantLicenseKeys](../../models/components/benefitgrantlicensekeys.md)[] | :heavy_check_mark: | N/A | +| `organization` | [components.Organization](../../models/components/organization.md) | :heavy_check_mark: | N/A | +| `properties` | [components.BenefitLicenseKeysSubscriberProperties](../../models/components/benefitlicensekeyssubscriberproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/benefitlicensekeyssubscriberproperties.md b/docs/models/components/benefitlicensekeyssubscriberproperties.md index 278c2810..62f74185 100644 --- a/docs/models/components/benefitlicensekeyssubscriberproperties.md +++ b/docs/models/components/benefitlicensekeyssubscriberproperties.md @@ -8,14 +8,14 @@ import { BenefitLicenseKeysSubscriberProperties } from "@polar-sh/sdk/models/com let value: BenefitLicenseKeysSubscriberProperties = { prefix: "", expires: { - ttl: 995830, - timeframe: "day", + ttl: 950894, + timeframe: "month", }, activations: { - limit: 617238, + limit: 577731, enableUserAdmin: false, }, - limitUsage: 914399, + limitUsage: 601868, }; ``` diff --git a/docs/models/components/benefits.md b/docs/models/components/benefits.md index 26995ec3..46b80017 100644 --- a/docs/models/components/benefits.md +++ b/docs/models/components/benefits.md @@ -7,11 +7,11 @@ ```typescript const value: components.BenefitBase = { - createdAt: new Date("2024-08-22T03:08:35.867Z"), - modifiedAt: new Date("2022-11-09T06:43:16.309Z"), + createdAt: new Date("2022-01-19T22:47:13.292Z"), + modifiedAt: new Date("2023-09-14T07:38:37.187Z"), id: "", - type: "license_keys", - description: "thorough before verify well-groomed sadly beneath obstruct", + type: "github_repository", + description: "why during jealously psst", selectable: false, deletable: false, organizationId: "", @@ -22,10 +22,10 @@ const value: components.BenefitBase = { ```typescript const value: components.BenefitArticles = { - createdAt: new Date("2023-06-09T02:59:03.086Z"), - modifiedAt: new Date("2023-05-04T18:51:53.512Z"), + createdAt: new Date("2022-02-27T14:50:27.994Z"), + modifiedAt: new Date("2024-01-18T12:44:39.181Z"), id: "", - description: "impressive times inborn above", + description: "though meanwhile sprinkles sanity idle", selectable: false, deletable: false, organizationId: "", diff --git a/docs/models/components/bylineprofile.md b/docs/models/components/bylineprofile.md index 79cf250e..49bde19b 100644 --- a/docs/models/components/bylineprofile.md +++ b/docs/models/components/bylineprofile.md @@ -7,7 +7,7 @@ import { BylineProfile } from "@polar-sh/sdk/models/components"; let value: BylineProfile = { name: "", - avatarUrl: "https://bright-loaf.biz", + avatarUrl: "https://sophisticated-in-joke.biz", }; ``` diff --git a/docs/models/components/checkoutconfirmstripe.md b/docs/models/components/checkoutconfirmstripe.md index 59214df4..4a437cc2 100644 --- a/docs/models/components/checkoutconfirmstripe.md +++ b/docs/models/components/checkoutconfirmstripe.md @@ -12,12 +12,13 @@ let value: CheckoutConfirmStripe = {}; ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `productPriceId` | *string* | :heavy_minus_sign: | ID of the product price to checkout. Must correspond to a price linked to the same product. | -| `amount` | *number* | :heavy_minus_sign: | N/A | -| `customerName` | *string* | :heavy_minus_sign: | N/A | -| `customerEmail` | *string* | :heavy_minus_sign: | N/A | -| `customerBillingAddress` | [components.Address](../../models/components/address.md) | :heavy_minus_sign: | N/A | -| `customerTaxId` | *string* | :heavy_minus_sign: | N/A | -| `confirmationTokenId` | *string* | :heavy_minus_sign: | ID of the Stripe confirmation token. Required for fixed prices and custom prices. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `customFieldData` | [components.CheckoutConfirmStripeCustomFieldData](../../models/components/checkoutconfirmstripecustomfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | +| `productPriceId` | *string* | :heavy_minus_sign: | ID of the product price to checkout. Must correspond to a price linked to the same product. | +| `amount` | *number* | :heavy_minus_sign: | N/A | +| `customerName` | *string* | :heavy_minus_sign: | N/A | +| `customerEmail` | *string* | :heavy_minus_sign: | N/A | +| `customerBillingAddress` | [components.Address](../../models/components/address.md) | :heavy_minus_sign: | N/A | +| `customerTaxId` | *string* | :heavy_minus_sign: | N/A | +| `confirmationTokenId` | *string* | :heavy_minus_sign: | ID of the Stripe confirmation token. Required for fixed prices and custom prices. | \ No newline at end of file diff --git a/docs/models/components/checkoutconfirmstripecustomfielddata.md b/docs/models/components/checkoutconfirmstripecustomfielddata.md new file mode 100644 index 00000000..c6d96a3e --- /dev/null +++ b/docs/models/components/checkoutconfirmstripecustomfielddata.md @@ -0,0 +1,14 @@ +# CheckoutConfirmStripeCustomFieldData + +## Example Usage + +```typescript +import { CheckoutConfirmStripeCustomFieldData } from "@polar-sh/sdk/models/components"; + +let value: CheckoutConfirmStripeCustomFieldData = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/checkoutlink.md b/docs/models/components/checkoutlink.md index 2da89410..cf0d9994 100644 --- a/docs/models/components/checkoutlink.md +++ b/docs/models/components/checkoutlink.md @@ -8,27 +8,25 @@ Checkout link data. import { CheckoutLink } from "@polar-sh/sdk/models/components"; let value: CheckoutLink = { - createdAt: new Date("2022-03-24T04:55:38.302Z"), - modifiedAt: new Date("2024-05-26T23:36:57.146Z"), + createdAt: new Date("2024-04-15T02:43:00.812Z"), + modifiedAt: new Date("2024-04-05T22:09:08.993Z"), id: "", metadata: { "key": "", }, clientSecret: "", - successUrl: "https://untidy-importance.name", + successUrl: "https://putrid-iridescence.com/", productPriceId: "", productPrice: { - createdAt: new Date("2023-07-31T21:34:52.600Z"), - modifiedAt: new Date("2022-09-25T19:36:57.431Z"), + createdAt: new Date("2022-01-15T04:22:51.791Z"), + modifiedAt: new Date("2023-12-07T04:57:49.901Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - minimumAmount: 330422, - maximumAmount: 287648, - presetAmount: 45663, + priceAmount: 172105, }, - url: "https://tender-rust.biz", + url: "https://vivacious-chops.name/", }; ``` diff --git a/docs/models/components/checkoutlinksortproperty.md b/docs/models/components/checkoutlinksortproperty.md index caa81d84..25aecc00 100644 --- a/docs/models/components/checkoutlinksortproperty.md +++ b/docs/models/components/checkoutlinksortproperty.md @@ -5,7 +5,7 @@ ```typescript import { CheckoutLinkSortProperty } from "@polar-sh/sdk/models/components"; -let value: CheckoutLinkSortProperty = "-created_at"; +let value: CheckoutLinkSortProperty = "created_at"; ``` ## Values diff --git a/docs/models/components/checkoutproduct.md b/docs/models/components/checkoutproduct.md new file mode 100644 index 00000000..9ddc4ecb --- /dev/null +++ b/docs/models/components/checkoutproduct.md @@ -0,0 +1,82 @@ +# CheckoutProduct + +Product data for a checkout session. + +## Example Usage + +```typescript +import { CheckoutProduct } from "@polar-sh/sdk/models/components"; + +let value: CheckoutProduct = { + createdAt: new Date("2024-04-24T06:18:14.536Z"), + modifiedAt: new Date("2022-09-28T06:11:19.187Z"), + id: "", + name: "", + description: + "covenant precious mozzarella cricket help knowledgeably whoever", + isRecurring: false, + isArchived: false, + organizationId: "", + prices: [ + { + createdAt: new Date("2023-06-24T16:06:28.408Z"), + modifiedAt: new Date("2022-03-10T01:13:51.874Z"), + id: "", + isArchived: false, + productId: "", + priceCurrency: "", + minimumAmount: 839373, + maximumAmount: 780488, + presetAmount: 393289, + }, + ], + benefits: [ + { + createdAt: new Date("2023-12-24T15:51:09.728Z"), + modifiedAt: new Date("2023-05-26T06:35:27.544Z"), + id: "", + type: "articles", + description: "arrogantly fail upon private whoa", + selectable: false, + deletable: false, + organizationId: "", + }, + ], + medias: [ + { + id: "", + organizationId: "", + name: "", + path: "/sys", + mimeType: "", + size: 782608, + storageVersion: "", + checksumEtag: "", + checksumSha256Base64: "", + checksumSha256Hex: "", + lastModifiedAt: new Date("2023-04-09T00:32:24.908Z"), + version: "", + isUploaded: false, + createdAt: new Date("2024-09-30T13:32:34.699Z"), + sizeReadable: "", + publicUrl: "https://lucky-pantyhose.name/", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Creation timestamp of the object. | +| `modifiedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *string* | :heavy_check_mark: | The ID of the product. | +| `name` | *string* | :heavy_check_mark: | The name of the product. | +| `description` | *string* | :heavy_check_mark: | The description of the product. | +| `isRecurring` | *boolean* | :heavy_check_mark: | Whether the product is a subscription tier. | +| `isArchived` | *boolean* | :heavy_check_mark: | Whether the product is archived and no longer available. | +| `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the product. | +| `prices` | *components.ProductPrice*[] | :heavy_check_mark: | List of prices for this product. | +| `benefits` | *components.CheckoutProductBenefits*[] | :heavy_check_mark: | List of benefits granted by the product. | +| `medias` | [components.ProductMediaFileRead](../../models/components/productmediafileread.md)[] | :heavy_check_mark: | List of medias associated to the product. | \ No newline at end of file diff --git a/docs/models/components/productbenefits.md b/docs/models/components/checkoutproductbenefits.md similarity index 53% rename from docs/models/components/productbenefits.md rename to docs/models/components/checkoutproductbenefits.md index 46224542..95c24ece 100644 --- a/docs/models/components/productbenefits.md +++ b/docs/models/components/checkoutproductbenefits.md @@ -1,4 +1,4 @@ -# ProductBenefits +# CheckoutProductBenefits ## Supported Types @@ -7,11 +7,11 @@ ```typescript const value: components.BenefitBase = { - createdAt: new Date("2024-10-09T21:09:28.886Z"), - modifiedAt: new Date("2024-11-17T19:14:12.440Z"), + createdAt: new Date("2023-12-06T08:47:09.306Z"), + modifiedAt: new Date("2023-05-27T10:58:25.218Z"), id: "", - type: "custom", - description: "aboard hence who which incidentally fully behind midwife", + type: "downloadables", + description: "about sternly translation how", selectable: false, deletable: false, organizationId: "", @@ -22,10 +22,10 @@ const value: components.BenefitBase = { ```typescript const value: components.BenefitArticles = { - createdAt: new Date("2022-12-29T18:51:15.843Z"), - modifiedAt: new Date("2022-06-29T15:55:54.718Z"), + createdAt: new Date("2024-12-02T12:30:01.615Z"), + modifiedAt: new Date("2022-09-03T13:07:24.254Z"), id: "", - description: "noisily thorn peter behind huzzah now", + description: "quarrelsomely materialise blah lost wherever", selectable: false, deletable: false, organizationId: "", diff --git a/docs/models/components/checkoutproductinput.md b/docs/models/components/checkoutproductinput.md new file mode 100644 index 00000000..a7573061 --- /dev/null +++ b/docs/models/components/checkoutproductinput.md @@ -0,0 +1,77 @@ +# CheckoutProductInput + +Product data for a checkout session. + +## Example Usage + +```typescript +import { CheckoutProductInput } from "@polar-sh/sdk/models/components"; + +let value: CheckoutProductInput = { + createdAt: new Date("2024-01-13T22:28:31.850Z"), + modifiedAt: new Date("2022-11-08T19:50:53.693Z"), + id: "", + name: "", + description: "why hmph whoever recent aha crossly unfortunate toward", + isRecurring: false, + isArchived: false, + organizationId: "", + prices: [ + { + createdAt: new Date("2024-03-27T18:09:35.560Z"), + modifiedAt: new Date("2023-02-06T10:05:18.965Z"), + id: "", + isArchived: false, + productId: "", + }, + ], + benefits: [ + { + createdAt: new Date("2023-02-10T05:06:21.763Z"), + modifiedAt: new Date("2024-10-07T00:51:30.483Z"), + id: "", + description: "when seal cannon", + selectable: false, + deletable: false, + organizationId: "", + properties: { + paidArticles: false, + }, + }, + ], + medias: [ + { + id: "", + organizationId: "", + name: "", + path: "/usr/ports", + mimeType: "", + size: 678419, + storageVersion: "", + checksumEtag: "", + checksumSha256Base64: "", + checksumSha256Hex: "", + lastModifiedAt: new Date("2024-02-20T05:44:31.280Z"), + version: "", + isUploaded: false, + createdAt: new Date("2023-06-19T05:19:44.942Z"), + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Creation timestamp of the object. | +| `modifiedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *string* | :heavy_check_mark: | The ID of the product. | +| `name` | *string* | :heavy_check_mark: | The name of the product. | +| `description` | *string* | :heavy_check_mark: | The description of the product. | +| `isRecurring` | *boolean* | :heavy_check_mark: | Whether the product is a subscription tier. | +| `isArchived` | *boolean* | :heavy_check_mark: | Whether the product is archived and no longer available. | +| `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the product. | +| `prices` | *components.ProductPrice*[] | :heavy_check_mark: | List of prices for this product. | +| `benefits` | *components.CheckoutProductBenefits*[] | :heavy_check_mark: | List of benefits granted by the product. | +| `medias` | [components.ProductMediaFileReadInput](../../models/components/productmediafilereadinput.md)[] | :heavy_check_mark: | List of medias associated to the product. | \ No newline at end of file diff --git a/docs/models/components/checkoutpublic.md b/docs/models/components/checkoutpublic.md index ee4f30d3..8ea9a5b5 100644 --- a/docs/models/components/checkoutpublic.md +++ b/docs/models/components/checkoutpublic.md @@ -8,59 +8,59 @@ Checkout session data retrieved using the client secret. import { CheckoutPublic } from "@polar-sh/sdk/models/components"; let value: CheckoutPublic = { - createdAt: new Date("2024-04-18T21:34:27.901Z"), - modifiedAt: new Date("2023-09-29T21:12:10.022Z"), + createdAt: new Date("2022-05-07T01:41:54.981Z"), + modifiedAt: new Date("2023-02-08T16:54:04.413Z"), id: "", status: "expired", clientSecret: "", - url: "https://exalted-following.com", - expiresAt: new Date("2024-06-13T14:07:06.026Z"), - successUrl: "https://frightened-translation.name/", + url: "https://memorable-tomography.info", + expiresAt: new Date("2022-03-15T09:25:01.845Z"), + successUrl: "https://inconsequential-marathon.name/", embedOrigin: "", - amount: 217880, - taxAmount: 992888, - currency: "Hryvnia", - totalAmount: 68180, + amount: 58904, + taxAmount: 617530, + currency: "Bahamian Dollar", + totalAmount: 431813, productId: "", productPriceId: "", isPaymentRequired: false, customerId: "", customerName: "", - customerEmail: "Lucy.Lind@gmail.com", + customerEmail: "Brett.Kassulke28@hotmail.com", customerIpAddress: "", customerBillingAddress: { - country: "Vietnam", + country: "Democratic People's Republic of Korea", }, customerTaxId: "", paymentProcessorMetadata: {}, product: { - createdAt: new Date("2022-05-27T15:49:28.029Z"), - modifiedAt: new Date("2023-08-05T16:05:30.256Z"), + createdAt: new Date("2023-09-21T10:09:14.320Z"), + modifiedAt: new Date("2024-04-01T05:07:23.085Z"), id: "", name: "", - description: "untried amid if drat times", + description: + "ghost round stock brightly yowza while before victoriously mechanically wrongly", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2022-10-08T04:45:48.967Z"), - modifiedAt: new Date("2024-09-28T12:48:41.806Z"), + createdAt: new Date("2022-02-12T05:28:18.955Z"), + modifiedAt: new Date("2022-09-05T04:07:53.610Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 662213, - recurringInterval: "month", + priceAmount: 778856, }, ], benefits: [ { - createdAt: new Date("2023-11-05T14:16:30.505Z"), - modifiedAt: new Date("2023-07-08T15:12:48.113Z"), + createdAt: new Date("2023-07-08T21:03:19.722Z"), + modifiedAt: new Date("2024-08-14T06:28:14.989Z"), id: "", - type: "downloadables", - description: "louse before degrease", + type: "license_keys", + description: "swanling cauliflower whose insert loose reassuringly", selectable: false, deletable: false, organizationId: "", @@ -71,30 +71,75 @@ let value: CheckoutPublic = { id: "", organizationId: "", name: "", - path: "/usr/libdata", + path: "/media", mimeType: "", - size: 456468, + size: 625403, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2022-03-19T18:06:26.986Z"), + lastModifiedAt: new Date("2023-11-28T05:20:13.228Z"), version: "", isUploaded: false, - createdAt: new Date("2024-05-21T07:18:56.019Z"), + createdAt: new Date("2023-07-16T02:59:18.334Z"), sizeReadable: "", - publicUrl: "https://selfish-yin.org", + publicUrl: "https://serpentine-fat.info/", }, ], }, productPrice: { - createdAt: new Date("2023-12-25T04:00:47.026Z"), - modifiedAt: new Date("2024-03-07T05:00:45.384Z"), + createdAt: new Date("2022-04-01T14:34:31.000Z"), + modifiedAt: new Date("2023-09-12T15:43:53.558Z"), id: "", isArchived: false, productId: "", - recurringInterval: "year", }, + organization: { + createdAt: new Date("2022-04-06T06:20:48.081Z"), + modifiedAt: new Date("2023-12-09T10:05:15.071Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://sturdy-scaffold.org/", + bio: "", + company: "Daniel - Denesik", + blog: "", + location: "", + email: "Estevan_Block@yahoo.com", + twitterUsername: "", + pledgeMinimumAmount: 587824, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 530259, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2023-08-22T02:15:34.328Z"), + modifiedAt: new Date("2024-10-08T00:41:43.929Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: { + options: [ + { + value: "", + label: "", + }, + ], + }, + }, + order: 551678, + required: false, + }, + ], }; ``` @@ -105,6 +150,7 @@ let value: CheckoutPublic = { | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Creation timestamp of the object. | | `modifiedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Last modification timestamp of the object. | | `id` | *string* | :heavy_check_mark: | The ID of the object. | +| `customFieldData` | [components.CheckoutPublicCustomFieldData](../../models/components/checkoutpubliccustomfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | | `paymentProcessor` | [components.PolarEnumsPaymentProcessor](../../models/components/polarenumspaymentprocessor.md) | :heavy_check_mark: | N/A | | `status` | [components.CheckoutStatus](../../models/components/checkoutstatus.md) | :heavy_check_mark: | N/A | | `clientSecret` | *string* | :heavy_check_mark: | Client secret used to update and complete the checkout session from the client. | @@ -126,5 +172,7 @@ let value: CheckoutPublic = { | `customerBillingAddress` | [components.Address](../../models/components/address.md) | :heavy_check_mark: | N/A | | `customerTaxId` | *string* | :heavy_check_mark: | N/A | | `paymentProcessorMetadata` | [components.CheckoutPublicPaymentProcessorMetadata](../../models/components/checkoutpublicpaymentprocessormetadata.md) | :heavy_check_mark: | N/A | -| `product` | [components.Product](../../models/components/product.md) | :heavy_check_mark: | A product. | -| `productPrice` | *components.ProductPrice* | :heavy_check_mark: | N/A | \ No newline at end of file +| `product` | [components.CheckoutProduct](../../models/components/checkoutproduct.md) | :heavy_check_mark: | Product data for a checkout session. | +| `productPrice` | *components.ProductPrice* | :heavy_check_mark: | N/A | +| `organization` | [components.Organization](../../models/components/organization.md) | :heavy_check_mark: | N/A | +| `attachedCustomFields` | [components.AttachedCustomField](../../models/components/attachedcustomfield.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/checkoutpubliccustomfielddata.md b/docs/models/components/checkoutpubliccustomfielddata.md new file mode 100644 index 00000000..228ea5aa --- /dev/null +++ b/docs/models/components/checkoutpubliccustomfielddata.md @@ -0,0 +1,16 @@ +# CheckoutPublicCustomFieldData + +Key-value object storing custom field values. + +## Example Usage + +```typescript +import { CheckoutPublicCustomFieldData } from "@polar-sh/sdk/models/components"; + +let value: CheckoutPublicCustomFieldData = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/checkoutsortproperty.md b/docs/models/components/checkoutsortproperty.md index 9a1ed417..73bb9e42 100644 --- a/docs/models/components/checkoutsortproperty.md +++ b/docs/models/components/checkoutsortproperty.md @@ -5,7 +5,7 @@ ```typescript import { CheckoutSortProperty } from "@polar-sh/sdk/models/components"; -let value: CheckoutSortProperty = "expires_at"; +let value: CheckoutSortProperty = "created_at"; ``` ## Values diff --git a/docs/models/components/checkoutstatus.md b/docs/models/components/checkoutstatus.md index ae42901d..adc1226c 100644 --- a/docs/models/components/checkoutstatus.md +++ b/docs/models/components/checkoutstatus.md @@ -5,7 +5,7 @@ ```typescript import { CheckoutStatus } from "@polar-sh/sdk/models/components"; -let value: CheckoutStatus = "succeeded"; +let value: CheckoutStatus = "failed"; ``` ## Values diff --git a/docs/models/components/checkoutupdate.md b/docs/models/components/checkoutupdate.md index af0dea1e..0be9013d 100644 --- a/docs/models/components/checkoutupdate.md +++ b/docs/models/components/checkoutupdate.md @@ -14,6 +14,7 @@ let value: CheckoutUpdate = {}; | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `customFieldData` | [components.CustomFieldData](../../models/components/customfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | | `productPriceId` | *string* | :heavy_minus_sign: | ID of the product price to checkout. Must correspond to a price linked to the same product. | | `amount` | *number* | :heavy_minus_sign: | N/A | | `customerName` | *string* | :heavy_minus_sign: | N/A | diff --git a/docs/models/components/checkoutupdatepublic.md b/docs/models/components/checkoutupdatepublic.md index b980da54..682e7ca3 100644 --- a/docs/models/components/checkoutupdatepublic.md +++ b/docs/models/components/checkoutupdatepublic.md @@ -12,11 +12,12 @@ let value: CheckoutUpdatePublic = {}; ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `productPriceId` | *string* | :heavy_minus_sign: | ID of the product price to checkout. Must correspond to a price linked to the same product. | -| `amount` | *number* | :heavy_minus_sign: | N/A | -| `customerName` | *string* | :heavy_minus_sign: | N/A | -| `customerEmail` | *string* | :heavy_minus_sign: | N/A | -| `customerBillingAddress` | [components.Address](../../models/components/address.md) | :heavy_minus_sign: | N/A | -| `customerTaxId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `customFieldData` | [components.CheckoutUpdatePublicCustomFieldData](../../models/components/checkoutupdatepubliccustomfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | +| `productPriceId` | *string* | :heavy_minus_sign: | ID of the product price to checkout. Must correspond to a price linked to the same product. | +| `amount` | *number* | :heavy_minus_sign: | N/A | +| `customerName` | *string* | :heavy_minus_sign: | N/A | +| `customerEmail` | *string* | :heavy_minus_sign: | N/A | +| `customerBillingAddress` | [components.Address](../../models/components/address.md) | :heavy_minus_sign: | N/A | +| `customerTaxId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/checkoutupdatepubliccustomfielddata.md b/docs/models/components/checkoutupdatepubliccustomfielddata.md new file mode 100644 index 00000000..2ed1deb8 --- /dev/null +++ b/docs/models/components/checkoutupdatepubliccustomfielddata.md @@ -0,0 +1,14 @@ +# CheckoutUpdatePublicCustomFieldData + +## Example Usage + +```typescript +import { CheckoutUpdatePublicCustomFieldData } from "@polar-sh/sdk/models/components"; + +let value: CheckoutUpdatePublicCustomFieldData = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/currencyamount.md b/docs/models/components/currencyamount.md index 1e5f7b13..13d0d683 100644 --- a/docs/models/components/currencyamount.md +++ b/docs/models/components/currencyamount.md @@ -6,8 +6,8 @@ import { CurrencyAmount } from "@polar-sh/sdk/models/components"; let value: CurrencyAmount = { - currency: "Kina", - amount: 708899, + currency: "Philippine Peso", + amount: 637764, }; ``` diff --git a/docs/models/components/customfield.md b/docs/models/components/customfield.md new file mode 100644 index 00000000..a978c824 --- /dev/null +++ b/docs/models/components/customfield.md @@ -0,0 +1,97 @@ +# CustomField + + +## Supported Types + +### `components.CustomFieldCheckbox` + +```typescript +const value: components.CustomFieldCheckbox = { + createdAt: new Date("2024-10-19T21:29:25.463Z"), + modifiedAt: new Date("2024-02-23T12:12:14.708Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, +}; +``` + +### `components.CustomFieldDate` + +```typescript +const value: components.CustomFieldDate = { + createdAt: new Date("2023-10-18T08:22:17.195Z"), + modifiedAt: new Date("2024-02-15T22:04:01.869Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, +}; +``` + +### `components.CustomFieldNumber` + +```typescript +const value: components.CustomFieldNumber = { + createdAt: new Date("2022-01-03T23:42:04.530Z"), + modifiedAt: new Date("2022-06-09T11:47:38.531Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, +}; +``` + +### `components.CustomFieldSelect` + +```typescript +const value: components.CustomFieldSelect = { + createdAt: new Date("2024-01-29T03:47:52.443Z"), + modifiedAt: new Date("2024-02-23T14:31:52.929Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: { + options: [ + { + value: "", + label: "", + }, + ], + }, +}; +``` + +### `components.CustomFieldText` + +```typescript +const value: components.CustomFieldText = { + createdAt: new Date("2024-07-23T20:35:59.037Z"), + modifiedAt: new Date("2023-10-04T18:18:47.556Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, +}; +``` + diff --git a/docs/models/components/customfieldcheckbox.md b/docs/models/components/customfieldcheckbox.md new file mode 100644 index 00000000..60d5799f --- /dev/null +++ b/docs/models/components/customfieldcheckbox.md @@ -0,0 +1,36 @@ +# CustomFieldCheckbox + +Schema for a custom field of type checkbox. + +## Example Usage + +```typescript +import { CustomFieldCheckbox } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldCheckbox = { + createdAt: new Date("2022-02-25T05:51:19.973Z"), + modifiedAt: new Date("2024-05-18T02:46:56.122Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Creation timestamp of the object. | +| `modifiedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *string* | :heavy_check_mark: | The ID of the object. | +| `metadata` | Record | :heavy_check_mark: | N/A | +| `type` | [components.CustomFieldCheckboxType](../../models/components/customfieldcheckboxtype.md) | :heavy_check_mark: | N/A | +| `slug` | *string* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *string* | :heavy_check_mark: | Name of the custom field. | +| `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the custom field. | +| `properties` | [components.CustomFieldCheckboxProperties](../../models/components/customfieldcheckboxproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldcheckboxproperties.md b/docs/models/components/customfieldcheckboxproperties.md new file mode 100644 index 00000000..eb4753a1 --- /dev/null +++ b/docs/models/components/customfieldcheckboxproperties.md @@ -0,0 +1,17 @@ +# CustomFieldCheckboxProperties + +## Example Usage + +```typescript +import { CustomFieldCheckboxProperties } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldCheckboxProperties = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `formLabel` | *string* | :heavy_minus_sign: | N/A | +| `formHelpText` | *string* | :heavy_minus_sign: | N/A | +| `formPlaceholder` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldcheckboxtype.md b/docs/models/components/customfieldcheckboxtype.md new file mode 100644 index 00000000..92bc8219 --- /dev/null +++ b/docs/models/components/customfieldcheckboxtype.md @@ -0,0 +1,15 @@ +# CustomFieldCheckboxType + +## Example Usage + +```typescript +import { CustomFieldCheckboxType } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldCheckboxType = "checkbox"; +``` + +## Values + +```typescript +"checkbox" +``` \ No newline at end of file diff --git a/docs/models/components/customfieldcreate.md b/docs/models/components/customfieldcreate.md new file mode 100644 index 00000000..740a46a7 --- /dev/null +++ b/docs/models/components/customfieldcreate.md @@ -0,0 +1,62 @@ +# CustomFieldCreate + + +## Supported Types + +### `components.CustomFieldCreateCheckbox` + +```typescript +const value: components.CustomFieldCreateCheckbox = { + slug: "", + name: "", + properties: {}, +}; +``` + +### `components.CustomFieldCreateDate` + +```typescript +const value: components.CustomFieldCreateDate = { + slug: "", + name: "", + properties: {}, +}; +``` + +### `components.CustomFieldCreateNumber` + +```typescript +const value: components.CustomFieldCreateNumber = { + slug: "", + name: "", + properties: {}, +}; +``` + +### `components.CustomFieldCreateSelect` + +```typescript +const value: components.CustomFieldCreateSelect = { + slug: "", + name: "", + properties: { + options: [ + { + value: "", + label: "", + }, + ], + }, +}; +``` + +### `components.CustomFieldCreateText` + +```typescript +const value: components.CustomFieldCreateText = { + slug: "", + name: "", + properties: {}, +}; +``` + diff --git a/docs/models/components/customfieldcreatecheckbox.md b/docs/models/components/customfieldcreatecheckbox.md new file mode 100644 index 00000000..bbd99a99 --- /dev/null +++ b/docs/models/components/customfieldcreatecheckbox.md @@ -0,0 +1,26 @@ +# CustomFieldCreateCheckbox + +Schema to create a custom field of type checkbox. + +## Example Usage + +```typescript +import { CustomFieldCreateCheckbox } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldCreateCheckbox = { + slug: "", + name: "", + properties: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | Record | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `type` | [components.CustomFieldCreateCheckboxType](../../models/components/customfieldcreatecheckboxtype.md) | :heavy_check_mark: | N/A | +| `slug` | *string* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *string* | :heavy_check_mark: | Name of the custom field. | +| `organizationId` | *string* | :heavy_minus_sign: | The ID of the organization owning the custom field. **Required unless you use an organization token.** | +| `properties` | [components.CustomFieldCheckboxProperties](../../models/components/customfieldcheckboxproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldcreatecheckboxtype.md b/docs/models/components/customfieldcreatecheckboxtype.md new file mode 100644 index 00000000..f3bccf17 --- /dev/null +++ b/docs/models/components/customfieldcreatecheckboxtype.md @@ -0,0 +1,15 @@ +# CustomFieldCreateCheckboxType + +## Example Usage + +```typescript +import { CustomFieldCreateCheckboxType } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldCreateCheckboxType = "checkbox"; +``` + +## Values + +```typescript +"checkbox" +``` \ No newline at end of file diff --git a/docs/models/components/customfieldcreatedate.md b/docs/models/components/customfieldcreatedate.md new file mode 100644 index 00000000..c5e8bf93 --- /dev/null +++ b/docs/models/components/customfieldcreatedate.md @@ -0,0 +1,26 @@ +# CustomFieldCreateDate + +Schema to create a custom field of type date. + +## Example Usage + +```typescript +import { CustomFieldCreateDate } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldCreateDate = { + slug: "", + name: "", + properties: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | Record | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `type` | [components.CustomFieldCreateDateType](../../models/components/customfieldcreatedatetype.md) | :heavy_check_mark: | N/A | +| `slug` | *string* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *string* | :heavy_check_mark: | Name of the custom field. | +| `organizationId` | *string* | :heavy_minus_sign: | The ID of the organization owning the custom field. **Required unless you use an organization token.** | +| `properties` | [components.CustomFieldDateProperties](../../models/components/customfielddateproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldcreatedatetype.md b/docs/models/components/customfieldcreatedatetype.md new file mode 100644 index 00000000..060c34a4 --- /dev/null +++ b/docs/models/components/customfieldcreatedatetype.md @@ -0,0 +1,15 @@ +# CustomFieldCreateDateType + +## Example Usage + +```typescript +import { CustomFieldCreateDateType } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldCreateDateType = "date"; +``` + +## Values + +```typescript +"date" +``` \ No newline at end of file diff --git a/docs/models/components/customfieldcreatenumber.md b/docs/models/components/customfieldcreatenumber.md new file mode 100644 index 00000000..4eedc262 --- /dev/null +++ b/docs/models/components/customfieldcreatenumber.md @@ -0,0 +1,26 @@ +# CustomFieldCreateNumber + +Schema to create a custom field of type number. + +## Example Usage + +```typescript +import { CustomFieldCreateNumber } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldCreateNumber = { + slug: "", + name: "", + properties: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | Record | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `type` | [components.CustomFieldCreateNumberType](../../models/components/customfieldcreatenumbertype.md) | :heavy_check_mark: | N/A | +| `slug` | *string* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *string* | :heavy_check_mark: | Name of the custom field. | +| `organizationId` | *string* | :heavy_minus_sign: | The ID of the organization owning the custom field. **Required unless you use an organization token.** | +| `properties` | [components.CustomFieldNumberProperties](../../models/components/customfieldnumberproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldcreatenumbertype.md b/docs/models/components/customfieldcreatenumbertype.md new file mode 100644 index 00000000..0a72a7ef --- /dev/null +++ b/docs/models/components/customfieldcreatenumbertype.md @@ -0,0 +1,15 @@ +# CustomFieldCreateNumberType + +## Example Usage + +```typescript +import { CustomFieldCreateNumberType } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldCreateNumberType = "number"; +``` + +## Values + +```typescript +"number" +``` \ No newline at end of file diff --git a/docs/models/components/customfieldcreateselect.md b/docs/models/components/customfieldcreateselect.md new file mode 100644 index 00000000..8e5e366a --- /dev/null +++ b/docs/models/components/customfieldcreateselect.md @@ -0,0 +1,33 @@ +# CustomFieldCreateSelect + +Schema to create a custom field of type select. + +## Example Usage + +```typescript +import { CustomFieldCreateSelect } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldCreateSelect = { + slug: "", + name: "", + properties: { + options: [ + { + value: "", + label: "", + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | Record | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `type` | [components.CustomFieldCreateSelectType](../../models/components/customfieldcreateselecttype.md) | :heavy_check_mark: | N/A | +| `slug` | *string* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *string* | :heavy_check_mark: | Name of the custom field. | +| `organizationId` | *string* | :heavy_minus_sign: | The ID of the organization owning the custom field. **Required unless you use an organization token.** | +| `properties` | [components.CustomFieldSelectProperties](../../models/components/customfieldselectproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldcreateselecttype.md b/docs/models/components/customfieldcreateselecttype.md new file mode 100644 index 00000000..d5085107 --- /dev/null +++ b/docs/models/components/customfieldcreateselecttype.md @@ -0,0 +1,15 @@ +# CustomFieldCreateSelectType + +## Example Usage + +```typescript +import { CustomFieldCreateSelectType } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldCreateSelectType = "select"; +``` + +## Values + +```typescript +"select" +``` \ No newline at end of file diff --git a/docs/models/components/customfieldcreatetext.md b/docs/models/components/customfieldcreatetext.md new file mode 100644 index 00000000..a5ca58db --- /dev/null +++ b/docs/models/components/customfieldcreatetext.md @@ -0,0 +1,26 @@ +# CustomFieldCreateText + +Schema to create a custom field of type text. + +## Example Usage + +```typescript +import { CustomFieldCreateText } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldCreateText = { + slug: "", + name: "", + properties: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | Record | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `type` | [components.CustomFieldCreateTextType](../../models/components/customfieldcreatetexttype.md) | :heavy_check_mark: | N/A | +| `slug` | *string* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *string* | :heavy_check_mark: | Name of the custom field. | +| `organizationId` | *string* | :heavy_minus_sign: | The ID of the organization owning the custom field. **Required unless you use an organization token.** | +| `properties` | [components.CustomFieldTextProperties](../../models/components/customfieldtextproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldcreatetexttype.md b/docs/models/components/customfieldcreatetexttype.md new file mode 100644 index 00000000..90b61afc --- /dev/null +++ b/docs/models/components/customfieldcreatetexttype.md @@ -0,0 +1,15 @@ +# CustomFieldCreateTextType + +## Example Usage + +```typescript +import { CustomFieldCreateTextType } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldCreateTextType = "text"; +``` + +## Values + +```typescript +"text" +``` \ No newline at end of file diff --git a/docs/models/components/customfielddata.md b/docs/models/components/customfielddata.md new file mode 100644 index 00000000..958b56f2 --- /dev/null +++ b/docs/models/components/customfielddata.md @@ -0,0 +1,14 @@ +# CustomFieldData + +## Example Usage + +```typescript +import { CustomFieldData } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldData = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/customfielddate.md b/docs/models/components/customfielddate.md new file mode 100644 index 00000000..0f9c09e9 --- /dev/null +++ b/docs/models/components/customfielddate.md @@ -0,0 +1,36 @@ +# CustomFieldDate + +Schema for a custom field of type date. + +## Example Usage + +```typescript +import { CustomFieldDate } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldDate = { + createdAt: new Date("2023-05-10T22:42:04.682Z"), + modifiedAt: new Date("2023-02-16T15:35:40.674Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Creation timestamp of the object. | +| `modifiedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *string* | :heavy_check_mark: | The ID of the object. | +| `metadata` | Record | :heavy_check_mark: | N/A | +| `type` | [components.CustomFieldDateType](../../models/components/customfielddatetype.md) | :heavy_check_mark: | N/A | +| `slug` | *string* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *string* | :heavy_check_mark: | Name of the custom field. | +| `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the custom field. | +| `properties` | [components.CustomFieldDateProperties](../../models/components/customfielddateproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfielddateproperties.md b/docs/models/components/customfielddateproperties.md new file mode 100644 index 00000000..f281dc20 --- /dev/null +++ b/docs/models/components/customfielddateproperties.md @@ -0,0 +1,19 @@ +# CustomFieldDateProperties + +## Example Usage + +```typescript +import { CustomFieldDateProperties } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldDateProperties = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `formLabel` | *string* | :heavy_minus_sign: | N/A | +| `formHelpText` | *string* | :heavy_minus_sign: | N/A | +| `formPlaceholder` | *string* | :heavy_minus_sign: | N/A | +| `ge` | *number* | :heavy_minus_sign: | N/A | +| `le` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfielddatetype.md b/docs/models/components/customfielddatetype.md new file mode 100644 index 00000000..f3de52c9 --- /dev/null +++ b/docs/models/components/customfielddatetype.md @@ -0,0 +1,15 @@ +# CustomFieldDateType + +## Example Usage + +```typescript +import { CustomFieldDateType } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldDateType = "date"; +``` + +## Values + +```typescript +"date" +``` \ No newline at end of file diff --git a/docs/models/components/customfieldnumber.md b/docs/models/components/customfieldnumber.md new file mode 100644 index 00000000..6ad996e9 --- /dev/null +++ b/docs/models/components/customfieldnumber.md @@ -0,0 +1,36 @@ +# CustomFieldNumber + +Schema for a custom field of type number. + +## Example Usage + +```typescript +import { CustomFieldNumber } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldNumber = { + createdAt: new Date("2024-06-13T22:41:28.103Z"), + modifiedAt: new Date("2024-07-22T19:36:51.710Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Creation timestamp of the object. | +| `modifiedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *string* | :heavy_check_mark: | The ID of the object. | +| `metadata` | Record | :heavy_check_mark: | N/A | +| `type` | [components.CustomFieldNumberType](../../models/components/customfieldnumbertype.md) | :heavy_check_mark: | N/A | +| `slug` | *string* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *string* | :heavy_check_mark: | Name of the custom field. | +| `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the custom field. | +| `properties` | [components.CustomFieldNumberProperties](../../models/components/customfieldnumberproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldnumberproperties.md b/docs/models/components/customfieldnumberproperties.md new file mode 100644 index 00000000..04e3a00b --- /dev/null +++ b/docs/models/components/customfieldnumberproperties.md @@ -0,0 +1,19 @@ +# CustomFieldNumberProperties + +## Example Usage + +```typescript +import { CustomFieldNumberProperties } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldNumberProperties = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `formLabel` | *string* | :heavy_minus_sign: | N/A | +| `formHelpText` | *string* | :heavy_minus_sign: | N/A | +| `formPlaceholder` | *string* | :heavy_minus_sign: | N/A | +| `ge` | *number* | :heavy_minus_sign: | N/A | +| `le` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldnumbertype.md b/docs/models/components/customfieldnumbertype.md new file mode 100644 index 00000000..d7462753 --- /dev/null +++ b/docs/models/components/customfieldnumbertype.md @@ -0,0 +1,15 @@ +# CustomFieldNumberType + +## Example Usage + +```typescript +import { CustomFieldNumberType } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldNumberType = "number"; +``` + +## Values + +```typescript +"number" +``` \ No newline at end of file diff --git a/docs/models/components/customfieldselect.md b/docs/models/components/customfieldselect.md new file mode 100644 index 00000000..b82a35ea --- /dev/null +++ b/docs/models/components/customfieldselect.md @@ -0,0 +1,43 @@ +# CustomFieldSelect + +Schema for a custom field of type select. + +## Example Usage + +```typescript +import { CustomFieldSelect } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldSelect = { + createdAt: new Date("2024-01-08T16:05:33.519Z"), + modifiedAt: new Date("2023-04-27T08:46:07.096Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: { + options: [ + { + value: "", + label: "", + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Creation timestamp of the object. | +| `modifiedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *string* | :heavy_check_mark: | The ID of the object. | +| `metadata` | Record | :heavy_check_mark: | N/A | +| `type` | [components.CustomFieldSelectType](../../models/components/customfieldselecttype.md) | :heavy_check_mark: | N/A | +| `slug` | *string* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *string* | :heavy_check_mark: | Name of the custom field. | +| `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the custom field. | +| `properties` | [components.CustomFieldSelectProperties](../../models/components/customfieldselectproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldselectoption.md b/docs/models/components/customfieldselectoption.md new file mode 100644 index 00000000..24f0a945 --- /dev/null +++ b/docs/models/components/customfieldselectoption.md @@ -0,0 +1,19 @@ +# CustomFieldSelectOption + +## Example Usage + +```typescript +import { CustomFieldSelectOption } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldSelectOption = { + value: "", + label: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `value` | *string* | :heavy_check_mark: | N/A | +| `label` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldselectproperties.md b/docs/models/components/customfieldselectproperties.md new file mode 100644 index 00000000..49907a3e --- /dev/null +++ b/docs/models/components/customfieldselectproperties.md @@ -0,0 +1,25 @@ +# CustomFieldSelectProperties + +## Example Usage + +```typescript +import { CustomFieldSelectProperties } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldSelectProperties = { + options: [ + { + value: "", + label: "", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `formLabel` | *string* | :heavy_minus_sign: | N/A | +| `formHelpText` | *string* | :heavy_minus_sign: | N/A | +| `formPlaceholder` | *string* | :heavy_minus_sign: | N/A | +| `options` | [components.CustomFieldSelectOption](../../models/components/customfieldselectoption.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldselecttype.md b/docs/models/components/customfieldselecttype.md new file mode 100644 index 00000000..75dec38b --- /dev/null +++ b/docs/models/components/customfieldselecttype.md @@ -0,0 +1,15 @@ +# CustomFieldSelectType + +## Example Usage + +```typescript +import { CustomFieldSelectType } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldSelectType = "select"; +``` + +## Values + +```typescript +"select" +``` \ No newline at end of file diff --git a/docs/models/components/customfieldsortproperty.md b/docs/models/components/customfieldsortproperty.md new file mode 100644 index 00000000..f112d5ed --- /dev/null +++ b/docs/models/components/customfieldsortproperty.md @@ -0,0 +1,15 @@ +# CustomFieldSortProperty + +## Example Usage + +```typescript +import { CustomFieldSortProperty } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldSortProperty = "-type"; +``` + +## Values + +```typescript +"created_at" | "-created_at" | "slug" | "-slug" | "name" | "-name" | "type" | "-type" +``` \ No newline at end of file diff --git a/docs/models/components/customfieldtext.md b/docs/models/components/customfieldtext.md new file mode 100644 index 00000000..10801ebd --- /dev/null +++ b/docs/models/components/customfieldtext.md @@ -0,0 +1,36 @@ +# CustomFieldText + +Schema for a custom field of type text. + +## Example Usage + +```typescript +import { CustomFieldText } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldText = { + createdAt: new Date("2023-09-03T17:54:18.563Z"), + modifiedAt: new Date("2023-03-12T19:27:47.119Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Creation timestamp of the object. | +| `modifiedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Last modification timestamp of the object. | +| `id` | *string* | :heavy_check_mark: | The ID of the object. | +| `metadata` | Record | :heavy_check_mark: | N/A | +| `type` | [components.CustomFieldTextType](../../models/components/customfieldtexttype.md) | :heavy_check_mark: | N/A | +| `slug` | *string* | :heavy_check_mark: | Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. | +| `name` | *string* | :heavy_check_mark: | Name of the custom field. | +| `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the custom field. | +| `properties` | [components.CustomFieldTextProperties](../../models/components/customfieldtextproperties.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldtextproperties.md b/docs/models/components/customfieldtextproperties.md new file mode 100644 index 00000000..1d23a081 --- /dev/null +++ b/docs/models/components/customfieldtextproperties.md @@ -0,0 +1,20 @@ +# CustomFieldTextProperties + +## Example Usage + +```typescript +import { CustomFieldTextProperties } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldTextProperties = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `formLabel` | *string* | :heavy_minus_sign: | N/A | +| `formHelpText` | *string* | :heavy_minus_sign: | N/A | +| `formPlaceholder` | *string* | :heavy_minus_sign: | N/A | +| `textarea` | *boolean* | :heavy_minus_sign: | N/A | +| `minLength` | *number* | :heavy_minus_sign: | N/A | +| `maxLength` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldtexttype.md b/docs/models/components/customfieldtexttype.md new file mode 100644 index 00000000..600025ce --- /dev/null +++ b/docs/models/components/customfieldtexttype.md @@ -0,0 +1,15 @@ +# CustomFieldTextType + +## Example Usage + +```typescript +import { CustomFieldTextType } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldTextType = "text"; +``` + +## Values + +```typescript +"text" +``` \ No newline at end of file diff --git a/docs/models/components/customfieldtype.md b/docs/models/components/customfieldtype.md new file mode 100644 index 00000000..bc67f437 --- /dev/null +++ b/docs/models/components/customfieldtype.md @@ -0,0 +1,15 @@ +# CustomFieldType + +## Example Usage + +```typescript +import { CustomFieldType } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldType = "date"; +``` + +## Values + +```typescript +"text" | "number" | "date" | "checkbox" | "select" +``` \ No newline at end of file diff --git a/docs/models/components/customfieldupdate.md b/docs/models/components/customfieldupdate.md new file mode 100644 index 00000000..d3f78f30 --- /dev/null +++ b/docs/models/components/customfieldupdate.md @@ -0,0 +1,35 @@ +# CustomFieldUpdate + + +## Supported Types + +### `components.CustomFieldUpdateCheckbox` + +```typescript +const value: components.CustomFieldUpdateCheckbox = {}; +``` + +### `components.CustomFieldUpdateDate` + +```typescript +const value: components.CustomFieldUpdateDate = {}; +``` + +### `components.CustomFieldUpdateNumber` + +```typescript +const value: components.CustomFieldUpdateNumber = {}; +``` + +### `components.CustomFieldUpdateSelect` + +```typescript +const value: components.CustomFieldUpdateSelect = {}; +``` + +### `components.CustomFieldUpdateText` + +```typescript +const value: components.CustomFieldUpdateText = {}; +``` + diff --git a/docs/models/components/customfieldupdatecheckbox.md b/docs/models/components/customfieldupdatecheckbox.md new file mode 100644 index 00000000..b0cef91a --- /dev/null +++ b/docs/models/components/customfieldupdatecheckbox.md @@ -0,0 +1,21 @@ +# CustomFieldUpdateCheckbox + +Schema to update a custom field of type checkbox. + +## Example Usage + +```typescript +import { CustomFieldUpdateCheckbox } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldUpdateCheckbox = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | Record | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `type` | [components.CustomFieldUpdateCheckboxType](../../models/components/customfieldupdatecheckboxtype.md) | :heavy_check_mark: | N/A | +| `properties` | [components.CustomFieldCheckboxProperties](../../models/components/customfieldcheckboxproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldupdatecheckboxtype.md b/docs/models/components/customfieldupdatecheckboxtype.md new file mode 100644 index 00000000..023767b0 --- /dev/null +++ b/docs/models/components/customfieldupdatecheckboxtype.md @@ -0,0 +1,15 @@ +# CustomFieldUpdateCheckboxType + +## Example Usage + +```typescript +import { CustomFieldUpdateCheckboxType } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldUpdateCheckboxType = "checkbox"; +``` + +## Values + +```typescript +"checkbox" +``` \ No newline at end of file diff --git a/docs/models/components/customfieldupdatedate.md b/docs/models/components/customfieldupdatedate.md new file mode 100644 index 00000000..c4040248 --- /dev/null +++ b/docs/models/components/customfieldupdatedate.md @@ -0,0 +1,21 @@ +# CustomFieldUpdateDate + +Schema to update a custom field of type date. + +## Example Usage + +```typescript +import { CustomFieldUpdateDate } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldUpdateDate = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | Record | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `type` | [components.CustomFieldUpdateDateType](../../models/components/customfieldupdatedatetype.md) | :heavy_check_mark: | N/A | +| `properties` | [components.CustomFieldDateProperties](../../models/components/customfielddateproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldupdatedatetype.md b/docs/models/components/customfieldupdatedatetype.md new file mode 100644 index 00000000..ec048ccc --- /dev/null +++ b/docs/models/components/customfieldupdatedatetype.md @@ -0,0 +1,15 @@ +# CustomFieldUpdateDateType + +## Example Usage + +```typescript +import { CustomFieldUpdateDateType } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldUpdateDateType = "date"; +``` + +## Values + +```typescript +"date" +``` \ No newline at end of file diff --git a/docs/models/components/customfieldupdatenumber.md b/docs/models/components/customfieldupdatenumber.md new file mode 100644 index 00000000..ee790a24 --- /dev/null +++ b/docs/models/components/customfieldupdatenumber.md @@ -0,0 +1,21 @@ +# CustomFieldUpdateNumber + +Schema to update a custom field of type number. + +## Example Usage + +```typescript +import { CustomFieldUpdateNumber } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldUpdateNumber = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | Record | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `type` | [components.CustomFieldUpdateNumberType](../../models/components/customfieldupdatenumbertype.md) | :heavy_check_mark: | N/A | +| `properties` | [components.CustomFieldNumberProperties](../../models/components/customfieldnumberproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldupdatenumbertype.md b/docs/models/components/customfieldupdatenumbertype.md new file mode 100644 index 00000000..6c4a7ccd --- /dev/null +++ b/docs/models/components/customfieldupdatenumbertype.md @@ -0,0 +1,15 @@ +# CustomFieldUpdateNumberType + +## Example Usage + +```typescript +import { CustomFieldUpdateNumberType } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldUpdateNumberType = "number"; +``` + +## Values + +```typescript +"number" +``` \ No newline at end of file diff --git a/docs/models/components/customfieldupdateselect.md b/docs/models/components/customfieldupdateselect.md new file mode 100644 index 00000000..94b0c3f8 --- /dev/null +++ b/docs/models/components/customfieldupdateselect.md @@ -0,0 +1,21 @@ +# CustomFieldUpdateSelect + +Schema to update a custom field of type select. + +## Example Usage + +```typescript +import { CustomFieldUpdateSelect } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldUpdateSelect = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | Record | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `type` | [components.CustomFieldUpdateSelectType](../../models/components/customfieldupdateselecttype.md) | :heavy_check_mark: | N/A | +| `properties` | [components.CustomFieldSelectProperties](../../models/components/customfieldselectproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldupdateselecttype.md b/docs/models/components/customfieldupdateselecttype.md new file mode 100644 index 00000000..840ceeeb --- /dev/null +++ b/docs/models/components/customfieldupdateselecttype.md @@ -0,0 +1,15 @@ +# CustomFieldUpdateSelectType + +## Example Usage + +```typescript +import { CustomFieldUpdateSelectType } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldUpdateSelectType = "select"; +``` + +## Values + +```typescript +"select" +``` \ No newline at end of file diff --git a/docs/models/components/customfieldupdatetext.md b/docs/models/components/customfieldupdatetext.md new file mode 100644 index 00000000..29c78a34 --- /dev/null +++ b/docs/models/components/customfieldupdatetext.md @@ -0,0 +1,21 @@ +# CustomFieldUpdateText + +Schema to update a custom field of type text. + +## Example Usage + +```typescript +import { CustomFieldUpdateText } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldUpdateText = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `metadata` | Record | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `type` | [components.CustomFieldUpdateTextType](../../models/components/customfieldupdatetexttype.md) | :heavy_check_mark: | N/A | +| `properties` | [components.CustomFieldTextProperties](../../models/components/customfieldtextproperties.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/customfieldupdatetexttype.md b/docs/models/components/customfieldupdatetexttype.md new file mode 100644 index 00000000..de2586e6 --- /dev/null +++ b/docs/models/components/customfieldupdatetexttype.md @@ -0,0 +1,15 @@ +# CustomFieldUpdateTextType + +## Example Usage + +```typescript +import { CustomFieldUpdateTextType } from "@polar-sh/sdk/models/components"; + +let value: CustomFieldUpdateTextType = "text"; +``` + +## Values + +```typescript +"text" +``` \ No newline at end of file diff --git a/docs/models/components/donation.md b/docs/models/components/donation.md index ef96efa0..28913cee 100644 --- a/docs/models/components/donation.md +++ b/docs/models/components/donation.md @@ -6,51 +6,70 @@ import { Donation } from "@polar-sh/sdk/models/components"; let value: Donation = { - createdAt: new Date("2022-09-07T18:02:16.007Z"), - modifiedAt: new Date("2022-07-08T02:37:07.585Z"), + createdAt: new Date("2024-11-17T07:20:20.409Z"), + modifiedAt: new Date("2024-10-12T09:58:31.166Z"), id: "", - amount: 513511, - currency: "CFA Franc BCEAO", + amount: 969138, + currency: "Mauritius Rupee", message: "", donor: { id: "", name: "", - avatarUrl: "https://gleaming-disconnection.net", + avatarUrl: "https://descriptive-coordination.org/", isPersonal: false, }, - email: "Adonis.Lemke@hotmail.com", + email: "Genesis_Bashirian@gmail.com", issue: { - id: "86772c48-4ddf-45ed-892b-fd107ebfaec8", - number: 130833, + id: "2f681442-e30f-4fbd-b21d-55bc91501b42", + number: 820355, title: "", state: "closed", - issueCreatedAt: new Date("2023-02-09T20:00:38.933Z"), + issueCreatedAt: new Date("2022-12-23T20:27:41.424Z"), needsConfirmationSolved: false, funding: {}, repository: { - id: "94eefe99-f5a7-45e9-8702-8f7ade52f8e4", + id: "2ded418c-fe00-4a29-90b6-cb781aad03a8", isPrivate: false, name: "MyOrg", - description: - "emotional guilt wheel mmm neaten inasmuch fedora furthermore hence consequently", + description: "once any lest", stars: 1337, license: "", homepage: "", profileSettings: {}, organization: { - id: "dcba3a1d-37ec-4078-9d91-6af6f876966f", + id: "b681b8fd-55a7-48f1-89a3-9c4f27b78705", name: "", - avatarUrl: "https://meaty-density.org", + avatarUrl: "https://lively-hamburger.net", isPersonal: false, bio: "", prettyName: "", - company: "Conroy, Torp and Donnelly", + company: "Jerde Group", blog: "", location: "", - email: "Tomasa67@yahoo.com", + email: "Claudine.Thompson43@yahoo.com", twitterUsername: "", organizationId: "", }, + internalOrganization: { + createdAt: new Date("2024-09-06T20:33:57.388Z"), + modifiedAt: new Date("2022-03-29T04:02:08.271Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://winding-tinderbox.com", + bio: "", + company: "Breitenberg - Jakubowski", + blog: "", + location: "", + email: "Caterina.Heller29@yahoo.com", + twitterUsername: "", + pledgeMinimumAmount: 419990, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 410248, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, }, pledgeBadgeCurrentlyEmbedded: false, }, diff --git a/docs/models/components/donationorganization.md b/docs/models/components/donationorganization.md index 46c8fa24..c79c2c73 100644 --- a/docs/models/components/donationorganization.md +++ b/docs/models/components/donationorganization.md @@ -8,7 +8,7 @@ import { DonationOrganization } from "@polar-sh/sdk/models/components"; let value: DonationOrganization = { id: "", name: "", - avatarUrl: "https://fluffy-conversation.name", + avatarUrl: "https://scaly-cannon.com", isPersonal: false, }; ``` diff --git a/docs/models/components/donationuser.md b/docs/models/components/donationuser.md index 73ab1ae7..995ee7d9 100644 --- a/docs/models/components/donationuser.md +++ b/docs/models/components/donationuser.md @@ -8,7 +8,7 @@ import { DonationUser } from "@polar-sh/sdk/models/components"; let value: DonationUser = { id: "", publicName: "", - avatarUrl: "https://damp-ceramic.net/", + avatarUrl: "https://bustling-coil.com/", }; ``` diff --git a/docs/models/components/donor.md b/docs/models/components/donor.md index 1b04577b..6571c990 100644 --- a/docs/models/components/donor.md +++ b/docs/models/components/donor.md @@ -9,7 +9,7 @@ const value: components.DonationOrganization = { id: "", name: "", - avatarUrl: "https://youthful-coin.org", + avatarUrl: "https://subdued-inspection.com/", isPersonal: false, }; ``` @@ -20,7 +20,7 @@ const value: components.DonationOrganization = { const value: components.DonationUser = { id: "", publicName: "", - avatarUrl: "https://red-pile.org/", + avatarUrl: "https://hollow-blowgun.info/", }; ``` diff --git a/docs/models/components/downloadablefilecreate.md b/docs/models/components/downloadablefilecreate.md index 33e789c8..6a953209 100644 --- a/docs/models/components/downloadablefilecreate.md +++ b/docs/models/components/downloadablefilecreate.md @@ -10,13 +10,13 @@ import { DownloadableFileCreate } from "@polar-sh/sdk/models/components"; let value: DownloadableFileCreate = { name: "", mimeType: "", - size: 574923, + size: 735432, upload: { parts: [ { - number: 138094, - chunkStart: 306970, - chunkEnd: 552212, + number: 628062, + chunkStart: 306, + chunkEnd: 16877, }, ], }, diff --git a/docs/models/components/downloadablefileread.md b/docs/models/components/downloadablefileread.md index 25c6d681..a3dc7168 100644 --- a/docs/models/components/downloadablefileread.md +++ b/docs/models/components/downloadablefileread.md @@ -11,17 +11,17 @@ let value: DownloadableFileRead = { id: "", organizationId: "", name: "", - path: "/Users", + path: "/usr/ports", mimeType: "", - size: 498291, + size: 973257, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2024-03-06T13:27:13.872Z"), + lastModifiedAt: new Date("2024-02-08T08:31:50.784Z"), version: "", isUploaded: false, - createdAt: new Date("2022-01-29T12:41:56.507Z"), + createdAt: new Date("2023-10-24T19:46:51.933Z"), sizeReadable: "", }; ``` diff --git a/docs/models/components/downloadableread.md b/docs/models/components/downloadableread.md index 10fe4c23..967f87ed 100644 --- a/docs/models/components/downloadableread.md +++ b/docs/models/components/downloadableread.md @@ -12,21 +12,21 @@ let value: DownloadableRead = { id: "", organizationId: "", name: "", - path: "/Network", + path: "/srv", mimeType: "", - size: 979244, + size: 226197, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2024-07-20T09:36:10.465Z"), + lastModifiedAt: new Date("2023-03-29T18:58:48.505Z"), download: { - url: "https://only-emergent.biz", - expiresAt: new Date("2023-08-02T13:08:34.793Z"), + url: "https://slimy-hose.net/", + expiresAt: new Date("2024-05-15T22:14:57.410Z"), }, version: "", isUploaded: false, - service: "organization_avatar", + service: "product_media", sizeReadable: "", }, }; diff --git a/docs/models/components/externalorganization.md b/docs/models/components/externalorganization.md index 8152d199..4c29452f 100644 --- a/docs/models/components/externalorganization.md +++ b/docs/models/components/externalorganization.md @@ -6,16 +6,16 @@ import { ExternalOrganization } from "@polar-sh/sdk/models/components"; let value: ExternalOrganization = { - id: "66c001a6-d47b-4852-a82f-82b1c720f4f8", + id: "a288e712-4c49-4139-a1b7-4da1a3e293f5", name: "", - avatarUrl: "https://weird-reach.name/", + avatarUrl: "https://lone-nucleotidase.net/", isPersonal: false, bio: "", prettyName: "", - company: "Dare - Kemmer", + company: "Prosacco and Sons", blog: "", location: "", - email: "Keaton_Bauch2@yahoo.com", + email: "Eusebio73@gmail.com", twitterUsername: "", organizationId: "", }; diff --git a/docs/models/components/filedownload.md b/docs/models/components/filedownload.md index d2f2c5aa..4e83a411 100644 --- a/docs/models/components/filedownload.md +++ b/docs/models/components/filedownload.md @@ -9,17 +9,17 @@ let value: FileDownload = { id: "", organizationId: "", name: "", - path: "/usr/lib", + path: "/opt/share", mimeType: "", - size: 170383, + size: 520716, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2023-08-11T07:59:51.924Z"), + lastModifiedAt: new Date("2022-01-04T20:20:43.255Z"), download: { - url: "https://dual-marketplace.biz/", - expiresAt: new Date("2023-08-10T10:04:30.253Z"), + url: "https://these-rim.com/", + expiresAt: new Date("2023-11-27T20:20:53.456Z"), }, version: "", isUploaded: false, diff --git a/docs/models/components/fileread.md b/docs/models/components/fileread.md index 30a289cc..db5bdb4a 100644 --- a/docs/models/components/fileread.md +++ b/docs/models/components/fileread.md @@ -10,17 +10,17 @@ const value: components.DownloadableFileRead = { id: "", organizationId: "", name: "", - path: "/usr/ports", + path: "/var/log", mimeType: "", - size: 391517, + size: 806335, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2024-10-24T11:05:44.448Z"), + lastModifiedAt: new Date("2024-07-17T21:53:55.767Z"), version: "", isUploaded: false, - createdAt: new Date("2024-08-17T04:21:09.664Z"), + createdAt: new Date("2024-09-10T10:14:58.997Z"), sizeReadable: "", }; ``` @@ -32,19 +32,19 @@ const value: components.OrganizationAvatarFileRead = { id: "", organizationId: "", name: "", - path: "/usr/bin", + path: "/home/user", mimeType: "", - size: 936960, + size: 342554, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2023-05-22T15:27:54.009Z"), + lastModifiedAt: new Date("2024-09-12T17:07:56.815Z"), version: "", isUploaded: false, - createdAt: new Date("2024-02-21T17:29:30.928Z"), + createdAt: new Date("2022-06-13T12:56:45.154Z"), sizeReadable: "", - publicUrl: "https://oddball-puritan.info/", + publicUrl: "https://caring-circumference.name/", }; ``` @@ -55,19 +55,19 @@ const value: components.ProductMediaFileRead = { id: "", organizationId: "", name: "", - path: "/usr/share", + path: "/opt/include", mimeType: "", - size: 485068, + size: 423692, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2022-11-06T16:13:51.110Z"), + lastModifiedAt: new Date("2023-07-11T21:53:22.945Z"), version: "", isUploaded: false, - createdAt: new Date("2023-08-26T04:36:07.058Z"), + createdAt: new Date("2023-12-26T03:47:13.190Z"), sizeReadable: "", - publicUrl: "https://rewarding-unit.info", + publicUrl: "https://grouchy-cornet.info/", }; ``` diff --git a/docs/models/components/fileservicetypes.md b/docs/models/components/fileservicetypes.md index a4f5674e..bc4a73d3 100644 --- a/docs/models/components/fileservicetypes.md +++ b/docs/models/components/fileservicetypes.md @@ -5,7 +5,7 @@ ```typescript import { FileServiceTypes } from "@polar-sh/sdk/models/components"; -let value: FileServiceTypes = "organization_avatar"; +let value: FileServiceTypes = "product_media"; ``` ## Values diff --git a/docs/models/components/fileupload.md b/docs/models/components/fileupload.md index 0c405707..ad6f355b 100644 --- a/docs/models/components/fileupload.md +++ b/docs/models/components/fileupload.md @@ -9,29 +9,29 @@ let value: FileUpload = { id: "", organizationId: "", name: "", - path: "/usr/libdata", + path: "/opt/lib", mimeType: "", - size: 55526, + size: 64760, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2022-09-15T08:56:21.615Z"), + lastModifiedAt: new Date("2023-01-31T14:30:14.581Z"), upload: { id: "", - path: "/usr/obj", + path: "/etc/mail", parts: [ { - number: 45641, - chunkStart: 787613, - chunkEnd: 111765, - url: "https://spiffy-dandelion.info", - expiresAt: new Date("2023-05-17T23:21:07.043Z"), + number: 37360, + chunkStart: 683453, + chunkEnd: 24684, + url: "https://instructive-cemetery.info/", + expiresAt: new Date("2023-02-06T04:10:00.114Z"), }, ], }, version: "", - service: "product_media", + service: "downloadable", sizeReadable: "", }; ``` diff --git a/docs/models/components/fileuploadcompleted.md b/docs/models/components/fileuploadcompleted.md index 39f1a48c..d1da26b4 100644 --- a/docs/models/components/fileuploadcompleted.md +++ b/docs/models/components/fileuploadcompleted.md @@ -7,10 +7,10 @@ import { FileUploadCompleted } from "@polar-sh/sdk/models/components"; let value: FileUploadCompleted = { id: "", - path: "/Library", + path: "/dev", parts: [ { - number: 997814, + number: 467579, checksumEtag: "", checksumSha256Base64: "", }, diff --git a/docs/models/components/interval.md b/docs/models/components/interval.md index cc0daf08..9cdaa4b2 100644 --- a/docs/models/components/interval.md +++ b/docs/models/components/interval.md @@ -5,7 +5,7 @@ ```typescript import { Interval } from "@polar-sh/sdk/models/components"; -let value: Interval = "day"; +let value: Interval = "week"; ``` ## Values diff --git a/docs/models/components/introspecttokenresponse.md b/docs/models/components/introspecttokenresponse.md index 0d5e2b54..58482183 100644 --- a/docs/models/components/introspecttokenresponse.md +++ b/docs/models/components/introspecttokenresponse.md @@ -10,12 +10,12 @@ let value: IntrospectTokenResponse = { clientId: "", tokenType: "refresh_token", scope: "", - subType: "user", + subType: "organization", sub: "", aud: "", iss: "", - exp: 948639, - iat: 910767, + exp: 663724, + iat: 767479, }; ``` diff --git a/docs/models/components/introspecttokenresponsetokentype.md b/docs/models/components/introspecttokenresponsetokentype.md index eb4c04a2..56c8f0eb 100644 --- a/docs/models/components/introspecttokenresponsetokentype.md +++ b/docs/models/components/introspecttokenresponsetokentype.md @@ -5,7 +5,7 @@ ```typescript import { IntrospectTokenResponseTokenType } from "@polar-sh/sdk/models/components"; -let value: IntrospectTokenResponseTokenType = "access_token"; +let value: IntrospectTokenResponseTokenType = "refresh_token"; ``` ## Values diff --git a/docs/models/components/issue.md b/docs/models/components/issue.md index 6cedd678..910fc4ab 100644 --- a/docs/models/components/issue.md +++ b/docs/models/components/issue.md @@ -6,37 +6,57 @@ import { Issue } from "@polar-sh/sdk/models/components"; let value: Issue = { - id: "251f3eaf-ee9f-427c-97fb-3ce8f8c53c34", - number: 624507, + id: "c5b133a3-44ff-4d77-9572-42eb2650b752", + number: 271639, title: "", - state: "open", - issueCreatedAt: new Date("2022-12-18T17:37:05.328Z"), + state: "closed", + issueCreatedAt: new Date("2022-10-02T10:20:48.033Z"), needsConfirmationSolved: false, funding: {}, repository: { - id: "77057379-dc42-406d-a248-980ce42cbce0", + id: "469d45af-33dc-4506-a8ca-acc71d90c658", isPrivate: false, name: "MyOrg", description: - "always before blacken mystify violin intellect questionable blah yearningly", + "sans fluctuate mortally so shirk via big minister pinstripe apologise", stars: 1337, license: "", homepage: "", profileSettings: {}, organization: { - id: "a46ee120-65a2-4c91-9edc-793cbcfee6cf", + id: "514e3c65-d6f3-4e48-8105-2730b52f79f1", name: "", - avatarUrl: "https://excited-editor.info", + avatarUrl: "https://noteworthy-heartache.com", isPersonal: false, bio: "", prettyName: "", - company: "Prohaska Group", + company: "Kiehn LLC", blog: "", location: "", - email: "Bridgette34@hotmail.com", + email: "Grover_Douglas82@gmail.com", twitterUsername: "", organizationId: "", }, + internalOrganization: { + createdAt: new Date("2023-06-16T23:24:38.141Z"), + modifiedAt: new Date("2024-04-04T07:16:34.900Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://yellowish-backbone.com", + bio: "", + company: "Abshire - Leannon", + blog: "", + location: "", + email: "Heather_Terry26@yahoo.com", + twitterUsername: "", + pledgeMinimumAmount: 200824, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 264643, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, }, pledgeBadgeCurrentlyEmbedded: false, }; diff --git a/docs/models/components/label.md b/docs/models/components/label.md index ab0086e4..81f59d5c 100644 --- a/docs/models/components/label.md +++ b/docs/models/components/label.md @@ -7,7 +7,7 @@ import { Label } from "@polar-sh/sdk/models/components"; let value: Label = { name: "", - color: "lavender", + color: "violet", }; ``` diff --git a/docs/models/components/licensekeyactivationbase.md b/docs/models/components/licensekeyactivationbase.md index ab819836..c329b115 100644 --- a/docs/models/components/licensekeyactivationbase.md +++ b/docs/models/components/licensekeyactivationbase.md @@ -10,8 +10,8 @@ let value: LicenseKeyActivationBase = { licenseKeyId: "", label: "", meta: {}, - createdAt: new Date("2022-01-01T01:54:20.575Z"), - modifiedAt: new Date("2024-08-22T19:59:17.126Z"), + createdAt: new Date("2023-02-23T01:55:52.356Z"), + modifiedAt: new Date("2024-10-13T01:07:10.723Z"), }; ``` diff --git a/docs/models/components/licensekeyactivationread.md b/docs/models/components/licensekeyactivationread.md index cdb1bc78..c6c360e0 100644 --- a/docs/models/components/licensekeyactivationread.md +++ b/docs/models/components/licensekeyactivationread.md @@ -10,8 +10,8 @@ let value: LicenseKeyActivationRead = { licenseKeyId: "", label: "", meta: {}, - createdAt: new Date("2022-09-29T20:36:38.362Z"), - modifiedAt: new Date("2022-12-30T09:36:43.666Z"), + createdAt: new Date("2023-11-23T12:59:59.189Z"), + modifiedAt: new Date("2022-02-05T23:54:40.915Z"), licenseKey: { id: "", organizationId: "", @@ -19,19 +19,19 @@ let value: LicenseKeyActivationRead = { user: { id: "", publicName: "", - email: "Grayce84@yahoo.com", - avatarUrl: "https://pleasant-hyphenation.com", + email: "Nayeli84@gmail.com", + avatarUrl: "https://moral-insolence.biz", }, benefitId: "", key: "", displayKey: "", - status: "granted", - limitActivations: 63697, - usage: 437785, - limitUsage: 849486, - validations: 596802, - lastValidatedAt: new Date("2024-01-11T09:12:34.074Z"), - expiresAt: new Date("2022-07-26T01:21:42.082Z"), + status: "disabled", + limitActivations: 799857, + usage: 863575, + limitUsage: 225945, + validations: 97903, + lastValidatedAt: new Date("2024-02-05T11:53:56.680Z"), + expiresAt: new Date("2024-09-27T19:31:42.820Z"), }, }; ``` diff --git a/docs/models/components/licensekeyread.md b/docs/models/components/licensekeyread.md index 4d2aaaf5..696c9827 100644 --- a/docs/models/components/licensekeyread.md +++ b/docs/models/components/licensekeyread.md @@ -12,19 +12,19 @@ let value: LicenseKeyRead = { user: { id: "", publicName: "", - email: "Eli51@gmail.com", - avatarUrl: "https://deep-dash.org", + email: "Tyreek_Tillman@yahoo.com", + avatarUrl: "https://oblong-director.name", }, benefitId: "", key: "", displayKey: "", - status: "revoked", - limitActivations: 447640, - usage: 391136, - limitUsage: 52029, - validations: 704574, - lastValidatedAt: new Date("2023-08-15T22:06:31.036Z"), - expiresAt: new Date("2024-01-12T01:11:19.363Z"), + status: "granted", + limitActivations: 240669, + usage: 129141, + limitUsage: 689309, + validations: 781044, + lastValidatedAt: new Date("2022-12-21T16:17:21.610Z"), + expiresAt: new Date("2023-03-25T14:08:20.769Z"), }; ``` diff --git a/docs/models/components/licensekeystatus.md b/docs/models/components/licensekeystatus.md index 104dfebf..d92e800d 100644 --- a/docs/models/components/licensekeystatus.md +++ b/docs/models/components/licensekeystatus.md @@ -5,7 +5,7 @@ ```typescript import { LicenseKeyStatus } from "@polar-sh/sdk/models/components"; -let value: LicenseKeyStatus = "granted"; +let value: LicenseKeyStatus = "disabled"; ``` ## Values diff --git a/docs/models/components/licensekeyuser.md b/docs/models/components/licensekeyuser.md index 4b8fc060..c1bf8fad 100644 --- a/docs/models/components/licensekeyuser.md +++ b/docs/models/components/licensekeyuser.md @@ -8,8 +8,8 @@ import { LicenseKeyUser } from "@polar-sh/sdk/models/components"; let value: LicenseKeyUser = { id: "", publicName: "", - email: "Claudine_OKeefe@yahoo.com", - avatarUrl: "https://cautious-intervention.com/", + email: "Estefania4@gmail.com", + avatarUrl: "https://outstanding-vanadyl.com", }; ``` diff --git a/docs/models/components/licensekeywithactivations.md b/docs/models/components/licensekeywithactivations.md index 8dce8b6e..c34ccf00 100644 --- a/docs/models/components/licensekeywithactivations.md +++ b/docs/models/components/licensekeywithactivations.md @@ -12,27 +12,27 @@ let value: LicenseKeyWithActivations = { user: { id: "", publicName: "", - email: "Moriah18@yahoo.com", - avatarUrl: "https://sorrowful-backbone.name", + email: "Darby_McClure@gmail.com", + avatarUrl: "https://lean-skeleton.com", }, benefitId: "", key: "", displayKey: "", status: "granted", - limitActivations: 119685, - usage: 781613, - limitUsage: 211581, - validations: 500812, - lastValidatedAt: new Date("2023-07-31T14:26:18.054Z"), - expiresAt: new Date("2022-08-22T18:10:11.403Z"), + limitActivations: 735397, + usage: 621354, + limitUsage: 443153, + validations: 668914, + lastValidatedAt: new Date("2024-04-24T23:33:00.904Z"), + expiresAt: new Date("2024-09-10T16:04:08.718Z"), activations: [ { id: "", licenseKeyId: "", label: "", meta: {}, - createdAt: new Date("2023-06-24T12:26:15.788Z"), - modifiedAt: new Date("2022-02-27T21:22:28.511Z"), + createdAt: new Date("2023-04-28T15:06:03.138Z"), + modifiedAt: new Date("2023-12-06T07:12:19.848Z"), }, ], }; diff --git a/docs/models/components/listresource.md b/docs/models/components/listresource.md new file mode 100644 index 00000000..275f792c --- /dev/null +++ b/docs/models/components/listresource.md @@ -0,0 +1,35 @@ +# ListResource + +## Example Usage + +```typescript +import { ListResource } from "@polar-sh/sdk/models/components"; + +let value: ListResource = { + items: [ + { + createdAt: new Date("2022-12-11T12:45:41.520Z"), + modifiedAt: new Date("2023-01-20T02:46:22.982Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + ], + pagination: { + totalCount: 493438, + maxPage: 706735, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `items` | *components.CustomField*[] | :heavy_check_mark: | N/A | +| `pagination` | [components.Pagination](../../models/components/pagination.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/listresourcearticle.md b/docs/models/components/listresourcearticle.md index 41ed8498..d4fcceb7 100644 --- a/docs/models/components/listresourcearticle.md +++ b/docs/models/components/listresourcearticle.md @@ -14,46 +14,46 @@ let value: ListResourceArticle = { body: "", byline: { name: "", - avatarUrl: "https://possible-trick.info/", + avatarUrl: "https://unwieldy-cake.biz/", }, visibility: "private", userId: "", organizationId: "", organization: { - createdAt: new Date("2023-10-18T06:30:37.569Z"), - modifiedAt: new Date("2022-08-20T12:38:00.388Z"), + createdAt: new Date("2022-10-06T03:14:11.675Z"), + modifiedAt: new Date("2022-06-30T09:23:23.018Z"), id: "", name: "", slug: "", - avatarUrl: "https://profitable-piglet.name", + avatarUrl: "https://black-worth.org", bio: "", - company: "Durgan - Flatley", + company: "Murphy, Fahey and Schmeler", blog: "", location: "", - email: "Jessyca_Schmidt@hotmail.com", + email: "Kristofer.Rohan@gmail.com", twitterUsername: "", - pledgeMinimumAmount: 536263, + pledgeMinimumAmount: 152359, pledgeBadgeShowAmount: false, - defaultUpfrontSplitToContributors: 149578, + defaultUpfrontSplitToContributors: 414720, donationsEnabled: false, profileSettings: {}, featureSettings: {}, }, - publishedAt: new Date("2024-05-11T22:39:45.015Z"), + publishedAt: new Date("2024-09-24T21:12:18.195Z"), paidSubscribersOnly: false, - paidSubscribersOnlyEndsAt: new Date("2024-09-27T09:13:08.294Z"), + paidSubscribersOnlyEndsAt: new Date("2023-05-29T14:57:16.680Z"), isPreview: false, isPinned: false, notifySubscribers: false, - notificationsSentAt: new Date("2024-06-09T08:26:59.670Z"), - emailSentToCount: 821896, - ogImageUrl: "https://defensive-yeast.name", + notificationsSentAt: new Date("2022-10-03T22:43:14.073Z"), + emailSentToCount: 532335, + ogImageUrl: "https://free-scenario.name/", ogDescription: "", }, ], pagination: { - totalCount: 420927, - maxPage: 888024, + totalCount: 23984, + maxPage: 569876, }, }; ``` diff --git a/docs/models/components/listresourcebenefit.md b/docs/models/components/listresourcebenefit.md index db5846b3..5b42e1e4 100644 --- a/docs/models/components/listresourcebenefit.md +++ b/docs/models/components/listresourcebenefit.md @@ -8,11 +8,10 @@ import { ListResourceBenefit } from "@polar-sh/sdk/models/components"; let value: ListResourceBenefit = { items: [ { - createdAt: new Date("2022-11-02T05:56:05.835Z"), - modifiedAt: new Date("2022-11-12T16:15:27.788Z"), + createdAt: new Date("2022-10-22T21:26:13.900Z"), + modifiedAt: new Date("2022-07-28T00:35:58.416Z"), id: "", - description: - "idealistic equally service amidst vainly meh our courteous mid", + description: "yippee carefully shadowy lobster including", selectable: false, deletable: false, organizationId: "", @@ -20,8 +19,8 @@ let value: ListResourceBenefit = { }, ], pagination: { - totalCount: 854650, - maxPage: 418232, + totalCount: 346632, + maxPage: 199238, }, }; ``` diff --git a/docs/models/components/listresourcebenefitgrant.md b/docs/models/components/listresourcebenefitgrant.md index 476e8c12..d63d41f5 100644 --- a/docs/models/components/listresourcebenefitgrant.md +++ b/docs/models/components/listresourcebenefitgrant.md @@ -8,8 +8,8 @@ import { ListResourceBenefitGrant } from "@polar-sh/sdk/models/components"; let value: ListResourceBenefitGrant = { items: [ { - createdAt: new Date("2022-08-14T23:12:59.369Z"), - modifiedAt: new Date("2024-10-03T19:13:09.978Z"), + createdAt: new Date("2022-07-21T01:23:23.506Z"), + modifiedAt: new Date("2022-04-20T16:04:19.195Z"), id: "", isGranted: false, isRevoked: false, @@ -21,8 +21,8 @@ let value: ListResourceBenefitGrant = { }, ], pagination: { - totalCount: 337073, - maxPage: 690050, + totalCount: 322574, + maxPage: 78738, }, }; ``` diff --git a/docs/models/components/listresourcecheckout.md b/docs/models/components/listresourcecheckout.md index a6188a24..e3faf6a1 100644 --- a/docs/models/components/listresourcecheckout.md +++ b/docs/models/components/listresourcecheckout.md @@ -8,28 +8,28 @@ import { ListResourceCheckout } from "@polar-sh/sdk/models/components"; let value: ListResourceCheckout = { items: [ { - createdAt: new Date("2023-02-16T01:56:17.223Z"), - modifiedAt: new Date("2024-09-26T12:45:07.280Z"), + createdAt: new Date("2023-01-13T06:58:49.050Z"), + modifiedAt: new Date("2022-10-26T18:02:39.058Z"), id: "", - status: "open", + status: "expired", clientSecret: "", - url: "https://bustling-shark.biz/", - expiresAt: new Date("2024-03-25T03:51:27.034Z"), - successUrl: "https://sweet-yarmulke.com", + url: "https://supportive-programme.net/", + expiresAt: new Date("2024-10-10T22:47:15.949Z"), + successUrl: "https://white-unique.biz", embedOrigin: "", - amount: 150417, - taxAmount: 636216, - currency: "Kwanza", - totalAmount: 817418, + amount: 392307, + taxAmount: 575206, + currency: "Guarani", + totalAmount: 464706, productId: "", productPriceId: "", isPaymentRequired: false, customerId: "", customerName: "", - customerEmail: "Grayson20@yahoo.com", + customerEmail: "Lonzo31@hotmail.com", customerIpAddress: "", customerBillingAddress: { - country: "Saint Vincent and the Grenadines", + country: "Bangladesh", }, customerTaxId: "", paymentProcessorMetadata: {}, @@ -37,39 +37,39 @@ let value: ListResourceCheckout = { "key": "", }, product: { - createdAt: new Date("2023-10-29T11:31:56.911Z"), - modifiedAt: new Date("2022-09-16T16:37:59.200Z"), + createdAt: new Date("2024-11-18T10:26:54.805Z"), + modifiedAt: new Date("2023-06-07T21:49:43.015Z"), id: "", name: "", - description: - "widow consequently even because agreeable worth geez during", + description: "before bashfully able whenever since coordinated", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2023-02-19T03:41:15.084Z"), - modifiedAt: new Date("2023-12-03T01:24:28.573Z"), + createdAt: new Date("2023-09-10T05:55:09.703Z"), + modifiedAt: new Date("2023-01-05T14:54:34.065Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - minimumAmount: 776155, - maximumAmount: 84703, - presetAmount: 382479, - recurringInterval: "year", + minimumAmount: 160733, + maximumAmount: 173052, + presetAmount: 57599, }, ], benefits: [ { - createdAt: new Date("2023-05-18T23:11:42.440Z"), - modifiedAt: new Date("2023-05-29T22:11:49.046Z"), + createdAt: new Date("2024-03-26T08:49:10.019Z"), + modifiedAt: new Date("2024-07-27T23:23:21.475Z"), id: "", - type: "downloadables", - description: "blah boo daily ugh youthfully", + description: "gee from translation onset serene where before soon", selectable: false, deletable: false, organizationId: "", + properties: { + paidArticles: false, + }, }, ], medias: [ @@ -77,35 +77,59 @@ let value: ListResourceCheckout = { id: "", organizationId: "", name: "", - path: "/private/tmp", + path: "/dev", mimeType: "", - size: 726243, + size: 894398, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2022-04-16T16:09:45.798Z"), + lastModifiedAt: new Date("2022-08-29T00:14:02.289Z"), version: "", isUploaded: false, - createdAt: new Date("2023-07-08T09:44:17.770Z"), + createdAt: new Date("2024-02-26T22:59:52.460Z"), sizeReadable: "", - publicUrl: "https://clumsy-footrest.org", + publicUrl: "https://unknown-crocodile.net", }, ], }, productPrice: { - createdAt: new Date("2024-08-20T14:30:30.151Z"), - modifiedAt: new Date("2022-12-07T01:45:08.619Z"), + createdAt: new Date("2023-07-12T02:38:25.234Z"), + modifiedAt: new Date("2022-05-24T18:23:37.331Z"), id: "", isArchived: false, productId: "", + priceCurrency: "", + minimumAmount: 358724, + maximumAmount: 940490, + presetAmount: 180628, + recurringInterval: "month", }, subscriptionId: "", + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2022-10-01T23:26:22.306Z"), + modifiedAt: new Date("2022-06-30T14:38:50.223Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 190514, + required: false, + }, + ], }, ], pagination: { - totalCount: 789945, - maxPage: 96538, + totalCount: 985677, + maxPage: 413308, }, }; ``` diff --git a/docs/models/components/listresourcecheckoutlink.md b/docs/models/components/listresourcecheckoutlink.md index 6df828e2..37b16727 100644 --- a/docs/models/components/listresourcecheckoutlink.md +++ b/docs/models/components/listresourcecheckoutlink.md @@ -8,28 +8,30 @@ import { ListResourceCheckoutLink } from "@polar-sh/sdk/models/components"; let value: ListResourceCheckoutLink = { items: [ { - createdAt: new Date("2022-06-22T21:29:53.700Z"), - modifiedAt: new Date("2022-03-20T13:14:56.817Z"), + createdAt: new Date("2024-02-16T00:15:32.715Z"), + modifiedAt: new Date("2024-01-10T10:45:06.401Z"), id: "", metadata: { "key": "", }, clientSecret: "", - successUrl: "https://boiling-instructor.name", + successUrl: "https://scientific-tentacle.net/", productPriceId: "", productPrice: { - createdAt: new Date("2023-10-28T18:33:39.178Z"), - modifiedAt: new Date("2023-07-05T23:21:00.370Z"), + createdAt: new Date("2024-09-05T00:05:28.311Z"), + modifiedAt: new Date("2023-06-21T17:32:39.701Z"), id: "", isArchived: false, productId: "", + priceCurrency: "", + priceAmount: 407877, }, - url: "https://vain-word.com", + url: "https://earnest-fishery.net", }, ], pagination: { - totalCount: 969553, - maxPage: 803186, + totalCount: 563474, + maxPage: 762279, }, }; ``` diff --git a/docs/models/components/listresourcedownloadableread.md b/docs/models/components/listresourcedownloadableread.md index 226ffd54..a2c61980 100644 --- a/docs/models/components/listresourcedownloadableread.md +++ b/docs/models/components/listresourcedownloadableread.md @@ -14,17 +14,17 @@ let value: ListResourceDownloadableRead = { id: "", organizationId: "", name: "", - path: "/mnt", + path: "/System", mimeType: "", - size: 829836, + size: 617670, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2024-10-29T02:00:43.553Z"), + lastModifiedAt: new Date("2024-03-18T03:12:28.184Z"), download: { - url: "https://unsung-fisherman.biz/", - expiresAt: new Date("2024-12-27T07:45:07.954Z"), + url: "https://beloved-unibody.info", + expiresAt: new Date("2022-07-06T10:13:54.510Z"), }, version: "", isUploaded: false, @@ -34,8 +34,8 @@ let value: ListResourceDownloadableRead = { }, ], pagination: { - totalCount: 228618, - maxPage: 837202, + totalCount: 783992, + maxPage: 420354, }, }; ``` diff --git a/docs/models/components/listresourceexternalorganization.md b/docs/models/components/listresourceexternalorganization.md index ee437f06..6b63b27c 100644 --- a/docs/models/components/listresourceexternalorganization.md +++ b/docs/models/components/listresourceexternalorganization.md @@ -8,23 +8,23 @@ import { ListResourceExternalOrganization } from "@polar-sh/sdk/models/component let value: ListResourceExternalOrganization = { items: [ { - id: "42d48215-5595-4c15-9a91-74a2a74b320d", + id: "e8a148e7-90f7-4258-823e-d14a40b35422", name: "", - avatarUrl: "https://classic-bungalow.info", + avatarUrl: "https://severe-tusk.name", isPersonal: false, bio: "", prettyName: "", - company: "Prohaska Inc", + company: "Cruickshank - Kub", blog: "", location: "", - email: "Gavin32@hotmail.com", + email: "Orion_Dietrich@yahoo.com", twitterUsername: "", organizationId: "", }, ], pagination: { - totalCount: 857355, - maxPage: 236455, + totalCount: 42469, + maxPage: 369181, }, }; ``` diff --git a/docs/models/components/listresourcefileread.md b/docs/models/components/listresourcefileread.md index 1abc47aa..765e7cd6 100644 --- a/docs/models/components/listresourcefileread.md +++ b/docs/models/components/listresourcefileread.md @@ -11,24 +11,24 @@ let value: ListResourceFileRead = { id: "", organizationId: "", name: "", - path: "/System", + path: "/usr/local/src", mimeType: "", - size: 239123, + size: 15297, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2024-03-27T01:18:50.330Z"), + lastModifiedAt: new Date("2023-09-18T03:44:36.212Z"), version: "", isUploaded: false, - createdAt: new Date("2022-03-16T12:27:11.675Z"), + createdAt: new Date("2023-11-09T19:57:09.022Z"), sizeReadable: "", - publicUrl: "https://definitive-coordination.org", + publicUrl: "https://unfit-league.biz", }, ], pagination: { - totalCount: 384521, - maxPage: 519611, + totalCount: 10185, + maxPage: 240781, }, }; ``` diff --git a/docs/models/components/listresourcelicensekeyread.md b/docs/models/components/listresourcelicensekeyread.md index ec623d33..a7586965 100644 --- a/docs/models/components/listresourcelicensekeyread.md +++ b/docs/models/components/listresourcelicensekeyread.md @@ -14,24 +14,24 @@ let value: ListResourceLicenseKeyRead = { user: { id: "", publicName: "", - email: "Gloria_Emmerich80@hotmail.com", - avatarUrl: "https://apt-resolve.info", + email: "Muhammad63@hotmail.com", + avatarUrl: "https://happy-go-lucky-courtroom.info/", }, benefitId: "", key: "", displayKey: "", - status: "disabled", - limitActivations: 465486, - usage: 65582, - limitUsage: 226545, - validations: 994375, - lastValidatedAt: new Date("2023-01-02T06:12:27.588Z"), - expiresAt: new Date("2022-06-25T16:40:06.343Z"), + status: "revoked", + limitActivations: 84101, + usage: 242606, + limitUsage: 119927, + validations: 554508, + lastValidatedAt: new Date("2022-07-25T05:51:31.344Z"), + expiresAt: new Date("2022-12-23T20:38:24.885Z"), }, ], pagination: { - totalCount: 805831, - maxPage: 45069, + totalCount: 817054, + maxPage: 571849, }, }; ``` diff --git a/docs/models/components/listresourceoauth2client.md b/docs/models/components/listresourceoauth2client.md index 94a431f8..03f8188f 100644 --- a/docs/models/components/listresourceoauth2client.md +++ b/docs/models/components/listresourceoauth2client.md @@ -9,20 +9,20 @@ let value: ListResourceOAuth2Client = { items: [ { redirectUris: [ - "https://urban-mobility.info/", + "https://unruly-possession.info", ], clientName: "", - createdAt: new Date("2024-05-27T05:53:52.720Z"), - modifiedAt: new Date("2024-10-10T06:09:21.767Z"), + createdAt: new Date("2022-11-03T20:32:51.033Z"), + modifiedAt: new Date("2023-11-30T08:31:54.256Z"), clientId: "", clientSecret: "", - clientIdIssuedAt: 673493, - clientSecretExpiresAt: 230903, + clientIdIssuedAt: 631429, + clientSecretExpiresAt: 23910, }, ], pagination: { - totalCount: 819261, - maxPage: 420526, + totalCount: 747110, + maxPage: 221874, }, }; ``` diff --git a/docs/models/components/listresourceorder.md b/docs/models/components/listresourceorder.md index dde03317..369a7444 100644 --- a/docs/models/components/listresourceorder.md +++ b/docs/models/components/listresourceorder.md @@ -8,16 +8,16 @@ import { ListResourceOrder } from "@polar-sh/sdk/models/components"; let value: ListResourceOrder = { items: [ { - createdAt: new Date("2022-06-03T21:44:38.598Z"), - modifiedAt: new Date("2022-07-08T03:01:51.436Z"), + createdAt: new Date("2024-09-20T03:09:49.442Z"), + modifiedAt: new Date("2023-06-21T01:11:23.657Z"), id: "", metadata: { "key": "", }, - amount: 918413, - taxAmount: 354705, - currency: "Czech Koruna", - billingReason: "subscription_update", + amount: 169341, + taxAmount: 409633, + currency: "Mexican Peso", + billingReason: "subscription_cycle", userId: "", productId: "", productPriceId: "", @@ -25,49 +25,47 @@ let value: ListResourceOrder = { checkoutId: "", user: { id: "", - email: "Lowell.Pfeffer@hotmail.com", + email: "Larry47@hotmail.com", publicName: "", githubUsername: "", - avatarUrl: "https://frugal-backbone.info", + avatarUrl: "https://musty-poetry.info", }, product: { - createdAt: new Date("2022-09-22T09:56:57.217Z"), - modifiedAt: new Date("2022-03-03T10:36:02.199Z"), + createdAt: new Date("2023-03-11T21:34:54.948Z"), + modifiedAt: new Date("2023-11-20T02:39:06.531Z"), id: "", name: "", - description: "underneath the plus roughly hmph when", + description: + "briskly pink behest yet huzzah than magnificent chainstay", isRecurring: false, isArchived: false, organizationId: "", }, productPrice: { - createdAt: new Date("2023-06-07T21:29:28.096Z"), - modifiedAt: new Date("2022-06-16T23:39:25.441Z"), + createdAt: new Date("2022-02-17T00:20:01.255Z"), + modifiedAt: new Date("2023-08-06T19:15:57.742Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - minimumAmount: 414720, - maximumAmount: 910478, - presetAmount: 468634, - recurringInterval: "month", + priceAmount: 224411, }, subscription: { metadata: { "key": "", }, - createdAt: new Date("2023-08-07T10:32:29.203Z"), - modifiedAt: new Date("2022-03-08T16:23:57.837Z"), + createdAt: new Date("2022-11-23T04:46:09.251Z"), + modifiedAt: new Date("2023-11-09T05:04:32.559Z"), id: "", - amount: 294268, - currency: "Somali Shilling", - recurringInterval: "year", - status: "incomplete", - currentPeriodStart: new Date("2023-09-17T14:01:05.772Z"), - currentPeriodEnd: new Date("2022-08-27T04:54:48.513Z"), + amount: 351246, + currency: "Zimbabwe Dollar", + recurringInterval: "month", + status: "unpaid", + currentPeriodStart: new Date("2024-08-17T05:51:35.005Z"), + currentPeriodEnd: new Date("2023-04-25T14:16:21.503Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2024-12-05T10:07:23.360Z"), - endedAt: new Date("2024-05-08T22:06:09.845Z"), + startedAt: new Date("2024-12-29T01:56:03.510Z"), + endedAt: new Date("2022-11-06T22:46:44.719Z"), userId: "", productId: "", priceId: "", @@ -76,8 +74,8 @@ let value: ListResourceOrder = { }, ], pagination: { - totalCount: 127908, - maxPage: 385546, + totalCount: 91063, + maxPage: 567195, }, }; ``` diff --git a/docs/models/components/listresourceorganization.md b/docs/models/components/listresourceorganization.md index 3d4f212f..5687dd64 100644 --- a/docs/models/components/listresourceorganization.md +++ b/docs/models/components/listresourceorganization.md @@ -8,29 +8,29 @@ import { ListResourceOrganization } from "@polar-sh/sdk/models/components"; let value: ListResourceOrganization = { items: [ { - createdAt: new Date("2023-10-19T22:57:45.544Z"), - modifiedAt: new Date("2023-11-27T19:52:32.797Z"), + createdAt: new Date("2023-02-25T23:18:54.870Z"), + modifiedAt: new Date("2023-07-13T11:31:10.565Z"), id: "", name: "", slug: "", - avatarUrl: "https://friendly-starboard.info", + avatarUrl: "https://pushy-lox.com", bio: "", - company: "Schowalter, Reilly and Schinner", + company: "Douglas - Mueller", blog: "", location: "", - email: "Presley.Turner97@yahoo.com", + email: "Alessia79@gmail.com", twitterUsername: "", - pledgeMinimumAmount: 616403, + pledgeMinimumAmount: 613286, pledgeBadgeShowAmount: false, - defaultUpfrontSplitToContributors: 495225, + defaultUpfrontSplitToContributors: 486162, donationsEnabled: false, profileSettings: {}, featureSettings: {}, }, ], pagination: { - totalCount: 230476, - maxPage: 535148, + totalCount: 208498, + maxPage: 568548, }, }; ``` diff --git a/docs/models/components/listresourceproduct.md b/docs/models/components/listresourceproduct.md index b9c3fc46..a5cd9b0a 100644 --- a/docs/models/components/listresourceproduct.md +++ b/docs/models/components/listresourceproduct.md @@ -8,37 +8,36 @@ import { ListResourceProduct } from "@polar-sh/sdk/models/components"; let value: ListResourceProduct = { items: [ { - createdAt: new Date("2024-02-03T09:20:15.518Z"), - modifiedAt: new Date("2023-06-15T03:09:20.689Z"), + createdAt: new Date("2023-12-03T01:24:28.573Z"), + modifiedAt: new Date("2024-04-30T15:57:54.017Z"), id: "", name: "", - description: "boldly stabilise midwife whereas incidentally", + description: "elevator blah boo", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2024-10-16T20:09:04.547Z"), - modifiedAt: new Date("2024-06-28T09:31:01.146Z"), + createdAt: new Date("2024-08-14T22:50:28.709Z"), + modifiedAt: new Date("2022-04-27T17:18:40.571Z"), id: "", isArchived: false, productId: "", - recurringInterval: "year", + priceCurrency: "", + priceAmount: 125701, }, ], benefits: [ { - createdAt: new Date("2023-01-03T09:19:38.124Z"), - modifiedAt: new Date("2023-05-19T06:42:57.063Z"), + createdAt: new Date("2022-06-12T14:00:52.276Z"), + modifiedAt: new Date("2024-05-21T01:52:05.438Z"), id: "", description: - "beside smoggy yuck nearly failing ew up decongestant valentine deployment", + "phew pro pace provided with inspection boo incidentally alarmed", selectable: false, deletable: false, organizationId: "", - properties: { - paidArticles: false, - }, + properties: {}, }, ], medias: [ @@ -46,26 +45,45 @@ let value: ListResourceProduct = { id: "", organizationId: "", name: "", - path: "/usr/libexec", + path: "/etc/periodic", mimeType: "", - size: 902216, + size: 459888, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2022-09-13T21:23:26.372Z"), + lastModifiedAt: new Date("2022-11-04T15:15:56.312Z"), version: "", isUploaded: false, - createdAt: new Date("2024-04-27T14:10:19.519Z"), + createdAt: new Date("2022-11-18T12:31:27.009Z"), sizeReadable: "", - publicUrl: "https://assured-granny.com/", + publicUrl: "https://assured-airman.org", + }, + ], + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2022-02-17T02:28:27.960Z"), + modifiedAt: new Date("2023-05-18T13:34:30.080Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 881891, + required: false, }, ], }, ], pagination: { - totalCount: 166138, - maxPage: 627397, + totalCount: 306065, + maxPage: 932252, }, }; ``` diff --git a/docs/models/components/listresourcerepository.md b/docs/models/components/listresourcerepository.md index 07f3abcc..017fbfcd 100644 --- a/docs/models/components/listresourcerepository.md +++ b/docs/models/components/listresourcerepository.md @@ -8,33 +8,53 @@ import { ListResourceRepository } from "@polar-sh/sdk/models/components"; let value: ListResourceRepository = { items: [ { - id: "06336156-de44-4925-8061-8af33fd9d3dd", + id: "b26a705a-67d4-49dc-a304-2048a639cbd4", isPrivate: false, name: "MyOrg", - description: "failing after finally even pish reapply vivid", + description: "punctually gladly after adventurously out definite", stars: 1337, license: "", homepage: "", profileSettings: {}, organization: { - id: "d09ba460-1893-4770-829f-a1d619365a61", + id: "386f86f1-45dc-44d1-97a4-1475610e14ad", name: "", - avatarUrl: "https://square-ad.name", + avatarUrl: "https://linear-atrium.info", isPersonal: false, bio: "", prettyName: "", - company: "Mitchell - Smith", + company: "Wintheiser - Ruecker", blog: "", location: "", - email: "Jeromy90@gmail.com", + email: "Darrin.Halvorson@yahoo.com", twitterUsername: "", organizationId: "", }, + internalOrganization: { + createdAt: new Date("2024-03-23T13:46:19.980Z"), + modifiedAt: new Date("2022-06-21T20:48:34.925Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://magnificent-mousse.net", + bio: "", + company: "Fay, Homenick and Beer", + blog: "", + location: "", + email: "Tracy_Witting@yahoo.com", + twitterUsername: "", + pledgeMinimumAmount: 640046, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 666273, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, }, ], pagination: { - totalCount: 736574, - maxPage: 843969, + totalCount: 638042, + maxPage: 189614, }, }; ``` diff --git a/docs/models/components/listresourcesubscription.md b/docs/models/components/listresourcesubscription.md index f84a85cc..c632cb85 100644 --- a/docs/models/components/listresourcesubscription.md +++ b/docs/models/components/listresourcesubscription.md @@ -8,18 +8,18 @@ import { ListResourceSubscription } from "@polar-sh/sdk/models/components"; let value: ListResourceSubscription = { items: [ { - createdAt: new Date("2024-08-13T00:48:23.012Z"), - modifiedAt: new Date("2023-02-03T04:35:58.234Z"), + createdAt: new Date("2022-05-16T14:56:40.238Z"), + modifiedAt: new Date("2023-09-12T09:38:08.141Z"), id: "", - amount: 694444, - currency: "Iranian Rial", - recurringInterval: "year", - status: "canceled", - currentPeriodStart: new Date("2024-11-26T18:30:45.803Z"), - currentPeriodEnd: new Date("2022-05-28T20:04:45.914Z"), + amount: 97748, + currency: "Kyat", + recurringInterval: "month", + status: "incomplete", + currentPeriodStart: new Date("2022-05-04T22:59:01.944Z"), + currentPeriodEnd: new Date("2024-09-25T11:36:35.384Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2023-08-03T21:22:08.721Z"), - endedAt: new Date("2022-05-25T23:11:39.729Z"), + startedAt: new Date("2023-10-18T12:05:19.674Z"), + endedAt: new Date("2022-10-02T04:10:30.103Z"), userId: "", productId: "", priceId: "", @@ -28,45 +28,44 @@ let value: ListResourceSubscription = { "key": "", }, user: { - email: "Neil.Mertz-Bins@gmail.com", + email: "Kailyn.Satterfield@gmail.com", publicName: "", githubUsername: "", - avatarUrl: "https://tender-instance.org/", + avatarUrl: "https://right-meander.org", }, product: { - createdAt: new Date("2024-08-27T00:36:03.531Z"), - modifiedAt: new Date("2023-07-03T20:25:12.002Z"), + createdAt: new Date("2023-10-01T09:23:05.568Z"), + modifiedAt: new Date("2023-09-26T14:36:58.483Z"), id: "", name: "", - description: - "between whoa underneath lest hospitalization gadzooks testing adult", + description: "executor hunt till sheepishly duh", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2023-11-20T11:22:28.837Z"), - modifiedAt: new Date("2023-08-01T00:57:37.425Z"), + createdAt: new Date("2023-01-26T18:17:02.928Z"), + modifiedAt: new Date("2024-04-24T07:58:02.328Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 500349, - recurringInterval: "year", + minimumAmount: 380130, + maximumAmount: 622192, + presetAmount: 893406, }, ], benefits: [ { - createdAt: new Date("2024-02-22T11:19:08.608Z"), - modifiedAt: new Date("2023-09-25T23:37:51.077Z"), + createdAt: new Date("2022-01-10T18:16:03.467Z"), + modifiedAt: new Date("2022-10-09T09:43:33.243Z"), id: "", - description: "yahoo mostly who truly quirkily", + description: + "sugary incline regarding behind about after hence belabor search", selectable: false, deletable: false, organizationId: "", - properties: { - paidArticles: false, - }, + properties: {}, }, ], medias: [ @@ -74,37 +73,61 @@ let value: ListResourceSubscription = { id: "", organizationId: "", name: "", - path: "/bin", + path: "/lost+found", mimeType: "", - size: 110280, + size: 737774, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2022-06-24T00:14:24.030Z"), + lastModifiedAt: new Date("2022-01-29T20:48:34.054Z"), version: "", isUploaded: false, - createdAt: new Date("2022-06-07T00:46:55.861Z"), + createdAt: new Date("2024-10-13T03:45:54.403Z"), sizeReadable: "", - publicUrl: "https://bulky-chops.info", + publicUrl: "https://lonely-comparison.info/", + }, + ], + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2022-06-06T03:35:17.126Z"), + modifiedAt: new Date("2022-11-13T20:42:37.829Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: { + options: [ + { + value: "", + label: "", + }, + ], + }, + }, + order: 679183, + required: false, }, ], }, price: { - createdAt: new Date("2024-03-29T15:24:18.964Z"), - modifiedAt: new Date("2023-06-19T13:40:00.682Z"), + createdAt: new Date("2023-10-12T19:34:57.872Z"), + modifiedAt: new Date("2023-07-28T04:35:19.088Z"), id: "", isArchived: false, productId: "", - priceCurrency: "", - priceAmount: 879644, recurringInterval: "month", }, }, ], pagination: { - totalCount: 855199, - maxPage: 153811, + totalCount: 146540, + maxPage: 958192, }, }; ``` diff --git a/docs/models/components/listresourceuseradvertisementcampaign.md b/docs/models/components/listresourceuseradvertisementcampaign.md index 90b0d6f2..7d2d4d93 100644 --- a/docs/models/components/listresourceuseradvertisementcampaign.md +++ b/docs/models/components/listresourceuseradvertisementcampaign.md @@ -8,21 +8,21 @@ import { ListResourceUserAdvertisementCampaign } from "@polar-sh/sdk/models/comp let value: ListResourceUserAdvertisementCampaign = { items: [ { - createdAt: new Date("2023-12-04T16:08:03.432Z"), - modifiedAt: new Date("2023-11-11T23:33:24.251Z"), + createdAt: new Date("2022-07-06T20:17:06.814Z"), + modifiedAt: new Date("2024-05-28T20:24:06.201Z"), id: "", userId: "", - views: 533428, - clicks: 757747, - imageUrl: "https://little-guide.biz/", - imageUrlDark: "https://babyish-fencing.info/", + views: 438477, + clicks: 276945, + imageUrl: "https://stingy-morbidity.net", + imageUrlDark: "https://rectangular-fen.net/", text: "", - linkUrl: "https://electric-digit.biz/", + linkUrl: "https://sparse-membership.net", }, ], pagination: { - totalCount: 350222, - maxPage: 144876, + totalCount: 468332, + maxPage: 279945, }, }; ``` diff --git a/docs/models/components/listresourceuserbenefit.md b/docs/models/components/listresourceuserbenefit.md index 234acc0b..17888dff 100644 --- a/docs/models/components/listresourceuserbenefit.md +++ b/docs/models/components/listresourceuserbenefit.md @@ -8,30 +8,17 @@ import { ListResourceUserBenefit } from "@polar-sh/sdk/models/components"; let value: ListResourceUserBenefit = { items: [ { - createdAt: new Date("2024-09-30T13:19:56.386Z"), - modifiedAt: new Date("2022-01-22T01:52:48.321Z"), + createdAt: new Date("2023-05-27T22:49:24.592Z"), + modifiedAt: new Date("2024-04-05T08:01:37.302Z"), id: "", - description: - "outrun lighthearted quizzically pleasing foolishly why beside", + description: "repeatedly supposing ferociously", selectable: false, deletable: false, organizationId: "", - properties: { - prefix: "", - expires: { - ttl: 329961, - timeframe: "day", - }, - activations: { - limit: 491784, - enableUserAdmin: false, - }, - limitUsage: 131116, - }, grants: [ { - createdAt: new Date("2022-09-30T06:35:01.392Z"), - modifiedAt: new Date("2022-10-31T08:48:47.117Z"), + createdAt: new Date("2023-10-12T20:51:35.951Z"), + modifiedAt: new Date("2023-11-03T05:14:01.508Z"), id: "", isGranted: false, isRevoked: false, @@ -39,14 +26,38 @@ let value: ListResourceUserBenefit = { orderId: "", userId: "", benefitId: "", - properties: {}, }, ], + organization: { + createdAt: new Date("2022-09-12T22:21:35.224Z"), + modifiedAt: new Date("2023-06-21T04:35:15.122Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://kosher-settler.info/", + bio: "", + company: "Cummerata, Lemke and Senger", + blog: "", + location: "", + email: "Jamel7@gmail.com", + twitterUsername: "", + pledgeMinimumAmount: 468221, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 336123, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, + properties: { + activeFiles: [ + "", + ], + }, }, ], pagination: { - totalCount: 123546, - maxPage: 463044, + totalCount: 116807, + maxPage: 432597, }, }; ``` diff --git a/docs/models/components/listresourceuserorder.md b/docs/models/components/listresourceuserorder.md index 32d2d643..937efdc8 100644 --- a/docs/models/components/listresourceuserorder.md +++ b/docs/models/components/listresourceuserorder.md @@ -8,49 +8,50 @@ import { ListResourceUserOrder } from "@polar-sh/sdk/models/components"; let value: ListResourceUserOrder = { items: [ { - createdAt: new Date("2023-12-26T05:38:43.189Z"), - modifiedAt: new Date("2024-04-18T00:54:24.193Z"), + createdAt: new Date("2023-12-26T14:51:25.668Z"), + modifiedAt: new Date("2022-05-20T06:52:25.822Z"), id: "", - amount: 539502, - taxAmount: 158515, - currency: "Jamaican Dollar", + amount: 432280, + taxAmount: 416624, + currency: "Denar", userId: "", productId: "", productPriceId: "", subscriptionId: "", product: { - createdAt: new Date("2022-03-26T06:04:02.019Z"), - modifiedAt: new Date("2024-01-26T11:21:55.369Z"), + createdAt: new Date("2023-07-27T00:25:02.800Z"), + modifiedAt: new Date("2023-02-08T00:40:57.806Z"), id: "", name: "", description: - "recovery furthermore glaring huddle well-lit gently excluding notwithstanding whack versus", + "viciously scorn silk meaningfully likewise hmph angrily order cautiously", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2022-06-18T21:53:52.884Z"), - modifiedAt: new Date("2022-09-26T12:13:20.933Z"), + createdAt: new Date("2023-02-24T18:09:40.072Z"), + modifiedAt: new Date("2023-03-03T23:09:58.976Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 592946, + priceAmount: 920234, recurringInterval: "year", }, ], benefits: [ { - createdAt: new Date("2023-06-21T04:35:15.122Z"), - modifiedAt: new Date("2023-06-13T08:09:17.911Z"), + createdAt: new Date("2024-08-30T08:52:26.881Z"), + modifiedAt: new Date("2023-04-30T13:46:10.741Z"), id: "", - type: "discord", - description: - "loyally beyond onto if carefully eek clavicle cantaloupe inside", + description: "incidentally deduce with", selectable: false, deletable: false, organizationId: "", + properties: { + paidArticles: false, + }, }, ], medias: [ @@ -58,43 +59,63 @@ let value: ListResourceUserOrder = { id: "", organizationId: "", name: "", - path: "/etc/namedb", + path: "/private", mimeType: "", - size: 649070, + size: 979665, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2024-07-27T05:08:40.414Z"), + lastModifiedAt: new Date("2022-07-27T18:33:03.482Z"), version: "", isUploaded: false, - createdAt: new Date("2022-04-13T03:51:39.302Z"), + createdAt: new Date("2023-06-15T05:10:45.704Z"), sizeReadable: "", - publicUrl: "https://rotating-substitution.com", + publicUrl: "https://adolescent-descendant.info/", }, ], + organization: { + createdAt: new Date("2023-04-18T12:27:46.530Z"), + modifiedAt: new Date("2024-08-29T14:37:53.760Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://jagged-willow.name", + bio: "", + company: "Pollich - Kunze", + blog: "", + location: "", + email: "Sophie62@hotmail.com", + twitterUsername: "", + pledgeMinimumAmount: 832589, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 366410, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, }, productPrice: { - createdAt: new Date("2022-01-25T03:09:39.299Z"), - modifiedAt: new Date("2024-03-15T13:07:35.858Z"), + createdAt: new Date("2023-03-03T23:38:16.866Z"), + modifiedAt: new Date("2022-11-18T13:05:27.659Z"), id: "", isArchived: false, productId: "", - recurringInterval: "year", + recurringInterval: "month", }, subscription: { - createdAt: new Date("2023-05-12T19:42:35.257Z"), - modifiedAt: new Date("2023-04-22T00:36:49.607Z"), + createdAt: new Date("2023-06-21T22:56:39.250Z"), + modifiedAt: new Date("2024-11-14T14:23:19.654Z"), id: "", - amount: 278469, - currency: "UAE Dirham", + amount: 986623, + currency: "Lari", recurringInterval: "month", - status: "unpaid", - currentPeriodStart: new Date("2024-08-08T13:05:34.702Z"), - currentPeriodEnd: new Date("2022-10-20T02:08:16.863Z"), + status: "active", + currentPeriodStart: new Date("2022-01-09T23:21:30.384Z"), + currentPeriodEnd: new Date("2022-07-11T14:54:03.454Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2024-11-22T06:26:59.776Z"), - endedAt: new Date("2023-02-08T00:18:45.540Z"), + startedAt: new Date("2024-10-22T22:05:47.312Z"), + endedAt: new Date("2022-02-02T06:15:52.112Z"), userId: "", productId: "", priceId: "", @@ -103,8 +124,8 @@ let value: ListResourceUserOrder = { }, ], pagination: { - totalCount: 297585, - maxPage: 152807, + totalCount: 100976, + maxPage: 420647, }, }; ``` diff --git a/docs/models/components/listresourceusersubscription.md b/docs/models/components/listresourceusersubscription.md index c4d427f8..bd290c28 100644 --- a/docs/models/components/listresourceusersubscription.md +++ b/docs/models/components/listresourceusersubscription.md @@ -8,51 +8,48 @@ import { ListResourceUserSubscription } from "@polar-sh/sdk/models/components"; let value: ListResourceUserSubscription = { items: [ { - createdAt: new Date("2024-04-22T02:58:17.524Z"), - modifiedAt: new Date("2022-12-18T13:17:08.954Z"), + createdAt: new Date("2024-06-30T09:18:46.693Z"), + modifiedAt: new Date("2023-02-18T14:55:40.419Z"), id: "", - amount: 559209, - currency: "Zloty", + amount: 28088, + currency: "Yen", recurringInterval: "month", - status: "unpaid", - currentPeriodStart: new Date("2023-05-10T13:43:53.738Z"), - currentPeriodEnd: new Date("2024-12-09T17:05:31.658Z"), + status: "trialing", + currentPeriodStart: new Date("2024-12-15T17:30:31.626Z"), + currentPeriodEnd: new Date("2024-07-28T15:50:46.966Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2022-07-27T18:33:03.482Z"), - endedAt: new Date("2023-06-15T05:10:45.704Z"), + startedAt: new Date("2022-09-17T03:43:51.884Z"), + endedAt: new Date("2023-02-17T01:18:56.856Z"), userId: "", productId: "", priceId: "", checkoutId: "", product: { - createdAt: new Date("2022-07-01T18:36:52.222Z"), - modifiedAt: new Date("2022-01-12T03:47:46.867Z"), + createdAt: new Date("2023-04-18T13:22:03.376Z"), + modifiedAt: new Date("2024-04-17T04:47:37.706Z"), id: "", name: "", - description: "pleasing overconfidently why frequent", + description: "jump whoever among", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2022-01-09T23:21:30.384Z"), - modifiedAt: new Date("2022-07-11T14:54:03.454Z"), + createdAt: new Date("2022-10-28T16:59:00.609Z"), + modifiedAt: new Date("2024-11-09T15:56:51.918Z"), id: "", isArchived: false, productId: "", - priceCurrency: "", - minimumAmount: 936059, - maximumAmount: 29435, - presetAmount: 100976, - recurringInterval: "month", + recurringInterval: "year", }, ], benefits: [ { - createdAt: new Date("2022-10-22T16:34:22.700Z"), - modifiedAt: new Date("2022-12-02T08:07:08.018Z"), + createdAt: new Date("2022-04-10T19:29:52.339Z"), + modifiedAt: new Date("2024-11-07T23:21:57.092Z"), id: "", - description: "sans jaggedly like majestically because", + description: + "best-seller instead sonar availability even which filthy ah", selectable: false, deletable: false, organizationId: "", @@ -66,37 +63,59 @@ let value: ListResourceUserSubscription = { id: "", organizationId: "", name: "", - path: "/usr/libexec", + path: "/home/user", mimeType: "", - size: 256742, + size: 78486, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2023-08-14T11:19:43.984Z"), + lastModifiedAt: new Date("2023-11-17T18:41:58.866Z"), version: "", isUploaded: false, - createdAt: new Date("2024-06-08T06:27:42.005Z"), + createdAt: new Date("2023-07-09T05:45:55.648Z"), sizeReadable: "", - publicUrl: "https://major-waist.info", + publicUrl: "https://babyish-affiliate.net/", }, ], + organization: { + createdAt: new Date("2022-07-26T07:48:42.795Z"), + modifiedAt: new Date("2022-10-20T05:47:37.552Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://criminal-sushi.biz/", + bio: "", + company: "Cruickshank, Fritsch and Stroman", + blog: "", + location: "", + email: "Dolores_Bechtelar84@yahoo.com", + twitterUsername: "", + pledgeMinimumAmount: 798619, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 961171, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, }, price: { - createdAt: new Date("2024-03-26T00:46:41.552Z"), - modifiedAt: new Date("2023-04-25T01:39:48.783Z"), + createdAt: new Date("2024-01-16T01:22:24.438Z"), + modifiedAt: new Date("2022-10-20T07:59:07.851Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 418788, - recurringInterval: "month", + minimumAmount: 649661, + maximumAmount: 474867, + presetAmount: 405542, + recurringInterval: "year", }, }, ], pagination: { - totalCount: 305278, - maxPage: 860383, + totalCount: 797903, + maxPage: 934608, }, }; ``` diff --git a/docs/models/components/loc.md b/docs/models/components/loc.md index 5bfe01cc..718b22a4 100644 --- a/docs/models/components/loc.md +++ b/docs/models/components/loc.md @@ -12,6 +12,6 @@ const value: string = ""; ### `number` ```typescript -const value: number = 846427; +const value: number = 209920; ``` diff --git a/docs/models/components/metric.md b/docs/models/components/metric.md index ac77a0e5..17acc005 100644 --- a/docs/models/components/metric.md +++ b/docs/models/components/metric.md @@ -9,7 +9,7 @@ import { Metric } from "@polar-sh/sdk/models/components"; let value: Metric = { slug: "", - displayName: "Celine.Dicki-Prohaska3", + displayName: "Devonte.Gutkowski", type: "currency", }; ``` diff --git a/docs/models/components/metricperiod.md b/docs/models/components/metricperiod.md index 83131dda..64e7c7d7 100644 --- a/docs/models/components/metricperiod.md +++ b/docs/models/components/metricperiod.md @@ -6,18 +6,18 @@ import { MetricPeriod } from "@polar-sh/sdk/models/components"; let value: MetricPeriod = { - timestamp: new Date("2023-08-22T10:14:28.976Z"), - orders: 209465, - revenue: 6356, - averageOrderValue: 772650, - oneTimeProducts: 312298, - oneTimeProductsRevenue: 214040, - newSubscriptions: 172311, - newSubscriptionsRevenue: 808797, - renewedSubscriptions: 620633, - renewedSubscriptionsRevenue: 641301, - activeSubscriptions: 925438, - monthlyRecurringRevenue: 891799, + timestamp: new Date("2023-09-20T10:21:04.413Z"), + orders: 126999, + revenue: 788582, + averageOrderValue: 774664, + oneTimeProducts: 404610, + oneTimeProductsRevenue: 539394, + newSubscriptions: 424886, + newSubscriptionsRevenue: 224244, + renewedSubscriptions: 762922, + renewedSubscriptionsRevenue: 744435, + activeSubscriptions: 647056, + monthlyRecurringRevenue: 455640, }; ``` diff --git a/docs/models/components/metrics.md b/docs/models/components/metrics.md index 660e372e..a8d62311 100644 --- a/docs/models/components/metrics.md +++ b/docs/models/components/metrics.md @@ -8,57 +8,57 @@ import { Metrics } from "@polar-sh/sdk/models/components"; let value: Metrics = { orders: { slug: "", - displayName: "Katharina71", + displayName: "Harmony_Lockman47", type: "scalar", }, revenue: { slug: "", - displayName: "Cielo.West56", + displayName: "Skylar31", type: "scalar", }, averageOrderValue: { slug: "", - displayName: "Doug30", - type: "scalar", + displayName: "Lela_Connelly", + type: "currency", }, oneTimeProducts: { slug: "", - displayName: "Herta_Breitenberg63", - type: "scalar", + displayName: "Collin_Tremblay2", + type: "currency", }, oneTimeProductsRevenue: { slug: "", - displayName: "Alexandro6", + displayName: "Amber_Lesch22", type: "scalar", }, newSubscriptions: { slug: "", - displayName: "Bryon.Labadie-Grimes", + displayName: "Immanuel_Tromp", type: "scalar", }, newSubscriptionsRevenue: { slug: "", - displayName: "Keven.Bayer35", - type: "currency", + displayName: "Anthony.Dietrich", + type: "scalar", }, renewedSubscriptions: { slug: "", - displayName: "Gina.Mraz", - type: "currency", + displayName: "Ethyl7", + type: "scalar", }, renewedSubscriptionsRevenue: { slug: "", - displayName: "Liza40", - type: "currency", + displayName: "Kianna_Luettgen", + type: "scalar", }, activeSubscriptions: { slug: "", - displayName: "Amara_Kautzer86", - type: "currency", + displayName: "Chet2", + type: "scalar", }, monthlyRecurringRevenue: { slug: "", - displayName: "Shayna.Nitzsche80", + displayName: "Jefferey.Sawayn49", type: "scalar", }, }; diff --git a/docs/models/components/metricsintervallimit.md b/docs/models/components/metricsintervallimit.md index b1ffc83b..02a2db73 100644 --- a/docs/models/components/metricsintervallimit.md +++ b/docs/models/components/metricsintervallimit.md @@ -8,7 +8,7 @@ Date interval limit to get metrics for a given interval. import { MetricsIntervalLimit } from "@polar-sh/sdk/models/components"; let value: MetricsIntervalLimit = { - maxDays: 575471, + maxDays: 74099, }; ``` diff --git a/docs/models/components/metricsintervalslimits.md b/docs/models/components/metricsintervalslimits.md index 2e8802f1..a6101f58 100644 --- a/docs/models/components/metricsintervalslimits.md +++ b/docs/models/components/metricsintervalslimits.md @@ -9,19 +9,19 @@ import { MetricsIntervalsLimits } from "@polar-sh/sdk/models/components"; let value: MetricsIntervalsLimits = { hour: { - maxDays: 224039, + maxDays: 329922, }, day: { - maxDays: 278459, + maxDays: 919348, }, week: { - maxDays: 909450, + maxDays: 242120, }, month: { - maxDays: 812655, + maxDays: 335403, }, year: { - maxDays: 97391, + maxDays: 747336, }, }; ``` diff --git a/docs/models/components/metricslimits.md b/docs/models/components/metricslimits.md index 555aea1d..d46ffde2 100644 --- a/docs/models/components/metricslimits.md +++ b/docs/models/components/metricslimits.md @@ -9,22 +9,22 @@ import { MetricsLimits } from "@polar-sh/sdk/models/components"; import { RFCDate } from "@polar-sh/sdk/types"; let value: MetricsLimits = { - minDate: new RFCDate("2024-11-19"), + minDate: new RFCDate("2022-11-24"), intervals: { hour: { - maxDays: 228961, + maxDays: 265724, }, day: { - maxDays: 19602, + maxDays: 848972, }, week: { - maxDays: 921707, + maxDays: 859375, }, month: { - maxDays: 264328, + maxDays: 15344, }, year: { - maxDays: 973103, + maxDays: 719607, }, }, }; diff --git a/docs/models/components/metricsresponse.md b/docs/models/components/metricsresponse.md index d31bf369..ad84dbb3 100644 --- a/docs/models/components/metricsresponse.md +++ b/docs/models/components/metricsresponse.md @@ -10,75 +10,75 @@ import { MetricsResponse } from "@polar-sh/sdk/models/components"; let value: MetricsResponse = { periods: [ { - timestamp: new Date("2023-08-05T09:00:15.814Z"), - orders: 773381, - revenue: 832596, - averageOrderValue: 957425, - oneTimeProducts: 995167, - oneTimeProductsRevenue: 552256, - newSubscriptions: 240787, - newSubscriptionsRevenue: 519896, - renewedSubscriptions: 736032, - renewedSubscriptionsRevenue: 476668, - activeSubscriptions: 272310, - monthlyRecurringRevenue: 822093, + timestamp: new Date("2024-08-23T22:10:48.974Z"), + orders: 315591, + revenue: 822577, + averageOrderValue: 4891, + oneTimeProducts: 949209, + oneTimeProductsRevenue: 54329, + newSubscriptions: 262883, + newSubscriptionsRevenue: 24886, + renewedSubscriptions: 959355, + renewedSubscriptionsRevenue: 51685, + activeSubscriptions: 349003, + monthlyRecurringRevenue: 663840, }, ], metrics: { orders: { slug: "", - displayName: "Ricardo78", - type: "scalar", + displayName: "Emory37", + type: "currency", }, revenue: { slug: "", - displayName: "Waylon84", - type: "scalar", + displayName: "Kylee_Wunsch", + type: "currency", }, averageOrderValue: { slug: "", - displayName: "Hailey.Schmitt", + displayName: "Jammie68", type: "scalar", }, oneTimeProducts: { slug: "", - displayName: "Katharina10", - type: "scalar", + displayName: "Josiane.Ledner", + type: "currency", }, oneTimeProductsRevenue: { slug: "", - displayName: "Amelie34", - type: "scalar", + displayName: "Zena.Fay", + type: "currency", }, newSubscriptions: { slug: "", - displayName: "Gilda24", + displayName: "Giovani_Cummerata69", type: "currency", }, newSubscriptionsRevenue: { slug: "", - displayName: "Brandy.Corkery", + displayName: "Dylan37", type: "scalar", }, renewedSubscriptions: { slug: "", - displayName: "Malika.Fay57", + displayName: "Lucile18", type: "scalar", }, renewedSubscriptionsRevenue: { slug: "", - displayName: "Ahmad66", - type: "currency", + displayName: "Maryam53", + type: "scalar", }, activeSubscriptions: { slug: "", - displayName: "Carlos_Tremblay", + displayName: "Garth.Durgan", type: "scalar", }, monthlyRecurringRevenue: { slug: "", - displayName: "Solon.Ortiz", - type: "scalar", + displayName: "Rubye_Balistreri", + type: "currency", }, }, }; diff --git a/docs/models/components/oauth2client.md b/docs/models/components/oauth2client.md index f368abc6..53012553 100644 --- a/docs/models/components/oauth2client.md +++ b/docs/models/components/oauth2client.md @@ -7,15 +7,15 @@ import { OAuth2Client } from "@polar-sh/sdk/models/components"; let value: OAuth2Client = { redirectUris: [ - "https://black-clavicle.biz", + "https://moist-status.com", ], clientName: "", - createdAt: new Date("2022-08-31T05:11:50.378Z"), - modifiedAt: new Date("2022-09-16T00:41:17.064Z"), + createdAt: new Date("2024-06-28T03:36:20.568Z"), + modifiedAt: new Date("2023-12-15T09:44:39.987Z"), clientId: "", clientSecret: "", - clientIdIssuedAt: 152850, - clientSecretExpiresAt: 692918, + clientIdIssuedAt: 214929, + clientSecretExpiresAt: 736906, }; ``` diff --git a/docs/models/components/oauth2clientconfiguration.md b/docs/models/components/oauth2clientconfiguration.md index 68a0d4e3..8dbb32e6 100644 --- a/docs/models/components/oauth2clientconfiguration.md +++ b/docs/models/components/oauth2clientconfiguration.md @@ -7,7 +7,7 @@ import { OAuth2ClientConfiguration } from "@polar-sh/sdk/models/components"; let value: OAuth2ClientConfiguration = { redirectUris: [ - "https://impeccable-velocity.info/", + "https://probable-gloom.net/", ], clientName: "", }; diff --git a/docs/models/components/oauth2clientconfigurationtokenendpointauthmethod.md b/docs/models/components/oauth2clientconfigurationtokenendpointauthmethod.md index 903d9a6e..f8bd2241 100644 --- a/docs/models/components/oauth2clientconfigurationtokenendpointauthmethod.md +++ b/docs/models/components/oauth2clientconfigurationtokenendpointauthmethod.md @@ -5,8 +5,7 @@ ```typescript import { OAuth2ClientConfigurationTokenEndpointAuthMethod } from "@polar-sh/sdk/models/components"; -let value: OAuth2ClientConfigurationTokenEndpointAuthMethod = - "client_secret_basic"; +let value: OAuth2ClientConfigurationTokenEndpointAuthMethod = "none"; ``` ## Values diff --git a/docs/models/components/oauth2clientconfigurationupdate.md b/docs/models/components/oauth2clientconfigurationupdate.md index ad54deb8..c66fbea5 100644 --- a/docs/models/components/oauth2clientconfigurationupdate.md +++ b/docs/models/components/oauth2clientconfigurationupdate.md @@ -7,7 +7,7 @@ import { OAuth2ClientConfigurationUpdate } from "@polar-sh/sdk/models/components let value: OAuth2ClientConfigurationUpdate = { redirectUris: [ - "https://entire-roadway.com/", + "https://shimmering-injunction.name/", ], clientName: "", clientId: "", diff --git a/docs/models/components/oauth2clientconfigurationupdategranttypes.md b/docs/models/components/oauth2clientconfigurationupdategranttypes.md index d74fd46e..b7c73b4f 100644 --- a/docs/models/components/oauth2clientconfigurationupdategranttypes.md +++ b/docs/models/components/oauth2clientconfigurationupdategranttypes.md @@ -5,7 +5,7 @@ ```typescript import { OAuth2ClientConfigurationUpdateGrantTypes } from "@polar-sh/sdk/models/components"; -let value: OAuth2ClientConfigurationUpdateGrantTypes = "authorization_code"; +let value: OAuth2ClientConfigurationUpdateGrantTypes = "refresh_token"; ``` ## Values diff --git a/docs/models/components/oauth2clientconfigurationupdatetokenendpointauthmethod.md b/docs/models/components/oauth2clientconfigurationupdatetokenendpointauthmethod.md index 03a43caa..e972b077 100644 --- a/docs/models/components/oauth2clientconfigurationupdatetokenendpointauthmethod.md +++ b/docs/models/components/oauth2clientconfigurationupdatetokenendpointauthmethod.md @@ -6,7 +6,7 @@ import { OAuth2ClientConfigurationUpdateTokenEndpointAuthMethod } from "@polar-sh/sdk/models/components"; let value: OAuth2ClientConfigurationUpdateTokenEndpointAuthMethod = - "client_secret_basic"; + "client_secret_post"; ``` ## Values diff --git a/docs/models/components/onev11oauth21tokenpostxcomponentsauthorizationcodetokenrequest.md b/docs/models/components/onev11oauth21tokenpostxcomponentsauthorizationcodetokenrequest.md index 1d610299..c67e5dbb 100644 --- a/docs/models/components/onev11oauth21tokenpostxcomponentsauthorizationcodetokenrequest.md +++ b/docs/models/components/onev11oauth21tokenpostxcomponentsauthorizationcodetokenrequest.md @@ -9,7 +9,7 @@ let value: Onev11oauth21tokenPostXComponentsAuthorizationCodeTokenRequest = { clientId: "", clientSecret: "", code: "", - redirectUri: "https://ecstatic-legislature.com/", + redirectUri: "https://precious-morbidity.org/", }; ``` diff --git a/docs/models/components/order.md b/docs/models/components/order.md index d7aa4d01..56893aeb 100644 --- a/docs/models/components/order.md +++ b/docs/models/components/order.md @@ -6,16 +6,16 @@ import { Order } from "@polar-sh/sdk/models/components"; let value: Order = { - createdAt: new Date("2023-06-22T00:09:40.274Z"), - modifiedAt: new Date("2022-07-19T21:06:20.014Z"), + createdAt: new Date("2022-01-09T04:32:15.217Z"), + modifiedAt: new Date("2023-06-04T16:24:12.271Z"), id: "", metadata: { "key": "", }, - amount: 704284, - taxAmount: 841379, - currency: "UAE Dirham", - billingReason: "purchase", + amount: 836804, + taxAmount: 419707, + currency: "Cuban Peso", + billingReason: "subscription_create", userId: "", productId: "", productPriceId: "", @@ -23,47 +23,46 @@ let value: Order = { checkoutId: "", user: { id: "", - email: "Wilton90@gmail.com", + email: "Major50@hotmail.com", publicName: "", githubUsername: "", - avatarUrl: "https://natural-sarong.biz", + avatarUrl: "https://fluffy-minion.name/", }, product: { - createdAt: new Date("2023-12-03T06:44:12.845Z"), - modifiedAt: new Date("2024-03-18T13:58:56.966Z"), + createdAt: new Date("2022-04-25T01:43:31.801Z"), + modifiedAt: new Date("2022-07-12T00:53:04.419Z"), id: "", name: "", - description: "lavish psst ew strange why well-documented poppy", + description: "among until mmm word lean from quarrel finally altruistic", isRecurring: false, isArchived: false, organizationId: "", }, productPrice: { - createdAt: new Date("2022-03-27T05:19:48.158Z"), - modifiedAt: new Date("2024-07-16T11:44:37.294Z"), + createdAt: new Date("2024-08-21T18:47:35.544Z"), + modifiedAt: new Date("2022-06-07T04:12:06.961Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 241190, - recurringInterval: "month", + priceAmount: 30643, }, subscription: { metadata: { "key": "", }, - createdAt: new Date("2023-03-05T09:01:12.508Z"), - modifiedAt: new Date("2023-11-21T22:00:18.063Z"), + createdAt: new Date("2022-03-08T19:15:27.321Z"), + modifiedAt: new Date("2023-07-27T07:33:30.803Z"), id: "", - amount: 586260, - currency: "Vatu", - recurringInterval: "year", - status: "active", - currentPeriodStart: new Date("2024-02-19T21:52:41.487Z"), - currentPeriodEnd: new Date("2023-12-29T10:34:57.471Z"), + amount: 215248, + currency: "Sudanese Pound", + recurringInterval: "month", + status: "incomplete_expired", + currentPeriodStart: new Date("2024-06-28T22:40:32.191Z"), + currentPeriodEnd: new Date("2022-02-20T00:32:42.159Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2024-04-21T03:44:58.953Z"), - endedAt: new Date("2023-09-20T09:06:06.239Z"), + startedAt: new Date("2024-05-13T05:22:03.123Z"), + endedAt: new Date("2022-05-03T11:52:05.226Z"), userId: "", productId: "", priceId: "", @@ -80,6 +79,7 @@ let value: Order = { | `modifiedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Last modification timestamp of the object. | | `id` | *string* | :heavy_check_mark: | The ID of the object. | | `metadata` | Record | :heavy_check_mark: | N/A | +| `customFieldData` | [components.OrderCustomFieldData](../../models/components/ordercustomfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | | `amount` | *number* | :heavy_check_mark: | N/A | | `taxAmount` | *number* | :heavy_check_mark: | N/A | | `currency` | *string* | :heavy_check_mark: | N/A | diff --git a/docs/models/components/orderbillingreason.md b/docs/models/components/orderbillingreason.md index 1ade1a7b..df62d6d0 100644 --- a/docs/models/components/orderbillingreason.md +++ b/docs/models/components/orderbillingreason.md @@ -5,7 +5,7 @@ ```typescript import { OrderBillingReason } from "@polar-sh/sdk/models/components"; -let value: OrderBillingReason = "subscription_create"; +let value: OrderBillingReason = "subscription_cycle"; ``` ## Values diff --git a/docs/models/components/ordercustomfielddata.md b/docs/models/components/ordercustomfielddata.md new file mode 100644 index 00000000..3339e3cd --- /dev/null +++ b/docs/models/components/ordercustomfielddata.md @@ -0,0 +1,16 @@ +# OrderCustomFieldData + +Key-value object storing custom field values. + +## Example Usage + +```typescript +import { OrderCustomFieldData } from "@polar-sh/sdk/models/components"; + +let value: OrderCustomFieldData = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/orderinvoice.md b/docs/models/components/orderinvoice.md index 036a1c51..82c89094 100644 --- a/docs/models/components/orderinvoice.md +++ b/docs/models/components/orderinvoice.md @@ -8,7 +8,7 @@ Order's invoice data. import { OrderInvoice } from "@polar-sh/sdk/models/components"; let value: OrderInvoice = { - url: "https://velvety-oil.com/", + url: "https://super-someplace.name/", }; ``` diff --git a/docs/models/components/orderproduct.md b/docs/models/components/orderproduct.md index 17b4ff2e..600ff88c 100644 --- a/docs/models/components/orderproduct.md +++ b/docs/models/components/orderproduct.md @@ -6,11 +6,11 @@ import { OrderProduct } from "@polar-sh/sdk/models/components"; let value: OrderProduct = { - createdAt: new Date("2022-03-01T17:18:33.209Z"), - modifiedAt: new Date("2022-06-17T21:45:07.040Z"), + createdAt: new Date("2022-11-06T01:22:31.085Z"), + modifiedAt: new Date("2022-03-11T01:49:52.647Z"), id: "", name: "", - description: "what motivate how plastic snappy until eek suspiciously", + description: "circa mid zowie coolly", isRecurring: false, isArchived: false, organizationId: "", diff --git a/docs/models/components/ordersortproperty.md b/docs/models/components/ordersortproperty.md index 813ad683..e9dd4c6c 100644 --- a/docs/models/components/ordersortproperty.md +++ b/docs/models/components/ordersortproperty.md @@ -5,7 +5,7 @@ ```typescript import { OrderSortProperty } from "@polar-sh/sdk/models/components"; -let value: OrderSortProperty = "subscription"; +let value: OrderSortProperty = "user"; ``` ## Values diff --git a/docs/models/components/ordersubscription.md b/docs/models/components/ordersubscription.md index 25395d0c..46940bba 100644 --- a/docs/models/components/ordersubscription.md +++ b/docs/models/components/ordersubscription.md @@ -9,18 +9,18 @@ let value: OrderSubscription = { metadata: { "key": "", }, - createdAt: new Date("2024-06-03T18:58:37.464Z"), - modifiedAt: new Date("2024-09-13T11:06:26.457Z"), + createdAt: new Date("2024-07-12T15:55:58.752Z"), + modifiedAt: new Date("2024-05-09T07:26:43.620Z"), id: "", - amount: 696477, - currency: "Forint", + amount: 218756, + currency: "Iranian Rial", recurringInterval: "month", - status: "past_due", - currentPeriodStart: new Date("2023-11-24T01:06:43.392Z"), - currentPeriodEnd: new Date("2022-01-27T04:56:36.497Z"), + status: "trialing", + currentPeriodStart: new Date("2022-08-20T06:58:32.848Z"), + currentPeriodEnd: new Date("2022-09-05T20:51:23.814Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2024-03-29T19:57:55.385Z"), - endedAt: new Date("2022-09-01T04:11:11.405Z"), + startedAt: new Date("2024-01-28T00:03:50.601Z"), + endedAt: new Date("2022-06-16T02:33:31.041Z"), userId: "", productId: "", priceId: "", diff --git a/docs/models/components/orderuser.md b/docs/models/components/orderuser.md index 49407060..29412a95 100644 --- a/docs/models/components/orderuser.md +++ b/docs/models/components/orderuser.md @@ -7,10 +7,10 @@ import { OrderUser } from "@polar-sh/sdk/models/components"; let value: OrderUser = { id: "", - email: "Johathan.Dooley@yahoo.com", + email: "Zoe83@gmail.com", publicName: "", githubUsername: "", - avatarUrl: "https://insecure-ownership.info", + avatarUrl: "https://next-designation.name", }; ``` diff --git a/docs/models/components/organization.md b/docs/models/components/organization.md index 514d88c3..656b8d61 100644 --- a/docs/models/components/organization.md +++ b/docs/models/components/organization.md @@ -6,21 +6,21 @@ import { Organization } from "@polar-sh/sdk/models/components"; let value: Organization = { - createdAt: new Date("2022-03-14T06:52:16.927Z"), - modifiedAt: new Date("2023-08-30T20:53:49.925Z"), + createdAt: new Date("2024-06-15T19:50:49.445Z"), + modifiedAt: new Date("2023-06-30T02:38:21.936Z"), id: "", name: "", slug: "", - avatarUrl: "https://cooperative-fencing.name", + avatarUrl: "https://pale-seagull.biz/", bio: "", - company: "Johns Inc", + company: "Keebler, Windler and Russel", blog: "", location: "", - email: "Gardner46@yahoo.com", + email: "Ahmed93@yahoo.com", twitterUsername: "", - pledgeMinimumAmount: 90551, + pledgeMinimumAmount: 269889, pledgeBadgeShowAmount: false, - defaultUpfrontSplitToContributors: 658726, + defaultUpfrontSplitToContributors: 301768, donationsEnabled: false, profileSettings: {}, featureSettings: {}, diff --git a/docs/models/components/organizationavatarfilecreate.md b/docs/models/components/organizationavatarfilecreate.md index 0696d3e5..9366a391 100644 --- a/docs/models/components/organizationavatarfilecreate.md +++ b/docs/models/components/organizationavatarfilecreate.md @@ -10,13 +10,13 @@ import { OrganizationAvatarFileCreate } from "@polar-sh/sdk/models/components"; let value: OrganizationAvatarFileCreate = { name: "", mimeType: "", - size: 541834, + size: 415732, upload: { parts: [ { - number: 823250, - chunkStart: 186640, - chunkEnd: 129904, + number: 42665, + chunkStart: 533171, + chunkEnd: 116704, }, ], }, diff --git a/docs/models/components/organizationavatarfileread.md b/docs/models/components/organizationavatarfileread.md index b80bd5fe..82dc3a99 100644 --- a/docs/models/components/organizationavatarfileread.md +++ b/docs/models/components/organizationavatarfileread.md @@ -11,19 +11,19 @@ let value: OrganizationAvatarFileRead = { id: "", organizationId: "", name: "", - path: "/usr", + path: "/sys", mimeType: "", - size: 324393, + size: 649908, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2024-08-21T18:47:35.544Z"), + lastModifiedAt: new Date("2022-01-02T23:03:39.516Z"), version: "", isUploaded: false, - createdAt: new Date("2022-06-07T04:12:06.961Z"), + createdAt: new Date("2023-02-10T11:23:09.076Z"), sizeReadable: "", - publicUrl: "https://basic-license.biz/", + publicUrl: "https://woeful-cd.net/", }; ``` diff --git a/docs/models/components/organizationsortproperty.md b/docs/models/components/organizationsortproperty.md index 1f65f48a..6fbb5d61 100644 --- a/docs/models/components/organizationsortproperty.md +++ b/docs/models/components/organizationsortproperty.md @@ -5,7 +5,7 @@ ```typescript import { OrganizationSortProperty } from "@polar-sh/sdk/models/components"; -let value: OrganizationSortProperty = "-created_at"; +let value: OrganizationSortProperty = "name"; ``` ## Values diff --git a/docs/models/components/pagination.md b/docs/models/components/pagination.md index c39bf8ef..0810c482 100644 --- a/docs/models/components/pagination.md +++ b/docs/models/components/pagination.md @@ -6,8 +6,8 @@ import { Pagination } from "@polar-sh/sdk/models/components"; let value: Pagination = { - totalCount: 916051, - maxPage: 668783, + totalCount: 659804, + maxPage: 94487, }; ``` diff --git a/docs/models/components/permission.md b/docs/models/components/permission.md index 7e6acd5d..52ae5f7b 100644 --- a/docs/models/components/permission.md +++ b/docs/models/components/permission.md @@ -7,7 +7,7 @@ The permission level to grant. Read more about roles and their permissions on [G ```typescript import { Permission } from "@polar-sh/sdk/models/components"; -let value: Permission = "admin"; +let value: Permission = "push"; ``` ## Values diff --git a/docs/models/components/pledge.md b/docs/models/components/pledge.md index 865229ee..50c94c3d 100644 --- a/docs/models/components/pledge.md +++ b/docs/models/components/pledge.md @@ -6,44 +6,65 @@ import { Pledge } from "@polar-sh/sdk/models/components"; let value: Pledge = { - createdAt: new Date("2022-10-20T12:01:16.137Z"), - modifiedAt: new Date("2024-10-18T13:51:56.895Z"), + createdAt: new Date("2024-06-16T22:04:20.447Z"), + modifiedAt: new Date("2024-03-16T09:04:21.592Z"), id: "", - amount: 411408, - currency: "Libyan Dinar", - state: "initiated", - type: "pay_upfront", + amount: 844388, + currency: "Brazilian Real", + state: "refunded", + type: "pay_directly", issue: { - id: "ceaec21f-2a38-47bd-9f36-6038e5bf21f0", - number: 869340, + id: "b1ba5406-46b2-47c3-9de1-1a8ec81174fa", + number: 356958, title: "", state: "open", - issueCreatedAt: new Date("2022-07-12T09:09:47.370Z"), + issueCreatedAt: new Date("2022-10-01T15:47:39.560Z"), needsConfirmationSolved: false, funding: {}, repository: { - id: "cb18e63b-3e67-4b5f-84f6-cc9c992e2854", + id: "5a2a1ea9-2b3c-4cfc-b58a-4c520a4dc18f", isPrivate: false, name: "MyOrg", - description: "riser unnaturally up integer charter zowie march", + description: + "that form hospitable consequently greedily upside-down consequently bah deploy", stars: 1337, license: "", homepage: "", profileSettings: {}, organization: { - id: "422d0712-73a6-4caf-b57a-6304d90c0f8e", + id: "94351be0-a9ea-4692-8237-418b1b0bf714", name: "", - avatarUrl: "https://hot-convection.info", + avatarUrl: "https://delicious-yin.info", isPersonal: false, bio: "", prettyName: "", - company: "Skiles - Mante", + company: "Bergnaum LLC", blog: "", location: "", - email: "Regan.Anderson42@gmail.com", + email: "Devonte_Boyle@gmail.com", twitterUsername: "", organizationId: "", }, + internalOrganization: { + createdAt: new Date("2022-11-13T19:30:07.544Z"), + modifiedAt: new Date("2022-09-17T06:04:05.728Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://reasonable-seagull.info/", + bio: "", + company: "Renner - Glover", + blog: "", + location: "", + email: "Eldred.Kovacek46@hotmail.com", + twitterUsername: "", + pledgeMinimumAmount: 987015, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 974537, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, }, pledgeBadgeCurrentlyEmbedded: false, }, diff --git a/docs/models/components/pledger.md b/docs/models/components/pledger.md index 5b71433d..f676dd9d 100644 --- a/docs/models/components/pledger.md +++ b/docs/models/components/pledger.md @@ -8,7 +8,7 @@ import { Pledger } from "@polar-sh/sdk/models/components"; let value: Pledger = { name: "", githubUsername: "", - avatarUrl: "https://discrete-mythology.com", + avatarUrl: "https://untimely-extension.net", }; ``` diff --git a/docs/models/components/pledgetype.md b/docs/models/components/pledgetype.md index 9585b0b4..985d6654 100644 --- a/docs/models/components/pledgetype.md +++ b/docs/models/components/pledgetype.md @@ -5,7 +5,7 @@ ```typescript import { PledgeType } from "@polar-sh/sdk/models/components"; -let value: PledgeType = "pay_upfront"; +let value: PledgeType = "pay_directly"; ``` ## Values diff --git a/docs/models/components/polarcheckoutlegacyschemascheckout.md b/docs/models/components/polarcheckoutlegacyschemascheckout.md index 47c817a7..1c5862d2 100644 --- a/docs/models/components/polarcheckoutlegacyschemascheckout.md +++ b/docs/models/components/polarcheckoutlegacyschemascheckout.md @@ -12,33 +12,36 @@ let value: PolarCheckoutLegacySchemasCheckout = { customerEmail: "", customerName: "", product: { - createdAt: new Date("2022-03-16T12:13:21.445Z"), - modifiedAt: new Date("2024-12-12T14:47:34.950Z"), + createdAt: new Date("2023-10-22T07:26:03.546Z"), + modifiedAt: new Date("2023-07-17T20:00:09.846Z"), id: "", name: "", - description: "like astride apologise um handy into", + description: + "whether border boo fledgling developmental arrogantly midwife out substitution", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2022-08-31T13:02:18.053Z"), - modifiedAt: new Date("2023-06-16T13:05:35.278Z"), + createdAt: new Date("2024-09-08T01:04:48.170Z"), + modifiedAt: new Date("2023-04-16T04:46:35.940Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 494136, + minimumAmount: 670168, + maximumAmount: 424591, + presetAmount: 708007, + recurringInterval: "year", }, ], benefits: [ { - createdAt: new Date("2023-09-30T19:30:59.394Z"), - modifiedAt: new Date("2023-04-03T20:16:14.287Z"), + createdAt: new Date("2023-08-25T17:28:28.690Z"), + modifiedAt: new Date("2023-10-18T13:42:30.603Z"), id: "", - type: "github_repository", - description: - "worth near likewise freckle offensively duh yet rarely dally woot", + type: "license_keys", + description: "furthermore saturate aw sadly ah and poor right", selectable: false, deletable: false, organizationId: "", @@ -49,43 +52,41 @@ let value: PolarCheckoutLegacySchemasCheckout = { id: "", organizationId: "", name: "", - path: "/boot", + path: "/var/mail", mimeType: "", - size: 40256, + size: 407209, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2022-12-06T04:06:39.697Z"), + lastModifiedAt: new Date("2024-04-26T21:45:53.740Z"), version: "", isUploaded: false, - createdAt: new Date("2023-06-21T02:24:58.276Z"), + createdAt: new Date("2023-07-13T01:37:39.797Z"), sizeReadable: "", - publicUrl: "https://smart-guide.net", + publicUrl: "https://afraid-honesty.name/", }, ], }, productPrice: { - createdAt: new Date("2022-06-05T05:25:45.254Z"), - modifiedAt: new Date("2022-11-11T19:39:57.152Z"), + createdAt: new Date("2024-10-29T06:16:02.069Z"), + modifiedAt: new Date("2024-08-27T16:44:25.827Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - minimumAmount: 533877, - maximumAmount: 813932, - presetAmount: 403314, + priceAmount: 873618, }, }; ``` ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the checkout. | -| `url` | *string* | :heavy_minus_sign: | URL the customer should be redirected to complete the purchase. | -| `customerEmail` | *string* | :heavy_check_mark: | N/A | -| `customerName` | *string* | :heavy_check_mark: | N/A | -| `product` | [components.Product](../../models/components/product.md) | :heavy_check_mark: | A product. | -| `productPrice` | *components.ProductPrice* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | The ID of the checkout. | +| `url` | *string* | :heavy_minus_sign: | URL the customer should be redirected to complete the purchase. | +| `customerEmail` | *string* | :heavy_check_mark: | N/A | +| `customerName` | *string* | :heavy_check_mark: | N/A | +| `product` | [components.CheckoutProduct](../../models/components/checkoutproduct.md) | :heavy_check_mark: | Product data for a checkout session. | +| `productPrice` | *components.ProductPrice* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/polarcheckoutlegacyschemascheckoutcreate.md b/docs/models/components/polarcheckoutlegacyschemascheckoutcreate.md index 25dbcc7f..42aa43e8 100644 --- a/docs/models/components/polarcheckoutlegacyschemascheckoutcreate.md +++ b/docs/models/components/polarcheckoutlegacyschemascheckoutcreate.md @@ -7,7 +7,7 @@ import { PolarCheckoutLegacySchemasCheckoutCreate } from "@polar-sh/sdk/models/c let value: PolarCheckoutLegacySchemasCheckoutCreate = { productPriceId: "", - successUrl: "https://rapid-extent.name", + successUrl: "https://right-sock.name", }; ``` diff --git a/docs/models/components/polarcheckoutschemascheckout.md b/docs/models/components/polarcheckoutschemascheckout.md index dd6a0868..34e46123 100644 --- a/docs/models/components/polarcheckoutschemascheckout.md +++ b/docs/models/components/polarcheckoutschemascheckout.md @@ -8,28 +8,28 @@ Checkout session data retrieved using an access token. import { PolarCheckoutSchemasCheckout } from "@polar-sh/sdk/models/components"; let value: PolarCheckoutSchemasCheckout = { - createdAt: new Date("2023-09-25T23:50:30.634Z"), - modifiedAt: new Date("2023-08-09T10:13:51.600Z"), + createdAt: new Date("2023-03-10T23:31:28.664Z"), + modifiedAt: new Date("2024-04-09T16:36:06.881Z"), id: "", - status: "confirmed", + status: "open", clientSecret: "", - url: "https://intent-starboard.net/", - expiresAt: new Date("2023-04-28T21:37:38.772Z"), - successUrl: "https://spirited-apricot.net", + url: "https://self-assured-fat.net/", + expiresAt: new Date("2022-01-26T01:19:06.557Z"), + successUrl: "https://necessary-chasuble.com", embedOrigin: "", - amount: 718538, - taxAmount: 49220, - currency: "Vatu", - totalAmount: 467039, + amount: 928155, + taxAmount: 505017, + currency: "Australian Dollar", + totalAmount: 148557, productId: "", productPriceId: "", isPaymentRequired: false, customerId: "", customerName: "", - customerEmail: "Isaias_Friesen6@gmail.com", + customerEmail: "Jasen82@hotmail.com", customerIpAddress: "", customerBillingAddress: { - country: "Montserrat", + country: "United Arab Emirates", }, customerTaxId: "", paymentProcessorMetadata: {}, @@ -37,35 +37,40 @@ let value: PolarCheckoutSchemasCheckout = { "key": "", }, product: { - createdAt: new Date("2023-07-13T17:41:56.779Z"), - modifiedAt: new Date("2024-01-06T23:16:10.605Z"), + createdAt: new Date("2024-03-09T15:40:10.296Z"), + modifiedAt: new Date("2022-02-27T13:45:36.700Z"), id: "", name: "", - description: "silky however loudly", + description: + "implode ick sans in aha cheerful after weary oval furthermore", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2024-10-18T17:56:31.756Z"), - modifiedAt: new Date("2024-08-06T08:13:26.167Z"), + createdAt: new Date("2023-06-13T17:02:40.832Z"), + modifiedAt: new Date("2022-05-21T23:41:53.158Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 280418, + minimumAmount: 28163, + maximumAmount: 759236, + presetAmount: 73989, }, ], benefits: [ { - createdAt: new Date("2024-10-09T10:00:22.006Z"), - modifiedAt: new Date("2022-05-16T02:56:07.560Z"), + createdAt: new Date("2023-08-13T03:13:38.266Z"), + modifiedAt: new Date("2023-07-23T06:22:31.196Z"), id: "", - type: "custom", - description: "amidst delightfully valentine jealous", + description: "geez abnormally cleaner order mmm", selectable: false, deletable: false, organizationId: "", + properties: { + paidArticles: false, + }, }, ], medias: [ @@ -73,33 +78,49 @@ let value: PolarCheckoutSchemasCheckout = { id: "", organizationId: "", name: "", - path: "/opt/include", + path: "/var/mail", mimeType: "", - size: 627838, + size: 16232, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2024-03-18T18:15:52.333Z"), + lastModifiedAt: new Date("2024-10-05T21:58:09.997Z"), version: "", isUploaded: false, - createdAt: new Date("2024-10-24T10:57:13.571Z"), + createdAt: new Date("2024-08-28T00:21:29.394Z"), sizeReadable: "", - publicUrl: "https://whirlwind-captain.org", + publicUrl: "https://incomparable-cash.net/", }, ], }, productPrice: { - createdAt: new Date("2023-12-21T20:44:36.481Z"), - modifiedAt: new Date("2024-01-09T03:24:34.628Z"), + createdAt: new Date("2023-04-29T19:57:08.545Z"), + modifiedAt: new Date("2023-11-22T13:08:14.775Z"), id: "", isArchived: false, productId: "", - priceCurrency: "", - priceAmount: 973823, - recurringInterval: "year", }, subscriptionId: "", + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2022-04-13T08:13:23.724Z"), + modifiedAt: new Date("2022-05-11T14:20:11.184Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 817785, + required: false, + }, + ], }; ``` @@ -110,6 +131,7 @@ let value: PolarCheckoutSchemasCheckout = { | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Creation timestamp of the object. | | `modifiedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Last modification timestamp of the object. | | `id` | *string* | :heavy_check_mark: | The ID of the object. | +| `customFieldData` | [components.PolarCheckoutSchemasCheckoutCustomFieldData](../../models/components/polarcheckoutschemascheckoutcustomfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | | `paymentProcessor` | [components.PolarEnumsPaymentProcessor](../../models/components/polarenumspaymentprocessor.md) | :heavy_check_mark: | N/A | | `status` | [components.CheckoutStatus](../../models/components/checkoutstatus.md) | :heavy_check_mark: | N/A | | `clientSecret` | *string* | :heavy_check_mark: | Client secret used to update and complete the checkout session from the client. | @@ -132,6 +154,7 @@ let value: PolarCheckoutSchemasCheckout = { | `customerTaxId` | *string* | :heavy_check_mark: | N/A | | `paymentProcessorMetadata` | [components.PaymentProcessorMetadata](../../models/components/paymentprocessormetadata.md) | :heavy_check_mark: | N/A | | `metadata` | Record | :heavy_check_mark: | N/A | -| `product` | [components.Product](../../models/components/product.md) | :heavy_check_mark: | A product. | +| `product` | [components.CheckoutProduct](../../models/components/checkoutproduct.md) | :heavy_check_mark: | Product data for a checkout session. | | `productPrice` | *components.ProductPrice* | :heavy_check_mark: | N/A | -| `subscriptionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `subscriptionId` | *string* | :heavy_check_mark: | N/A | +| `attachedCustomFields` | [components.AttachedCustomField](../../models/components/attachedcustomfield.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/polarcheckoutschemascheckoutcreate.md b/docs/models/components/polarcheckoutschemascheckoutcreate.md index 1d5f320d..2df7bd14 100644 --- a/docs/models/components/polarcheckoutschemascheckoutcreate.md +++ b/docs/models/components/polarcheckoutschemascheckoutcreate.md @@ -20,6 +20,7 @@ let value: PolarCheckoutSchemasCheckoutCreate = { | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `metadata` | Record | :heavy_minus_sign: | Key-value object allowing you to store additional information.

The key must be a string with a maximum length of **40 characters**.
The value must be a string with a maximum length of **500 characters**.
You can store up to **50 key-value pairs**. | +| `customFieldData` | [components.PolarCheckoutSchemasCheckoutCreateCustomFieldData](../../models/components/polarcheckoutschemascheckoutcreatecustomfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | | `paymentProcessor` | [components.PaymentProcessor](../../models/components/paymentprocessor.md) | :heavy_check_mark: | Payment processor to use. Currently only Stripe is supported. | | `productPriceId` | *string* | :heavy_check_mark: | ID of the product price to checkout. | | `amount` | *number* | :heavy_minus_sign: | N/A | diff --git a/docs/models/components/polarcheckoutschemascheckoutcreatecustomfielddata.md b/docs/models/components/polarcheckoutschemascheckoutcreatecustomfielddata.md new file mode 100644 index 00000000..b11341f4 --- /dev/null +++ b/docs/models/components/polarcheckoutschemascheckoutcreatecustomfielddata.md @@ -0,0 +1,16 @@ +# PolarCheckoutSchemasCheckoutCreateCustomFieldData + +Key-value object storing custom field values. + +## Example Usage + +```typescript +import { PolarCheckoutSchemasCheckoutCreateCustomFieldData } from "@polar-sh/sdk/models/components"; + +let value: PolarCheckoutSchemasCheckoutCreateCustomFieldData = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/polarcheckoutschemascheckoutcustomfielddata.md b/docs/models/components/polarcheckoutschemascheckoutcustomfielddata.md new file mode 100644 index 00000000..8004cb94 --- /dev/null +++ b/docs/models/components/polarcheckoutschemascheckoutcustomfielddata.md @@ -0,0 +1,16 @@ +# PolarCheckoutSchemasCheckoutCustomFieldData + +Key-value object storing custom field values. + +## Example Usage + +```typescript +import { PolarCheckoutSchemasCheckoutCustomFieldData } from "@polar-sh/sdk/models/components"; + +let value: PolarCheckoutSchemasCheckoutCustomFieldData = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/polarcheckoutschemascheckoutinput.md b/docs/models/components/polarcheckoutschemascheckoutinput.md index 5b1c8400..11a44740 100644 --- a/docs/models/components/polarcheckoutschemascheckoutinput.md +++ b/docs/models/components/polarcheckoutschemascheckoutinput.md @@ -8,28 +8,28 @@ Checkout session data retrieved using an access token. import { PolarCheckoutSchemasCheckoutInput } from "@polar-sh/sdk/models/components"; let value: PolarCheckoutSchemasCheckoutInput = { - createdAt: new Date("2023-09-14T07:43:31.648Z"), - modifiedAt: new Date("2023-09-10T05:55:09.703Z"), + createdAt: new Date("2023-02-08T14:10:26.713Z"), + modifiedAt: new Date("2022-03-03T22:35:13.208Z"), id: "", - status: "expired", + status: "succeeded", clientSecret: "", - url: "https://deep-backbone.net/", - expiresAt: new Date("2024-03-26T08:49:10.019Z"), - successUrl: "https://same-colon.net", + url: "https://light-haversack.name", + expiresAt: new Date("2024-10-02T02:04:23.656Z"), + successUrl: "https://ill-fraudster.biz/", embedOrigin: "", - amount: 557852, - taxAmount: 108673, - currency: "Uzbekistan Sum", - totalAmount: 902318, + amount: 832764, + taxAmount: 230161, + currency: "Tugrik", + totalAmount: 781342, productId: "", productPriceId: "", isPaymentRequired: false, customerId: "", customerName: "", - customerEmail: "Hector_Boyle96@yahoo.com", + customerEmail: "Joanie_Bins@gmail.com", customerIpAddress: "", customerBillingAddress: { - country: "Republic of Korea", + country: "Oman", }, customerTaxId: "", paymentProcessorMetadata: {}, @@ -37,35 +37,35 @@ let value: PolarCheckoutSchemasCheckoutInput = { "key": "", }, product: { - createdAt: new Date("2022-04-27T05:09:55.285Z"), - modifiedAt: new Date("2023-04-04T17:15:03.449Z"), + createdAt: new Date("2023-05-02T01:12:09.041Z"), + modifiedAt: new Date("2023-02-12T19:18:02.060Z"), id: "", name: "", - description: "sadly deplore rough airline within furthermore joyously", + description: "sugary broadcast whether fooey sesame hyena because", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2023-01-29T03:53:24.003Z"), - modifiedAt: new Date("2024-10-27T18:37:54.806Z"), + createdAt: new Date("2022-03-26T05:37:58.180Z"), + modifiedAt: new Date("2022-07-28T12:33:28.889Z"), id: "", isArchived: false, productId: "", - priceCurrency: "", - priceAmount: 180628, }, ], benefits: [ { - createdAt: new Date("2024-06-03T18:38:58.201Z"), - modifiedAt: new Date("2022-10-01T23:26:22.306Z"), + createdAt: new Date("2022-01-16T03:49:13.516Z"), + modifiedAt: new Date("2024-10-12T04:07:38.112Z"), id: "", - type: "articles", - description: "pulse whoa powerfully aware", + description: "intend quiet augment", selectable: false, deletable: false, organizationId: "", + properties: { + paidArticles: false, + }, }, ], medias: [ @@ -73,32 +73,49 @@ let value: PolarCheckoutSchemasCheckoutInput = { id: "", organizationId: "", name: "", - path: "/var/yp", + path: "/usr/libexec", mimeType: "", - size: 473319, + size: 980859, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2022-03-08T20:27:57.691Z"), + lastModifiedAt: new Date("2024-05-16T15:26:37.196Z"), version: "", isUploaded: false, - createdAt: new Date("2024-12-22T14:23:55.535Z"), + createdAt: new Date("2023-03-13T01:49:16.383Z"), }, ], }, productPrice: { - createdAt: new Date("2022-01-22T16:32:28.279Z"), - modifiedAt: new Date("2023-04-15T12:39:51.701Z"), + createdAt: new Date("2023-12-22T21:21:58.162Z"), + modifiedAt: new Date("2023-07-22T04:52:15.720Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - minimumAmount: 183270, - maximumAmount: 718949, - presetAmount: 7866, + priceAmount: 662228, }, subscriptionId: "", + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2022-06-18T23:13:24.033Z"), + modifiedAt: new Date("2023-04-07T11:06:58.417Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 477409, + required: false, + }, + ], }; ``` @@ -109,6 +126,7 @@ let value: PolarCheckoutSchemasCheckoutInput = { | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Creation timestamp of the object. | | `modifiedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Last modification timestamp of the object. | | `id` | *string* | :heavy_check_mark: | The ID of the object. | +| `customFieldData` | [components.PolarCheckoutSchemasCheckoutCustomFieldData](../../models/components/polarcheckoutschemascheckoutcustomfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | | `paymentProcessor` | [components.PolarEnumsPaymentProcessor](../../models/components/polarenumspaymentprocessor.md) | :heavy_check_mark: | N/A | | `status` | [components.CheckoutStatus](../../models/components/checkoutstatus.md) | :heavy_check_mark: | N/A | | `clientSecret` | *string* | :heavy_check_mark: | Client secret used to update and complete the checkout session from the client. | @@ -131,6 +149,7 @@ let value: PolarCheckoutSchemasCheckoutInput = { | `customerTaxId` | *string* | :heavy_check_mark: | N/A | | `paymentProcessorMetadata` | [components.PaymentProcessorMetadata](../../models/components/paymentprocessormetadata.md) | :heavy_check_mark: | N/A | | `metadata` | Record | :heavy_check_mark: | N/A | -| `product` | [components.ProductInput](../../models/components/productinput.md) | :heavy_check_mark: | A product. | +| `product` | [components.CheckoutProductInput](../../models/components/checkoutproductinput.md) | :heavy_check_mark: | Product data for a checkout session. | | `productPrice` | *components.ProductPrice* | :heavy_check_mark: | N/A | -| `subscriptionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `subscriptionId` | *string* | :heavy_check_mark: | N/A | +| `attachedCustomFields` | [components.AttachedCustomField](../../models/components/attachedcustomfield.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/prices.md b/docs/models/components/prices.md index 26fda574..31f74014 100644 --- a/docs/models/components/prices.md +++ b/docs/models/components/prices.md @@ -7,7 +7,7 @@ ```typescript const value: components.ProductPriceOneTimeFixedCreate = { - priceAmount: 85413, + priceAmount: 717659, }; ``` diff --git a/docs/models/components/product.md b/docs/models/components/product.md index 9a78344a..928dbf30 100644 --- a/docs/models/components/product.md +++ b/docs/models/components/product.md @@ -8,39 +8,41 @@ A product. import { Product } from "@polar-sh/sdk/models/components"; let value: Product = { - createdAt: new Date("2023-10-30T06:49:47.105Z"), - modifiedAt: new Date("2024-04-24T16:23:33.210Z"), + createdAt: new Date("2022-01-29T05:10:32.874Z"), + modifiedAt: new Date("2023-03-01T23:51:11.548Z"), id: "", name: "", - description: "why rarely splurge electrify fooey now punctually", + description: "adrenalin bonfire catch brr than a", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2022-02-12T12:36:40.948Z"), - modifiedAt: new Date("2024-08-08T09:47:23.975Z"), + createdAt: new Date("2024-03-17T01:50:29.399Z"), + modifiedAt: new Date("2022-08-16T22:10:33.984Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - minimumAmount: 77657, - maximumAmount: 287746, - presetAmount: 293369, - recurringInterval: "month", + priceAmount: 164765, }, ], benefits: [ { - createdAt: new Date("2024-07-22T15:57:17.539Z"), - modifiedAt: new Date("2024-04-30T07:02:01.520Z"), + createdAt: new Date("2024-12-13T21:16:19.781Z"), + modifiedAt: new Date("2023-04-08T14:07:06.599Z"), id: "", - type: "downloadables", description: - "across substitution measly intrepid beside foolishly bidet baa", + "governance ice-cream uncover where dependency ha gadzooks burdensome pfft", selectable: false, deletable: false, organizationId: "", + properties: { + repositoryId: "", + repositoryOwner: "polarsource", + repositoryName: "private_repo", + permission: "admin", + }, }, ], medias: [ @@ -48,19 +50,38 @@ let value: Product = { id: "", organizationId: "", name: "", - path: "/opt/lib", + path: "/boot", mimeType: "", - size: 29848, + size: 398054, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2024-11-22T18:03:41.709Z"), + lastModifiedAt: new Date("2024-08-01T01:47:59.550Z"), version: "", isUploaded: false, - createdAt: new Date("2024-04-15T08:28:57.630Z"), + createdAt: new Date("2023-05-04T15:45:49.822Z"), sizeReadable: "", - publicUrl: "https://essential-guidance.biz/", + publicUrl: "https://lawful-reach.biz/", + }, + ], + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2024-10-28T02:42:30.721Z"), + modifiedAt: new Date("2022-07-03T20:54:21.016Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 93386, + required: false, }, ], }; @@ -78,6 +99,7 @@ let value: Product = { | `isRecurring` | *boolean* | :heavy_check_mark: | Whether the product is a subscription tier. | | `isArchived` | *boolean* | :heavy_check_mark: | Whether the product is archived and no longer available. | | `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the product. | -| `prices` | *components.ProductPrice*[] | :heavy_check_mark: | List of available prices for this product. | -| `benefits` | *components.ProductBenefits*[] | :heavy_check_mark: | The benefits granted by the product. | -| `medias` | [components.ProductMediaFileRead](../../models/components/productmediafileread.md)[] | :heavy_check_mark: | The medias associated to the product. | \ No newline at end of file +| `prices` | *components.ProductPrice*[] | :heavy_check_mark: | List of prices for this product. | +| `benefits` | *components.Benefit*[] | :heavy_check_mark: | List of benefits granted by the product. | +| `medias` | [components.ProductMediaFileRead](../../models/components/productmediafileread.md)[] | :heavy_check_mark: | List of medias associated to the product. | +| `attachedCustomFields` | [components.AttachedCustomField](../../models/components/attachedcustomfield.md)[] | :heavy_check_mark: | List of custom fields attached to the product. | \ No newline at end of file diff --git a/docs/models/components/productinput.md b/docs/models/components/productinput.md index 8015d59c..aea35aac 100644 --- a/docs/models/components/productinput.md +++ b/docs/models/components/productinput.md @@ -8,35 +8,50 @@ A product. import { ProductInput } from "@polar-sh/sdk/models/components"; let value: ProductInput = { - createdAt: new Date("2023-08-08T04:58:13.944Z"), - modifiedAt: new Date("2022-02-17T21:54:41.068Z"), + createdAt: new Date("2023-03-27T21:41:18.396Z"), + modifiedAt: new Date("2023-07-17T16:35:31.351Z"), id: "", name: "", - description: - "queasily encouragement and realistic fervently questioningly zowie reassuringly", + description: "chunter meh although", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2023-04-01T22:38:03.818Z"), - modifiedAt: new Date("2023-06-13T17:02:40.832Z"), + createdAt: new Date("2024-08-19T03:07:08.900Z"), + modifiedAt: new Date("2022-12-10T22:08:06.542Z"), id: "", isArchived: false, productId: "", + priceCurrency: "", + minimumAmount: 701423, + maximumAmount: 940098, + presetAmount: 179367, recurringInterval: "month", }, ], benefits: [ { - createdAt: new Date("2024-04-12T02:56:59.471Z"), - modifiedAt: new Date("2022-03-23T02:13:30.603Z"), + createdAt: new Date("2022-02-24T19:52:51.740Z"), + modifiedAt: new Date("2022-11-04T23:36:35.403Z"), id: "", - type: "github_repository", - description: "flint ski jungle tinderbox weakly fooey quickly", + description: + "tarragon given phew surprise whether swill futon eyeglasses minus", selectable: false, deletable: false, organizationId: "", + properties: { + prefix: "", + expires: { + ttl: 700207, + timeframe: "year", + }, + activations: { + limit: 516070, + enableUserAdmin: false, + }, + limitUsage: 387649, + }, }, ], medias: [ @@ -44,17 +59,36 @@ let value: ProductInput = { id: "", organizationId: "", name: "", - path: "/usr/ports", + path: "/etc", mimeType: "", - size: 93378, + size: 120507, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2022-05-11T14:20:11.184Z"), + lastModifiedAt: new Date("2023-03-19T10:26:27.496Z"), version: "", isUploaded: false, - createdAt: new Date("2024-06-15T07:00:27.081Z"), + createdAt: new Date("2022-01-04T20:41:50.241Z"), + }, + ], + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2022-02-28T09:04:13.801Z"), + modifiedAt: new Date("2024-04-18T21:08:09.093Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 889398, + required: false, }, ], }; @@ -72,6 +106,7 @@ let value: ProductInput = { | `isRecurring` | *boolean* | :heavy_check_mark: | Whether the product is a subscription tier. | | `isArchived` | *boolean* | :heavy_check_mark: | Whether the product is archived and no longer available. | | `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the product. | -| `prices` | *components.ProductPrice*[] | :heavy_check_mark: | List of available prices for this product. | -| `benefits` | *components.ProductBenefits*[] | :heavy_check_mark: | The benefits granted by the product. | -| `medias` | [components.ProductMediaFileReadInput](../../models/components/productmediafilereadinput.md)[] | :heavy_check_mark: | The medias associated to the product. | \ No newline at end of file +| `prices` | *components.ProductPrice*[] | :heavy_check_mark: | List of prices for this product. | +| `benefits` | *components.BenefitInput*[] | :heavy_check_mark: | List of benefits granted by the product. | +| `medias` | [components.ProductMediaFileReadInput](../../models/components/productmediafilereadinput.md)[] | :heavy_check_mark: | List of medias associated to the product. | +| `attachedCustomFields` | [components.AttachedCustomField](../../models/components/attachedcustomfield.md)[] | :heavy_check_mark: | List of custom fields attached to the product. | \ No newline at end of file diff --git a/docs/models/components/productmediafilecreate.md b/docs/models/components/productmediafilecreate.md index af3b76c0..1fec5d03 100644 --- a/docs/models/components/productmediafilecreate.md +++ b/docs/models/components/productmediafilecreate.md @@ -10,13 +10,13 @@ import { ProductMediaFileCreate } from "@polar-sh/sdk/models/components"; let value: ProductMediaFileCreate = { name: "", mimeType: "", - size: 894928, + size: 888924, upload: { parts: [ { - number: 447246, - chunkStart: 479840, - chunkEnd: 635909, + number: 905059, + chunkStart: 76555, + chunkEnd: 857243, }, ], }, diff --git a/docs/models/components/productmediafileread.md b/docs/models/components/productmediafileread.md index 8f1872f6..31b53ffa 100644 --- a/docs/models/components/productmediafileread.md +++ b/docs/models/components/productmediafileread.md @@ -11,19 +11,19 @@ let value: ProductMediaFileRead = { id: "", organizationId: "", name: "", - path: "/lost+found", + path: "/usr/src", mimeType: "", - size: 434302, + size: 338103, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2023-12-26T14:51:25.668Z"), + lastModifiedAt: new Date("2023-10-31T22:14:28.998Z"), version: "", isUploaded: false, - createdAt: new Date("2022-05-20T06:52:25.822Z"), + createdAt: new Date("2022-05-14T15:19:31.084Z"), sizeReadable: "", - publicUrl: "https://infatuated-majority.name/", + publicUrl: "https://first-vanadyl.info", }; ``` diff --git a/docs/models/components/productmediafilereadinput.md b/docs/models/components/productmediafilereadinput.md index 6a45a11b..ade7e4e7 100644 --- a/docs/models/components/productmediafilereadinput.md +++ b/docs/models/components/productmediafilereadinput.md @@ -11,17 +11,17 @@ let value: ProductMediaFileReadInput = { id: "", organizationId: "", name: "", - path: "/opt/share", + path: "/sys", mimeType: "", - size: 802870, + size: 428114, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2022-01-01T03:57:20.246Z"), + lastModifiedAt: new Date("2023-09-14T23:46:17.041Z"), version: "", isUploaded: false, - createdAt: new Date("2022-05-07T01:41:54.981Z"), + createdAt: new Date("2024-05-15T14:40:00.265Z"), }; ``` diff --git a/docs/models/components/productonetimecreate.md b/docs/models/components/productonetimecreate.md index 877db4fa..d1801432 100644 --- a/docs/models/components/productonetimecreate.md +++ b/docs/models/components/productonetimecreate.md @@ -10,7 +10,9 @@ import { ProductOneTimeCreate } from "@polar-sh/sdk/models/components"; let value: ProductOneTimeCreate = { name: "", prices: [ - {}, + { + priceAmount: 455389, + }, ], }; ``` @@ -23,4 +25,5 @@ let value: ProductOneTimeCreate = { | `description` | *string* | :heavy_minus_sign: | The description of the product. | | `prices` | *components.Prices*[] | :heavy_check_mark: | List of available prices for this product. | | `medias` | *string*[] | :heavy_minus_sign: | List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded. | +| `attachedCustomFields` | [components.AttachedCustomFieldCreate](../../models/components/attachedcustomfieldcreate.md)[] | :heavy_minus_sign: | List of custom fields to attach. | | `organizationId` | *string* | :heavy_minus_sign: | The ID of the organization owning the product. **Required unless you use an organization token.** | \ No newline at end of file diff --git a/docs/models/components/productprice.md b/docs/models/components/productprice.md index e618c4a0..bff3ed27 100644 --- a/docs/models/components/productprice.md +++ b/docs/models/components/productprice.md @@ -7,15 +7,13 @@ ```typescript const value: components.ProductPriceRecurring = { - createdAt: new Date("2024-04-12T10:50:35.073Z"), - modifiedAt: new Date("2023-06-25T05:48:49.363Z"), + createdAt: new Date("2023-04-19T01:15:36.545Z"), + modifiedAt: new Date("2024-05-27T19:49:50.767Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - minimumAmount: 204877, - maximumAmount: 810004, - presetAmount: 567821, + priceAmount: 100258, recurringInterval: "month", }; ``` @@ -24,8 +22,8 @@ const value: components.ProductPriceRecurring = { ```typescript const value: components.ProductPriceOneTime = { - createdAt: new Date("2024-11-16T14:38:37.631Z"), - modifiedAt: new Date("2023-01-15T09:29:40.220Z"), + createdAt: new Date("2023-12-11T17:13:09.073Z"), + modifiedAt: new Date("2023-09-10T01:46:44.404Z"), id: "", isArchived: false, productId: "", diff --git a/docs/models/components/productpriceonetime.md b/docs/models/components/productpriceonetime.md index 712723f5..7ff51978 100644 --- a/docs/models/components/productpriceonetime.md +++ b/docs/models/components/productpriceonetime.md @@ -7,13 +7,13 @@ ```typescript const value: components.ProductPriceOneTimeFixed = { - createdAt: new Date("2022-10-21T09:09:39.528Z"), - modifiedAt: new Date("2022-04-13T15:39:03.902Z"), + createdAt: new Date("2022-10-02T02:39:34.529Z"), + modifiedAt: new Date("2024-11-16T17:16:25.681Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 280706, + priceAmount: 771303, }; ``` @@ -21,15 +21,15 @@ const value: components.ProductPriceOneTimeFixed = { ```typescript const value: components.ProductPriceOneTimeCustom = { - createdAt: new Date("2023-06-01T17:48:08.887Z"), - modifiedAt: new Date("2024-06-14T23:45:05.207Z"), + createdAt: new Date("2022-11-26T03:39:31.331Z"), + modifiedAt: new Date("2023-11-08T00:51:46.255Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - minimumAmount: 452515, - maximumAmount: 971436, - presetAmount: 541633, + minimumAmount: 307848, + maximumAmount: 99467, + presetAmount: 824149, }; ``` @@ -37,8 +37,8 @@ const value: components.ProductPriceOneTimeCustom = { ```typescript const value: components.ProductPriceOneTimeFree = { - createdAt: new Date("2022-01-28T08:10:11.447Z"), - modifiedAt: new Date("2023-04-01T05:49:17.271Z"), + createdAt: new Date("2023-12-31T17:23:17.649Z"), + modifiedAt: new Date("2023-11-04T22:40:23.273Z"), id: "", isArchived: false, productId: "", diff --git a/docs/models/components/productpriceonetimecustom.md b/docs/models/components/productpriceonetimecustom.md index 16bbc31c..3a927471 100644 --- a/docs/models/components/productpriceonetimecustom.md +++ b/docs/models/components/productpriceonetimecustom.md @@ -8,15 +8,15 @@ A pay-what-you-want price for a one-time product. import { ProductPriceOneTimeCustom } from "@polar-sh/sdk/models/components"; let value: ProductPriceOneTimeCustom = { - createdAt: new Date("2023-07-07T01:15:14.096Z"), - modifiedAt: new Date("2022-01-29T05:00:23.216Z"), + createdAt: new Date("2022-06-28T23:33:37.930Z"), + modifiedAt: new Date("2022-02-22T12:02:15.142Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - minimumAmount: 774353, - maximumAmount: 560374, - presetAmount: 82493, + minimumAmount: 191151, + maximumAmount: 250180, + presetAmount: 783643, }; ``` diff --git a/docs/models/components/productpriceonetimefixed.md b/docs/models/components/productpriceonetimefixed.md index 5af7bbc7..b687f8d4 100644 --- a/docs/models/components/productpriceonetimefixed.md +++ b/docs/models/components/productpriceonetimefixed.md @@ -8,13 +8,13 @@ A one-time price for a product. import { ProductPriceOneTimeFixed } from "@polar-sh/sdk/models/components"; let value: ProductPriceOneTimeFixed = { - createdAt: new Date("2024-01-26T00:48:07.635Z"), - modifiedAt: new Date("2022-09-14T18:48:26.866Z"), + createdAt: new Date("2022-06-05T19:42:55.635Z"), + modifiedAt: new Date("2023-02-18T14:31:39.305Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 698630, + priceAmount: 876636, }; ``` diff --git a/docs/models/components/productpriceonetimefixedcreate.md b/docs/models/components/productpriceonetimefixedcreate.md index d2dfd41b..01eb1dfa 100644 --- a/docs/models/components/productpriceonetimefixedcreate.md +++ b/docs/models/components/productpriceonetimefixedcreate.md @@ -8,7 +8,7 @@ Schema to create a one-time product price. import { ProductPriceOneTimeFixedCreate } from "@polar-sh/sdk/models/components"; let value: ProductPriceOneTimeFixedCreate = { - priceAmount: 676639, + priceAmount: 120388, }; ``` diff --git a/docs/models/components/productpriceonetimefree.md b/docs/models/components/productpriceonetimefree.md index 506c3658..4517b75f 100644 --- a/docs/models/components/productpriceonetimefree.md +++ b/docs/models/components/productpriceonetimefree.md @@ -8,8 +8,8 @@ A free one-time price for a product. import { ProductPriceOneTimeFree } from "@polar-sh/sdk/models/components"; let value: ProductPriceOneTimeFree = { - createdAt: new Date("2023-06-05T20:01:47.770Z"), - modifiedAt: new Date("2022-11-11T20:57:07.064Z"), + createdAt: new Date("2023-12-12T08:42:47.730Z"), + modifiedAt: new Date("2022-01-20T00:11:01.003Z"), id: "", isArchived: false, productId: "", diff --git a/docs/models/components/productpricerecurring.md b/docs/models/components/productpricerecurring.md index e4922d71..1047a371 100644 --- a/docs/models/components/productpricerecurring.md +++ b/docs/models/components/productpricerecurring.md @@ -7,14 +7,14 @@ ```typescript const value: components.ProductPriceRecurringFixed = { - createdAt: new Date("2022-11-18T16:32:46.604Z"), - modifiedAt: new Date("2022-03-31T15:00:51.435Z"), + createdAt: new Date("2022-07-08T02:50:24.146Z"), + modifiedAt: new Date("2024-05-20T19:20:37.460Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 664491, - recurringInterval: "year", + priceAmount: 141414, + recurringInterval: "month", }; ``` @@ -22,16 +22,16 @@ const value: components.ProductPriceRecurringFixed = { ```typescript const value: components.ProductPriceRecurringCustom = { - createdAt: new Date("2022-05-30T01:09:06.183Z"), - modifiedAt: new Date("2023-06-16T17:38:20.192Z"), + createdAt: new Date("2024-05-21T08:36:06.500Z"), + modifiedAt: new Date("2023-02-09T16:03:01.500Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - minimumAmount: 98238, - maximumAmount: 34109, - presetAmount: 664501, - recurringInterval: "year", + minimumAmount: 312617, + maximumAmount: 278672, + presetAmount: 324972, + recurringInterval: "month", }; ``` @@ -39,8 +39,8 @@ const value: components.ProductPriceRecurringCustom = { ```typescript const value: components.ProductPriceRecurringFree = { - createdAt: new Date("2023-01-05T23:27:19.376Z"), - modifiedAt: new Date("2024-08-17T20:07:37.732Z"), + createdAt: new Date("2024-02-03T05:15:20.926Z"), + modifiedAt: new Date("2022-09-21T07:51:24.980Z"), id: "", isArchived: false, productId: "", diff --git a/docs/models/components/productpricerecurringcustom.md b/docs/models/components/productpricerecurringcustom.md index 6f2282b7..29004e82 100644 --- a/docs/models/components/productpricerecurringcustom.md +++ b/docs/models/components/productpricerecurringcustom.md @@ -8,15 +8,15 @@ A pay-what-you-want recurring price for a product, i.e. a subscription. import { ProductPriceRecurringCustom } from "@polar-sh/sdk/models/components"; let value: ProductPriceRecurringCustom = { - createdAt: new Date("2022-02-11T16:01:53.719Z"), - modifiedAt: new Date("2022-05-21T17:10:05.507Z"), + createdAt: new Date("2023-08-17T13:50:34.495Z"), + modifiedAt: new Date("2023-11-20T01:05:43.827Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - minimumAmount: 55790, - maximumAmount: 905001, - presetAmount: 134795, + minimumAmount: 314053, + maximumAmount: 828001, + presetAmount: 782079, recurringInterval: "year", }; ``` diff --git a/docs/models/components/productpricerecurringfixed.md b/docs/models/components/productpricerecurringfixed.md index 4ad5bf42..7b21ac1e 100644 --- a/docs/models/components/productpricerecurringfixed.md +++ b/docs/models/components/productpricerecurringfixed.md @@ -8,14 +8,14 @@ A recurring price for a product, i.e. a subscription. import { ProductPriceRecurringFixed } from "@polar-sh/sdk/models/components"; let value: ProductPriceRecurringFixed = { - createdAt: new Date("2022-09-18T19:19:03.998Z"), - modifiedAt: new Date("2024-09-15T03:51:48.041Z"), + createdAt: new Date("2024-04-30T17:28:03.068Z"), + modifiedAt: new Date("2024-09-27T19:30:45.650Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 508510, - recurringInterval: "year", + priceAmount: 612836, + recurringInterval: "month", }; ``` diff --git a/docs/models/components/productpricerecurringfixedcreate.md b/docs/models/components/productpricerecurringfixedcreate.md index 4b2c95d8..790ea879 100644 --- a/docs/models/components/productpricerecurringfixedcreate.md +++ b/docs/models/components/productpricerecurringfixedcreate.md @@ -8,7 +8,7 @@ Schema to create a recurring product price, i.e. a subscription. import { ProductPriceRecurringFixedCreate } from "@polar-sh/sdk/models/components"; let value: ProductPriceRecurringFixedCreate = { - priceAmount: 475876, + priceAmount: 225621, recurringInterval: "month", }; ``` diff --git a/docs/models/components/productpricerecurringfree.md b/docs/models/components/productpricerecurringfree.md index ccf02183..dbdb7ec0 100644 --- a/docs/models/components/productpricerecurringfree.md +++ b/docs/models/components/productpricerecurringfree.md @@ -8,12 +8,12 @@ A free recurring price for a product, i.e. a subscription. import { ProductPriceRecurringFree } from "@polar-sh/sdk/models/components"; let value: ProductPriceRecurringFree = { - createdAt: new Date("2023-01-20T17:37:00.236Z"), - modifiedAt: new Date("2024-05-27T10:54:59.560Z"), + createdAt: new Date("2022-06-08T22:29:24.231Z"), + modifiedAt: new Date("2024-02-04T07:55:19.464Z"), id: "", isArchived: false, productId: "", - recurringInterval: "month", + recurringInterval: "year", }; ``` diff --git a/docs/models/components/productpricetype.md b/docs/models/components/productpricetype.md index f32a0e5b..b764ca10 100644 --- a/docs/models/components/productpricetype.md +++ b/docs/models/components/productpricetype.md @@ -5,7 +5,7 @@ ```typescript import { ProductPriceType } from "@polar-sh/sdk/models/components"; -let value: ProductPriceType = "recurring"; +let value: ProductPriceType = "one_time"; ``` ## Values diff --git a/docs/models/components/productrecurringcreate.md b/docs/models/components/productrecurringcreate.md index 55163edb..98bc0722 100644 --- a/docs/models/components/productrecurringcreate.md +++ b/docs/models/components/productrecurringcreate.md @@ -11,7 +11,8 @@ let value: ProductRecurringCreate = { name: "", prices: [ { - recurringInterval: "year", + priceAmount: 61893, + recurringInterval: "month", }, ], }; @@ -25,4 +26,5 @@ let value: ProductRecurringCreate = { | `description` | *string* | :heavy_minus_sign: | The description of the product. | | `prices` | *components.ProductRecurringCreatePrices* | :heavy_check_mark: | List of available prices for this product. | | `medias` | *string*[] | :heavy_minus_sign: | List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded. | +| `attachedCustomFields` | [components.AttachedCustomFieldCreate](../../models/components/attachedcustomfieldcreate.md)[] | :heavy_minus_sign: | List of custom fields to attach. | | `organizationId` | *string* | :heavy_minus_sign: | The ID of the organization owning the product. **Required unless you use an organization token.** | \ No newline at end of file diff --git a/docs/models/components/productrecurringcreateprices.md b/docs/models/components/productrecurringcreateprices.md index 8195cac1..1aabfee2 100644 --- a/docs/models/components/productrecurringcreateprices.md +++ b/docs/models/components/productrecurringcreateprices.md @@ -10,7 +10,7 @@ List of available prices for this product. ```typescript const value: components.ProductPriceRecurringFixedCreate[] = [ { - priceAmount: 778968, + priceAmount: 280418, recurringInterval: "month", }, ]; diff --git a/docs/models/components/productupdate.md b/docs/models/components/productupdate.md index 6c8d2952..a5aeaf7a 100644 --- a/docs/models/components/productupdate.md +++ b/docs/models/components/productupdate.md @@ -18,4 +18,5 @@ let value: ProductUpdate = {}; | `description` | *string* | :heavy_minus_sign: | The description of the product. | | `isArchived` | *boolean* | :heavy_minus_sign: | Whether the product is archived. If `true`, the product won't be available for purchase anymore. Existing customers will still have access to their benefits, and subscriptions will continue normally. | | `prices` | *components.ProductUpdatePrices*[] | :heavy_minus_sign: | List of available prices for this product. If you want to keep existing prices, include them in the list as an `ExistingProductPrice` object. | -| `medias` | *string*[] | :heavy_minus_sign: | List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded. | \ No newline at end of file +| `medias` | *string*[] | :heavy_minus_sign: | List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded. | +| `attachedCustomFields` | [components.AttachedCustomFieldCreate](../../models/components/attachedcustomfieldcreate.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/productupdateprices.md b/docs/models/components/productupdateprices.md index dcbecdb9..99c489cb 100644 --- a/docs/models/components/productupdateprices.md +++ b/docs/models/components/productupdateprices.md @@ -15,8 +15,8 @@ const value: components.ExistingProductPrice = { ```typescript const value: components.ProductPriceRecurringFixedCreate = { - priceAmount: 618782, - recurringInterval: "year", + priceAmount: 365518, + recurringInterval: "month", }; ``` @@ -32,7 +32,7 @@ const value: components.ProductPriceRecurringFreeCreate = { ```typescript const value: components.ProductPriceOneTimeFixedCreate = { - priceAmount: 829708, + priceAmount: 705317, }; ``` diff --git a/docs/models/components/reactions.md b/docs/models/components/reactions.md index 6075a481..c4b8216c 100644 --- a/docs/models/components/reactions.md +++ b/docs/models/components/reactions.md @@ -6,15 +6,15 @@ import { Reactions } from "@polar-sh/sdk/models/components"; let value: Reactions = { - totalCount: 589391, - plusOne: 163795, - minusOne: 887499, - laugh: 425759, - hooray: 438894, - confused: 678472, - heart: 888394, - rocket: 744045, - eyes: 441348, + totalCount: 539732, + plusOne: 860632, + minusOne: 268379, + laugh: 24896, + hooray: 276086, + confused: 940723, + heart: 20512, + rocket: 121552, + eyes: 173724, }; ``` diff --git a/docs/models/components/repository.md b/docs/models/components/repository.md index 001b8ed3..bdf08c76 100644 --- a/docs/models/components/repository.md +++ b/docs/models/components/repository.md @@ -6,28 +6,49 @@ import { Repository } from "@polar-sh/sdk/models/components"; let value: Repository = { - id: "878b612f-0bf2-4b43-bde5-a2ce5ae0d968", + id: "33b7ac97-682c-4ecd-9d2f-a6e9fc5bb5e2", isPrivate: false, name: "MyOrg", - description: "past finer square vice indolent stir-fry psst custom", + description: + "emphasise signature but shyly idealistic maroon ameliorate lest", stars: 1337, license: "", homepage: "", profileSettings: {}, organization: { - id: "cf7c2cf8-42e5-4766-9cea-f39abc5e2479", + id: "1b5220cb-746e-4103-8801-b7fe46e95cea", name: "", - avatarUrl: "https://known-breastplate.net", + avatarUrl: "https://innocent-precedent.info", isPersonal: false, bio: "", prettyName: "", - company: "Hegmann, Luettgen and McCullough", + company: "Bernhard, Crist and Dietrich", blog: "", location: "", - email: "Camryn.Reichert56@hotmail.com", + email: "Darron.Pouros23@gmail.com", twitterUsername: "", organizationId: "", }, + internalOrganization: { + createdAt: new Date("2023-03-13T23:04:07.056Z"), + modifiedAt: new Date("2024-11-16T14:49:58.732Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://friendly-bathrobe.info/", + bio: "", + company: "Ruecker - Brown", + blog: "", + location: "", + email: "Dudley_Stamm57@gmail.com", + twitterUsername: "", + pledgeMinimumAmount: 318878, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 592218, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, }; ``` @@ -44,4 +65,5 @@ let value: Repository = { | `license` | *string* | :heavy_check_mark: | N/A | | | `homepage` | *string* | :heavy_check_mark: | N/A | | | `profileSettings` | [components.RepositoryProfileSettings](../../models/components/repositoryprofilesettings.md) | :heavy_check_mark: | Settings for the repository profile | | -| `organization` | [components.ExternalOrganization](../../models/components/externalorganization.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `organization` | [components.ExternalOrganization](../../models/components/externalorganization.md) | :heavy_check_mark: | N/A | | +| `internalOrganization` | [components.Organization](../../models/components/organization.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/components/repositorysortproperty.md b/docs/models/components/repositorysortproperty.md index f8a144bb..26975510 100644 --- a/docs/models/components/repositorysortproperty.md +++ b/docs/models/components/repositorysortproperty.md @@ -5,7 +5,7 @@ ```typescript import { RepositorySortProperty } from "@polar-sh/sdk/models/components"; -let value: RepositorySortProperty = "name"; +let value: RepositorySortProperty = "stars"; ``` ## Values diff --git a/docs/models/components/s3downloadurl.md b/docs/models/components/s3downloadurl.md index a958735e..786f685e 100644 --- a/docs/models/components/s3downloadurl.md +++ b/docs/models/components/s3downloadurl.md @@ -6,8 +6,8 @@ import { S3DownloadURL } from "@polar-sh/sdk/models/components"; let value: S3DownloadURL = { - url: "https://pitiful-casement.name/", - expiresAt: new Date("2022-10-26T03:44:56.705Z"), + url: "https://thrifty-obesity.com/", + expiresAt: new Date("2023-12-04T19:32:29.581Z"), }; ``` diff --git a/docs/models/components/s3filecreatemultipart.md b/docs/models/components/s3filecreatemultipart.md index 1ee965b1..636ae23a 100644 --- a/docs/models/components/s3filecreatemultipart.md +++ b/docs/models/components/s3filecreatemultipart.md @@ -8,9 +8,9 @@ import { S3FileCreateMultipart } from "@polar-sh/sdk/models/components"; let value: S3FileCreateMultipart = { parts: [ { - number: 401260, - chunkStart: 715995, - chunkEnd: 231322, + number: 839715, + chunkStart: 164585, + chunkEnd: 569596, }, ], }; diff --git a/docs/models/components/s3filecreatepart.md b/docs/models/components/s3filecreatepart.md index 7e72fc46..ea92b4e6 100644 --- a/docs/models/components/s3filecreatepart.md +++ b/docs/models/components/s3filecreatepart.md @@ -6,9 +6,9 @@ import { S3FileCreatePart } from "@polar-sh/sdk/models/components"; let value: S3FileCreatePart = { - number: 470724, - chunkStart: 821046, - chunkEnd: 142769, + number: 940497, + chunkStart: 966607, + chunkEnd: 844253, }; ``` diff --git a/docs/models/components/s3fileuploadcompletedpart.md b/docs/models/components/s3fileuploadcompletedpart.md index f470ea04..4c956fdf 100644 --- a/docs/models/components/s3fileuploadcompletedpart.md +++ b/docs/models/components/s3fileuploadcompletedpart.md @@ -6,7 +6,7 @@ import { S3FileUploadCompletedPart } from "@polar-sh/sdk/models/components"; let value: S3FileUploadCompletedPart = { - number: 98864, + number: 314769, checksumEtag: "", checksumSha256Base64: "", }; diff --git a/docs/models/components/s3fileuploadmultipart.md b/docs/models/components/s3fileuploadmultipart.md index 53cc6c86..2a64ed87 100644 --- a/docs/models/components/s3fileuploadmultipart.md +++ b/docs/models/components/s3fileuploadmultipart.md @@ -7,14 +7,14 @@ import { S3FileUploadMultipart } from "@polar-sh/sdk/models/components"; let value: S3FileUploadMultipart = { id: "", - path: "/home/user", + path: "/tmp", parts: [ { - number: 226158, - chunkStart: 690696, - chunkEnd: 151557, - url: "https://best-dandelion.com/", - expiresAt: new Date("2024-02-05T09:06:07.394Z"), + number: 649722, + chunkStart: 644678, + chunkEnd: 864630, + url: "https://amazing-lid.info/", + expiresAt: new Date("2024-12-21T15:53:12.734Z"), }, ], }; diff --git a/docs/models/components/s3fileuploadpart.md b/docs/models/components/s3fileuploadpart.md index 8231cf83..ff72f5ef 100644 --- a/docs/models/components/s3fileuploadpart.md +++ b/docs/models/components/s3fileuploadpart.md @@ -6,11 +6,11 @@ import { S3FileUploadPart } from "@polar-sh/sdk/models/components"; let value: S3FileUploadPart = { - number: 404429, - chunkStart: 377668, - chunkEnd: 485638, - url: "https://haunting-mouser.biz/", - expiresAt: new Date("2023-05-22T07:36:17.577Z"), + number: 357536, + chunkStart: 389104, + chunkEnd: 835707, + url: "https://blaring-backbone.name", + expiresAt: new Date("2023-03-11T20:41:59.793Z"), }; ``` diff --git a/docs/models/components/state.md b/docs/models/components/state.md index 68f73169..02db5f48 100644 --- a/docs/models/components/state.md +++ b/docs/models/components/state.md @@ -5,7 +5,7 @@ ```typescript import { State } from "@polar-sh/sdk/models/components"; -let value: State = "closed"; +let value: State = "open"; ``` ## Values diff --git a/docs/models/components/subscription.md b/docs/models/components/subscription.md index 18052ca3..83304448 100644 --- a/docs/models/components/subscription.md +++ b/docs/models/components/subscription.md @@ -6,18 +6,18 @@ import { Subscription } from "@polar-sh/sdk/models/components"; let value: Subscription = { - createdAt: new Date("2024-10-11T11:53:45.934Z"), - modifiedAt: new Date("2022-12-24T08:11:07.237Z"), + createdAt: new Date("2022-01-03T21:02:39.550Z"), + modifiedAt: new Date("2023-06-15T22:08:56.852Z"), id: "", - amount: 510783, - currency: "Armenian Dram", - recurringInterval: "year", - status: "incomplete_expired", - currentPeriodStart: new Date("2024-10-01T14:41:12.462Z"), - currentPeriodEnd: new Date("2023-12-27T07:38:47.221Z"), + amount: 756343, + currency: "Cape Verde Escudo", + recurringInterval: "month", + status: "active", + currentPeriodStart: new Date("2022-10-13T09:29:12.610Z"), + currentPeriodEnd: new Date("2024-08-21T02:40:22.469Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2022-11-07T20:19:04.814Z"), - endedAt: new Date("2022-10-13T22:56:22.312Z"), + startedAt: new Date("2024-10-10T23:18:29.379Z"), + endedAt: new Date("2024-04-01T06:33:23.449Z"), userId: "", productId: "", priceId: "", @@ -26,43 +26,44 @@ let value: Subscription = { "key": "", }, user: { - email: "Prince_Gorczany@gmail.com", + email: "Logan.Gleichner@gmail.com", publicName: "", githubUsername: "", - avatarUrl: "https://cloudy-pilot.biz", + avatarUrl: "https://violent-design.net/", }, product: { - createdAt: new Date("2024-01-24T12:14:09.677Z"), - modifiedAt: new Date("2024-11-19T23:25:44.878Z"), + createdAt: new Date("2022-01-28T01:28:09.985Z"), + modifiedAt: new Date("2022-07-21T02:15:38.786Z"), id: "", name: "", description: - "amongst repeatedly motor though wearily empty idolized after phooey", + "up heating avaricious vainly considering gadzooks viability individual specific", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2024-03-15T03:24:47.536Z"), - modifiedAt: new Date("2022-05-07T06:16:53.403Z"), + createdAt: new Date("2024-12-05T19:52:32.444Z"), + modifiedAt: new Date("2024-08-07T07:44:13.681Z"), id: "", isArchived: false, productId: "", + recurringInterval: "year", }, ], benefits: [ { - createdAt: new Date("2023-11-01T07:55:23.905Z"), - modifiedAt: new Date("2023-11-23T23:04:45.955Z"), + createdAt: new Date("2024-07-22T20:45:22.257Z"), + modifiedAt: new Date("2024-08-31T14:34:42.904Z"), id: "", - description: - "athwart legging zowie pace exalt vanadyl bank shyly rapidly", + description: "out experienced sunbathe whose synthesise", selectable: false, deletable: false, organizationId: "", properties: { - paidArticles: false, + note: "", }, + isTaxApplicable: false, }, ], medias: [ @@ -70,33 +71,52 @@ let value: Subscription = { id: "", organizationId: "", name: "", - path: "/opt/bin", + path: "/srv", mimeType: "", - size: 927050, + size: 163928, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2023-06-11T19:54:13.878Z"), + lastModifiedAt: new Date("2024-11-08T08:55:48.564Z"), version: "", isUploaded: false, - createdAt: new Date("2023-03-26T22:23:48.290Z"), + createdAt: new Date("2023-08-07T14:30:02.776Z"), sizeReadable: "", - publicUrl: "https://able-finding.org", + publicUrl: "https://inborn-pupil.org/", + }, + ], + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2022-06-03T18:10:10.891Z"), + modifiedAt: new Date("2024-08-13T11:33:11.689Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 590167, + required: false, }, ], }, price: { - createdAt: new Date("2023-01-17T19:57:19.728Z"), - modifiedAt: new Date("2023-10-07T05:55:22.645Z"), + createdAt: new Date("2023-05-24T22:42:36.749Z"), + modifiedAt: new Date("2024-05-20T21:27:59.894Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - minimumAmount: 404676, - maximumAmount: 329503, - presetAmount: 265973, - recurringInterval: "month", + minimumAmount: 844775, + maximumAmount: 657897, + presetAmount: 58461, + recurringInterval: "year", }, }; ``` @@ -122,6 +142,7 @@ let value: Subscription = { | `priceId` | *string* | :heavy_check_mark: | N/A | | `checkoutId` | *string* | :heavy_check_mark: | N/A | | `metadata` | Record | :heavy_check_mark: | N/A | +| `customFieldData` | [components.SubscriptionCustomFieldData](../../models/components/subscriptioncustomfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | | `user` | [components.SubscriptionUser](../../models/components/subscriptionuser.md) | :heavy_check_mark: | N/A | | `product` | [components.Product](../../models/components/product.md) | :heavy_check_mark: | A product. | | `price` | *components.ProductPriceRecurring* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/subscriptioncustomfielddata.md b/docs/models/components/subscriptioncustomfielddata.md new file mode 100644 index 00000000..9bddac83 --- /dev/null +++ b/docs/models/components/subscriptioncustomfielddata.md @@ -0,0 +1,16 @@ +# SubscriptionCustomFieldData + +Key-value object storing custom field values. + +## Example Usage + +```typescript +import { SubscriptionCustomFieldData } from "@polar-sh/sdk/models/components"; + +let value: SubscriptionCustomFieldData = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/subscriptioninput.md b/docs/models/components/subscriptioninput.md index 2589ba27..f3bd33e6 100644 --- a/docs/models/components/subscriptioninput.md +++ b/docs/models/components/subscriptioninput.md @@ -6,18 +6,18 @@ import { SubscriptionInput } from "@polar-sh/sdk/models/components"; let value: SubscriptionInput = { - createdAt: new Date("2024-01-31T00:02:32.101Z"), - modifiedAt: new Date("2022-08-22T03:03:24.232Z"), + createdAt: new Date("2023-12-14T18:14:41.004Z"), + modifiedAt: new Date("2024-08-13T17:10:17.807Z"), id: "", - amount: 689958, - currency: "Vatu", + amount: 815315, + currency: "Surinam Dollar", recurringInterval: "year", - status: "canceled", - currentPeriodStart: new Date("2023-08-14T21:39:34.088Z"), - currentPeriodEnd: new Date("2024-07-06T14:11:46.257Z"), + status: "incomplete", + currentPeriodStart: new Date("2024-01-24T18:32:15.375Z"), + currentPeriodEnd: new Date("2022-11-28T08:15:52.623Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2023-05-17T16:54:40.123Z"), - endedAt: new Date("2023-02-18T02:26:35.615Z"), + startedAt: new Date("2024-05-08T14:24:55.853Z"), + endedAt: new Date("2023-02-06T21:19:44.981Z"), userId: "", productId: "", priceId: "", @@ -26,42 +26,48 @@ let value: SubscriptionInput = { "key": "", }, user: { - email: "Corbin12@hotmail.com", + email: "Leland26@gmail.com", publicName: "", githubUsername: "", - avatarUrl: "https://all-mainstream.com", + avatarUrl: "https://joyous-giant.net/", }, product: { - createdAt: new Date("2023-07-15T07:08:04.117Z"), - modifiedAt: new Date("2024-04-25T07:01:38.359Z"), + createdAt: new Date("2023-04-27T14:18:23.756Z"), + modifiedAt: new Date("2022-09-30T19:12:28.413Z"), id: "", name: "", - description: "unlike eek courtroom and intend begonia", + description: "tenement amidst decent", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2022-09-07T18:36:36.075Z"), - modifiedAt: new Date("2022-09-06T13:05:11.308Z"), + createdAt: new Date("2022-07-20T04:32:07.356Z"), + modifiedAt: new Date("2024-12-27T12:13:46.111Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 430547, - recurringInterval: "month", + priceAmount: 778597, }, ], benefits: [ { - createdAt: new Date("2024-08-23T20:04:23.090Z"), - modifiedAt: new Date("2022-08-11T04:48:17.830Z"), + createdAt: new Date("2023-06-01T17:57:52.601Z"), + modifiedAt: new Date("2023-02-20T00:47:22.305Z"), id: "", - type: "articles", - description: "teeming anneal masquerade", + description: "thorn underneath drat typify brood", selectable: false, deletable: false, organizationId: "", + properties: { + archived: { + "key": false, + }, + files: [ + "", + ], + }, }, ], medias: [ @@ -69,28 +75,49 @@ let value: SubscriptionInput = { id: "", organizationId: "", name: "", - path: "/bin", + path: "/etc/defaults", mimeType: "", - size: 344026, + size: 364915, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2022-10-14T16:34:12.050Z"), + lastModifiedAt: new Date("2024-02-02T20:11:50.129Z"), version: "", isUploaded: false, - createdAt: new Date("2023-03-04T12:22:36.931Z"), + createdAt: new Date("2024-06-25T06:53:42.834Z"), + }, + ], + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2023-11-17T06:19:22.427Z"), + modifiedAt: new Date("2022-06-24T21:14:12.329Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 112104, + required: false, }, ], }, price: { - createdAt: new Date("2022-06-25T01:47:44.862Z"), - modifiedAt: new Date("2024-10-29T03:16:27.463Z"), + createdAt: new Date("2024-08-01T16:53:54.476Z"), + modifiedAt: new Date("2023-11-19T23:10:11.193Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 429279, + minimumAmount: 681544, + maximumAmount: 393166, + presetAmount: 266880, recurringInterval: "year", }, }; @@ -117,6 +144,7 @@ let value: SubscriptionInput = { | `priceId` | *string* | :heavy_check_mark: | N/A | | `checkoutId` | *string* | :heavy_check_mark: | N/A | | `metadata` | Record | :heavy_check_mark: | N/A | +| `customFieldData` | [components.SubscriptionCustomFieldData](../../models/components/subscriptioncustomfielddata.md) | :heavy_minus_sign: | Key-value object storing custom field values. | | `user` | [components.SubscriptionUser](../../models/components/subscriptionuser.md) | :heavy_check_mark: | N/A | | `product` | [components.ProductInput](../../models/components/productinput.md) | :heavy_check_mark: | A product. | | `price` | *components.ProductPriceRecurring* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/subscriptionsortproperty.md b/docs/models/components/subscriptionsortproperty.md index dac84703..5f49bef6 100644 --- a/docs/models/components/subscriptionsortproperty.md +++ b/docs/models/components/subscriptionsortproperty.md @@ -5,7 +5,7 @@ ```typescript import { SubscriptionSortProperty } from "@polar-sh/sdk/models/components"; -let value: SubscriptionSortProperty = "started_at"; +let value: SubscriptionSortProperty = "-amount"; ``` ## Values diff --git a/docs/models/components/subscriptionstatus.md b/docs/models/components/subscriptionstatus.md index eee40cc0..f08e0d0b 100644 --- a/docs/models/components/subscriptionstatus.md +++ b/docs/models/components/subscriptionstatus.md @@ -5,7 +5,7 @@ ```typescript import { SubscriptionStatus } from "@polar-sh/sdk/models/components"; -let value: SubscriptionStatus = "past_due"; +let value: SubscriptionStatus = "incomplete_expired"; ``` ## Values diff --git a/docs/models/components/subscriptionuser.md b/docs/models/components/subscriptionuser.md index 77124479..2c3dec9b 100644 --- a/docs/models/components/subscriptionuser.md +++ b/docs/models/components/subscriptionuser.md @@ -6,10 +6,10 @@ import { SubscriptionUser } from "@polar-sh/sdk/models/components"; let value: SubscriptionUser = { - email: "Terry.Robel@yahoo.com", + email: "Kaleb_Jast19@hotmail.com", publicName: "", githubUsername: "", - avatarUrl: "https://repentant-straw.biz", + avatarUrl: "https://miserable-provision.net/", }; ``` diff --git a/docs/models/components/subtype.md b/docs/models/components/subtype.md index 632a1f4d..bfd1f7a6 100644 --- a/docs/models/components/subtype.md +++ b/docs/models/components/subtype.md @@ -5,7 +5,7 @@ ```typescript import { SubType } from "@polar-sh/sdk/models/components"; -let value: SubType = "user"; +let value: SubType = "organization"; ``` ## Values diff --git a/docs/models/components/tokenendpointauthmethod.md b/docs/models/components/tokenendpointauthmethod.md index ba92c131..396ac84c 100644 --- a/docs/models/components/tokenendpointauthmethod.md +++ b/docs/models/components/tokenendpointauthmethod.md @@ -5,7 +5,7 @@ ```typescript import { TokenEndpointAuthMethod } from "@polar-sh/sdk/models/components"; -let value: TokenEndpointAuthMethod = "none"; +let value: TokenEndpointAuthMethod = "client_secret_basic"; ``` ## Values diff --git a/docs/models/components/tokenresponse.md b/docs/models/components/tokenresponse.md index dfedea20..b6935103 100644 --- a/docs/models/components/tokenresponse.md +++ b/docs/models/components/tokenresponse.md @@ -7,7 +7,7 @@ import { TokenResponse } from "@polar-sh/sdk/models/components"; let value: TokenResponse = { accessToken: "", - expiresIn: 121299, + expiresIn: 200850, refreshToken: "", scope: "", idToken: "", diff --git a/docs/models/components/useradvertisementcampaign.md b/docs/models/components/useradvertisementcampaign.md index 4c96ea8c..ee8428fa 100644 --- a/docs/models/components/useradvertisementcampaign.md +++ b/docs/models/components/useradvertisementcampaign.md @@ -6,16 +6,16 @@ import { UserAdvertisementCampaign } from "@polar-sh/sdk/models/components"; let value: UserAdvertisementCampaign = { - createdAt: new Date("2024-03-12T17:24:42.086Z"), - modifiedAt: new Date("2023-01-11T13:11:35.931Z"), + createdAt: new Date("2022-02-14T12:50:16.034Z"), + modifiedAt: new Date("2024-01-13T05:08:56.049Z"), id: "", userId: "", - views: 122365, - clicks: 593600, - imageUrl: "https://baggy-coin.info/", - imageUrlDark: "https://profuse-accompanist.net", + views: 142591, + clicks: 459348, + imageUrl: "https://unique-nudge.biz", + imageUrlDark: "https://raw-cosset.net/", text: "", - linkUrl: "https://repentant-allocation.info/", + linkUrl: "https://mixed-strait.biz", }; ``` diff --git a/docs/models/components/useradvertisementcampaigncreate.md b/docs/models/components/useradvertisementcampaigncreate.md index c2d09434..60b71371 100644 --- a/docs/models/components/useradvertisementcampaigncreate.md +++ b/docs/models/components/useradvertisementcampaigncreate.md @@ -6,9 +6,9 @@ import { UserAdvertisementCampaignCreate } from "@polar-sh/sdk/models/components"; let value: UserAdvertisementCampaignCreate = { - imageUrl: "https://descriptive-pinstripe.biz", + imageUrl: "https://same-shipper.biz", text: "", - linkUrl: "https://vibrant-napkin.org/", + linkUrl: "https://glum-perfection.name", }; ``` diff --git a/docs/models/components/useradvertisementsortproperty.md b/docs/models/components/useradvertisementsortproperty.md index cd6612a1..1d3261de 100644 --- a/docs/models/components/useradvertisementsortproperty.md +++ b/docs/models/components/useradvertisementsortproperty.md @@ -5,7 +5,7 @@ ```typescript import { UserAdvertisementSortProperty } from "@polar-sh/sdk/models/components"; -let value: UserAdvertisementSortProperty = "created_at"; +let value: UserAdvertisementSortProperty = "-views"; ``` ## Values diff --git a/docs/models/components/userbenefit.md b/docs/models/components/userbenefit.md index aa24d912..a2d23520 100644 --- a/docs/models/components/userbenefit.md +++ b/docs/models/components/userbenefit.md @@ -7,18 +7,18 @@ ```typescript const value: components.BenefitAdsSubscriber = { - createdAt: new Date("2023-07-28T00:22:11.777Z"), - modifiedAt: new Date("2022-02-18T17:02:19.985Z"), + createdAt: new Date("2023-08-18T05:41:08.306Z"), + modifiedAt: new Date("2023-01-26T04:24:53.847Z"), id: "", - description: "ick notwithstanding aboard same", + description: + "terrorise categorise putrid solidly wasteful axe accredit zowie hence accept", selectable: false, deletable: false, organizationId: "", - properties: {}, grants: [ { - createdAt: new Date("2024-10-08T12:20:15.003Z"), - modifiedAt: new Date("2023-11-08T06:29:39.051Z"), + createdAt: new Date("2022-10-30T18:25:07.122Z"), + modifiedAt: new Date("2023-02-02T12:16:29.844Z"), id: "", isGranted: false, isRevoked: false, @@ -29,6 +29,27 @@ const value: components.BenefitAdsSubscriber = { properties: {}, }, ], + organization: { + createdAt: new Date("2024-05-01T07:37:23.861Z"), + modifiedAt: new Date("2024-11-25T20:06:47.886Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://ripe-yarmulke.net/", + bio: "", + company: "Blick Inc", + blog: "", + location: "", + email: "Colin.Predovic@hotmail.com", + twitterUsername: "", + pledgeMinimumAmount: 714054, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 516556, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, + properties: {}, }; ``` @@ -36,13 +57,46 @@ const value: components.BenefitAdsSubscriber = { ```typescript const value: components.BenefitArticlesSubscriber = { - createdAt: new Date("2024-08-31T01:35:36.933Z"), - modifiedAt: new Date("2024-02-08T13:51:36.415Z"), + createdAt: new Date("2022-05-26T20:25:51.045Z"), + modifiedAt: new Date("2024-04-27T16:57:06.047Z"), id: "", - description: "till transcend before", + description: "deficient long unselfish meh strange vaguely", selectable: false, deletable: false, organizationId: "", + grants: [ + { + createdAt: new Date("2023-07-06T20:47:44.778Z"), + modifiedAt: new Date("2023-11-12T10:36:59.251Z"), + id: "", + isGranted: false, + isRevoked: false, + subscriptionId: "", + orderId: "", + userId: "", + benefitId: "", + }, + ], + organization: { + createdAt: new Date("2024-07-01T22:55:43.947Z"), + modifiedAt: new Date("2023-09-11T19:09:44.539Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://worldly-developmental.net/", + bio: "", + company: "Kris Group", + blog: "", + location: "", + email: "Bertram.Sporer-Lesch@hotmail.com", + twitterUsername: "", + pledgeMinimumAmount: 879418, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 275006, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, properties: { paidArticles: false, }, @@ -53,17 +107,17 @@ const value: components.BenefitArticlesSubscriber = { ```typescript const value: components.BenefitCustomSubscriber = { - createdAt: new Date("2023-02-23T07:01:12.546Z"), - modifiedAt: new Date("2024-08-28T12:47:14.840Z"), + createdAt: new Date("2023-07-03T14:08:14.339Z"), + modifiedAt: new Date("2022-09-15T01:36:02.246Z"), id: "", - description: "ick moralise which whenever", + description: "swathe amongst dislocate however entire", selectable: false, deletable: false, organizationId: "", grants: [ { - createdAt: new Date("2022-07-02T07:00:09.501Z"), - modifiedAt: new Date("2023-08-29T17:51:53.770Z"), + createdAt: new Date("2023-01-23T08:27:25.525Z"), + modifiedAt: new Date("2022-10-16T03:05:22.272Z"), id: "", isGranted: false, isRevoked: false, @@ -73,6 +127,26 @@ const value: components.BenefitCustomSubscriber = { benefitId: "", }, ], + organization: { + createdAt: new Date("2023-01-31T18:43:40.215Z"), + modifiedAt: new Date("2022-04-21T11:33:43.244Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://unhappy-equal.info/", + bio: "", + company: "Rempel, Larson and Sanford", + blog: "", + location: "", + email: "Jamar.Feest@gmail.com", + twitterUsername: "", + pledgeMinimumAmount: 947309, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 264125, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, properties: { note: "", }, @@ -83,13 +157,47 @@ const value: components.BenefitCustomSubscriber = { ```typescript const value: components.BenefitDiscordSubscriber = { - createdAt: new Date("2023-03-30T11:45:32.202Z"), - modifiedAt: new Date("2022-06-16T00:41:16.617Z"), + createdAt: new Date("2023-06-02T18:46:06.050Z"), + modifiedAt: new Date("2024-06-08T06:31:25.831Z"), id: "", - description: "after pupil pixellate where", + description: + "ridge veg save hourly as whenever antagonize obstruct overburden", selectable: false, deletable: false, organizationId: "", + grants: [ + { + createdAt: new Date("2023-04-13T12:32:02.752Z"), + modifiedAt: new Date("2024-08-18T09:11:38.486Z"), + id: "", + isGranted: false, + isRevoked: false, + subscriptionId: "", + orderId: "", + userId: "", + benefitId: "", + }, + ], + organization: { + createdAt: new Date("2022-10-06T07:01:26.430Z"), + modifiedAt: new Date("2022-03-28T08:49:02.228Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://indelible-mountain.com", + bio: "", + company: "Thiel, Muller and Auer", + blog: "", + location: "", + email: "Wilfred.Crooks@yahoo.com", + twitterUsername: "", + pledgeMinimumAmount: 24614, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 619772, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, properties: { guildId: "", }, @@ -100,13 +208,46 @@ const value: components.BenefitDiscordSubscriber = { ```typescript const value: components.BenefitDownloadablesSubscriber = { - createdAt: new Date("2024-03-01T10:23:42.585Z"), - modifiedAt: new Date("2023-06-11T04:45:20.733Z"), + createdAt: new Date("2022-10-25T06:04:46.666Z"), + modifiedAt: new Date("2022-04-19T08:02:38.105Z"), id: "", - description: "eulogise but zowie doubter amongst promptly eggplant solidly", + description: "only self-confidence reluctantly conceal toward happily", selectable: false, deletable: false, organizationId: "", + grants: [ + { + createdAt: new Date("2022-07-29T04:07:06.634Z"), + modifiedAt: new Date("2024-09-15T12:11:57.238Z"), + id: "", + isGranted: false, + isRevoked: false, + subscriptionId: "", + orderId: "", + userId: "", + benefitId: "", + }, + ], + organization: { + createdAt: new Date("2024-07-29T19:18:16.265Z"), + modifiedAt: new Date("2023-05-21T22:57:42.336Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://warped-decision.name/", + bio: "", + company: "Dicki - Mitchell", + blog: "", + location: "", + email: "Krista46@yahoo.com", + twitterUsername: "", + pledgeMinimumAmount: 120387, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 683271, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, properties: { activeFiles: [ "", @@ -119,14 +260,47 @@ const value: components.BenefitDownloadablesSubscriber = { ```typescript const value: components.BenefitGitHubRepositorySubscriber = { - createdAt: new Date("2022-01-01T01:56:18.923Z"), - modifiedAt: new Date("2022-10-06T15:31:52.701Z"), + createdAt: new Date("2023-07-23T02:21:25.780Z"), + modifiedAt: new Date("2022-07-15T03:50:42.259Z"), id: "", description: - "times nervously unless presume incidentally soybean showy contractor", + "by monumental mostly wallaby indeed stingy boyfriend providence until gracious", selectable: false, deletable: false, organizationId: "", + grants: [ + { + createdAt: new Date("2024-07-15T09:08:24.889Z"), + modifiedAt: new Date("2023-05-15T03:47:55.638Z"), + id: "", + isGranted: false, + isRevoked: false, + subscriptionId: "", + orderId: "", + userId: "", + benefitId: "", + }, + ], + organization: { + createdAt: new Date("2022-04-12T13:59:28.660Z"), + modifiedAt: new Date("2023-05-14T13:48:07.162Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://key-advancement.name", + bio: "", + company: "Schumm, Morissette and Volkman", + blog: "", + location: "", + email: "Jessika5@hotmail.com", + twitterUsername: "", + pledgeMinimumAmount: 447503, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 660799, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, properties: { repositoryOwner: "polarsource", repositoryName: "private_repo", @@ -138,29 +312,17 @@ const value: components.BenefitGitHubRepositorySubscriber = { ```typescript const value: components.BenefitLicenseKeysSubscriber = { - createdAt: new Date("2024-04-07T05:50:07.896Z"), - modifiedAt: new Date("2023-08-11T07:51:57.382Z"), + createdAt: new Date("2024-04-18T00:54:24.193Z"), + modifiedAt: new Date("2023-08-15T07:03:31.089Z"), id: "", - description: "drat alongside for over worse dishearten tender hm", + description: "playfully out viciously dally", selectable: false, deletable: false, organizationId: "", - properties: { - prefix: "", - expires: { - ttl: 987435, - timeframe: "year", - }, - activations: { - limit: 612181, - enableUserAdmin: false, - }, - limitUsage: 723623, - }, grants: [ { - createdAt: new Date("2022-11-13T15:24:13.369Z"), - modifiedAt: new Date("2024-12-03T02:39:59.387Z"), + createdAt: new Date("2023-12-21T15:20:25.954Z"), + modifiedAt: new Date("2023-02-14T17:30:08.402Z"), id: "", isGranted: false, isRevoked: false, @@ -171,6 +333,38 @@ const value: components.BenefitLicenseKeysSubscriber = { properties: {}, }, ], + organization: { + createdAt: new Date("2024-05-10T10:23:09.731Z"), + modifiedAt: new Date("2023-04-01T06:32:56.264Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://splendid-hyena.org", + bio: "", + company: "Shanahan, Wilkinson and Howell", + blog: "", + location: "", + email: "Matteo29@yahoo.com", + twitterUsername: "", + pledgeMinimumAmount: 799306, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 203356, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, + properties: { + prefix: "", + expires: { + ttl: 570047, + timeframe: "day", + }, + activations: { + limit: 353036, + enableUserAdmin: false, + }, + limitUsage: 434382, + }, }; ``` diff --git a/docs/models/components/userbenefitsortproperty.md b/docs/models/components/userbenefitsortproperty.md index ed8ed5a8..fc5f8baa 100644 --- a/docs/models/components/userbenefitsortproperty.md +++ b/docs/models/components/userbenefitsortproperty.md @@ -5,7 +5,7 @@ ```typescript import { UserBenefitSortProperty } from "@polar-sh/sdk/models/components"; -let value: UserBenefitSortProperty = "organization"; +let value: UserBenefitSortProperty = "-granted_at"; ``` ## Values diff --git a/docs/models/components/userorder.md b/docs/models/components/userorder.md index ba5bd6a7..40cd8b58 100644 --- a/docs/models/components/userorder.md +++ b/docs/models/components/userorder.md @@ -6,46 +6,51 @@ import { UserOrder } from "@polar-sh/sdk/models/components"; let value: UserOrder = { - createdAt: new Date("2024-09-15T03:58:39.261Z"), - modifiedAt: new Date("2024-12-17T17:51:01.747Z"), + createdAt: new Date("2024-03-12T16:04:02.474Z"), + modifiedAt: new Date("2022-10-22T16:34:22.700Z"), id: "", - amount: 327411, - taxAmount: 703431, - currency: "Guyana Dollar", + amount: 305965, + taxAmount: 305473, + currency: "Tanzanian Shilling", userId: "", productId: "", productPriceId: "", subscriptionId: "", product: { - createdAt: new Date("2022-04-26T01:40:35.064Z"), - modifiedAt: new Date("2023-03-07T09:22:42.385Z"), + createdAt: new Date("2022-09-05T19:16:17.163Z"), + modifiedAt: new Date("2023-09-09T09:25:03.473Z"), id: "", name: "", - description: "brr opposite confute who boo little hmph", + description: + "blue ugh nautical barring whereas ouch reporter ah offensively obvious", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2022-12-29T14:19:48.722Z"), - modifiedAt: new Date("2024-06-23T12:45:36.188Z"), + createdAt: new Date("2024-08-02T23:14:47.272Z"), + modifiedAt: new Date("2022-07-20T12:59:24.049Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 243938, + minimumAmount: 315904, + maximumAmount: 773678, + presetAmount: 335672, }, ], benefits: [ { - createdAt: new Date("2023-01-12T00:01:57.325Z"), - modifiedAt: new Date("2024-05-27T22:36:34.200Z"), + createdAt: new Date("2022-11-12T10:13:41.931Z"), + modifiedAt: new Date("2022-07-25T01:35:33.444Z"), id: "", - type: "custom", - description: "bitter ah versus", + description: "astride verbally smug up adult", selectable: false, deletable: false, organizationId: "", + properties: { + paidArticles: false, + }, }, ], medias: [ @@ -53,47 +58,65 @@ let value: UserOrder = { id: "", organizationId: "", name: "", - path: "/net", + path: "/var/tmp", mimeType: "", - size: 41436, + size: 132531, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2023-03-16T07:41:57.893Z"), + lastModifiedAt: new Date("2024-07-22T03:49:19.507Z"), version: "", isUploaded: false, - createdAt: new Date("2024-05-16T05:06:45.488Z"), + createdAt: new Date("2024-05-06T18:26:38.655Z"), sizeReadable: "", - publicUrl: "https://white-bump.org", + publicUrl: "https://sore-finding.biz", }, ], + organization: { + createdAt: new Date("2023-02-18T22:46:45.624Z"), + modifiedAt: new Date("2022-08-11T14:00:17.759Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://supportive-partridge.biz", + bio: "", + company: "McClure - Koepp", + blog: "", + location: "", + email: "Freeda.Nader97@gmail.com", + twitterUsername: "", + pledgeMinimumAmount: 658208, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 909558, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, }, productPrice: { - createdAt: new Date("2023-04-15T14:47:40.530Z"), - modifiedAt: new Date("2022-05-08T15:09:38.886Z"), + createdAt: new Date("2024-04-15T09:46:18.365Z"), + modifiedAt: new Date("2023-06-18T01:34:34.609Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - minimumAmount: 247796, - maximumAmount: 742272, - presetAmount: 23007, - recurringInterval: "month", + priceAmount: 992178, + recurringInterval: "year", }, subscription: { - createdAt: new Date("2022-01-28T15:07:41.807Z"), - modifiedAt: new Date("2024-07-28T16:44:07.656Z"), + createdAt: new Date("2024-10-09T02:12:59.827Z"), + modifiedAt: new Date("2022-01-14T09:11:07.833Z"), id: "", - amount: 617325, - currency: "Swiss Franc", - recurringInterval: "year", - status: "unpaid", - currentPeriodStart: new Date("2024-10-21T06:40:33.930Z"), - currentPeriodEnd: new Date("2024-10-07T00:23:12.112Z"), + amount: 154539, + currency: "Zloty", + recurringInterval: "month", + status: "canceled", + currentPeriodStart: new Date("2023-04-16T01:44:07.536Z"), + currentPeriodEnd: new Date("2024-02-21T10:39:54.364Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2022-01-09T13:26:23.661Z"), - endedAt: new Date("2023-10-08T13:24:38.931Z"), + startedAt: new Date("2023-09-13T12:16:23.117Z"), + endedAt: new Date("2022-05-12T09:56:36.366Z"), userId: "", productId: "", priceId: "", diff --git a/docs/models/components/userorderinvoice.md b/docs/models/components/userorderinvoice.md index 2b41d02b..29767fb9 100644 --- a/docs/models/components/userorderinvoice.md +++ b/docs/models/components/userorderinvoice.md @@ -8,7 +8,7 @@ Order's invoice data. import { UserOrderInvoice } from "@polar-sh/sdk/models/components"; let value: UserOrderInvoice = { - url: "https://polished-cross-contamination.net", + url: "https://mindless-premier.info/", }; ``` diff --git a/docs/models/components/userorderproduct.md b/docs/models/components/userorderproduct.md index 8f13683a..d897f5b7 100644 --- a/docs/models/components/userorderproduct.md +++ b/docs/models/components/userorderproduct.md @@ -6,38 +6,33 @@ import { UserOrderProduct } from "@polar-sh/sdk/models/components"; let value: UserOrderProduct = { - createdAt: new Date("2023-02-23T19:41:54.637Z"), - modifiedAt: new Date("2023-04-11T06:18:21.553Z"), + createdAt: new Date("2022-04-15T20:23:47.603Z"), + modifiedAt: new Date("2023-03-20T09:04:49.131Z"), id: "", name: "", - description: - "and wonderful cutlet pitiful brr retrospectivity armoire reservation even", + description: "yowza after captain er jiggle beyond political", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2024-10-26T02:31:57.553Z"), - modifiedAt: new Date("2022-12-16T01:04:03.360Z"), + createdAt: new Date("2023-02-09T23:07:56.607Z"), + modifiedAt: new Date("2023-06-05T20:40:09.335Z"), id: "", isArchived: false, productId: "", - recurringInterval: "year", }, ], benefits: [ { - createdAt: new Date("2023-10-26T12:11:28.317Z"), - modifiedAt: new Date("2023-09-13T10:23:25.936Z"), + createdAt: new Date("2022-08-18T07:04:21.930Z"), + modifiedAt: new Date("2022-12-19T18:58:02.170Z"), id: "", - description: - "of powerfully potentially athwart broadcast whoever triangular", + type: "custom", + description: "chasuble defiantly rightfully behind tuxedo", selectable: false, deletable: false, organizationId: "", - properties: { - paidArticles: false, - }, }, ], medias: [ @@ -47,19 +42,39 @@ let value: UserOrderProduct = { name: "", path: "/opt/include", mimeType: "", - size: 795337, + size: 904131, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2023-12-16T20:57:59.104Z"), + lastModifiedAt: new Date("2023-01-03T06:05:43.351Z"), version: "", isUploaded: false, - createdAt: new Date("2022-11-30T19:27:00.258Z"), + createdAt: new Date("2022-12-22T18:16:42.157Z"), sizeReadable: "", - publicUrl: "https://dull-premeditation.name/", + publicUrl: "https://well-groomed-deed.org", }, ], + organization: { + createdAt: new Date("2023-01-11T08:00:43.248Z"), + modifiedAt: new Date("2024-12-09T06:01:03.753Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://unsung-millet.biz", + bio: "", + company: "Legros - Osinski", + blog: "", + location: "", + email: "Cecile.Kertzmann55@hotmail.com", + twitterUsername: "", + pledgeMinimumAmount: 535055, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 200109, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, }; ``` @@ -75,6 +90,7 @@ let value: UserOrderProduct = { | `isRecurring` | *boolean* | :heavy_check_mark: | Whether the product is a subscription tier. | | `isArchived` | *boolean* | :heavy_check_mark: | Whether the product is archived and no longer available. | | `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the product. | -| `prices` | *components.ProductPrice*[] | :heavy_check_mark: | List of available prices for this product. | -| `benefits` | *components.Benefits*[] | :heavy_check_mark: | The benefits granted by the product. | -| `medias` | [components.ProductMediaFileRead](../../models/components/productmediafileread.md)[] | :heavy_check_mark: | The medias associated to the product. | \ No newline at end of file +| `prices` | *components.ProductPrice*[] | :heavy_check_mark: | List of prices for this product. | +| `benefits` | *components.Benefits*[] | :heavy_check_mark: | List of benefits granted by the product. | +| `medias` | [components.ProductMediaFileRead](../../models/components/productmediafileread.md)[] | :heavy_check_mark: | List of medias associated to the product. | +| `organization` | [components.Organization](../../models/components/organization.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/userordersortproperty.md b/docs/models/components/userordersortproperty.md index cba8f228..49e2f36b 100644 --- a/docs/models/components/userordersortproperty.md +++ b/docs/models/components/userordersortproperty.md @@ -5,7 +5,7 @@ ```typescript import { UserOrderSortProperty } from "@polar-sh/sdk/models/components"; -let value: UserOrderSortProperty = "created_at"; +let value: UserOrderSortProperty = "-created_at"; ``` ## Values diff --git a/docs/models/components/userordersubscription.md b/docs/models/components/userordersubscription.md index d66f3484..c1f48169 100644 --- a/docs/models/components/userordersubscription.md +++ b/docs/models/components/userordersubscription.md @@ -6,18 +6,18 @@ import { UserOrderSubscription } from "@polar-sh/sdk/models/components"; let value: UserOrderSubscription = { - createdAt: new Date("2022-10-09T06:27:51.653Z"), - modifiedAt: new Date("2023-09-11T20:28:49.171Z"), + createdAt: new Date("2024-02-26T20:59:18.749Z"), + modifiedAt: new Date("2024-02-14T04:24:13.906Z"), id: "", - amount: 318030, - currency: "Belize Dollar", + amount: 115718, + currency: "Pataca", recurringInterval: "month", status: "active", - currentPeriodStart: new Date("2024-12-20T18:47:30.812Z"), - currentPeriodEnd: new Date("2022-02-16T10:58:15.255Z"), + currentPeriodStart: new Date("2023-04-09T08:14:40.781Z"), + currentPeriodEnd: new Date("2022-04-25T19:59:09.345Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2022-11-27T01:35:10.866Z"), - endedAt: new Date("2024-07-22T16:12:56.525Z"), + startedAt: new Date("2022-06-23T04:38:11.873Z"), + endedAt: new Date("2022-04-06T03:24:49.820Z"), userId: "", productId: "", priceId: "", diff --git a/docs/models/components/usersubscription.md b/docs/models/components/usersubscription.md index e70381d3..f9cfc60d 100644 --- a/docs/models/components/usersubscription.md +++ b/docs/models/components/usersubscription.md @@ -6,57 +6,51 @@ import { UserSubscription } from "@polar-sh/sdk/models/components"; let value: UserSubscription = { - createdAt: new Date("2024-05-30T15:22:56.357Z"), - modifiedAt: new Date("2024-03-29T04:13:17.980Z"), + createdAt: new Date("2024-07-05T23:17:22.567Z"), + modifiedAt: new Date("2022-02-15T19:47:09.789Z"), id: "", - amount: 23128, - currency: "Netherlands Antillian Guilder", - recurringInterval: "month", - status: "active", - currentPeriodStart: new Date("2024-09-24T01:50:03.528Z"), - currentPeriodEnd: new Date("2023-02-26T13:18:09.649Z"), + amount: 606529, + currency: "Qatari Rial", + recurringInterval: "year", + status: "incomplete_expired", + currentPeriodStart: new Date("2023-04-12T11:46:50.754Z"), + currentPeriodEnd: new Date("2022-02-12T18:37:20.813Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2022-11-13T05:21:42.031Z"), - endedAt: new Date("2023-09-18T23:36:27.642Z"), + startedAt: new Date("2022-04-14T03:03:06.965Z"), + endedAt: new Date("2023-09-07T07:42:18.122Z"), userId: "", productId: "", priceId: "", checkoutId: "", product: { - createdAt: new Date("2024-09-29T12:07:07.880Z"), - modifiedAt: new Date("2024-03-20T13:09:09.599Z"), + createdAt: new Date("2023-10-01T07:45:32.589Z"), + modifiedAt: new Date("2022-08-09T13:08:06.938Z"), id: "", name: "", - description: "forecast dense beneath astride verbally smug up adult beyond", + description: "case healthily yuck sternly lest volleyball", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2022-08-11T14:00:17.759Z"), - modifiedAt: new Date("2024-02-28T15:41:38.993Z"), + createdAt: new Date("2024-10-31T06:35:56.125Z"), + modifiedAt: new Date("2022-05-22T16:02:35.270Z"), id: "", isArchived: false, productId: "", - priceCurrency: "", - minimumAmount: 826519, - maximumAmount: 646439, - presetAmount: 186092, - recurringInterval: "month", + recurringInterval: "year", }, ], benefits: [ { - createdAt: new Date("2023-05-23T02:09:12.082Z"), - modifiedAt: new Date("2022-08-07T21:00:43.658Z"), + createdAt: new Date("2022-09-17T17:07:40.230Z"), + modifiedAt: new Date("2024-07-23T11:23:06.312Z"), id: "", - description: "thorn vague promise fisherman unethically", + type: "license_keys", + description: "which reproach past finer square", selectable: false, deletable: false, organizationId: "", - properties: { - paidArticles: false, - }, }, ], medias: [ @@ -64,28 +58,52 @@ let value: UserSubscription = { id: "", organizationId: "", name: "", - path: "/bin", + path: "/opt/lib", mimeType: "", - size: 431617, + size: 115870, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2024-05-27T19:49:50.767Z"), + lastModifiedAt: new Date("2024-02-16T00:29:37.108Z"), version: "", isUploaded: false, - createdAt: new Date("2022-04-20T21:11:30.522Z"), + createdAt: new Date("2022-11-03T20:22:59.538Z"), sizeReadable: "", - publicUrl: "https://shabby-passport.name/", + publicUrl: "https://posh-vestment.biz", }, ], + organization: { + createdAt: new Date("2022-11-08T10:51:42.460Z"), + modifiedAt: new Date("2024-10-18T17:06:37.667Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://knotty-reboot.info", + bio: "", + company: "Crist LLC", + blog: "", + location: "", + email: "Lorena_Stehr@gmail.com", + twitterUsername: "", + pledgeMinimumAmount: 713741, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 514441, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, }, price: { - createdAt: new Date("2022-06-04T23:45:24.476Z"), - modifiedAt: new Date("2022-05-28T17:43:25.762Z"), + createdAt: new Date("2023-04-20T10:58:30.086Z"), + modifiedAt: new Date("2022-12-24T00:38:40.863Z"), id: "", isArchived: false, productId: "", + priceCurrency: "", + minimumAmount: 582536, + maximumAmount: 324872, + presetAmount: 235556, recurringInterval: "year", }, }; diff --git a/docs/models/components/usersubscriptionproduct.md b/docs/models/components/usersubscriptionproduct.md index 37782a94..faaa9ce6 100644 --- a/docs/models/components/usersubscriptionproduct.md +++ b/docs/models/components/usersubscriptionproduct.md @@ -6,30 +6,34 @@ import { UserSubscriptionProduct } from "@polar-sh/sdk/models/components"; let value: UserSubscriptionProduct = { - createdAt: new Date("2024-02-20T13:19:29.819Z"), - modifiedAt: new Date("2022-04-14T03:20:16.898Z"), + createdAt: new Date("2022-02-03T10:22:11.476Z"), + modifiedAt: new Date("2024-03-30T18:05:35.215Z"), id: "", name: "", - description: "psst alongside consequently insert immediately mechanically", + description: "wherever even instead ew roger wash whereas drag pull bookend", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2023-04-09T15:25:59.804Z"), - modifiedAt: new Date("2022-04-15T20:23:47.603Z"), + createdAt: new Date("2023-07-03T09:10:24.025Z"), + modifiedAt: new Date("2024-10-23T19:40:14.521Z"), id: "", isArchived: false, productId: "", + priceCurrency: "", + minimumAmount: 880428, + maximumAmount: 713934, + presetAmount: 577541, }, ], benefits: [ { - createdAt: new Date("2023-08-11T08:24:04.543Z"), - modifiedAt: new Date("2024-09-18T05:15:49.402Z"), + createdAt: new Date("2022-01-09T22:42:48.365Z"), + modifiedAt: new Date("2022-05-12T02:52:19.946Z"), id: "", type: "ads", - description: "save phew because against likewise", + description: "meager dish provided gee", selectable: false, deletable: false, organizationId: "", @@ -40,21 +44,41 @@ let value: UserSubscriptionProduct = { id: "", organizationId: "", name: "", - path: "/usr/local/src", + path: "/net", mimeType: "", - size: 577297, + size: 25705, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2022-02-16T21:23:07.138Z"), + lastModifiedAt: new Date("2023-11-29T01:49:49.888Z"), version: "", isUploaded: false, - createdAt: new Date("2023-01-03T02:38:39.240Z"), + createdAt: new Date("2022-02-05T11:00:40.920Z"), sizeReadable: "", - publicUrl: "https://robust-outset.net", + publicUrl: "https://cumbersome-charm.net/", }, ], + organization: { + createdAt: new Date("2022-04-13T09:59:21.377Z"), + modifiedAt: new Date("2022-06-12T21:52:06.305Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://cooperative-reporter.info/", + bio: "", + company: "Batz, Steuber and Cremin", + blog: "", + location: "", + email: "Erica21@hotmail.com", + twitterUsername: "", + pledgeMinimumAmount: 661787, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 283619, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, }; ``` @@ -70,6 +94,7 @@ let value: UserSubscriptionProduct = { | `isRecurring` | *boolean* | :heavy_check_mark: | Whether the product is a subscription tier. | | `isArchived` | *boolean* | :heavy_check_mark: | Whether the product is archived and no longer available. | | `organizationId` | *string* | :heavy_check_mark: | The ID of the organization owning the product. | -| `prices` | *components.ProductPrice*[] | :heavy_check_mark: | List of available prices for this product. | -| `benefits` | *components.UserSubscriptionProductBenefits*[] | :heavy_check_mark: | The benefits granted by the product. | -| `medias` | [components.ProductMediaFileRead](../../models/components/productmediafileread.md)[] | :heavy_check_mark: | The medias associated to the product. | \ No newline at end of file +| `prices` | *components.ProductPrice*[] | :heavy_check_mark: | List of prices for this product. | +| `benefits` | *components.UserSubscriptionProductBenefits*[] | :heavy_check_mark: | List of benefits granted by the product. | +| `medias` | [components.ProductMediaFileRead](../../models/components/productmediafileread.md)[] | :heavy_check_mark: | List of medias associated to the product. | +| `organization` | [components.Organization](../../models/components/organization.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/usersubscriptionproductbenefits.md b/docs/models/components/usersubscriptionproductbenefits.md index 50c30958..44e269ab 100644 --- a/docs/models/components/usersubscriptionproductbenefits.md +++ b/docs/models/components/usersubscriptionproductbenefits.md @@ -7,11 +7,11 @@ ```typescript const value: components.BenefitBase = { - createdAt: new Date("2023-02-09T16:03:01.500Z"), - modifiedAt: new Date("2022-12-09T15:04:50.222Z"), + createdAt: new Date("2022-08-22T20:30:40.847Z"), + modifiedAt: new Date("2024-06-01T14:18:08.175Z"), id: "", - type: "articles", - description: "pleasant outsource frivolous coexist suddenly", + type: "license_keys", + description: "even voluminous satisfy encouragement openly painfully", selectable: false, deletable: false, organizationId: "", @@ -22,10 +22,11 @@ const value: components.BenefitBase = { ```typescript const value: components.BenefitArticles = { - createdAt: new Date("2023-12-12T08:42:47.730Z"), - modifiedAt: new Date("2022-01-20T00:11:01.003Z"), + createdAt: new Date("2022-01-31T17:24:00.756Z"), + modifiedAt: new Date("2023-06-29T02:21:22.949Z"), id: "", - description: "kindheartedly whereas obvious", + description: + "strident good-natured as likewise inspection populist circumnavigate", selectable: false, deletable: false, organizationId: "", diff --git a/docs/models/components/usersubscriptionsortproperty.md b/docs/models/components/usersubscriptionsortproperty.md index 0dff48bf..193beffc 100644 --- a/docs/models/components/usersubscriptionsortproperty.md +++ b/docs/models/components/usersubscriptionsortproperty.md @@ -5,7 +5,7 @@ ```typescript import { UserSubscriptionSortProperty } from "@polar-sh/sdk/models/components"; -let value: UserSubscriptionSortProperty = "organization"; +let value: UserSubscriptionSortProperty = "amount"; ``` ## Values diff --git a/docs/models/components/validatedlicensekey.md b/docs/models/components/validatedlicensekey.md index 9bb2931f..4c3f8ca9 100644 --- a/docs/models/components/validatedlicensekey.md +++ b/docs/models/components/validatedlicensekey.md @@ -12,19 +12,19 @@ let value: ValidatedLicenseKey = { user: { id: "", publicName: "", - email: "Sydnee.Keeling8@yahoo.com", - avatarUrl: "https://snappy-mainstream.net", + email: "Hallie.Abbott@yahoo.com", + avatarUrl: "https://outstanding-habit.biz/", }, benefitId: "", key: "", displayKey: "", status: "granted", - limitActivations: 583240, - usage: 882604, - limitUsage: 217960, - validations: 227669, - lastValidatedAt: new Date("2024-03-31T06:46:07.766Z"), - expiresAt: new Date("2024-06-09T00:20:30.007Z"), + limitActivations: 313045, + usage: 924162, + limitUsage: 959673, + validations: 98830, + lastValidatedAt: new Date("2024-03-17T00:19:36.390Z"), + expiresAt: new Date("2023-12-22T21:47:23.048Z"), }; ``` diff --git a/docs/models/components/validationerror.md b/docs/models/components/validationerror.md index 3a293c26..8bf6d15d 100644 --- a/docs/models/components/validationerror.md +++ b/docs/models/components/validationerror.md @@ -7,7 +7,7 @@ import { ValidationError } from "@polar-sh/sdk/models/components"; let value: ValidationError = { loc: [ - "", + 579690, ], msg: "", type: "", diff --git a/docs/models/components/webhookbenefitcreatedpayload.md b/docs/models/components/webhookbenefitcreatedpayload.md index 8f4b9c78..61f9138a 100644 --- a/docs/models/components/webhookbenefitcreatedpayload.md +++ b/docs/models/components/webhookbenefitcreatedpayload.md @@ -11,14 +11,21 @@ import { WebhookBenefitCreatedPayload } from "@polar-sh/sdk/models/components"; let value: WebhookBenefitCreatedPayload = { data: { - createdAt: new Date("2024-08-09T09:21:03.493Z"), - modifiedAt: new Date("2022-05-04T02:40:37.506Z"), + createdAt: new Date("2023-05-01T03:38:37.774Z"), + modifiedAt: new Date("2023-10-08T23:37:13.021Z"), id: "", - description: "harvest energetically apologise incidentally", + description: "apricot ack trivial card hmph how uselessly portray", selectable: false, deletable: false, organizationId: "", - properties: {}, + properties: { + archived: { + "key": false, + }, + files: [ + "", + ], + }, }, }; ``` diff --git a/docs/models/components/webhookbenefitgrantcreatedpayload.md b/docs/models/components/webhookbenefitgrantcreatedpayload.md index a7e6bde1..6bfe294c 100644 --- a/docs/models/components/webhookbenefitgrantcreatedpayload.md +++ b/docs/models/components/webhookbenefitgrantcreatedpayload.md @@ -11,8 +11,8 @@ import { WebhookBenefitGrantCreatedPayload } from "@polar-sh/sdk/models/componen let value: WebhookBenefitGrantCreatedPayload = { data: { - createdAt: new Date("2023-01-14T21:46:23.229Z"), - modifiedAt: new Date("2024-07-01T17:27:09.272Z"), + createdAt: new Date("2023-03-27T12:43:43.871Z"), + modifiedAt: new Date("2024-07-16T06:38:50.927Z"), id: "", isGranted: false, isRevoked: false, @@ -22,25 +22,24 @@ let value: WebhookBenefitGrantCreatedPayload = { benefitId: "", properties: {}, benefit: { - createdAt: new Date("2024-08-17T05:25:06.310Z"), - modifiedAt: new Date("2022-07-24T02:19:41.707Z"), + createdAt: new Date("2022-01-19T15:42:01.485Z"), + modifiedAt: new Date("2022-01-30T17:42:43.078Z"), id: "", - description: - "arbitrate capitalise meh snack insist ah meh provision lively", + description: "broadly cruelly monocle embalm pace", selectable: false, deletable: false, organizationId: "", properties: { prefix: "", expires: { - ttl: 304571, - timeframe: "day", + ttl: 252144, + timeframe: "month", }, activations: { - limit: 665846, + limit: 337514, enableUserAdmin: false, }, - limitUsage: 270530, + limitUsage: 926674, }, }, }, diff --git a/docs/models/components/webhookbenefitgrantrevokedpayload.md b/docs/models/components/webhookbenefitgrantrevokedpayload.md index e4ceb08c..0bad9f11 100644 --- a/docs/models/components/webhookbenefitgrantrevokedpayload.md +++ b/docs/models/components/webhookbenefitgrantrevokedpayload.md @@ -11,8 +11,8 @@ import { WebhookBenefitGrantRevokedPayload } from "@polar-sh/sdk/models/componen let value: WebhookBenefitGrantRevokedPayload = { data: { - createdAt: new Date("2022-01-19T14:46:34.753Z"), - modifiedAt: new Date("2023-12-17T01:50:43.036Z"), + createdAt: new Date("2022-10-15T14:10:02.904Z"), + modifiedAt: new Date("2023-09-05T13:28:38.697Z"), id: "", isGranted: false, isRevoked: false, @@ -22,25 +22,17 @@ let value: WebhookBenefitGrantRevokedPayload = { benefitId: "", properties: {}, benefit: { - createdAt: new Date("2024-01-22T03:42:55.455Z"), - modifiedAt: new Date("2023-04-04T18:27:33.065Z"), + createdAt: new Date("2022-11-04T01:43:26.070Z"), + modifiedAt: new Date("2024-10-21T04:47:53.381Z"), id: "", - description: "psst iterate woot carelessly gadzooks ah within", + description: "remark gaseous reach across phooey proofread schlep", selectable: false, deletable: false, organizationId: "", properties: { - prefix: "", - expires: { - ttl: 617535, - timeframe: "day", - }, - activations: { - limit: 312936, - enableUserAdmin: false, - }, - limitUsage: 787893, + note: "", }, + isTaxApplicable: false, }, }, }; diff --git a/docs/models/components/webhookbenefitgrantupdatedpayload.md b/docs/models/components/webhookbenefitgrantupdatedpayload.md index d2c57217..6da4ddee 100644 --- a/docs/models/components/webhookbenefitgrantupdatedpayload.md +++ b/docs/models/components/webhookbenefitgrantupdatedpayload.md @@ -11,8 +11,8 @@ import { WebhookBenefitGrantUpdatedPayload } from "@polar-sh/sdk/models/componen let value: WebhookBenefitGrantUpdatedPayload = { data: { - createdAt: new Date("2024-07-13T10:03:43.619Z"), - modifiedAt: new Date("2024-08-01T05:59:09.495Z"), + createdAt: new Date("2022-08-13T04:05:41.912Z"), + modifiedAt: new Date("2022-08-15T19:08:33.127Z"), id: "", isGranted: false, isRevoked: false, @@ -22,14 +22,16 @@ let value: WebhookBenefitGrantUpdatedPayload = { benefitId: "", properties: {}, benefit: { - createdAt: new Date("2024-11-06T02:34:34.988Z"), - modifiedAt: new Date("2022-09-15T20:50:47.910Z"), + createdAt: new Date("2022-05-01T12:37:32.096Z"), + modifiedAt: new Date("2023-07-09T00:24:34.770Z"), id: "", - description: "upside-down consequently bah deploy which", + description: "collaborate pfft nor", selectable: false, deletable: false, organizationId: "", - properties: {}, + properties: { + paidArticles: false, + }, }, }, }; diff --git a/docs/models/components/webhookbenefitupdatedpayload.md b/docs/models/components/webhookbenefitupdatedpayload.md index d7ea73f4..078f0f0a 100644 --- a/docs/models/components/webhookbenefitupdatedpayload.md +++ b/docs/models/components/webhookbenefitupdatedpayload.md @@ -11,17 +11,22 @@ import { WebhookBenefitUpdatedPayload } from "@polar-sh/sdk/models/components"; let value: WebhookBenefitUpdatedPayload = { data: { - createdAt: new Date("2022-04-02T15:04:46.624Z"), - modifiedAt: new Date("2022-05-15T08:58:24.746Z"), + createdAt: new Date("2024-09-26T16:56:57.899Z"), + modifiedAt: new Date("2023-10-02T21:44:40.357Z"), id: "", - description: "really yearningly postbox handful contravene markup squirm", + description: + "babyish collaboration cap neck crowded westernize huge down cantaloupe yet", selectable: false, deletable: false, organizationId: "", properties: { - note: "", + archived: { + "key": false, + }, + files: [ + "", + ], }, - isTaxApplicable: false, }, }; ``` diff --git a/docs/models/components/webhookcheckoutcreatedpayload.md b/docs/models/components/webhookcheckoutcreatedpayload.md index 9757a553..b540f3fa 100644 --- a/docs/models/components/webhookcheckoutcreatedpayload.md +++ b/docs/models/components/webhookcheckoutcreatedpayload.md @@ -11,28 +11,28 @@ import { WebhookCheckoutCreatedPayload } from "@polar-sh/sdk/models/components"; let value: WebhookCheckoutCreatedPayload = { data: { - createdAt: new Date("2023-06-22T12:17:16.742Z"), - modifiedAt: new Date("2024-06-13T22:38:03.801Z"), + createdAt: new Date("2024-10-30T06:10:40.764Z"), + modifiedAt: new Date("2023-08-02T02:04:13.457Z"), id: "", - status: "expired", + status: "confirmed", clientSecret: "", - url: "https://unhappy-pillbox.biz/", - expiresAt: new Date("2022-08-14T10:50:31.804Z"), - successUrl: "https://live-final.name/", + url: "https://oily-distinction.biz/", + expiresAt: new Date("2023-04-21T12:43:04.324Z"), + successUrl: "https://pointless-executor.com", embedOrigin: "", - amount: 892451, - taxAmount: 629961, - currency: "Rupiah", - totalAmount: 860443, + amount: 244046, + taxAmount: 452831, + currency: "Venezuelan bolívar", + totalAmount: 610363, productId: "", productPriceId: "", isPaymentRequired: false, customerId: "", customerName: "", - customerEmail: "Lauren_Bogisich@hotmail.com", + customerEmail: "Laurence_Harber@hotmail.com", customerIpAddress: "", customerBillingAddress: { - country: "Bouvet Island", + country: "Tunisia", }, customerTaxId: "", paymentProcessorMetadata: {}, @@ -40,36 +40,40 @@ let value: WebhookCheckoutCreatedPayload = { "key": "", }, product: { - createdAt: new Date("2024-05-11T15:36:51.992Z"), - modifiedAt: new Date("2023-07-16T02:29:30.643Z"), + createdAt: new Date("2024-06-08T19:16:48.368Z"), + modifiedAt: new Date("2023-10-08T06:12:11.011Z"), id: "", name: "", - description: - "obedience meh among scaffold league bravely wilderness pivot proud", + description: "but sizzle yippee honestly unsung drat silver", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2023-10-13T14:08:51.106Z"), - modifiedAt: new Date("2023-03-02T17:40:21.311Z"), + createdAt: new Date("2023-05-31T08:15:17.595Z"), + modifiedAt: new Date("2024-08-02T18:33:58.243Z"), id: "", isArchived: false, productId: "", + priceCurrency: "", + minimumAmount: 363615, + maximumAmount: 885282, + presetAmount: 40916, recurringInterval: "month", }, ], benefits: [ { - createdAt: new Date("2023-10-31T19:49:06.620Z"), - modifiedAt: new Date("2024-05-07T17:42:22.245Z"), + createdAt: new Date("2024-10-19T07:36:29.018Z"), + modifiedAt: new Date("2022-08-16T14:40:51.811Z"), id: "", - type: "ads", - description: - "sleet scary jubilantly courteous excluding before bashfully able whenever since", + description: "iterate drat intently huzzah", selectable: false, deletable: false, organizationId: "", + properties: { + paidArticles: false, + }, }, ], medias: [ @@ -77,28 +81,48 @@ let value: WebhookCheckoutCreatedPayload = { id: "", organizationId: "", name: "", - path: "/Network", + path: "/media", mimeType: "", - size: 709870, + size: 14614, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2024-02-01T07:14:52.690Z"), + lastModifiedAt: new Date("2023-06-15T01:48:27.572Z"), version: "", isUploaded: false, - createdAt: new Date("2024-07-20T17:13:35.220Z"), + createdAt: new Date("2024-11-28T22:17:24.181Z"), }, ], }, productPrice: { - createdAt: new Date("2022-06-05T03:18:14.991Z"), - modifiedAt: new Date("2024-04-15T20:33:21.883Z"), + createdAt: new Date("2024-07-14T07:58:13.561Z"), + modifiedAt: new Date("2024-10-26T15:27:03.943Z"), id: "", isArchived: false, productId: "", + recurringInterval: "month", }, subscriptionId: "", + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2022-03-31T05:08:04.982Z"), + modifiedAt: new Date("2022-12-10T11:19:22.816Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 742652, + required: false, + }, + ], }, }; ``` diff --git a/docs/models/components/webhookcheckoutupdatedpayload.md b/docs/models/components/webhookcheckoutupdatedpayload.md index 00be076d..4efb77dc 100644 --- a/docs/models/components/webhookcheckoutupdatedpayload.md +++ b/docs/models/components/webhookcheckoutupdatedpayload.md @@ -11,28 +11,28 @@ import { WebhookCheckoutUpdatedPayload } from "@polar-sh/sdk/models/components"; let value: WebhookCheckoutUpdatedPayload = { data: { - createdAt: new Date("2023-02-08T16:54:04.413Z"), - modifiedAt: new Date("2023-03-12T19:58:30.016Z"), + createdAt: new Date("2022-08-07T22:36:11.072Z"), + modifiedAt: new Date("2024-08-17T23:34:09.972Z"), id: "", - status: "failed", + status: "expired", clientSecret: "", - url: "https://upset-hippodrome.com", - expiresAt: new Date("2023-05-17T22:14:01.048Z"), - successUrl: "https://neighboring-paintwork.com/", + url: "https://prickly-lieu.biz/", + expiresAt: new Date("2023-11-20T11:24:09.591Z"), + successUrl: "https://first-caption.name", embedOrigin: "", - amount: 617530, - taxAmount: 132273, - currency: "Kenyan Shilling", - totalAmount: 892331, + amount: 282979, + taxAmount: 325225, + currency: "Lebanese Pound", + totalAmount: 731201, productId: "", productPriceId: "", isPaymentRequired: false, customerId: "", customerName: "", - customerEmail: "Cordie.Beier@gmail.com", + customerEmail: "Javier.Stehr40@gmail.com", customerIpAddress: "", customerBillingAddress: { - country: "Mayotte", + country: "Cambodia", }, customerTaxId: "", paymentProcessorMetadata: {}, @@ -40,40 +40,39 @@ let value: WebhookCheckoutUpdatedPayload = { "key": "", }, product: { - createdAt: new Date("2024-04-01T05:07:23.085Z"), - modifiedAt: new Date("2024-10-08T20:53:19.157Z"), + createdAt: new Date("2022-01-02T23:04:43.120Z"), + modifiedAt: new Date("2023-01-30T14:22:07.592Z"), id: "", name: "", - description: "break cinema without apostrophize adrenalin whoa", + description: + "closely republican yahoo digestive crazy plus eyeliner rewarding mmm", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2022-11-05T08:00:43.230Z"), - modifiedAt: new Date("2023-10-08T00:15:06.736Z"), + createdAt: new Date("2022-05-16T08:11:45.795Z"), + modifiedAt: new Date("2023-05-22T14:57:08.680Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - minimumAmount: 433282, - maximumAmount: 107645, - presetAmount: 958248, + minimumAmount: 654833, + maximumAmount: 371870, + presetAmount: 517246, + recurringInterval: "year", }, ], benefits: [ { - createdAt: new Date("2024-11-11T12:57:03.441Z"), - modifiedAt: new Date("2022-06-15T12:31:01.479Z"), + createdAt: new Date("2022-07-11T19:27:37.850Z"), + modifiedAt: new Date("2024-09-21T16:35:34.104Z"), id: "", - description: - "seldom dandelion successfully essential encode accept annually where that", + type: "discord", + description: "considering although foretell upbeat gift wherever", selectable: false, deletable: false, organizationId: "", - properties: { - paidArticles: false, - }, }, ], medias: [ @@ -81,30 +80,48 @@ let value: WebhookCheckoutUpdatedPayload = { id: "", organizationId: "", name: "", - path: "/opt/lib", + path: "/lib", mimeType: "", - size: 749480, + size: 333131, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2024-08-18T17:37:40.864Z"), + lastModifiedAt: new Date("2022-09-13T07:17:27.740Z"), version: "", isUploaded: false, - createdAt: new Date("2023-06-21T17:53:47.217Z"), + createdAt: new Date("2024-08-09T01:53:56.642Z"), }, ], }, productPrice: { - createdAt: new Date("2023-11-17T10:35:42.718Z"), - modifiedAt: new Date("2023-11-28T05:20:13.228Z"), + createdAt: new Date("2023-11-03T19:31:40.966Z"), + modifiedAt: new Date("2024-08-03T13:01:33.319Z"), id: "", isArchived: false, productId: "", - priceCurrency: "", - priceAmount: 511975, + recurringInterval: "month", }, subscriptionId: "", + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2024-07-02T16:51:39.984Z"), + modifiedAt: new Date("2023-11-01T05:10:14.364Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 12254, + required: false, + }, + ], }, }; ``` diff --git a/docs/models/components/webhookdonationcreatedpayload.md b/docs/models/components/webhookdonationcreatedpayload.md index 039dbf9c..8608ae4c 100644 --- a/docs/models/components/webhookdonationcreatedpayload.md +++ b/docs/models/components/webhookdonationcreatedpayload.md @@ -11,49 +11,69 @@ import { WebhookDonationCreatedPayload } from "@polar-sh/sdk/models/components"; let value: WebhookDonationCreatedPayload = { data: { - createdAt: new Date("2023-08-24T15:56:27.872Z"), - modifiedAt: new Date("2023-12-19T00:35:32.011Z"), + createdAt: new Date("2024-06-01T03:35:11.920Z"), + modifiedAt: new Date("2022-06-16T15:19:22.874Z"), id: "", - amount: 222085, - currency: "Dong", + amount: 988523, + currency: "Dalasi", message: "", donor: { id: "", publicName: "", - avatarUrl: "https://all-corral.org", + avatarUrl: "https://smoggy-place.net/", }, - email: "Roscoe_Gerhold37@hotmail.com", + email: "Marjory_Price46@hotmail.com", issue: { - id: "4e2d7494-899d-4934-96ce-0f729709e73a", - number: 915191, + id: "30c5c2a0-90bc-4653-ad7c-9224d5eab407", + number: 335230, title: "", - state: "open", - issueCreatedAt: new Date("2024-05-09T20:55:16.513Z"), + state: "closed", + issueCreatedAt: new Date("2023-12-02T02:54:47.752Z"), needsConfirmationSolved: false, funding: {}, repository: { - id: "0b23d145-e293-4478-b299-6351b05e382f", + id: "fc82a267-7308-4718-b1fb-5d1ea1699baa", isPrivate: false, name: "MyOrg", - description: "whose consequently negative cannon helpful", + description: "subtle zowie gallivant", stars: 1337, license: "", homepage: "", profileSettings: {}, organization: { - id: "6276f29f-1bd5-4915-b3a0-78ee0968a4ce", + id: "12ac07c8-6215-4451-a38f-6648daffd0c9", name: "", - avatarUrl: "https://monstrous-jet.net", + avatarUrl: "https://electric-fraudster.name", isPersonal: false, bio: "", prettyName: "", - company: "Anderson, Bashirian and Kreiger", + company: "Stracke LLC", blog: "", location: "", - email: "Cristopher26@hotmail.com", + email: "Tamara61@gmail.com", twitterUsername: "", organizationId: "", }, + internalOrganization: { + createdAt: new Date("2023-04-30T05:00:39.346Z"), + modifiedAt: new Date("2024-02-04T23:21:36.977Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://caring-mom.info", + bio: "", + company: "Wehner, Dibbert and Boyle", + blog: "", + location: "", + email: "Aileen96@yahoo.com", + twitterUsername: "", + pledgeMinimumAmount: 913945, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 334873, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, }, pledgeBadgeCurrentlyEmbedded: false, }, diff --git a/docs/models/components/webhookordercreatedpayload.md b/docs/models/components/webhookordercreatedpayload.md index 39003f03..3e3b9108 100644 --- a/docs/models/components/webhookordercreatedpayload.md +++ b/docs/models/components/webhookordercreatedpayload.md @@ -11,16 +11,16 @@ import { WebhookOrderCreatedPayload } from "@polar-sh/sdk/models/components"; let value: WebhookOrderCreatedPayload = { data: { - createdAt: new Date("2022-06-25T04:35:26.551Z"), - modifiedAt: new Date("2024-03-05T22:33:02.662Z"), + createdAt: new Date("2022-10-05T21:44:59.619Z"), + modifiedAt: new Date("2024-01-21T01:04:50.326Z"), id: "", metadata: { "key": "", }, - amount: 319664, - taxAmount: 388215, - currency: "Turkish Lira", - billingReason: "subscription_cycle", + amount: 611589, + taxAmount: 896483, + currency: "Vatu", + billingReason: "subscription_update", userId: "", productId: "", productPriceId: "", @@ -28,48 +28,49 @@ let value: WebhookOrderCreatedPayload = { checkoutId: "", user: { id: "", - email: "Kennedi81@gmail.com", + email: "Gabrielle69@gmail.com", publicName: "", githubUsername: "", - avatarUrl: "https://frilly-complication.biz", + avatarUrl: "https://bulky-whale.com/", }, product: { - createdAt: new Date("2023-10-19T09:57:54.093Z"), - modifiedAt: new Date("2023-01-02T15:50:57.660Z"), + createdAt: new Date("2023-12-31T21:38:37.650Z"), + modifiedAt: new Date("2022-02-26T00:22:42.503Z"), id: "", name: "", - description: - "redound unpleasant an brr of gosh concerning hm coolly submitter", + description: "nervously zowie amid", isRecurring: false, isArchived: false, organizationId: "", }, productPrice: { - createdAt: new Date("2023-07-28T09:20:22.857Z"), - modifiedAt: new Date("2023-05-26T18:04:20.819Z"), + createdAt: new Date("2024-02-02T12:36:51.052Z"), + modifiedAt: new Date("2024-10-26T12:43:46.379Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 990568, + minimumAmount: 901228, + maximumAmount: 597835, + presetAmount: 571214, recurringInterval: "month", }, subscription: { metadata: { "key": "", }, - createdAt: new Date("2023-03-03T10:59:48.224Z"), - modifiedAt: new Date("2024-07-04T22:25:13.212Z"), + createdAt: new Date("2024-04-25T05:56:55.870Z"), + modifiedAt: new Date("2022-10-19T11:47:06.902Z"), id: "", - amount: 623092, - currency: "Convertible Marks", - recurringInterval: "month", - status: "active", - currentPeriodStart: new Date("2023-03-11T20:41:59.793Z"), - currentPeriodEnd: new Date("2024-03-17T00:47:08.664Z"), + amount: 917917, + currency: "Djibouti Franc", + recurringInterval: "year", + status: "incomplete", + currentPeriodStart: new Date("2023-06-26T07:05:03.761Z"), + currentPeriodEnd: new Date("2022-06-13T06:47:36.631Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2023-11-20T08:32:51.731Z"), - endedAt: new Date("2022-01-01T08:03:47.357Z"), + startedAt: new Date("2024-07-12T13:59:51.236Z"), + endedAt: new Date("2023-11-04T22:50:34.224Z"), userId: "", productId: "", priceId: "", diff --git a/docs/models/components/webhookorganizationupdatedpayload.md b/docs/models/components/webhookorganizationupdatedpayload.md index ebd1f308..04b02beb 100644 --- a/docs/models/components/webhookorganizationupdatedpayload.md +++ b/docs/models/components/webhookorganizationupdatedpayload.md @@ -11,21 +11,21 @@ import { WebhookOrganizationUpdatedPayload } from "@polar-sh/sdk/models/componen let value: WebhookOrganizationUpdatedPayload = { data: { - createdAt: new Date("2024-02-20T06:07:18.118Z"), - modifiedAt: new Date("2024-10-13T12:17:22.336Z"), + createdAt: new Date("2024-06-25T10:13:45.773Z"), + modifiedAt: new Date("2024-05-28T00:02:44.533Z"), id: "", name: "", slug: "", - avatarUrl: "https://overcooked-tooth.biz/", + avatarUrl: "https://golden-orchid.com/", bio: "", - company: "Wintheiser and Sons", + company: "Bergstrom - Crona", blog: "", location: "", - email: "Ismael.Miller@yahoo.com", + email: "Lolita47@yahoo.com", twitterUsername: "", - pledgeMinimumAmount: 552292, + pledgeMinimumAmount: 677492, pledgeBadgeShowAmount: false, - defaultUpfrontSplitToContributors: 405679, + defaultUpfrontSplitToContributors: 319975, donationsEnabled: false, profileSettings: {}, featureSettings: {}, diff --git a/docs/models/components/webhookpledgecreatedpayload.md b/docs/models/components/webhookpledgecreatedpayload.md index 833bfc64..17de9ace 100644 --- a/docs/models/components/webhookpledgecreatedpayload.md +++ b/docs/models/components/webhookpledgecreatedpayload.md @@ -11,44 +11,65 @@ import { WebhookPledgeCreatedPayload } from "@polar-sh/sdk/models/components"; let value: WebhookPledgeCreatedPayload = { data: { - createdAt: new Date("2024-10-27T17:26:52.816Z"), - modifiedAt: new Date("2024-03-13T16:08:00.184Z"), + createdAt: new Date("2024-05-30T10:39:49.151Z"), + modifiedAt: new Date("2022-05-16T21:37:36.664Z"), id: "", - amount: 893446, - currency: "Surinam Dollar", - state: "initiated", - type: "pay_upfront", + amount: 871469, + currency: "Liberian Dollar", + state: "refunded", + type: "pay_directly", issue: { - id: "d0ba7949-b62f-4f10-b5f6-3f3a1a246c82", - number: 637724, + id: "a14b144b-0561-478f-8de4-2a39317a1864", + number: 234326, title: "", - state: "open", - issueCreatedAt: new Date("2022-03-13T21:30:50.627Z"), + state: "closed", + issueCreatedAt: new Date("2022-02-04T22:19:13.160Z"), needsConfirmationSolved: false, funding: {}, repository: { - id: "134aaddc-91b4-4c52-a9e2-44c276c73173", + id: "28a634ab-fb63-48b1-b036-a08456761276", isPrivate: false, name: "MyOrg", - description: "blindly mixture yieldingly phooey", + description: + "schlep atomize wilted for nucleotidase nor gullible cake aha", stars: 1337, license: "", homepage: "", profileSettings: {}, organization: { - id: "53a2ef70-24ee-4f42-b856-705b7cafb82e", + id: "ca6060f6-9f92-4f32-b56f-8cc611fd5dee", name: "", - avatarUrl: "https://bulky-cannon.info", + avatarUrl: "https://staid-awareness.net/", isPersonal: false, bio: "", prettyName: "", - company: "Shields, Davis and Muller", + company: "Rice LLC", blog: "", location: "", - email: "Berta_Stoltenberg@gmail.com", + email: "Ali80@yahoo.com", twitterUsername: "", organizationId: "", }, + internalOrganization: { + createdAt: new Date("2023-09-12T04:23:00.142Z"), + modifiedAt: new Date("2022-04-26T00:53:32.713Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://ideal-translation.biz/", + bio: "", + company: "Nitzsche Inc", + blog: "", + location: "", + email: "Maureen83@gmail.com", + twitterUsername: "", + pledgeMinimumAmount: 186756, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 422299, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, }, pledgeBadgeCurrentlyEmbedded: false, }, diff --git a/docs/models/components/webhookpledgeupdatedpayload.md b/docs/models/components/webhookpledgeupdatedpayload.md index bfe87e51..b2e2400c 100644 --- a/docs/models/components/webhookpledgeupdatedpayload.md +++ b/docs/models/components/webhookpledgeupdatedpayload.md @@ -11,44 +11,64 @@ import { WebhookPledgeUpdatedPayload } from "@polar-sh/sdk/models/components"; let value: WebhookPledgeUpdatedPayload = { data: { - createdAt: new Date("2022-11-05T07:00:15.686Z"), - modifiedAt: new Date("2024-03-30T19:29:14.034Z"), + createdAt: new Date("2023-12-17T23:08:04.134Z"), + modifiedAt: new Date("2024-07-07T00:56:00.393Z"), id: "", - amount: 171764, - currency: "Pa'anga", - state: "charge_disputed", - type: "pay_on_completion", + amount: 527628, + currency: "Rial Omani", + state: "cancelled", + type: "pay_directly", issue: { - id: "2d518022-75b1-444b-ae78-cdc413988160", - number: 245870, + id: "1bf60b4e-2607-439b-8421-4d6345389cb3", + number: 903880, title: "", state: "closed", - issueCreatedAt: new Date("2023-08-07T08:14:46.348Z"), + issueCreatedAt: new Date("2022-01-09T03:41:50.109Z"), needsConfirmationSolved: false, funding: {}, repository: { - id: "02eed95f-e018-4b72-863c-86289ab06525", + id: "07de3c6a-52b4-40f6-b1cd-4a1633f08a53", isPrivate: false, name: "MyOrg", - description: "entomb psst jaggedly kissingly forenenst marathon", + description: "qualified cone emotional lest", stars: 1337, license: "", homepage: "", profileSettings: {}, organization: { - id: "a60400f1-7d63-46d0-a730-c0682e629a60", + id: "9f98ee7a-a429-40dc-9bef-7afda7b00c2c", name: "", - avatarUrl: "https://creative-slide.name/", + avatarUrl: "https://best-knitting.biz", isPersonal: false, bio: "", prettyName: "", - company: "Roob Inc", + company: "Lindgren - Abshire", blog: "", location: "", - email: "Gustave89@yahoo.com", + email: "Ivy32@gmail.com", twitterUsername: "", organizationId: "", }, + internalOrganization: { + createdAt: new Date("2022-07-07T22:13:16.221Z"), + modifiedAt: new Date("2023-11-16T12:57:07.514Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://big-secrecy.org/", + bio: "", + company: "Metz and Sons", + blog: "", + location: "", + email: "Joany_Fritsch@hotmail.com", + twitterUsername: "", + pledgeMinimumAmount: 489133, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 491716, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, }, pledgeBadgeCurrentlyEmbedded: false, }, diff --git a/docs/models/components/webhookproductcreatedpayload.md b/docs/models/components/webhookproductcreatedpayload.md index d1fb0f56..dc283de1 100644 --- a/docs/models/components/webhookproductcreatedpayload.md +++ b/docs/models/components/webhookproductcreatedpayload.md @@ -11,37 +11,41 @@ import { WebhookProductCreatedPayload } from "@polar-sh/sdk/models/components"; let value: WebhookProductCreatedPayload = { data: { - createdAt: new Date("2022-01-16T15:16:57.052Z"), - modifiedAt: new Date("2024-01-16T00:30:32.668Z"), + createdAt: new Date("2024-02-05T02:33:57.609Z"), + modifiedAt: new Date("2022-10-27T07:25:37.639Z"), id: "", name: "", - description: - "galoshes kinase considering although foretell upbeat gift wherever than", + description: "husky avalanche squid noxious connect amused", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2023-07-21T20:59:47.090Z"), - modifiedAt: new Date("2024-07-02T16:51:39.984Z"), + createdAt: new Date("2024-01-29T05:16:30.896Z"), + modifiedAt: new Date("2022-10-19T23:23:19.077Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 610598, + minimumAmount: 799934, + maximumAmount: 400993, + presetAmount: 95162, + recurringInterval: "year", }, ], benefits: [ { - createdAt: new Date("2022-10-05T21:44:59.619Z"), - modifiedAt: new Date("2024-01-21T01:04:50.326Z"), + createdAt: new Date("2024-02-25T14:45:53.645Z"), + modifiedAt: new Date("2022-01-14T07:20:18.212Z"), id: "", - type: "github_repository", description: - "brr because promptly yippee soulful ick vastly than mmm next", + "instead under notwithstanding elastic furthermore moisten save", selectable: false, deletable: false, organizationId: "", + properties: { + paidArticles: false, + }, }, ], medias: [ @@ -49,17 +53,36 @@ let value: WebhookProductCreatedPayload = { id: "", organizationId: "", name: "", - path: "/usr/lib", + path: "/etc/namedb", mimeType: "", - size: 468314, + size: 971493, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2022-04-12T18:14:54.281Z"), + lastModifiedAt: new Date("2024-10-20T08:31:50.564Z"), version: "", isUploaded: false, - createdAt: new Date("2023-11-30T01:48:48.230Z"), + createdAt: new Date("2024-02-02T21:36:44.416Z"), + }, + ], + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2022-01-02T05:13:35.742Z"), + modifiedAt: new Date("2023-06-17T12:06:28.738Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 594804, + required: false, }, ], }, diff --git a/docs/models/components/webhookproductupdatedpayload.md b/docs/models/components/webhookproductupdatedpayload.md index 2ba50971..f3ad18f8 100644 --- a/docs/models/components/webhookproductupdatedpayload.md +++ b/docs/models/components/webhookproductupdatedpayload.md @@ -11,37 +11,39 @@ import { WebhookProductUpdatedPayload } from "@polar-sh/sdk/models/components"; let value: WebhookProductUpdatedPayload = { data: { - createdAt: new Date("2023-04-02T04:28:31.052Z"), - modifiedAt: new Date("2024-12-08T19:52:42.080Z"), + createdAt: new Date("2024-12-25T09:41:05.009Z"), + modifiedAt: new Date("2022-05-26T16:11:49.684Z"), id: "", name: "", - description: "print athletic factorize", + description: "candid than indeed", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2022-11-06T11:27:28.293Z"), - modifiedAt: new Date("2022-06-17T20:01:38.959Z"), + createdAt: new Date("2024-03-14T12:56:53.269Z"), + modifiedAt: new Date("2024-07-23T05:17:11.148Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 827452, - recurringInterval: "year", + minimumAmount: 525439, + maximumAmount: 402139, + presetAmount: 394633, }, ], benefits: [ { - createdAt: new Date("2024-07-18T02:33:02.859Z"), - modifiedAt: new Date("2024-04-13T16:34:33.011Z"), + createdAt: new Date("2022-01-17T05:42:45.439Z"), + modifiedAt: new Date("2024-03-25T22:52:07.722Z"), id: "", - type: "ads", - description: - "across against absent since outdo madly hard-to-find gee ouch", + description: "indeed throughout joyfully annual doodle dish", selectable: false, deletable: false, organizationId: "", + properties: { + paidArticles: false, + }, }, ], medias: [ @@ -49,17 +51,43 @@ let value: WebhookProductUpdatedPayload = { id: "", organizationId: "", name: "", - path: "/boot/defaults", + path: "/etc/mail", mimeType: "", - size: 827370, + size: 570896, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2024-08-31T19:50:37.625Z"), + lastModifiedAt: new Date("2024-10-06T18:59:00.388Z"), version: "", isUploaded: false, - createdAt: new Date("2022-07-23T17:17:02.467Z"), + createdAt: new Date("2023-12-13T02:05:45.362Z"), + }, + ], + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2024-07-29T19:58:52.381Z"), + modifiedAt: new Date("2024-02-07T07:59:02.677Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: { + options: [ + { + value: "", + label: "", + }, + ], + }, + }, + order: 375940, + required: false, }, ], }, diff --git a/docs/models/components/webhooksubscriptionactivepayload.md b/docs/models/components/webhooksubscriptionactivepayload.md index d447b7d9..97e5fbe4 100644 --- a/docs/models/components/webhooksubscriptionactivepayload.md +++ b/docs/models/components/webhooksubscriptionactivepayload.md @@ -12,18 +12,18 @@ import { WebhookSubscriptionActivePayload } from "@polar-sh/sdk/models/component let value: WebhookSubscriptionActivePayload = { data: { - createdAt: new Date("2024-07-16T21:37:42.229Z"), - modifiedAt: new Date("2024-09-18T10:12:41.084Z"), + createdAt: new Date("2022-05-03T03:10:03.746Z"), + modifiedAt: new Date("2024-10-13T07:18:44.318Z"), id: "", - amount: 197633, - currency: "Iranian Rial", - recurringInterval: "month", - status: "incomplete_expired", - currentPeriodStart: new Date("2023-10-06T20:42:43.162Z"), - currentPeriodEnd: new Date("2023-07-21T18:40:18.501Z"), + amount: 218555, + currency: "Euro", + recurringInterval: "year", + status: "active", + currentPeriodStart: new Date("2023-09-02T01:59:47.325Z"), + currentPeriodEnd: new Date("2023-02-05T12:14:52.685Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2023-04-25T12:36:59.831Z"), - endedAt: new Date("2024-02-25T18:58:43.313Z"), + startedAt: new Date("2023-03-21T02:46:56.469Z"), + endedAt: new Date("2022-07-05T00:05:08.045Z"), userId: "", productId: "", priceId: "", @@ -32,42 +32,51 @@ let value: WebhookSubscriptionActivePayload = { "key": "", }, user: { - email: "Harvey_Mante@gmail.com", + email: "Henderson_Christiansen96@yahoo.com", publicName: "", githubUsername: "", - avatarUrl: "https://limp-stump.info/", + avatarUrl: "https://triangular-finer.name", }, product: { - createdAt: new Date("2024-08-28T06:27:33.846Z"), - modifiedAt: new Date("2022-02-14T20:16:34.894Z"), + createdAt: new Date("2022-04-09T05:37:51.811Z"), + modifiedAt: new Date("2023-01-05T09:56:17.090Z"), id: "", name: "", - description: "crest yum versus wedge lock", + description: "a er affectionate unlike", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2024-01-05T03:08:39.093Z"), - modifiedAt: new Date("2024-07-14T07:58:13.561Z"), + createdAt: new Date("2024-04-09T16:23:40.595Z"), + modifiedAt: new Date("2024-12-26T22:45:57.487Z"), id: "", isArchived: false, productId: "", - priceCurrency: "", - priceAmount: 939456, + recurringInterval: "month", }, ], benefits: [ { - createdAt: new Date("2024-07-15T05:59:42.148Z"), - modifiedAt: new Date("2022-03-31T05:08:04.982Z"), + createdAt: new Date("2022-03-04T10:48:40.423Z"), + modifiedAt: new Date("2024-01-08T16:17:32.860Z"), id: "", - type: "ads", - description: - "ostrich at sit heartfelt filthy abnormally gee convalesce", + description: "than mooch meh gosh past mmm but well-off", selectable: false, deletable: false, organizationId: "", + properties: { + prefix: "", + expires: { + ttl: 928637, + timeframe: "month", + }, + activations: { + limit: 601880, + enableUserAdmin: false, + }, + limitUsage: 962248, + }, }, ], medias: [ @@ -75,29 +84,48 @@ let value: WebhookSubscriptionActivePayload = { id: "", organizationId: "", name: "", - path: "/private", + path: "/opt/bin", mimeType: "", - size: 369976, + size: 630837, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2022-03-09T06:44:50.644Z"), + lastModifiedAt: new Date("2023-04-27T22:20:58.886Z"), version: "", isUploaded: false, - createdAt: new Date("2022-12-06T22:09:36.543Z"), + createdAt: new Date("2023-01-13T19:33:41.074Z"), + }, + ], + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2023-09-17T07:55:12.504Z"), + modifiedAt: new Date("2023-05-25T18:09:04.297Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 54128, + required: false, }, ], }, price: { - createdAt: new Date("2024-05-29T02:01:29.899Z"), - modifiedAt: new Date("2023-06-09T02:59:50.162Z"), + createdAt: new Date("2023-08-16T15:42:57.192Z"), + modifiedAt: new Date("2024-12-26T02:26:25.100Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 184149, - recurringInterval: "month", + priceAmount: 459436, + recurringInterval: "year", }, }, }; diff --git a/docs/models/components/webhooksubscriptioncanceledpayload.md b/docs/models/components/webhooksubscriptioncanceledpayload.md index c13f0d29..5665d8fe 100644 --- a/docs/models/components/webhooksubscriptioncanceledpayload.md +++ b/docs/models/components/webhooksubscriptioncanceledpayload.md @@ -12,18 +12,18 @@ import { WebhookSubscriptionCanceledPayload } from "@polar-sh/sdk/models/compone let value: WebhookSubscriptionCanceledPayload = { data: { - createdAt: new Date("2024-06-16T05:18:39.218Z"), - modifiedAt: new Date("2023-09-03T05:46:16.237Z"), + createdAt: new Date("2024-07-22T10:55:03.530Z"), + modifiedAt: new Date("2024-10-03T13:31:02.987Z"), id: "", - amount: 502917, - currency: "Riel", + amount: 366130, + currency: "Congolese Franc", recurringInterval: "year", status: "active", - currentPeriodStart: new Date("2022-05-11T18:45:17.128Z"), - currentPeriodEnd: new Date("2022-03-18T03:00:38.903Z"), + currentPeriodStart: new Date("2024-08-28T19:32:15.730Z"), + currentPeriodEnd: new Date("2022-11-24T03:54:23.518Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2022-10-21T14:08:24.521Z"), - endedAt: new Date("2024-12-02T16:44:09.862Z"), + startedAt: new Date("2022-04-08T04:12:08.099Z"), + endedAt: new Date("2024-08-20T17:29:24.705Z"), userId: "", productId: "", priceId: "", @@ -32,44 +32,55 @@ let value: WebhookSubscriptionCanceledPayload = { "key": "", }, user: { - email: "Kaleigh.Blick62@gmail.com", + email: "Ignatius_Jast-Marvin22@yahoo.com", publicName: "", githubUsername: "", - avatarUrl: "https://celebrated-bandwidth.biz", + avatarUrl: "https://strident-countess.biz", }, product: { - createdAt: new Date("2023-10-31T22:30:40.646Z"), - modifiedAt: new Date("2024-10-28T09:44:26.940Z"), + createdAt: new Date("2022-01-10T13:24:18.025Z"), + modifiedAt: new Date("2023-02-26T18:38:22.806Z"), id: "", name: "", - description: "miserly sesame separately except reproach once", + description: + "modulo boyfriend miserable actually truthfully spear yuck ultimately whether misspend", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2024-03-12T04:23:02.705Z"), - modifiedAt: new Date("2024-07-30T18:07:55.784Z"), + createdAt: new Date("2022-03-14T06:04:36.588Z"), + modifiedAt: new Date("2023-04-06T00:36:00.465Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - minimumAmount: 888644, - maximumAmount: 309449, - presetAmount: 357760, - recurringInterval: "year", + minimumAmount: 660201, + maximumAmount: 988035, + presetAmount: 384084, }, ], benefits: [ { - createdAt: new Date("2023-03-20T13:22:59.184Z"), - modifiedAt: new Date("2024-10-11T04:41:09.823Z"), + createdAt: new Date("2023-08-25T13:14:09.111Z"), + modifiedAt: new Date("2023-05-24T06:35:11.657Z"), id: "", - type: "articles", - description: "fatal waft supposing equally versus markup", + description: "meaty outdo palatable qua inventory expensive", selectable: false, deletable: false, organizationId: "", + properties: { + prefix: "", + expires: { + ttl: 517327, + timeframe: "month", + }, + activations: { + limit: 552292, + enableUserAdmin: false, + }, + limitUsage: 405679, + }, }, ], medias: [ @@ -77,27 +88,48 @@ let value: WebhookSubscriptionCanceledPayload = { id: "", organizationId: "", name: "", - path: "/proc", + path: "/etc/namedb", mimeType: "", - size: 190139, + size: 868057, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2023-04-15T05:58:11.260Z"), + lastModifiedAt: new Date("2022-05-04T02:40:37.506Z"), version: "", isUploaded: false, - createdAt: new Date("2022-11-22T09:26:52.208Z"), + createdAt: new Date("2022-06-02T20:34:13.519Z"), + }, + ], + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2022-02-13T04:39:14.167Z"), + modifiedAt: new Date("2024-07-29T01:46:42.865Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 891709, + required: false, }, ], }, price: { - createdAt: new Date("2024-04-05T10:17:53.045Z"), - modifiedAt: new Date("2024-04-25T10:47:31.841Z"), + createdAt: new Date("2023-05-21T21:06:16.049Z"), + modifiedAt: new Date("2023-03-07T22:19:42.398Z"), id: "", isArchived: false, productId: "", - recurringInterval: "month", + priceCurrency: "", + priceAmount: 126154, + recurringInterval: "year", }, }, }; diff --git a/docs/models/components/webhooksubscriptioncreatedpayload.md b/docs/models/components/webhooksubscriptioncreatedpayload.md index 01a4fe17..005db0ca 100644 --- a/docs/models/components/webhooksubscriptioncreatedpayload.md +++ b/docs/models/components/webhooksubscriptioncreatedpayload.md @@ -11,18 +11,18 @@ import { WebhookSubscriptionCreatedPayload } from "@polar-sh/sdk/models/componen let value: WebhookSubscriptionCreatedPayload = { data: { - createdAt: new Date("2022-01-19T11:56:59.634Z"), - modifiedAt: new Date("2024-07-09T07:50:59.473Z"), + createdAt: new Date("2024-12-07T01:19:47.170Z"), + modifiedAt: new Date("2022-06-04T13:30:33.023Z"), id: "", - amount: 164585, - currency: "Ouguiya", - recurringInterval: "year", - status: "unpaid", - currentPeriodStart: new Date("2024-07-14T07:13:26.291Z"), - currentPeriodEnd: new Date("2024-09-01T06:14:13.897Z"), + amount: 856101, + currency: "Solomon Islands Dollar", + recurringInterval: "month", + status: "incomplete", + currentPeriodStart: new Date("2024-03-17T14:54:52.778Z"), + currentPeriodEnd: new Date("2022-04-18T13:40:59.739Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2024-09-18T22:39:55.324Z"), - endedAt: new Date("2022-03-25T21:43:26.476Z"), + startedAt: new Date("2024-06-05T14:26:47.431Z"), + endedAt: new Date("2024-05-25T03:35:13.442Z"), userId: "", productId: "", priceId: "", @@ -31,41 +31,50 @@ let value: WebhookSubscriptionCreatedPayload = { "key": "", }, user: { - email: "Hattie.Lesch@hotmail.com", + email: "Virginia_Mitchell46@gmail.com", publicName: "", githubUsername: "", - avatarUrl: "https://unconscious-eyebrow.net/", + avatarUrl: "https://infatuated-wasabi.com", }, product: { - createdAt: new Date("2022-01-06T08:39:30.649Z"), - modifiedAt: new Date("2024-11-06T07:58:52.676Z"), + createdAt: new Date("2022-06-25T22:06:25.582Z"), + modifiedAt: new Date("2024-09-13T18:47:53.991Z"), id: "", name: "", - description: "yum override knit", + description: "pants shoot ew yahoo lest under", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2024-08-15T23:25:12.921Z"), - modifiedAt: new Date("2024-01-17T01:47:37.881Z"), + createdAt: new Date("2024-05-17T05:06:11.950Z"), + modifiedAt: new Date("2022-07-03T14:59:21.254Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 772987, + minimumAmount: 646317, + maximumAmount: 730622, + presetAmount: 707192, + recurringInterval: "month", }, ], benefits: [ { - createdAt: new Date("2023-07-24T03:44:15.947Z"), - modifiedAt: new Date("2024-01-30T02:00:47.187Z"), + createdAt: new Date("2022-06-22T04:46:57.872Z"), + modifiedAt: new Date("2022-11-27T22:55:13.459Z"), id: "", - type: "discord", - description: "lest gadzooks unless", + description: + "gah sparse fencing parsnip playfully convection unbearably supposing bleakly plumber", selectable: false, deletable: false, organizationId: "", + properties: { + repositoryId: "", + repositoryOwner: "polarsource", + repositoryName: "private_repo", + permission: "pull", + }, }, ], medias: [ @@ -73,27 +82,57 @@ let value: WebhookSubscriptionCreatedPayload = { id: "", organizationId: "", name: "", - path: "/opt/bin", + path: "/System", mimeType: "", - size: 761807, + size: 144952, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2023-06-14T20:02:24.167Z"), + lastModifiedAt: new Date("2022-11-02T11:04:53.043Z"), version: "", isUploaded: false, - createdAt: new Date("2023-12-03T17:40:05.617Z"), + createdAt: new Date("2023-04-24T09:40:38.592Z"), + }, + ], + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2023-09-01T10:53:14.069Z"), + modifiedAt: new Date("2022-07-17T08:42:37.234Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: { + options: [ + { + value: "", + label: "", + }, + ], + }, + }, + order: 754898, + required: false, }, ], }, price: { - createdAt: new Date("2023-04-23T03:18:32.830Z"), - modifiedAt: new Date("2023-08-27T12:09:55.533Z"), + createdAt: new Date("2022-01-22T01:43:38.808Z"), + modifiedAt: new Date("2022-03-13T21:30:50.627Z"), id: "", isArchived: false, productId: "", - recurringInterval: "month", + priceCurrency: "", + minimumAmount: 92117, + maximumAmount: 249506, + presetAmount: 276720, + recurringInterval: "year", }, }, }; diff --git a/docs/models/components/webhooksubscriptionrevokedpayload.md b/docs/models/components/webhooksubscriptionrevokedpayload.md index 9b6f16f9..0d2118df 100644 --- a/docs/models/components/webhooksubscriptionrevokedpayload.md +++ b/docs/models/components/webhooksubscriptionrevokedpayload.md @@ -12,18 +12,18 @@ import { WebhookSubscriptionRevokedPayload } from "@polar-sh/sdk/models/componen let value: WebhookSubscriptionRevokedPayload = { data: { - createdAt: new Date("2022-07-29T18:18:20.436Z"), - modifiedAt: new Date("2022-11-19T06:41:38.705Z"), + createdAt: new Date("2024-08-05T00:25:50.473Z"), + modifiedAt: new Date("2024-03-22T22:29:10.462Z"), id: "", - amount: 534734, - currency: "Naira", - recurringInterval: "year", + amount: 166565, + currency: "Ethiopian Birr", + recurringInterval: "month", status: "canceled", - currentPeriodStart: new Date("2022-07-11T02:37:33.682Z"), - currentPeriodEnd: new Date("2024-03-26T09:56:20.287Z"), + currentPeriodStart: new Date("2023-05-28T12:14:22.735Z"), + currentPeriodEnd: new Date("2022-06-14T21:20:15.821Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2022-05-07T03:52:19.100Z"), - endedAt: new Date("2024-10-02T20:36:49.150Z"), + startedAt: new Date("2022-01-12T01:32:36.517Z"), + endedAt: new Date("2022-11-02T05:56:35.308Z"), userId: "", productId: "", priceId: "", @@ -32,42 +32,54 @@ let value: WebhookSubscriptionRevokedPayload = { "key": "", }, user: { - email: "Berta_Pagac@hotmail.com", + email: "Alexandria_Beer@hotmail.com", publicName: "", githubUsername: "", - avatarUrl: "https://odd-scout.biz/", + avatarUrl: "https://grimy-expansion.net/", }, product: { - createdAt: new Date("2024-08-17T23:34:09.972Z"), - modifiedAt: new Date("2022-12-02T09:15:42.253Z"), + createdAt: new Date("2024-08-12T21:27:15.147Z"), + modifiedAt: new Date("2023-03-25T14:39:48.268Z"), id: "", name: "", - description: "celebrate liberalize yuck regarding", + description: + "scarcely idolized closely uh-huh now whoa mid failing beside", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2024-03-24T10:54:04.717Z"), - modifiedAt: new Date("2023-07-26T12:45:38.576Z"), + createdAt: new Date("2022-11-03T19:09:54.192Z"), + modifiedAt: new Date("2024-06-08T16:42:11.724Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 469731, - recurringInterval: "year", + priceAmount: 853221, }, ], benefits: [ { - createdAt: new Date("2022-11-20T07:02:04.141Z"), - modifiedAt: new Date("2024-03-31T06:44:53.428Z"), + createdAt: new Date("2022-11-29T02:24:30.639Z"), + modifiedAt: new Date("2024-05-05T03:19:00.639Z"), id: "", - type: "articles", - description: "vice massage academics victorious while", + description: + "beside healthily athletic frenetically congregate around elementary unbearably rebel blah", selectable: false, deletable: false, organizationId: "", + properties: { + prefix: "", + expires: { + ttl: 67982, + timeframe: "year", + }, + activations: { + limit: 394192, + enableUserAdmin: false, + }, + limitUsage: 196814, + }, }, ], medias: [ @@ -75,23 +87,42 @@ let value: WebhookSubscriptionRevokedPayload = { id: "", organizationId: "", name: "", - path: "/var/yp", + path: "/lib", mimeType: "", - size: 642928, + size: 183975, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2024-06-06T12:49:01.406Z"), + lastModifiedAt: new Date("2022-11-24T09:56:09.198Z"), version: "", isUploaded: false, - createdAt: new Date("2024-03-01T08:59:39.201Z"), + createdAt: new Date("2023-07-08T07:48:14.392Z"), + }, + ], + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2024-05-18T00:30:59.700Z"), + modifiedAt: new Date("2022-07-09T01:59:04.501Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 802851, + required: false, }, ], }, price: { - createdAt: new Date("2022-06-10T13:45:05.270Z"), - modifiedAt: new Date("2022-05-30T20:19:49.504Z"), + createdAt: new Date("2024-09-19T18:07:16.947Z"), + modifiedAt: new Date("2023-04-22T10:31:33.307Z"), id: "", isArchived: false, productId: "", diff --git a/docs/models/components/webhooksubscriptionupdatedpayload.md b/docs/models/components/webhooksubscriptionupdatedpayload.md index c001f422..3f28c0e5 100644 --- a/docs/models/components/webhooksubscriptionupdatedpayload.md +++ b/docs/models/components/webhooksubscriptionupdatedpayload.md @@ -15,18 +15,18 @@ import { WebhookSubscriptionUpdatedPayload } from "@polar-sh/sdk/models/componen let value: WebhookSubscriptionUpdatedPayload = { data: { - createdAt: new Date("2024-10-12T17:31:29.736Z"), - modifiedAt: new Date("2023-09-20T10:21:04.413Z"), + createdAt: new Date("2023-11-02T13:50:07.480Z"), + modifiedAt: new Date("2023-03-22T05:45:09.123Z"), id: "", - amount: 126999, - currency: "Surinam Dollar", + amount: 887523, + currency: "Ouguiya", recurringInterval: "year", - status: "trialing", - currentPeriodStart: new Date("2023-08-15T04:12:35.655Z"), - currentPeriodEnd: new Date("2023-04-11T16:12:05.280Z"), + status: "unpaid", + currentPeriodStart: new Date("2024-04-11T09:26:40.257Z"), + currentPeriodEnd: new Date("2023-08-24T15:56:27.872Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2022-09-03T18:31:34.012Z"), - endedAt: new Date("2024-04-16T03:53:33.652Z"), + startedAt: new Date("2023-12-19T00:35:32.011Z"), + endedAt: new Date("2022-09-01T09:43:12.235Z"), userId: "", productId: "", priceId: "", @@ -35,43 +35,52 @@ let value: WebhookSubscriptionUpdatedPayload = { "key": "", }, user: { - email: "Luther26@hotmail.com", + email: "Ryleigh91@hotmail.com", publicName: "", githubUsername: "", - avatarUrl: "https://aggravating-pulse.biz", + avatarUrl: "https://impressionable-discourse.org", }, product: { - createdAt: new Date("2024-10-04T14:30:45.103Z"), - modifiedAt: new Date("2022-09-23T08:43:42.632Z"), + createdAt: new Date("2023-02-13T18:13:00.610Z"), + modifiedAt: new Date("2022-11-24T13:29:30.071Z"), id: "", name: "", - description: "tentacle provided slight acknowledge indeed", + description: "however emergent coolly faithfully mmm", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2023-01-20T02:46:22.982Z"), - modifiedAt: new Date("2023-06-25T19:23:05.706Z"), + createdAt: new Date("2024-08-01T23:51:21.213Z"), + modifiedAt: new Date("2022-05-16T19:43:37.122Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 706735, - recurringInterval: "year", + priceAmount: 294711, + recurringInterval: "month", }, ], benefits: [ { - createdAt: new Date("2024-10-30T06:10:40.764Z"), - modifiedAt: new Date("2023-08-02T02:04:13.457Z"), + createdAt: new Date("2022-06-06T14:34:08.591Z"), + modifiedAt: new Date("2023-11-08T03:51:26.863Z"), id: "", - description: "plagiarise under until ghost so plagiarise canter", + description: "aha tousle sashay screw", selectable: false, deletable: false, organizationId: "", properties: { - paidArticles: false, + prefix: "", + expires: { + ttl: 903461, + timeframe: "year", + }, + activations: { + limit: 914590, + enableUserAdmin: false, + }, + limitUsage: 84682, }, }, ], @@ -80,27 +89,50 @@ let value: WebhookSubscriptionUpdatedPayload = { id: "", organizationId: "", name: "", - path: "/lib", + path: "/var/mail", mimeType: "", - size: 463917, + size: 141215, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2023-01-02T11:48:27.382Z"), + lastModifiedAt: new Date("2023-02-01T05:40:56.566Z"), version: "", isUploaded: false, - createdAt: new Date("2024-05-08T05:37:26.768Z"), + createdAt: new Date("2023-01-14T17:29:23.813Z"), + }, + ], + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2024-03-18T07:55:59.360Z"), + modifiedAt: new Date("2024-07-09T01:28:15.858Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 570473, + required: false, }, ], }, price: { - createdAt: new Date("2022-12-08T08:55:00.413Z"), - modifiedAt: new Date("2024-11-08T09:27:04.733Z"), + createdAt: new Date("2022-10-14T09:26:39.208Z"), + modifiedAt: new Date("2024-09-17T01:03:46.046Z"), id: "", isArchived: false, productId: "", - recurringInterval: "year", + priceCurrency: "", + minimumAmount: 564777, + maximumAmount: 411312, + presetAmount: 559499, + recurringInterval: "month", }, }, }; diff --git a/docs/models/operations/advertisementslistresponse.md b/docs/models/operations/advertisementslistresponse.md index ee216287..9f6d90d5 100644 --- a/docs/models/operations/advertisementslistresponse.md +++ b/docs/models/operations/advertisementslistresponse.md @@ -9,21 +9,21 @@ let value: AdvertisementsListResponse = { result: { items: [ { - createdAt: new Date("2022-05-21T07:27:39.514Z"), - modifiedAt: new Date("2023-10-02T04:18:15.215Z"), + createdAt: new Date("2024-10-01T07:24:57.730Z"), + modifiedAt: new Date("2022-10-12T06:39:45.765Z"), id: "", - imageUrl: "https://disloyal-vanadyl.biz/", - imageUrlDark: "https://flowery-understanding.net", + imageUrl: "https://lawful-millet.org", + imageUrlDark: "https://total-fort.org", text: "", - linkUrl: "https://squiggly-cafe.info/", + linkUrl: "https://internal-amnesty.net", }, ], pagination: { - totalCount: 221218, - maxPage: 683727, + totalCount: 502106, + maxPage: 786189, }, dimensions: [ - 102446, + 748023, ], }, }; diff --git a/docs/models/operations/articlesexportrequest.md b/docs/models/operations/articlesexportrequest.md index 78da867e..88bd8ac1 100644 --- a/docs/models/operations/articlesexportrequest.md +++ b/docs/models/operations/articlesexportrequest.md @@ -6,7 +6,7 @@ import { ArticlesExportRequest } from "@polar-sh/sdk/models/operations"; let value: ArticlesExportRequest = { - organizationId: "51ce1c0f-984e-44df-ac81-7736527480ed", + organizationId: "fff1f37c-3921-4150-b6a6-1142f2c998f5", }; ``` diff --git a/docs/models/operations/articleslistresponse.md b/docs/models/operations/articleslistresponse.md index 15ff8f58..5665076e 100644 --- a/docs/models/operations/articleslistresponse.md +++ b/docs/models/operations/articleslistresponse.md @@ -15,46 +15,46 @@ let value: ArticlesListResponse = { body: "", byline: { name: "", - avatarUrl: "https://squiggly-provider.name/", + avatarUrl: "https://vast-substitution.net", }, visibility: "private", userId: "", organizationId: "", organization: { - createdAt: new Date("2023-04-04T19:49:26.614Z"), - modifiedAt: new Date("2022-01-06T19:40:31.772Z"), + createdAt: new Date("2022-10-30T20:46:20.876Z"), + modifiedAt: new Date("2023-02-09T23:56:49.919Z"), id: "", name: "", slug: "", - avatarUrl: "https://merry-blight.com/", + avatarUrl: "https://noteworthy-pigsty.biz/", bio: "", - company: "Stokes, Corwin and Abbott", + company: "Jacobi - Hackett", blog: "", location: "", - email: "Dudley26@hotmail.com", + email: "Shyanne54@hotmail.com", twitterUsername: "", - pledgeMinimumAmount: 639463, + pledgeMinimumAmount: 98610, pledgeBadgeShowAmount: false, - defaultUpfrontSplitToContributors: 520678, + defaultUpfrontSplitToContributors: 801075, donationsEnabled: false, profileSettings: {}, featureSettings: {}, }, - publishedAt: new Date("2023-03-13T02:51:04.481Z"), + publishedAt: new Date("2022-02-15T03:11:35.631Z"), paidSubscribersOnly: false, - paidSubscribersOnlyEndsAt: new Date("2024-04-28T20:28:23.222Z"), + paidSubscribersOnlyEndsAt: new Date("2024-06-13T19:08:19.699Z"), isPreview: false, isPinned: false, notifySubscribers: false, - notificationsSentAt: new Date("2022-06-04T11:44:43.665Z"), - emailSentToCount: 967338, - ogImageUrl: "https://pointless-appliance.net", + notificationsSentAt: new Date("2024-06-04T02:09:29.897Z"), + emailSentToCount: 51007, + ogImageUrl: "https://meager-comestible.com", ogDescription: "", }, ], pagination: { - totalCount: 913285, - maxPage: 524577, + totalCount: 773259, + maxPage: 567693, }, }, }; diff --git a/docs/models/operations/articlespreviewrequest.md b/docs/models/operations/articlespreviewrequest.md index b4dc078b..806d62b1 100644 --- a/docs/models/operations/articlespreviewrequest.md +++ b/docs/models/operations/articlespreviewrequest.md @@ -8,7 +8,7 @@ import { ArticlesPreviewRequest } from "@polar-sh/sdk/models/operations"; let value: ArticlesPreviewRequest = { id: "", articlePreview: { - email: "Vilma_Murray@hotmail.com", + email: "Gonzalo78@yahoo.com", }, }; ``` diff --git a/docs/models/operations/articlevisibilityfilter.md b/docs/models/operations/articlevisibilityfilter.md index fbb77cb9..7d048fb4 100644 --- a/docs/models/operations/articlevisibilityfilter.md +++ b/docs/models/operations/articlevisibilityfilter.md @@ -8,14 +8,14 @@ Filter by visibility. ### `components.ArticleVisibility` ```typescript -const value: components.ArticleVisibility = "private"; +const value: components.ArticleVisibility = "hidden"; ``` ### `components.ArticleVisibility[]` ```typescript const value: components.ArticleVisibility[] = [ - "public", + "private", ]; ``` diff --git a/docs/models/operations/benefitscreatebenefitcreate.md b/docs/models/operations/benefitscreatebenefitcreate.md index 1b45743e..325b945a 100644 --- a/docs/models/operations/benefitscreatebenefitcreate.md +++ b/docs/models/operations/benefitscreatebenefitcreate.md @@ -7,7 +7,8 @@ ```typescript const value: components.BenefitCustomCreate = { - description: "once worth yippee", + description: + "beneath irritably provided sorrowful furthermore lest besides sniveling close whoa", isTaxApplicable: false, properties: {}, }; @@ -17,7 +18,7 @@ const value: components.BenefitCustomCreate = { ```typescript const value: components.BenefitAdsCreate = { - description: "aha shark nimble duh", + description: "alongside mortar gadzooks headline service", properties: {}, }; ``` @@ -27,7 +28,7 @@ const value: components.BenefitAdsCreate = { ```typescript const value: components.BenefitDiscordCreate = { description: - "total materialise lined brr airmail if while unless after vainly", + "mysterious soggy onto until oof hateful faithfully steel promptly", properties: { guildToken: "", roleId: "", @@ -39,11 +40,12 @@ const value: components.BenefitDiscordCreate = { ```typescript const value: components.BenefitGitHubRepositoryCreate = { - description: "moral rowdy ah speedily showy", + description: + "uncommon likewise separately content to as needily near relative", properties: { repositoryOwner: "polarsource", repositoryName: "private_repo", - permission: "admin", + permission: "maintain", }, }; ``` @@ -52,7 +54,8 @@ const value: components.BenefitGitHubRepositoryCreate = { ```typescript const value: components.BenefitDownloadablesCreate = { - description: "curiously alliance boo political equally", + description: + "oval enormously vastly capsize supposing immediately terrible joint nervously", properties: { files: [ "", @@ -65,7 +68,7 @@ const value: components.BenefitDownloadablesCreate = { ```typescript const value: components.BenefitLicenseKeysCreate = { - description: "fooey among entwine capsize unfinished boo", + description: "far exalted marten save above hourly", properties: {}, }; ``` diff --git a/docs/models/operations/benefitsgrantsresponse.md b/docs/models/operations/benefitsgrantsresponse.md index 34891369..831e022d 100644 --- a/docs/models/operations/benefitsgrantsresponse.md +++ b/docs/models/operations/benefitsgrantsresponse.md @@ -9,8 +9,8 @@ let value: BenefitsGrantsResponse = { result: { items: [ { - createdAt: new Date("2024-05-18T13:53:28.368Z"), - modifiedAt: new Date("2024-07-04T20:50:00.142Z"), + createdAt: new Date("2024-04-21T03:25:09.956Z"), + modifiedAt: new Date("2023-07-21T10:46:34.659Z"), id: "", isGranted: false, isRevoked: false, @@ -22,8 +22,8 @@ let value: BenefitsGrantsResponse = { }, ], pagination: { - totalCount: 881189, - maxPage: 916419, + totalCount: 144058, + maxPage: 899652, }, }, }; diff --git a/docs/models/operations/benefitslistresponse.md b/docs/models/operations/benefitslistresponse.md index 738428ed..f5d826be 100644 --- a/docs/models/operations/benefitslistresponse.md +++ b/docs/models/operations/benefitslistresponse.md @@ -9,23 +9,30 @@ let value: BenefitsListResponse = { result: { items: [ { - createdAt: new Date("2024-05-25T08:43:19.210Z"), - modifiedAt: new Date("2024-10-09T02:34:28.117Z"), + createdAt: new Date("2022-04-20T20:32:25.216Z"), + modifiedAt: new Date("2024-08-08T08:34:51.248Z"), id: "", - description: "frankly for unwelcome aftermath grown", + description: "while unless after vainly scoop", selectable: false, deletable: false, organizationId: "", properties: { - guildId: "", - roleId: "", - guildToken: "", + prefix: "", + expires: { + ttl: 527715, + timeframe: "year", + }, + activations: { + limit: 271306, + enableUserAdmin: false, + }, + limitUsage: 258059, }, }, ], pagination: { - totalCount: 548849, - maxPage: 815225, + totalCount: 532320, + maxPage: 703189, }, }, }; diff --git a/docs/models/operations/benefitsupdatebenefitupdate.md b/docs/models/operations/benefitsupdatebenefitupdate.md index 024c6c9b..d8e1aa1c 100644 --- a/docs/models/operations/benefitsupdatebenefitupdate.md +++ b/docs/models/operations/benefitsupdatebenefitupdate.md @@ -34,7 +34,7 @@ const value: components.BenefitGitHubRepositoryUpdate = { properties: { repositoryOwner: "polarsource", repositoryName: "private_repo", - permission: "admin", + permission: "pull", }, }; ``` diff --git a/docs/models/operations/benefitsupdaterequest.md b/docs/models/operations/benefitsupdaterequest.md index 57ae6ff8..ee2f7231 100644 --- a/docs/models/operations/benefitsupdaterequest.md +++ b/docs/models/operations/benefitsupdaterequest.md @@ -7,13 +7,7 @@ import { BenefitsUpdateRequest } from "@polar-sh/sdk/models/operations"; let value: BenefitsUpdateRequest = { id: "", - requestBody: { - properties: { - repositoryOwner: "polarsource", - repositoryName: "private_repo", - permission: "maintain", - }, - }, + requestBody: {}, }; ``` diff --git a/docs/models/operations/checkoutlinkslistresponse.md b/docs/models/operations/checkoutlinkslistresponse.md index 96184b54..67d7a028 100644 --- a/docs/models/operations/checkoutlinkslistresponse.md +++ b/docs/models/operations/checkoutlinkslistresponse.md @@ -9,31 +9,29 @@ let value: CheckoutLinksListResponse = { result: { items: [ { - createdAt: new Date("2023-11-06T16:40:09.305Z"), - modifiedAt: new Date("2024-11-03T10:14:15.332Z"), + createdAt: new Date("2023-09-20T09:43:49.938Z"), + modifiedAt: new Date("2022-09-04T08:32:34.245Z"), id: "", metadata: { "key": "", }, clientSecret: "", - successUrl: "https://upset-birdcage.info/", + successUrl: "https://noxious-pronoun.org", productPriceId: "", productPrice: { - createdAt: new Date("2023-01-16T19:34:44.796Z"), - modifiedAt: new Date("2023-05-13T18:21:47.587Z"), + createdAt: new Date("2022-01-08T23:31:11.246Z"), + modifiedAt: new Date("2022-02-06T14:44:43.529Z"), id: "", isArchived: false, productId: "", - priceCurrency: "", - priceAmount: 865212, recurringInterval: "year", }, - url: "https://true-nucleotidase.info", + url: "https://expert-dusk.biz/", }, ], pagination: { - totalCount: 194194, - maxPage: 413135, + totalCount: 728948, + maxPage: 569196, }, }, }; diff --git a/docs/models/operations/checkoutscustomlistresponse.md b/docs/models/operations/checkoutscustomlistresponse.md index 0885c7aa..21c3f9ae 100644 --- a/docs/models/operations/checkoutscustomlistresponse.md +++ b/docs/models/operations/checkoutscustomlistresponse.md @@ -9,28 +9,28 @@ let value: CheckoutsCustomListResponse = { result: { items: [ { - createdAt: new Date("2024-05-25T15:39:50.494Z"), - modifiedAt: new Date("2022-03-27T11:31:23.093Z"), + createdAt: new Date("2024-02-27T21:23:27.554Z"), + modifiedAt: new Date("2024-06-23T22:42:29.938Z"), id: "", - status: "failed", + status: "succeeded", clientSecret: "", - url: "https://esteemed-citizen.biz/", - expiresAt: new Date("2023-08-03T00:48:03.968Z"), - successUrl: "https://limp-venom.biz", + url: "https://lavish-marathon.net", + expiresAt: new Date("2024-10-08T12:20:15.003Z"), + successUrl: "https://unhappy-premise.com", embedOrigin: "", - amount: 763140, - taxAmount: 870183, - currency: "Pataca", - totalAmount: 456222, + amount: 500828, + taxAmount: 286486, + currency: "Falkland Islands Pound", + totalAmount: 355927, productId: "", productPriceId: "", isPaymentRequired: false, customerId: "", customerName: "", - customerEmail: "Hildegard.Johnson69@yahoo.com", + customerEmail: "Kolby.Glover@gmail.com", customerIpAddress: "", customerBillingAddress: { - country: "Cayman Islands", + country: "Christmas Island", }, customerTaxId: "", paymentProcessorMetadata: {}, @@ -38,30 +38,32 @@ let value: CheckoutsCustomListResponse = { "key": "", }, product: { - createdAt: new Date("2024-07-21T21:55:28.560Z"), - modifiedAt: new Date("2024-04-25T02:25:06.711Z"), + createdAt: new Date("2022-01-11T03:15:33.264Z"), + modifiedAt: new Date("2024-10-13T19:37:01.195Z"), id: "", name: "", - description: "lazily elegantly celebrate until furthermore", + description: "yahoo phooey yuck playfully commonly huzzah after", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2022-11-19T10:08:01.911Z"), - modifiedAt: new Date("2023-01-23T21:05:37.371Z"), + createdAt: new Date("2024-03-02T08:07:59.742Z"), + modifiedAt: new Date("2024-02-05T03:15:11.328Z"), id: "", isArchived: false, productId: "", - recurringInterval: "month", + priceCurrency: "", + priceAmount: 176333, }, ], benefits: [ { - createdAt: new Date("2022-06-19T16:55:47.504Z"), - modifiedAt: new Date("2022-08-12T17:48:39.683Z"), + createdAt: new Date("2024-03-01T06:19:32.936Z"), + modifiedAt: new Date("2022-11-23T13:48:35.382Z"), id: "", - description: "aside cake uh-huh while instead", + description: + "deep from supposing drowse intent foodstuffs a impartial", selectable: false, deletable: false, organizationId: "", @@ -75,36 +77,56 @@ let value: CheckoutsCustomListResponse = { id: "", organizationId: "", name: "", - path: "/usr/bin", + path: "/sys", mimeType: "", - size: 353075, + size: 63369, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2022-06-19T06:00:22.932Z"), + lastModifiedAt: new Date("2023-03-26T04:53:25.304Z"), version: "", isUploaded: false, - createdAt: new Date("2022-12-09T16:59:37.115Z"), + createdAt: new Date("2024-03-02T20:38:32.287Z"), sizeReadable: "", - publicUrl: "https://which-crocodile.net", + publicUrl: "https://wavy-pocket-watch.biz/", }, ], }, productPrice: { - createdAt: new Date("2022-07-01T10:30:42.476Z"), - modifiedAt: new Date("2023-12-31T21:24:34.925Z"), + createdAt: new Date("2024-12-04T08:27:59.075Z"), + modifiedAt: new Date("2022-02-24T00:23:58.036Z"), id: "", isArchived: false, productId: "", - recurringInterval: "month", + priceCurrency: "", + priceAmount: 933456, }, subscriptionId: "", + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2024-04-10T13:48:19.184Z"), + modifiedAt: new Date("2022-01-01T01:56:18.923Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 254240, + required: false, + }, + ], }, ], pagination: { - totalCount: 973894, - maxPage: 700634, + totalCount: 749101, + maxPage: 532336, }, }, }; diff --git a/docs/models/operations/customfieldsdeleterequest.md b/docs/models/operations/customfieldsdeleterequest.md new file mode 100644 index 00000000..e3a3af59 --- /dev/null +++ b/docs/models/operations/customfieldsdeleterequest.md @@ -0,0 +1,17 @@ +# CustomFieldsDeleteRequest + +## Example Usage + +```typescript +import { CustomFieldsDeleteRequest } from "@polar-sh/sdk/models/operations"; + +let value: CustomFieldsDeleteRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `id` | *string* | :heavy_check_mark: | The custom field ID. | \ No newline at end of file diff --git a/docs/models/operations/customfieldsgetrequest.md b/docs/models/operations/customfieldsgetrequest.md new file mode 100644 index 00000000..e6ab029a --- /dev/null +++ b/docs/models/operations/customfieldsgetrequest.md @@ -0,0 +1,17 @@ +# CustomFieldsGetRequest + +## Example Usage + +```typescript +import { CustomFieldsGetRequest } from "@polar-sh/sdk/models/operations"; + +let value: CustomFieldsGetRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `id` | *string* | :heavy_check_mark: | The custom field ID. | \ No newline at end of file diff --git a/docs/models/operations/customfieldslistqueryparamorganizationidfilter.md b/docs/models/operations/customfieldslistqueryparamorganizationidfilter.md new file mode 100644 index 00000000..3aed0299 --- /dev/null +++ b/docs/models/operations/customfieldslistqueryparamorganizationidfilter.md @@ -0,0 +1,21 @@ +# CustomFieldsListQueryParamOrganizationIDFilter + +Filter by organization ID. + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `string[]` + +```typescript +const value: string[] = [ + "", +]; +``` + diff --git a/docs/models/operations/customfieldslistrequest.md b/docs/models/operations/customfieldslistrequest.md new file mode 100644 index 00000000..7186e941 --- /dev/null +++ b/docs/models/operations/customfieldslistrequest.md @@ -0,0 +1,20 @@ +# CustomFieldsListRequest + +## Example Usage + +```typescript +import { CustomFieldsListRequest } from "@polar-sh/sdk/models/operations"; + +let value: CustomFieldsListRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organizationId` | *operations.CustomFieldsListQueryParamOrganizationIDFilter* | :heavy_minus_sign: | Filter by organization ID. | +| `query` | *string* | :heavy_minus_sign: | Filter by custom field name or slug. | +| `typeFilter` | *operations.CustomFieldTypeFilter* | :heavy_minus_sign: | Filter by custom field type. | +| `page` | *number* | :heavy_minus_sign: | Page number, defaults to 1. | +| `limit` | *number* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | +| `sorting` | [components.CustomFieldSortProperty](../../models/components/customfieldsortproperty.md)[] | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/operations/customfieldslistresponse.md b/docs/models/operations/customfieldslistresponse.md new file mode 100644 index 00000000..98ce22ea --- /dev/null +++ b/docs/models/operations/customfieldslistresponse.md @@ -0,0 +1,36 @@ +# CustomFieldsListResponse + +## Example Usage + +```typescript +import { CustomFieldsListResponse } from "@polar-sh/sdk/models/operations"; + +let value: CustomFieldsListResponse = { + result: { + items: [ + { + createdAt: new Date("2023-03-31T10:47:58.920Z"), + modifiedAt: new Date("2023-04-07T17:10:31.500Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + ], + pagination: { + totalCount: 926266, + maxPage: 661764, + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `result` | [components.ListResource](../../models/components/listresource.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customfieldsupdaterequest.md b/docs/models/operations/customfieldsupdaterequest.md new file mode 100644 index 00000000..2956b05d --- /dev/null +++ b/docs/models/operations/customfieldsupdaterequest.md @@ -0,0 +1,19 @@ +# CustomFieldsUpdateRequest + +## Example Usage + +```typescript +import { CustomFieldsUpdateRequest } from "@polar-sh/sdk/models/operations"; + +let value: CustomFieldsUpdateRequest = { + id: "", + customFieldUpdate: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `id` | *string* | :heavy_check_mark: | The custom field ID. | +| `customFieldUpdate` | *components.CustomFieldUpdate* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/customfieldtypefilter.md b/docs/models/operations/customfieldtypefilter.md new file mode 100644 index 00000000..61ffe336 --- /dev/null +++ b/docs/models/operations/customfieldtypefilter.md @@ -0,0 +1,21 @@ +# CustomFieldTypeFilter + +Filter by custom field type. + + +## Supported Types + +### `components.CustomFieldType` + +```typescript +const value: components.CustomFieldType = "checkbox"; +``` + +### `components.CustomFieldType[]` + +```typescript +const value: components.CustomFieldType[] = [ + "select", +]; +``` + diff --git a/docs/models/operations/externalorganizationslistresponse.md b/docs/models/operations/externalorganizationslistresponse.md index 4bb1473e..4d2311d1 100644 --- a/docs/models/operations/externalorganizationslistresponse.md +++ b/docs/models/operations/externalorganizationslistresponse.md @@ -9,23 +9,23 @@ let value: ExternalOrganizationsListResponse = { result: { items: [ { - id: "ebf848e8-4e50-435d-9775-eff6fca332e4", + id: "beb2725e-e459-4f24-bd7e-2855765ebb49", name: "", - avatarUrl: "https://spanish-starboard.com/", + avatarUrl: "https://grown-rust.net", isPersonal: false, bio: "", prettyName: "", - company: "Spinka and Sons", + company: "Streich - Kiehn", blog: "", location: "", - email: "Carli.Blanda@gmail.com", + email: "Isidro.Mraz@yahoo.com", twitterUsername: "", organizationId: "", }, ], pagination: { - totalCount: 246557, - maxPage: 596433, + totalCount: 401428, + maxPage: 416692, }, }, }; diff --git a/docs/models/operations/filescreatefilecreate.md b/docs/models/operations/filescreatefilecreate.md index 0f39a083..3b6fc925 100644 --- a/docs/models/operations/filescreatefilecreate.md +++ b/docs/models/operations/filescreatefilecreate.md @@ -9,13 +9,13 @@ const value: components.DownloadableFileCreate = { name: "", mimeType: "", - size: 74124, + size: 392022, upload: { parts: [ { - number: 844471, - chunkStart: 771603, - chunkEnd: 543922, + number: 143976, + chunkStart: 804823, + chunkEnd: 713371, }, ], }, @@ -28,13 +28,13 @@ const value: components.DownloadableFileCreate = { const value: components.ProductMediaFileCreate = { name: "", mimeType: "", - size: 979325, + size: 408677, upload: { parts: [ { - number: 72600, - chunkStart: 766670, - chunkEnd: 266370, + number: 518432, + chunkStart: 665183, + chunkEnd: 164805, }, ], }, @@ -47,13 +47,13 @@ const value: components.ProductMediaFileCreate = { const value: components.OrganizationAvatarFileCreate = { name: "", mimeType: "", - size: 368599, + size: 27197, upload: { parts: [ { - number: 219279, - chunkStart: 789038, - chunkEnd: 144240, + number: 317504, + chunkStart: 595585, + chunkEnd: 486606, }, ], }, diff --git a/docs/models/operations/fileslistresponse.md b/docs/models/operations/fileslistresponse.md index 314b6552..b07a5416 100644 --- a/docs/models/operations/fileslistresponse.md +++ b/docs/models/operations/fileslistresponse.md @@ -12,24 +12,23 @@ let value: FilesListResponse = { id: "", organizationId: "", name: "", - path: "/selinux", + path: "/opt/include", mimeType: "", - size: 476801, + size: 375549, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2023-11-13T13:59:39.924Z"), + lastModifiedAt: new Date("2023-09-15T16:56:22.815Z"), version: "", isUploaded: false, - createdAt: new Date("2023-08-03T12:01:00.206Z"), + createdAt: new Date("2024-01-03T02:28:08.091Z"), sizeReadable: "", - publicUrl: "https://smoggy-configuration.biz/", }, ], pagination: { - totalCount: 431843, - maxPage: 320748, + totalCount: 840831, + maxPage: 497231, }, }, }; diff --git a/docs/models/operations/filesupdateresponsefilesupdate.md b/docs/models/operations/filesupdateresponsefilesupdate.md index 33e9d946..e4fecd96 100644 --- a/docs/models/operations/filesupdateresponsefilesupdate.md +++ b/docs/models/operations/filesupdateresponsefilesupdate.md @@ -12,17 +12,17 @@ const value: components.DownloadableFileRead = { id: "", organizationId: "", name: "", - path: "/var/spool", + path: "/home/user/dir", mimeType: "", - size: 958280, + size: 426691, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2024-06-22T09:30:18.789Z"), + lastModifiedAt: new Date("2023-11-01T02:19:19.164Z"), version: "", isUploaded: false, - createdAt: new Date("2023-10-29T02:02:29.593Z"), + createdAt: new Date("2023-08-22T00:13:23.635Z"), sizeReadable: "", }; ``` @@ -34,19 +34,19 @@ const value: components.ProductMediaFileRead = { id: "", organizationId: "", name: "", - path: "/private/var", + path: "/var/tmp", mimeType: "", - size: 13316, + size: 680370, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2023-10-27T11:06:47.453Z"), + lastModifiedAt: new Date("2024-03-21T23:32:45.423Z"), version: "", isUploaded: false, - createdAt: new Date("2024-12-20T00:58:21.844Z"), + createdAt: new Date("2024-11-25T18:48:33.320Z"), sizeReadable: "", - publicUrl: "https://grizzled-circumference.net", + publicUrl: "https://happy-go-lucky-approach.biz/", }; ``` @@ -57,19 +57,19 @@ const value: components.OrganizationAvatarFileRead = { id: "", organizationId: "", name: "", - path: "/usr/lib", + path: "/lib", mimeType: "", - size: 967047, + size: 183504, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2024-08-16T19:51:12.559Z"), + lastModifiedAt: new Date("2024-04-07T05:50:07.896Z"), version: "", isUploaded: false, - createdAt: new Date("2023-09-02T00:08:58.903Z"), + createdAt: new Date("2023-08-11T07:51:57.382Z"), sizeReadable: "", - publicUrl: "https://lost-extent.name/", + publicUrl: "https://sugary-defendant.biz", }; ``` diff --git a/docs/models/operations/filesuploadedrequest.md b/docs/models/operations/filesuploadedrequest.md index bfeaa177..a69400f1 100644 --- a/docs/models/operations/filesuploadedrequest.md +++ b/docs/models/operations/filesuploadedrequest.md @@ -9,10 +9,10 @@ let value: FilesUploadedRequest = { id: "", fileUploadCompleted: { id: "", - path: "/usr/ports", + path: "/usr/X11R6", parts: [ { - number: 661578, + number: 819690, checksumEtag: "", checksumSha256Base64: "", }, diff --git a/docs/models/operations/filesuploadedresponsefilesuploaded.md b/docs/models/operations/filesuploadedresponsefilesuploaded.md index 467b983a..90a98072 100644 --- a/docs/models/operations/filesuploadedresponsefilesuploaded.md +++ b/docs/models/operations/filesuploadedresponsefilesuploaded.md @@ -12,17 +12,17 @@ const value: components.DownloadableFileRead = { id: "", organizationId: "", name: "", - path: "/boot/defaults", + path: "/private/var", mimeType: "", - size: 810982, + size: 134267, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2023-11-20T00:29:10.889Z"), + lastModifiedAt: new Date("2024-07-21T06:55:08.065Z"), version: "", isUploaded: false, - createdAt: new Date("2024-09-18T20:39:17.763Z"), + createdAt: new Date("2023-09-23T04:32:44.047Z"), sizeReadable: "", }; ``` @@ -36,17 +36,17 @@ const value: components.ProductMediaFileRead = { name: "", path: "/usr/lib", mimeType: "", - size: 561121, + size: 704665, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2024-07-05T20:32:13.341Z"), + lastModifiedAt: new Date("2024-11-27T03:50:32.760Z"), version: "", isUploaded: false, - createdAt: new Date("2022-11-01T17:50:00.486Z"), + createdAt: new Date("2022-11-20T15:45:49.704Z"), sizeReadable: "", - publicUrl: "https://frank-video.biz", + publicUrl: "https://helpful-gray.biz", }; ``` @@ -57,19 +57,19 @@ const value: components.OrganizationAvatarFileRead = { id: "", organizationId: "", name: "", - path: "/Applications", + path: "/Network", mimeType: "", - size: 325855, + size: 948297, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2023-07-05T18:00:25.840Z"), + lastModifiedAt: new Date("2022-11-17T15:47:00.809Z"), version: "", isUploaded: false, - createdAt: new Date("2022-02-01T02:03:31.039Z"), + createdAt: new Date("2022-09-27T14:32:12.836Z"), sizeReadable: "", - publicUrl: "https://turbulent-presume.name", + publicUrl: "https://far-flung-intellect.org", }; ``` diff --git a/docs/models/operations/licensekeyslistresponse.md b/docs/models/operations/licensekeyslistresponse.md index ad66878c..bf19ac4a 100644 --- a/docs/models/operations/licensekeyslistresponse.md +++ b/docs/models/operations/licensekeyslistresponse.md @@ -15,24 +15,24 @@ let value: LicenseKeysListResponse = { user: { id: "", publicName: "", - email: "Sylvester_Price17@yahoo.com", - avatarUrl: "https://sparkling-jungle.name", + email: "Esta78@yahoo.com", + avatarUrl: "https://educated-cappelletti.net", }, benefitId: "", key: "", displayKey: "", status: "granted", - limitActivations: 476614, - usage: 112071, - limitUsage: 321422, - validations: 284779, - lastValidatedAt: new Date("2023-05-03T07:25:31.700Z"), - expiresAt: new Date("2024-10-16T10:02:37.797Z"), + limitActivations: 176104, + usage: 319807, + limitUsage: 816825, + validations: 539537, + lastValidatedAt: new Date("2022-02-20T06:02:51.866Z"), + expiresAt: new Date("2023-05-24T10:17:07.880Z"), }, ], pagination: { - totalCount: 181267, - maxPage: 401388, + totalCount: 683980, + maxPage: 538368, }, }, }; diff --git a/docs/models/operations/metricsgetqueryparamproductpricetypefilter.md b/docs/models/operations/metricsgetqueryparamproductpricetypefilter.md index c46a4d17..4287e57d 100644 --- a/docs/models/operations/metricsgetqueryparamproductpricetypefilter.md +++ b/docs/models/operations/metricsgetqueryparamproductpricetypefilter.md @@ -8,14 +8,14 @@ Filter by product price type. `recurring` will filter data corresponding to subs ### `components.ProductPriceType` ```typescript -const value: components.ProductPriceType = "one_time"; +const value: components.ProductPriceType = "recurring"; ``` ### `components.ProductPriceType[]` ```typescript const value: components.ProductPriceType[] = [ - "recurring", + "one_time", ]; ``` diff --git a/docs/models/operations/metricsgetrequest.md b/docs/models/operations/metricsgetrequest.md index d0bf152c..fc562eb0 100644 --- a/docs/models/operations/metricsgetrequest.md +++ b/docs/models/operations/metricsgetrequest.md @@ -7,9 +7,9 @@ import { MetricsGetRequest } from "@polar-sh/sdk/models/operations"; import { RFCDate } from "@polar-sh/sdk/types"; let value: MetricsGetRequest = { - startDate: new RFCDate("2024-07-14"), - endDate: new RFCDate("2022-12-12"), - interval: "week", + startDate: new RFCDate("2022-02-02"), + endDate: new RFCDate("2023-04-22"), + interval: "hour", }; ``` diff --git a/docs/models/operations/oauth2clientslistresponse.md b/docs/models/operations/oauth2clientslistresponse.md index 8f4d9a49..48c65f59 100644 --- a/docs/models/operations/oauth2clientslistresponse.md +++ b/docs/models/operations/oauth2clientslistresponse.md @@ -10,20 +10,20 @@ let value: Oauth2ClientsListResponse = { items: [ { redirectUris: [ - "https://enlightened-draft.net", + "https://carefree-embarrassment.org/", ], clientName: "", - createdAt: new Date("2024-11-13T07:16:15.727Z"), - modifiedAt: new Date("2022-12-13T22:32:12.208Z"), + createdAt: new Date("2022-06-03T03:52:22.682Z"), + modifiedAt: new Date("2022-12-29T08:00:18.342Z"), clientId: "", clientSecret: "", - clientIdIssuedAt: 826806, - clientSecretExpiresAt: 103990, + clientIdIssuedAt: 51053, + clientSecretExpiresAt: 331269, }, ], pagination: { - totalCount: 633982, - maxPage: 751033, + totalCount: 320326, + maxPage: 946808, }, }, }; diff --git a/docs/models/operations/oauth2clientsoauth2updateclientrequest.md b/docs/models/operations/oauth2clientsoauth2updateclientrequest.md index 63b68ef4..351d28c4 100644 --- a/docs/models/operations/oauth2clientsoauth2updateclientrequest.md +++ b/docs/models/operations/oauth2clientsoauth2updateclientrequest.md @@ -9,7 +9,7 @@ let value: Oauth2ClientsOauth2UpdateClientRequest = { clientId: "", oAuth2ClientConfigurationUpdate: { redirectUris: [ - "https://intelligent-taro.com/", + "https://icy-airmail.net", ], clientName: "", clientId: "", diff --git a/docs/models/operations/oauth2introspecttokentokentypehint.md b/docs/models/operations/oauth2introspecttokentokentypehint.md index f6bfc5f0..fce2a6ac 100644 --- a/docs/models/operations/oauth2introspecttokentokentypehint.md +++ b/docs/models/operations/oauth2introspecttokentokentypehint.md @@ -5,7 +5,7 @@ ```typescript import { Oauth2IntrospectTokenTokenTypeHint } from "@polar-sh/sdk/models/operations"; -let value: Oauth2IntrospectTokenTokenTypeHint = "access_token"; +let value: Oauth2IntrospectTokenTokenTypeHint = "refresh_token"; ``` ## Values diff --git a/docs/models/operations/oauth2requesttokenrequestbody.md b/docs/models/operations/oauth2requesttokenrequestbody.md index cabe1ad8..74390fdc 100644 --- a/docs/models/operations/oauth2requesttokenrequestbody.md +++ b/docs/models/operations/oauth2requesttokenrequestbody.md @@ -11,7 +11,7 @@ const value: clientId: "", clientSecret: "", code: "", - redirectUri: "https://flawed-lace.info/", + redirectUri: "https://frivolous-self-confidence.name", }; ``` diff --git a/docs/models/operations/orderslistresponse.md b/docs/models/operations/orderslistresponse.md index 0eacc3f0..435877c0 100644 --- a/docs/models/operations/orderslistresponse.md +++ b/docs/models/operations/orderslistresponse.md @@ -9,16 +9,16 @@ let value: OrdersListResponse = { result: { items: [ { - createdAt: new Date("2024-12-30T09:14:35.161Z"), - modifiedAt: new Date("2022-05-25T04:58:30.125Z"), + createdAt: new Date("2023-11-14T18:33:31.564Z"), + modifiedAt: new Date("2024-11-13T17:37:04.407Z"), id: "", metadata: { "key": "", }, - amount: 740347, - taxAmount: 821016, - currency: "New Israeli Sheqel", - billingReason: "purchase", + amount: 958280, + taxAmount: 824267, + currency: "Metical", + billingReason: "subscription_create", userId: "", productId: "", productPriceId: "", @@ -26,46 +26,47 @@ let value: OrdersListResponse = { checkoutId: "", user: { id: "", - email: "Nella14@gmail.com", + email: "Lemuel78@gmail.com", publicName: "", githubUsername: "", - avatarUrl: "https://fruitful-typewriter.org/", + avatarUrl: "https://turbulent-marten.com", }, product: { - createdAt: new Date("2022-08-06T23:39:39.226Z"), - modifiedAt: new Date("2023-12-21T21:28:33.162Z"), + createdAt: new Date("2023-06-14T22:00:04.745Z"), + modifiedAt: new Date("2022-12-10T19:26:04.923Z"), id: "", name: "", - description: "supposing immediately terrible", + description: "task whenever below certification drat corral snowplow", isRecurring: false, isArchived: false, organizationId: "", }, productPrice: { - createdAt: new Date("2024-08-17T18:12:34.115Z"), - modifiedAt: new Date("2022-02-16T20:50:29.690Z"), + createdAt: new Date("2022-04-02T13:11:18.964Z"), + modifiedAt: new Date("2024-10-24T02:05:02.156Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 367, + priceAmount: 118020, + recurringInterval: "month", }, subscription: { metadata: { "key": "", }, - createdAt: new Date("2022-10-28T00:15:47.100Z"), - modifiedAt: new Date("2023-05-22T11:00:48.310Z"), + createdAt: new Date("2024-08-03T11:34:04.757Z"), + modifiedAt: new Date("2022-10-06T16:47:41.923Z"), id: "", - amount: 638363, - currency: "Burundi Franc", + amount: 665952, + currency: "Lilangeni", recurringInterval: "year", - status: "canceled", - currentPeriodStart: new Date("2022-07-23T02:28:15.732Z"), - currentPeriodEnd: new Date("2023-03-31T23:27:16.931Z"), + status: "unpaid", + currentPeriodStart: new Date("2024-02-16T22:27:20.816Z"), + currentPeriodEnd: new Date("2022-05-04T13:48:56.579Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2023-07-24T21:41:06.633Z"), - endedAt: new Date("2023-05-11T04:19:54.493Z"), + startedAt: new Date("2023-09-05T00:25:02.418Z"), + endedAt: new Date("2024-02-27T03:10:42.176Z"), userId: "", productId: "", priceId: "", @@ -74,8 +75,8 @@ let value: OrdersListResponse = { }, ], pagination: { - totalCount: 799830, - maxPage: 960523, + totalCount: 801958, + maxPage: 26321, }, }, }; diff --git a/docs/models/operations/organizationslistrequest.md b/docs/models/operations/organizationslistrequest.md index 81ce45dc..e663dece 100644 --- a/docs/models/operations/organizationslistrequest.md +++ b/docs/models/operations/organizationslistrequest.md @@ -13,7 +13,6 @@ let value: OrganizationsListRequest = {}; | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `slug` | *string* | :heavy_minus_sign: | Filter by slug. | -| `isMember` | *boolean* | :heavy_minus_sign: | Filter by membership. If `true`, only organizations the user is a member of are returned. If `false`, only organizations the user is not a member of are returned. | | `page` | *number* | :heavy_minus_sign: | Page number, defaults to 1. | | `limit` | *number* | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. | | `sorting` | [components.OrganizationSortProperty](../../models/components/organizationsortproperty.md)[] | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. | \ No newline at end of file diff --git a/docs/models/operations/organizationslistresponse.md b/docs/models/operations/organizationslistresponse.md index 86ac43e2..94e73516 100644 --- a/docs/models/operations/organizationslistresponse.md +++ b/docs/models/operations/organizationslistresponse.md @@ -9,29 +9,29 @@ let value: OrganizationsListResponse = { result: { items: [ { - createdAt: new Date("2024-06-07T16:17:56.157Z"), - modifiedAt: new Date("2023-01-17T14:50:27.103Z"), + createdAt: new Date("2024-04-05T13:13:41.181Z"), + modifiedAt: new Date("2022-09-16T11:23:00.351Z"), id: "", name: "", slug: "", - avatarUrl: "https://bare-sustenance.org/", + avatarUrl: "https://productive-unibody.net", bio: "", - company: "Harvey - Daniel", + company: "Kuhn, Denesik and Zieme", blog: "", location: "", - email: "Stella.Wuckert@gmail.com", + email: "Janiya_Welch@gmail.com", twitterUsername: "", - pledgeMinimumAmount: 367917, + pledgeMinimumAmount: 254382, pledgeBadgeShowAmount: false, - defaultUpfrontSplitToContributors: 342342, + defaultUpfrontSplitToContributors: 265303, donationsEnabled: false, profileSettings: {}, featureSettings: {}, }, ], pagination: { - totalCount: 757364, - maxPage: 314573, + totalCount: 127294, + maxPage: 525809, }, }, }; diff --git a/docs/models/operations/productscreateproductcreate.md b/docs/models/operations/productscreateproductcreate.md index ff97d56d..97432ebe 100644 --- a/docs/models/operations/productscreateproductcreate.md +++ b/docs/models/operations/productscreateproductcreate.md @@ -10,7 +10,8 @@ const value: components.ProductRecurringCreate = { name: "", prices: [ { - recurringInterval: "year", + priceAmount: 502509, + recurringInterval: "month", }, ], }; diff --git a/docs/models/operations/productslistqueryparamorganizationidfilter.md b/docs/models/operations/productslistqueryparamorganizationidfilter.md index 55494566..7c5892ae 100644 --- a/docs/models/operations/productslistqueryparamorganizationidfilter.md +++ b/docs/models/operations/productslistqueryparamorganizationidfilter.md @@ -1,6 +1,6 @@ # ProductsListQueryParamOrganizationIDFilter -Filter by organization ID. **Required unless you use an organization token.** +Filter by organization ID. ## Supported Types diff --git a/docs/models/operations/productslistrequest.md b/docs/models/operations/productslistrequest.md index d3207662..713a5a2c 100644 --- a/docs/models/operations/productslistrequest.md +++ b/docs/models/operations/productslistrequest.md @@ -12,7 +12,7 @@ let value: ProductsListRequest = {}; | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `organizationId` | *operations.ProductsListQueryParamOrganizationIDFilter* | :heavy_minus_sign: | Filter by organization ID. **Required unless you use an organization token.** | +| `organizationId` | *operations.ProductsListQueryParamOrganizationIDFilter* | :heavy_minus_sign: | Filter by organization ID. | | `query` | *string* | :heavy_minus_sign: | Filter by product name. | | `isArchived` | *boolean* | :heavy_minus_sign: | Filter on archived products. | | `isRecurring` | *boolean* | :heavy_minus_sign: | Filter on recurring products. If `true`, only subscriptions tiers are returned. If `false`, only one-time purchase products are returned. | diff --git a/docs/models/operations/productslistresponse.md b/docs/models/operations/productslistresponse.md index e84bdb88..fe1ca04d 100644 --- a/docs/models/operations/productslistresponse.md +++ b/docs/models/operations/productslistresponse.md @@ -9,39 +9,43 @@ let value: ProductsListResponse = { result: { items: [ { - createdAt: new Date("2022-10-25T14:52:48.050Z"), - modifiedAt: new Date("2023-10-28T20:52:23.318Z"), + createdAt: new Date("2022-05-08T15:26:57.975Z"), + modifiedAt: new Date("2022-06-28T20:19:53.694Z"), id: "", name: "", - description: "skeleton yuck cooperative till though awkwardly gadzooks", + description: "spew ick fondly aside cake uh-huh while instead", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2024-12-10T14:11:23.041Z"), - modifiedAt: new Date("2023-10-08T04:10:09.540Z"), + createdAt: new Date("2022-06-19T06:00:22.932Z"), + modifiedAt: new Date("2022-12-09T16:59:37.115Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - minimumAmount: 45510, - maximumAmount: 197982, - presetAmount: 404774, + minimumAmount: 884325, + maximumAmount: 958533, + presetAmount: 207512, }, ], benefits: [ { - createdAt: new Date("2024-04-26T00:52:10.331Z"), - modifiedAt: new Date("2023-03-29T17:49:02.841Z"), + createdAt: new Date("2022-10-27T14:09:54.597Z"), + modifiedAt: new Date("2024-08-30T07:06:29.227Z"), id: "", - description: - "shy bug testing list zealous vastly fledgling facilitate", + description: "forenenst lazily afore spring", selectable: false, deletable: false, organizationId: "", properties: { - paidArticles: false, + archived: { + "key": false, + }, + files: [ + "", + ], }, }, ], @@ -50,26 +54,45 @@ let value: ProductsListResponse = { id: "", organizationId: "", name: "", - path: "/net", + path: "/Users", mimeType: "", - size: 19691, + size: 59023, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2022-02-14T19:10:20.351Z"), + lastModifiedAt: new Date("2024-06-07T20:03:48.485Z"), version: "", isUploaded: false, - createdAt: new Date("2022-10-10T13:44:30.649Z"), + createdAt: new Date("2023-11-20T00:29:10.889Z"), sizeReadable: "", - publicUrl: "https://practical-runway.net", + publicUrl: "https://simplistic-meander.org", + }, + ], + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2023-08-23T10:58:27.936Z"), + modifiedAt: new Date("2022-11-18T19:17:48.581Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 968205, + required: false, }, ], }, ], pagination: { - totalCount: 856568, - maxPage: 720319, + totalCount: 226196, + maxPage: 15738, }, }, }; diff --git a/docs/models/operations/queryparambenefittypefilter.md b/docs/models/operations/queryparambenefittypefilter.md index caa0bde8..0c0621da 100644 --- a/docs/models/operations/queryparambenefittypefilter.md +++ b/docs/models/operations/queryparambenefittypefilter.md @@ -8,14 +8,14 @@ Filter by benefit type. ### `components.BenefitType` ```typescript -const value: components.BenefitType = "custom"; +const value: components.BenefitType = "github_repository"; ``` ### `components.BenefitType[]` ```typescript const value: components.BenefitType[] = [ - "github_repository", + "articles", ]; ``` diff --git a/docs/models/operations/queryparamproductpricetypefilter.md b/docs/models/operations/queryparamproductpricetypefilter.md index 5347cb3d..f525d7c3 100644 --- a/docs/models/operations/queryparamproductpricetypefilter.md +++ b/docs/models/operations/queryparamproductpricetypefilter.md @@ -15,7 +15,7 @@ const value: components.ProductPriceType = "recurring"; ```typescript const value: components.ProductPriceType[] = [ - "one_time", + "recurring", ]; ``` diff --git a/docs/models/operations/repositorieslistresponse.md b/docs/models/operations/repositorieslistresponse.md index d02e663e..594353ca 100644 --- a/docs/models/operations/repositorieslistresponse.md +++ b/docs/models/operations/repositorieslistresponse.md @@ -9,33 +9,53 @@ let value: RepositoriesListResponse = { result: { items: [ { - id: "1fe63470-a66c-4bf5-8ec5-94d1326b8706", + id: "c530ee15-21e0-4f1d-b955-c5a87e8db0c3", isPrivate: false, name: "MyOrg", - description: "before enrage upside-down accurate", + description: "highly experience confiscate", stars: 1337, license: "", homepage: "", profileSettings: {}, organization: { - id: "beb2725e-e459-4f24-bd7e-2855765ebb49", + id: "42578de3-9175-457b-a1eb-2f8f38449ecb", name: "", - avatarUrl: "https://grown-rust.net", + avatarUrl: "https://made-up-surface.org", isPersonal: false, bio: "", prettyName: "", - company: "Streich - Kiehn", + company: "Russel - Anderson", blog: "", location: "", - email: "Isidro.Mraz@yahoo.com", + email: "Daphnee51@gmail.com", twitterUsername: "", organizationId: "", }, + internalOrganization: { + createdAt: new Date("2022-09-08T14:19:07.957Z"), + modifiedAt: new Date("2024-01-13T03:31:14.357Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://adolescent-interchange.net", + bio: "", + company: "Thompson - Leannon", + blog: "", + location: "", + email: "Dana.McCullough-Breitenberg45@gmail.com", + twitterUsername: "", + pledgeMinimumAmount: 411615, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 489459, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, }, ], pagination: { - totalCount: 401428, - maxPage: 416692, + totalCount: 243678, + maxPage: 588639, }, }, }; diff --git a/docs/models/operations/subscriptionslistresponse.md b/docs/models/operations/subscriptionslistresponse.md index 74da7631..066b7993 100644 --- a/docs/models/operations/subscriptionslistresponse.md +++ b/docs/models/operations/subscriptionslistresponse.md @@ -9,18 +9,18 @@ let value: SubscriptionsListResponse = { result: { items: [ { - createdAt: new Date("2023-12-22T10:07:00.418Z"), - modifiedAt: new Date("2023-07-21T23:44:43.083Z"), + createdAt: new Date("2022-06-05T10:21:41.832Z"), + modifiedAt: new Date("2022-12-14T03:17:00.431Z"), id: "", - amount: 484966, - currency: "Peso Uruguayo", - recurringInterval: "year", - status: "canceled", - currentPeriodStart: new Date("2024-03-06T05:29:10.468Z"), - currentPeriodEnd: new Date("2022-02-12T06:12:35.281Z"), + amount: 626707, + currency: "Saudi Riyal", + recurringInterval: "month", + status: "active", + currentPeriodStart: new Date("2023-12-16T17:29:07.234Z"), + currentPeriodEnd: new Date("2024-07-24T03:46:55.765Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2024-04-27T07:53:12.556Z"), - endedAt: new Date("2022-08-26T16:33:18.210Z"), + startedAt: new Date("2023-06-05T22:56:35.057Z"), + endedAt: new Date("2024-11-28T05:59:28.499Z"), userId: "", productId: "", priceId: "", @@ -29,44 +29,45 @@ let value: SubscriptionsListResponse = { "key": "", }, user: { - email: "Ally.Bradtke82@hotmail.com", + email: "Adrain_Gerhold23@gmail.com", publicName: "", githubUsername: "", - avatarUrl: "https://gracious-silk.com/", + avatarUrl: "https://second-mathematics.net", }, product: { - createdAt: new Date("2022-09-07T04:32:30.698Z"), - modifiedAt: new Date("2022-03-17T11:04:55.466Z"), + createdAt: new Date("2023-04-04T19:49:26.614Z"), + modifiedAt: new Date("2022-01-06T19:40:31.772Z"), id: "", name: "", - description: - "educated or fedora compromise if made-up deer rightfully", + description: "abnormally within whether", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2023-06-06T12:07:56.121Z"), - modifiedAt: new Date("2024-02-16T19:29:46.908Z"), + createdAt: new Date("2024-02-08T03:18:25.211Z"), + modifiedAt: new Date("2024-09-27T23:01:52.690Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 43975, + priceAmount: 524577, }, ], benefits: [ { - createdAt: new Date("2023-07-25T00:13:17.699Z"), - modifiedAt: new Date("2022-02-03T14:30:29.574Z"), + createdAt: new Date("2022-05-12T19:46:31.016Z"), + modifiedAt: new Date("2024-04-07T08:55:07.116Z"), id: "", - description: "lest paintwork but fondly", + description: + "beneath biodegradable failing step-mother amidst however astride until fabricate usefully", selectable: false, deletable: false, organizationId: "", properties: { - paidArticles: false, + note: "", }, + isTaxApplicable: false, }, ], medias: [ @@ -74,39 +75,58 @@ let value: SubscriptionsListResponse = { id: "", organizationId: "", name: "", - path: "/Library", + path: "/etc/defaults", mimeType: "", - size: 127294, + size: 18096, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2023-07-31T06:52:43.326Z"), + lastModifiedAt: new Date("2023-10-10T06:45:28.118Z"), version: "", isUploaded: false, - createdAt: new Date("2022-06-05T10:21:41.832Z"), + createdAt: new Date("2023-04-23T08:13:17.912Z"), sizeReadable: "", - publicUrl: "https://powerful-railway.com/", + publicUrl: "https://vague-essence.info", + }, + ], + attachedCustomFields: [ + { + customFieldId: "", + customField: { + createdAt: new Date("2023-10-07T14:44:09.655Z"), + modifiedAt: new Date("2024-12-14T07:17:28.090Z"), + id: "", + metadata: { + "key": "", + }, + slug: "", + name: "", + organizationId: "", + properties: {}, + }, + order: 697330, + required: false, }, ], }, price: { - createdAt: new Date("2023-12-16T17:29:07.234Z"), - modifiedAt: new Date("2024-07-24T03:46:55.765Z"), + createdAt: new Date("2022-10-17T02:08:42.808Z"), + modifiedAt: new Date("2024-11-01T07:26:05.631Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - minimumAmount: 475325, - maximumAmount: 969206, - presetAmount: 265632, - recurringInterval: "month", + minimumAmount: 135548, + maximumAmount: 720266, + presetAmount: 925395, + recurringInterval: "year", }, }, ], pagination: { - totalCount: 483753, - maxPage: 256114, + totalCount: 423054, + maxPage: 198991, }, }, }; diff --git a/docs/models/operations/tokentypehint.md b/docs/models/operations/tokentypehint.md index cf18c8fe..f9e721bf 100644 --- a/docs/models/operations/tokentypehint.md +++ b/docs/models/operations/tokentypehint.md @@ -5,7 +5,7 @@ ```typescript import { TokenTypeHint } from "@polar-sh/sdk/models/operations"; -let value: TokenTypeHint = "refresh_token"; +let value: TokenTypeHint = "access_token"; ``` ## Values diff --git a/docs/models/operations/usersadvertisementslistresponse.md b/docs/models/operations/usersadvertisementslistresponse.md index dab677ca..b9fdbcb4 100644 --- a/docs/models/operations/usersadvertisementslistresponse.md +++ b/docs/models/operations/usersadvertisementslistresponse.md @@ -9,21 +9,21 @@ let value: UsersAdvertisementsListResponse = { result: { items: [ { - createdAt: new Date("2022-01-21T23:00:31.300Z"), - modifiedAt: new Date("2023-07-22T21:24:45.727Z"), + createdAt: new Date("2024-06-06T01:32:10.356Z"), + modifiedAt: new Date("2024-02-17T02:28:07.481Z"), id: "", userId: "", - views: 842777, - clicks: 373216, - imageUrl: "https://boring-blowgun.biz/", - imageUrlDark: "https://favorite-basket.com/", + views: 954334, + clicks: 351936, + imageUrl: "https://soggy-formation.name", + imageUrlDark: "https://turbulent-cantaloupe.biz/", text: "", - linkUrl: "https://damp-meadow.net", + linkUrl: "https://impractical-replacement.name/", }, ], pagination: { - totalCount: 456410, - maxPage: 153369, + totalCount: 487676, + maxPage: 545, }, }, }; diff --git a/docs/models/operations/usersbenefitsgetresponseusersbenefitsget.md b/docs/models/operations/usersbenefitsgetresponseusersbenefitsget.md index 7ce3493f..69e3e886 100644 --- a/docs/models/operations/usersbenefitsgetresponseusersbenefitsget.md +++ b/docs/models/operations/usersbenefitsgetresponseusersbenefitsget.md @@ -9,14 +9,46 @@ Successful Response ```typescript const value: components.BenefitArticlesSubscriber = { - createdAt: new Date("2022-08-04T10:54:08.790Z"), - modifiedAt: new Date("2023-02-09T02:56:48.801Z"), + createdAt: new Date("2022-10-18T20:48:18.611Z"), + modifiedAt: new Date("2023-07-28T11:31:00.474Z"), id: "", - description: - "newsstand farm bourgeoisie ah how elliptical aha well-to-do below", + description: "ah how elliptical", selectable: false, deletable: false, organizationId: "", + grants: [ + { + createdAt: new Date("2024-11-10T05:06:35.997Z"), + modifiedAt: new Date("2023-05-06T01:11:09.453Z"), + id: "", + isGranted: false, + isRevoked: false, + subscriptionId: "", + orderId: "", + userId: "", + benefitId: "", + }, + ], + organization: { + createdAt: new Date("2024-07-16T15:56:01.395Z"), + modifiedAt: new Date("2024-02-06T15:06:10.289Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://stylish-gripper.org/", + bio: "", + company: "Tillman LLC", + blog: "", + location: "", + email: "Jewell_Nolan-Kassulke1@hotmail.com", + twitterUsername: "", + pledgeMinimumAmount: 660174, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 290077, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, properties: { paidArticles: false, }, @@ -34,7 +66,6 @@ const value: components.BenefitAdsSubscriber = { selectable: false, deletable: false, organizationId: "", - properties: {}, grants: [ { createdAt: new Date("2023-05-13T01:59:12.211Z"), @@ -49,6 +80,27 @@ const value: components.BenefitAdsSubscriber = { properties: {}, }, ], + organization: { + createdAt: new Date("2024-08-07T13:19:14.525Z"), + modifiedAt: new Date("2024-12-05T04:07:03.604Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://advanced-fort.net", + bio: "", + company: "Lebsack - Becker", + blog: "", + location: "", + email: "Aidan92@gmail.com", + twitterUsername: "", + pledgeMinimumAmount: 31838, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 164694, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, + properties: {}, }; ``` @@ -56,14 +108,46 @@ const value: components.BenefitAdsSubscriber = { ```typescript const value: components.BenefitDiscordSubscriber = { - createdAt: new Date("2024-08-07T13:19:14.525Z"), - modifiedAt: new Date("2024-12-05T04:07:03.604Z"), + createdAt: new Date("2023-11-13T03:22:04.343Z"), + modifiedAt: new Date("2023-09-25T15:25:14.861Z"), id: "", - description: - "around apologise lest ick yum following although trustworthy underplay", + description: "justly pfft oh delete", selectable: false, deletable: false, organizationId: "", + grants: [ + { + createdAt: new Date("2023-12-28T17:36:32.596Z"), + modifiedAt: new Date("2022-10-16T14:25:54.471Z"), + id: "", + isGranted: false, + isRevoked: false, + subscriptionId: "", + orderId: "", + userId: "", + benefitId: "", + }, + ], + organization: { + createdAt: new Date("2022-01-23T15:12:14.003Z"), + modifiedAt: new Date("2024-04-11T04:23:31.598Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://ideal-mortise.net/", + bio: "", + company: "Swaniawski Inc", + blog: "", + location: "", + email: "Christophe_Pfeffer-Emard73@hotmail.com", + twitterUsername: "", + pledgeMinimumAmount: 213312, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 518201, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, properties: { guildId: "", }, @@ -74,17 +158,17 @@ const value: components.BenefitDiscordSubscriber = { ```typescript const value: components.BenefitCustomSubscriber = { - createdAt: new Date("2024-03-12T00:25:52.109Z"), - modifiedAt: new Date("2022-10-06T07:40:51.480Z"), + createdAt: new Date("2022-01-29T03:01:55.688Z"), + modifiedAt: new Date("2022-08-16T09:17:34.312Z"), id: "", - description: "however aha roundabout embarrassment", + description: "league given only trash within ack", selectable: false, deletable: false, organizationId: "", grants: [ { - createdAt: new Date("2022-09-21T22:45:36.817Z"), - modifiedAt: new Date("2022-04-20T22:07:54.686Z"), + createdAt: new Date("2023-11-22T23:18:09.113Z"), + modifiedAt: new Date("2024-08-16T05:16:14.427Z"), id: "", isGranted: false, isRevoked: false, @@ -94,6 +178,26 @@ const value: components.BenefitCustomSubscriber = { benefitId: "", }, ], + organization: { + createdAt: new Date("2022-11-18T03:36:20.029Z"), + modifiedAt: new Date("2024-07-19T10:36:40.605Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://afraid-folklore.com", + bio: "", + company: "Kris, Kuphal and Nikolaus", + blog: "", + location: "", + email: "Brielle_Dickens22@yahoo.com", + twitterUsername: "", + pledgeMinimumAmount: 862192, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 972920, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, properties: { note: "", }, @@ -104,13 +208,47 @@ const value: components.BenefitCustomSubscriber = { ```typescript const value: components.BenefitGitHubRepositorySubscriber = { - createdAt: new Date("2022-01-19T00:09:53.916Z"), - modifiedAt: new Date("2024-10-15T18:20:20.936Z"), + createdAt: new Date("2024-11-19T01:47:41.445Z"), + modifiedAt: new Date("2024-09-20T14:02:09.066Z"), id: "", - description: "pish present an uh-huh vice but calmly finished", + description: + "shakily hence bitterly considering barring above provision continually suffice", selectable: false, deletable: false, organizationId: "", + grants: [ + { + createdAt: new Date("2023-05-18T15:07:06.997Z"), + modifiedAt: new Date("2024-03-04T16:30:19.849Z"), + id: "", + isGranted: false, + isRevoked: false, + subscriptionId: "", + orderId: "", + userId: "", + benefitId: "", + }, + ], + organization: { + createdAt: new Date("2023-03-14T07:57:43.423Z"), + modifiedAt: new Date("2024-09-17T19:59:01.360Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://runny-festival.net", + bio: "", + company: "Fisher Group", + blog: "", + location: "", + email: "Vesta45@hotmail.com", + twitterUsername: "", + pledgeMinimumAmount: 575751, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 820767, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, properties: { repositoryOwner: "polarsource", repositoryName: "private_repo", @@ -122,13 +260,46 @@ const value: components.BenefitGitHubRepositorySubscriber = { ```typescript const value: components.BenefitDownloadablesSubscriber = { - createdAt: new Date("2022-05-25T02:31:24.789Z"), - modifiedAt: new Date("2022-03-02T16:33:58.047Z"), + createdAt: new Date("2024-09-23T02:13:30.609Z"), + modifiedAt: new Date("2024-06-12T19:32:18.704Z"), id: "", - description: "covenant jaggedly where appropriate jubilantly", + description: "about travel gee fondly", selectable: false, deletable: false, organizationId: "", + grants: [ + { + createdAt: new Date("2022-05-24T15:16:36.486Z"), + modifiedAt: new Date("2022-01-14T04:36:02.905Z"), + id: "", + isGranted: false, + isRevoked: false, + subscriptionId: "", + orderId: "", + userId: "", + benefitId: "", + }, + ], + organization: { + createdAt: new Date("2022-05-07T13:41:56.227Z"), + modifiedAt: new Date("2023-11-09T20:30:17.087Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://wry-handful.com", + bio: "", + company: "Kuhn and Sons", + blog: "", + location: "", + email: "Otis_Flatley@gmail.com", + twitterUsername: "", + pledgeMinimumAmount: 517309, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 424089, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, properties: { activeFiles: [ "", @@ -141,29 +312,18 @@ const value: components.BenefitDownloadablesSubscriber = { ```typescript const value: components.BenefitLicenseKeysSubscriber = { - createdAt: new Date("2024-11-14T05:17:46.077Z"), - modifiedAt: new Date("2022-07-25T02:17:27.515Z"), + createdAt: new Date("2023-08-31T22:30:29.229Z"), + modifiedAt: new Date("2022-11-11T14:36:11.448Z"), id: "", - description: "tag even well lest by ick abaft adrenalin that reluctantly", + description: + "innocently hence pish hyphenation trim bravely teammate marketplace", selectable: false, deletable: false, organizationId: "", - properties: { - prefix: "", - expires: { - ttl: 246063, - timeframe: "month", - }, - activations: { - limit: 517309, - enableUserAdmin: false, - }, - limitUsage: 424089, - }, grants: [ { - createdAt: new Date("2023-08-31T22:30:29.229Z"), - modifiedAt: new Date("2022-11-11T14:36:11.448Z"), + createdAt: new Date("2022-10-25T17:33:15.837Z"), + modifiedAt: new Date("2023-05-15T04:00:10.466Z"), id: "", isGranted: false, isRevoked: false, @@ -174,6 +334,38 @@ const value: components.BenefitLicenseKeysSubscriber = { properties: {}, }, ], + organization: { + createdAt: new Date("2023-03-17T06:40:22.205Z"), + modifiedAt: new Date("2022-09-30T06:16:04.028Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://gaseous-gazebo.name", + bio: "", + company: "Hartmann, Walsh and Stoltenberg", + blog: "", + location: "", + email: "Deondre74@gmail.com", + twitterUsername: "", + pledgeMinimumAmount: 622385, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 710529, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, + properties: { + prefix: "", + expires: { + ttl: 204923, + timeframe: "month", + }, + activations: { + limit: 676243, + enableUserAdmin: false, + }, + limitUsage: 879235, + }, }; ``` diff --git a/docs/models/operations/usersbenefitslistresponse.md b/docs/models/operations/usersbenefitslistresponse.md index 38552933..a369c1e3 100644 --- a/docs/models/operations/usersbenefitslistresponse.md +++ b/docs/models/operations/usersbenefitslistresponse.md @@ -17,6 +17,39 @@ let value: UsersBenefitsListResponse = { selectable: false, deletable: false, organizationId: "", + grants: [ + { + createdAt: new Date("2023-12-21T08:05:36.677Z"), + modifiedAt: new Date("2022-06-01T10:45:51.668Z"), + id: "", + isGranted: false, + isRevoked: false, + subscriptionId: "", + orderId: "", + userId: "", + benefitId: "", + }, + ], + organization: { + createdAt: new Date("2022-08-04T10:54:08.790Z"), + modifiedAt: new Date("2023-02-09T02:56:48.801Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://busy-spirit.com", + bio: "", + company: "Koss, Wolff and Moen", + blog: "", + location: "", + email: "Alison.Carter11@hotmail.com", + twitterUsername: "", + pledgeMinimumAmount: 414263, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 64147, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, properties: { activeFiles: [ "", @@ -25,8 +58,8 @@ let value: UsersBenefitsListResponse = { }, ], pagination: { - totalCount: 656330, - maxPage: 138183, + totalCount: 692472, + maxPage: 566602, }, }, }; diff --git a/docs/models/operations/usersdownloadableslistresponse.md b/docs/models/operations/usersdownloadableslistresponse.md index 3e3f3a93..59a25c31 100644 --- a/docs/models/operations/usersdownloadableslistresponse.md +++ b/docs/models/operations/usersdownloadableslistresponse.md @@ -15,28 +15,28 @@ let value: UsersDownloadablesListResponse = { id: "", organizationId: "", name: "", - path: "/home", + path: "/opt/sbin", mimeType: "", - size: 432984, + size: 63553, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2023-08-02T22:40:10.134Z"), + lastModifiedAt: new Date("2022-08-17T05:53:36.757Z"), download: { - url: "https://specific-reservation.org/", - expiresAt: new Date("2022-02-01T17:34:04.258Z"), + url: "https://ecstatic-strait.net", + expiresAt: new Date("2022-06-24T10:10:57.419Z"), }, version: "", isUploaded: false, - service: "organization_avatar", + service: "product_media", sizeReadable: "", }, }, ], pagination: { - totalCount: 392569, - maxPage: 878373, + totalCount: 115661, + maxPage: 727888, }, }, }; diff --git a/docs/models/operations/userslicensekeyslistresponse.md b/docs/models/operations/userslicensekeyslistresponse.md index bb959ac4..a7c0055a 100644 --- a/docs/models/operations/userslicensekeyslistresponse.md +++ b/docs/models/operations/userslicensekeyslistresponse.md @@ -15,24 +15,24 @@ let value: UsersLicenseKeysListResponse = { user: { id: "", publicName: "", - email: "Xander_Hickle@hotmail.com", - avatarUrl: "https://major-pleasure.biz/", + email: "Randi29@yahoo.com", + avatarUrl: "https://decisive-bungalow.net/", }, benefitId: "", key: "", displayKey: "", status: "revoked", - limitActivations: 117380, - usage: 159845, - limitUsage: 46806, - validations: 970732, - lastValidatedAt: new Date("2022-01-05T05:32:33.670Z"), - expiresAt: new Date("2022-07-15T17:22:02.927Z"), + limitActivations: 882284, + usage: 733289, + limitUsage: 409726, + validations: 373511, + lastValidatedAt: new Date("2023-07-20T03:21:03.853Z"), + expiresAt: new Date("2024-09-01T09:49:58.832Z"), }, ], pagination: { - totalCount: 612867, - maxPage: 81369, + totalCount: 737279, + maxPage: 5152, }, }, }; diff --git a/docs/models/operations/usersorderslistresponse.md b/docs/models/operations/usersorderslistresponse.md index a29e0666..89d265f7 100644 --- a/docs/models/operations/usersorderslistresponse.md +++ b/docs/models/operations/usersorderslistresponse.md @@ -9,42 +9,46 @@ let value: UsersOrdersListResponse = { result: { items: [ { - createdAt: new Date("2023-01-31T03:47:25.523Z"), - modifiedAt: new Date("2024-06-27T04:59:29.330Z"), + createdAt: new Date("2022-02-03T03:18:29.615Z"), + modifiedAt: new Date("2024-02-18T12:41:59.818Z"), id: "", - amount: 924967, - taxAmount: 46007, - currency: "Danish Krone", + amount: 7884, + taxAmount: 372679, + currency: "Moldovan Leu", userId: "", productId: "", productPriceId: "", subscriptionId: "", product: { - createdAt: new Date("2023-01-17T23:27:12.582Z"), - modifiedAt: new Date("2024-06-12T04:52:41.784Z"), + createdAt: new Date("2024-10-07T15:13:11.606Z"), + modifiedAt: new Date("2022-04-09T02:03:52.245Z"), id: "", name: "", - description: - "unit grade soap sizzling huzzah like nor sizzling cheerfully hungrily", + description: "minority eek where kindly materialise antique", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2023-08-19T20:54:27.100Z"), - modifiedAt: new Date("2022-11-06T20:07:53.826Z"), + createdAt: new Date("2024-11-09T13:09:41.435Z"), + modifiedAt: new Date("2022-11-25T19:57:38.512Z"), id: "", isArchived: false, productId: "", + priceCurrency: "", + minimumAmount: 160467, + maximumAmount: 886305, + presetAmount: 446394, + recurringInterval: "year", }, ], benefits: [ { - createdAt: new Date("2024-02-18T12:41:59.818Z"), - modifiedAt: new Date("2022-01-09T15:23:00.451Z"), + createdAt: new Date("2023-12-26T14:02:06.082Z"), + modifiedAt: new Date("2023-04-28T12:41:51.916Z"), id: "", - type: "ads", - description: "ew a sidetrack popularity clamor svelte ah", + type: "custom", + description: "zowie instead gah vision um sneaky never hmph", selectable: false, deletable: false, organizationId: "", @@ -55,44 +59,63 @@ let value: UsersOrdersListResponse = { id: "", organizationId: "", name: "", - path: "/etc/periodic", + path: "/var/mail", mimeType: "", - size: 886305, + size: 983427, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2023-05-05T05:57:31.337Z"), + lastModifiedAt: new Date("2023-03-15T04:23:01.364Z"), version: "", isUploaded: false, - createdAt: new Date("2024-09-22T00:45:34.682Z"), + createdAt: new Date("2023-02-21T20:20:12.003Z"), sizeReadable: "", - publicUrl: "https://quintessential-hunt.com/", + publicUrl: "https://right-peony.org/", }, ], + organization: { + createdAt: new Date("2022-04-17T14:16:27.461Z"), + modifiedAt: new Date("2023-06-30T13:31:25.620Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://excellent-comestible.org", + bio: "", + company: "Kovacek - Buckridge", + blog: "", + location: "", + email: "Wilhelm.Stiedemann@yahoo.com", + twitterUsername: "", + pledgeMinimumAmount: 399812, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 671384, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, }, productPrice: { - createdAt: new Date("2022-02-13T10:02:48.141Z"), - modifiedAt: new Date("2022-03-07T16:46:29.356Z"), + createdAt: new Date("2023-12-02T13:10:19.910Z"), + modifiedAt: new Date("2023-03-14T11:32:05.153Z"), id: "", isArchived: false, productId: "", - priceCurrency: "", - priceAmount: 61078, + recurringInterval: "month", }, subscription: { - createdAt: new Date("2024-09-21T21:00:27.770Z"), - modifiedAt: new Date("2024-03-21T21:54:23.669Z"), + createdAt: new Date("2023-11-05T12:32:11.817Z"), + modifiedAt: new Date("2022-03-18T18:23:23.170Z"), id: "", - amount: 898063, - currency: "Philippine Peso", + amount: 822407, + currency: "Balboa", recurringInterval: "year", - status: "trialing", - currentPeriodStart: new Date("2024-12-29T18:23:56.613Z"), - currentPeriodEnd: new Date("2023-02-01T23:01:15.623Z"), + status: "active", + currentPeriodStart: new Date("2022-05-02T01:59:23.739Z"), + currentPeriodEnd: new Date("2023-03-20T22:03:24.380Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2023-05-31T19:56:59.856Z"), - endedAt: new Date("2023-02-19T13:21:39.892Z"), + startedAt: new Date("2023-03-21T06:56:48.204Z"), + endedAt: new Date("2022-12-18T20:42:53.316Z"), userId: "", productId: "", priceId: "", @@ -101,8 +124,8 @@ let value: UsersOrdersListResponse = { }, ], pagination: { - totalCount: 979527, - maxPage: 174658, + totalCount: 29950, + maxPage: 737254, }, }, }; diff --git a/docs/models/operations/userssubscriptionslistresponse.md b/docs/models/operations/userssubscriptionslistresponse.md index 4999c041..c9cd9512 100644 --- a/docs/models/operations/userssubscriptionslistresponse.md +++ b/docs/models/operations/userssubscriptionslistresponse.md @@ -9,51 +9,47 @@ let value: UsersSubscriptionsListResponse = { result: { items: [ { - createdAt: new Date("2022-12-26T11:23:46.953Z"), - modifiedAt: new Date("2024-01-16T15:53:28.719Z"), + createdAt: new Date("2022-05-01T07:46:13.385Z"), + modifiedAt: new Date("2023-10-27T12:19:44.874Z"), id: "", - amount: 63207, - currency: "Metical", - recurringInterval: "month", - status: "incomplete_expired", - currentPeriodStart: new Date("2022-09-19T07:13:22.589Z"), - currentPeriodEnd: new Date("2023-07-18T21:44:35.519Z"), + amount: 703218, + currency: "Nepalese Rupee", + recurringInterval: "year", + status: "incomplete", + currentPeriodStart: new Date("2024-08-08T09:57:53.832Z"), + currentPeriodEnd: new Date("2022-02-01T23:49:11.774Z"), cancelAtPeriodEnd: false, - startedAt: new Date("2023-02-08T05:58:01.482Z"), - endedAt: new Date("2023-05-16T08:17:57.191Z"), + startedAt: new Date("2023-08-10T06:27:10.627Z"), + endedAt: new Date("2023-03-20T01:13:26.854Z"), userId: "", productId: "", priceId: "", checkoutId: "", product: { - createdAt: new Date("2023-01-05T21:00:18.180Z"), - modifiedAt: new Date("2024-11-29T15:51:58.019Z"), + createdAt: new Date("2023-07-29T12:07:56.150Z"), + modifiedAt: new Date("2023-02-05T03:35:13.798Z"), id: "", name: "", - description: "form rundown phew trolley", + description: "against even noisily harangue", isRecurring: false, isArchived: false, organizationId: "", prices: [ { - createdAt: new Date("2023-02-21T20:20:12.003Z"), - modifiedAt: new Date("2022-06-11T23:57:33.954Z"), + createdAt: new Date("2024-12-18T03:13:18.142Z"), + modifiedAt: new Date("2024-04-12T04:09:56.196Z"), id: "", isArchived: false, productId: "", - priceCurrency: "", - minimumAmount: 684935, - maximumAmount: 656762, - presetAmount: 862063, }, ], benefits: [ { - createdAt: new Date("2023-06-30T13:31:25.620Z"), - modifiedAt: new Date("2023-09-29T20:46:44.681Z"), + createdAt: new Date("2023-07-04T03:57:56.514Z"), + modifiedAt: new Date("2023-02-17T12:32:25.218Z"), id: "", - type: "articles", - description: "woot foot whereas besides", + type: "ads", + description: "absent mmm feline following willfully", selectable: false, deletable: false, organizationId: "", @@ -64,36 +60,57 @@ let value: UsersSubscriptionsListResponse = { id: "", organizationId: "", name: "", - path: "/bin", + path: "/usr/local/bin", mimeType: "", - size: 737254, + size: 675689, storageVersion: "", checksumEtag: "", checksumSha256Base64: "", checksumSha256Hex: "", - lastModifiedAt: new Date("2022-05-01T07:46:13.385Z"), + lastModifiedAt: new Date("2022-09-26T09:34:22.320Z"), version: "", isUploaded: false, - createdAt: new Date("2023-10-27T12:19:44.874Z"), + createdAt: new Date("2022-08-26T05:41:30.450Z"), sizeReadable: "", - publicUrl: "https://prickly-venom.com", + publicUrl: "https://utter-emergent.info/", }, ], + organization: { + createdAt: new Date("2023-06-26T09:04:00.715Z"), + modifiedAt: new Date("2024-05-02T21:01:32.328Z"), + id: "", + name: "", + slug: "", + avatarUrl: "https://cool-hoof.org", + bio: "", + company: "Brakus, Crist and Gutmann", + blog: "", + location: "", + email: "Hermann.Mante59@gmail.com", + twitterUsername: "", + pledgeMinimumAmount: 975884, + pledgeBadgeShowAmount: false, + defaultUpfrontSplitToContributors: 932562, + donationsEnabled: false, + profileSettings: {}, + featureSettings: {}, + }, }, price: { - createdAt: new Date("2023-08-10T06:27:10.627Z"), - modifiedAt: new Date("2023-03-20T01:13:26.854Z"), + createdAt: new Date("2022-10-02T10:28:28.527Z"), + modifiedAt: new Date("2023-06-14T19:11:00.780Z"), id: "", isArchived: false, productId: "", priceCurrency: "", - priceAmount: 524184, + priceAmount: 39992, + recurringInterval: "year", }, }, ], pagination: { - totalCount: 365100, - maxPage: 190567, + totalCount: 408303, + maxPage: 377406, }, }, }; diff --git a/docs/sdks/customfields/README.md b/docs/sdks/customfields/README.md new file mode 100644 index 00000000..5d1c2774 --- /dev/null +++ b/docs/sdks/customfields/README.md @@ -0,0 +1,404 @@ +# CustomFields +(*customFields*) + +## Overview + +### Available Operations + +* [list](#list) - List Custom Fields +* [create](#create) - Create Custom Field +* [get](#get) - Get Custom Field +* [update](#update) - Update Custom Field +* [delete](#delete) - Delete Custom Field + +## list + +List custom fields. + +### Example Usage + +```typescript +import { Polar } from "@polar-sh/sdk"; + +const polar = new Polar({ + accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "", +}); + +async function run() { + const result = await polar.customFields.list({}); + + for await (const page of result) { + // Handle the page + console.log(page); + } +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PolarCore } from "@polar-sh/sdk/core.js"; +import { customFieldsList } from "@polar-sh/sdk/funcs/customFieldsList.js"; + +// Use `PolarCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const polar = new PolarCore({ + accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "", +}); + +async function run() { + const res = await customFieldsList(polar, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + for await (const page of result) { + // Handle the page + console.log(page); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CustomFieldsListRequest](../../models/operations/customfieldslistrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CustomFieldsListResponse](../../models/operations/customfieldslistresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create + +Create a custom field. + +### Example Usage + +```typescript +import { Polar } from "@polar-sh/sdk"; + +const polar = new Polar({ + accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "", +}); + +async function run() { + const result = await polar.customFields.create({ + slug: "", + name: "", + properties: {}, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PolarCore } from "@polar-sh/sdk/core.js"; +import { customFieldsCreate } from "@polar-sh/sdk/funcs/customFieldsCreate.js"; + +// Use `PolarCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const polar = new PolarCore({ + accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "", +}); + +async function run() { + const res = await customFieldsCreate(polar, { + slug: "", + name: "", + properties: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.CustomFieldCreate](../../models/components/customfieldcreate.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.CustomField](../../models/components/customfield.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +Get a custom field by ID. + +### Example Usage + +```typescript +import { Polar } from "@polar-sh/sdk"; + +const polar = new Polar({ + accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "", +}); + +async function run() { + const result = await polar.customFields.get({ + id: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PolarCore } from "@polar-sh/sdk/core.js"; +import { customFieldsGet } from "@polar-sh/sdk/funcs/customFieldsGet.js"; + +// Use `PolarCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const polar = new PolarCore({ + accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "", +}); + +async function run() { + const res = await customFieldsGet(polar, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CustomFieldsGetRequest](../../models/operations/customfieldsgetrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.CustomField](../../models/components/customfield.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.ResourceNotFound | 404 | application/json | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## update + +Update a custom field. + +### Example Usage + +```typescript +import { Polar } from "@polar-sh/sdk"; + +const polar = new Polar({ + accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "", +}); + +async function run() { + const result = await polar.customFields.update({ + id: "", + customFieldUpdate: {}, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PolarCore } from "@polar-sh/sdk/core.js"; +import { customFieldsUpdate } from "@polar-sh/sdk/funcs/customFieldsUpdate.js"; + +// Use `PolarCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const polar = new PolarCore({ + accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "", +}); + +async function run() { + const res = await customFieldsUpdate(polar, { + id: "", + customFieldUpdate: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CustomFieldsUpdateRequest](../../models/operations/customfieldsupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.CustomField](../../models/components/customfield.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.ResourceNotFound | 404 | application/json | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## delete + +Delete a custom field. + +### Example Usage + +```typescript +import { Polar } from "@polar-sh/sdk"; + +const polar = new Polar({ + accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "", +}); + +async function run() { + await polar.customFields.delete({ + id: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { PolarCore } from "@polar-sh/sdk/core.js"; +import { customFieldsDelete } from "@polar-sh/sdk/funcs/customFieldsDelete.js"; + +// Use `PolarCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const polar = new PolarCore({ + accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "", +}); + +async function run() { + const res = await customFieldsDelete(polar, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CustomFieldsDeleteRequest](../../models/operations/customfieldsdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.ResourceNotFound | 404 | application/json | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/jsr.json b/jsr.json index d43d1043..f3028d71 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@polar-sh/sdk", - "version": "0.14.0", + "version": "0.15.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 8e5dd7ec..e47620dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@polar-sh/sdk", - "version": "0.14.0", + "version": "0.15.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@polar-sh/sdk", - "version": "0.14.0", + "version": "0.15.0", "devDependencies": { "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", diff --git a/package.json b/package.json index 031f8934..60c6bfc4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@polar-sh/sdk", - "version": "0.14.0", + "version": "0.15.0", "author": "Speakeasy", "main": "./index.js", "sideEffects": false, diff --git a/src/funcs/advertisementsGet.ts b/src/funcs/advertisementsGet.ts index eab03aae..22abe907 100644 --- a/src/funcs/advertisementsGet.ts +++ b/src/funcs/advertisementsGet.ts @@ -73,12 +73,17 @@ export async function advertisementsGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "advertisements:get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -96,9 +101,8 @@ export async function advertisementsGet( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/advertisementsList.ts b/src/funcs/advertisementsList.ts index 4faf6505..918760d5 100644 --- a/src/funcs/advertisementsList.ts +++ b/src/funcs/advertisementsList.ts @@ -80,12 +80,17 @@ export async function advertisementsList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "advertisements:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -104,9 +109,8 @@ export async function advertisementsList( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/articlesCreate.ts b/src/funcs/articlesCreate.ts index 8db412dd..95c10d15 100644 --- a/src/funcs/articlesCreate.ts +++ b/src/funcs/articlesCreate.ts @@ -65,12 +65,17 @@ export async function articlesCreate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "articles:create", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -88,9 +93,8 @@ export async function articlesCreate( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/articlesDelete.ts b/src/funcs/articlesDelete.ts index 9496d55d..67681e7c 100644 --- a/src/funcs/articlesDelete.ts +++ b/src/funcs/articlesDelete.ts @@ -74,12 +74,17 @@ export async function articlesDelete( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "articles:delete", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -97,9 +102,8 @@ export async function articlesDelete( const doResult = await client._do(req, { context, errorCodes: ["403", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/articlesExport.ts b/src/funcs/articlesExport.ts index cdc27389..4638931d 100644 --- a/src/funcs/articlesExport.ts +++ b/src/funcs/articlesExport.ts @@ -69,12 +69,17 @@ export async function articlesExport( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "articles:export", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -93,9 +98,8 @@ export async function articlesExport( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/articlesGet.ts b/src/funcs/articlesGet.ts index ac854f6e..d6e79fa1 100644 --- a/src/funcs/articlesGet.ts +++ b/src/funcs/articlesGet.ts @@ -73,12 +73,17 @@ export async function articlesGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "articles:get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -96,9 +101,8 @@ export async function articlesGet( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/articlesList.ts b/src/funcs/articlesList.ts index c1deb382..e42e65e5 100644 --- a/src/funcs/articlesList.ts +++ b/src/funcs/articlesList.ts @@ -84,12 +84,17 @@ export async function articlesList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "articles:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -108,9 +113,8 @@ export async function articlesList( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/articlesPreview.ts b/src/funcs/articlesPreview.ts index 50475d11..00351424 100644 --- a/src/funcs/articlesPreview.ts +++ b/src/funcs/articlesPreview.ts @@ -75,12 +75,17 @@ export async function articlesPreview( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "articles:preview", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -98,9 +103,8 @@ export async function articlesPreview( const doResult = await client._do(req, { context, errorCodes: ["403", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/articlesReceivers.ts b/src/funcs/articlesReceivers.ts index ce24307e..c0162ec1 100644 --- a/src/funcs/articlesReceivers.ts +++ b/src/funcs/articlesReceivers.ts @@ -72,12 +72,17 @@ export async function articlesReceivers( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "articles:receivers", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -95,9 +100,8 @@ export async function articlesReceivers( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/articlesSend.ts b/src/funcs/articlesSend.ts index c4e0b748..3564f154 100644 --- a/src/funcs/articlesSend.ts +++ b/src/funcs/articlesSend.ts @@ -74,12 +74,17 @@ export async function articlesSend( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "articles:send", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -97,9 +102,8 @@ export async function articlesSend( const doResult = await client._do(req, { context, errorCodes: ["400", "403", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/articlesUpdate.ts b/src/funcs/articlesUpdate.ts index 3b906a2e..ba68444c 100644 --- a/src/funcs/articlesUpdate.ts +++ b/src/funcs/articlesUpdate.ts @@ -75,12 +75,17 @@ export async function articlesUpdate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "articles:update", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -98,9 +103,8 @@ export async function articlesUpdate( const doResult = await client._do(req, { context, errorCodes: ["403", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/benefitsCreate.ts b/src/funcs/benefitsCreate.ts index dc217d05..baa1d75d 100644 --- a/src/funcs/benefitsCreate.ts +++ b/src/funcs/benefitsCreate.ts @@ -67,12 +67,17 @@ export async function benefitsCreate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "benefits:create", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -90,9 +95,8 @@ export async function benefitsCreate( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/benefitsDelete.ts b/src/funcs/benefitsDelete.ts index 384bd26d..6fba957e 100644 --- a/src/funcs/benefitsDelete.ts +++ b/src/funcs/benefitsDelete.ts @@ -78,12 +78,17 @@ export async function benefitsDelete( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "benefits:delete", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -101,9 +106,8 @@ export async function benefitsDelete( const doResult = await client._do(req, { context, errorCodes: ["403", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/benefitsGet.ts b/src/funcs/benefitsGet.ts index a1c63ea5..a5d25a92 100644 --- a/src/funcs/benefitsGet.ts +++ b/src/funcs/benefitsGet.ts @@ -73,12 +73,17 @@ export async function benefitsGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "benefits:get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -96,9 +101,8 @@ export async function benefitsGet( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/benefitsGrants.ts b/src/funcs/benefitsGrants.ts index 6cd05151..14b3795c 100644 --- a/src/funcs/benefitsGrants.ts +++ b/src/funcs/benefitsGrants.ts @@ -91,12 +91,17 @@ export async function benefitsGrants( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "benefits:grants", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -115,9 +120,8 @@ export async function benefitsGrants( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/benefitsList.ts b/src/funcs/benefitsList.ts index 799b968e..e2eb1772 100644 --- a/src/funcs/benefitsList.ts +++ b/src/funcs/benefitsList.ts @@ -80,12 +80,17 @@ export async function benefitsList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "benefits:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -104,9 +109,8 @@ export async function benefitsList( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/benefitsUpdate.ts b/src/funcs/benefitsUpdate.ts index db549c48..0a0a89ac 100644 --- a/src/funcs/benefitsUpdate.ts +++ b/src/funcs/benefitsUpdate.ts @@ -75,12 +75,17 @@ export async function benefitsUpdate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "benefits:update", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -98,9 +103,8 @@ export async function benefitsUpdate( const doResult = await client._do(req, { context, errorCodes: ["403", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/checkoutLinksCreate.ts b/src/funcs/checkoutLinksCreate.ts index 4dec98ac..76912f9d 100644 --- a/src/funcs/checkoutLinksCreate.ts +++ b/src/funcs/checkoutLinksCreate.ts @@ -65,12 +65,17 @@ export async function checkoutLinksCreate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "checkout-links:create", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -88,9 +93,8 @@ export async function checkoutLinksCreate( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/checkoutLinksDelete.ts b/src/funcs/checkoutLinksDelete.ts index 4fa365d2..05fd635d 100644 --- a/src/funcs/checkoutLinksDelete.ts +++ b/src/funcs/checkoutLinksDelete.ts @@ -74,12 +74,17 @@ export async function checkoutLinksDelete( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "checkout-links:delete", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -97,9 +102,8 @@ export async function checkoutLinksDelete( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/checkoutLinksGet.ts b/src/funcs/checkoutLinksGet.ts index fe18b93a..65d3b56c 100644 --- a/src/funcs/checkoutLinksGet.ts +++ b/src/funcs/checkoutLinksGet.ts @@ -73,12 +73,17 @@ export async function checkoutLinksGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "checkout-links:get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -96,9 +101,8 @@ export async function checkoutLinksGet( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/checkoutLinksList.ts b/src/funcs/checkoutLinksList.ts index 079910fc..42852e79 100644 --- a/src/funcs/checkoutLinksList.ts +++ b/src/funcs/checkoutLinksList.ts @@ -81,12 +81,17 @@ export async function checkoutLinksList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "checkout-links:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -105,9 +110,8 @@ export async function checkoutLinksList( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/checkoutLinksUpdate.ts b/src/funcs/checkoutLinksUpdate.ts index fa81a0d3..b07c2407 100644 --- a/src/funcs/checkoutLinksUpdate.ts +++ b/src/funcs/checkoutLinksUpdate.ts @@ -77,12 +77,17 @@ export async function checkoutLinksUpdate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "checkout-links:update", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -100,9 +105,8 @@ export async function checkoutLinksUpdate( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/checkoutsCreate.ts b/src/funcs/checkoutsCreate.ts index 4e75fd9e..a5f490d0 100644 --- a/src/funcs/checkoutsCreate.ts +++ b/src/funcs/checkoutsCreate.ts @@ -70,12 +70,17 @@ export async function checkoutsCreate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "checkouts:create", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -93,9 +98,8 @@ export async function checkoutsCreate( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/checkoutsCustomClientConfirm.ts b/src/funcs/checkoutsCustomClientConfirm.ts index 077a6c81..a04c050d 100644 --- a/src/funcs/checkoutsCustomClientConfirm.ts +++ b/src/funcs/checkoutsCustomClientConfirm.ts @@ -83,12 +83,17 @@ export async function checkoutsCustomClientConfirm( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "checkouts:custom:client_confirm", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -106,9 +111,8 @@ export async function checkoutsCustomClientConfirm( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/checkoutsCustomClientGet.ts b/src/funcs/checkoutsCustomClientGet.ts index 682e0395..835f5d80 100644 --- a/src/funcs/checkoutsCustomClientGet.ts +++ b/src/funcs/checkoutsCustomClientGet.ts @@ -76,12 +76,17 @@ export async function checkoutsCustomClientGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "checkouts:custom:client_get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -99,9 +104,8 @@ export async function checkoutsCustomClientGet( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/checkoutsCustomClientUpdate.ts b/src/funcs/checkoutsCustomClientUpdate.ts index ef0c470b..92a8b5a1 100644 --- a/src/funcs/checkoutsCustomClientUpdate.ts +++ b/src/funcs/checkoutsCustomClientUpdate.ts @@ -79,12 +79,17 @@ export async function checkoutsCustomClientUpdate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "checkouts:custom:client_update", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -102,9 +107,8 @@ export async function checkoutsCustomClientUpdate( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/checkoutsCustomCreate.ts b/src/funcs/checkoutsCustomCreate.ts index 66611538..92feeb18 100644 --- a/src/funcs/checkoutsCustomCreate.ts +++ b/src/funcs/checkoutsCustomCreate.ts @@ -66,12 +66,17 @@ export async function checkoutsCustomCreate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "checkouts:custom:create", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -89,9 +94,8 @@ export async function checkoutsCustomCreate( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/checkoutsCustomGet.ts b/src/funcs/checkoutsCustomGet.ts index 9cba4835..f3b2c912 100644 --- a/src/funcs/checkoutsCustomGet.ts +++ b/src/funcs/checkoutsCustomGet.ts @@ -73,12 +73,17 @@ export async function checkoutsCustomGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "checkouts:custom:get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -96,9 +101,8 @@ export async function checkoutsCustomGet( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/checkoutsCustomList.ts b/src/funcs/checkoutsCustomList.ts index d88d19c2..e741359e 100644 --- a/src/funcs/checkoutsCustomList.ts +++ b/src/funcs/checkoutsCustomList.ts @@ -82,12 +82,17 @@ export async function checkoutsCustomList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "checkouts:custom:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -106,9 +111,8 @@ export async function checkoutsCustomList( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/checkoutsCustomUpdate.ts b/src/funcs/checkoutsCustomUpdate.ts index bf547ffa..46fee19b 100644 --- a/src/funcs/checkoutsCustomUpdate.ts +++ b/src/funcs/checkoutsCustomUpdate.ts @@ -75,12 +75,17 @@ export async function checkoutsCustomUpdate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "checkouts:custom:update", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -98,9 +103,8 @@ export async function checkoutsCustomUpdate( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/checkoutsGet.ts b/src/funcs/checkoutsGet.ts index 1e87ade8..72390afb 100644 --- a/src/funcs/checkoutsGet.ts +++ b/src/funcs/checkoutsGet.ts @@ -74,12 +74,17 @@ export async function checkoutsGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "checkouts:get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -97,9 +102,8 @@ export async function checkoutsGet( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/customFieldsCreate.ts b/src/funcs/customFieldsCreate.ts new file mode 100644 index 00000000..a14826ee --- /dev/null +++ b/src/funcs/customFieldsCreate.ts @@ -0,0 +1,128 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PolarCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKError } from "../models/errors/sdkerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { Result } from "../types/fp.js"; + +/** + * Create Custom Field + * + * @remarks + * Create a custom field. + */ +export async function customFieldsCreate( + client: PolarCore, + request: components.CustomFieldCreate, + options?: RequestOptions, +): Promise< + Result< + components.CustomField, + | errors.HTTPValidationError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => components.CustomFieldCreate$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/custom-fields/")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.accessToken); + const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "custom-fields:create", + oAuth2Scopes: [], + securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["422", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.CustomField, + | errors.HTTPValidationError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.CustomField$inboundSchema), + M.jsonErr(422, errors.HTTPValidationError$inboundSchema), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/customFieldsDelete.ts b/src/funcs/customFieldsDelete.ts new file mode 100644 index 00000000..490fefbf --- /dev/null +++ b/src/funcs/customFieldsDelete.ts @@ -0,0 +1,138 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { PolarCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKError } from "../models/errors/sdkerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete Custom Field + * + * @remarks + * Delete a custom field. + */ +export async function customFieldsDelete( + client: PolarCore, + request: operations.CustomFieldsDeleteRequest, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.ResourceNotFound + | errors.HTTPValidationError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => operations.CustomFieldsDeleteRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/custom-fields/{id}")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.accessToken); + const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "custom-fields:delete", + oAuth2Scopes: [], + securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "422", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.ResourceNotFound + | errors.HTTPValidationError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.jsonErr(404, errors.ResourceNotFound$inboundSchema), + M.jsonErr(422, errors.HTTPValidationError$inboundSchema), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/customFieldsGet.ts b/src/funcs/customFieldsGet.ts new file mode 100644 index 00000000..08fbcdb8 --- /dev/null +++ b/src/funcs/customFieldsGet.ts @@ -0,0 +1,138 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PolarCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKError } from "../models/errors/sdkerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Get Custom Field + * + * @remarks + * Get a custom field by ID. + */ +export async function customFieldsGet( + client: PolarCore, + request: operations.CustomFieldsGetRequest, + options?: RequestOptions, +): Promise< + Result< + components.CustomField, + | errors.ResourceNotFound + | errors.HTTPValidationError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => operations.CustomFieldsGetRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/custom-fields/{id}")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.accessToken); + const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "custom-fields:get", + oAuth2Scopes: [], + securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "422", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.CustomField, + | errors.ResourceNotFound + | errors.HTTPValidationError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.CustomField$inboundSchema), + M.jsonErr(404, errors.ResourceNotFound$inboundSchema), + M.jsonErr(422, errors.HTTPValidationError$inboundSchema), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/customFieldsList.ts b/src/funcs/customFieldsList.ts new file mode 100644 index 00000000..6caaaa78 --- /dev/null +++ b/src/funcs/customFieldsList.ts @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PolarCore } from "../core.js"; +import { dlv } from "../lib/dlv.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKError } from "../models/errors/sdkerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; + +/** + * List Custom Fields + * + * @remarks + * List custom fields. + */ +export async function customFieldsList( + client: PolarCore, + request: operations.CustomFieldsListRequest, + options?: RequestOptions, +): Promise< + PageIterator< + Result< + operations.CustomFieldsListResponse, + | errors.HTTPValidationError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > +> { + const parsed = safeParse( + request, + (value) => operations.CustomFieldsListRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return haltIterator(parsed); + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/custom-fields/")(); + + const query = encodeFormQuery({ + "limit": payload.limit, + "organization_id": payload.organization_id, + "page": payload.page, + "query": payload.query, + "sorting": payload.sorting, + "type": payload.type_filter, + }); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.accessToken); + const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "custom-fields:list", + oAuth2Scopes: [], + securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["422", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result, raw] = await M.match< + operations.CustomFieldsListResponse, + | errors.HTTPValidationError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.CustomFieldsListResponse$inboundSchema, { + key: "Result", + }), + M.jsonErr(422, errors.HTTPValidationError$inboundSchema), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return haltIterator(result); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.CustomFieldsListResponse, + | errors.HTTPValidationError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const page = request?.page || 0; + const nextPage = page + 1; + const numPages = dlv(responseData, "pagination.max_page"); + if (numPages == null || numPages <= page) { + return () => null; + } + + if (!responseData) { + return () => null; + } + const results = dlv(responseData, "items"); + if (!Array.isArray(results) || !results.length) { + return () => null; + } + const limit = request?.limit || 0; + if (results.length < limit) { + return () => null; + } + + return () => + customFieldsList( + client, + { + ...request, + page: nextPage, + }, + options, + ); + }; + + const page = { ...result, next: nextFunc(raw) }; + return { ...page, ...createPageIterator(page, (v) => !v.ok) }; +} diff --git a/src/funcs/customFieldsUpdate.ts b/src/funcs/customFieldsUpdate.ts new file mode 100644 index 00000000..d8d3ec43 --- /dev/null +++ b/src/funcs/customFieldsUpdate.ts @@ -0,0 +1,139 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PolarCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKError } from "../models/errors/sdkerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Update Custom Field + * + * @remarks + * Update a custom field. + */ +export async function customFieldsUpdate( + client: PolarCore, + request: operations.CustomFieldsUpdateRequest, + options?: RequestOptions, +): Promise< + Result< + components.CustomField, + | errors.ResourceNotFound + | errors.HTTPValidationError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => operations.CustomFieldsUpdateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.CustomFieldUpdate, { explode: true }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/custom-fields/{id}")(pathParams); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.accessToken); + const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "custom-fields:update", + oAuth2Scopes: [], + securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "422", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.CustomField, + | errors.ResourceNotFound + | errors.HTTPValidationError + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.CustomField$inboundSchema), + M.jsonErr(404, errors.ResourceNotFound$inboundSchema), + M.jsonErr(422, errors.HTTPValidationError$inboundSchema), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/externalOrganizationsList.ts b/src/funcs/externalOrganizationsList.ts index af65b796..536b621e 100644 --- a/src/funcs/externalOrganizationsList.ts +++ b/src/funcs/externalOrganizationsList.ts @@ -83,12 +83,17 @@ export async function externalOrganizationsList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "external_organizations:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -107,9 +112,8 @@ export async function externalOrganizationsList( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/filesCreate.ts b/src/funcs/filesCreate.ts index 893be8a7..62e6e9d5 100644 --- a/src/funcs/filesCreate.ts +++ b/src/funcs/filesCreate.ts @@ -66,12 +66,17 @@ export async function filesCreate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "files:create", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -89,9 +94,8 @@ export async function filesCreate( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/filesDelete.ts b/src/funcs/filesDelete.ts index 0343985f..4d6cf22c 100644 --- a/src/funcs/filesDelete.ts +++ b/src/funcs/filesDelete.ts @@ -74,12 +74,17 @@ export async function filesDelete( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "files:delete", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -97,9 +102,8 @@ export async function filesDelete( const doResult = await client._do(req, { context, errorCodes: ["403", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/filesList.ts b/src/funcs/filesList.ts index 4161b884..36a36bc6 100644 --- a/src/funcs/filesList.ts +++ b/src/funcs/filesList.ts @@ -80,12 +80,17 @@ export async function filesList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "files:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -104,9 +109,8 @@ export async function filesList( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/filesUpdate.ts b/src/funcs/filesUpdate.ts index 6e8fd4d3..cceac979 100644 --- a/src/funcs/filesUpdate.ts +++ b/src/funcs/filesUpdate.ts @@ -72,12 +72,17 @@ export async function filesUpdate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "files:update", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -95,9 +100,8 @@ export async function filesUpdate( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/filesUploaded.ts b/src/funcs/filesUploaded.ts index 545785f4..40ca57f7 100644 --- a/src/funcs/filesUploaded.ts +++ b/src/funcs/filesUploaded.ts @@ -74,12 +74,17 @@ export async function filesUploaded( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "files:uploaded", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -97,9 +102,8 @@ export async function filesUploaded( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/licenseKeysGet.ts b/src/funcs/licenseKeysGet.ts index 2c0501fd..6f63b728 100644 --- a/src/funcs/licenseKeysGet.ts +++ b/src/funcs/licenseKeysGet.ts @@ -74,12 +74,17 @@ export async function licenseKeysGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "license_keys:get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -97,9 +102,8 @@ export async function licenseKeysGet( const doResult = await client._do(req, { context, errorCodes: ["401", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/licenseKeysGetActivation.ts b/src/funcs/licenseKeysGetActivation.ts index 7c4e3282..0e3c3d28 100644 --- a/src/funcs/licenseKeysGetActivation.ts +++ b/src/funcs/licenseKeysGetActivation.ts @@ -81,12 +81,17 @@ export async function licenseKeysGetActivation( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "license_keys:get_activation", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -104,9 +109,8 @@ export async function licenseKeysGetActivation( const doResult = await client._do(req, { context, errorCodes: ["401", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/licenseKeysList.ts b/src/funcs/licenseKeysList.ts index 0ed059da..c5c72e69 100644 --- a/src/funcs/licenseKeysList.ts +++ b/src/funcs/licenseKeysList.ts @@ -81,12 +81,17 @@ export async function licenseKeysList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "license_keys:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -105,9 +110,8 @@ export async function licenseKeysList( const doResult = await client._do(req, { context, errorCodes: ["401", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/licenseKeysUpdate.ts b/src/funcs/licenseKeysUpdate.ts index b074f12a..adfc9241 100644 --- a/src/funcs/licenseKeysUpdate.ts +++ b/src/funcs/licenseKeysUpdate.ts @@ -75,12 +75,17 @@ export async function licenseKeysUpdate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "license_keys:update", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -98,9 +103,8 @@ export async function licenseKeysUpdate( const doResult = await client._do(req, { context, errorCodes: ["401", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/metricsGet.ts b/src/funcs/metricsGet.ts index 18b1db1d..4b216aa6 100644 --- a/src/funcs/metricsGet.ts +++ b/src/funcs/metricsGet.ts @@ -74,12 +74,17 @@ export async function metricsGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "metrics:get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -98,9 +103,8 @@ export async function metricsGet( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/metricsLimits.ts b/src/funcs/metricsLimits.ts index ac17ec45..add465de 100644 --- a/src/funcs/metricsLimits.ts +++ b/src/funcs/metricsLimits.ts @@ -48,12 +48,17 @@ export async function metricsLimits( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "metrics:limits", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -70,9 +75,8 @@ export async function metricsLimits( const doResult = await client._do(req, { context, errorCodes: ["4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/oauth2ClientsCreate.ts b/src/funcs/oauth2ClientsCreate.ts index 8f2cb0c2..2531ac01 100644 --- a/src/funcs/oauth2ClientsCreate.ts +++ b/src/funcs/oauth2ClientsCreate.ts @@ -66,12 +66,17 @@ export async function oauth2ClientsCreate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "oauth2:clients:oauth2:create_client", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -89,9 +94,8 @@ export async function oauth2ClientsCreate( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/oauth2ClientsDelete.ts b/src/funcs/oauth2ClientsDelete.ts index 3aba50da..d3215270 100644 --- a/src/funcs/oauth2ClientsDelete.ts +++ b/src/funcs/oauth2ClientsDelete.ts @@ -75,12 +75,17 @@ export async function oauth2ClientsDelete( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "oauth2:clients:oauth2:delete_client", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -98,9 +103,8 @@ export async function oauth2ClientsDelete( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/oauth2ClientsGet.ts b/src/funcs/oauth2ClientsGet.ts index 950826ec..92118c9d 100644 --- a/src/funcs/oauth2ClientsGet.ts +++ b/src/funcs/oauth2ClientsGet.ts @@ -75,12 +75,17 @@ export async function oauth2ClientsGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "oauth2:clients:oauth2:get_client", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -98,9 +103,8 @@ export async function oauth2ClientsGet( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/oauth2ClientsList.ts b/src/funcs/oauth2ClientsList.ts index a3364967..11984166 100644 --- a/src/funcs/oauth2ClientsList.ts +++ b/src/funcs/oauth2ClientsList.ts @@ -78,12 +78,17 @@ export async function oauth2ClientsList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "oauth2:clients:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -102,9 +107,8 @@ export async function oauth2ClientsList( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/oauth2ClientsUpdate.ts b/src/funcs/oauth2ClientsUpdate.ts index 05e267cd..564dc2ef 100644 --- a/src/funcs/oauth2ClientsUpdate.ts +++ b/src/funcs/oauth2ClientsUpdate.ts @@ -78,12 +78,17 @@ export async function oauth2ClientsUpdate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "oauth2:clients:oauth2:update_client", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -101,9 +106,8 @@ export async function oauth2ClientsUpdate( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/oauth2Introspect.ts b/src/funcs/oauth2Introspect.ts index b3be1a9a..d37eebef 100644 --- a/src/funcs/oauth2Introspect.ts +++ b/src/funcs/oauth2Introspect.ts @@ -69,12 +69,17 @@ export async function oauth2Introspect( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "oauth2:introspect_token", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -92,9 +97,8 @@ export async function oauth2Introspect( const doResult = await client._do(req, { context, errorCodes: ["4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/oauth2Revoke.ts b/src/funcs/oauth2Revoke.ts index 8cf00169..24b83a55 100644 --- a/src/funcs/oauth2Revoke.ts +++ b/src/funcs/oauth2Revoke.ts @@ -70,12 +70,17 @@ export async function oauth2Revoke( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "oauth2:revoke_token", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -93,9 +98,8 @@ export async function oauth2Revoke( const doResult = await client._do(req, { context, errorCodes: ["4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/oauth2Token.ts b/src/funcs/oauth2Token.ts index 65bc4d6d..a17dcd48 100644 --- a/src/funcs/oauth2Token.ts +++ b/src/funcs/oauth2Token.ts @@ -68,12 +68,17 @@ export async function oauth2Token( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "oauth2:request_token", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -91,9 +96,8 @@ export async function oauth2Token( const doResult = await client._do(req, { context, errorCodes: ["4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/oauth2Userinfo.ts b/src/funcs/oauth2Userinfo.ts index 9a61d223..3e0bea9d 100644 --- a/src/funcs/oauth2Userinfo.ts +++ b/src/funcs/oauth2Userinfo.ts @@ -48,12 +48,17 @@ export async function oauth2Userinfo( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "oauth2:userinfo", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -70,9 +75,8 @@ export async function oauth2Userinfo( const doResult = await client._do(req, { context, errorCodes: ["4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/ordersGet.ts b/src/funcs/ordersGet.ts index 3c9791c8..9cedeb35 100644 --- a/src/funcs/ordersGet.ts +++ b/src/funcs/ordersGet.ts @@ -73,12 +73,17 @@ export async function ordersGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "orders:get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -96,9 +101,8 @@ export async function ordersGet( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/ordersInvoice.ts b/src/funcs/ordersInvoice.ts index c902cb2a..2555d800 100644 --- a/src/funcs/ordersInvoice.ts +++ b/src/funcs/ordersInvoice.ts @@ -73,12 +73,17 @@ export async function ordersInvoice( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "orders:invoice", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -96,9 +101,8 @@ export async function ordersInvoice( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/ordersList.ts b/src/funcs/ordersList.ts index 9107e0f5..7fb8c09c 100644 --- a/src/funcs/ordersList.ts +++ b/src/funcs/ordersList.ts @@ -83,12 +83,17 @@ export async function ordersList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "orders:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -107,9 +112,8 @@ export async function ordersList( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/organizationsCreate.ts b/src/funcs/organizationsCreate.ts index 0e701bb8..cc0086bc 100644 --- a/src/funcs/organizationsCreate.ts +++ b/src/funcs/organizationsCreate.ts @@ -65,12 +65,17 @@ export async function organizationsCreate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "organizations:create", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -88,9 +93,8 @@ export async function organizationsCreate( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/organizationsGet.ts b/src/funcs/organizationsGet.ts index 802cd994..dd2e78cc 100644 --- a/src/funcs/organizationsGet.ts +++ b/src/funcs/organizationsGet.ts @@ -73,12 +73,17 @@ export async function organizationsGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "organizations:get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -96,9 +101,8 @@ export async function organizationsGet( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/organizationsList.ts b/src/funcs/organizationsList.ts index 8a0d3997..342bd2dd 100644 --- a/src/funcs/organizationsList.ts +++ b/src/funcs/organizationsList.ts @@ -68,7 +68,6 @@ export async function organizationsList( const path = pathToFunc("/v1/organizations/")(); const query = encodeFormQuery({ - "is_member": payload.is_member, "limit": payload.limit, "page": payload.page, "slug": payload.slug, @@ -81,12 +80,17 @@ export async function organizationsList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "organizations:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -105,9 +109,8 @@ export async function organizationsList( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/organizationsUpdate.ts b/src/funcs/organizationsUpdate.ts index 37a160b7..1ed51de5 100644 --- a/src/funcs/organizationsUpdate.ts +++ b/src/funcs/organizationsUpdate.ts @@ -78,12 +78,17 @@ export async function organizationsUpdate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "organizations:update", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -101,9 +106,8 @@ export async function organizationsUpdate( const doResult = await client._do(req, { context, errorCodes: ["403", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/productsCreate.ts b/src/funcs/productsCreate.ts index ce907aea..15891c9d 100644 --- a/src/funcs/productsCreate.ts +++ b/src/funcs/productsCreate.ts @@ -67,12 +67,17 @@ export async function productsCreate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "products:create", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -90,9 +95,8 @@ export async function productsCreate( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/productsGet.ts b/src/funcs/productsGet.ts index 65d61fd8..8a2121b4 100644 --- a/src/funcs/productsGet.ts +++ b/src/funcs/productsGet.ts @@ -73,12 +73,17 @@ export async function productsGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "products:get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -96,9 +101,8 @@ export async function productsGet( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/productsList.ts b/src/funcs/productsList.ts index 0f37b63e..7de3de0b 100644 --- a/src/funcs/productsList.ts +++ b/src/funcs/productsList.ts @@ -84,12 +84,17 @@ export async function productsList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "products:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -108,9 +113,8 @@ export async function productsList( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/productsUpdate.ts b/src/funcs/productsUpdate.ts index 898a1bb0..34c06e21 100644 --- a/src/funcs/productsUpdate.ts +++ b/src/funcs/productsUpdate.ts @@ -75,12 +75,17 @@ export async function productsUpdate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "products:update", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -98,9 +103,8 @@ export async function productsUpdate( const doResult = await client._do(req, { context, errorCodes: ["403", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/productsUpdateBenefits.ts b/src/funcs/productsUpdateBenefits.ts index 9832d44c..a8c72e19 100644 --- a/src/funcs/productsUpdateBenefits.ts +++ b/src/funcs/productsUpdateBenefits.ts @@ -78,12 +78,17 @@ export async function productsUpdateBenefits( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "products:update_benefits", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -101,9 +106,8 @@ export async function productsUpdateBenefits( const doResult = await client._do(req, { context, errorCodes: ["403", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/repositoriesGet.ts b/src/funcs/repositoriesGet.ts index 9419e28c..458df46a 100644 --- a/src/funcs/repositoriesGet.ts +++ b/src/funcs/repositoriesGet.ts @@ -73,12 +73,17 @@ export async function repositoriesGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "repositories:get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -96,9 +101,8 @@ export async function repositoriesGet( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/repositoriesList.ts b/src/funcs/repositoriesList.ts index 517551da..66f140c8 100644 --- a/src/funcs/repositoriesList.ts +++ b/src/funcs/repositoriesList.ts @@ -84,12 +84,17 @@ export async function repositoriesList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "repositories:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -108,9 +113,8 @@ export async function repositoriesList( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/repositoriesUpdate.ts b/src/funcs/repositoriesUpdate.ts index 777ef077..adacf0f0 100644 --- a/src/funcs/repositoriesUpdate.ts +++ b/src/funcs/repositoriesUpdate.ts @@ -75,12 +75,17 @@ export async function repositoriesUpdate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "repositories:update", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -98,9 +103,8 @@ export async function repositoriesUpdate( const doResult = await client._do(req, { context, errorCodes: ["403", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/subscriptionsExport.ts b/src/funcs/subscriptionsExport.ts index 332ea31f..075941a7 100644 --- a/src/funcs/subscriptionsExport.ts +++ b/src/funcs/subscriptionsExport.ts @@ -70,12 +70,17 @@ export async function subscriptionsExport( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "subscriptions:export", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -94,9 +99,8 @@ export async function subscriptionsExport( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/subscriptionsList.ts b/src/funcs/subscriptionsList.ts index 233c2a73..08b70028 100644 --- a/src/funcs/subscriptionsList.ts +++ b/src/funcs/subscriptionsList.ts @@ -82,12 +82,17 @@ export async function subscriptionsList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "subscriptions:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -106,9 +111,8 @@ export async function subscriptionsList( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/usersAdvertisementsCreate.ts b/src/funcs/usersAdvertisementsCreate.ts index 145f089b..ae1b3b39 100644 --- a/src/funcs/usersAdvertisementsCreate.ts +++ b/src/funcs/usersAdvertisementsCreate.ts @@ -66,12 +66,17 @@ export async function usersAdvertisementsCreate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:advertisements:create", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -89,9 +94,8 @@ export async function usersAdvertisementsCreate( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/usersAdvertisementsDelete.ts b/src/funcs/usersAdvertisementsDelete.ts index e1ae76dd..2b0cab22 100644 --- a/src/funcs/usersAdvertisementsDelete.ts +++ b/src/funcs/usersAdvertisementsDelete.ts @@ -76,12 +76,17 @@ export async function usersAdvertisementsDelete( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:advertisements:delete", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -99,9 +104,8 @@ export async function usersAdvertisementsDelete( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/usersAdvertisementsEnable.ts b/src/funcs/usersAdvertisementsEnable.ts index 421b53c0..981d2c4d 100644 --- a/src/funcs/usersAdvertisementsEnable.ts +++ b/src/funcs/usersAdvertisementsEnable.ts @@ -77,12 +77,17 @@ export async function usersAdvertisementsEnable( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:advertisements:enable", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -100,9 +105,8 @@ export async function usersAdvertisementsEnable( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/usersAdvertisementsGet.ts b/src/funcs/usersAdvertisementsGet.ts index 58aef510..cf5a370c 100644 --- a/src/funcs/usersAdvertisementsGet.ts +++ b/src/funcs/usersAdvertisementsGet.ts @@ -74,12 +74,17 @@ export async function usersAdvertisementsGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:advertisements:get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -97,9 +102,8 @@ export async function usersAdvertisementsGet( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/usersAdvertisementsList.ts b/src/funcs/usersAdvertisementsList.ts index 1032aa0b..180ee5d1 100644 --- a/src/funcs/usersAdvertisementsList.ts +++ b/src/funcs/usersAdvertisementsList.ts @@ -80,12 +80,17 @@ export async function usersAdvertisementsList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:advertisements:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -104,9 +109,8 @@ export async function usersAdvertisementsList( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/usersAdvertisementsUpdate.ts b/src/funcs/usersAdvertisementsUpdate.ts index d207c54e..099b1bfe 100644 --- a/src/funcs/usersAdvertisementsUpdate.ts +++ b/src/funcs/usersAdvertisementsUpdate.ts @@ -77,12 +77,17 @@ export async function usersAdvertisementsUpdate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:advertisements:update", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -100,9 +105,8 @@ export async function usersAdvertisementsUpdate( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/usersBenefitsGet.ts b/src/funcs/usersBenefitsGet.ts index 454209d3..89033c6e 100644 --- a/src/funcs/usersBenefitsGet.ts +++ b/src/funcs/usersBenefitsGet.ts @@ -72,12 +72,17 @@ export async function usersBenefitsGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:benefits:get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -95,9 +100,8 @@ export async function usersBenefitsGet( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/usersBenefitsList.ts b/src/funcs/usersBenefitsList.ts index bacbc529..f1c75ff0 100644 --- a/src/funcs/usersBenefitsList.ts +++ b/src/funcs/usersBenefitsList.ts @@ -83,12 +83,17 @@ export async function usersBenefitsList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:benefits:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -107,9 +112,8 @@ export async function usersBenefitsList( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/usersDownloadablesGet.ts b/src/funcs/usersDownloadablesGet.ts index a38e5a55..061596af 100644 --- a/src/funcs/usersDownloadablesGet.ts +++ b/src/funcs/usersDownloadablesGet.ts @@ -70,12 +70,17 @@ export async function usersDownloadablesGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:downloadables:get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -93,9 +98,8 @@ export async function usersDownloadablesGet( const doResult = await client._do(req, { context, errorCodes: ["400", "404", "410", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/usersDownloadablesList.ts b/src/funcs/usersDownloadablesList.ts index dcd09a79..e929ba97 100644 --- a/src/funcs/usersDownloadablesList.ts +++ b/src/funcs/usersDownloadablesList.ts @@ -78,12 +78,17 @@ export async function usersDownloadablesList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:downloadables:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -102,9 +107,8 @@ export async function usersDownloadablesList( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/usersLicenseKeysActivate.ts b/src/funcs/usersLicenseKeysActivate.ts index c3670eae..f3f8d190 100644 --- a/src/funcs/usersLicenseKeysActivate.ts +++ b/src/funcs/usersLicenseKeysActivate.ts @@ -67,12 +67,17 @@ export async function usersLicenseKeysActivate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:license_keys:activate", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -90,9 +95,8 @@ export async function usersLicenseKeysActivate( const doResult = await client._do(req, { context, errorCodes: ["403", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/usersLicenseKeysDeactivate.ts b/src/funcs/usersLicenseKeysDeactivate.ts index 4ae58440..981bfdaf 100644 --- a/src/funcs/usersLicenseKeysDeactivate.ts +++ b/src/funcs/usersLicenseKeysDeactivate.ts @@ -67,12 +67,17 @@ export async function usersLicenseKeysDeactivate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:license_keys:deactivate", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -90,9 +95,8 @@ export async function usersLicenseKeysDeactivate( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/usersLicenseKeysGet.ts b/src/funcs/usersLicenseKeysGet.ts index 157c803f..576a5e07 100644 --- a/src/funcs/usersLicenseKeysGet.ts +++ b/src/funcs/usersLicenseKeysGet.ts @@ -75,12 +75,17 @@ export async function usersLicenseKeysGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:license_keys:get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -98,9 +103,8 @@ export async function usersLicenseKeysGet( const doResult = await client._do(req, { context, errorCodes: ["401", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/usersLicenseKeysList.ts b/src/funcs/usersLicenseKeysList.ts index 8cee99c7..a0911714 100644 --- a/src/funcs/usersLicenseKeysList.ts +++ b/src/funcs/usersLicenseKeysList.ts @@ -80,12 +80,17 @@ export async function usersLicenseKeysList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:license_keys:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -104,9 +109,8 @@ export async function usersLicenseKeysList( const doResult = await client._do(req, { context, errorCodes: ["401", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/usersLicenseKeysValidate.ts b/src/funcs/usersLicenseKeysValidate.ts index 8a13b8a1..33e01de0 100644 --- a/src/funcs/usersLicenseKeysValidate.ts +++ b/src/funcs/usersLicenseKeysValidate.ts @@ -66,12 +66,17 @@ export async function usersLicenseKeysValidate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:license_keys:validate", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -89,9 +94,8 @@ export async function usersLicenseKeysValidate( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/usersOrdersGet.ts b/src/funcs/usersOrdersGet.ts index 76fc94d4..f21b73a4 100644 --- a/src/funcs/usersOrdersGet.ts +++ b/src/funcs/usersOrdersGet.ts @@ -73,12 +73,17 @@ export async function usersOrdersGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:orders:get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -96,9 +101,8 @@ export async function usersOrdersGet( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/usersOrdersInvoice.ts b/src/funcs/usersOrdersInvoice.ts index 7eb9dd15..c194a733 100644 --- a/src/funcs/usersOrdersInvoice.ts +++ b/src/funcs/usersOrdersInvoice.ts @@ -73,12 +73,17 @@ export async function usersOrdersInvoice( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:orders:invoice", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -96,9 +101,8 @@ export async function usersOrdersInvoice( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/usersOrdersList.ts b/src/funcs/usersOrdersList.ts index 51f80a86..36be6f21 100644 --- a/src/funcs/usersOrdersList.ts +++ b/src/funcs/usersOrdersList.ts @@ -84,12 +84,17 @@ export async function usersOrdersList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:orders:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -108,9 +113,8 @@ export async function usersOrdersList( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/usersSubscriptionsCancel.ts b/src/funcs/usersSubscriptionsCancel.ts index dbec4a61..5d772ffe 100644 --- a/src/funcs/usersSubscriptionsCancel.ts +++ b/src/funcs/usersSubscriptionsCancel.ts @@ -75,12 +75,17 @@ export async function usersSubscriptionsCancel( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:subscriptions:cancel", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -98,9 +103,8 @@ export async function usersSubscriptionsCancel( const doResult = await client._do(req, { context, errorCodes: ["403", "404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/usersSubscriptionsGet.ts b/src/funcs/usersSubscriptionsGet.ts index b5b45142..1cfd370a 100644 --- a/src/funcs/usersSubscriptionsGet.ts +++ b/src/funcs/usersSubscriptionsGet.ts @@ -74,12 +74,17 @@ export async function usersSubscriptionsGet( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:subscriptions:get", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -97,9 +102,8 @@ export async function usersSubscriptionsGet( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/funcs/usersSubscriptionsList.ts b/src/funcs/usersSubscriptionsList.ts index f22bc241..5113749b 100644 --- a/src/funcs/usersSubscriptionsList.ts +++ b/src/funcs/usersSubscriptionsList.ts @@ -84,12 +84,17 @@ export async function usersSubscriptionsList( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:subscriptions:list", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -108,9 +113,8 @@ export async function usersSubscriptionsList( const doResult = await client._do(req, { context, errorCodes: ["422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return haltIterator(doResult); diff --git a/src/funcs/usersSubscriptionsUpdate.ts b/src/funcs/usersSubscriptionsUpdate.ts index c936604f..c4cbb362 100644 --- a/src/funcs/usersSubscriptionsUpdate.ts +++ b/src/funcs/usersSubscriptionsUpdate.ts @@ -77,12 +77,17 @@ export async function usersSubscriptionsUpdate( const secConfig = await extractSecurity(client._options.accessToken); const securityInput = secConfig == null ? {} : { accessToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + const context = { operationID: "users:subscriptions:update", oAuth2Scopes: [], securitySource: client._options.accessToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], }; - const requestSecurity = resolveGlobalSecurity(securityInput); const requestRes = client._createRequest(context, { security: requestSecurity, @@ -100,9 +105,8 @@ export async function usersSubscriptionsUpdate( const doResult = await client._do(req, { context, errorCodes: ["404", "422", "4XX", "5XX"], - retryConfig: options?.retries - || client._options.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, }); if (!doResult.ok) { return doResult; diff --git a/src/hooks/types.ts b/src/hooks/types.ts index 656b9e37..4079cc97 100644 --- a/src/hooks/types.ts +++ b/src/hooks/types.ts @@ -3,11 +3,13 @@ */ import { HTTPClient, RequestInput } from "../lib/http.js"; +import { RetryConfig } from "../lib/retries.js"; export type HookContext = { operationID: string; oAuth2Scopes?: string[]; securitySource?: any | (() => Promise); + retryConfig: RetryConfig; }; export type Awaitable = T | Promise; diff --git a/src/lib/config.ts b/src/lib/config.ts index e8f1d4f6..71dc6107 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -60,7 +60,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.1.0", - sdkVersion: "0.14.0", - genVersion: "2.445.1", - userAgent: "speakeasy-sdk/typescript 0.14.0 2.445.1 0.1.0 @polar-sh/sdk", + sdkVersion: "0.15.0", + genVersion: "2.451.0", + userAgent: "speakeasy-sdk/typescript 0.15.0 2.451.0 0.1.0 @polar-sh/sdk", } as const; diff --git a/src/lib/retries.ts b/src/lib/retries.ts index df3e0bc2..93ebc8de 100644 --- a/src/lib/retries.ts +++ b/src/lib/retries.ts @@ -26,23 +26,44 @@ export type RetryConfig = retryConnectionErrors?: boolean; }; -class PermanentError extends Error { - inner: unknown; +/** + * PermanentError is an error that is not recoverable. Throwing this error will + * cause a retry loop to terminate. + */ +export class PermanentError extends Error { + /** The underlying cause of the error. */ + override readonly cause: unknown; + + constructor(message: string, options?: { cause?: unknown }) { + let msg = message; + if (options?.cause) { + msg += `: ${options.cause}`; + } - constructor(inner: unknown) { - super("Permanent error"); - this.inner = inner; + super(msg, options); + this.name = "PermanentError"; + // In older runtimes, the cause field would not have been assigned through + // the super() call. + if (typeof this.cause === "undefined") { + this.cause = options?.cause; + } Object.setPrototypeOf(this, PermanentError.prototype); } } -class TemporaryError extends Error { - res: Response; +/** + * TemporaryError is an error is used to signal that an HTTP request can be + * retried as part of a retry loop. If retry attempts are exhausted and this + * error is thrown, the response will be returned to the caller. + */ +export class TemporaryError extends Error { + response: Response; - constructor(res: Response) { - super("Temporary error"); - this.res = res; + constructor(message: string, response: Response) { + super(message); + this.response = response; + this.name = "TemporaryError"; Object.setPrototypeOf(this, TemporaryError.prototype); } @@ -80,11 +101,14 @@ function wrapFetcher( try { const res = await fn(); if (isRetryableResponse(res, options.statusCodes)) { - throw new TemporaryError(res); + throw new TemporaryError( + "Response failed with retryable status code", + res, + ); } return res; - } catch (err) { + } catch (err: unknown) { if (err instanceof TemporaryError) { throw err; } @@ -96,7 +120,7 @@ function wrapFetcher( throw err; } - throw new PermanentError(err); + throw new PermanentError("Permanent error", { cause: err }); } }; } @@ -139,37 +163,25 @@ async function retryBackoff( try { const res = await fn(); return res; - } catch (err) { + } catch (err: unknown) { if (err instanceof PermanentError) { - throw err.inner; + throw err.cause; } const elapsed = Date.now() - start; if (elapsed > maxElapsedTime) { if (err instanceof TemporaryError) { - return err.res; + return err.response; } throw err; } let retryInterval = 0; - if (err instanceof TemporaryError && err.res && err.res.headers) { - const retryVal = err.res.headers.get("retry-after") || ""; - if (retryVal != "") { - const parsedNumber = Number(retryVal); - if (!isNaN(parsedNumber) && Number.isInteger(parsedNumber)) { - retryInterval = parsedNumber * 1000; - } else { - const parsedDate = Date.parse(retryVal); - if (!isNaN(parsedDate)) { - const deltaMS = parsedDate - Date.now(); - retryInterval = deltaMS > 0 ? Math.ceil(deltaMS) : 0; - } - } - } + if (err instanceof TemporaryError) { + retryInterval = retryIntervalFromResponse(err.response); } - if (retryInterval == 0) { + if (retryInterval <= 0) { retryInterval = initialInterval * Math.pow(x, exponent) + Math.random() * 1000; } @@ -182,6 +194,26 @@ async function retryBackoff( } } +function retryIntervalFromResponse(res: Response): number { + const retryVal = res.headers.get("retry-after") || ""; + if (!retryVal) { + return 0; + } + + const parsedNumber = Number(retryVal); + if (Number.isInteger(parsedNumber)) { + return parsedNumber * 1000; + } + + const parsedDate = Date.parse(retryVal); + if (Number.isInteger(parsedDate)) { + const deltaMS = parsedDate - Date.now(); + return deltaMS > 0 ? Math.ceil(deltaMS) : 0; + } + + return 0; +} + async function delay(delay: number): Promise { return new Promise((resolve) => setTimeout(resolve, delay)); } diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index 99056f43..ac03fe11 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -224,8 +224,8 @@ export class ClientSDK { options: { context: HookContext; errorCodes: number | string | (number | string)[]; - retryConfig?: RetryConfig | undefined; - retryCodes?: string[] | undefined; + retryConfig: RetryConfig; + retryCodes: string[]; }, ): Promise< Result< @@ -237,8 +237,6 @@ export class ClientSDK { > > { const { context, errorCodes } = options; - const retryConfig = options.retryConfig || { strategy: "none" }; - const retryCodes = options.retryCodes || []; return retry( async () => { @@ -249,22 +247,28 @@ export class ClientSDK { let response = await this.#httpClient.request(req); - if (matchStatusCode(response, errorCodes)) { - const result = await this.#hooks.afterError(context, response, null); - if (result.error) { - throw result.error; + try { + if (matchStatusCode(response, errorCodes)) { + const result = await this.#hooks.afterError( + context, + response, + null, + ); + if (result.error) { + throw result.error; + } + response = result.response || response; + } else { + response = await this.#hooks.afterSuccess(context, response); } - response = result.response || response; - } else { - response = await this.#hooks.afterSuccess(context, response); + } finally { + await logResponse(this.#logger, response, req) + .catch(e => this.#logger?.log("Failed to log response:", e)); } - await logResponse(this.#logger, response, req) - .catch(e => this.#logger?.log("Failed to log response:", e)); - return response; }, - { config: retryConfig, statusCodes: retryCodes }, + { config: options.retryConfig, statusCodes: options.retryCodes }, ).then( (r) => OK(r), (err) => { diff --git a/src/models/components/attachedcustomfield.ts b/src/models/components/attachedcustomfield.ts new file mode 100644 index 00000000..2fb5df8f --- /dev/null +++ b/src/models/components/attachedcustomfield.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { + CustomField, + CustomField$inboundSchema, + CustomField$Outbound, + CustomField$outboundSchema, +} from "./customfield.js"; + +/** + * Schema of a custom field attached to a resource. + */ +export type AttachedCustomField = { + /** + * ID of the custom field. + */ + customFieldId: string; + customField: CustomField; + /** + * Order of the custom field in the resource. + */ + order: number; + /** + * Whether the value is required for this custom field. + */ + required: boolean; +}; + +/** @internal */ +export const AttachedCustomField$inboundSchema: z.ZodType< + AttachedCustomField, + z.ZodTypeDef, + unknown +> = z.object({ + custom_field_id: z.string(), + custom_field: CustomField$inboundSchema, + order: z.number().int(), + required: z.boolean(), +}).transform((v) => { + return remap$(v, { + "custom_field_id": "customFieldId", + "custom_field": "customField", + }); +}); + +/** @internal */ +export type AttachedCustomField$Outbound = { + custom_field_id: string; + custom_field: CustomField$Outbound; + order: number; + required: boolean; +}; + +/** @internal */ +export const AttachedCustomField$outboundSchema: z.ZodType< + AttachedCustomField$Outbound, + z.ZodTypeDef, + AttachedCustomField +> = z.object({ + customFieldId: z.string(), + customField: CustomField$outboundSchema, + order: z.number().int(), + required: z.boolean(), +}).transform((v) => { + return remap$(v, { + customFieldId: "custom_field_id", + customField: "custom_field", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AttachedCustomField$ { + /** @deprecated use `AttachedCustomField$inboundSchema` instead. */ + export const inboundSchema = AttachedCustomField$inboundSchema; + /** @deprecated use `AttachedCustomField$outboundSchema` instead. */ + export const outboundSchema = AttachedCustomField$outboundSchema; + /** @deprecated use `AttachedCustomField$Outbound` instead. */ + export type Outbound = AttachedCustomField$Outbound; +} diff --git a/src/models/components/attachedcustomfieldcreate.ts b/src/models/components/attachedcustomfieldcreate.ts new file mode 100644 index 00000000..9cf9d93c --- /dev/null +++ b/src/models/components/attachedcustomfieldcreate.ts @@ -0,0 +1,67 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; + +/** + * Schema to attach a custom field to a resource. + */ +export type AttachedCustomFieldCreate = { + /** + * ID of the custom field to attach. + */ + customFieldId: string; + /** + * Whether the value is required for this custom field. + */ + required: boolean; +}; + +/** @internal */ +export const AttachedCustomFieldCreate$inboundSchema: z.ZodType< + AttachedCustomFieldCreate, + z.ZodTypeDef, + unknown +> = z.object({ + custom_field_id: z.string(), + required: z.boolean(), +}).transform((v) => { + return remap$(v, { + "custom_field_id": "customFieldId", + }); +}); + +/** @internal */ +export type AttachedCustomFieldCreate$Outbound = { + custom_field_id: string; + required: boolean; +}; + +/** @internal */ +export const AttachedCustomFieldCreate$outboundSchema: z.ZodType< + AttachedCustomFieldCreate$Outbound, + z.ZodTypeDef, + AttachedCustomFieldCreate +> = z.object({ + customFieldId: z.string(), + required: z.boolean(), +}).transform((v) => { + return remap$(v, { + customFieldId: "custom_field_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AttachedCustomFieldCreate$ { + /** @deprecated use `AttachedCustomFieldCreate$inboundSchema` instead. */ + export const inboundSchema = AttachedCustomFieldCreate$inboundSchema; + /** @deprecated use `AttachedCustomFieldCreate$outboundSchema` instead. */ + export const outboundSchema = AttachedCustomFieldCreate$outboundSchema; + /** @deprecated use `AttachedCustomFieldCreate$Outbound` instead. */ + export type Outbound = AttachedCustomFieldCreate$Outbound; +} diff --git a/src/models/components/benefitadssubscriber.ts b/src/models/components/benefitadssubscriber.ts index ddd716be..9262511d 100644 --- a/src/models/components/benefitadssubscriber.ts +++ b/src/models/components/benefitadssubscriber.ts @@ -17,6 +17,12 @@ import { BenefitGrantAds$Outbound, BenefitGrantAds$outboundSchema, } from "./benefitgrantads.js"; +import { + Organization, + Organization$inboundSchema, + Organization$Outbound, + Organization$outboundSchema, +} from "./organization.js"; export const BenefitAdsSubscriberType = { Ads: "ads", @@ -55,11 +61,12 @@ export type BenefitAdsSubscriber = { * The ID of the organization owning the benefit. */ organizationId: string; + grants: Array; + organization: Organization; /** * Properties for a benefit of type `ads`. */ properties: BenefitAdsProperties; - grants: Array; }; /** @internal */ @@ -99,8 +106,9 @@ export const BenefitAdsSubscriber$inboundSchema: z.ZodType< selectable: z.boolean(), deletable: z.boolean(), organization_id: z.string(), - properties: BenefitAdsProperties$inboundSchema, grants: z.array(BenefitGrantAds$inboundSchema), + organization: Organization$inboundSchema, + properties: BenefitAdsProperties$inboundSchema, }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -119,8 +127,9 @@ export type BenefitAdsSubscriber$Outbound = { selectable: boolean; deletable: boolean; organization_id: string; - properties: BenefitAdsProperties$Outbound; grants: Array; + organization: Organization$Outbound; + properties: BenefitAdsProperties$Outbound; }; /** @internal */ @@ -137,8 +146,9 @@ export const BenefitAdsSubscriber$outboundSchema: z.ZodType< selectable: z.boolean(), deletable: z.boolean(), organizationId: z.string(), - properties: BenefitAdsProperties$outboundSchema, grants: z.array(BenefitGrantAds$outboundSchema), + organization: Organization$outboundSchema, + properties: BenefitAdsProperties$outboundSchema, }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/benefitarticlessubscriber.ts b/src/models/components/benefitarticlessubscriber.ts index eae5dcc8..97692001 100644 --- a/src/models/components/benefitarticlessubscriber.ts +++ b/src/models/components/benefitarticlessubscriber.ts @@ -11,6 +11,18 @@ import { BenefitArticlesSubscriberProperties$Outbound, BenefitArticlesSubscriberProperties$outboundSchema, } from "./benefitarticlessubscriberproperties.js"; +import { + BenefitGrantSubscriber, + BenefitGrantSubscriber$inboundSchema, + BenefitGrantSubscriber$Outbound, + BenefitGrantSubscriber$outboundSchema, +} from "./benefitgrantsubscriber.js"; +import { + Organization, + Organization$inboundSchema, + Organization$Outbound, + Organization$outboundSchema, +} from "./organization.js"; export const Type = { Articles: "articles", @@ -47,6 +59,8 @@ export type BenefitArticlesSubscriber = { * The ID of the organization owning the benefit. */ organizationId: string; + grants: Array; + organization: Organization; /** * Properties available to subscribers for a benefit of type `articles`. */ @@ -89,6 +103,8 @@ export const BenefitArticlesSubscriber$inboundSchema: z.ZodType< selectable: z.boolean(), deletable: z.boolean(), organization_id: z.string(), + grants: z.array(BenefitGrantSubscriber$inboundSchema), + organization: Organization$inboundSchema, properties: BenefitArticlesSubscriberProperties$inboundSchema, }).transform((v) => { return remap$(v, { @@ -108,6 +124,8 @@ export type BenefitArticlesSubscriber$Outbound = { selectable: boolean; deletable: boolean; organization_id: string; + grants: Array; + organization: Organization$Outbound; properties: BenefitArticlesSubscriberProperties$Outbound; }; @@ -125,6 +143,8 @@ export const BenefitArticlesSubscriber$outboundSchema: z.ZodType< selectable: z.boolean(), deletable: z.boolean(), organizationId: z.string(), + grants: z.array(BenefitGrantSubscriber$outboundSchema), + organization: Organization$outboundSchema, properties: BenefitArticlesSubscriberProperties$outboundSchema, }).transform((v) => { return remap$(v, { diff --git a/src/models/components/benefitcustomsubscriber.ts b/src/models/components/benefitcustomsubscriber.ts index 34c63dca..37b0fbdf 100644 --- a/src/models/components/benefitcustomsubscriber.ts +++ b/src/models/components/benefitcustomsubscriber.ts @@ -17,6 +17,12 @@ import { BenefitGrantSubscriber$Outbound, BenefitGrantSubscriber$outboundSchema, } from "./benefitgrantsubscriber.js"; +import { + Organization, + Organization$inboundSchema, + Organization$Outbound, + Organization$outboundSchema, +} from "./organization.js"; export const BenefitCustomSubscriberType = { Custom: "custom", @@ -56,6 +62,7 @@ export type BenefitCustomSubscriber = { */ organizationId: string; grants: Array; + organization: Organization; /** * Properties available to subscribers for a benefit of type `custom`. */ @@ -100,6 +107,7 @@ export const BenefitCustomSubscriber$inboundSchema: z.ZodType< deletable: z.boolean(), organization_id: z.string(), grants: z.array(BenefitGrantSubscriber$inboundSchema), + organization: Organization$inboundSchema, properties: BenefitCustomSubscriberProperties$inboundSchema, }).transform((v) => { return remap$(v, { @@ -120,6 +128,7 @@ export type BenefitCustomSubscriber$Outbound = { deletable: boolean; organization_id: string; grants: Array; + organization: Organization$Outbound; properties: BenefitCustomSubscriberProperties$Outbound; }; @@ -138,6 +147,7 @@ export const BenefitCustomSubscriber$outboundSchema: z.ZodType< deletable: z.boolean(), organizationId: z.string(), grants: z.array(BenefitGrantSubscriber$outboundSchema), + organization: Organization$outboundSchema, properties: BenefitCustomSubscriberProperties$outboundSchema, }).transform((v) => { return remap$(v, { diff --git a/src/models/components/benefitdiscordsubscriber.ts b/src/models/components/benefitdiscordsubscriber.ts index 4ee66096..dfd93587 100644 --- a/src/models/components/benefitdiscordsubscriber.ts +++ b/src/models/components/benefitdiscordsubscriber.ts @@ -11,6 +11,18 @@ import { BenefitDiscordSubscriberProperties$Outbound, BenefitDiscordSubscriberProperties$outboundSchema, } from "./benefitdiscordsubscriberproperties.js"; +import { + BenefitGrantSubscriber, + BenefitGrantSubscriber$inboundSchema, + BenefitGrantSubscriber$Outbound, + BenefitGrantSubscriber$outboundSchema, +} from "./benefitgrantsubscriber.js"; +import { + Organization, + Organization$inboundSchema, + Organization$Outbound, + Organization$outboundSchema, +} from "./organization.js"; export const BenefitDiscordSubscriberType = { Discord: "discord", @@ -49,6 +61,8 @@ export type BenefitDiscordSubscriber = { * The ID of the organization owning the benefit. */ organizationId: string; + grants: Array; + organization: Organization; /** * Properties available to subscribers for a benefit of type `discord`. */ @@ -92,6 +106,8 @@ export const BenefitDiscordSubscriber$inboundSchema: z.ZodType< selectable: z.boolean(), deletable: z.boolean(), organization_id: z.string(), + grants: z.array(BenefitGrantSubscriber$inboundSchema), + organization: Organization$inboundSchema, properties: BenefitDiscordSubscriberProperties$inboundSchema, }).transform((v) => { return remap$(v, { @@ -111,6 +127,8 @@ export type BenefitDiscordSubscriber$Outbound = { selectable: boolean; deletable: boolean; organization_id: string; + grants: Array; + organization: Organization$Outbound; properties: BenefitDiscordSubscriberProperties$Outbound; }; @@ -128,6 +146,8 @@ export const BenefitDiscordSubscriber$outboundSchema: z.ZodType< selectable: z.boolean(), deletable: z.boolean(), organizationId: z.string(), + grants: z.array(BenefitGrantSubscriber$outboundSchema), + organization: Organization$outboundSchema, properties: BenefitDiscordSubscriberProperties$outboundSchema, }).transform((v) => { return remap$(v, { diff --git a/src/models/components/benefitdownloadablessubscriber.ts b/src/models/components/benefitdownloadablessubscriber.ts index d3638b25..9aca68c6 100644 --- a/src/models/components/benefitdownloadablessubscriber.ts +++ b/src/models/components/benefitdownloadablessubscriber.ts @@ -11,6 +11,18 @@ import { BenefitDownloadablesSubscriberProperties$Outbound, BenefitDownloadablesSubscriberProperties$outboundSchema, } from "./benefitdownloadablessubscriberproperties.js"; +import { + BenefitGrantSubscriber, + BenefitGrantSubscriber$inboundSchema, + BenefitGrantSubscriber$Outbound, + BenefitGrantSubscriber$outboundSchema, +} from "./benefitgrantsubscriber.js"; +import { + Organization, + Organization$inboundSchema, + Organization$Outbound, + Organization$outboundSchema, +} from "./organization.js"; export const BenefitDownloadablesSubscriberType = { Downloadables: "downloadables", @@ -49,6 +61,8 @@ export type BenefitDownloadablesSubscriber = { * The ID of the organization owning the benefit. */ organizationId: string; + grants: Array; + organization: Organization; properties: BenefitDownloadablesSubscriberProperties; }; @@ -90,6 +104,8 @@ export const BenefitDownloadablesSubscriber$inboundSchema: z.ZodType< selectable: z.boolean(), deletable: z.boolean(), organization_id: z.string(), + grants: z.array(BenefitGrantSubscriber$inboundSchema), + organization: Organization$inboundSchema, properties: BenefitDownloadablesSubscriberProperties$inboundSchema, }).transform((v) => { return remap$(v, { @@ -109,6 +125,8 @@ export type BenefitDownloadablesSubscriber$Outbound = { selectable: boolean; deletable: boolean; organization_id: string; + grants: Array; + organization: Organization$Outbound; properties: BenefitDownloadablesSubscriberProperties$Outbound; }; @@ -126,6 +144,8 @@ export const BenefitDownloadablesSubscriber$outboundSchema: z.ZodType< selectable: z.boolean(), deletable: z.boolean(), organizationId: z.string(), + grants: z.array(BenefitGrantSubscriber$outboundSchema), + organization: Organization$outboundSchema, properties: BenefitDownloadablesSubscriberProperties$outboundSchema, }).transform((v) => { return remap$(v, { diff --git a/src/models/components/benefitgithubrepositorysubscriber.ts b/src/models/components/benefitgithubrepositorysubscriber.ts index f57c7788..401e26a6 100644 --- a/src/models/components/benefitgithubrepositorysubscriber.ts +++ b/src/models/components/benefitgithubrepositorysubscriber.ts @@ -11,6 +11,18 @@ import { BenefitGitHubRepositorySubscriberProperties$Outbound, BenefitGitHubRepositorySubscriberProperties$outboundSchema, } from "./benefitgithubrepositorysubscriberproperties.js"; +import { + BenefitGrantSubscriber, + BenefitGrantSubscriber$inboundSchema, + BenefitGrantSubscriber$Outbound, + BenefitGrantSubscriber$outboundSchema, +} from "./benefitgrantsubscriber.js"; +import { + Organization, + Organization$inboundSchema, + Organization$Outbound, + Organization$outboundSchema, +} from "./organization.js"; export const BenefitGitHubRepositorySubscriberType = { GithubRepository: "github_repository", @@ -49,6 +61,8 @@ export type BenefitGitHubRepositorySubscriber = { * The ID of the organization owning the benefit. */ organizationId: string; + grants: Array; + organization: Organization; /** * Properties available to subscribers for a benefit of type `github_repository`. */ @@ -95,6 +109,8 @@ export const BenefitGitHubRepositorySubscriber$inboundSchema: z.ZodType< selectable: z.boolean(), deletable: z.boolean(), organization_id: z.string(), + grants: z.array(BenefitGrantSubscriber$inboundSchema), + organization: Organization$inboundSchema, properties: BenefitGitHubRepositorySubscriberProperties$inboundSchema, }).transform((v) => { return remap$(v, { @@ -114,6 +130,8 @@ export type BenefitGitHubRepositorySubscriber$Outbound = { selectable: boolean; deletable: boolean; organization_id: string; + grants: Array; + organization: Organization$Outbound; properties: BenefitGitHubRepositorySubscriberProperties$Outbound; }; @@ -131,6 +149,8 @@ export const BenefitGitHubRepositorySubscriber$outboundSchema: z.ZodType< selectable: z.boolean(), deletable: z.boolean(), organizationId: z.string(), + grants: z.array(BenefitGrantSubscriber$outboundSchema), + organization: Organization$outboundSchema, properties: BenefitGitHubRepositorySubscriberProperties$outboundSchema, }).transform((v) => { return remap$(v, { diff --git a/src/models/components/benefitlicensekeyssubscriber.ts b/src/models/components/benefitlicensekeyssubscriber.ts index 081b248b..275f211d 100644 --- a/src/models/components/benefitlicensekeyssubscriber.ts +++ b/src/models/components/benefitlicensekeyssubscriber.ts @@ -17,6 +17,12 @@ import { BenefitLicenseKeysSubscriberProperties$Outbound, BenefitLicenseKeysSubscriberProperties$outboundSchema, } from "./benefitlicensekeyssubscriberproperties.js"; +import { + Organization, + Organization$inboundSchema, + Organization$Outbound, + Organization$outboundSchema, +} from "./organization.js"; export const BenefitLicenseKeysSubscriberType = { LicenseKeys: "license_keys", @@ -55,8 +61,9 @@ export type BenefitLicenseKeysSubscriber = { * The ID of the organization owning the benefit. */ organizationId: string; - properties: BenefitLicenseKeysSubscriberProperties; grants: Array; + organization: Organization; + properties: BenefitLicenseKeysSubscriberProperties; }; /** @internal */ @@ -96,8 +103,9 @@ export const BenefitLicenseKeysSubscriber$inboundSchema: z.ZodType< selectable: z.boolean(), deletable: z.boolean(), organization_id: z.string(), - properties: BenefitLicenseKeysSubscriberProperties$inboundSchema, grants: z.array(BenefitGrantLicenseKeys$inboundSchema), + organization: Organization$inboundSchema, + properties: BenefitLicenseKeysSubscriberProperties$inboundSchema, }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -116,8 +124,9 @@ export type BenefitLicenseKeysSubscriber$Outbound = { selectable: boolean; deletable: boolean; organization_id: string; - properties: BenefitLicenseKeysSubscriberProperties$Outbound; grants: Array; + organization: Organization$Outbound; + properties: BenefitLicenseKeysSubscriberProperties$Outbound; }; /** @internal */ @@ -134,8 +143,9 @@ export const BenefitLicenseKeysSubscriber$outboundSchema: z.ZodType< selectable: z.boolean(), deletable: z.boolean(), organizationId: z.string(), - properties: BenefitLicenseKeysSubscriberProperties$outboundSchema, grants: z.array(BenefitGrantLicenseKeys$outboundSchema), + organization: Organization$outboundSchema, + properties: BenefitLicenseKeysSubscriberProperties$outboundSchema, }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/checkoutconfirmstripe.ts b/src/models/components/checkoutconfirmstripe.ts index 402b3163..3084ee56 100644 --- a/src/models/components/checkoutconfirmstripe.ts +++ b/src/models/components/checkoutconfirmstripe.ts @@ -11,10 +11,16 @@ import { Address$outboundSchema, } from "./address.js"; +export type CheckoutConfirmStripeCustomFieldData = {}; + /** * Confirm a checkout session using a Stripe confirmation token. */ export type CheckoutConfirmStripe = { + /** + * Key-value object storing custom field values. + */ + customFieldData?: CheckoutConfirmStripeCustomFieldData | null | undefined; /** * ID of the product price to checkout. Must correspond to a price linked to the same product. */ @@ -30,12 +36,47 @@ export type CheckoutConfirmStripe = { confirmationTokenId?: string | null | undefined; }; +/** @internal */ +export const CheckoutConfirmStripeCustomFieldData$inboundSchema: z.ZodType< + CheckoutConfirmStripeCustomFieldData, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type CheckoutConfirmStripeCustomFieldData$Outbound = {}; + +/** @internal */ +export const CheckoutConfirmStripeCustomFieldData$outboundSchema: z.ZodType< + CheckoutConfirmStripeCustomFieldData$Outbound, + z.ZodTypeDef, + CheckoutConfirmStripeCustomFieldData +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CheckoutConfirmStripeCustomFieldData$ { + /** @deprecated use `CheckoutConfirmStripeCustomFieldData$inboundSchema` instead. */ + export const inboundSchema = + CheckoutConfirmStripeCustomFieldData$inboundSchema; + /** @deprecated use `CheckoutConfirmStripeCustomFieldData$outboundSchema` instead. */ + export const outboundSchema = + CheckoutConfirmStripeCustomFieldData$outboundSchema; + /** @deprecated use `CheckoutConfirmStripeCustomFieldData$Outbound` instead. */ + export type Outbound = CheckoutConfirmStripeCustomFieldData$Outbound; +} + /** @internal */ export const CheckoutConfirmStripe$inboundSchema: z.ZodType< CheckoutConfirmStripe, z.ZodTypeDef, unknown > = z.object({ + custom_field_data: z.nullable( + z.lazy(() => CheckoutConfirmStripeCustomFieldData$inboundSchema), + ).optional(), product_price_id: z.nullable(z.string()).optional(), amount: z.nullable(z.number().int()).optional(), customer_name: z.nullable(z.string()).optional(), @@ -45,6 +86,7 @@ export const CheckoutConfirmStripe$inboundSchema: z.ZodType< confirmation_token_id: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { + "custom_field_data": "customFieldData", "product_price_id": "productPriceId", "customer_name": "customerName", "customer_email": "customerEmail", @@ -56,6 +98,10 @@ export const CheckoutConfirmStripe$inboundSchema: z.ZodType< /** @internal */ export type CheckoutConfirmStripe$Outbound = { + custom_field_data?: + | CheckoutConfirmStripeCustomFieldData$Outbound + | null + | undefined; product_price_id?: string | null | undefined; amount?: number | null | undefined; customer_name?: string | null | undefined; @@ -71,6 +117,9 @@ export const CheckoutConfirmStripe$outboundSchema: z.ZodType< z.ZodTypeDef, CheckoutConfirmStripe > = z.object({ + customFieldData: z.nullable( + z.lazy(() => CheckoutConfirmStripeCustomFieldData$outboundSchema), + ).optional(), productPriceId: z.nullable(z.string()).optional(), amount: z.nullable(z.number().int()).optional(), customerName: z.nullable(z.string()).optional(), @@ -80,6 +129,7 @@ export const CheckoutConfirmStripe$outboundSchema: z.ZodType< confirmationTokenId: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { + customFieldData: "custom_field_data", productPriceId: "product_price_id", customerName: "customer_name", customerEmail: "customer_email", diff --git a/src/models/components/checkoutproduct.ts b/src/models/components/checkoutproduct.ts new file mode 100644 index 00000000..09d9649a --- /dev/null +++ b/src/models/components/checkoutproduct.ts @@ -0,0 +1,344 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { + BenefitArticles, + BenefitArticles$inboundSchema, + BenefitArticles$Outbound, + BenefitArticles$outboundSchema, +} from "./benefitarticles.js"; +import { + BenefitBase, + BenefitBase$inboundSchema, + BenefitBase$Outbound, + BenefitBase$outboundSchema, +} from "./benefitbase.js"; +import { + ProductMediaFileRead, + ProductMediaFileRead$inboundSchema, + ProductMediaFileRead$Outbound, + ProductMediaFileRead$outboundSchema, + ProductMediaFileReadInput, + ProductMediaFileReadInput$inboundSchema, + ProductMediaFileReadInput$Outbound, + ProductMediaFileReadInput$outboundSchema, +} from "./productmediafileread.js"; +import { + ProductPrice, + ProductPrice$inboundSchema, + ProductPrice$Outbound, + ProductPrice$outboundSchema, +} from "./productprice.js"; + +export type CheckoutProductBenefits = BenefitBase | BenefitArticles; + +/** + * Product data for a checkout session. + */ +export type CheckoutProduct = { + /** + * Creation timestamp of the object. + */ + createdAt: Date; + /** + * Last modification timestamp of the object. + */ + modifiedAt: Date | null; + /** + * The ID of the product. + */ + id: string; + /** + * The name of the product. + */ + name: string; + /** + * The description of the product. + */ + description: string | null; + /** + * Whether the product is a subscription tier. + */ + isRecurring: boolean; + /** + * Whether the product is archived and no longer available. + */ + isArchived: boolean; + /** + * The ID of the organization owning the product. + */ + organizationId: string; + /** + * List of prices for this product. + */ + prices: Array; + /** + * List of benefits granted by the product. + */ + benefits: Array; + /** + * List of medias associated to the product. + */ + medias: Array; +}; + +/** + * Product data for a checkout session. + */ +export type CheckoutProductInput = { + /** + * Creation timestamp of the object. + */ + createdAt: Date; + /** + * Last modification timestamp of the object. + */ + modifiedAt: Date | null; + /** + * The ID of the product. + */ + id: string; + /** + * The name of the product. + */ + name: string; + /** + * The description of the product. + */ + description: string | null; + /** + * Whether the product is a subscription tier. + */ + isRecurring: boolean; + /** + * Whether the product is archived and no longer available. + */ + isArchived: boolean; + /** + * The ID of the organization owning the product. + */ + organizationId: string; + /** + * List of prices for this product. + */ + prices: Array; + /** + * List of benefits granted by the product. + */ + benefits: Array; + /** + * List of medias associated to the product. + */ + medias: Array; +}; + +/** @internal */ +export const CheckoutProductBenefits$inboundSchema: z.ZodType< + CheckoutProductBenefits, + z.ZodTypeDef, + unknown +> = z.union([BenefitBase$inboundSchema, BenefitArticles$inboundSchema]); + +/** @internal */ +export type CheckoutProductBenefits$Outbound = + | BenefitBase$Outbound + | BenefitArticles$Outbound; + +/** @internal */ +export const CheckoutProductBenefits$outboundSchema: z.ZodType< + CheckoutProductBenefits$Outbound, + z.ZodTypeDef, + CheckoutProductBenefits +> = z.union([BenefitBase$outboundSchema, BenefitArticles$outboundSchema]); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CheckoutProductBenefits$ { + /** @deprecated use `CheckoutProductBenefits$inboundSchema` instead. */ + export const inboundSchema = CheckoutProductBenefits$inboundSchema; + /** @deprecated use `CheckoutProductBenefits$outboundSchema` instead. */ + export const outboundSchema = CheckoutProductBenefits$outboundSchema; + /** @deprecated use `CheckoutProductBenefits$Outbound` instead. */ + export type Outbound = CheckoutProductBenefits$Outbound; +} + +/** @internal */ +export const CheckoutProduct$inboundSchema: z.ZodType< + CheckoutProduct, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), + modified_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ), + id: z.string(), + name: z.string(), + description: z.nullable(z.string()), + is_recurring: z.boolean(), + is_archived: z.boolean(), + organization_id: z.string(), + prices: z.array(ProductPrice$inboundSchema), + benefits: z.array( + z.union([BenefitBase$inboundSchema, BenefitArticles$inboundSchema]), + ), + medias: z.array(ProductMediaFileRead$inboundSchema), +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "modified_at": "modifiedAt", + "is_recurring": "isRecurring", + "is_archived": "isArchived", + "organization_id": "organizationId", + }); +}); + +/** @internal */ +export type CheckoutProduct$Outbound = { + created_at: string; + modified_at: string | null; + id: string; + name: string; + description: string | null; + is_recurring: boolean; + is_archived: boolean; + organization_id: string; + prices: Array; + benefits: Array; + medias: Array; +}; + +/** @internal */ +export const CheckoutProduct$outboundSchema: z.ZodType< + CheckoutProduct$Outbound, + z.ZodTypeDef, + CheckoutProduct +> = z.object({ + createdAt: z.date().transform(v => v.toISOString()), + modifiedAt: z.nullable(z.date().transform(v => v.toISOString())), + id: z.string(), + name: z.string(), + description: z.nullable(z.string()), + isRecurring: z.boolean(), + isArchived: z.boolean(), + organizationId: z.string(), + prices: z.array(ProductPrice$outboundSchema), + benefits: z.array( + z.union([BenefitBase$outboundSchema, BenefitArticles$outboundSchema]), + ), + medias: z.array(ProductMediaFileRead$outboundSchema), +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + modifiedAt: "modified_at", + isRecurring: "is_recurring", + isArchived: "is_archived", + organizationId: "organization_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CheckoutProduct$ { + /** @deprecated use `CheckoutProduct$inboundSchema` instead. */ + export const inboundSchema = CheckoutProduct$inboundSchema; + /** @deprecated use `CheckoutProduct$outboundSchema` instead. */ + export const outboundSchema = CheckoutProduct$outboundSchema; + /** @deprecated use `CheckoutProduct$Outbound` instead. */ + export type Outbound = CheckoutProduct$Outbound; +} + +/** @internal */ +export const CheckoutProductInput$inboundSchema: z.ZodType< + CheckoutProductInput, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), + modified_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ), + id: z.string(), + name: z.string(), + description: z.nullable(z.string()), + is_recurring: z.boolean(), + is_archived: z.boolean(), + organization_id: z.string(), + prices: z.array(ProductPrice$inboundSchema), + benefits: z.array( + z.union([BenefitBase$inboundSchema, BenefitArticles$inboundSchema]), + ), + medias: z.array(ProductMediaFileReadInput$inboundSchema), +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "modified_at": "modifiedAt", + "is_recurring": "isRecurring", + "is_archived": "isArchived", + "organization_id": "organizationId", + }); +}); + +/** @internal */ +export type CheckoutProductInput$Outbound = { + created_at: string; + modified_at: string | null; + id: string; + name: string; + description: string | null; + is_recurring: boolean; + is_archived: boolean; + organization_id: string; + prices: Array; + benefits: Array; + medias: Array; +}; + +/** @internal */ +export const CheckoutProductInput$outboundSchema: z.ZodType< + CheckoutProductInput$Outbound, + z.ZodTypeDef, + CheckoutProductInput +> = z.object({ + createdAt: z.date().transform(v => v.toISOString()), + modifiedAt: z.nullable(z.date().transform(v => v.toISOString())), + id: z.string(), + name: z.string(), + description: z.nullable(z.string()), + isRecurring: z.boolean(), + isArchived: z.boolean(), + organizationId: z.string(), + prices: z.array(ProductPrice$outboundSchema), + benefits: z.array( + z.union([BenefitBase$outboundSchema, BenefitArticles$outboundSchema]), + ), + medias: z.array(ProductMediaFileReadInput$outboundSchema), +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + modifiedAt: "modified_at", + isRecurring: "is_recurring", + isArchived: "is_archived", + organizationId: "organization_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CheckoutProductInput$ { + /** @deprecated use `CheckoutProductInput$inboundSchema` instead. */ + export const inboundSchema = CheckoutProductInput$inboundSchema; + /** @deprecated use `CheckoutProductInput$outboundSchema` instead. */ + export const outboundSchema = CheckoutProductInput$outboundSchema; + /** @deprecated use `CheckoutProductInput$Outbound` instead. */ + export type Outbound = CheckoutProductInput$Outbound; +} diff --git a/src/models/components/checkoutpublic.ts b/src/models/components/checkoutpublic.ts index f5ead475..5a192c10 100644 --- a/src/models/components/checkoutpublic.ts +++ b/src/models/components/checkoutpublic.ts @@ -10,17 +10,29 @@ import { Address$Outbound, Address$outboundSchema, } from "./address.js"; +import { + AttachedCustomField, + AttachedCustomField$inboundSchema, + AttachedCustomField$Outbound, + AttachedCustomField$outboundSchema, +} from "./attachedcustomfield.js"; +import { + CheckoutProduct, + CheckoutProduct$inboundSchema, + CheckoutProduct$Outbound, + CheckoutProduct$outboundSchema, +} from "./checkoutproduct.js"; import { CheckoutStatus, CheckoutStatus$inboundSchema, CheckoutStatus$outboundSchema, } from "./checkoutstatus.js"; import { - Product, - Product$inboundSchema, - Product$Outbound, - Product$outboundSchema, -} from "./product.js"; + Organization, + Organization$inboundSchema, + Organization$Outbound, + Organization$outboundSchema, +} from "./organization.js"; import { ProductPrice, ProductPrice$inboundSchema, @@ -28,6 +40,11 @@ import { ProductPrice$outboundSchema, } from "./productprice.js"; +/** + * Key-value object storing custom field values. + */ +export type CheckoutPublicCustomFieldData = {}; + export type CheckoutPublicPaymentProcessorMetadata = {}; /** @@ -46,6 +63,10 @@ export type CheckoutPublic = { * The ID of the object. */ id: string; + /** + * Key-value object storing custom field values. + */ + customFieldData?: CheckoutPublicCustomFieldData | undefined; paymentProcessor?: "stripe" | undefined; status: CheckoutStatus; /** @@ -101,12 +122,44 @@ export type CheckoutPublic = { customerTaxId: string | null; paymentProcessorMetadata: CheckoutPublicPaymentProcessorMetadata; /** - * A product. + * Product data for a checkout session. */ - product: Product; + product: CheckoutProduct; productPrice: ProductPrice; + organization: Organization; + attachedCustomFields: Array; }; +/** @internal */ +export const CheckoutPublicCustomFieldData$inboundSchema: z.ZodType< + CheckoutPublicCustomFieldData, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type CheckoutPublicCustomFieldData$Outbound = {}; + +/** @internal */ +export const CheckoutPublicCustomFieldData$outboundSchema: z.ZodType< + CheckoutPublicCustomFieldData$Outbound, + z.ZodTypeDef, + CheckoutPublicCustomFieldData +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CheckoutPublicCustomFieldData$ { + /** @deprecated use `CheckoutPublicCustomFieldData$inboundSchema` instead. */ + export const inboundSchema = CheckoutPublicCustomFieldData$inboundSchema; + /** @deprecated use `CheckoutPublicCustomFieldData$outboundSchema` instead. */ + export const outboundSchema = CheckoutPublicCustomFieldData$outboundSchema; + /** @deprecated use `CheckoutPublicCustomFieldData$Outbound` instead. */ + export type Outbound = CheckoutPublicCustomFieldData$Outbound; +} + /** @internal */ export const CheckoutPublicPaymentProcessorMetadata$inboundSchema: z.ZodType< CheckoutPublicPaymentProcessorMetadata, @@ -150,6 +203,8 @@ export const CheckoutPublic$inboundSchema: z.ZodType< z.string().datetime({ offset: true }).transform(v => new Date(v)), ), id: z.string(), + custom_field_data: z.lazy(() => CheckoutPublicCustomFieldData$inboundSchema) + .optional(), payment_processor: z.literal("stripe").optional(), status: CheckoutStatus$inboundSchema, client_secret: z.string(), @@ -173,12 +228,15 @@ export const CheckoutPublic$inboundSchema: z.ZodType< payment_processor_metadata: z.lazy(() => CheckoutPublicPaymentProcessorMetadata$inboundSchema ), - product: Product$inboundSchema, + product: CheckoutProduct$inboundSchema, product_price: ProductPrice$inboundSchema, + organization: Organization$inboundSchema, + attached_custom_fields: z.array(AttachedCustomField$inboundSchema), }).transform((v) => { return remap$(v, { "created_at": "createdAt", "modified_at": "modifiedAt", + "custom_field_data": "customFieldData", "payment_processor": "paymentProcessor", "client_secret": "clientSecret", "expires_at": "expiresAt", @@ -197,6 +255,7 @@ export const CheckoutPublic$inboundSchema: z.ZodType< "customer_tax_id": "customerTaxId", "payment_processor_metadata": "paymentProcessorMetadata", "product_price": "productPrice", + "attached_custom_fields": "attachedCustomFields", }); }); @@ -205,6 +264,7 @@ export type CheckoutPublic$Outbound = { created_at: string; modified_at: string | null; id: string; + custom_field_data?: CheckoutPublicCustomFieldData$Outbound | undefined; payment_processor: "stripe"; status: string; client_secret: string; @@ -226,8 +286,10 @@ export type CheckoutPublic$Outbound = { customer_billing_address: Address$Outbound | null; customer_tax_id: string | null; payment_processor_metadata: CheckoutPublicPaymentProcessorMetadata$Outbound; - product: Product$Outbound; + product: CheckoutProduct$Outbound; product_price: ProductPrice$Outbound; + organization: Organization$Outbound; + attached_custom_fields: Array; }; /** @internal */ @@ -239,6 +301,8 @@ export const CheckoutPublic$outboundSchema: z.ZodType< createdAt: z.date().transform(v => v.toISOString()), modifiedAt: z.nullable(z.date().transform(v => v.toISOString())), id: z.string(), + customFieldData: z.lazy(() => CheckoutPublicCustomFieldData$outboundSchema) + .optional(), paymentProcessor: z.literal("stripe").default("stripe"), status: CheckoutStatus$outboundSchema, clientSecret: z.string(), @@ -262,12 +326,15 @@ export const CheckoutPublic$outboundSchema: z.ZodType< paymentProcessorMetadata: z.lazy(() => CheckoutPublicPaymentProcessorMetadata$outboundSchema ), - product: Product$outboundSchema, + product: CheckoutProduct$outboundSchema, productPrice: ProductPrice$outboundSchema, + organization: Organization$outboundSchema, + attachedCustomFields: z.array(AttachedCustomField$outboundSchema), }).transform((v) => { return remap$(v, { createdAt: "created_at", modifiedAt: "modified_at", + customFieldData: "custom_field_data", paymentProcessor: "payment_processor", clientSecret: "client_secret", expiresAt: "expires_at", @@ -286,6 +353,7 @@ export const CheckoutPublic$outboundSchema: z.ZodType< customerTaxId: "customer_tax_id", paymentProcessorMetadata: "payment_processor_metadata", productPrice: "product_price", + attachedCustomFields: "attached_custom_fields", }); }); diff --git a/src/models/components/checkoutupdate.ts b/src/models/components/checkoutupdate.ts index 4d4fc6dd..7168588a 100644 --- a/src/models/components/checkoutupdate.ts +++ b/src/models/components/checkoutupdate.ts @@ -11,10 +11,16 @@ import { Address$outboundSchema, } from "./address.js"; +export type CustomFieldData = {}; + /** * Update an existing checkout session using an access token. */ export type CheckoutUpdate = { + /** + * Key-value object storing custom field values. + */ + customFieldData?: CustomFieldData | null | undefined; /** * ID of the product price to checkout. Must correspond to a price linked to the same product. */ @@ -41,12 +47,44 @@ export type CheckoutUpdate = { successUrl?: string | null | undefined; }; +/** @internal */ +export const CustomFieldData$inboundSchema: z.ZodType< + CustomFieldData, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type CustomFieldData$Outbound = {}; + +/** @internal */ +export const CustomFieldData$outboundSchema: z.ZodType< + CustomFieldData$Outbound, + z.ZodTypeDef, + CustomFieldData +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldData$ { + /** @deprecated use `CustomFieldData$inboundSchema` instead. */ + export const inboundSchema = CustomFieldData$inboundSchema; + /** @deprecated use `CustomFieldData$outboundSchema` instead. */ + export const outboundSchema = CustomFieldData$outboundSchema; + /** @deprecated use `CustomFieldData$Outbound` instead. */ + export type Outbound = CustomFieldData$Outbound; +} + /** @internal */ export const CheckoutUpdate$inboundSchema: z.ZodType< CheckoutUpdate, z.ZodTypeDef, unknown > = z.object({ + custom_field_data: z.nullable(z.lazy(() => CustomFieldData$inboundSchema)) + .optional(), product_price_id: z.nullable(z.string()).optional(), amount: z.nullable(z.number().int()).optional(), customer_name: z.nullable(z.string()).optional(), @@ -58,6 +96,7 @@ export const CheckoutUpdate$inboundSchema: z.ZodType< success_url: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { + "custom_field_data": "customFieldData", "product_price_id": "productPriceId", "customer_name": "customerName", "customer_email": "customerEmail", @@ -70,6 +109,7 @@ export const CheckoutUpdate$inboundSchema: z.ZodType< /** @internal */ export type CheckoutUpdate$Outbound = { + custom_field_data?: CustomFieldData$Outbound | null | undefined; product_price_id?: string | null | undefined; amount?: number | null | undefined; customer_name?: string | null | undefined; @@ -87,6 +127,8 @@ export const CheckoutUpdate$outboundSchema: z.ZodType< z.ZodTypeDef, CheckoutUpdate > = z.object({ + customFieldData: z.nullable(z.lazy(() => CustomFieldData$outboundSchema)) + .optional(), productPriceId: z.nullable(z.string()).optional(), amount: z.nullable(z.number().int()).optional(), customerName: z.nullable(z.string()).optional(), @@ -98,6 +140,7 @@ export const CheckoutUpdate$outboundSchema: z.ZodType< successUrl: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { + customFieldData: "custom_field_data", productPriceId: "product_price_id", customerName: "customer_name", customerEmail: "customer_email", diff --git a/src/models/components/checkoutupdatepublic.ts b/src/models/components/checkoutupdatepublic.ts index 60d8217d..9c934b79 100644 --- a/src/models/components/checkoutupdatepublic.ts +++ b/src/models/components/checkoutupdatepublic.ts @@ -11,10 +11,16 @@ import { Address$outboundSchema, } from "./address.js"; +export type CheckoutUpdatePublicCustomFieldData = {}; + /** * Update an existing checkout session using the client secret. */ export type CheckoutUpdatePublic = { + /** + * Key-value object storing custom field values. + */ + customFieldData?: CheckoutUpdatePublicCustomFieldData | null | undefined; /** * ID of the product price to checkout. Must correspond to a price linked to the same product. */ @@ -26,12 +32,47 @@ export type CheckoutUpdatePublic = { customerTaxId?: string | null | undefined; }; +/** @internal */ +export const CheckoutUpdatePublicCustomFieldData$inboundSchema: z.ZodType< + CheckoutUpdatePublicCustomFieldData, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type CheckoutUpdatePublicCustomFieldData$Outbound = {}; + +/** @internal */ +export const CheckoutUpdatePublicCustomFieldData$outboundSchema: z.ZodType< + CheckoutUpdatePublicCustomFieldData$Outbound, + z.ZodTypeDef, + CheckoutUpdatePublicCustomFieldData +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CheckoutUpdatePublicCustomFieldData$ { + /** @deprecated use `CheckoutUpdatePublicCustomFieldData$inboundSchema` instead. */ + export const inboundSchema = + CheckoutUpdatePublicCustomFieldData$inboundSchema; + /** @deprecated use `CheckoutUpdatePublicCustomFieldData$outboundSchema` instead. */ + export const outboundSchema = + CheckoutUpdatePublicCustomFieldData$outboundSchema; + /** @deprecated use `CheckoutUpdatePublicCustomFieldData$Outbound` instead. */ + export type Outbound = CheckoutUpdatePublicCustomFieldData$Outbound; +} + /** @internal */ export const CheckoutUpdatePublic$inboundSchema: z.ZodType< CheckoutUpdatePublic, z.ZodTypeDef, unknown > = z.object({ + custom_field_data: z.nullable( + z.lazy(() => CheckoutUpdatePublicCustomFieldData$inboundSchema), + ).optional(), product_price_id: z.nullable(z.string()).optional(), amount: z.nullable(z.number().int()).optional(), customer_name: z.nullable(z.string()).optional(), @@ -40,6 +81,7 @@ export const CheckoutUpdatePublic$inboundSchema: z.ZodType< customer_tax_id: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { + "custom_field_data": "customFieldData", "product_price_id": "productPriceId", "customer_name": "customerName", "customer_email": "customerEmail", @@ -50,6 +92,10 @@ export const CheckoutUpdatePublic$inboundSchema: z.ZodType< /** @internal */ export type CheckoutUpdatePublic$Outbound = { + custom_field_data?: + | CheckoutUpdatePublicCustomFieldData$Outbound + | null + | undefined; product_price_id?: string | null | undefined; amount?: number | null | undefined; customer_name?: string | null | undefined; @@ -64,6 +110,9 @@ export const CheckoutUpdatePublic$outboundSchema: z.ZodType< z.ZodTypeDef, CheckoutUpdatePublic > = z.object({ + customFieldData: z.nullable( + z.lazy(() => CheckoutUpdatePublicCustomFieldData$outboundSchema), + ).optional(), productPriceId: z.nullable(z.string()).optional(), amount: z.nullable(z.number().int()).optional(), customerName: z.nullable(z.string()).optional(), @@ -72,6 +121,7 @@ export const CheckoutUpdatePublic$outboundSchema: z.ZodType< customerTaxId: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { + customFieldData: "custom_field_data", productPriceId: "product_price_id", customerName: "customer_name", customerEmail: "customer_email", diff --git a/src/models/components/customfield.ts b/src/models/components/customfield.ts new file mode 100644 index 00000000..50ea40d8 --- /dev/null +++ b/src/models/components/customfield.ts @@ -0,0 +1,121 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + CustomFieldCheckbox, + CustomFieldCheckbox$inboundSchema, + CustomFieldCheckbox$Outbound, + CustomFieldCheckbox$outboundSchema, +} from "./customfieldcheckbox.js"; +import { + CustomFieldDate, + CustomFieldDate$inboundSchema, + CustomFieldDate$Outbound, + CustomFieldDate$outboundSchema, +} from "./customfielddate.js"; +import { + CustomFieldNumber, + CustomFieldNumber$inboundSchema, + CustomFieldNumber$Outbound, + CustomFieldNumber$outboundSchema, +} from "./customfieldnumber.js"; +import { + CustomFieldSelect, + CustomFieldSelect$inboundSchema, + CustomFieldSelect$Outbound, + CustomFieldSelect$outboundSchema, +} from "./customfieldselect.js"; +import { + CustomFieldText, + CustomFieldText$inboundSchema, + CustomFieldText$Outbound, + CustomFieldText$outboundSchema, +} from "./customfieldtext.js"; + +export type CustomField = + | (CustomFieldCheckbox & { type: "checkbox" }) + | (CustomFieldDate & { type: "date" }) + | (CustomFieldNumber & { type: "number" }) + | (CustomFieldSelect & { type: "select" }) + | (CustomFieldText & { type: "text" }); + +/** @internal */ +export const CustomField$inboundSchema: z.ZodType< + CustomField, + z.ZodTypeDef, + unknown +> = z.union([ + CustomFieldCheckbox$inboundSchema.and( + z.object({ type: z.literal("checkbox") }).transform((v) => ({ + type: v.type, + })), + ), + CustomFieldDate$inboundSchema.and( + z.object({ type: z.literal("date") }).transform((v) => ({ type: v.type })), + ), + CustomFieldNumber$inboundSchema.and( + z.object({ type: z.literal("number") }).transform((v) => ({ + type: v.type, + })), + ), + CustomFieldSelect$inboundSchema.and( + z.object({ type: z.literal("select") }).transform((v) => ({ + type: v.type, + })), + ), + CustomFieldText$inboundSchema.and( + z.object({ type: z.literal("text") }).transform((v) => ({ type: v.type })), + ), +]); + +/** @internal */ +export type CustomField$Outbound = + | (CustomFieldCheckbox$Outbound & { type: "checkbox" }) + | (CustomFieldDate$Outbound & { type: "date" }) + | (CustomFieldNumber$Outbound & { type: "number" }) + | (CustomFieldSelect$Outbound & { type: "select" }) + | (CustomFieldText$Outbound & { type: "text" }); + +/** @internal */ +export const CustomField$outboundSchema: z.ZodType< + CustomField$Outbound, + z.ZodTypeDef, + CustomField +> = z.union([ + CustomFieldCheckbox$outboundSchema.and( + z.object({ type: z.literal("checkbox") }).transform((v) => ({ + type: v.type, + })), + ), + CustomFieldDate$outboundSchema.and( + z.object({ type: z.literal("date") }).transform((v) => ({ type: v.type })), + ), + CustomFieldNumber$outboundSchema.and( + z.object({ type: z.literal("number") }).transform((v) => ({ + type: v.type, + })), + ), + CustomFieldSelect$outboundSchema.and( + z.object({ type: z.literal("select") }).transform((v) => ({ + type: v.type, + })), + ), + CustomFieldText$outboundSchema.and( + z.object({ type: z.literal("text") }).transform((v) => ({ type: v.type })), + ), +]); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomField$ { + /** @deprecated use `CustomField$inboundSchema` instead. */ + export const inboundSchema = CustomField$inboundSchema; + /** @deprecated use `CustomField$outboundSchema` instead. */ + export const outboundSchema = CustomField$outboundSchema; + /** @deprecated use `CustomField$Outbound` instead. */ + export type Outbound = CustomField$Outbound; +} diff --git a/src/models/components/customfieldcheckbox.ts b/src/models/components/customfieldcheckbox.ts new file mode 100644 index 00000000..f5e85235 --- /dev/null +++ b/src/models/components/customfieldcheckbox.ts @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { + CustomFieldCheckboxProperties, + CustomFieldCheckboxProperties$inboundSchema, + CustomFieldCheckboxProperties$Outbound, + CustomFieldCheckboxProperties$outboundSchema, +} from "./customfieldcheckboxproperties.js"; + +export const CustomFieldCheckboxType = { + Checkbox: "checkbox", +} as const; +export type CustomFieldCheckboxType = ClosedEnum< + typeof CustomFieldCheckboxType +>; + +/** + * Schema for a custom field of type checkbox. + */ +export type CustomFieldCheckbox = { + /** + * Creation timestamp of the object. + */ + createdAt: Date; + /** + * Last modification timestamp of the object. + */ + modifiedAt: Date | null; + /** + * The ID of the object. + */ + id: string; + metadata: { [k: string]: string }; + type?: "checkbox" | undefined; + /** + * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. + */ + slug: string; + /** + * Name of the custom field. + */ + name: string; + /** + * The ID of the organization owning the custom field. + */ + organizationId: string; + properties: CustomFieldCheckboxProperties; +}; + +/** @internal */ +export const CustomFieldCheckboxType$inboundSchema: z.ZodNativeEnum< + typeof CustomFieldCheckboxType +> = z.nativeEnum(CustomFieldCheckboxType); + +/** @internal */ +export const CustomFieldCheckboxType$outboundSchema: z.ZodNativeEnum< + typeof CustomFieldCheckboxType +> = CustomFieldCheckboxType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldCheckboxType$ { + /** @deprecated use `CustomFieldCheckboxType$inboundSchema` instead. */ + export const inboundSchema = CustomFieldCheckboxType$inboundSchema; + /** @deprecated use `CustomFieldCheckboxType$outboundSchema` instead. */ + export const outboundSchema = CustomFieldCheckboxType$outboundSchema; +} + +/** @internal */ +export const CustomFieldCheckbox$inboundSchema: z.ZodType< + CustomFieldCheckbox, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), + modified_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ), + id: z.string(), + metadata: z.record(z.string()), + type: z.literal("checkbox").optional(), + slug: z.string(), + name: z.string(), + organization_id: z.string(), + properties: CustomFieldCheckboxProperties$inboundSchema, +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "modified_at": "modifiedAt", + "organization_id": "organizationId", + }); +}); + +/** @internal */ +export type CustomFieldCheckbox$Outbound = { + created_at: string; + modified_at: string | null; + id: string; + metadata: { [k: string]: string }; + type: "checkbox"; + slug: string; + name: string; + organization_id: string; + properties: CustomFieldCheckboxProperties$Outbound; +}; + +/** @internal */ +export const CustomFieldCheckbox$outboundSchema: z.ZodType< + CustomFieldCheckbox$Outbound, + z.ZodTypeDef, + CustomFieldCheckbox +> = z.object({ + createdAt: z.date().transform(v => v.toISOString()), + modifiedAt: z.nullable(z.date().transform(v => v.toISOString())), + id: z.string(), + metadata: z.record(z.string()), + type: z.literal("checkbox").default("checkbox"), + slug: z.string(), + name: z.string(), + organizationId: z.string(), + properties: CustomFieldCheckboxProperties$outboundSchema, +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + modifiedAt: "modified_at", + organizationId: "organization_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldCheckbox$ { + /** @deprecated use `CustomFieldCheckbox$inboundSchema` instead. */ + export const inboundSchema = CustomFieldCheckbox$inboundSchema; + /** @deprecated use `CustomFieldCheckbox$outboundSchema` instead. */ + export const outboundSchema = CustomFieldCheckbox$outboundSchema; + /** @deprecated use `CustomFieldCheckbox$Outbound` instead. */ + export type Outbound = CustomFieldCheckbox$Outbound; +} diff --git a/src/models/components/customfieldcheckboxproperties.ts b/src/models/components/customfieldcheckboxproperties.ts new file mode 100644 index 00000000..0300f5b1 --- /dev/null +++ b/src/models/components/customfieldcheckboxproperties.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; + +export type CustomFieldCheckboxProperties = { + formLabel?: string | undefined; + formHelpText?: string | undefined; + formPlaceholder?: string | undefined; +}; + +/** @internal */ +export const CustomFieldCheckboxProperties$inboundSchema: z.ZodType< + CustomFieldCheckboxProperties, + z.ZodTypeDef, + unknown +> = z.object({ + form_label: z.string().optional(), + form_help_text: z.string().optional(), + form_placeholder: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "form_label": "formLabel", + "form_help_text": "formHelpText", + "form_placeholder": "formPlaceholder", + }); +}); + +/** @internal */ +export type CustomFieldCheckboxProperties$Outbound = { + form_label?: string | undefined; + form_help_text?: string | undefined; + form_placeholder?: string | undefined; +}; + +/** @internal */ +export const CustomFieldCheckboxProperties$outboundSchema: z.ZodType< + CustomFieldCheckboxProperties$Outbound, + z.ZodTypeDef, + CustomFieldCheckboxProperties +> = z.object({ + formLabel: z.string().optional(), + formHelpText: z.string().optional(), + formPlaceholder: z.string().optional(), +}).transform((v) => { + return remap$(v, { + formLabel: "form_label", + formHelpText: "form_help_text", + formPlaceholder: "form_placeholder", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldCheckboxProperties$ { + /** @deprecated use `CustomFieldCheckboxProperties$inboundSchema` instead. */ + export const inboundSchema = CustomFieldCheckboxProperties$inboundSchema; + /** @deprecated use `CustomFieldCheckboxProperties$outboundSchema` instead. */ + export const outboundSchema = CustomFieldCheckboxProperties$outboundSchema; + /** @deprecated use `CustomFieldCheckboxProperties$Outbound` instead. */ + export type Outbound = CustomFieldCheckboxProperties$Outbound; +} diff --git a/src/models/components/customfieldcreate.ts b/src/models/components/customfieldcreate.ts new file mode 100644 index 00000000..d52147a0 --- /dev/null +++ b/src/models/components/customfieldcreate.ts @@ -0,0 +1,121 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + CustomFieldCreateCheckbox, + CustomFieldCreateCheckbox$inboundSchema, + CustomFieldCreateCheckbox$Outbound, + CustomFieldCreateCheckbox$outboundSchema, +} from "./customfieldcreatecheckbox.js"; +import { + CustomFieldCreateDate, + CustomFieldCreateDate$inboundSchema, + CustomFieldCreateDate$Outbound, + CustomFieldCreateDate$outboundSchema, +} from "./customfieldcreatedate.js"; +import { + CustomFieldCreateNumber, + CustomFieldCreateNumber$inboundSchema, + CustomFieldCreateNumber$Outbound, + CustomFieldCreateNumber$outboundSchema, +} from "./customfieldcreatenumber.js"; +import { + CustomFieldCreateSelect, + CustomFieldCreateSelect$inboundSchema, + CustomFieldCreateSelect$Outbound, + CustomFieldCreateSelect$outboundSchema, +} from "./customfieldcreateselect.js"; +import { + CustomFieldCreateText, + CustomFieldCreateText$inboundSchema, + CustomFieldCreateText$Outbound, + CustomFieldCreateText$outboundSchema, +} from "./customfieldcreatetext.js"; + +export type CustomFieldCreate = + | (CustomFieldCreateCheckbox & { type: "checkbox" }) + | (CustomFieldCreateDate & { type: "date" }) + | (CustomFieldCreateNumber & { type: "number" }) + | (CustomFieldCreateSelect & { type: "select" }) + | (CustomFieldCreateText & { type: "text" }); + +/** @internal */ +export const CustomFieldCreate$inboundSchema: z.ZodType< + CustomFieldCreate, + z.ZodTypeDef, + unknown +> = z.union([ + CustomFieldCreateCheckbox$inboundSchema.and( + z.object({ type: z.literal("checkbox") }).transform((v) => ({ + type: v.type, + })), + ), + CustomFieldCreateDate$inboundSchema.and( + z.object({ type: z.literal("date") }).transform((v) => ({ type: v.type })), + ), + CustomFieldCreateNumber$inboundSchema.and( + z.object({ type: z.literal("number") }).transform((v) => ({ + type: v.type, + })), + ), + CustomFieldCreateSelect$inboundSchema.and( + z.object({ type: z.literal("select") }).transform((v) => ({ + type: v.type, + })), + ), + CustomFieldCreateText$inboundSchema.and( + z.object({ type: z.literal("text") }).transform((v) => ({ type: v.type })), + ), +]); + +/** @internal */ +export type CustomFieldCreate$Outbound = + | (CustomFieldCreateCheckbox$Outbound & { type: "checkbox" }) + | (CustomFieldCreateDate$Outbound & { type: "date" }) + | (CustomFieldCreateNumber$Outbound & { type: "number" }) + | (CustomFieldCreateSelect$Outbound & { type: "select" }) + | (CustomFieldCreateText$Outbound & { type: "text" }); + +/** @internal */ +export const CustomFieldCreate$outboundSchema: z.ZodType< + CustomFieldCreate$Outbound, + z.ZodTypeDef, + CustomFieldCreate +> = z.union([ + CustomFieldCreateCheckbox$outboundSchema.and( + z.object({ type: z.literal("checkbox") }).transform((v) => ({ + type: v.type, + })), + ), + CustomFieldCreateDate$outboundSchema.and( + z.object({ type: z.literal("date") }).transform((v) => ({ type: v.type })), + ), + CustomFieldCreateNumber$outboundSchema.and( + z.object({ type: z.literal("number") }).transform((v) => ({ + type: v.type, + })), + ), + CustomFieldCreateSelect$outboundSchema.and( + z.object({ type: z.literal("select") }).transform((v) => ({ + type: v.type, + })), + ), + CustomFieldCreateText$outboundSchema.and( + z.object({ type: z.literal("text") }).transform((v) => ({ type: v.type })), + ), +]); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldCreate$ { + /** @deprecated use `CustomFieldCreate$inboundSchema` instead. */ + export const inboundSchema = CustomFieldCreate$inboundSchema; + /** @deprecated use `CustomFieldCreate$outboundSchema` instead. */ + export const outboundSchema = CustomFieldCreate$outboundSchema; + /** @deprecated use `CustomFieldCreate$Outbound` instead. */ + export type Outbound = CustomFieldCreate$Outbound; +} diff --git a/src/models/components/customfieldcreatecheckbox.ts b/src/models/components/customfieldcreatecheckbox.ts new file mode 100644 index 00000000..4159967d --- /dev/null +++ b/src/models/components/customfieldcreatecheckbox.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { + CustomFieldCheckboxProperties, + CustomFieldCheckboxProperties$inboundSchema, + CustomFieldCheckboxProperties$Outbound, + CustomFieldCheckboxProperties$outboundSchema, +} from "./customfieldcheckboxproperties.js"; + +export const CustomFieldCreateCheckboxType = { + Checkbox: "checkbox", +} as const; +export type CustomFieldCreateCheckboxType = ClosedEnum< + typeof CustomFieldCreateCheckboxType +>; + +/** + * Schema to create a custom field of type checkbox. + */ +export type CustomFieldCreateCheckbox = { + /** + * Key-value object allowing you to store additional information. + * + * @remarks + * + * The key must be a string with a maximum length of **40 characters**. + * The value must be a string with a maximum length of **500 characters**. + * You can store up to **50 key-value pairs**. + */ + metadata?: { [k: string]: string } | undefined; + type?: "checkbox" | undefined; + /** + * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. + */ + slug: string; + /** + * Name of the custom field. + */ + name: string; + /** + * The ID of the organization owning the custom field. **Required unless you use an organization token.** + */ + organizationId?: string | null | undefined; + properties: CustomFieldCheckboxProperties; +}; + +/** @internal */ +export const CustomFieldCreateCheckboxType$inboundSchema: z.ZodNativeEnum< + typeof CustomFieldCreateCheckboxType +> = z.nativeEnum(CustomFieldCreateCheckboxType); + +/** @internal */ +export const CustomFieldCreateCheckboxType$outboundSchema: z.ZodNativeEnum< + typeof CustomFieldCreateCheckboxType +> = CustomFieldCreateCheckboxType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldCreateCheckboxType$ { + /** @deprecated use `CustomFieldCreateCheckboxType$inboundSchema` instead. */ + export const inboundSchema = CustomFieldCreateCheckboxType$inboundSchema; + /** @deprecated use `CustomFieldCreateCheckboxType$outboundSchema` instead. */ + export const outboundSchema = CustomFieldCreateCheckboxType$outboundSchema; +} + +/** @internal */ +export const CustomFieldCreateCheckbox$inboundSchema: z.ZodType< + CustomFieldCreateCheckbox, + z.ZodTypeDef, + unknown +> = z.object({ + metadata: z.record(z.string()).optional(), + type: z.literal("checkbox").optional(), + slug: z.string(), + name: z.string(), + organization_id: z.nullable(z.string()).optional(), + properties: CustomFieldCheckboxProperties$inboundSchema, +}).transform((v) => { + return remap$(v, { + "organization_id": "organizationId", + }); +}); + +/** @internal */ +export type CustomFieldCreateCheckbox$Outbound = { + metadata?: { [k: string]: string } | undefined; + type: "checkbox"; + slug: string; + name: string; + organization_id?: string | null | undefined; + properties: CustomFieldCheckboxProperties$Outbound; +}; + +/** @internal */ +export const CustomFieldCreateCheckbox$outboundSchema: z.ZodType< + CustomFieldCreateCheckbox$Outbound, + z.ZodTypeDef, + CustomFieldCreateCheckbox +> = z.object({ + metadata: z.record(z.string()).optional(), + type: z.literal("checkbox").default("checkbox"), + slug: z.string(), + name: z.string(), + organizationId: z.nullable(z.string()).optional(), + properties: CustomFieldCheckboxProperties$outboundSchema, +}).transform((v) => { + return remap$(v, { + organizationId: "organization_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldCreateCheckbox$ { + /** @deprecated use `CustomFieldCreateCheckbox$inboundSchema` instead. */ + export const inboundSchema = CustomFieldCreateCheckbox$inboundSchema; + /** @deprecated use `CustomFieldCreateCheckbox$outboundSchema` instead. */ + export const outboundSchema = CustomFieldCreateCheckbox$outboundSchema; + /** @deprecated use `CustomFieldCreateCheckbox$Outbound` instead. */ + export type Outbound = CustomFieldCreateCheckbox$Outbound; +} diff --git a/src/models/components/customfieldcreatedate.ts b/src/models/components/customfieldcreatedate.ts new file mode 100644 index 00000000..05c5b545 --- /dev/null +++ b/src/models/components/customfieldcreatedate.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { + CustomFieldDateProperties, + CustomFieldDateProperties$inboundSchema, + CustomFieldDateProperties$Outbound, + CustomFieldDateProperties$outboundSchema, +} from "./customfielddateproperties.js"; + +export const CustomFieldCreateDateType = { + Date: "date", +} as const; +export type CustomFieldCreateDateType = ClosedEnum< + typeof CustomFieldCreateDateType +>; + +/** + * Schema to create a custom field of type date. + */ +export type CustomFieldCreateDate = { + /** + * Key-value object allowing you to store additional information. + * + * @remarks + * + * The key must be a string with a maximum length of **40 characters**. + * The value must be a string with a maximum length of **500 characters**. + * You can store up to **50 key-value pairs**. + */ + metadata?: { [k: string]: string } | undefined; + type?: "date" | undefined; + /** + * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. + */ + slug: string; + /** + * Name of the custom field. + */ + name: string; + /** + * The ID of the organization owning the custom field. **Required unless you use an organization token.** + */ + organizationId?: string | null | undefined; + properties: CustomFieldDateProperties; +}; + +/** @internal */ +export const CustomFieldCreateDateType$inboundSchema: z.ZodNativeEnum< + typeof CustomFieldCreateDateType +> = z.nativeEnum(CustomFieldCreateDateType); + +/** @internal */ +export const CustomFieldCreateDateType$outboundSchema: z.ZodNativeEnum< + typeof CustomFieldCreateDateType +> = CustomFieldCreateDateType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldCreateDateType$ { + /** @deprecated use `CustomFieldCreateDateType$inboundSchema` instead. */ + export const inboundSchema = CustomFieldCreateDateType$inboundSchema; + /** @deprecated use `CustomFieldCreateDateType$outboundSchema` instead. */ + export const outboundSchema = CustomFieldCreateDateType$outboundSchema; +} + +/** @internal */ +export const CustomFieldCreateDate$inboundSchema: z.ZodType< + CustomFieldCreateDate, + z.ZodTypeDef, + unknown +> = z.object({ + metadata: z.record(z.string()).optional(), + type: z.literal("date").optional(), + slug: z.string(), + name: z.string(), + organization_id: z.nullable(z.string()).optional(), + properties: CustomFieldDateProperties$inboundSchema, +}).transform((v) => { + return remap$(v, { + "organization_id": "organizationId", + }); +}); + +/** @internal */ +export type CustomFieldCreateDate$Outbound = { + metadata?: { [k: string]: string } | undefined; + type: "date"; + slug: string; + name: string; + organization_id?: string | null | undefined; + properties: CustomFieldDateProperties$Outbound; +}; + +/** @internal */ +export const CustomFieldCreateDate$outboundSchema: z.ZodType< + CustomFieldCreateDate$Outbound, + z.ZodTypeDef, + CustomFieldCreateDate +> = z.object({ + metadata: z.record(z.string()).optional(), + type: z.literal("date").default("date"), + slug: z.string(), + name: z.string(), + organizationId: z.nullable(z.string()).optional(), + properties: CustomFieldDateProperties$outboundSchema, +}).transform((v) => { + return remap$(v, { + organizationId: "organization_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldCreateDate$ { + /** @deprecated use `CustomFieldCreateDate$inboundSchema` instead. */ + export const inboundSchema = CustomFieldCreateDate$inboundSchema; + /** @deprecated use `CustomFieldCreateDate$outboundSchema` instead. */ + export const outboundSchema = CustomFieldCreateDate$outboundSchema; + /** @deprecated use `CustomFieldCreateDate$Outbound` instead. */ + export type Outbound = CustomFieldCreateDate$Outbound; +} diff --git a/src/models/components/customfieldcreatenumber.ts b/src/models/components/customfieldcreatenumber.ts new file mode 100644 index 00000000..dd77581e --- /dev/null +++ b/src/models/components/customfieldcreatenumber.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { + CustomFieldNumberProperties, + CustomFieldNumberProperties$inboundSchema, + CustomFieldNumberProperties$Outbound, + CustomFieldNumberProperties$outboundSchema, +} from "./customfieldnumberproperties.js"; + +export const CustomFieldCreateNumberType = { + Number: "number", +} as const; +export type CustomFieldCreateNumberType = ClosedEnum< + typeof CustomFieldCreateNumberType +>; + +/** + * Schema to create a custom field of type number. + */ +export type CustomFieldCreateNumber = { + /** + * Key-value object allowing you to store additional information. + * + * @remarks + * + * The key must be a string with a maximum length of **40 characters**. + * The value must be a string with a maximum length of **500 characters**. + * You can store up to **50 key-value pairs**. + */ + metadata?: { [k: string]: string } | undefined; + type?: "number" | undefined; + /** + * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. + */ + slug: string; + /** + * Name of the custom field. + */ + name: string; + /** + * The ID of the organization owning the custom field. **Required unless you use an organization token.** + */ + organizationId?: string | null | undefined; + properties: CustomFieldNumberProperties; +}; + +/** @internal */ +export const CustomFieldCreateNumberType$inboundSchema: z.ZodNativeEnum< + typeof CustomFieldCreateNumberType +> = z.nativeEnum(CustomFieldCreateNumberType); + +/** @internal */ +export const CustomFieldCreateNumberType$outboundSchema: z.ZodNativeEnum< + typeof CustomFieldCreateNumberType +> = CustomFieldCreateNumberType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldCreateNumberType$ { + /** @deprecated use `CustomFieldCreateNumberType$inboundSchema` instead. */ + export const inboundSchema = CustomFieldCreateNumberType$inboundSchema; + /** @deprecated use `CustomFieldCreateNumberType$outboundSchema` instead. */ + export const outboundSchema = CustomFieldCreateNumberType$outboundSchema; +} + +/** @internal */ +export const CustomFieldCreateNumber$inboundSchema: z.ZodType< + CustomFieldCreateNumber, + z.ZodTypeDef, + unknown +> = z.object({ + metadata: z.record(z.string()).optional(), + type: z.literal("number").optional(), + slug: z.string(), + name: z.string(), + organization_id: z.nullable(z.string()).optional(), + properties: CustomFieldNumberProperties$inboundSchema, +}).transform((v) => { + return remap$(v, { + "organization_id": "organizationId", + }); +}); + +/** @internal */ +export type CustomFieldCreateNumber$Outbound = { + metadata?: { [k: string]: string } | undefined; + type: "number"; + slug: string; + name: string; + organization_id?: string | null | undefined; + properties: CustomFieldNumberProperties$Outbound; +}; + +/** @internal */ +export const CustomFieldCreateNumber$outboundSchema: z.ZodType< + CustomFieldCreateNumber$Outbound, + z.ZodTypeDef, + CustomFieldCreateNumber +> = z.object({ + metadata: z.record(z.string()).optional(), + type: z.literal("number").default("number"), + slug: z.string(), + name: z.string(), + organizationId: z.nullable(z.string()).optional(), + properties: CustomFieldNumberProperties$outboundSchema, +}).transform((v) => { + return remap$(v, { + organizationId: "organization_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldCreateNumber$ { + /** @deprecated use `CustomFieldCreateNumber$inboundSchema` instead. */ + export const inboundSchema = CustomFieldCreateNumber$inboundSchema; + /** @deprecated use `CustomFieldCreateNumber$outboundSchema` instead. */ + export const outboundSchema = CustomFieldCreateNumber$outboundSchema; + /** @deprecated use `CustomFieldCreateNumber$Outbound` instead. */ + export type Outbound = CustomFieldCreateNumber$Outbound; +} diff --git a/src/models/components/customfieldcreateselect.ts b/src/models/components/customfieldcreateselect.ts new file mode 100644 index 00000000..2603fc4a --- /dev/null +++ b/src/models/components/customfieldcreateselect.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { + CustomFieldSelectProperties, + CustomFieldSelectProperties$inboundSchema, + CustomFieldSelectProperties$Outbound, + CustomFieldSelectProperties$outboundSchema, +} from "./customfieldselectproperties.js"; + +export const CustomFieldCreateSelectType = { + Select: "select", +} as const; +export type CustomFieldCreateSelectType = ClosedEnum< + typeof CustomFieldCreateSelectType +>; + +/** + * Schema to create a custom field of type select. + */ +export type CustomFieldCreateSelect = { + /** + * Key-value object allowing you to store additional information. + * + * @remarks + * + * The key must be a string with a maximum length of **40 characters**. + * The value must be a string with a maximum length of **500 characters**. + * You can store up to **50 key-value pairs**. + */ + metadata?: { [k: string]: string } | undefined; + type?: "select" | undefined; + /** + * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. + */ + slug: string; + /** + * Name of the custom field. + */ + name: string; + /** + * The ID of the organization owning the custom field. **Required unless you use an organization token.** + */ + organizationId?: string | null | undefined; + properties: CustomFieldSelectProperties; +}; + +/** @internal */ +export const CustomFieldCreateSelectType$inboundSchema: z.ZodNativeEnum< + typeof CustomFieldCreateSelectType +> = z.nativeEnum(CustomFieldCreateSelectType); + +/** @internal */ +export const CustomFieldCreateSelectType$outboundSchema: z.ZodNativeEnum< + typeof CustomFieldCreateSelectType +> = CustomFieldCreateSelectType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldCreateSelectType$ { + /** @deprecated use `CustomFieldCreateSelectType$inboundSchema` instead. */ + export const inboundSchema = CustomFieldCreateSelectType$inboundSchema; + /** @deprecated use `CustomFieldCreateSelectType$outboundSchema` instead. */ + export const outboundSchema = CustomFieldCreateSelectType$outboundSchema; +} + +/** @internal */ +export const CustomFieldCreateSelect$inboundSchema: z.ZodType< + CustomFieldCreateSelect, + z.ZodTypeDef, + unknown +> = z.object({ + metadata: z.record(z.string()).optional(), + type: z.literal("select").optional(), + slug: z.string(), + name: z.string(), + organization_id: z.nullable(z.string()).optional(), + properties: CustomFieldSelectProperties$inboundSchema, +}).transform((v) => { + return remap$(v, { + "organization_id": "organizationId", + }); +}); + +/** @internal */ +export type CustomFieldCreateSelect$Outbound = { + metadata?: { [k: string]: string } | undefined; + type: "select"; + slug: string; + name: string; + organization_id?: string | null | undefined; + properties: CustomFieldSelectProperties$Outbound; +}; + +/** @internal */ +export const CustomFieldCreateSelect$outboundSchema: z.ZodType< + CustomFieldCreateSelect$Outbound, + z.ZodTypeDef, + CustomFieldCreateSelect +> = z.object({ + metadata: z.record(z.string()).optional(), + type: z.literal("select").default("select"), + slug: z.string(), + name: z.string(), + organizationId: z.nullable(z.string()).optional(), + properties: CustomFieldSelectProperties$outboundSchema, +}).transform((v) => { + return remap$(v, { + organizationId: "organization_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldCreateSelect$ { + /** @deprecated use `CustomFieldCreateSelect$inboundSchema` instead. */ + export const inboundSchema = CustomFieldCreateSelect$inboundSchema; + /** @deprecated use `CustomFieldCreateSelect$outboundSchema` instead. */ + export const outboundSchema = CustomFieldCreateSelect$outboundSchema; + /** @deprecated use `CustomFieldCreateSelect$Outbound` instead. */ + export type Outbound = CustomFieldCreateSelect$Outbound; +} diff --git a/src/models/components/customfieldcreatetext.ts b/src/models/components/customfieldcreatetext.ts new file mode 100644 index 00000000..a9bef513 --- /dev/null +++ b/src/models/components/customfieldcreatetext.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { + CustomFieldTextProperties, + CustomFieldTextProperties$inboundSchema, + CustomFieldTextProperties$Outbound, + CustomFieldTextProperties$outboundSchema, +} from "./customfieldtextproperties.js"; + +export const CustomFieldCreateTextType = { + Text: "text", +} as const; +export type CustomFieldCreateTextType = ClosedEnum< + typeof CustomFieldCreateTextType +>; + +/** + * Schema to create a custom field of type text. + */ +export type CustomFieldCreateText = { + /** + * Key-value object allowing you to store additional information. + * + * @remarks + * + * The key must be a string with a maximum length of **40 characters**. + * The value must be a string with a maximum length of **500 characters**. + * You can store up to **50 key-value pairs**. + */ + metadata?: { [k: string]: string } | undefined; + type?: "text" | undefined; + /** + * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. + */ + slug: string; + /** + * Name of the custom field. + */ + name: string; + /** + * The ID of the organization owning the custom field. **Required unless you use an organization token.** + */ + organizationId?: string | null | undefined; + properties: CustomFieldTextProperties; +}; + +/** @internal */ +export const CustomFieldCreateTextType$inboundSchema: z.ZodNativeEnum< + typeof CustomFieldCreateTextType +> = z.nativeEnum(CustomFieldCreateTextType); + +/** @internal */ +export const CustomFieldCreateTextType$outboundSchema: z.ZodNativeEnum< + typeof CustomFieldCreateTextType +> = CustomFieldCreateTextType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldCreateTextType$ { + /** @deprecated use `CustomFieldCreateTextType$inboundSchema` instead. */ + export const inboundSchema = CustomFieldCreateTextType$inboundSchema; + /** @deprecated use `CustomFieldCreateTextType$outboundSchema` instead. */ + export const outboundSchema = CustomFieldCreateTextType$outboundSchema; +} + +/** @internal */ +export const CustomFieldCreateText$inboundSchema: z.ZodType< + CustomFieldCreateText, + z.ZodTypeDef, + unknown +> = z.object({ + metadata: z.record(z.string()).optional(), + type: z.literal("text").optional(), + slug: z.string(), + name: z.string(), + organization_id: z.nullable(z.string()).optional(), + properties: CustomFieldTextProperties$inboundSchema, +}).transform((v) => { + return remap$(v, { + "organization_id": "organizationId", + }); +}); + +/** @internal */ +export type CustomFieldCreateText$Outbound = { + metadata?: { [k: string]: string } | undefined; + type: "text"; + slug: string; + name: string; + organization_id?: string | null | undefined; + properties: CustomFieldTextProperties$Outbound; +}; + +/** @internal */ +export const CustomFieldCreateText$outboundSchema: z.ZodType< + CustomFieldCreateText$Outbound, + z.ZodTypeDef, + CustomFieldCreateText +> = z.object({ + metadata: z.record(z.string()).optional(), + type: z.literal("text").default("text"), + slug: z.string(), + name: z.string(), + organizationId: z.nullable(z.string()).optional(), + properties: CustomFieldTextProperties$outboundSchema, +}).transform((v) => { + return remap$(v, { + organizationId: "organization_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldCreateText$ { + /** @deprecated use `CustomFieldCreateText$inboundSchema` instead. */ + export const inboundSchema = CustomFieldCreateText$inboundSchema; + /** @deprecated use `CustomFieldCreateText$outboundSchema` instead. */ + export const outboundSchema = CustomFieldCreateText$outboundSchema; + /** @deprecated use `CustomFieldCreateText$Outbound` instead. */ + export type Outbound = CustomFieldCreateText$Outbound; +} diff --git a/src/models/components/customfielddate.ts b/src/models/components/customfielddate.ts new file mode 100644 index 00000000..9a34a93b --- /dev/null +++ b/src/models/components/customfielddate.ts @@ -0,0 +1,146 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { + CustomFieldDateProperties, + CustomFieldDateProperties$inboundSchema, + CustomFieldDateProperties$Outbound, + CustomFieldDateProperties$outboundSchema, +} from "./customfielddateproperties.js"; + +export const CustomFieldDateType = { + Date: "date", +} as const; +export type CustomFieldDateType = ClosedEnum; + +/** + * Schema for a custom field of type date. + */ +export type CustomFieldDate = { + /** + * Creation timestamp of the object. + */ + createdAt: Date; + /** + * Last modification timestamp of the object. + */ + modifiedAt: Date | null; + /** + * The ID of the object. + */ + id: string; + metadata: { [k: string]: string }; + type?: "date" | undefined; + /** + * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. + */ + slug: string; + /** + * Name of the custom field. + */ + name: string; + /** + * The ID of the organization owning the custom field. + */ + organizationId: string; + properties: CustomFieldDateProperties; +}; + +/** @internal */ +export const CustomFieldDateType$inboundSchema: z.ZodNativeEnum< + typeof CustomFieldDateType +> = z.nativeEnum(CustomFieldDateType); + +/** @internal */ +export const CustomFieldDateType$outboundSchema: z.ZodNativeEnum< + typeof CustomFieldDateType +> = CustomFieldDateType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldDateType$ { + /** @deprecated use `CustomFieldDateType$inboundSchema` instead. */ + export const inboundSchema = CustomFieldDateType$inboundSchema; + /** @deprecated use `CustomFieldDateType$outboundSchema` instead. */ + export const outboundSchema = CustomFieldDateType$outboundSchema; +} + +/** @internal */ +export const CustomFieldDate$inboundSchema: z.ZodType< + CustomFieldDate, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), + modified_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ), + id: z.string(), + metadata: z.record(z.string()), + type: z.literal("date").optional(), + slug: z.string(), + name: z.string(), + organization_id: z.string(), + properties: CustomFieldDateProperties$inboundSchema, +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "modified_at": "modifiedAt", + "organization_id": "organizationId", + }); +}); + +/** @internal */ +export type CustomFieldDate$Outbound = { + created_at: string; + modified_at: string | null; + id: string; + metadata: { [k: string]: string }; + type: "date"; + slug: string; + name: string; + organization_id: string; + properties: CustomFieldDateProperties$Outbound; +}; + +/** @internal */ +export const CustomFieldDate$outboundSchema: z.ZodType< + CustomFieldDate$Outbound, + z.ZodTypeDef, + CustomFieldDate +> = z.object({ + createdAt: z.date().transform(v => v.toISOString()), + modifiedAt: z.nullable(z.date().transform(v => v.toISOString())), + id: z.string(), + metadata: z.record(z.string()), + type: z.literal("date").default("date"), + slug: z.string(), + name: z.string(), + organizationId: z.string(), + properties: CustomFieldDateProperties$outboundSchema, +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + modifiedAt: "modified_at", + organizationId: "organization_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldDate$ { + /** @deprecated use `CustomFieldDate$inboundSchema` instead. */ + export const inboundSchema = CustomFieldDate$inboundSchema; + /** @deprecated use `CustomFieldDate$outboundSchema` instead. */ + export const outboundSchema = CustomFieldDate$outboundSchema; + /** @deprecated use `CustomFieldDate$Outbound` instead. */ + export type Outbound = CustomFieldDate$Outbound; +} diff --git a/src/models/components/customfielddateproperties.ts b/src/models/components/customfielddateproperties.ts new file mode 100644 index 00000000..fe770f1b --- /dev/null +++ b/src/models/components/customfielddateproperties.ts @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; + +export type CustomFieldDateProperties = { + formLabel?: string | undefined; + formHelpText?: string | undefined; + formPlaceholder?: string | undefined; + ge?: number | undefined; + le?: number | undefined; +}; + +/** @internal */ +export const CustomFieldDateProperties$inboundSchema: z.ZodType< + CustomFieldDateProperties, + z.ZodTypeDef, + unknown +> = z.object({ + form_label: z.string().optional(), + form_help_text: z.string().optional(), + form_placeholder: z.string().optional(), + ge: z.number().int().optional(), + le: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "form_label": "formLabel", + "form_help_text": "formHelpText", + "form_placeholder": "formPlaceholder", + }); +}); + +/** @internal */ +export type CustomFieldDateProperties$Outbound = { + form_label?: string | undefined; + form_help_text?: string | undefined; + form_placeholder?: string | undefined; + ge?: number | undefined; + le?: number | undefined; +}; + +/** @internal */ +export const CustomFieldDateProperties$outboundSchema: z.ZodType< + CustomFieldDateProperties$Outbound, + z.ZodTypeDef, + CustomFieldDateProperties +> = z.object({ + formLabel: z.string().optional(), + formHelpText: z.string().optional(), + formPlaceholder: z.string().optional(), + ge: z.number().int().optional(), + le: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + formLabel: "form_label", + formHelpText: "form_help_text", + formPlaceholder: "form_placeholder", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldDateProperties$ { + /** @deprecated use `CustomFieldDateProperties$inboundSchema` instead. */ + export const inboundSchema = CustomFieldDateProperties$inboundSchema; + /** @deprecated use `CustomFieldDateProperties$outboundSchema` instead. */ + export const outboundSchema = CustomFieldDateProperties$outboundSchema; + /** @deprecated use `CustomFieldDateProperties$Outbound` instead. */ + export type Outbound = CustomFieldDateProperties$Outbound; +} diff --git a/src/models/components/customfieldnumber.ts b/src/models/components/customfieldnumber.ts new file mode 100644 index 00000000..6985181a --- /dev/null +++ b/src/models/components/customfieldnumber.ts @@ -0,0 +1,146 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { + CustomFieldNumberProperties, + CustomFieldNumberProperties$inboundSchema, + CustomFieldNumberProperties$Outbound, + CustomFieldNumberProperties$outboundSchema, +} from "./customfieldnumberproperties.js"; + +export const CustomFieldNumberType = { + Number: "number", +} as const; +export type CustomFieldNumberType = ClosedEnum; + +/** + * Schema for a custom field of type number. + */ +export type CustomFieldNumber = { + /** + * Creation timestamp of the object. + */ + createdAt: Date; + /** + * Last modification timestamp of the object. + */ + modifiedAt: Date | null; + /** + * The ID of the object. + */ + id: string; + metadata: { [k: string]: string }; + type?: "number" | undefined; + /** + * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. + */ + slug: string; + /** + * Name of the custom field. + */ + name: string; + /** + * The ID of the organization owning the custom field. + */ + organizationId: string; + properties: CustomFieldNumberProperties; +}; + +/** @internal */ +export const CustomFieldNumberType$inboundSchema: z.ZodNativeEnum< + typeof CustomFieldNumberType +> = z.nativeEnum(CustomFieldNumberType); + +/** @internal */ +export const CustomFieldNumberType$outboundSchema: z.ZodNativeEnum< + typeof CustomFieldNumberType +> = CustomFieldNumberType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldNumberType$ { + /** @deprecated use `CustomFieldNumberType$inboundSchema` instead. */ + export const inboundSchema = CustomFieldNumberType$inboundSchema; + /** @deprecated use `CustomFieldNumberType$outboundSchema` instead. */ + export const outboundSchema = CustomFieldNumberType$outboundSchema; +} + +/** @internal */ +export const CustomFieldNumber$inboundSchema: z.ZodType< + CustomFieldNumber, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), + modified_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ), + id: z.string(), + metadata: z.record(z.string()), + type: z.literal("number").optional(), + slug: z.string(), + name: z.string(), + organization_id: z.string(), + properties: CustomFieldNumberProperties$inboundSchema, +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "modified_at": "modifiedAt", + "organization_id": "organizationId", + }); +}); + +/** @internal */ +export type CustomFieldNumber$Outbound = { + created_at: string; + modified_at: string | null; + id: string; + metadata: { [k: string]: string }; + type: "number"; + slug: string; + name: string; + organization_id: string; + properties: CustomFieldNumberProperties$Outbound; +}; + +/** @internal */ +export const CustomFieldNumber$outboundSchema: z.ZodType< + CustomFieldNumber$Outbound, + z.ZodTypeDef, + CustomFieldNumber +> = z.object({ + createdAt: z.date().transform(v => v.toISOString()), + modifiedAt: z.nullable(z.date().transform(v => v.toISOString())), + id: z.string(), + metadata: z.record(z.string()), + type: z.literal("number").default("number"), + slug: z.string(), + name: z.string(), + organizationId: z.string(), + properties: CustomFieldNumberProperties$outboundSchema, +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + modifiedAt: "modified_at", + organizationId: "organization_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldNumber$ { + /** @deprecated use `CustomFieldNumber$inboundSchema` instead. */ + export const inboundSchema = CustomFieldNumber$inboundSchema; + /** @deprecated use `CustomFieldNumber$outboundSchema` instead. */ + export const outboundSchema = CustomFieldNumber$outboundSchema; + /** @deprecated use `CustomFieldNumber$Outbound` instead. */ + export type Outbound = CustomFieldNumber$Outbound; +} diff --git a/src/models/components/customfieldnumberproperties.ts b/src/models/components/customfieldnumberproperties.ts new file mode 100644 index 00000000..80f2e5c9 --- /dev/null +++ b/src/models/components/customfieldnumberproperties.ts @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; + +export type CustomFieldNumberProperties = { + formLabel?: string | undefined; + formHelpText?: string | undefined; + formPlaceholder?: string | undefined; + ge?: number | undefined; + le?: number | undefined; +}; + +/** @internal */ +export const CustomFieldNumberProperties$inboundSchema: z.ZodType< + CustomFieldNumberProperties, + z.ZodTypeDef, + unknown +> = z.object({ + form_label: z.string().optional(), + form_help_text: z.string().optional(), + form_placeholder: z.string().optional(), + ge: z.number().int().optional(), + le: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "form_label": "formLabel", + "form_help_text": "formHelpText", + "form_placeholder": "formPlaceholder", + }); +}); + +/** @internal */ +export type CustomFieldNumberProperties$Outbound = { + form_label?: string | undefined; + form_help_text?: string | undefined; + form_placeholder?: string | undefined; + ge?: number | undefined; + le?: number | undefined; +}; + +/** @internal */ +export const CustomFieldNumberProperties$outboundSchema: z.ZodType< + CustomFieldNumberProperties$Outbound, + z.ZodTypeDef, + CustomFieldNumberProperties +> = z.object({ + formLabel: z.string().optional(), + formHelpText: z.string().optional(), + formPlaceholder: z.string().optional(), + ge: z.number().int().optional(), + le: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + formLabel: "form_label", + formHelpText: "form_help_text", + formPlaceholder: "form_placeholder", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldNumberProperties$ { + /** @deprecated use `CustomFieldNumberProperties$inboundSchema` instead. */ + export const inboundSchema = CustomFieldNumberProperties$inboundSchema; + /** @deprecated use `CustomFieldNumberProperties$outboundSchema` instead. */ + export const outboundSchema = CustomFieldNumberProperties$outboundSchema; + /** @deprecated use `CustomFieldNumberProperties$Outbound` instead. */ + export type Outbound = CustomFieldNumberProperties$Outbound; +} diff --git a/src/models/components/customfieldselect.ts b/src/models/components/customfieldselect.ts new file mode 100644 index 00000000..734a4931 --- /dev/null +++ b/src/models/components/customfieldselect.ts @@ -0,0 +1,146 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { + CustomFieldSelectProperties, + CustomFieldSelectProperties$inboundSchema, + CustomFieldSelectProperties$Outbound, + CustomFieldSelectProperties$outboundSchema, +} from "./customfieldselectproperties.js"; + +export const CustomFieldSelectType = { + Select: "select", +} as const; +export type CustomFieldSelectType = ClosedEnum; + +/** + * Schema for a custom field of type select. + */ +export type CustomFieldSelect = { + /** + * Creation timestamp of the object. + */ + createdAt: Date; + /** + * Last modification timestamp of the object. + */ + modifiedAt: Date | null; + /** + * The ID of the object. + */ + id: string; + metadata: { [k: string]: string }; + type?: "select" | undefined; + /** + * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. + */ + slug: string; + /** + * Name of the custom field. + */ + name: string; + /** + * The ID of the organization owning the custom field. + */ + organizationId: string; + properties: CustomFieldSelectProperties; +}; + +/** @internal */ +export const CustomFieldSelectType$inboundSchema: z.ZodNativeEnum< + typeof CustomFieldSelectType +> = z.nativeEnum(CustomFieldSelectType); + +/** @internal */ +export const CustomFieldSelectType$outboundSchema: z.ZodNativeEnum< + typeof CustomFieldSelectType +> = CustomFieldSelectType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldSelectType$ { + /** @deprecated use `CustomFieldSelectType$inboundSchema` instead. */ + export const inboundSchema = CustomFieldSelectType$inboundSchema; + /** @deprecated use `CustomFieldSelectType$outboundSchema` instead. */ + export const outboundSchema = CustomFieldSelectType$outboundSchema; +} + +/** @internal */ +export const CustomFieldSelect$inboundSchema: z.ZodType< + CustomFieldSelect, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), + modified_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ), + id: z.string(), + metadata: z.record(z.string()), + type: z.literal("select").optional(), + slug: z.string(), + name: z.string(), + organization_id: z.string(), + properties: CustomFieldSelectProperties$inboundSchema, +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "modified_at": "modifiedAt", + "organization_id": "organizationId", + }); +}); + +/** @internal */ +export type CustomFieldSelect$Outbound = { + created_at: string; + modified_at: string | null; + id: string; + metadata: { [k: string]: string }; + type: "select"; + slug: string; + name: string; + organization_id: string; + properties: CustomFieldSelectProperties$Outbound; +}; + +/** @internal */ +export const CustomFieldSelect$outboundSchema: z.ZodType< + CustomFieldSelect$Outbound, + z.ZodTypeDef, + CustomFieldSelect +> = z.object({ + createdAt: z.date().transform(v => v.toISOString()), + modifiedAt: z.nullable(z.date().transform(v => v.toISOString())), + id: z.string(), + metadata: z.record(z.string()), + type: z.literal("select").default("select"), + slug: z.string(), + name: z.string(), + organizationId: z.string(), + properties: CustomFieldSelectProperties$outboundSchema, +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + modifiedAt: "modified_at", + organizationId: "organization_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldSelect$ { + /** @deprecated use `CustomFieldSelect$inboundSchema` instead. */ + export const inboundSchema = CustomFieldSelect$inboundSchema; + /** @deprecated use `CustomFieldSelect$outboundSchema` instead. */ + export const outboundSchema = CustomFieldSelect$outboundSchema; + /** @deprecated use `CustomFieldSelect$Outbound` instead. */ + export type Outbound = CustomFieldSelect$Outbound; +} diff --git a/src/models/components/customfieldselectoption.ts b/src/models/components/customfieldselectoption.ts new file mode 100644 index 00000000..05643d23 --- /dev/null +++ b/src/models/components/customfieldselectoption.ts @@ -0,0 +1,49 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type CustomFieldSelectOption = { + value: string; + label: string; +}; + +/** @internal */ +export const CustomFieldSelectOption$inboundSchema: z.ZodType< + CustomFieldSelectOption, + z.ZodTypeDef, + unknown +> = z.object({ + value: z.string(), + label: z.string(), +}); + +/** @internal */ +export type CustomFieldSelectOption$Outbound = { + value: string; + label: string; +}; + +/** @internal */ +export const CustomFieldSelectOption$outboundSchema: z.ZodType< + CustomFieldSelectOption$Outbound, + z.ZodTypeDef, + CustomFieldSelectOption +> = z.object({ + value: z.string(), + label: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldSelectOption$ { + /** @deprecated use `CustomFieldSelectOption$inboundSchema` instead. */ + export const inboundSchema = CustomFieldSelectOption$inboundSchema; + /** @deprecated use `CustomFieldSelectOption$outboundSchema` instead. */ + export const outboundSchema = CustomFieldSelectOption$outboundSchema; + /** @deprecated use `CustomFieldSelectOption$Outbound` instead. */ + export type Outbound = CustomFieldSelectOption$Outbound; +} diff --git a/src/models/components/customfieldselectproperties.ts b/src/models/components/customfieldselectproperties.ts new file mode 100644 index 00000000..8d1c75c4 --- /dev/null +++ b/src/models/components/customfieldselectproperties.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { + CustomFieldSelectOption, + CustomFieldSelectOption$inboundSchema, + CustomFieldSelectOption$Outbound, + CustomFieldSelectOption$outboundSchema, +} from "./customfieldselectoption.js"; + +export type CustomFieldSelectProperties = { + formLabel?: string | undefined; + formHelpText?: string | undefined; + formPlaceholder?: string | undefined; + options: Array; +}; + +/** @internal */ +export const CustomFieldSelectProperties$inboundSchema: z.ZodType< + CustomFieldSelectProperties, + z.ZodTypeDef, + unknown +> = z.object({ + form_label: z.string().optional(), + form_help_text: z.string().optional(), + form_placeholder: z.string().optional(), + options: z.array(CustomFieldSelectOption$inboundSchema), +}).transform((v) => { + return remap$(v, { + "form_label": "formLabel", + "form_help_text": "formHelpText", + "form_placeholder": "formPlaceholder", + }); +}); + +/** @internal */ +export type CustomFieldSelectProperties$Outbound = { + form_label?: string | undefined; + form_help_text?: string | undefined; + form_placeholder?: string | undefined; + options: Array; +}; + +/** @internal */ +export const CustomFieldSelectProperties$outboundSchema: z.ZodType< + CustomFieldSelectProperties$Outbound, + z.ZodTypeDef, + CustomFieldSelectProperties +> = z.object({ + formLabel: z.string().optional(), + formHelpText: z.string().optional(), + formPlaceholder: z.string().optional(), + options: z.array(CustomFieldSelectOption$outboundSchema), +}).transform((v) => { + return remap$(v, { + formLabel: "form_label", + formHelpText: "form_help_text", + formPlaceholder: "form_placeholder", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldSelectProperties$ { + /** @deprecated use `CustomFieldSelectProperties$inboundSchema` instead. */ + export const inboundSchema = CustomFieldSelectProperties$inboundSchema; + /** @deprecated use `CustomFieldSelectProperties$outboundSchema` instead. */ + export const outboundSchema = CustomFieldSelectProperties$outboundSchema; + /** @deprecated use `CustomFieldSelectProperties$Outbound` instead. */ + export type Outbound = CustomFieldSelectProperties$Outbound; +} diff --git a/src/models/components/customfieldsortproperty.ts b/src/models/components/customfieldsortproperty.ts new file mode 100644 index 00000000..32f62638 --- /dev/null +++ b/src/models/components/customfieldsortproperty.ts @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +export const CustomFieldSortProperty = { + CreatedAt: "created_at", + MinusCreatedAt: "-created_at", + Slug: "slug", + MinusSlug: "-slug", + Name: "name", + MinusName: "-name", + Type: "type", + MinusType: "-type", +} as const; +export type CustomFieldSortProperty = ClosedEnum< + typeof CustomFieldSortProperty +>; + +/** @internal */ +export const CustomFieldSortProperty$inboundSchema: z.ZodNativeEnum< + typeof CustomFieldSortProperty +> = z.nativeEnum(CustomFieldSortProperty); + +/** @internal */ +export const CustomFieldSortProperty$outboundSchema: z.ZodNativeEnum< + typeof CustomFieldSortProperty +> = CustomFieldSortProperty$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldSortProperty$ { + /** @deprecated use `CustomFieldSortProperty$inboundSchema` instead. */ + export const inboundSchema = CustomFieldSortProperty$inboundSchema; + /** @deprecated use `CustomFieldSortProperty$outboundSchema` instead. */ + export const outboundSchema = CustomFieldSortProperty$outboundSchema; +} diff --git a/src/models/components/customfieldtext.ts b/src/models/components/customfieldtext.ts new file mode 100644 index 00000000..c3ed755d --- /dev/null +++ b/src/models/components/customfieldtext.ts @@ -0,0 +1,146 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { + CustomFieldTextProperties, + CustomFieldTextProperties$inboundSchema, + CustomFieldTextProperties$Outbound, + CustomFieldTextProperties$outboundSchema, +} from "./customfieldtextproperties.js"; + +export const CustomFieldTextType = { + Text: "text", +} as const; +export type CustomFieldTextType = ClosedEnum; + +/** + * Schema for a custom field of type text. + */ +export type CustomFieldText = { + /** + * Creation timestamp of the object. + */ + createdAt: Date; + /** + * Last modification timestamp of the object. + */ + modifiedAt: Date | null; + /** + * The ID of the object. + */ + id: string; + metadata: { [k: string]: string }; + type?: "text" | undefined; + /** + * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization. + */ + slug: string; + /** + * Name of the custom field. + */ + name: string; + /** + * The ID of the organization owning the custom field. + */ + organizationId: string; + properties: CustomFieldTextProperties; +}; + +/** @internal */ +export const CustomFieldTextType$inboundSchema: z.ZodNativeEnum< + typeof CustomFieldTextType +> = z.nativeEnum(CustomFieldTextType); + +/** @internal */ +export const CustomFieldTextType$outboundSchema: z.ZodNativeEnum< + typeof CustomFieldTextType +> = CustomFieldTextType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldTextType$ { + /** @deprecated use `CustomFieldTextType$inboundSchema` instead. */ + export const inboundSchema = CustomFieldTextType$inboundSchema; + /** @deprecated use `CustomFieldTextType$outboundSchema` instead. */ + export const outboundSchema = CustomFieldTextType$outboundSchema; +} + +/** @internal */ +export const CustomFieldText$inboundSchema: z.ZodType< + CustomFieldText, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), + modified_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ), + id: z.string(), + metadata: z.record(z.string()), + type: z.literal("text").optional(), + slug: z.string(), + name: z.string(), + organization_id: z.string(), + properties: CustomFieldTextProperties$inboundSchema, +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "modified_at": "modifiedAt", + "organization_id": "organizationId", + }); +}); + +/** @internal */ +export type CustomFieldText$Outbound = { + created_at: string; + modified_at: string | null; + id: string; + metadata: { [k: string]: string }; + type: "text"; + slug: string; + name: string; + organization_id: string; + properties: CustomFieldTextProperties$Outbound; +}; + +/** @internal */ +export const CustomFieldText$outboundSchema: z.ZodType< + CustomFieldText$Outbound, + z.ZodTypeDef, + CustomFieldText +> = z.object({ + createdAt: z.date().transform(v => v.toISOString()), + modifiedAt: z.nullable(z.date().transform(v => v.toISOString())), + id: z.string(), + metadata: z.record(z.string()), + type: z.literal("text").default("text"), + slug: z.string(), + name: z.string(), + organizationId: z.string(), + properties: CustomFieldTextProperties$outboundSchema, +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + modifiedAt: "modified_at", + organizationId: "organization_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldText$ { + /** @deprecated use `CustomFieldText$inboundSchema` instead. */ + export const inboundSchema = CustomFieldText$inboundSchema; + /** @deprecated use `CustomFieldText$outboundSchema` instead. */ + export const outboundSchema = CustomFieldText$outboundSchema; + /** @deprecated use `CustomFieldText$Outbound` instead. */ + export type Outbound = CustomFieldText$Outbound; +} diff --git a/src/models/components/customfieldtextproperties.ts b/src/models/components/customfieldtextproperties.ts new file mode 100644 index 00000000..e443cf71 --- /dev/null +++ b/src/models/components/customfieldtextproperties.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; + +export type CustomFieldTextProperties = { + formLabel?: string | undefined; + formHelpText?: string | undefined; + formPlaceholder?: string | undefined; + textarea?: boolean | undefined; + minLength?: number | undefined; + maxLength?: number | undefined; +}; + +/** @internal */ +export const CustomFieldTextProperties$inboundSchema: z.ZodType< + CustomFieldTextProperties, + z.ZodTypeDef, + unknown +> = z.object({ + form_label: z.string().optional(), + form_help_text: z.string().optional(), + form_placeholder: z.string().optional(), + textarea: z.boolean().optional(), + min_length: z.number().int().optional(), + max_length: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "form_label": "formLabel", + "form_help_text": "formHelpText", + "form_placeholder": "formPlaceholder", + "min_length": "minLength", + "max_length": "maxLength", + }); +}); + +/** @internal */ +export type CustomFieldTextProperties$Outbound = { + form_label?: string | undefined; + form_help_text?: string | undefined; + form_placeholder?: string | undefined; + textarea?: boolean | undefined; + min_length?: number | undefined; + max_length?: number | undefined; +}; + +/** @internal */ +export const CustomFieldTextProperties$outboundSchema: z.ZodType< + CustomFieldTextProperties$Outbound, + z.ZodTypeDef, + CustomFieldTextProperties +> = z.object({ + formLabel: z.string().optional(), + formHelpText: z.string().optional(), + formPlaceholder: z.string().optional(), + textarea: z.boolean().optional(), + minLength: z.number().int().optional(), + maxLength: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + formLabel: "form_label", + formHelpText: "form_help_text", + formPlaceholder: "form_placeholder", + minLength: "min_length", + maxLength: "max_length", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldTextProperties$ { + /** @deprecated use `CustomFieldTextProperties$inboundSchema` instead. */ + export const inboundSchema = CustomFieldTextProperties$inboundSchema; + /** @deprecated use `CustomFieldTextProperties$outboundSchema` instead. */ + export const outboundSchema = CustomFieldTextProperties$outboundSchema; + /** @deprecated use `CustomFieldTextProperties$Outbound` instead. */ + export type Outbound = CustomFieldTextProperties$Outbound; +} diff --git a/src/models/components/customfieldtype.ts b/src/models/components/customfieldtype.ts new file mode 100644 index 00000000..9878229a --- /dev/null +++ b/src/models/components/customfieldtype.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +export const CustomFieldType = { + Text: "text", + Number: "number", + Date: "date", + Checkbox: "checkbox", + Select: "select", +} as const; +export type CustomFieldType = ClosedEnum; + +/** @internal */ +export const CustomFieldType$inboundSchema: z.ZodNativeEnum< + typeof CustomFieldType +> = z.nativeEnum(CustomFieldType); + +/** @internal */ +export const CustomFieldType$outboundSchema: z.ZodNativeEnum< + typeof CustomFieldType +> = CustomFieldType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldType$ { + /** @deprecated use `CustomFieldType$inboundSchema` instead. */ + export const inboundSchema = CustomFieldType$inboundSchema; + /** @deprecated use `CustomFieldType$outboundSchema` instead. */ + export const outboundSchema = CustomFieldType$outboundSchema; +} diff --git a/src/models/components/customfieldupdate.ts b/src/models/components/customfieldupdate.ts new file mode 100644 index 00000000..db60e115 --- /dev/null +++ b/src/models/components/customfieldupdate.ts @@ -0,0 +1,121 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + CustomFieldUpdateCheckbox, + CustomFieldUpdateCheckbox$inboundSchema, + CustomFieldUpdateCheckbox$Outbound, + CustomFieldUpdateCheckbox$outboundSchema, +} from "./customfieldupdatecheckbox.js"; +import { + CustomFieldUpdateDate, + CustomFieldUpdateDate$inboundSchema, + CustomFieldUpdateDate$Outbound, + CustomFieldUpdateDate$outboundSchema, +} from "./customfieldupdatedate.js"; +import { + CustomFieldUpdateNumber, + CustomFieldUpdateNumber$inboundSchema, + CustomFieldUpdateNumber$Outbound, + CustomFieldUpdateNumber$outboundSchema, +} from "./customfieldupdatenumber.js"; +import { + CustomFieldUpdateSelect, + CustomFieldUpdateSelect$inboundSchema, + CustomFieldUpdateSelect$Outbound, + CustomFieldUpdateSelect$outboundSchema, +} from "./customfieldupdateselect.js"; +import { + CustomFieldUpdateText, + CustomFieldUpdateText$inboundSchema, + CustomFieldUpdateText$Outbound, + CustomFieldUpdateText$outboundSchema, +} from "./customfieldupdatetext.js"; + +export type CustomFieldUpdate = + | (CustomFieldUpdateCheckbox & { type: "checkbox" }) + | (CustomFieldUpdateDate & { type: "date" }) + | (CustomFieldUpdateNumber & { type: "number" }) + | (CustomFieldUpdateSelect & { type: "select" }) + | (CustomFieldUpdateText & { type: "text" }); + +/** @internal */ +export const CustomFieldUpdate$inboundSchema: z.ZodType< + CustomFieldUpdate, + z.ZodTypeDef, + unknown +> = z.union([ + CustomFieldUpdateCheckbox$inboundSchema.and( + z.object({ type: z.literal("checkbox") }).transform((v) => ({ + type: v.type, + })), + ), + CustomFieldUpdateDate$inboundSchema.and( + z.object({ type: z.literal("date") }).transform((v) => ({ type: v.type })), + ), + CustomFieldUpdateNumber$inboundSchema.and( + z.object({ type: z.literal("number") }).transform((v) => ({ + type: v.type, + })), + ), + CustomFieldUpdateSelect$inboundSchema.and( + z.object({ type: z.literal("select") }).transform((v) => ({ + type: v.type, + })), + ), + CustomFieldUpdateText$inboundSchema.and( + z.object({ type: z.literal("text") }).transform((v) => ({ type: v.type })), + ), +]); + +/** @internal */ +export type CustomFieldUpdate$Outbound = + | (CustomFieldUpdateCheckbox$Outbound & { type: "checkbox" }) + | (CustomFieldUpdateDate$Outbound & { type: "date" }) + | (CustomFieldUpdateNumber$Outbound & { type: "number" }) + | (CustomFieldUpdateSelect$Outbound & { type: "select" }) + | (CustomFieldUpdateText$Outbound & { type: "text" }); + +/** @internal */ +export const CustomFieldUpdate$outboundSchema: z.ZodType< + CustomFieldUpdate$Outbound, + z.ZodTypeDef, + CustomFieldUpdate +> = z.union([ + CustomFieldUpdateCheckbox$outboundSchema.and( + z.object({ type: z.literal("checkbox") }).transform((v) => ({ + type: v.type, + })), + ), + CustomFieldUpdateDate$outboundSchema.and( + z.object({ type: z.literal("date") }).transform((v) => ({ type: v.type })), + ), + CustomFieldUpdateNumber$outboundSchema.and( + z.object({ type: z.literal("number") }).transform((v) => ({ + type: v.type, + })), + ), + CustomFieldUpdateSelect$outboundSchema.and( + z.object({ type: z.literal("select") }).transform((v) => ({ + type: v.type, + })), + ), + CustomFieldUpdateText$outboundSchema.and( + z.object({ type: z.literal("text") }).transform((v) => ({ type: v.type })), + ), +]); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldUpdate$ { + /** @deprecated use `CustomFieldUpdate$inboundSchema` instead. */ + export const inboundSchema = CustomFieldUpdate$inboundSchema; + /** @deprecated use `CustomFieldUpdate$outboundSchema` instead. */ + export const outboundSchema = CustomFieldUpdate$outboundSchema; + /** @deprecated use `CustomFieldUpdate$Outbound` instead. */ + export type Outbound = CustomFieldUpdate$Outbound; +} diff --git a/src/models/components/customfieldupdatecheckbox.ts b/src/models/components/customfieldupdatecheckbox.ts new file mode 100644 index 00000000..5b7f1867 --- /dev/null +++ b/src/models/components/customfieldupdatecheckbox.ts @@ -0,0 +1,110 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; +import { + CustomFieldCheckboxProperties, + CustomFieldCheckboxProperties$inboundSchema, + CustomFieldCheckboxProperties$Outbound, + CustomFieldCheckboxProperties$outboundSchema, +} from "./customfieldcheckboxproperties.js"; + +export const CustomFieldUpdateCheckboxType = { + Checkbox: "checkbox", +} as const; +export type CustomFieldUpdateCheckboxType = ClosedEnum< + typeof CustomFieldUpdateCheckboxType +>; + +/** + * Schema to update a custom field of type checkbox. + */ +export type CustomFieldUpdateCheckbox = { + /** + * Key-value object allowing you to store additional information. + * + * @remarks + * + * The key must be a string with a maximum length of **40 characters**. + * The value must be a string with a maximum length of **500 characters**. + * You can store up to **50 key-value pairs**. + */ + metadata?: { [k: string]: string } | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + type?: "checkbox" | undefined; + properties?: CustomFieldCheckboxProperties | null | undefined; +}; + +/** @internal */ +export const CustomFieldUpdateCheckboxType$inboundSchema: z.ZodNativeEnum< + typeof CustomFieldUpdateCheckboxType +> = z.nativeEnum(CustomFieldUpdateCheckboxType); + +/** @internal */ +export const CustomFieldUpdateCheckboxType$outboundSchema: z.ZodNativeEnum< + typeof CustomFieldUpdateCheckboxType +> = CustomFieldUpdateCheckboxType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldUpdateCheckboxType$ { + /** @deprecated use `CustomFieldUpdateCheckboxType$inboundSchema` instead. */ + export const inboundSchema = CustomFieldUpdateCheckboxType$inboundSchema; + /** @deprecated use `CustomFieldUpdateCheckboxType$outboundSchema` instead. */ + export const outboundSchema = CustomFieldUpdateCheckboxType$outboundSchema; +} + +/** @internal */ +export const CustomFieldUpdateCheckbox$inboundSchema: z.ZodType< + CustomFieldUpdateCheckbox, + z.ZodTypeDef, + unknown +> = z.object({ + metadata: z.nullable(z.record(z.string())).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + type: z.literal("checkbox").optional(), + properties: z.nullable(CustomFieldCheckboxProperties$inboundSchema) + .optional(), +}); + +/** @internal */ +export type CustomFieldUpdateCheckbox$Outbound = { + metadata?: { [k: string]: string } | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + type: "checkbox"; + properties?: CustomFieldCheckboxProperties$Outbound | null | undefined; +}; + +/** @internal */ +export const CustomFieldUpdateCheckbox$outboundSchema: z.ZodType< + CustomFieldUpdateCheckbox$Outbound, + z.ZodTypeDef, + CustomFieldUpdateCheckbox +> = z.object({ + metadata: z.nullable(z.record(z.string())).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + type: z.literal("checkbox").default("checkbox"), + properties: z.nullable(CustomFieldCheckboxProperties$outboundSchema) + .optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldUpdateCheckbox$ { + /** @deprecated use `CustomFieldUpdateCheckbox$inboundSchema` instead. */ + export const inboundSchema = CustomFieldUpdateCheckbox$inboundSchema; + /** @deprecated use `CustomFieldUpdateCheckbox$outboundSchema` instead. */ + export const outboundSchema = CustomFieldUpdateCheckbox$outboundSchema; + /** @deprecated use `CustomFieldUpdateCheckbox$Outbound` instead. */ + export type Outbound = CustomFieldUpdateCheckbox$Outbound; +} diff --git a/src/models/components/customfieldupdatedate.ts b/src/models/components/customfieldupdatedate.ts new file mode 100644 index 00000000..f37c0fbd --- /dev/null +++ b/src/models/components/customfieldupdatedate.ts @@ -0,0 +1,108 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; +import { + CustomFieldDateProperties, + CustomFieldDateProperties$inboundSchema, + CustomFieldDateProperties$Outbound, + CustomFieldDateProperties$outboundSchema, +} from "./customfielddateproperties.js"; + +export const CustomFieldUpdateDateType = { + Date: "date", +} as const; +export type CustomFieldUpdateDateType = ClosedEnum< + typeof CustomFieldUpdateDateType +>; + +/** + * Schema to update a custom field of type date. + */ +export type CustomFieldUpdateDate = { + /** + * Key-value object allowing you to store additional information. + * + * @remarks + * + * The key must be a string with a maximum length of **40 characters**. + * The value must be a string with a maximum length of **500 characters**. + * You can store up to **50 key-value pairs**. + */ + metadata?: { [k: string]: string } | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + type?: "date" | undefined; + properties?: CustomFieldDateProperties | null | undefined; +}; + +/** @internal */ +export const CustomFieldUpdateDateType$inboundSchema: z.ZodNativeEnum< + typeof CustomFieldUpdateDateType +> = z.nativeEnum(CustomFieldUpdateDateType); + +/** @internal */ +export const CustomFieldUpdateDateType$outboundSchema: z.ZodNativeEnum< + typeof CustomFieldUpdateDateType +> = CustomFieldUpdateDateType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldUpdateDateType$ { + /** @deprecated use `CustomFieldUpdateDateType$inboundSchema` instead. */ + export const inboundSchema = CustomFieldUpdateDateType$inboundSchema; + /** @deprecated use `CustomFieldUpdateDateType$outboundSchema` instead. */ + export const outboundSchema = CustomFieldUpdateDateType$outboundSchema; +} + +/** @internal */ +export const CustomFieldUpdateDate$inboundSchema: z.ZodType< + CustomFieldUpdateDate, + z.ZodTypeDef, + unknown +> = z.object({ + metadata: z.nullable(z.record(z.string())).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + type: z.literal("date").optional(), + properties: z.nullable(CustomFieldDateProperties$inboundSchema).optional(), +}); + +/** @internal */ +export type CustomFieldUpdateDate$Outbound = { + metadata?: { [k: string]: string } | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + type: "date"; + properties?: CustomFieldDateProperties$Outbound | null | undefined; +}; + +/** @internal */ +export const CustomFieldUpdateDate$outboundSchema: z.ZodType< + CustomFieldUpdateDate$Outbound, + z.ZodTypeDef, + CustomFieldUpdateDate +> = z.object({ + metadata: z.nullable(z.record(z.string())).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + type: z.literal("date").default("date"), + properties: z.nullable(CustomFieldDateProperties$outboundSchema).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldUpdateDate$ { + /** @deprecated use `CustomFieldUpdateDate$inboundSchema` instead. */ + export const inboundSchema = CustomFieldUpdateDate$inboundSchema; + /** @deprecated use `CustomFieldUpdateDate$outboundSchema` instead. */ + export const outboundSchema = CustomFieldUpdateDate$outboundSchema; + /** @deprecated use `CustomFieldUpdateDate$Outbound` instead. */ + export type Outbound = CustomFieldUpdateDate$Outbound; +} diff --git a/src/models/components/customfieldupdatenumber.ts b/src/models/components/customfieldupdatenumber.ts new file mode 100644 index 00000000..9367b218 --- /dev/null +++ b/src/models/components/customfieldupdatenumber.ts @@ -0,0 +1,108 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; +import { + CustomFieldNumberProperties, + CustomFieldNumberProperties$inboundSchema, + CustomFieldNumberProperties$Outbound, + CustomFieldNumberProperties$outboundSchema, +} from "./customfieldnumberproperties.js"; + +export const CustomFieldUpdateNumberType = { + Number: "number", +} as const; +export type CustomFieldUpdateNumberType = ClosedEnum< + typeof CustomFieldUpdateNumberType +>; + +/** + * Schema to update a custom field of type number. + */ +export type CustomFieldUpdateNumber = { + /** + * Key-value object allowing you to store additional information. + * + * @remarks + * + * The key must be a string with a maximum length of **40 characters**. + * The value must be a string with a maximum length of **500 characters**. + * You can store up to **50 key-value pairs**. + */ + metadata?: { [k: string]: string } | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + type?: "number" | undefined; + properties?: CustomFieldNumberProperties | null | undefined; +}; + +/** @internal */ +export const CustomFieldUpdateNumberType$inboundSchema: z.ZodNativeEnum< + typeof CustomFieldUpdateNumberType +> = z.nativeEnum(CustomFieldUpdateNumberType); + +/** @internal */ +export const CustomFieldUpdateNumberType$outboundSchema: z.ZodNativeEnum< + typeof CustomFieldUpdateNumberType +> = CustomFieldUpdateNumberType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldUpdateNumberType$ { + /** @deprecated use `CustomFieldUpdateNumberType$inboundSchema` instead. */ + export const inboundSchema = CustomFieldUpdateNumberType$inboundSchema; + /** @deprecated use `CustomFieldUpdateNumberType$outboundSchema` instead. */ + export const outboundSchema = CustomFieldUpdateNumberType$outboundSchema; +} + +/** @internal */ +export const CustomFieldUpdateNumber$inboundSchema: z.ZodType< + CustomFieldUpdateNumber, + z.ZodTypeDef, + unknown +> = z.object({ + metadata: z.nullable(z.record(z.string())).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + type: z.literal("number").optional(), + properties: z.nullable(CustomFieldNumberProperties$inboundSchema).optional(), +}); + +/** @internal */ +export type CustomFieldUpdateNumber$Outbound = { + metadata?: { [k: string]: string } | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + type: "number"; + properties?: CustomFieldNumberProperties$Outbound | null | undefined; +}; + +/** @internal */ +export const CustomFieldUpdateNumber$outboundSchema: z.ZodType< + CustomFieldUpdateNumber$Outbound, + z.ZodTypeDef, + CustomFieldUpdateNumber +> = z.object({ + metadata: z.nullable(z.record(z.string())).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + type: z.literal("number").default("number"), + properties: z.nullable(CustomFieldNumberProperties$outboundSchema).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldUpdateNumber$ { + /** @deprecated use `CustomFieldUpdateNumber$inboundSchema` instead. */ + export const inboundSchema = CustomFieldUpdateNumber$inboundSchema; + /** @deprecated use `CustomFieldUpdateNumber$outboundSchema` instead. */ + export const outboundSchema = CustomFieldUpdateNumber$outboundSchema; + /** @deprecated use `CustomFieldUpdateNumber$Outbound` instead. */ + export type Outbound = CustomFieldUpdateNumber$Outbound; +} diff --git a/src/models/components/customfieldupdateselect.ts b/src/models/components/customfieldupdateselect.ts new file mode 100644 index 00000000..a10c46e2 --- /dev/null +++ b/src/models/components/customfieldupdateselect.ts @@ -0,0 +1,108 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; +import { + CustomFieldSelectProperties, + CustomFieldSelectProperties$inboundSchema, + CustomFieldSelectProperties$Outbound, + CustomFieldSelectProperties$outboundSchema, +} from "./customfieldselectproperties.js"; + +export const CustomFieldUpdateSelectType = { + Select: "select", +} as const; +export type CustomFieldUpdateSelectType = ClosedEnum< + typeof CustomFieldUpdateSelectType +>; + +/** + * Schema to update a custom field of type select. + */ +export type CustomFieldUpdateSelect = { + /** + * Key-value object allowing you to store additional information. + * + * @remarks + * + * The key must be a string with a maximum length of **40 characters**. + * The value must be a string with a maximum length of **500 characters**. + * You can store up to **50 key-value pairs**. + */ + metadata?: { [k: string]: string } | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + type?: "select" | undefined; + properties?: CustomFieldSelectProperties | null | undefined; +}; + +/** @internal */ +export const CustomFieldUpdateSelectType$inboundSchema: z.ZodNativeEnum< + typeof CustomFieldUpdateSelectType +> = z.nativeEnum(CustomFieldUpdateSelectType); + +/** @internal */ +export const CustomFieldUpdateSelectType$outboundSchema: z.ZodNativeEnum< + typeof CustomFieldUpdateSelectType +> = CustomFieldUpdateSelectType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldUpdateSelectType$ { + /** @deprecated use `CustomFieldUpdateSelectType$inboundSchema` instead. */ + export const inboundSchema = CustomFieldUpdateSelectType$inboundSchema; + /** @deprecated use `CustomFieldUpdateSelectType$outboundSchema` instead. */ + export const outboundSchema = CustomFieldUpdateSelectType$outboundSchema; +} + +/** @internal */ +export const CustomFieldUpdateSelect$inboundSchema: z.ZodType< + CustomFieldUpdateSelect, + z.ZodTypeDef, + unknown +> = z.object({ + metadata: z.nullable(z.record(z.string())).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + type: z.literal("select").optional(), + properties: z.nullable(CustomFieldSelectProperties$inboundSchema).optional(), +}); + +/** @internal */ +export type CustomFieldUpdateSelect$Outbound = { + metadata?: { [k: string]: string } | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + type: "select"; + properties?: CustomFieldSelectProperties$Outbound | null | undefined; +}; + +/** @internal */ +export const CustomFieldUpdateSelect$outboundSchema: z.ZodType< + CustomFieldUpdateSelect$Outbound, + z.ZodTypeDef, + CustomFieldUpdateSelect +> = z.object({ + metadata: z.nullable(z.record(z.string())).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + type: z.literal("select").default("select"), + properties: z.nullable(CustomFieldSelectProperties$outboundSchema).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldUpdateSelect$ { + /** @deprecated use `CustomFieldUpdateSelect$inboundSchema` instead. */ + export const inboundSchema = CustomFieldUpdateSelect$inboundSchema; + /** @deprecated use `CustomFieldUpdateSelect$outboundSchema` instead. */ + export const outboundSchema = CustomFieldUpdateSelect$outboundSchema; + /** @deprecated use `CustomFieldUpdateSelect$Outbound` instead. */ + export type Outbound = CustomFieldUpdateSelect$Outbound; +} diff --git a/src/models/components/customfieldupdatetext.ts b/src/models/components/customfieldupdatetext.ts new file mode 100644 index 00000000..95861dc3 --- /dev/null +++ b/src/models/components/customfieldupdatetext.ts @@ -0,0 +1,108 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; +import { + CustomFieldTextProperties, + CustomFieldTextProperties$inboundSchema, + CustomFieldTextProperties$Outbound, + CustomFieldTextProperties$outboundSchema, +} from "./customfieldtextproperties.js"; + +export const CustomFieldUpdateTextType = { + Text: "text", +} as const; +export type CustomFieldUpdateTextType = ClosedEnum< + typeof CustomFieldUpdateTextType +>; + +/** + * Schema to update a custom field of type text. + */ +export type CustomFieldUpdateText = { + /** + * Key-value object allowing you to store additional information. + * + * @remarks + * + * The key must be a string with a maximum length of **40 characters**. + * The value must be a string with a maximum length of **500 characters**. + * You can store up to **50 key-value pairs**. + */ + metadata?: { [k: string]: string } | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + type?: "text" | undefined; + properties?: CustomFieldTextProperties | null | undefined; +}; + +/** @internal */ +export const CustomFieldUpdateTextType$inboundSchema: z.ZodNativeEnum< + typeof CustomFieldUpdateTextType +> = z.nativeEnum(CustomFieldUpdateTextType); + +/** @internal */ +export const CustomFieldUpdateTextType$outboundSchema: z.ZodNativeEnum< + typeof CustomFieldUpdateTextType +> = CustomFieldUpdateTextType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldUpdateTextType$ { + /** @deprecated use `CustomFieldUpdateTextType$inboundSchema` instead. */ + export const inboundSchema = CustomFieldUpdateTextType$inboundSchema; + /** @deprecated use `CustomFieldUpdateTextType$outboundSchema` instead. */ + export const outboundSchema = CustomFieldUpdateTextType$outboundSchema; +} + +/** @internal */ +export const CustomFieldUpdateText$inboundSchema: z.ZodType< + CustomFieldUpdateText, + z.ZodTypeDef, + unknown +> = z.object({ + metadata: z.nullable(z.record(z.string())).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + type: z.literal("text").optional(), + properties: z.nullable(CustomFieldTextProperties$inboundSchema).optional(), +}); + +/** @internal */ +export type CustomFieldUpdateText$Outbound = { + metadata?: { [k: string]: string } | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + type: "text"; + properties?: CustomFieldTextProperties$Outbound | null | undefined; +}; + +/** @internal */ +export const CustomFieldUpdateText$outboundSchema: z.ZodType< + CustomFieldUpdateText$Outbound, + z.ZodTypeDef, + CustomFieldUpdateText +> = z.object({ + metadata: z.nullable(z.record(z.string())).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + type: z.literal("text").default("text"), + properties: z.nullable(CustomFieldTextProperties$outboundSchema).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldUpdateText$ { + /** @deprecated use `CustomFieldUpdateText$inboundSchema` instead. */ + export const inboundSchema = CustomFieldUpdateText$inboundSchema; + /** @deprecated use `CustomFieldUpdateText$outboundSchema` instead. */ + export const outboundSchema = CustomFieldUpdateText$outboundSchema; + /** @deprecated use `CustomFieldUpdateText$Outbound` instead. */ + export type Outbound = CustomFieldUpdateText$Outbound; +} diff --git a/src/models/components/index.ts b/src/models/components/index.ts index 02fe1d7c..a1cdbc90 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -14,6 +14,8 @@ export * from "./articlereceivers.js"; export * from "./articleupdate.js"; export * from "./articlevisibility.js"; export * from "./assignee.js"; +export * from "./attachedcustomfield.js"; +export * from "./attachedcustomfieldcreate.js"; export * from "./author.js"; export * from "./benefit.js"; export * from "./benefitads.js"; @@ -86,12 +88,39 @@ export * from "./checkoutlink.js"; export * from "./checkoutlinkcreate.js"; export * from "./checkoutlinksortproperty.js"; export * from "./checkoutlinkupdate.js"; +export * from "./checkoutproduct.js"; export * from "./checkoutpublic.js"; export * from "./checkoutsortproperty.js"; export * from "./checkoutstatus.js"; export * from "./checkoutupdate.js"; export * from "./checkoutupdatepublic.js"; export * from "./currencyamount.js"; +export * from "./customfield.js"; +export * from "./customfieldcheckbox.js"; +export * from "./customfieldcheckboxproperties.js"; +export * from "./customfieldcreate.js"; +export * from "./customfieldcreatecheckbox.js"; +export * from "./customfieldcreatedate.js"; +export * from "./customfieldcreatenumber.js"; +export * from "./customfieldcreateselect.js"; +export * from "./customfieldcreatetext.js"; +export * from "./customfielddate.js"; +export * from "./customfielddateproperties.js"; +export * from "./customfieldnumber.js"; +export * from "./customfieldnumberproperties.js"; +export * from "./customfieldselect.js"; +export * from "./customfieldselectoption.js"; +export * from "./customfieldselectproperties.js"; +export * from "./customfieldsortproperty.js"; +export * from "./customfieldtext.js"; +export * from "./customfieldtextproperties.js"; +export * from "./customfieldtype.js"; +export * from "./customfieldupdate.js"; +export * from "./customfieldupdatecheckbox.js"; +export * from "./customfieldupdatedate.js"; +export * from "./customfieldupdatenumber.js"; +export * from "./customfieldupdateselect.js"; +export * from "./customfieldupdatetext.js"; export * from "./donation.js"; export * from "./donationorganization.js"; export * from "./donationuser.js"; @@ -121,6 +150,7 @@ export * from "./licensekeyupdate.js"; export * from "./licensekeyuser.js"; export * from "./licensekeyvalidate.js"; export * from "./licensekeywithactivations.js"; +export * from "./listresource.js"; export * from "./listresourcearticle.js"; export * from "./listresourcebenefit.js"; export * from "./listresourcebenefitgrant.js"; @@ -182,6 +212,7 @@ export * from "./polarcheckoutschemascheckoutcreate.js"; export * from "./polarenumspaymentprocessor.js"; export * from "./product.js"; export * from "./productbenefitsupdate.js"; +export * from "./productinput.js"; export * from "./productmediafilecreate.js"; export * from "./productmediafileread.js"; export * from "./productonetimecreate.js"; @@ -219,7 +250,6 @@ export * from "./s3fileuploadpart.js"; export * from "./security.js"; export * from "./state.js"; export * from "./subscription.js"; -export * from "./subscriptioninput.js"; export * from "./subscriptionrecurringinterval.js"; export * from "./subscriptionsortproperty.js"; export * from "./subscriptionstatus.js"; diff --git a/src/models/components/listresource.ts b/src/models/components/listresource.ts new file mode 100644 index 00000000..f5f182ed --- /dev/null +++ b/src/models/components/listresource.ts @@ -0,0 +1,61 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + CustomField, + CustomField$inboundSchema, + CustomField$Outbound, + CustomField$outboundSchema, +} from "./customfield.js"; +import { + Pagination, + Pagination$inboundSchema, + Pagination$Outbound, + Pagination$outboundSchema, +} from "./pagination.js"; + +export type ListResource = { + items: Array; + pagination: Pagination; +}; + +/** @internal */ +export const ListResource$inboundSchema: z.ZodType< + ListResource, + z.ZodTypeDef, + unknown +> = z.object({ + items: z.array(CustomField$inboundSchema), + pagination: Pagination$inboundSchema, +}); + +/** @internal */ +export type ListResource$Outbound = { + items: Array; + pagination: Pagination$Outbound; +}; + +/** @internal */ +export const ListResource$outboundSchema: z.ZodType< + ListResource$Outbound, + z.ZodTypeDef, + ListResource +> = z.object({ + items: z.array(CustomField$outboundSchema), + pagination: Pagination$outboundSchema, +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListResource$ { + /** @deprecated use `ListResource$inboundSchema` instead. */ + export const inboundSchema = ListResource$inboundSchema; + /** @deprecated use `ListResource$outboundSchema` instead. */ + export const outboundSchema = ListResource$outboundSchema; + /** @deprecated use `ListResource$Outbound` instead. */ + export type Outbound = ListResource$Outbound; +} diff --git a/src/models/components/listresourceuserbenefit.ts b/src/models/components/listresourceuserbenefit.ts index 620d420a..2f6e22ad 100644 --- a/src/models/components/listresourceuserbenefit.ts +++ b/src/models/components/listresourceuserbenefit.ts @@ -53,22 +53,22 @@ import { } from "./pagination.js"; export type UserBenefit = + | (BenefitAdsSubscriber & { type: "ads" }) | (BenefitArticlesSubscriber & { type: "articles" }) + | (BenefitCustomSubscriber & { type: "custom" }) | (BenefitDiscordSubscriber & { type: "discord" }) | (BenefitDownloadablesSubscriber & { type: "downloadables" }) | (BenefitGitHubRepositorySubscriber & { type: "github_repository" }) - | (BenefitAdsSubscriber & { type: "ads" }) - | (BenefitCustomSubscriber & { type: "custom" }) | (BenefitLicenseKeysSubscriber & { type: "license_keys" }); export type ListResourceUserBenefit = { items: Array< + | (BenefitAdsSubscriber & { type: "ads" }) | (BenefitArticlesSubscriber & { type: "articles" }) + | (BenefitCustomSubscriber & { type: "custom" }) | (BenefitDiscordSubscriber & { type: "discord" }) | (BenefitDownloadablesSubscriber & { type: "downloadables" }) | (BenefitGitHubRepositorySubscriber & { type: "github_repository" }) - | (BenefitAdsSubscriber & { type: "ads" }) - | (BenefitCustomSubscriber & { type: "custom" }) | (BenefitLicenseKeysSubscriber & { type: "license_keys" }) >; pagination: Pagination; @@ -80,11 +80,19 @@ export const UserBenefit$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.union([ + BenefitAdsSubscriber$inboundSchema.and( + z.object({ type: z.literal("ads") }).transform((v) => ({ type: v.type })), + ), BenefitArticlesSubscriber$inboundSchema.and( z.object({ type: z.literal("articles") }).transform((v) => ({ type: v.type, })), ), + BenefitCustomSubscriber$inboundSchema.and( + z.object({ type: z.literal("custom") }).transform((v) => ({ + type: v.type, + })), + ), BenefitDiscordSubscriber$inboundSchema.and( z.object({ type: z.literal("discord") }).transform((v) => ({ type: v.type, @@ -100,14 +108,6 @@ export const UserBenefit$inboundSchema: z.ZodType< type: v.type, })), ), - BenefitAdsSubscriber$inboundSchema.and( - z.object({ type: z.literal("ads") }).transform((v) => ({ type: v.type })), - ), - BenefitCustomSubscriber$inboundSchema.and( - z.object({ type: z.literal("custom") }).transform((v) => ({ - type: v.type, - })), - ), BenefitLicenseKeysSubscriber$inboundSchema.and( z.object({ type: z.literal("license_keys") }).transform((v) => ({ type: v.type, @@ -117,12 +117,12 @@ export const UserBenefit$inboundSchema: z.ZodType< /** @internal */ export type UserBenefit$Outbound = + | (BenefitAdsSubscriber$Outbound & { type: "ads" }) | (BenefitArticlesSubscriber$Outbound & { type: "articles" }) + | (BenefitCustomSubscriber$Outbound & { type: "custom" }) | (BenefitDiscordSubscriber$Outbound & { type: "discord" }) | (BenefitDownloadablesSubscriber$Outbound & { type: "downloadables" }) | (BenefitGitHubRepositorySubscriber$Outbound & { type: "github_repository" }) - | (BenefitAdsSubscriber$Outbound & { type: "ads" }) - | (BenefitCustomSubscriber$Outbound & { type: "custom" }) | (BenefitLicenseKeysSubscriber$Outbound & { type: "license_keys" }); /** @internal */ @@ -131,11 +131,19 @@ export const UserBenefit$outboundSchema: z.ZodType< z.ZodTypeDef, UserBenefit > = z.union([ + BenefitAdsSubscriber$outboundSchema.and( + z.object({ type: z.literal("ads") }).transform((v) => ({ type: v.type })), + ), BenefitArticlesSubscriber$outboundSchema.and( z.object({ type: z.literal("articles") }).transform((v) => ({ type: v.type, })), ), + BenefitCustomSubscriber$outboundSchema.and( + z.object({ type: z.literal("custom") }).transform((v) => ({ + type: v.type, + })), + ), BenefitDiscordSubscriber$outboundSchema.and( z.object({ type: z.literal("discord") }).transform((v) => ({ type: v.type, @@ -151,14 +159,6 @@ export const UserBenefit$outboundSchema: z.ZodType< type: v.type, })), ), - BenefitAdsSubscriber$outboundSchema.and( - z.object({ type: z.literal("ads") }).transform((v) => ({ type: v.type })), - ), - BenefitCustomSubscriber$outboundSchema.and( - z.object({ type: z.literal("custom") }).transform((v) => ({ - type: v.type, - })), - ), BenefitLicenseKeysSubscriber$outboundSchema.and( z.object({ type: z.literal("license_keys") }).transform((v) => ({ type: v.type, @@ -187,11 +187,21 @@ export const ListResourceUserBenefit$inboundSchema: z.ZodType< > = z.object({ items: z.array( z.union([ + BenefitAdsSubscriber$inboundSchema.and( + z.object({ type: z.literal("ads") }).transform((v) => ({ + type: v.type, + })), + ), BenefitArticlesSubscriber$inboundSchema.and( z.object({ type: z.literal("articles") }).transform((v) => ({ type: v.type, })), ), + BenefitCustomSubscriber$inboundSchema.and( + z.object({ type: z.literal("custom") }).transform((v) => ({ + type: v.type, + })), + ), BenefitDiscordSubscriber$inboundSchema.and( z.object({ type: z.literal("discord") }).transform((v) => ({ type: v.type, @@ -207,16 +217,6 @@ export const ListResourceUserBenefit$inboundSchema: z.ZodType< type: v.type, })), ), - BenefitAdsSubscriber$inboundSchema.and( - z.object({ type: z.literal("ads") }).transform((v) => ({ - type: v.type, - })), - ), - BenefitCustomSubscriber$inboundSchema.and( - z.object({ type: z.literal("custom") }).transform((v) => ({ - type: v.type, - })), - ), BenefitLicenseKeysSubscriber$inboundSchema.and( z.object({ type: z.literal("license_keys") }).transform((v) => ({ type: v.type, @@ -230,14 +230,14 @@ export const ListResourceUserBenefit$inboundSchema: z.ZodType< /** @internal */ export type ListResourceUserBenefit$Outbound = { items: Array< + | (BenefitAdsSubscriber$Outbound & { type: "ads" }) | (BenefitArticlesSubscriber$Outbound & { type: "articles" }) + | (BenefitCustomSubscriber$Outbound & { type: "custom" }) | (BenefitDiscordSubscriber$Outbound & { type: "discord" }) | (BenefitDownloadablesSubscriber$Outbound & { type: "downloadables" }) | (BenefitGitHubRepositorySubscriber$Outbound & { type: "github_repository"; }) - | (BenefitAdsSubscriber$Outbound & { type: "ads" }) - | (BenefitCustomSubscriber$Outbound & { type: "custom" }) | (BenefitLicenseKeysSubscriber$Outbound & { type: "license_keys" }) >; pagination: Pagination$Outbound; @@ -251,11 +251,21 @@ export const ListResourceUserBenefit$outboundSchema: z.ZodType< > = z.object({ items: z.array( z.union([ + BenefitAdsSubscriber$outboundSchema.and( + z.object({ type: z.literal("ads") }).transform((v) => ({ + type: v.type, + })), + ), BenefitArticlesSubscriber$outboundSchema.and( z.object({ type: z.literal("articles") }).transform((v) => ({ type: v.type, })), ), + BenefitCustomSubscriber$outboundSchema.and( + z.object({ type: z.literal("custom") }).transform((v) => ({ + type: v.type, + })), + ), BenefitDiscordSubscriber$outboundSchema.and( z.object({ type: z.literal("discord") }).transform((v) => ({ type: v.type, @@ -271,16 +281,6 @@ export const ListResourceUserBenefit$outboundSchema: z.ZodType< type: v.type, })), ), - BenefitAdsSubscriber$outboundSchema.and( - z.object({ type: z.literal("ads") }).transform((v) => ({ - type: v.type, - })), - ), - BenefitCustomSubscriber$outboundSchema.and( - z.object({ type: z.literal("custom") }).transform((v) => ({ - type: v.type, - })), - ), BenefitLicenseKeysSubscriber$outboundSchema.and( z.object({ type: z.literal("license_keys") }).transform((v) => ({ type: v.type, diff --git a/src/models/components/oauth2client.ts b/src/models/components/oauth2client.ts index f065e80a..fcff7dcb 100644 --- a/src/models/components/oauth2client.ts +++ b/src/models/components/oauth2client.ts @@ -125,7 +125,7 @@ export const OAuth2Client$inboundSchema: z.ZodType< grant_types: z.array(GrantTypes$inboundSchema).optional(), response_types: z.array(ResponseTypes$inboundSchema).optional(), scope: z.string().default( - "openid profile email user:read organizations:read organizations:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write", + "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write", ), client_name: z.string(), client_uri: z.nullable(z.string()).optional(), @@ -193,7 +193,7 @@ export const OAuth2Client$outboundSchema: z.ZodType< grantTypes: z.array(GrantTypes$outboundSchema).optional(), responseTypes: z.array(ResponseTypes$outboundSchema).optional(), scope: z.string().default( - "openid profile email user:read organizations:read organizations:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write", + "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write", ), clientName: z.string(), clientUri: z.nullable(z.string()).optional(), diff --git a/src/models/components/oauth2clientconfiguration.ts b/src/models/components/oauth2clientconfiguration.ts index 3815f78c..6b3e197e 100644 --- a/src/models/components/oauth2clientconfiguration.ts +++ b/src/models/components/oauth2clientconfiguration.ts @@ -131,7 +131,7 @@ export const OAuth2ClientConfiguration$inboundSchema: z.ZodType< response_types: z.array(OAuth2ClientConfigurationResponseTypes$inboundSchema) .optional(), scope: z.string().default( - "openid profile email user:read organizations:read organizations:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write", + "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write", ), client_name: z.string(), client_uri: z.nullable(z.string()).optional(), @@ -182,7 +182,7 @@ export const OAuth2ClientConfiguration$outboundSchema: z.ZodType< responseTypes: z.array(OAuth2ClientConfigurationResponseTypes$outboundSchema) .optional(), scope: z.string().default( - "openid profile email user:read organizations:read organizations:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write", + "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write", ), clientName: z.string(), clientUri: z.nullable(z.string()).optional(), diff --git a/src/models/components/oauth2clientconfigurationupdate.ts b/src/models/components/oauth2clientconfigurationupdate.ts index 05baca0e..263dc9d4 100644 --- a/src/models/components/oauth2clientconfigurationupdate.ts +++ b/src/models/components/oauth2clientconfigurationupdate.ts @@ -135,7 +135,7 @@ export const OAuth2ClientConfigurationUpdate$inboundSchema: z.ZodType< OAuth2ClientConfigurationUpdateResponseTypes$inboundSchema, ).optional(), scope: z.string().default( - "openid profile email user:read organizations:read organizations:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write", + "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write", ), client_name: z.string(), client_uri: z.nullable(z.string()).optional(), @@ -189,7 +189,7 @@ export const OAuth2ClientConfigurationUpdate$outboundSchema: z.ZodType< OAuth2ClientConfigurationUpdateResponseTypes$outboundSchema, ).optional(), scope: z.string().default( - "openid profile email user:read organizations:read organizations:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write", + "openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write orders:read metrics:read articles:read articles:write webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write user:benefits:read user:orders:read user:subscriptions:read user:subscriptions:write user:downloadables:read user:license_keys:read user:advertisement_campaigns:read user:advertisement_campaigns:write", ), clientName: z.string(), clientUri: z.nullable(z.string()).optional(), diff --git a/src/models/components/order.ts b/src/models/components/order.ts index 003cc751..704dea3a 100644 --- a/src/models/components/order.ts +++ b/src/models/components/order.ts @@ -34,6 +34,11 @@ import { ProductPrice$outboundSchema, } from "./productprice.js"; +/** + * Key-value object storing custom field values. + */ +export type OrderCustomFieldData = {}; + export type Order = { /** * Creation timestamp of the object. @@ -48,6 +53,10 @@ export type Order = { */ id: string; metadata: { [k: string]: string }; + /** + * Key-value object storing custom field values. + */ + customFieldData?: OrderCustomFieldData | undefined; amount: number; taxAmount: number; currency: string; @@ -63,6 +72,36 @@ export type Order = { subscription: OrderSubscription | null; }; +/** @internal */ +export const OrderCustomFieldData$inboundSchema: z.ZodType< + OrderCustomFieldData, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type OrderCustomFieldData$Outbound = {}; + +/** @internal */ +export const OrderCustomFieldData$outboundSchema: z.ZodType< + OrderCustomFieldData$Outbound, + z.ZodTypeDef, + OrderCustomFieldData +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace OrderCustomFieldData$ { + /** @deprecated use `OrderCustomFieldData$inboundSchema` instead. */ + export const inboundSchema = OrderCustomFieldData$inboundSchema; + /** @deprecated use `OrderCustomFieldData$outboundSchema` instead. */ + export const outboundSchema = OrderCustomFieldData$outboundSchema; + /** @deprecated use `OrderCustomFieldData$Outbound` instead. */ + export type Outbound = OrderCustomFieldData$Outbound; +} + /** @internal */ export const Order$inboundSchema: z.ZodType = z .object({ @@ -74,6 +113,8 @@ export const Order$inboundSchema: z.ZodType = z ), id: z.string(), metadata: z.record(z.string()), + custom_field_data: z.lazy(() => OrderCustomFieldData$inboundSchema) + .optional(), amount: z.number().int(), tax_amount: z.number().int(), currency: z.string(), @@ -91,6 +132,7 @@ export const Order$inboundSchema: z.ZodType = z return remap$(v, { "created_at": "createdAt", "modified_at": "modifiedAt", + "custom_field_data": "customFieldData", "tax_amount": "taxAmount", "billing_reason": "billingReason", "user_id": "userId", @@ -108,6 +150,7 @@ export type Order$Outbound = { modified_at: string | null; id: string; metadata: { [k: string]: string }; + custom_field_data?: OrderCustomFieldData$Outbound | undefined; amount: number; tax_amount: number; currency: string; @@ -133,6 +176,7 @@ export const Order$outboundSchema: z.ZodType< modifiedAt: z.nullable(z.date().transform(v => v.toISOString())), id: z.string(), metadata: z.record(z.string()), + customFieldData: z.lazy(() => OrderCustomFieldData$outboundSchema).optional(), amount: z.number().int(), taxAmount: z.number().int(), currency: z.string(), @@ -150,6 +194,7 @@ export const Order$outboundSchema: z.ZodType< return remap$(v, { createdAt: "created_at", modifiedAt: "modified_at", + customFieldData: "custom_field_data", taxAmount: "tax_amount", billingReason: "billing_reason", userId: "user_id", diff --git a/src/models/components/polarcheckoutlegacyschemascheckout.ts b/src/models/components/polarcheckoutlegacyschemascheckout.ts index 84fd751e..8269c53c 100644 --- a/src/models/components/polarcheckoutlegacyschemascheckout.ts +++ b/src/models/components/polarcheckoutlegacyschemascheckout.ts @@ -5,11 +5,11 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { - Product, - Product$inboundSchema, - Product$Outbound, - Product$outboundSchema, -} from "./product.js"; + CheckoutProduct, + CheckoutProduct$inboundSchema, + CheckoutProduct$Outbound, + CheckoutProduct$outboundSchema, +} from "./checkoutproduct.js"; import { ProductPrice, ProductPrice$inboundSchema, @@ -32,9 +32,9 @@ export type PolarCheckoutLegacySchemasCheckout = { customerEmail: string | null; customerName: string | null; /** - * A product. + * Product data for a checkout session. */ - product: Product; + product: CheckoutProduct; productPrice: ProductPrice; }; @@ -48,7 +48,7 @@ export const PolarCheckoutLegacySchemasCheckout$inboundSchema: z.ZodType< url: z.nullable(z.string()).optional(), customer_email: z.nullable(z.string()), customer_name: z.nullable(z.string()), - product: Product$inboundSchema, + product: CheckoutProduct$inboundSchema, product_price: ProductPrice$inboundSchema, }).transform((v) => { return remap$(v, { @@ -64,7 +64,7 @@ export type PolarCheckoutLegacySchemasCheckout$Outbound = { url?: string | null | undefined; customer_email: string | null; customer_name: string | null; - product: Product$Outbound; + product: CheckoutProduct$Outbound; product_price: ProductPrice$Outbound; }; @@ -78,7 +78,7 @@ export const PolarCheckoutLegacySchemasCheckout$outboundSchema: z.ZodType< url: z.nullable(z.string()).optional(), customerEmail: z.nullable(z.string()), customerName: z.nullable(z.string()), - product: Product$outboundSchema, + product: CheckoutProduct$outboundSchema, productPrice: ProductPrice$outboundSchema, }).transform((v) => { return remap$(v, { diff --git a/src/models/components/polarcheckoutschemascheckout.ts b/src/models/components/polarcheckoutschemascheckout.ts index 9a17ddad..7d3d138a 100644 --- a/src/models/components/polarcheckoutschemascheckout.ts +++ b/src/models/components/polarcheckoutschemascheckout.ts @@ -10,21 +10,27 @@ import { Address$Outbound, Address$outboundSchema, } from "./address.js"; +import { + AttachedCustomField, + AttachedCustomField$inboundSchema, + AttachedCustomField$Outbound, + AttachedCustomField$outboundSchema, +} from "./attachedcustomfield.js"; +import { + CheckoutProduct, + CheckoutProduct$inboundSchema, + CheckoutProduct$Outbound, + CheckoutProduct$outboundSchema, + CheckoutProductInput, + CheckoutProductInput$inboundSchema, + CheckoutProductInput$Outbound, + CheckoutProductInput$outboundSchema, +} from "./checkoutproduct.js"; import { CheckoutStatus, CheckoutStatus$inboundSchema, CheckoutStatus$outboundSchema, } from "./checkoutstatus.js"; -import { - Product, - Product$inboundSchema, - Product$Outbound, - Product$outboundSchema, - ProductInput, - ProductInput$inboundSchema, - ProductInput$Outbound, - ProductInput$outboundSchema, -} from "./product.js"; import { ProductPrice, ProductPrice$inboundSchema, @@ -32,6 +38,11 @@ import { ProductPrice$outboundSchema, } from "./productprice.js"; +/** + * Key-value object storing custom field values. + */ +export type PolarCheckoutSchemasCheckoutCustomFieldData = {}; + export type PaymentProcessorMetadata = {}; /** @@ -50,6 +61,10 @@ export type PolarCheckoutSchemasCheckout = { * The ID of the object. */ id: string; + /** + * Key-value object storing custom field values. + */ + customFieldData?: PolarCheckoutSchemasCheckoutCustomFieldData | undefined; paymentProcessor?: "stripe" | undefined; status: CheckoutStatus; /** @@ -106,11 +121,12 @@ export type PolarCheckoutSchemasCheckout = { paymentProcessorMetadata: PaymentProcessorMetadata; metadata: { [k: string]: string }; /** - * A product. + * Product data for a checkout session. */ - product: Product; + product: CheckoutProduct; productPrice: ProductPrice; subscriptionId: string | null; + attachedCustomFields: Array; }; /** @@ -129,6 +145,10 @@ export type PolarCheckoutSchemasCheckoutInput = { * The ID of the object. */ id: string; + /** + * Key-value object storing custom field values. + */ + customFieldData?: PolarCheckoutSchemasCheckoutCustomFieldData | undefined; paymentProcessor?: "stripe" | undefined; status: CheckoutStatus; /** @@ -185,13 +205,48 @@ export type PolarCheckoutSchemasCheckoutInput = { paymentProcessorMetadata: PaymentProcessorMetadata; metadata: { [k: string]: string }; /** - * A product. + * Product data for a checkout session. */ - product: ProductInput; + product: CheckoutProductInput; productPrice: ProductPrice; subscriptionId: string | null; + attachedCustomFields: Array; }; +/** @internal */ +export const PolarCheckoutSchemasCheckoutCustomFieldData$inboundSchema: + z.ZodType< + PolarCheckoutSchemasCheckoutCustomFieldData, + z.ZodTypeDef, + unknown + > = z.object({}); + +/** @internal */ +export type PolarCheckoutSchemasCheckoutCustomFieldData$Outbound = {}; + +/** @internal */ +export const PolarCheckoutSchemasCheckoutCustomFieldData$outboundSchema: + z.ZodType< + PolarCheckoutSchemasCheckoutCustomFieldData$Outbound, + z.ZodTypeDef, + PolarCheckoutSchemasCheckoutCustomFieldData + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PolarCheckoutSchemasCheckoutCustomFieldData$ { + /** @deprecated use `PolarCheckoutSchemasCheckoutCustomFieldData$inboundSchema` instead. */ + export const inboundSchema = + PolarCheckoutSchemasCheckoutCustomFieldData$inboundSchema; + /** @deprecated use `PolarCheckoutSchemasCheckoutCustomFieldData$outboundSchema` instead. */ + export const outboundSchema = + PolarCheckoutSchemasCheckoutCustomFieldData$outboundSchema; + /** @deprecated use `PolarCheckoutSchemasCheckoutCustomFieldData$Outbound` instead. */ + export type Outbound = PolarCheckoutSchemasCheckoutCustomFieldData$Outbound; +} + /** @internal */ export const PaymentProcessorMetadata$inboundSchema: z.ZodType< PaymentProcessorMetadata, @@ -233,6 +288,9 @@ export const PolarCheckoutSchemasCheckout$inboundSchema: z.ZodType< z.string().datetime({ offset: true }).transform(v => new Date(v)), ), id: z.string(), + custom_field_data: z.lazy(() => + PolarCheckoutSchemasCheckoutCustomFieldData$inboundSchema + ).optional(), payment_processor: z.literal("stripe").optional(), status: CheckoutStatus$inboundSchema, client_secret: z.string(), @@ -257,13 +315,15 @@ export const PolarCheckoutSchemasCheckout$inboundSchema: z.ZodType< PaymentProcessorMetadata$inboundSchema ), metadata: z.record(z.string()), - product: Product$inboundSchema, + product: CheckoutProduct$inboundSchema, product_price: ProductPrice$inboundSchema, subscription_id: z.nullable(z.string()), + attached_custom_fields: z.array(AttachedCustomField$inboundSchema), }).transform((v) => { return remap$(v, { "created_at": "createdAt", "modified_at": "modifiedAt", + "custom_field_data": "customFieldData", "payment_processor": "paymentProcessor", "client_secret": "clientSecret", "expires_at": "expiresAt", @@ -283,6 +343,7 @@ export const PolarCheckoutSchemasCheckout$inboundSchema: z.ZodType< "payment_processor_metadata": "paymentProcessorMetadata", "product_price": "productPrice", "subscription_id": "subscriptionId", + "attached_custom_fields": "attachedCustomFields", }); }); @@ -291,6 +352,9 @@ export type PolarCheckoutSchemasCheckout$Outbound = { created_at: string; modified_at: string | null; id: string; + custom_field_data?: + | PolarCheckoutSchemasCheckoutCustomFieldData$Outbound + | undefined; payment_processor: "stripe"; status: string; client_secret: string; @@ -313,9 +377,10 @@ export type PolarCheckoutSchemasCheckout$Outbound = { customer_tax_id: string | null; payment_processor_metadata: PaymentProcessorMetadata$Outbound; metadata: { [k: string]: string }; - product: Product$Outbound; + product: CheckoutProduct$Outbound; product_price: ProductPrice$Outbound; subscription_id: string | null; + attached_custom_fields: Array; }; /** @internal */ @@ -327,6 +392,9 @@ export const PolarCheckoutSchemasCheckout$outboundSchema: z.ZodType< createdAt: z.date().transform(v => v.toISOString()), modifiedAt: z.nullable(z.date().transform(v => v.toISOString())), id: z.string(), + customFieldData: z.lazy(() => + PolarCheckoutSchemasCheckoutCustomFieldData$outboundSchema + ).optional(), paymentProcessor: z.literal("stripe").default("stripe"), status: CheckoutStatus$outboundSchema, clientSecret: z.string(), @@ -351,13 +419,15 @@ export const PolarCheckoutSchemasCheckout$outboundSchema: z.ZodType< PaymentProcessorMetadata$outboundSchema ), metadata: z.record(z.string()), - product: Product$outboundSchema, + product: CheckoutProduct$outboundSchema, productPrice: ProductPrice$outboundSchema, subscriptionId: z.nullable(z.string()), + attachedCustomFields: z.array(AttachedCustomField$outboundSchema), }).transform((v) => { return remap$(v, { createdAt: "created_at", modifiedAt: "modified_at", + customFieldData: "custom_field_data", paymentProcessor: "payment_processor", clientSecret: "client_secret", expiresAt: "expires_at", @@ -377,6 +447,7 @@ export const PolarCheckoutSchemasCheckout$outboundSchema: z.ZodType< paymentProcessorMetadata: "payment_processor_metadata", productPrice: "product_price", subscriptionId: "subscription_id", + attachedCustomFields: "attached_custom_fields", }); }); @@ -404,6 +475,9 @@ export const PolarCheckoutSchemasCheckoutInput$inboundSchema: z.ZodType< z.string().datetime({ offset: true }).transform(v => new Date(v)), ), id: z.string(), + custom_field_data: z.lazy(() => + PolarCheckoutSchemasCheckoutCustomFieldData$inboundSchema + ).optional(), payment_processor: z.literal("stripe").optional(), status: CheckoutStatus$inboundSchema, client_secret: z.string(), @@ -428,13 +502,15 @@ export const PolarCheckoutSchemasCheckoutInput$inboundSchema: z.ZodType< PaymentProcessorMetadata$inboundSchema ), metadata: z.record(z.string()), - product: ProductInput$inboundSchema, + product: CheckoutProductInput$inboundSchema, product_price: ProductPrice$inboundSchema, subscription_id: z.nullable(z.string()), + attached_custom_fields: z.array(AttachedCustomField$inboundSchema), }).transform((v) => { return remap$(v, { "created_at": "createdAt", "modified_at": "modifiedAt", + "custom_field_data": "customFieldData", "payment_processor": "paymentProcessor", "client_secret": "clientSecret", "expires_at": "expiresAt", @@ -454,6 +530,7 @@ export const PolarCheckoutSchemasCheckoutInput$inboundSchema: z.ZodType< "payment_processor_metadata": "paymentProcessorMetadata", "product_price": "productPrice", "subscription_id": "subscriptionId", + "attached_custom_fields": "attachedCustomFields", }); }); @@ -462,6 +539,9 @@ export type PolarCheckoutSchemasCheckoutInput$Outbound = { created_at: string; modified_at: string | null; id: string; + custom_field_data?: + | PolarCheckoutSchemasCheckoutCustomFieldData$Outbound + | undefined; payment_processor: "stripe"; status: string; client_secret: string; @@ -484,9 +564,10 @@ export type PolarCheckoutSchemasCheckoutInput$Outbound = { customer_tax_id: string | null; payment_processor_metadata: PaymentProcessorMetadata$Outbound; metadata: { [k: string]: string }; - product: ProductInput$Outbound; + product: CheckoutProductInput$Outbound; product_price: ProductPrice$Outbound; subscription_id: string | null; + attached_custom_fields: Array; }; /** @internal */ @@ -498,6 +579,9 @@ export const PolarCheckoutSchemasCheckoutInput$outboundSchema: z.ZodType< createdAt: z.date().transform(v => v.toISOString()), modifiedAt: z.nullable(z.date().transform(v => v.toISOString())), id: z.string(), + customFieldData: z.lazy(() => + PolarCheckoutSchemasCheckoutCustomFieldData$outboundSchema + ).optional(), paymentProcessor: z.literal("stripe").default("stripe"), status: CheckoutStatus$outboundSchema, clientSecret: z.string(), @@ -522,13 +606,15 @@ export const PolarCheckoutSchemasCheckoutInput$outboundSchema: z.ZodType< PaymentProcessorMetadata$outboundSchema ), metadata: z.record(z.string()), - product: ProductInput$outboundSchema, + product: CheckoutProductInput$outboundSchema, productPrice: ProductPrice$outboundSchema, subscriptionId: z.nullable(z.string()), + attachedCustomFields: z.array(AttachedCustomField$outboundSchema), }).transform((v) => { return remap$(v, { createdAt: "created_at", modifiedAt: "modified_at", + customFieldData: "custom_field_data", paymentProcessor: "payment_processor", clientSecret: "client_secret", expiresAt: "expires_at", @@ -548,6 +634,7 @@ export const PolarCheckoutSchemasCheckoutInput$outboundSchema: z.ZodType< paymentProcessorMetadata: "payment_processor_metadata", productPrice: "product_price", subscriptionId: "subscription_id", + attachedCustomFields: "attached_custom_fields", }); }); diff --git a/src/models/components/polarcheckoutschemascheckoutcreate.ts b/src/models/components/polarcheckoutschemascheckoutcreate.ts index 14b3bed1..f32cb990 100644 --- a/src/models/components/polarcheckoutschemascheckoutcreate.ts +++ b/src/models/components/polarcheckoutschemascheckoutcreate.ts @@ -12,6 +12,11 @@ import { Address$outboundSchema, } from "./address.js"; +/** + * Key-value object storing custom field values. + */ +export type PolarCheckoutSchemasCheckoutCreateCustomFieldData = {}; + /** * Payment processor to use. Currently only Stripe is supported. */ @@ -42,6 +47,12 @@ export type PolarCheckoutSchemasCheckoutCreate = { * You can store up to **50 key-value pairs**. */ metadata?: { [k: string]: string } | undefined; + /** + * Key-value object storing custom field values. + */ + customFieldData?: + | PolarCheckoutSchemasCheckoutCreateCustomFieldData + | undefined; /** * Payment processor to use. Currently only Stripe is supported. */ @@ -66,6 +77,41 @@ export type PolarCheckoutSchemasCheckoutCreate = { successUrl?: string | null | undefined; }; +/** @internal */ +export const PolarCheckoutSchemasCheckoutCreateCustomFieldData$inboundSchema: + z.ZodType< + PolarCheckoutSchemasCheckoutCreateCustomFieldData, + z.ZodTypeDef, + unknown + > = z.object({}); + +/** @internal */ +export type PolarCheckoutSchemasCheckoutCreateCustomFieldData$Outbound = {}; + +/** @internal */ +export const PolarCheckoutSchemasCheckoutCreateCustomFieldData$outboundSchema: + z.ZodType< + PolarCheckoutSchemasCheckoutCreateCustomFieldData$Outbound, + z.ZodTypeDef, + PolarCheckoutSchemasCheckoutCreateCustomFieldData + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PolarCheckoutSchemasCheckoutCreateCustomFieldData$ { + /** @deprecated use `PolarCheckoutSchemasCheckoutCreateCustomFieldData$inboundSchema` instead. */ + export const inboundSchema = + PolarCheckoutSchemasCheckoutCreateCustomFieldData$inboundSchema; + /** @deprecated use `PolarCheckoutSchemasCheckoutCreateCustomFieldData$outboundSchema` instead. */ + export const outboundSchema = + PolarCheckoutSchemasCheckoutCreateCustomFieldData$outboundSchema; + /** @deprecated use `PolarCheckoutSchemasCheckoutCreateCustomFieldData$Outbound` instead. */ + export type Outbound = + PolarCheckoutSchemasCheckoutCreateCustomFieldData$Outbound; +} + /** @internal */ export const PaymentProcessor$inboundSchema: z.ZodNativeEnum< typeof PaymentProcessor @@ -94,6 +140,9 @@ export const PolarCheckoutSchemasCheckoutCreate$inboundSchema: z.ZodType< unknown > = z.object({ metadata: z.record(z.string()).optional(), + custom_field_data: z.lazy(() => + PolarCheckoutSchemasCheckoutCreateCustomFieldData$inboundSchema + ).optional(), payment_processor: z.literal("stripe").optional(), product_price_id: z.string(), amount: z.nullable(z.number().int()).optional(), @@ -106,6 +155,7 @@ export const PolarCheckoutSchemasCheckoutCreate$inboundSchema: z.ZodType< success_url: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { + "custom_field_data": "customFieldData", "payment_processor": "paymentProcessor", "product_price_id": "productPriceId", "customer_name": "customerName", @@ -121,6 +171,9 @@ export const PolarCheckoutSchemasCheckoutCreate$inboundSchema: z.ZodType< /** @internal */ export type PolarCheckoutSchemasCheckoutCreate$Outbound = { metadata?: { [k: string]: string } | undefined; + custom_field_data?: + | PolarCheckoutSchemasCheckoutCreateCustomFieldData$Outbound + | undefined; payment_processor: "stripe"; product_price_id: string; amount?: number | null | undefined; @@ -140,6 +193,9 @@ export const PolarCheckoutSchemasCheckoutCreate$outboundSchema: z.ZodType< PolarCheckoutSchemasCheckoutCreate > = z.object({ metadata: z.record(z.string()).optional(), + customFieldData: z.lazy(() => + PolarCheckoutSchemasCheckoutCreateCustomFieldData$outboundSchema + ).optional(), paymentProcessor: z.literal("stripe").default("stripe"), productPriceId: z.string(), amount: z.nullable(z.number().int()).optional(), @@ -152,6 +208,7 @@ export const PolarCheckoutSchemasCheckoutCreate$outboundSchema: z.ZodType< successUrl: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { + customFieldData: "custom_field_data", paymentProcessor: "payment_processor", productPriceId: "product_price_id", customerName: "customer_name", diff --git a/src/models/components/product.ts b/src/models/components/product.ts index d39cf838..c3a198b7 100644 --- a/src/models/components/product.ts +++ b/src/models/components/product.ts @@ -5,26 +5,22 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { - BenefitArticles, - BenefitArticles$inboundSchema, - BenefitArticles$Outbound, - BenefitArticles$outboundSchema, -} from "./benefitarticles.js"; + AttachedCustomField, + AttachedCustomField$inboundSchema, + AttachedCustomField$Outbound, + AttachedCustomField$outboundSchema, +} from "./attachedcustomfield.js"; import { - BenefitBase, - BenefitBase$inboundSchema, - BenefitBase$Outbound, - BenefitBase$outboundSchema, -} from "./benefitbase.js"; + Benefit, + Benefit$inboundSchema, + Benefit$Outbound, + Benefit$outboundSchema, +} from "./benefit.js"; import { ProductMediaFileRead, ProductMediaFileRead$inboundSchema, ProductMediaFileRead$Outbound, ProductMediaFileRead$outboundSchema, - ProductMediaFileReadInput, - ProductMediaFileReadInput$inboundSchema, - ProductMediaFileReadInput$Outbound, - ProductMediaFileReadInput$outboundSchema, } from "./productmediafileread.js"; import { ProductPrice, @@ -33,8 +29,6 @@ import { ProductPrice$outboundSchema, } from "./productprice.js"; -export type ProductBenefits = BenefitBase | BenefitArticles; - /** * A product. */ @@ -72,101 +66,23 @@ export type Product = { */ organizationId: string; /** - * List of available prices for this product. + * List of prices for this product. */ prices: Array; /** - * The benefits granted by the product. + * List of benefits granted by the product. */ - benefits: Array; + benefits: Array; /** - * The medias associated to the product. + * List of medias associated to the product. */ medias: Array; -}; - -/** - * A product. - */ -export type ProductInput = { - /** - * Creation timestamp of the object. - */ - createdAt: Date; - /** - * Last modification timestamp of the object. - */ - modifiedAt: Date | null; /** - * The ID of the product. - */ - id: string; - /** - * The name of the product. - */ - name: string; - /** - * The description of the product. + * List of custom fields attached to the product. */ - description: string | null; - /** - * Whether the product is a subscription tier. - */ - isRecurring: boolean; - /** - * Whether the product is archived and no longer available. - */ - isArchived: boolean; - /** - * The ID of the organization owning the product. - */ - organizationId: string; - /** - * List of available prices for this product. - */ - prices: Array; - /** - * The benefits granted by the product. - */ - benefits: Array; - /** - * The medias associated to the product. - */ - medias: Array; + attachedCustomFields: Array; }; -/** @internal */ -export const ProductBenefits$inboundSchema: z.ZodType< - ProductBenefits, - z.ZodTypeDef, - unknown -> = z.union([BenefitBase$inboundSchema, BenefitArticles$inboundSchema]); - -/** @internal */ -export type ProductBenefits$Outbound = - | BenefitBase$Outbound - | BenefitArticles$Outbound; - -/** @internal */ -export const ProductBenefits$outboundSchema: z.ZodType< - ProductBenefits$Outbound, - z.ZodTypeDef, - ProductBenefits -> = z.union([BenefitBase$outboundSchema, BenefitArticles$outboundSchema]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ProductBenefits$ { - /** @deprecated use `ProductBenefits$inboundSchema` instead. */ - export const inboundSchema = ProductBenefits$inboundSchema; - /** @deprecated use `ProductBenefits$outboundSchema` instead. */ - export const outboundSchema = ProductBenefits$outboundSchema; - /** @deprecated use `ProductBenefits$Outbound` instead. */ - export type Outbound = ProductBenefits$Outbound; -} - /** @internal */ export const Product$inboundSchema: z.ZodType = z.object({ @@ -183,10 +99,9 @@ export const Product$inboundSchema: z.ZodType = is_archived: z.boolean(), organization_id: z.string(), prices: z.array(ProductPrice$inboundSchema), - benefits: z.array( - z.union([BenefitBase$inboundSchema, BenefitArticles$inboundSchema]), - ), + benefits: z.array(Benefit$inboundSchema), medias: z.array(ProductMediaFileRead$inboundSchema), + attached_custom_fields: z.array(AttachedCustomField$inboundSchema), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -194,6 +109,7 @@ export const Product$inboundSchema: z.ZodType = "is_recurring": "isRecurring", "is_archived": "isArchived", "organization_id": "organizationId", + "attached_custom_fields": "attachedCustomFields", }); }); @@ -208,8 +124,9 @@ export type Product$Outbound = { is_archived: boolean; organization_id: string; prices: Array; - benefits: Array; + benefits: Array; medias: Array; + attached_custom_fields: Array; }; /** @internal */ @@ -227,10 +144,9 @@ export const Product$outboundSchema: z.ZodType< isArchived: z.boolean(), organizationId: z.string(), prices: z.array(ProductPrice$outboundSchema), - benefits: z.array( - z.union([BenefitBase$outboundSchema, BenefitArticles$outboundSchema]), - ), + benefits: z.array(Benefit$outboundSchema), medias: z.array(ProductMediaFileRead$outboundSchema), + attachedCustomFields: z.array(AttachedCustomField$outboundSchema), }).transform((v) => { return remap$(v, { createdAt: "created_at", @@ -238,6 +154,7 @@ export const Product$outboundSchema: z.ZodType< isRecurring: "is_recurring", isArchived: "is_archived", organizationId: "organization_id", + attachedCustomFields: "attached_custom_fields", }); }); @@ -253,91 +170,3 @@ export namespace Product$ { /** @deprecated use `Product$Outbound` instead. */ export type Outbound = Product$Outbound; } - -/** @internal */ -export const ProductInput$inboundSchema: z.ZodType< - ProductInput, - z.ZodTypeDef, - unknown -> = z.object({ - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), - modified_at: z.nullable( - z.string().datetime({ offset: true }).transform(v => new Date(v)), - ), - id: z.string(), - name: z.string(), - description: z.nullable(z.string()), - is_recurring: z.boolean(), - is_archived: z.boolean(), - organization_id: z.string(), - prices: z.array(ProductPrice$inboundSchema), - benefits: z.array( - z.union([BenefitBase$inboundSchema, BenefitArticles$inboundSchema]), - ), - medias: z.array(ProductMediaFileReadInput$inboundSchema), -}).transform((v) => { - return remap$(v, { - "created_at": "createdAt", - "modified_at": "modifiedAt", - "is_recurring": "isRecurring", - "is_archived": "isArchived", - "organization_id": "organizationId", - }); -}); - -/** @internal */ -export type ProductInput$Outbound = { - created_at: string; - modified_at: string | null; - id: string; - name: string; - description: string | null; - is_recurring: boolean; - is_archived: boolean; - organization_id: string; - prices: Array; - benefits: Array; - medias: Array; -}; - -/** @internal */ -export const ProductInput$outboundSchema: z.ZodType< - ProductInput$Outbound, - z.ZodTypeDef, - ProductInput -> = z.object({ - createdAt: z.date().transform(v => v.toISOString()), - modifiedAt: z.nullable(z.date().transform(v => v.toISOString())), - id: z.string(), - name: z.string(), - description: z.nullable(z.string()), - isRecurring: z.boolean(), - isArchived: z.boolean(), - organizationId: z.string(), - prices: z.array(ProductPrice$outboundSchema), - benefits: z.array( - z.union([BenefitBase$outboundSchema, BenefitArticles$outboundSchema]), - ), - medias: z.array(ProductMediaFileReadInput$outboundSchema), -}).transform((v) => { - return remap$(v, { - createdAt: "created_at", - modifiedAt: "modified_at", - isRecurring: "is_recurring", - isArchived: "is_archived", - organizationId: "organization_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ProductInput$ { - /** @deprecated use `ProductInput$inboundSchema` instead. */ - export const inboundSchema = ProductInput$inboundSchema; - /** @deprecated use `ProductInput$outboundSchema` instead. */ - export const outboundSchema = ProductInput$outboundSchema; - /** @deprecated use `ProductInput$Outbound` instead. */ - export type Outbound = ProductInput$Outbound; -} diff --git a/src/models/components/productinput.ts b/src/models/components/productinput.ts new file mode 100644 index 00000000..bbe2cfec --- /dev/null +++ b/src/models/components/productinput.ts @@ -0,0 +1,173 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { + AttachedCustomField, + AttachedCustomField$inboundSchema, + AttachedCustomField$Outbound, + AttachedCustomField$outboundSchema, +} from "./attachedcustomfield.js"; +import { + BenefitInput, + BenefitInput$inboundSchema, + BenefitInput$Outbound, + BenefitInput$outboundSchema, +} from "./benefitinput.js"; +import { + ProductMediaFileReadInput, + ProductMediaFileReadInput$inboundSchema, + ProductMediaFileReadInput$Outbound, + ProductMediaFileReadInput$outboundSchema, +} from "./productmediafileread.js"; +import { + ProductPrice, + ProductPrice$inboundSchema, + ProductPrice$Outbound, + ProductPrice$outboundSchema, +} from "./productprice.js"; + +/** + * A product. + */ +export type ProductInput = { + /** + * Creation timestamp of the object. + */ + createdAt: Date; + /** + * Last modification timestamp of the object. + */ + modifiedAt: Date | null; + /** + * The ID of the product. + */ + id: string; + /** + * The name of the product. + */ + name: string; + /** + * The description of the product. + */ + description: string | null; + /** + * Whether the product is a subscription tier. + */ + isRecurring: boolean; + /** + * Whether the product is archived and no longer available. + */ + isArchived: boolean; + /** + * The ID of the organization owning the product. + */ + organizationId: string; + /** + * List of prices for this product. + */ + prices: Array; + /** + * List of benefits granted by the product. + */ + benefits: Array; + /** + * List of medias associated to the product. + */ + medias: Array; + /** + * List of custom fields attached to the product. + */ + attachedCustomFields: Array; +}; + +/** @internal */ +export const ProductInput$inboundSchema: z.ZodType< + ProductInput, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), + modified_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ), + id: z.string(), + name: z.string(), + description: z.nullable(z.string()), + is_recurring: z.boolean(), + is_archived: z.boolean(), + organization_id: z.string(), + prices: z.array(ProductPrice$inboundSchema), + benefits: z.array(BenefitInput$inboundSchema), + medias: z.array(ProductMediaFileReadInput$inboundSchema), + attached_custom_fields: z.array(AttachedCustomField$inboundSchema), +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "modified_at": "modifiedAt", + "is_recurring": "isRecurring", + "is_archived": "isArchived", + "organization_id": "organizationId", + "attached_custom_fields": "attachedCustomFields", + }); +}); + +/** @internal */ +export type ProductInput$Outbound = { + created_at: string; + modified_at: string | null; + id: string; + name: string; + description: string | null; + is_recurring: boolean; + is_archived: boolean; + organization_id: string; + prices: Array; + benefits: Array; + medias: Array; + attached_custom_fields: Array; +}; + +/** @internal */ +export const ProductInput$outboundSchema: z.ZodType< + ProductInput$Outbound, + z.ZodTypeDef, + ProductInput +> = z.object({ + createdAt: z.date().transform(v => v.toISOString()), + modifiedAt: z.nullable(z.date().transform(v => v.toISOString())), + id: z.string(), + name: z.string(), + description: z.nullable(z.string()), + isRecurring: z.boolean(), + isArchived: z.boolean(), + organizationId: z.string(), + prices: z.array(ProductPrice$outboundSchema), + benefits: z.array(BenefitInput$outboundSchema), + medias: z.array(ProductMediaFileReadInput$outboundSchema), + attachedCustomFields: z.array(AttachedCustomField$outboundSchema), +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + modifiedAt: "modified_at", + isRecurring: "is_recurring", + isArchived: "is_archived", + organizationId: "organization_id", + attachedCustomFields: "attached_custom_fields", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ProductInput$ { + /** @deprecated use `ProductInput$inboundSchema` instead. */ + export const inboundSchema = ProductInput$inboundSchema; + /** @deprecated use `ProductInput$outboundSchema` instead. */ + export const outboundSchema = ProductInput$outboundSchema; + /** @deprecated use `ProductInput$Outbound` instead. */ + export type Outbound = ProductInput$Outbound; +} diff --git a/src/models/components/productonetimecreate.ts b/src/models/components/productonetimecreate.ts index 10fa3d9c..50795a9b 100644 --- a/src/models/components/productonetimecreate.ts +++ b/src/models/components/productonetimecreate.ts @@ -4,6 +4,12 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; +import { + AttachedCustomFieldCreate, + AttachedCustomFieldCreate$inboundSchema, + AttachedCustomFieldCreate$Outbound, + AttachedCustomFieldCreate$outboundSchema, +} from "./attachedcustomfieldcreate.js"; import { ProductPriceOneTimeCustomCreate, ProductPriceOneTimeCustomCreate$inboundSchema, @@ -52,6 +58,10 @@ export type ProductOneTimeCreate = { * List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded. */ medias?: Array | null | undefined; + /** + * List of custom fields to attach. + */ + attachedCustomFields?: Array | undefined; /** * The ID of the organization owning the product. **Required unless you use an organization token.** */ @@ -112,9 +122,12 @@ export const ProductOneTimeCreate$inboundSchema: z.ZodType< ]), ), medias: z.nullable(z.array(z.string())).optional(), + attached_custom_fields: z.array(AttachedCustomFieldCreate$inboundSchema) + .optional(), organization_id: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { + "attached_custom_fields": "attachedCustomFields", "organization_id": "organizationId", }); }); @@ -129,6 +142,9 @@ export type ProductOneTimeCreate$Outbound = { | ProductPriceOneTimeCustomCreate$Outbound >; medias?: Array | null | undefined; + attached_custom_fields?: + | Array + | undefined; organization_id?: string | null | undefined; }; @@ -148,9 +164,12 @@ export const ProductOneTimeCreate$outboundSchema: z.ZodType< ]), ), medias: z.nullable(z.array(z.string())).optional(), + attachedCustomFields: z.array(AttachedCustomFieldCreate$outboundSchema) + .optional(), organizationId: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { + attachedCustomFields: "attached_custom_fields", organizationId: "organization_id", }); }); diff --git a/src/models/components/productrecurringcreate.ts b/src/models/components/productrecurringcreate.ts index afa8d661..8d6dafbf 100644 --- a/src/models/components/productrecurringcreate.ts +++ b/src/models/components/productrecurringcreate.ts @@ -4,6 +4,12 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; +import { + AttachedCustomFieldCreate, + AttachedCustomFieldCreate$inboundSchema, + AttachedCustomFieldCreate$Outbound, + AttachedCustomFieldCreate$outboundSchema, +} from "./attachedcustomfieldcreate.js"; import { ProductPriceRecurringFixedCreate, ProductPriceRecurringFixedCreate$inboundSchema, @@ -46,6 +52,10 @@ export type ProductRecurringCreate = { * List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded. */ medias?: Array | null | undefined; + /** + * List of custom fields to attach. + */ + attachedCustomFields?: Array | undefined; /** * The ID of the organization owning the product. **Required unless you use an organization token.** */ @@ -103,9 +113,12 @@ export const ProductRecurringCreate$inboundSchema: z.ZodType< z.array(ProductPriceRecurringFreeCreate$inboundSchema), ]), medias: z.nullable(z.array(z.string())).optional(), + attached_custom_fields: z.array(AttachedCustomFieldCreate$inboundSchema) + .optional(), organization_id: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { + "attached_custom_fields": "attachedCustomFields", "organization_id": "organizationId", }); }); @@ -118,6 +131,9 @@ export type ProductRecurringCreate$Outbound = { | Array | Array; medias?: Array | null | undefined; + attached_custom_fields?: + | Array + | undefined; organization_id?: string | null | undefined; }; @@ -134,9 +150,12 @@ export const ProductRecurringCreate$outboundSchema: z.ZodType< z.array(ProductPriceRecurringFreeCreate$outboundSchema), ]), medias: z.nullable(z.array(z.string())).optional(), + attachedCustomFields: z.array(AttachedCustomFieldCreate$outboundSchema) + .optional(), organizationId: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { + attachedCustomFields: "attached_custom_fields", organizationId: "organization_id", }); }); diff --git a/src/models/components/productupdate.ts b/src/models/components/productupdate.ts index bccf57c7..c38cfe19 100644 --- a/src/models/components/productupdate.ts +++ b/src/models/components/productupdate.ts @@ -4,6 +4,12 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; +import { + AttachedCustomFieldCreate, + AttachedCustomFieldCreate$inboundSchema, + AttachedCustomFieldCreate$Outbound, + AttachedCustomFieldCreate$outboundSchema, +} from "./attachedcustomfieldcreate.js"; import { ExistingProductPrice, ExistingProductPrice$inboundSchema, @@ -80,6 +86,7 @@ export type ProductUpdate = { * List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded. */ medias?: Array | null | undefined; + attachedCustomFields?: Array | null | undefined; }; /** @internal */ @@ -154,9 +161,13 @@ export const ProductUpdate$inboundSchema: z.ZodType< ), ).optional(), medias: z.nullable(z.array(z.string())).optional(), + attached_custom_fields: z.nullable( + z.array(AttachedCustomFieldCreate$inboundSchema), + ).optional(), }).transform((v) => { return remap$(v, { "is_archived": "isArchived", + "attached_custom_fields": "attachedCustomFields", }); }); @@ -177,6 +188,10 @@ export type ProductUpdate$Outbound = { | null | undefined; medias?: Array | null | undefined; + attached_custom_fields?: + | Array + | null + | undefined; }; /** @internal */ @@ -201,9 +216,13 @@ export const ProductUpdate$outboundSchema: z.ZodType< ), ).optional(), medias: z.nullable(z.array(z.string())).optional(), + attachedCustomFields: z.nullable( + z.array(AttachedCustomFieldCreate$outboundSchema), + ).optional(), }).transform((v) => { return remap$(v, { isArchived: "is_archived", + attachedCustomFields: "attached_custom_fields", }); }); diff --git a/src/models/components/repository.ts b/src/models/components/repository.ts index df23d04a..bb07786d 100644 --- a/src/models/components/repository.ts +++ b/src/models/components/repository.ts @@ -10,6 +10,12 @@ import { ExternalOrganization$Outbound, ExternalOrganization$outboundSchema, } from "./externalorganization.js"; +import { + Organization, + Organization$inboundSchema, + Organization$Outbound, + Organization$outboundSchema, +} from "./organization.js"; import { RepositoryProfileSettings, RepositoryProfileSettings$inboundSchema, @@ -31,6 +37,7 @@ export type Repository = { */ profileSettings: RepositoryProfileSettings | null; organization: ExternalOrganization; + internalOrganization: Organization | null; }; /** @internal */ @@ -49,10 +56,12 @@ export const Repository$inboundSchema: z.ZodType< homepage: z.nullable(z.string()), profile_settings: z.nullable(RepositoryProfileSettings$inboundSchema), organization: ExternalOrganization$inboundSchema, + internal_organization: z.nullable(Organization$inboundSchema), }).transform((v) => { return remap$(v, { "is_private": "isPrivate", "profile_settings": "profileSettings", + "internal_organization": "internalOrganization", }); }); @@ -68,6 +77,7 @@ export type Repository$Outbound = { homepage: string | null; profile_settings: RepositoryProfileSettings$Outbound | null; organization: ExternalOrganization$Outbound; + internal_organization: Organization$Outbound | null; }; /** @internal */ @@ -86,10 +96,12 @@ export const Repository$outboundSchema: z.ZodType< homepage: z.nullable(z.string()), profileSettings: z.nullable(RepositoryProfileSettings$outboundSchema), organization: ExternalOrganization$outboundSchema, + internalOrganization: z.nullable(Organization$outboundSchema), }).transform((v) => { return remap$(v, { isPrivate: "is_private", profileSettings: "profile_settings", + internalOrganization: "internal_organization", }); }); diff --git a/src/models/components/subscription.ts b/src/models/components/subscription.ts index b0542230..4f41d599 100644 --- a/src/models/components/subscription.ts +++ b/src/models/components/subscription.ts @@ -10,6 +10,12 @@ import { Product$Outbound, Product$outboundSchema, } from "./product.js"; +import { + ProductInput, + ProductInput$inboundSchema, + ProductInput$Outbound, + ProductInput$outboundSchema, +} from "./productinput.js"; import { ProductPriceRecurring, ProductPriceRecurring$inboundSchema, @@ -33,6 +39,11 @@ import { SubscriptionUser$outboundSchema, } from "./subscriptionuser.js"; +/** + * Key-value object storing custom field values. + */ +export type SubscriptionCustomFieldData = {}; + export type Subscription = { /** * Creation timestamp of the object. @@ -60,6 +71,10 @@ export type Subscription = { priceId: string; checkoutId: string | null; metadata: { [k: string]: string }; + /** + * Key-value object storing custom field values. + */ + customFieldData?: SubscriptionCustomFieldData | undefined; user: SubscriptionUser; /** * A product. @@ -68,6 +83,75 @@ export type Subscription = { price: ProductPriceRecurring; }; +export type SubscriptionInput = { + /** + * Creation timestamp of the object. + */ + createdAt: Date; + /** + * Last modification timestamp of the object. + */ + modifiedAt: Date | null; + /** + * The ID of the object. + */ + id: string; + amount: number | null; + currency: string | null; + recurringInterval: SubscriptionRecurringInterval; + status: SubscriptionStatus; + currentPeriodStart: Date; + currentPeriodEnd: Date | null; + cancelAtPeriodEnd: boolean; + startedAt: Date | null; + endedAt: Date | null; + userId: string; + productId: string; + priceId: string; + checkoutId: string | null; + metadata: { [k: string]: string }; + /** + * Key-value object storing custom field values. + */ + customFieldData?: SubscriptionCustomFieldData | undefined; + user: SubscriptionUser; + /** + * A product. + */ + product: ProductInput; + price: ProductPriceRecurring; +}; + +/** @internal */ +export const SubscriptionCustomFieldData$inboundSchema: z.ZodType< + SubscriptionCustomFieldData, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type SubscriptionCustomFieldData$Outbound = {}; + +/** @internal */ +export const SubscriptionCustomFieldData$outboundSchema: z.ZodType< + SubscriptionCustomFieldData$Outbound, + z.ZodTypeDef, + SubscriptionCustomFieldData +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscriptionCustomFieldData$ { + /** @deprecated use `SubscriptionCustomFieldData$inboundSchema` instead. */ + export const inboundSchema = SubscriptionCustomFieldData$inboundSchema; + /** @deprecated use `SubscriptionCustomFieldData$outboundSchema` instead. */ + export const outboundSchema = SubscriptionCustomFieldData$outboundSchema; + /** @deprecated use `SubscriptionCustomFieldData$Outbound` instead. */ + export type Outbound = SubscriptionCustomFieldData$Outbound; +} + /** @internal */ export const Subscription$inboundSchema: z.ZodType< Subscription, @@ -101,6 +185,8 @@ export const Subscription$inboundSchema: z.ZodType< price_id: z.string(), checkout_id: z.nullable(z.string()), metadata: z.record(z.string()), + custom_field_data: z.lazy(() => SubscriptionCustomFieldData$inboundSchema) + .optional(), user: SubscriptionUser$inboundSchema, product: Product$inboundSchema, price: ProductPriceRecurring$inboundSchema, @@ -118,6 +204,7 @@ export const Subscription$inboundSchema: z.ZodType< "product_id": "productId", "price_id": "priceId", "checkout_id": "checkoutId", + "custom_field_data": "customFieldData", }); }); @@ -140,6 +227,7 @@ export type Subscription$Outbound = { price_id: string; checkout_id: string | null; metadata: { [k: string]: string }; + custom_field_data?: SubscriptionCustomFieldData$Outbound | undefined; user: SubscriptionUser$Outbound; product: Product$Outbound; price: ProductPriceRecurring$Outbound; @@ -168,6 +256,8 @@ export const Subscription$outboundSchema: z.ZodType< priceId: z.string(), checkoutId: z.nullable(z.string()), metadata: z.record(z.string()), + customFieldData: z.lazy(() => SubscriptionCustomFieldData$outboundSchema) + .optional(), user: SubscriptionUser$outboundSchema, product: Product$outboundSchema, price: ProductPriceRecurring$outboundSchema, @@ -185,6 +275,7 @@ export const Subscription$outboundSchema: z.ZodType< productId: "product_id", priceId: "price_id", checkoutId: "checkout_id", + customFieldData: "custom_field_data", }); }); @@ -200,3 +291,143 @@ export namespace Subscription$ { /** @deprecated use `Subscription$Outbound` instead. */ export type Outbound = Subscription$Outbound; } + +/** @internal */ +export const SubscriptionInput$inboundSchema: z.ZodType< + SubscriptionInput, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), + modified_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ), + id: z.string(), + amount: z.nullable(z.number().int()), + currency: z.nullable(z.string()), + recurring_interval: SubscriptionRecurringInterval$inboundSchema, + status: SubscriptionStatus$inboundSchema, + current_period_start: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ), + current_period_end: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ), + cancel_at_period_end: z.boolean(), + started_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ), + ended_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ), + user_id: z.string(), + product_id: z.string(), + price_id: z.string(), + checkout_id: z.nullable(z.string()), + metadata: z.record(z.string()), + custom_field_data: z.lazy(() => SubscriptionCustomFieldData$inboundSchema) + .optional(), + user: SubscriptionUser$inboundSchema, + product: ProductInput$inboundSchema, + price: ProductPriceRecurring$inboundSchema, +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "modified_at": "modifiedAt", + "recurring_interval": "recurringInterval", + "current_period_start": "currentPeriodStart", + "current_period_end": "currentPeriodEnd", + "cancel_at_period_end": "cancelAtPeriodEnd", + "started_at": "startedAt", + "ended_at": "endedAt", + "user_id": "userId", + "product_id": "productId", + "price_id": "priceId", + "checkout_id": "checkoutId", + "custom_field_data": "customFieldData", + }); +}); + +/** @internal */ +export type SubscriptionInput$Outbound = { + created_at: string; + modified_at: string | null; + id: string; + amount: number | null; + currency: string | null; + recurring_interval: string; + status: string; + current_period_start: string; + current_period_end: string | null; + cancel_at_period_end: boolean; + started_at: string | null; + ended_at: string | null; + user_id: string; + product_id: string; + price_id: string; + checkout_id: string | null; + metadata: { [k: string]: string }; + custom_field_data?: SubscriptionCustomFieldData$Outbound | undefined; + user: SubscriptionUser$Outbound; + product: ProductInput$Outbound; + price: ProductPriceRecurring$Outbound; +}; + +/** @internal */ +export const SubscriptionInput$outboundSchema: z.ZodType< + SubscriptionInput$Outbound, + z.ZodTypeDef, + SubscriptionInput +> = z.object({ + createdAt: z.date().transform(v => v.toISOString()), + modifiedAt: z.nullable(z.date().transform(v => v.toISOString())), + id: z.string(), + amount: z.nullable(z.number().int()), + currency: z.nullable(z.string()), + recurringInterval: SubscriptionRecurringInterval$outboundSchema, + status: SubscriptionStatus$outboundSchema, + currentPeriodStart: z.date().transform(v => v.toISOString()), + currentPeriodEnd: z.nullable(z.date().transform(v => v.toISOString())), + cancelAtPeriodEnd: z.boolean(), + startedAt: z.nullable(z.date().transform(v => v.toISOString())), + endedAt: z.nullable(z.date().transform(v => v.toISOString())), + userId: z.string(), + productId: z.string(), + priceId: z.string(), + checkoutId: z.nullable(z.string()), + metadata: z.record(z.string()), + customFieldData: z.lazy(() => SubscriptionCustomFieldData$outboundSchema) + .optional(), + user: SubscriptionUser$outboundSchema, + product: ProductInput$outboundSchema, + price: ProductPriceRecurring$outboundSchema, +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + modifiedAt: "modified_at", + recurringInterval: "recurring_interval", + currentPeriodStart: "current_period_start", + currentPeriodEnd: "current_period_end", + cancelAtPeriodEnd: "cancel_at_period_end", + startedAt: "started_at", + endedAt: "ended_at", + userId: "user_id", + productId: "product_id", + priceId: "price_id", + checkoutId: "checkout_id", + customFieldData: "custom_field_data", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SubscriptionInput$ { + /** @deprecated use `SubscriptionInput$inboundSchema` instead. */ + export const inboundSchema = SubscriptionInput$inboundSchema; + /** @deprecated use `SubscriptionInput$outboundSchema` instead. */ + export const outboundSchema = SubscriptionInput$outboundSchema; + /** @deprecated use `SubscriptionInput$Outbound` instead. */ + export type Outbound = SubscriptionInput$Outbound; +} diff --git a/src/models/components/subscriptioninput.ts b/src/models/components/subscriptioninput.ts deleted file mode 100644 index 27936a1d..00000000 --- a/src/models/components/subscriptioninput.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { - ProductInput, - ProductInput$inboundSchema, - ProductInput$Outbound, - ProductInput$outboundSchema, -} from "./product.js"; -import { - ProductPriceRecurring, - ProductPriceRecurring$inboundSchema, - ProductPriceRecurring$Outbound, - ProductPriceRecurring$outboundSchema, -} from "./productpricerecurring.js"; -import { - SubscriptionRecurringInterval, - SubscriptionRecurringInterval$inboundSchema, - SubscriptionRecurringInterval$outboundSchema, -} from "./subscriptionrecurringinterval.js"; -import { - SubscriptionStatus, - SubscriptionStatus$inboundSchema, - SubscriptionStatus$outboundSchema, -} from "./subscriptionstatus.js"; -import { - SubscriptionUser, - SubscriptionUser$inboundSchema, - SubscriptionUser$Outbound, - SubscriptionUser$outboundSchema, -} from "./subscriptionuser.js"; - -export type SubscriptionInput = { - /** - * Creation timestamp of the object. - */ - createdAt: Date; - /** - * Last modification timestamp of the object. - */ - modifiedAt: Date | null; - /** - * The ID of the object. - */ - id: string; - amount: number | null; - currency: string | null; - recurringInterval: SubscriptionRecurringInterval; - status: SubscriptionStatus; - currentPeriodStart: Date; - currentPeriodEnd: Date | null; - cancelAtPeriodEnd: boolean; - startedAt: Date | null; - endedAt: Date | null; - userId: string; - productId: string; - priceId: string; - checkoutId: string | null; - metadata: { [k: string]: string }; - user: SubscriptionUser; - /** - * A product. - */ - product: ProductInput; - price: ProductPriceRecurring; -}; - -/** @internal */ -export const SubscriptionInput$inboundSchema: z.ZodType< - SubscriptionInput, - z.ZodTypeDef, - unknown -> = z.object({ - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), - modified_at: z.nullable( - z.string().datetime({ offset: true }).transform(v => new Date(v)), - ), - id: z.string(), - amount: z.nullable(z.number().int()), - currency: z.nullable(z.string()), - recurring_interval: SubscriptionRecurringInterval$inboundSchema, - status: SubscriptionStatus$inboundSchema, - current_period_start: z.string().datetime({ offset: true }).transform(v => - new Date(v) - ), - current_period_end: z.nullable( - z.string().datetime({ offset: true }).transform(v => new Date(v)), - ), - cancel_at_period_end: z.boolean(), - started_at: z.nullable( - z.string().datetime({ offset: true }).transform(v => new Date(v)), - ), - ended_at: z.nullable( - z.string().datetime({ offset: true }).transform(v => new Date(v)), - ), - user_id: z.string(), - product_id: z.string(), - price_id: z.string(), - checkout_id: z.nullable(z.string()), - metadata: z.record(z.string()), - user: SubscriptionUser$inboundSchema, - product: ProductInput$inboundSchema, - price: ProductPriceRecurring$inboundSchema, -}).transform((v) => { - return remap$(v, { - "created_at": "createdAt", - "modified_at": "modifiedAt", - "recurring_interval": "recurringInterval", - "current_period_start": "currentPeriodStart", - "current_period_end": "currentPeriodEnd", - "cancel_at_period_end": "cancelAtPeriodEnd", - "started_at": "startedAt", - "ended_at": "endedAt", - "user_id": "userId", - "product_id": "productId", - "price_id": "priceId", - "checkout_id": "checkoutId", - }); -}); - -/** @internal */ -export type SubscriptionInput$Outbound = { - created_at: string; - modified_at: string | null; - id: string; - amount: number | null; - currency: string | null; - recurring_interval: string; - status: string; - current_period_start: string; - current_period_end: string | null; - cancel_at_period_end: boolean; - started_at: string | null; - ended_at: string | null; - user_id: string; - product_id: string; - price_id: string; - checkout_id: string | null; - metadata: { [k: string]: string }; - user: SubscriptionUser$Outbound; - product: ProductInput$Outbound; - price: ProductPriceRecurring$Outbound; -}; - -/** @internal */ -export const SubscriptionInput$outboundSchema: z.ZodType< - SubscriptionInput$Outbound, - z.ZodTypeDef, - SubscriptionInput -> = z.object({ - createdAt: z.date().transform(v => v.toISOString()), - modifiedAt: z.nullable(z.date().transform(v => v.toISOString())), - id: z.string(), - amount: z.nullable(z.number().int()), - currency: z.nullable(z.string()), - recurringInterval: SubscriptionRecurringInterval$outboundSchema, - status: SubscriptionStatus$outboundSchema, - currentPeriodStart: z.date().transform(v => v.toISOString()), - currentPeriodEnd: z.nullable(z.date().transform(v => v.toISOString())), - cancelAtPeriodEnd: z.boolean(), - startedAt: z.nullable(z.date().transform(v => v.toISOString())), - endedAt: z.nullable(z.date().transform(v => v.toISOString())), - userId: z.string(), - productId: z.string(), - priceId: z.string(), - checkoutId: z.nullable(z.string()), - metadata: z.record(z.string()), - user: SubscriptionUser$outboundSchema, - product: ProductInput$outboundSchema, - price: ProductPriceRecurring$outboundSchema, -}).transform((v) => { - return remap$(v, { - createdAt: "created_at", - modifiedAt: "modified_at", - recurringInterval: "recurring_interval", - currentPeriodStart: "current_period_start", - currentPeriodEnd: "current_period_end", - cancelAtPeriodEnd: "cancel_at_period_end", - startedAt: "started_at", - endedAt: "ended_at", - userId: "user_id", - productId: "product_id", - priceId: "price_id", - checkoutId: "checkout_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SubscriptionInput$ { - /** @deprecated use `SubscriptionInput$inboundSchema` instead. */ - export const inboundSchema = SubscriptionInput$inboundSchema; - /** @deprecated use `SubscriptionInput$outboundSchema` instead. */ - export const outboundSchema = SubscriptionInput$outboundSchema; - /** @deprecated use `SubscriptionInput$Outbound` instead. */ - export type Outbound = SubscriptionInput$Outbound; -} diff --git a/src/models/components/userorderproduct.ts b/src/models/components/userorderproduct.ts index 37bfb6c7..3e54e39b 100644 --- a/src/models/components/userorderproduct.ts +++ b/src/models/components/userorderproduct.ts @@ -16,6 +16,12 @@ import { BenefitBase$Outbound, BenefitBase$outboundSchema, } from "./benefitbase.js"; +import { + Organization, + Organization$inboundSchema, + Organization$Outbound, + Organization$outboundSchema, +} from "./organization.js"; import { ProductMediaFileRead, ProductMediaFileRead$inboundSchema, @@ -65,17 +71,18 @@ export type UserOrderProduct = { */ organizationId: string; /** - * List of available prices for this product. + * List of prices for this product. */ prices: Array; /** - * The benefits granted by the product. + * List of benefits granted by the product. */ benefits: Array; /** - * The medias associated to the product. + * List of medias associated to the product. */ medias: Array; + organization: Organization; }; /** @internal */ @@ -129,6 +136,7 @@ export const UserOrderProduct$inboundSchema: z.ZodType< z.union([BenefitBase$inboundSchema, BenefitArticles$inboundSchema]), ), medias: z.array(ProductMediaFileRead$inboundSchema), + organization: Organization$inboundSchema, }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -152,6 +160,7 @@ export type UserOrderProduct$Outbound = { prices: Array; benefits: Array; medias: Array; + organization: Organization$Outbound; }; /** @internal */ @@ -173,6 +182,7 @@ export const UserOrderProduct$outboundSchema: z.ZodType< z.union([BenefitBase$outboundSchema, BenefitArticles$outboundSchema]), ), medias: z.array(ProductMediaFileRead$outboundSchema), + organization: Organization$outboundSchema, }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/usersubscriptionproduct.ts b/src/models/components/usersubscriptionproduct.ts index c0e1dbfe..2d72f5fd 100644 --- a/src/models/components/usersubscriptionproduct.ts +++ b/src/models/components/usersubscriptionproduct.ts @@ -16,6 +16,12 @@ import { BenefitBase$Outbound, BenefitBase$outboundSchema, } from "./benefitbase.js"; +import { + Organization, + Organization$inboundSchema, + Organization$Outbound, + Organization$outboundSchema, +} from "./organization.js"; import { ProductMediaFileRead, ProductMediaFileRead$inboundSchema, @@ -65,17 +71,18 @@ export type UserSubscriptionProduct = { */ organizationId: string; /** - * List of available prices for this product. + * List of prices for this product. */ prices: Array; /** - * The benefits granted by the product. + * List of benefits granted by the product. */ benefits: Array; /** - * The medias associated to the product. + * List of medias associated to the product. */ medias: Array; + organization: Organization; }; /** @internal */ @@ -131,6 +138,7 @@ export const UserSubscriptionProduct$inboundSchema: z.ZodType< z.union([BenefitBase$inboundSchema, BenefitArticles$inboundSchema]), ), medias: z.array(ProductMediaFileRead$inboundSchema), + organization: Organization$inboundSchema, }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -154,6 +162,7 @@ export type UserSubscriptionProduct$Outbound = { prices: Array; benefits: Array; medias: Array; + organization: Organization$Outbound; }; /** @internal */ @@ -175,6 +184,7 @@ export const UserSubscriptionProduct$outboundSchema: z.ZodType< z.union([BenefitBase$outboundSchema, BenefitArticles$outboundSchema]), ), medias: z.array(ProductMediaFileRead$outboundSchema), + organization: Organization$outboundSchema, }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/webhookproductcreatedpayload.ts b/src/models/components/webhookproductcreatedpayload.ts index 40e51c05..bb55820d 100644 --- a/src/models/components/webhookproductcreatedpayload.ts +++ b/src/models/components/webhookproductcreatedpayload.ts @@ -9,7 +9,7 @@ import { ProductInput$inboundSchema, ProductInput$Outbound, ProductInput$outboundSchema, -} from "./product.js"; +} from "./productinput.js"; export const WebhookProductCreatedPayloadType = { ProductCreated: "product.created", diff --git a/src/models/components/webhookproductupdatedpayload.ts b/src/models/components/webhookproductupdatedpayload.ts index bd0930fd..c0da456f 100644 --- a/src/models/components/webhookproductupdatedpayload.ts +++ b/src/models/components/webhookproductupdatedpayload.ts @@ -9,7 +9,7 @@ import { ProductInput$inboundSchema, ProductInput$Outbound, ProductInput$outboundSchema, -} from "./product.js"; +} from "./productinput.js"; export const WebhookProductUpdatedPayloadType = { ProductUpdated: "product.updated", diff --git a/src/models/components/webhooksubscriptionactivepayload.ts b/src/models/components/webhooksubscriptionactivepayload.ts index 06e77985..940a7b3a 100644 --- a/src/models/components/webhooksubscriptionactivepayload.ts +++ b/src/models/components/webhooksubscriptionactivepayload.ts @@ -9,7 +9,7 @@ import { SubscriptionInput$inboundSchema, SubscriptionInput$Outbound, SubscriptionInput$outboundSchema, -} from "./subscriptioninput.js"; +} from "./subscription.js"; export const WebhookSubscriptionActivePayloadType = { SubscriptionActive: "subscription.active", diff --git a/src/models/components/webhooksubscriptioncanceledpayload.ts b/src/models/components/webhooksubscriptioncanceledpayload.ts index c18236c1..f3e00a12 100644 --- a/src/models/components/webhooksubscriptioncanceledpayload.ts +++ b/src/models/components/webhooksubscriptioncanceledpayload.ts @@ -9,7 +9,7 @@ import { SubscriptionInput$inboundSchema, SubscriptionInput$Outbound, SubscriptionInput$outboundSchema, -} from "./subscriptioninput.js"; +} from "./subscription.js"; export const WebhookSubscriptionCanceledPayloadType = { SubscriptionCanceled: "subscription.canceled", diff --git a/src/models/components/webhooksubscriptioncreatedpayload.ts b/src/models/components/webhooksubscriptioncreatedpayload.ts index c0e05d75..033db825 100644 --- a/src/models/components/webhooksubscriptioncreatedpayload.ts +++ b/src/models/components/webhooksubscriptioncreatedpayload.ts @@ -9,7 +9,7 @@ import { SubscriptionInput$inboundSchema, SubscriptionInput$Outbound, SubscriptionInput$outboundSchema, -} from "./subscriptioninput.js"; +} from "./subscription.js"; export const WebhookSubscriptionCreatedPayloadType = { SubscriptionCreated: "subscription.created", diff --git a/src/models/components/webhooksubscriptionrevokedpayload.ts b/src/models/components/webhooksubscriptionrevokedpayload.ts index 0aa3d186..91083418 100644 --- a/src/models/components/webhooksubscriptionrevokedpayload.ts +++ b/src/models/components/webhooksubscriptionrevokedpayload.ts @@ -9,7 +9,7 @@ import { SubscriptionInput$inboundSchema, SubscriptionInput$Outbound, SubscriptionInput$outboundSchema, -} from "./subscriptioninput.js"; +} from "./subscription.js"; export const WebhookSubscriptionRevokedPayloadType = { SubscriptionRevoked: "subscription.revoked", diff --git a/src/models/components/webhooksubscriptionupdatedpayload.ts b/src/models/components/webhooksubscriptionupdatedpayload.ts index 80b9f9fa..d5021426 100644 --- a/src/models/components/webhooksubscriptionupdatedpayload.ts +++ b/src/models/components/webhooksubscriptionupdatedpayload.ts @@ -9,7 +9,7 @@ import { SubscriptionInput$inboundSchema, SubscriptionInput$Outbound, SubscriptionInput$outboundSchema, -} from "./subscriptioninput.js"; +} from "./subscription.js"; export const WebhookSubscriptionUpdatedPayloadType = { SubscriptionUpdated: "subscription.updated", diff --git a/src/models/operations/customfieldsdelete.ts b/src/models/operations/customfieldsdelete.ts new file mode 100644 index 00000000..1136f4cb --- /dev/null +++ b/src/models/operations/customfieldsdelete.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type CustomFieldsDeleteRequest = { + /** + * The custom field ID. + */ + id: string; +}; + +/** @internal */ +export const CustomFieldsDeleteRequest$inboundSchema: z.ZodType< + CustomFieldsDeleteRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); + +/** @internal */ +export type CustomFieldsDeleteRequest$Outbound = { + id: string; +}; + +/** @internal */ +export const CustomFieldsDeleteRequest$outboundSchema: z.ZodType< + CustomFieldsDeleteRequest$Outbound, + z.ZodTypeDef, + CustomFieldsDeleteRequest +> = z.object({ + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldsDeleteRequest$ { + /** @deprecated use `CustomFieldsDeleteRequest$inboundSchema` instead. */ + export const inboundSchema = CustomFieldsDeleteRequest$inboundSchema; + /** @deprecated use `CustomFieldsDeleteRequest$outboundSchema` instead. */ + export const outboundSchema = CustomFieldsDeleteRequest$outboundSchema; + /** @deprecated use `CustomFieldsDeleteRequest$Outbound` instead. */ + export type Outbound = CustomFieldsDeleteRequest$Outbound; +} diff --git a/src/models/operations/customfieldsget.ts b/src/models/operations/customfieldsget.ts new file mode 100644 index 00000000..dc2b32e9 --- /dev/null +++ b/src/models/operations/customfieldsget.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type CustomFieldsGetRequest = { + /** + * The custom field ID. + */ + id: string; +}; + +/** @internal */ +export const CustomFieldsGetRequest$inboundSchema: z.ZodType< + CustomFieldsGetRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); + +/** @internal */ +export type CustomFieldsGetRequest$Outbound = { + id: string; +}; + +/** @internal */ +export const CustomFieldsGetRequest$outboundSchema: z.ZodType< + CustomFieldsGetRequest$Outbound, + z.ZodTypeDef, + CustomFieldsGetRequest +> = z.object({ + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldsGetRequest$ { + /** @deprecated use `CustomFieldsGetRequest$inboundSchema` instead. */ + export const inboundSchema = CustomFieldsGetRequest$inboundSchema; + /** @deprecated use `CustomFieldsGetRequest$outboundSchema` instead. */ + export const outboundSchema = CustomFieldsGetRequest$outboundSchema; + /** @deprecated use `CustomFieldsGetRequest$Outbound` instead. */ + export type Outbound = CustomFieldsGetRequest$Outbound; +} diff --git a/src/models/operations/customfieldslist.ts b/src/models/operations/customfieldslist.ts new file mode 100644 index 00000000..b8cfc1c8 --- /dev/null +++ b/src/models/operations/customfieldslist.ts @@ -0,0 +1,249 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import * as components from "../components/index.js"; + +/** + * Filter by organization ID. + */ +export type CustomFieldsListQueryParamOrganizationIDFilter = + | string + | Array; + +/** + * Filter by custom field type. + */ +export type CustomFieldTypeFilter = + | components.CustomFieldType + | Array; + +export type CustomFieldsListRequest = { + /** + * Filter by organization ID. + */ + organizationId?: string | Array | null | undefined; + /** + * Filter by custom field name or slug. + */ + query?: string | null | undefined; + /** + * Filter by custom field type. + */ + typeFilter?: + | components.CustomFieldType + | Array + | null + | undefined; + /** + * Page number, defaults to 1. + */ + page?: number | undefined; + /** + * Size of a page, defaults to 10. Maximum is 100. + */ + limit?: number | undefined; + /** + * Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order. + */ + sorting?: Array | null | undefined; +}; + +export type CustomFieldsListResponse = { + result: components.ListResource; +}; + +/** @internal */ +export const CustomFieldsListQueryParamOrganizationIDFilter$inboundSchema: + z.ZodType< + CustomFieldsListQueryParamOrganizationIDFilter, + z.ZodTypeDef, + unknown + > = z.union([z.string(), z.array(z.string())]); + +/** @internal */ +export type CustomFieldsListQueryParamOrganizationIDFilter$Outbound = + | string + | Array; + +/** @internal */ +export const CustomFieldsListQueryParamOrganizationIDFilter$outboundSchema: + z.ZodType< + CustomFieldsListQueryParamOrganizationIDFilter$Outbound, + z.ZodTypeDef, + CustomFieldsListQueryParamOrganizationIDFilter + > = z.union([z.string(), z.array(z.string())]); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldsListQueryParamOrganizationIDFilter$ { + /** @deprecated use `CustomFieldsListQueryParamOrganizationIDFilter$inboundSchema` instead. */ + export const inboundSchema = + CustomFieldsListQueryParamOrganizationIDFilter$inboundSchema; + /** @deprecated use `CustomFieldsListQueryParamOrganizationIDFilter$outboundSchema` instead. */ + export const outboundSchema = + CustomFieldsListQueryParamOrganizationIDFilter$outboundSchema; + /** @deprecated use `CustomFieldsListQueryParamOrganizationIDFilter$Outbound` instead. */ + export type Outbound = + CustomFieldsListQueryParamOrganizationIDFilter$Outbound; +} + +/** @internal */ +export const CustomFieldTypeFilter$inboundSchema: z.ZodType< + CustomFieldTypeFilter, + z.ZodTypeDef, + unknown +> = z.union([ + components.CustomFieldType$inboundSchema, + z.array(components.CustomFieldType$inboundSchema), +]); + +/** @internal */ +export type CustomFieldTypeFilter$Outbound = string | Array; + +/** @internal */ +export const CustomFieldTypeFilter$outboundSchema: z.ZodType< + CustomFieldTypeFilter$Outbound, + z.ZodTypeDef, + CustomFieldTypeFilter +> = z.union([ + components.CustomFieldType$outboundSchema, + z.array(components.CustomFieldType$outboundSchema), +]); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldTypeFilter$ { + /** @deprecated use `CustomFieldTypeFilter$inboundSchema` instead. */ + export const inboundSchema = CustomFieldTypeFilter$inboundSchema; + /** @deprecated use `CustomFieldTypeFilter$outboundSchema` instead. */ + export const outboundSchema = CustomFieldTypeFilter$outboundSchema; + /** @deprecated use `CustomFieldTypeFilter$Outbound` instead. */ + export type Outbound = CustomFieldTypeFilter$Outbound; +} + +/** @internal */ +export const CustomFieldsListRequest$inboundSchema: z.ZodType< + CustomFieldsListRequest, + z.ZodTypeDef, + unknown +> = z.object({ + organization_id: z.nullable(z.union([z.string(), z.array(z.string())])) + .optional(), + query: z.nullable(z.string()).optional(), + type_filter: z.nullable( + z.union([ + components.CustomFieldType$inboundSchema, + z.array(components.CustomFieldType$inboundSchema), + ]), + ).optional(), + page: z.number().int().default(1), + limit: z.number().int().default(10), + sorting: z.nullable(z.array(components.CustomFieldSortProperty$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "organization_id": "organizationId", + "type_filter": "typeFilter", + }); +}); + +/** @internal */ +export type CustomFieldsListRequest$Outbound = { + organization_id?: string | Array | null | undefined; + query?: string | null | undefined; + type_filter?: string | Array | null | undefined; + page: number; + limit: number; + sorting?: Array | null | undefined; +}; + +/** @internal */ +export const CustomFieldsListRequest$outboundSchema: z.ZodType< + CustomFieldsListRequest$Outbound, + z.ZodTypeDef, + CustomFieldsListRequest +> = z.object({ + organizationId: z.nullable(z.union([z.string(), z.array(z.string())])) + .optional(), + query: z.nullable(z.string()).optional(), + typeFilter: z.nullable( + z.union([ + components.CustomFieldType$outboundSchema, + z.array(components.CustomFieldType$outboundSchema), + ]), + ).optional(), + page: z.number().int().default(1), + limit: z.number().int().default(10), + sorting: z.nullable( + z.array(components.CustomFieldSortProperty$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + organizationId: "organization_id", + typeFilter: "type_filter", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldsListRequest$ { + /** @deprecated use `CustomFieldsListRequest$inboundSchema` instead. */ + export const inboundSchema = CustomFieldsListRequest$inboundSchema; + /** @deprecated use `CustomFieldsListRequest$outboundSchema` instead. */ + export const outboundSchema = CustomFieldsListRequest$outboundSchema; + /** @deprecated use `CustomFieldsListRequest$Outbound` instead. */ + export type Outbound = CustomFieldsListRequest$Outbound; +} + +/** @internal */ +export const CustomFieldsListResponse$inboundSchema: z.ZodType< + CustomFieldsListResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListResource$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); + +/** @internal */ +export type CustomFieldsListResponse$Outbound = { + Result: components.ListResource$Outbound; +}; + +/** @internal */ +export const CustomFieldsListResponse$outboundSchema: z.ZodType< + CustomFieldsListResponse$Outbound, + z.ZodTypeDef, + CustomFieldsListResponse +> = z.object({ + result: components.ListResource$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldsListResponse$ { + /** @deprecated use `CustomFieldsListResponse$inboundSchema` instead. */ + export const inboundSchema = CustomFieldsListResponse$inboundSchema; + /** @deprecated use `CustomFieldsListResponse$outboundSchema` instead. */ + export const outboundSchema = CustomFieldsListResponse$outboundSchema; + /** @deprecated use `CustomFieldsListResponse$Outbound` instead. */ + export type Outbound = CustomFieldsListResponse$Outbound; +} diff --git a/src/models/operations/customfieldsupdate.ts b/src/models/operations/customfieldsupdate.ts new file mode 100644 index 00000000..da074c23 --- /dev/null +++ b/src/models/operations/customfieldsupdate.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import * as components from "../components/index.js"; + +export type CustomFieldsUpdateRequest = { + /** + * The custom field ID. + */ + id: string; + customFieldUpdate: components.CustomFieldUpdate; +}; + +/** @internal */ +export const CustomFieldsUpdateRequest$inboundSchema: z.ZodType< + CustomFieldsUpdateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + CustomFieldUpdate: components.CustomFieldUpdate$inboundSchema, +}).transform((v) => { + return remap$(v, { + "CustomFieldUpdate": "customFieldUpdate", + }); +}); + +/** @internal */ +export type CustomFieldsUpdateRequest$Outbound = { + id: string; + CustomFieldUpdate: components.CustomFieldUpdate$Outbound; +}; + +/** @internal */ +export const CustomFieldsUpdateRequest$outboundSchema: z.ZodType< + CustomFieldsUpdateRequest$Outbound, + z.ZodTypeDef, + CustomFieldsUpdateRequest +> = z.object({ + id: z.string(), + customFieldUpdate: components.CustomFieldUpdate$outboundSchema, +}).transform((v) => { + return remap$(v, { + customFieldUpdate: "CustomFieldUpdate", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFieldsUpdateRequest$ { + /** @deprecated use `CustomFieldsUpdateRequest$inboundSchema` instead. */ + export const inboundSchema = CustomFieldsUpdateRequest$inboundSchema; + /** @deprecated use `CustomFieldsUpdateRequest$outboundSchema` instead. */ + export const outboundSchema = CustomFieldsUpdateRequest$outboundSchema; + /** @deprecated use `CustomFieldsUpdateRequest$Outbound` instead. */ + export type Outbound = CustomFieldsUpdateRequest$Outbound; +} diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index 037ee259..970be8ea 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -29,6 +29,10 @@ export * from "./checkoutscustomget.js"; export * from "./checkoutscustomlist.js"; export * from "./checkoutscustomupdate.js"; export * from "./checkoutsget.js"; +export * from "./customfieldsdelete.js"; +export * from "./customfieldsget.js"; +export * from "./customfieldslist.js"; +export * from "./customfieldsupdate.js"; export * from "./externalorganizationslist.js"; export * from "./filescreate.js"; export * from "./filesdelete.js"; diff --git a/src/models/operations/organizationslist.ts b/src/models/operations/organizationslist.ts index 136f0530..31833b0d 100644 --- a/src/models/operations/organizationslist.ts +++ b/src/models/operations/organizationslist.ts @@ -11,10 +11,6 @@ export type OrganizationsListRequest = { * Filter by slug. */ slug?: string | null | undefined; - /** - * Filter by membership. If `true`, only organizations the user is a member of are returned. If `false`, only organizations the user is not a member of are returned. - */ - isMember?: boolean | null | undefined; /** * Page number, defaults to 1. */ @@ -40,22 +36,16 @@ export const OrganizationsListRequest$inboundSchema: z.ZodType< unknown > = z.object({ slug: z.nullable(z.string()).optional(), - is_member: z.nullable(z.boolean()).optional(), page: z.number().int().default(1), limit: z.number().int().default(10), sorting: z.nullable( z.array(components.OrganizationSortProperty$inboundSchema), ).optional(), -}).transform((v) => { - return remap$(v, { - "is_member": "isMember", - }); }); /** @internal */ export type OrganizationsListRequest$Outbound = { slug?: string | null | undefined; - is_member?: boolean | null | undefined; page: number; limit: number; sorting?: Array | null | undefined; @@ -68,16 +58,11 @@ export const OrganizationsListRequest$outboundSchema: z.ZodType< OrganizationsListRequest > = z.object({ slug: z.nullable(z.string()).optional(), - isMember: z.nullable(z.boolean()).optional(), page: z.number().int().default(1), limit: z.number().int().default(10), sorting: z.nullable( z.array(components.OrganizationSortProperty$outboundSchema), ).optional(), -}).transform((v) => { - return remap$(v, { - isMember: "is_member", - }); }); /** diff --git a/src/models/operations/productslist.ts b/src/models/operations/productslist.ts index 3b9278d0..263babd0 100644 --- a/src/models/operations/productslist.ts +++ b/src/models/operations/productslist.ts @@ -7,7 +7,7 @@ import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; /** - * Filter by organization ID. **Required unless you use an organization token.** + * Filter by organization ID. */ export type ProductsListQueryParamOrganizationIDFilter = string | Array; @@ -18,7 +18,7 @@ export type QueryParamBenefitIDFilter = string | Array; export type ProductsListRequest = { /** - * Filter by organization ID. **Required unless you use an organization token.** + * Filter by organization ID. */ organizationId?: string | Array | null | undefined; /** diff --git a/src/models/operations/usersbenefitsget.ts b/src/models/operations/usersbenefitsget.ts index c957f566..df78a39f 100644 --- a/src/models/operations/usersbenefitsget.ts +++ b/src/models/operations/usersbenefitsget.ts @@ -17,13 +17,13 @@ export type UsersBenefitsGetRequest = { */ export type UsersBenefitsGetResponseUsersBenefitsGet = | (components.BenefitArticlesSubscriber & { type: "articles" }) + | (components.BenefitAdsSubscriber & { type: "ads" }) | (components.BenefitDiscordSubscriber & { type: "discord" }) + | (components.BenefitCustomSubscriber & { type: "custom" }) | (components.BenefitGitHubRepositorySubscriber & { type: "github_repository"; }) | (components.BenefitDownloadablesSubscriber & { type: "downloadables" }) - | (components.BenefitAdsSubscriber & { type: "ads" }) - | (components.BenefitCustomSubscriber & { type: "custom" }) | (components.BenefitLicenseKeysSubscriber & { type: "license_keys" }); /** @internal */ @@ -73,11 +73,19 @@ export const UsersBenefitsGetResponseUsersBenefitsGet$inboundSchema: z.ZodType< type: v.type, })), ), + components.BenefitAdsSubscriber$inboundSchema.and( + z.object({ type: z.literal("ads") }).transform((v) => ({ type: v.type })), + ), components.BenefitDiscordSubscriber$inboundSchema.and( z.object({ type: z.literal("discord") }).transform((v) => ({ type: v.type, })), ), + components.BenefitCustomSubscriber$inboundSchema.and( + z.object({ type: z.literal("custom") }).transform((v) => ({ + type: v.type, + })), + ), components.BenefitGitHubRepositorySubscriber$inboundSchema.and( z.object({ type: z.literal("github_repository") }).transform((v) => ({ type: v.type, @@ -88,14 +96,6 @@ export const UsersBenefitsGetResponseUsersBenefitsGet$inboundSchema: z.ZodType< type: v.type, })), ), - components.BenefitAdsSubscriber$inboundSchema.and( - z.object({ type: z.literal("ads") }).transform((v) => ({ type: v.type })), - ), - components.BenefitCustomSubscriber$inboundSchema.and( - z.object({ type: z.literal("custom") }).transform((v) => ({ - type: v.type, - })), - ), components.BenefitLicenseKeysSubscriber$inboundSchema.and( z.object({ type: z.literal("license_keys") }).transform((v) => ({ type: v.type, @@ -106,15 +106,15 @@ export const UsersBenefitsGetResponseUsersBenefitsGet$inboundSchema: z.ZodType< /** @internal */ export type UsersBenefitsGetResponseUsersBenefitsGet$Outbound = | (components.BenefitArticlesSubscriber$Outbound & { type: "articles" }) + | (components.BenefitAdsSubscriber$Outbound & { type: "ads" }) | (components.BenefitDiscordSubscriber$Outbound & { type: "discord" }) + | (components.BenefitCustomSubscriber$Outbound & { type: "custom" }) | (components.BenefitGitHubRepositorySubscriber$Outbound & { type: "github_repository"; }) | (components.BenefitDownloadablesSubscriber$Outbound & { type: "downloadables"; }) - | (components.BenefitAdsSubscriber$Outbound & { type: "ads" }) - | (components.BenefitCustomSubscriber$Outbound & { type: "custom" }) | (components.BenefitLicenseKeysSubscriber$Outbound & { type: "license_keys"; }); @@ -130,11 +130,19 @@ export const UsersBenefitsGetResponseUsersBenefitsGet$outboundSchema: z.ZodType< type: v.type, })), ), + components.BenefitAdsSubscriber$outboundSchema.and( + z.object({ type: z.literal("ads") }).transform((v) => ({ type: v.type })), + ), components.BenefitDiscordSubscriber$outboundSchema.and( z.object({ type: z.literal("discord") }).transform((v) => ({ type: v.type, })), ), + components.BenefitCustomSubscriber$outboundSchema.and( + z.object({ type: z.literal("custom") }).transform((v) => ({ + type: v.type, + })), + ), components.BenefitGitHubRepositorySubscriber$outboundSchema.and( z.object({ type: z.literal("github_repository") }).transform((v) => ({ type: v.type, @@ -145,14 +153,6 @@ export const UsersBenefitsGetResponseUsersBenefitsGet$outboundSchema: z.ZodType< type: v.type, })), ), - components.BenefitAdsSubscriber$outboundSchema.and( - z.object({ type: z.literal("ads") }).transform((v) => ({ type: v.type })), - ), - components.BenefitCustomSubscriber$outboundSchema.and( - z.object({ type: z.literal("custom") }).transform((v) => ({ - type: v.type, - })), - ), components.BenefitLicenseKeysSubscriber$outboundSchema.and( z.object({ type: z.literal("license_keys") }).transform((v) => ({ type: v.type, diff --git a/src/sdk/customfields.ts b/src/sdk/customfields.ts new file mode 100644 index 00000000..65484dcc --- /dev/null +++ b/src/sdk/customfields.ts @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { customFieldsCreate } from "../funcs/customFieldsCreate.js"; +import { customFieldsDelete } from "../funcs/customFieldsDelete.js"; +import { customFieldsGet } from "../funcs/customFieldsGet.js"; +import { customFieldsList } from "../funcs/customFieldsList.js"; +import { customFieldsUpdate } from "../funcs/customFieldsUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; +import { PageIterator, unwrapResultIterator } from "../types/operations.js"; + +export class CustomFields extends ClientSDK { + /** + * List Custom Fields + * + * @remarks + * List custom fields. + */ + async list( + request: operations.CustomFieldsListRequest, + options?: RequestOptions, + ): Promise> { + return unwrapResultIterator(customFieldsList( + this, + request, + options, + )); + } + + /** + * Create Custom Field + * + * @remarks + * Create a custom field. + */ + async create( + request: components.CustomFieldCreate, + options?: RequestOptions, + ): Promise { + return unwrapAsync(customFieldsCreate( + this, + request, + options, + )); + } + + /** + * Get Custom Field + * + * @remarks + * Get a custom field by ID. + */ + async get( + request: operations.CustomFieldsGetRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(customFieldsGet( + this, + request, + options, + )); + } + + /** + * Update Custom Field + * + * @remarks + * Update a custom field. + */ + async update( + request: operations.CustomFieldsUpdateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(customFieldsUpdate( + this, + request, + options, + )); + } + + /** + * Delete Custom Field + * + * @remarks + * Delete a custom field. + */ + async delete( + request: operations.CustomFieldsDeleteRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(customFieldsDelete( + this, + request, + options, + )); + } +} diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index 2c61ef4b..fb75dfba 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -8,6 +8,7 @@ import { Articles } from "./articles.js"; import { Benefits } from "./benefits.js"; import { CheckoutLinks } from "./checkoutlinks.js"; import { Checkouts } from "./checkouts.js"; +import { CustomFields } from "./customfields.js"; import { ExternalOrganizations } from "./externalorganizations.js"; import { Files } from "./files.js"; import { LicenseKeys } from "./licensekeys.js"; @@ -102,4 +103,9 @@ export class Polar extends ClientSDK { get checkoutLinks(): CheckoutLinks { return (this._checkoutLinks ??= new CheckoutLinks(this._options)); } + + private _customFields?: CustomFields; + get customFields(): CustomFields { + return (this._customFields ??= new CustomFields(this._options)); + } }