@polar-sh/sdk 1.0.0-alpha.11 → 1.0.0-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -2
- package/dist/2026-04/index.cjs +132 -0
- package/dist/2026-04/index.cjs.map +1 -1
- package/dist/2026-04/index.d.cts +836 -40
- package/dist/2026-04/index.d.cts.map +1 -1
- package/dist/2026-04/index.d.mts +836 -40
- package/dist/2026-04/index.d.mts.map +1 -1
- package/dist/2026-04/index.mjs +128 -2
- package/dist/2026-04/index.mjs.map +1 -1
- package/dist/2026-04/services/benefit_grants.cjs +3 -3
- package/dist/2026-04/services/benefit_grants.cjs.map +1 -1
- package/dist/2026-04/services/benefit_grants.d.cts +4 -4
- package/dist/2026-04/services/benefit_grants.d.mts +4 -4
- package/dist/2026-04/services/benefit_grants.mjs +3 -3
- package/dist/2026-04/services/benefit_grants.mjs.map +1 -1
- package/dist/2026-04/services/benefits.cjs +6 -6
- package/dist/2026-04/services/benefits.cjs.map +1 -1
- package/dist/2026-04/services/benefits.d.cts +6 -6
- package/dist/2026-04/services/benefits.d.mts +6 -6
- package/dist/2026-04/services/benefits.mjs +5 -5
- package/dist/2026-04/services/benefits.mjs.map +1 -1
- package/dist/2026-04/services/checkout_links.cjs +3 -3
- package/dist/2026-04/services/checkout_links.cjs.map +1 -1
- package/dist/2026-04/services/checkout_links.d.cts +4 -4
- package/dist/2026-04/services/checkout_links.d.mts +4 -4
- package/dist/2026-04/services/checkout_links.mjs +3 -3
- package/dist/2026-04/services/checkout_links.mjs.map +1 -1
- package/dist/2026-04/services/checkouts.cjs +3 -3
- package/dist/2026-04/services/checkouts.cjs.map +1 -1
- package/dist/2026-04/services/checkouts.d.cts +4 -4
- package/dist/2026-04/services/checkouts.d.mts +4 -4
- package/dist/2026-04/services/checkouts.mjs +3 -3
- package/dist/2026-04/services/checkouts.mjs.map +1 -1
- package/dist/2026-04/services/custom_fields.cjs +3 -3
- package/dist/2026-04/services/custom_fields.cjs.map +1 -1
- package/dist/2026-04/services/custom_fields.d.cts +4 -4
- package/dist/2026-04/services/custom_fields.d.mts +4 -4
- package/dist/2026-04/services/custom_fields.mjs +3 -3
- package/dist/2026-04/services/custom_fields.mjs.map +1 -1
- package/dist/2026-04/services/customer_meters.cjs +3 -3
- package/dist/2026-04/services/customer_meters.cjs.map +1 -1
- package/dist/2026-04/services/customer_meters.d.cts +4 -4
- package/dist/2026-04/services/customer_meters.d.mts +4 -4
- package/dist/2026-04/services/customer_meters.mjs +3 -3
- package/dist/2026-04/services/customer_meters.mjs.map +1 -1
- package/dist/2026-04/services/customer_portal/benefit_grants.cjs +3 -3
- package/dist/2026-04/services/customer_portal/benefit_grants.cjs.map +1 -1
- package/dist/2026-04/services/customer_portal/benefit_grants.d.cts +4 -4
- package/dist/2026-04/services/customer_portal/benefit_grants.d.mts +4 -4
- package/dist/2026-04/services/customer_portal/benefit_grants.mjs +3 -3
- package/dist/2026-04/services/customer_portal/benefit_grants.mjs.map +1 -1
- package/dist/2026-04/services/customer_portal/customer_meters.cjs +3 -3
- package/dist/2026-04/services/customer_portal/customer_meters.cjs.map +1 -1
- package/dist/2026-04/services/customer_portal/customer_meters.d.cts +4 -4
- package/dist/2026-04/services/customer_portal/customer_meters.d.mts +4 -4
- package/dist/2026-04/services/customer_portal/customer_meters.mjs +3 -3
- package/dist/2026-04/services/customer_portal/customer_meters.mjs.map +1 -1
- package/dist/2026-04/services/customer_portal/customer_session.d.cts +1 -1
- package/dist/2026-04/services/customer_portal/customer_session.d.mts +1 -1
- package/dist/2026-04/services/customer_portal/customers.cjs +3 -3
- package/dist/2026-04/services/customer_portal/customers.cjs.map +1 -1
- package/dist/2026-04/services/customer_portal/customers.d.cts +4 -4
- package/dist/2026-04/services/customer_portal/customers.d.mts +4 -4
- package/dist/2026-04/services/customer_portal/customers.mjs +3 -3
- package/dist/2026-04/services/customer_portal/customers.mjs.map +1 -1
- package/dist/2026-04/services/customer_portal/downloadables.cjs +3 -3
- package/dist/2026-04/services/customer_portal/downloadables.cjs.map +1 -1
- package/dist/2026-04/services/customer_portal/downloadables.d.cts +4 -4
- package/dist/2026-04/services/customer_portal/downloadables.d.mts +4 -4
- package/dist/2026-04/services/customer_portal/downloadables.mjs +3 -3
- package/dist/2026-04/services/customer_portal/downloadables.mjs.map +1 -1
- package/dist/2026-04/services/customer_portal/index.d.cts +11 -11
- package/dist/2026-04/services/customer_portal/index.d.mts +11 -11
- package/dist/2026-04/services/customer_portal/license_keys.cjs +3 -3
- package/dist/2026-04/services/customer_portal/license_keys.cjs.map +1 -1
- package/dist/2026-04/services/customer_portal/license_keys.d.cts +4 -4
- package/dist/2026-04/services/customer_portal/license_keys.d.mts +4 -4
- package/dist/2026-04/services/customer_portal/license_keys.mjs +3 -3
- package/dist/2026-04/services/customer_portal/license_keys.mjs.map +1 -1
- package/dist/2026-04/services/customer_portal/members.cjs +3 -3
- package/dist/2026-04/services/customer_portal/members.cjs.map +1 -1
- package/dist/2026-04/services/customer_portal/members.d.cts +4 -4
- package/dist/2026-04/services/customer_portal/members.d.mts +4 -4
- package/dist/2026-04/services/customer_portal/members.mjs +3 -3
- package/dist/2026-04/services/customer_portal/members.mjs.map +1 -1
- package/dist/2026-04/services/customer_portal/orders.cjs +3 -3
- package/dist/2026-04/services/customer_portal/orders.cjs.map +1 -1
- package/dist/2026-04/services/customer_portal/orders.d.cts +4 -4
- package/dist/2026-04/services/customer_portal/orders.d.mts +4 -4
- package/dist/2026-04/services/customer_portal/orders.mjs +3 -3
- package/dist/2026-04/services/customer_portal/orders.mjs.map +1 -1
- package/dist/2026-04/services/customer_portal/organizations.d.cts +1 -1
- package/dist/2026-04/services/customer_portal/organizations.d.mts +1 -1
- package/dist/2026-04/services/customer_portal/seats.cjs +3 -3
- package/dist/2026-04/services/customer_portal/seats.cjs.map +1 -1
- package/dist/2026-04/services/customer_portal/seats.d.cts +4 -4
- package/dist/2026-04/services/customer_portal/seats.d.mts +4 -4
- package/dist/2026-04/services/customer_portal/seats.mjs +3 -3
- package/dist/2026-04/services/customer_portal/seats.mjs.map +1 -1
- package/dist/2026-04/services/customer_portal/subscriptions.cjs +3 -3
- package/dist/2026-04/services/customer_portal/subscriptions.cjs.map +1 -1
- package/dist/2026-04/services/customer_portal/subscriptions.d.cts +4 -4
- package/dist/2026-04/services/customer_portal/subscriptions.d.mts +4 -4
- package/dist/2026-04/services/customer_portal/subscriptions.mjs +3 -3
- package/dist/2026-04/services/customer_portal/subscriptions.mjs.map +1 -1
- package/dist/2026-04/services/customer_portal/wallets.cjs +3 -3
- package/dist/2026-04/services/customer_portal/wallets.cjs.map +1 -1
- package/dist/2026-04/services/customer_portal/wallets.d.cts +4 -4
- package/dist/2026-04/services/customer_portal/wallets.d.mts +4 -4
- package/dist/2026-04/services/customer_portal/wallets.mjs +3 -3
- package/dist/2026-04/services/customer_portal/wallets.mjs.map +1 -1
- package/dist/2026-04/services/customer_seats.d.cts +1 -1
- package/dist/2026-04/services/customer_seats.d.mts +1 -1
- package/dist/2026-04/services/customer_sessions.d.cts +1 -1
- package/dist/2026-04/services/customer_sessions.d.mts +1 -1
- package/dist/2026-04/services/customers/index.cjs +9 -9
- package/dist/2026-04/services/customers/index.cjs.map +1 -1
- package/dist/2026-04/services/customers/index.d.cts +8 -8
- package/dist/2026-04/services/customers/index.d.mts +8 -8
- package/dist/2026-04/services/customers/index.mjs +7 -7
- package/dist/2026-04/services/customers/index.mjs.map +1 -1
- package/dist/2026-04/services/customers/members.d.cts +1 -1
- package/dist/2026-04/services/customers/members.d.mts +1 -1
- package/dist/2026-04/services/discounts.cjs +3 -3
- package/dist/2026-04/services/discounts.cjs.map +1 -1
- package/dist/2026-04/services/discounts.d.cts +4 -4
- package/dist/2026-04/services/discounts.d.mts +4 -4
- package/dist/2026-04/services/discounts.mjs +3 -3
- package/dist/2026-04/services/discounts.mjs.map +1 -1
- package/dist/2026-04/services/disputes.cjs +3 -3
- package/dist/2026-04/services/disputes.cjs.map +1 -1
- package/dist/2026-04/services/disputes.d.cts +4 -4
- package/dist/2026-04/services/disputes.d.mts +4 -4
- package/dist/2026-04/services/disputes.mjs +3 -3
- package/dist/2026-04/services/disputes.mjs.map +1 -1
- package/dist/2026-04/services/event_types.cjs +3 -3
- package/dist/2026-04/services/event_types.cjs.map +1 -1
- package/dist/2026-04/services/event_types.d.cts +4 -4
- package/dist/2026-04/services/event_types.d.mts +4 -4
- package/dist/2026-04/services/event_types.mjs +3 -3
- package/dist/2026-04/services/event_types.mjs.map +1 -1
- package/dist/2026-04/services/events.cjs +3 -3
- package/dist/2026-04/services/events.cjs.map +1 -1
- package/dist/2026-04/services/events.d.cts +4 -4
- package/dist/2026-04/services/events.d.mts +4 -4
- package/dist/2026-04/services/events.mjs +3 -3
- package/dist/2026-04/services/events.mjs.map +1 -1
- package/dist/2026-04/services/files.cjs +3 -3
- package/dist/2026-04/services/files.cjs.map +1 -1
- package/dist/2026-04/services/files.d.cts +4 -4
- package/dist/2026-04/services/files.d.mts +4 -4
- package/dist/2026-04/services/files.mjs +3 -3
- package/dist/2026-04/services/files.mjs.map +1 -1
- package/dist/2026-04/services/license_keys.cjs +3 -3
- package/dist/2026-04/services/license_keys.cjs.map +1 -1
- package/dist/2026-04/services/license_keys.d.cts +4 -4
- package/dist/2026-04/services/license_keys.d.mts +4 -4
- package/dist/2026-04/services/license_keys.mjs +3 -3
- package/dist/2026-04/services/license_keys.mjs.map +1 -1
- package/dist/2026-04/services/members.cjs +3 -3
- package/dist/2026-04/services/members.cjs.map +1 -1
- package/dist/2026-04/services/members.d.cts +4 -4
- package/dist/2026-04/services/members.d.mts +4 -4
- package/dist/2026-04/services/members.mjs +3 -3
- package/dist/2026-04/services/members.mjs.map +1 -1
- package/dist/2026-04/services/meters.cjs +3 -3
- package/dist/2026-04/services/meters.cjs.map +1 -1
- package/dist/2026-04/services/meters.d.cts +4 -4
- package/dist/2026-04/services/meters.d.mts +4 -4
- package/dist/2026-04/services/meters.mjs +3 -3
- package/dist/2026-04/services/meters.mjs.map +1 -1
- package/dist/2026-04/services/metrics.d.cts +1 -1
- package/dist/2026-04/services/metrics.d.mts +1 -1
- package/dist/2026-04/services/oauth2/clients/index.d.cts +2 -2
- package/dist/2026-04/services/oauth2/clients/index.d.mts +2 -2
- package/dist/2026-04/services/oauth2/clients/oauth2.cjs +2 -2
- package/dist/2026-04/services/oauth2/clients/oauth2.cjs.map +1 -1
- package/dist/2026-04/services/oauth2/clients/oauth2.d.cts +3 -3
- package/dist/2026-04/services/oauth2/clients/oauth2.d.mts +3 -3
- package/dist/2026-04/services/oauth2/clients/oauth2.mjs +2 -2
- package/dist/2026-04/services/oauth2/clients/oauth2.mjs.map +1 -1
- package/dist/2026-04/services/oauth2/index.d.cts +2 -2
- package/dist/2026-04/services/oauth2/index.d.mts +2 -2
- package/dist/2026-04/services/orders.cjs +3 -3
- package/dist/2026-04/services/orders.cjs.map +1 -1
- package/dist/2026-04/services/orders.d.cts +4 -4
- package/dist/2026-04/services/orders.d.mts +4 -4
- package/dist/2026-04/services/orders.mjs +3 -3
- package/dist/2026-04/services/orders.mjs.map +1 -1
- package/dist/2026-04/services/organizations.cjs +3 -3
- package/dist/2026-04/services/organizations.cjs.map +1 -1
- package/dist/2026-04/services/organizations.d.cts +4 -4
- package/dist/2026-04/services/organizations.d.mts +4 -4
- package/dist/2026-04/services/organizations.mjs +3 -3
- package/dist/2026-04/services/organizations.mjs.map +1 -1
- package/dist/2026-04/services/payments.cjs +3 -3
- package/dist/2026-04/services/payments.cjs.map +1 -1
- package/dist/2026-04/services/payments.d.cts +4 -4
- package/dist/2026-04/services/payments.d.mts +4 -4
- package/dist/2026-04/services/payments.mjs +3 -3
- package/dist/2026-04/services/payments.mjs.map +1 -1
- package/dist/2026-04/services/products.cjs +3 -3
- package/dist/2026-04/services/products.cjs.map +1 -1
- package/dist/2026-04/services/products.d.cts +4 -4
- package/dist/2026-04/services/products.d.mts +4 -4
- package/dist/2026-04/services/products.mjs +3 -3
- package/dist/2026-04/services/products.mjs.map +1 -1
- package/dist/2026-04/services/refunds.cjs +3 -3
- package/dist/2026-04/services/refunds.cjs.map +1 -1
- package/dist/2026-04/services/refunds.d.cts +4 -4
- package/dist/2026-04/services/refunds.d.mts +4 -4
- package/dist/2026-04/services/refunds.mjs +3 -3
- package/dist/2026-04/services/refunds.mjs.map +1 -1
- package/dist/2026-04/services/subscriptions.cjs +3 -3
- package/dist/2026-04/services/subscriptions.cjs.map +1 -1
- package/dist/2026-04/services/subscriptions.d.cts +4 -4
- package/dist/2026-04/services/subscriptions.d.mts +4 -4
- package/dist/2026-04/services/subscriptions.mjs +3 -3
- package/dist/2026-04/services/subscriptions.mjs.map +1 -1
- package/dist/2026-04/services/webhooks.cjs +6 -6
- package/dist/2026-04/services/webhooks.cjs.map +1 -1
- package/dist/2026-04/services/webhooks.d.cts +6 -6
- package/dist/2026-04/services/webhooks.d.mts +6 -6
- package/dist/2026-04/services/webhooks.mjs +5 -5
- package/dist/2026-04/services/webhooks.mjs.map +1 -1
- package/dist/{models-IotBovey.d.cts → models-DnY24W7g.d.mts} +671 -51
- package/dist/models-DnY24W7g.d.mts.map +1 -0
- package/dist/{models-pdZgmVG-.d.mts → models-i5yDo5sm.d.cts} +671 -51
- package/dist/models-i5yDo5sm.d.cts.map +1 -0
- package/package.json +4 -2
- package/dist/models-IotBovey.d.cts.map +0 -1
- package/dist/models-pdZgmVG-.d.mts.map +0 -1
package/dist/2026-04/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { n as ClientOptions, r as PolarClientError, t as ClientBase } from "../base-CmjkkyNf.cjs";
|
|
1
|
+
import { $ as CustomerMeter, $n as MemberCreateFromCustomer, $r as RefundCreate, $t as EventsIngest, A as CheckoutPublic, An as ListResourceCustomerWallet, Ar as OrganizationCreate, At as CustomerSubscriptionUpdate, B as CustomFieldUpdate, Bn as ListResourceMeter, Br as PaymentMethodInUseByActiveSubscription$1, Bt as DisputeNotOpenError$1, C as CheckoutConfirmStripe, Ci as WebhookDelivery, Cn as ListResourceCustomerBenefitGrant, Cr as OrderNotDraft$1, Ct as CustomerSession, D as CheckoutLinkCreate, Di as WebhookEventType, Dn as ListResourceCustomerPaymentMethod, Dr as OrderSortProperty, Dt as CustomerState, E as CheckoutLink, Ei as WebhookEndpointUpdate, En as ListResourceCustomerOrder, Er as OrderReceipt, Et as CustomerSortProperty, F as CheckoutUpdatePublic, Fn as ListResourceEventName, Fr as PaymentActionRequired, Ft as Discount, G as CustomerCancellationReason, Gn as ListResourceProduct, Gr as Product, Gt as EventName, H as CustomerBenefitGrant, Hn as ListResourceOrganization, Hr as PaymentSortProperty, Ht as DisputeStatus, I as CustomField, In as ListResourceEventTypeWithStats, Ir as PaymentAlreadyInProgress$1, It as DiscountCreate, J as CustomerCustomerMeterSortProperty, Jn as ListResourceWebhookDelivery, Jr as ProductCreate, Jt as EventSource, K as CustomerCreate, Kn as ListResourceRefund, Kr as ProductBenefitsUpdate, Kt as EventNamesSortProperty, L as CustomFieldCreate, Ln as ListResourceFileRead, Lr as PaymentError$1, Lt as DiscountSortProperty, M as CheckoutSortProperty, Mn as ListResourceDispute, Mr as OrganizationSortProperty, Mt as CustomerUpdateExternalID, N as CheckoutStatus, Nn as ListResourceDownloadableRead, Nr as OrganizationUpdate, Nt as CustomerWallet, O as CheckoutLinkSortProperty, Oi as models_d_exports, On as ListResourceCustomerPortalMember, Or as OrderUpdate, Ot as CustomerSubscription, P as CheckoutUpdate, Pn as ListResourceEvent, Pr as Payment, Pt as CustomerWalletSortProperty, Q as CustomerEmailUpdateVerifyResponse, Qn as Member, Qr as Refund, Qt as EventTypesSortProperty, R as CustomFieldSortProperty, Rn as ListResourceLicenseKeyRead, Rr as PaymentFailed$1, Rt as DiscountUpdate, S as Checkout, Si as ValidatedLicenseKey, Sn as ListResourceCustomer, Sr as OrderInvoice, St as CustomerSeatClaimResponse, T as CheckoutForbiddenError, Ti as WebhookEndpointCreate, Tn as ListResourceCustomerMeter, Tr as OrderNotEligibleForRetry$1, Tt as CustomerSessionCustomerIDCreate, U as CustomerBenefitGrantSortProperty, Un as ListResourcePayment, Ur as PaymentStatus, Ut as DownloadableRead, V as Customer, Vn as ListResourceOrder, Vr as PaymentMethodSetupFailed$1, Vt as DisputeSortProperty, W as CustomerBenefitGrantUpdate, Wn as ListResourcePaymentMethod, Wr as PortalAuthenticatedUser, Wt as Event, X as CustomerEmailUpdateRequest, Xn as ListResourceWithCursorPaginationEvent, Xr as ProductUpdate, Xt as EventTypeUpdate, Y as CustomerCustomerSession, Yn as ListResourceWebhookEndpoint, Yr as ProductSortProperty, Yt as EventType, Z as CustomerEmailUpdateVerifyRequest, Zn as ManualRetryLimitExceeded$1, Zr as ProductVisibility, Zt as EventTypeWithStats, _ as BenefitMeterCreditUpdate, _i as Timezone, _n as ListResourceBenefit, _r as OAuth2ClientConfigurationUpdate, _t as CustomerPortalMember, a as AuthorizeResponseUser, ai as SeatAssign, an as FileUpload, ar as MeterCreate, at as CustomerOrderPaymentConfirmation, b as BenefitType, bi as UserInfoOrganization, bn as ListResourceCheckoutLink, br as OrderCreate, bt as CustomerSeat, c as BenefitCustomUpdate, ci as SeatsList, cn as IntrospectTokenResponse, cr as MeterUpdate, ct as CustomerOrderSortProperty, d as BenefitFeatureFlagUpdate, di as SubscriptionCreateExternalCustomer, dn as LicenseKeyDeactivate, dr as MetricDashboardUpdate, dt as CustomerPaymentMethod, ei as RefundSortProperty, en as EventsIngestResponse, er as MemberRole, et as CustomerMeterSortProperty, f as BenefitGitHubRepositoryUpdate, fi as SubscriptionLocked$1, fn as LicenseKeyRead, fr as MetricsLimits, ft as CustomerPaymentMethodConfirm, g as BenefitLicenseKeysUpdate, gi as TimeInterval, gn as LicenseKeyWithActivations, gr as OAuth2ClientConfiguration, gt as CustomerPortalCustomerUpdate, h as BenefitGrantWebhook, hi as SubscriptionUpdate, hn as LicenseKeyValidate, hr as NotPermitted$1, ht as CustomerPortalCustomer, i as AuthorizeResponseOrganization, ii as SSOEnforcementRequiresConnection$1, in as FileRead, ir as Meter, it as CustomerOrderInvoice, j as CheckoutPublicConfirmed, jn as ListResourceDiscount, jr as OrganizationNotReadyForPayments, jt as CustomerUpdate, k as CheckoutLinkUpdate, ki as __exportAll, kn as ListResourceCustomerSubscription, kr as Organization, kt as CustomerSubscriptionSortProperty, l as BenefitDiscordUpdate, li as Subscription, ln as LicenseKeyActivate, lr as MetricDashboardCreate, lt as CustomerOrderUpdate, m as BenefitGrantSortProperty, mi as SubscriptionStatus, mn as LicenseKeyUpdate, mr as MissingInvoiceBillingDetails$1, mt as CustomerPaymentMethodCreateResponse, n as AlreadyCanceledSubscription$1, ni as ResourceNotFound$1, nn as FileCreate, nr as MemberUpdate, nt as CustomerOrder, o as Benefit, oi as SeatClaim, on as FileUploadCompleted, or as MeterQuantities, ot as CustomerOrderPaymentStatus, p as BenefitGrant, pi as SubscriptionSortProperty, pn as LicenseKeyStatus, pr as MetricsResponse, pt as CustomerPaymentMethodCreate, q as CustomerCustomerMeter, qn as ListResourceSubscription, qr as ProductBillingType, qt as EventSortProperty, r as AmbiguousExternalCustomerID$1, ri as RevokeTokenResponse, rn as FilePatch, rr as MetadataQuery, rt as CustomerOrderConfirmPayment, s as BenefitCreate, si as SeatClaimInfo, sn as HTTPValidationError$1, sr as MeterSortProperty, st as CustomerOrderReceipt, t as AggregationFunction, ti as RefundedAlready$1, tn as ExpiredCheckoutError$1, tr as MemberSortProperty, tt as CustomerNotReady$1, u as BenefitDownloadablesUpdate, ui as SubscriptionCreateCustomer, un as LicenseKeyActivationRead, ur as MetricDashboardSchema, ut as CustomerOrganizationData, v as BenefitSlackSharedChannelUpdate, vi as TokenResponse, vn as ListResourceBenefitGrant, vr as OffSessionChargesNotEnabled, vt as CustomerPortalMemberCreate, w as CheckoutCreate, wi as WebhookEndpoint, wn as ListResourceCustomerCustomerMeter, wr as OrderNotEligibleForInvoice$1, wt as CustomerSessionCustomerExternalIDCreate, x as CannotCreateOrganizationError$1, xi as UserInfoUser, xn as ListResourceCustomField, xr as OrderFinalize, xt as CustomerSeatAssign, y as BenefitSortProperty, yi as Unauthorized$1, yn as ListResourceCheckout, yr as Order, yt as CustomerPortalMemberUpdate, z as CustomFieldType, zn as ListResourceMember, zr as PaymentMethod, zt as Dispute } from "../models-i5yDo5sm.cjs";
|
|
2
|
+
import { i as PolarError, n as ClientOptions, r as PolarClientError, t as ClientBase } from "../base-CmjkkyNf.cjs";
|
|
3
3
|
//#region src/2026-04/client.d.ts
|
|
4
4
|
type Environment = "production" | "sandbox";
|
|
5
5
|
interface PolarOptions extends Omit<ClientOptions, "baseUrl" | "version"> {
|
|
@@ -20,7 +20,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
20
20
|
create: (body: OrganizationCreate) => Promise<Organization>;
|
|
21
21
|
get: (id: string) => Promise<Organization>;
|
|
22
22
|
update: (id: string, body: OrganizationUpdate) => Promise<Organization>;
|
|
23
|
-
|
|
23
|
+
iterList: (query?: {
|
|
24
24
|
slug?: string | null;
|
|
25
25
|
page?: number;
|
|
26
26
|
limit?: number;
|
|
@@ -52,7 +52,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
52
52
|
get: (id: string) => Promise<Subscription>;
|
|
53
53
|
revoke: (id: string) => Promise<Subscription>;
|
|
54
54
|
update: (id: string, body: SubscriptionUpdate) => Promise<Subscription>;
|
|
55
|
-
|
|
55
|
+
iterList: (query?: {
|
|
56
56
|
organization_id?: string | string[] | null;
|
|
57
57
|
product_id?: string | string[] | null;
|
|
58
58
|
customer_id?: string | string[] | null;
|
|
@@ -81,7 +81,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
81
81
|
createClient: (body: OAuth2ClientConfiguration) => Promise<unknown>;
|
|
82
82
|
getClient: (client_id: string) => Promise<unknown>;
|
|
83
83
|
updateClient: (client_id_path: string, body: OAuth2ClientConfigurationUpdate) => Promise<unknown>;
|
|
84
|
-
deleteClient: (client_id: string) => Promise<
|
|
84
|
+
deleteClient: (client_id: string) => Promise<void>;
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
87
|
};
|
|
@@ -108,7 +108,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
108
108
|
page?: number;
|
|
109
109
|
limit?: number;
|
|
110
110
|
}) => Promise<ListResourceBenefitGrant>;
|
|
111
|
-
|
|
111
|
+
iterList: (query?: {
|
|
112
112
|
organization_id?: string | string[] | null;
|
|
113
113
|
type?: BenefitType | BenefitType[] | null;
|
|
114
114
|
id?: string | string[] | null;
|
|
@@ -119,7 +119,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
119
119
|
sorting?: BenefitSortProperty[] | null;
|
|
120
120
|
metadata?: MetadataQuery;
|
|
121
121
|
}) => AsyncGenerator<Benefit>;
|
|
122
|
-
|
|
122
|
+
iterGrants: (id: string, query?: {
|
|
123
123
|
is_granted?: boolean | null;
|
|
124
124
|
customer_id?: string | string[] | null;
|
|
125
125
|
member_id?: string | string[] | null;
|
|
@@ -137,7 +137,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
137
137
|
limit?: number;
|
|
138
138
|
sorting?: BenefitGrantSortProperty[] | null;
|
|
139
139
|
}) => Promise<ListResourceBenefitGrant>;
|
|
140
|
-
|
|
140
|
+
iterList: (query?: {
|
|
141
141
|
organization_id?: string | string[] | null;
|
|
142
142
|
customer_id?: string | string[] | null;
|
|
143
143
|
external_customer_id?: string | string[] | null;
|
|
@@ -170,12 +170,12 @@ declare function createPolar(options: PolarOptions): {
|
|
|
170
170
|
limit?: number;
|
|
171
171
|
}) => Promise<ListResourceWebhookDelivery>;
|
|
172
172
|
redeliverWebhookEvent: (id: string) => Promise<unknown>;
|
|
173
|
-
|
|
173
|
+
iterListWebhookEndpoints: (query?: {
|
|
174
174
|
organization_id?: string | string[] | null;
|
|
175
175
|
page?: number;
|
|
176
176
|
limit?: number;
|
|
177
177
|
}) => AsyncGenerator<WebhookEndpoint>;
|
|
178
|
-
|
|
178
|
+
iterListWebhookDeliveries: (query?: {
|
|
179
179
|
endpoint_id?: string | string[] | null;
|
|
180
180
|
start_timestamp?: string | null;
|
|
181
181
|
end_timestamp?: string | null;
|
|
@@ -205,7 +205,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
205
205
|
get: (id: string) => Promise<Product>;
|
|
206
206
|
update: (id: string, body: ProductUpdate) => Promise<Product>;
|
|
207
207
|
updateBenefits: (id: string, body: ProductBenefitsUpdate) => Promise<Product>;
|
|
208
|
-
|
|
208
|
+
iterList: (query?: {
|
|
209
209
|
id?: string | string[] | null;
|
|
210
210
|
organization_id?: string | string[] | null;
|
|
211
211
|
query?: string | null;
|
|
@@ -245,7 +245,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
245
245
|
invoice: (id: string) => Promise<OrderInvoice>;
|
|
246
246
|
generateInvoice: (id: string) => Promise<unknown>;
|
|
247
247
|
receipt: (id: string) => Promise<OrderReceipt>;
|
|
248
|
-
|
|
248
|
+
iterList: (query?: {
|
|
249
249
|
organization_id?: string | string[] | null;
|
|
250
250
|
product_id?: string | string[] | null;
|
|
251
251
|
product_billing_type?: ProductBillingType | ProductBillingType[] | null;
|
|
@@ -274,7 +274,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
274
274
|
sorting?: RefundSortProperty[] | null;
|
|
275
275
|
}) => Promise<ListResourceRefund>;
|
|
276
276
|
create: (body: RefundCreate) => Promise<Refund>;
|
|
277
|
-
|
|
277
|
+
iterList: (query?: {
|
|
278
278
|
id?: string | string[] | null;
|
|
279
279
|
organization_id?: string | string[] | null;
|
|
280
280
|
order_id?: string | string[] | null;
|
|
@@ -298,7 +298,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
298
298
|
}) => Promise<ListResourceDispute>;
|
|
299
299
|
get: (id: string) => Promise<Dispute>;
|
|
300
300
|
accept: (id: string) => Promise<Dispute>;
|
|
301
|
-
|
|
301
|
+
iterList: (query?: {
|
|
302
302
|
organization_id?: string | string[] | null;
|
|
303
303
|
order_id?: string | string[] | null;
|
|
304
304
|
status?: DisputeStatus | DisputeStatus[] | null;
|
|
@@ -325,7 +325,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
325
325
|
clientGet: (client_secret: string) => Promise<CheckoutPublic>;
|
|
326
326
|
clientUpdate: (client_secret: string, body: CheckoutUpdatePublic) => Promise<CheckoutPublic>;
|
|
327
327
|
clientConfirm: (client_secret: string, body: CheckoutConfirmStripe) => Promise<CheckoutPublicConfirmed>;
|
|
328
|
-
|
|
328
|
+
iterList: (query?: {
|
|
329
329
|
organization_id?: string | string[] | null;
|
|
330
330
|
product_id?: string | string[] | null;
|
|
331
331
|
customer_id?: string | string[] | null;
|
|
@@ -348,7 +348,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
348
348
|
uploaded: (id_path: string, body: FileUploadCompleted) => Promise<FileRead>;
|
|
349
349
|
delete: (id: string) => Promise<void>;
|
|
350
350
|
update: (id: string, body: FilePatch) => Promise<FileRead>;
|
|
351
|
-
|
|
351
|
+
iterList: (query?: {
|
|
352
352
|
organization_id?: string | string[] | null;
|
|
353
353
|
ids?: string | string[] | null;
|
|
354
354
|
page?: number;
|
|
@@ -401,7 +401,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
401
401
|
validate: (body: LicenseKeyValidate) => Promise<ValidatedLicenseKey>;
|
|
402
402
|
activate: (body: LicenseKeyActivate) => Promise<LicenseKeyActivationRead>;
|
|
403
403
|
deactivate: (body: LicenseKeyDeactivate) => Promise<void>;
|
|
404
|
-
|
|
404
|
+
iterList: (query?: {
|
|
405
405
|
organization_id?: string | string[] | null;
|
|
406
406
|
benefit_id?: string | string[] | null;
|
|
407
407
|
status?: LicenseKeyStatus | LicenseKeyStatus[] | null;
|
|
@@ -421,7 +421,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
421
421
|
get: (id: string) => Promise<CheckoutLink>;
|
|
422
422
|
delete: (id: string) => Promise<void>;
|
|
423
423
|
update: (id: string, body: CheckoutLinkUpdate) => Promise<CheckoutLink>;
|
|
424
|
-
|
|
424
|
+
iterList: (query?: {
|
|
425
425
|
organization_id?: string | string[] | null;
|
|
426
426
|
product_id?: string | string[] | null;
|
|
427
427
|
page?: number;
|
|
@@ -442,7 +442,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
442
442
|
get: (id: string) => Promise<CustomField>;
|
|
443
443
|
delete: (id: string) => Promise<void>;
|
|
444
444
|
update: (id: string, body: CustomFieldUpdate) => Promise<CustomField>;
|
|
445
|
-
|
|
445
|
+
iterList: (query?: {
|
|
446
446
|
organization_id?: string | string[] | null;
|
|
447
447
|
query?: string | null;
|
|
448
448
|
type?: CustomFieldType | CustomFieldType[] | null;
|
|
@@ -463,7 +463,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
463
463
|
get: (id: string) => Promise<Discount>;
|
|
464
464
|
delete: (id: string) => Promise<void>;
|
|
465
465
|
update: (id: string, body: DiscountUpdate) => Promise<Discount>;
|
|
466
|
-
|
|
466
|
+
iterList: (query?: {
|
|
467
467
|
organization_id?: string | string[] | null;
|
|
468
468
|
query?: string | null;
|
|
469
469
|
page?: number;
|
|
@@ -506,7 +506,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
506
506
|
page?: number;
|
|
507
507
|
limit?: number;
|
|
508
508
|
}) => Promise<ListResourcePaymentMethod>;
|
|
509
|
-
|
|
509
|
+
iterList: (query?: {
|
|
510
510
|
organization_id?: string | string[] | null;
|
|
511
511
|
email?: string | null;
|
|
512
512
|
query?: string | null;
|
|
@@ -516,11 +516,11 @@ declare function createPolar(options: PolarOptions): {
|
|
|
516
516
|
sorting?: CustomerSortProperty[] | null;
|
|
517
517
|
metadata?: MetadataQuery;
|
|
518
518
|
}) => AsyncGenerator<Customer>;
|
|
519
|
-
|
|
519
|
+
iterListPaymentMethods: (id: string, query?: {
|
|
520
520
|
page?: number;
|
|
521
521
|
limit?: number;
|
|
522
522
|
}) => AsyncGenerator<PaymentMethod>;
|
|
523
|
-
|
|
523
|
+
iterListPaymentMethodsExternal: (external_id: string, query?: {
|
|
524
524
|
page?: number;
|
|
525
525
|
limit?: number;
|
|
526
526
|
}) => AsyncGenerator<PaymentMethod>;
|
|
@@ -544,7 +544,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
544
544
|
limit?: number;
|
|
545
545
|
sorting?: MemberSortProperty[] | null;
|
|
546
546
|
}) => Promise<ListResourceMember>;
|
|
547
|
-
|
|
547
|
+
iterListMembers: (query?: {
|
|
548
548
|
customer_id?: string | null;
|
|
549
549
|
external_customer_id?: string | null;
|
|
550
550
|
role?: MemberRole | null;
|
|
@@ -569,7 +569,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
569
569
|
}) => Promise<ListResourceCustomerBenefitGrant>;
|
|
570
570
|
get: (id: string) => Promise<CustomerBenefitGrant>;
|
|
571
571
|
update: (id: string, body: CustomerBenefitGrantUpdate) => Promise<CustomerBenefitGrant>;
|
|
572
|
-
|
|
572
|
+
iterList: (query?: {
|
|
573
573
|
query?: string | null;
|
|
574
574
|
type?: BenefitType | BenefitType[] | null;
|
|
575
575
|
benefit_id?: string | string[] | null;
|
|
@@ -597,7 +597,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
597
597
|
token: string;
|
|
598
598
|
}) => Promise<void>;
|
|
599
599
|
verifyEmailUpdate: (body: CustomerEmailUpdateVerifyRequest) => Promise<CustomerEmailUpdateVerifyResponse>;
|
|
600
|
-
|
|
600
|
+
iterListPaymentMethods: (query?: {
|
|
601
601
|
page?: number;
|
|
602
602
|
limit?: number;
|
|
603
603
|
}) => AsyncGenerator<CustomerPaymentMethod>;
|
|
@@ -611,7 +611,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
611
611
|
sorting?: CustomerCustomerMeterSortProperty[] | null;
|
|
612
612
|
}) => Promise<ListResourceCustomerCustomerMeter>;
|
|
613
613
|
get: (id: string) => Promise<CustomerCustomerMeter>;
|
|
614
|
-
|
|
614
|
+
iterList: (query?: {
|
|
615
615
|
meter_id?: string | string[] | null;
|
|
616
616
|
query?: string | null;
|
|
617
617
|
page?: number;
|
|
@@ -631,7 +631,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
631
631
|
page?: number;
|
|
632
632
|
limit?: number;
|
|
633
633
|
}) => Promise<ListResourceCustomerSubscription>;
|
|
634
|
-
|
|
634
|
+
iterListClaimedSubscriptions: (query?: {
|
|
635
635
|
page?: number;
|
|
636
636
|
limit?: number;
|
|
637
637
|
}) => AsyncGenerator<CustomerSubscription>;
|
|
@@ -646,7 +646,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
646
646
|
page?: number;
|
|
647
647
|
limit?: number;
|
|
648
648
|
}) => Promise<ListResourceDownloadableRead>;
|
|
649
|
-
|
|
649
|
+
iterList: (query?: {
|
|
650
650
|
benefit_id?: string | string[] | null;
|
|
651
651
|
page?: number;
|
|
652
652
|
limit?: number;
|
|
@@ -662,7 +662,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
662
662
|
validate: (body: LicenseKeyValidate) => Promise<ValidatedLicenseKey>;
|
|
663
663
|
activate: (body: LicenseKeyActivate) => Promise<LicenseKeyActivationRead>;
|
|
664
664
|
deactivate: (body: LicenseKeyDeactivate) => Promise<void>;
|
|
665
|
-
|
|
665
|
+
iterList: (query?: {
|
|
666
666
|
benefit_id?: string | null;
|
|
667
667
|
page?: number;
|
|
668
668
|
limit?: number;
|
|
@@ -676,7 +676,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
676
676
|
addMember: (body: CustomerPortalMemberCreate) => Promise<CustomerPortalMember>;
|
|
677
677
|
removeMember: (id: string) => Promise<void>;
|
|
678
678
|
updateMember: (id: string, body: CustomerPortalMemberUpdate) => Promise<CustomerPortalMember>;
|
|
679
|
-
|
|
679
|
+
iterListMembers: (query?: {
|
|
680
680
|
page?: number;
|
|
681
681
|
limit?: number;
|
|
682
682
|
}) => AsyncGenerator<CustomerPortalMember>;
|
|
@@ -698,7 +698,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
698
698
|
receipt: (id: string) => Promise<CustomerOrderReceipt>;
|
|
699
699
|
getPaymentStatus: (id: string) => Promise<CustomerOrderPaymentStatus>;
|
|
700
700
|
confirmRetryPayment: (id: string, body: CustomerOrderConfirmPayment) => Promise<CustomerOrderPaymentConfirmation>;
|
|
701
|
-
|
|
701
|
+
iterList: (query?: {
|
|
702
702
|
product_id?: string | string[] | null;
|
|
703
703
|
product_billing_type?: ProductBillingType | ProductBillingType[] | null;
|
|
704
704
|
subscription_id?: string | string[] | null;
|
|
@@ -723,7 +723,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
723
723
|
get: (id: string) => Promise<CustomerSubscription>;
|
|
724
724
|
cancel: (id: string) => Promise<CustomerSubscription>;
|
|
725
725
|
update: (id: string, body: CustomerSubscriptionUpdate) => Promise<CustomerSubscription>;
|
|
726
|
-
|
|
726
|
+
iterList: (query?: {
|
|
727
727
|
product_id?: string | string[] | null;
|
|
728
728
|
active?: boolean | null;
|
|
729
729
|
query?: string | null;
|
|
@@ -739,7 +739,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
739
739
|
sorting?: CustomerWalletSortProperty[] | null;
|
|
740
740
|
}) => Promise<ListResourceCustomerWallet>;
|
|
741
741
|
get: (id: string) => Promise<CustomerWallet>;
|
|
742
|
-
|
|
742
|
+
iterList: (query?: {
|
|
743
743
|
page?: number;
|
|
744
744
|
limit?: number;
|
|
745
745
|
sorting?: CustomerWalletSortProperty[] | null;
|
|
@@ -791,7 +791,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
791
791
|
}) => Promise<ListResourceEventName>;
|
|
792
792
|
get: (id: string) => Promise<Event>;
|
|
793
793
|
ingest: (body: EventsIngest) => Promise<EventsIngestResponse>;
|
|
794
|
-
|
|
794
|
+
iterListNames: (query?: {
|
|
795
795
|
organization_id?: string | string[] | null;
|
|
796
796
|
customer_id?: string | string[] | null;
|
|
797
797
|
external_customer_id?: string | string[] | null;
|
|
@@ -816,7 +816,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
816
816
|
sorting?: EventTypesSortProperty[] | null;
|
|
817
817
|
}) => Promise<ListResourceEventTypeWithStats>;
|
|
818
818
|
update: (id: string, body: EventTypeUpdate) => Promise<EventType>;
|
|
819
|
-
|
|
819
|
+
iterList: (query?: {
|
|
820
820
|
organization_id?: string | string[] | null;
|
|
821
821
|
customer_id?: string | string[] | null;
|
|
822
822
|
external_customer_id?: string | string[] | null;
|
|
@@ -852,7 +852,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
852
852
|
customer_aggregation_function?: AggregationFunction | null;
|
|
853
853
|
metadata?: MetadataQuery;
|
|
854
854
|
}) => Promise<MeterQuantities>;
|
|
855
|
-
|
|
855
|
+
iterList: (query?: {
|
|
856
856
|
organization_id?: string | string[] | null;
|
|
857
857
|
query?: string | null;
|
|
858
858
|
is_archived?: boolean | null;
|
|
@@ -873,7 +873,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
873
873
|
sorting?: CustomerMeterSortProperty[] | null;
|
|
874
874
|
}) => Promise<ListResourceCustomerMeter>;
|
|
875
875
|
get: (id: string) => Promise<CustomerMeter>;
|
|
876
|
-
|
|
876
|
+
iterList: (query?: {
|
|
877
877
|
organization_id?: string | string[] | null;
|
|
878
878
|
customer_id?: string | string[] | null;
|
|
879
879
|
external_customer_id?: string | string[] | null;
|
|
@@ -897,7 +897,7 @@ declare function createPolar(options: PolarOptions): {
|
|
|
897
897
|
sorting?: PaymentSortProperty[] | null;
|
|
898
898
|
}) => Promise<ListResourcePayment>;
|
|
899
899
|
get: (id: string) => Promise<Payment>;
|
|
900
|
-
|
|
900
|
+
iterList: (query?: {
|
|
901
901
|
organization_id?: string | string[] | null;
|
|
902
902
|
checkout_id?: string | string[] | null;
|
|
903
903
|
order_id?: string | string[] | null;
|
|
@@ -1436,5 +1436,801 @@ declare class Update404Error extends PolarClientError<null> {
|
|
|
1436
1436
|
constructor(statusCode: 404, error: null);
|
|
1437
1437
|
}
|
|
1438
1438
|
//#endregion
|
|
1439
|
-
|
|
1439
|
+
//#region src/webhooks.d.ts
|
|
1440
|
+
declare class PolarWebhookError extends PolarError {
|
|
1441
|
+
constructor(message: string, options?: ErrorOptions);
|
|
1442
|
+
}
|
|
1443
|
+
declare class PolarWebhookVerificationError extends PolarWebhookError {
|
|
1444
|
+
constructor(message: string, options?: ErrorOptions);
|
|
1445
|
+
}
|
|
1446
|
+
declare class PolarWebhookUnknownTypeError extends PolarWebhookError {
|
|
1447
|
+
readonly eventType: string | null;
|
|
1448
|
+
constructor(eventType: string | null);
|
|
1449
|
+
}
|
|
1450
|
+
declare namespace webhooks_d_exports {
|
|
1451
|
+
export { PolarWebhookError, PolarWebhookUnknownTypeError, PolarWebhookVerificationError, WebhookBenefitCreatedPayload, WebhookBenefitGrantCreatedPayload, WebhookBenefitGrantCycledPayload, WebhookBenefitGrantRevokedPayload, WebhookBenefitGrantUpdatedPayload, WebhookBenefitUpdatedPayload, WebhookCheckoutCreatedPayload, WebhookCheckoutExpiredPayload, WebhookCheckoutUpdatedPayload, WebhookCustomerCreatedPayload, WebhookCustomerDeletedPayload, WebhookCustomerSeatAssignedPayload, WebhookCustomerSeatClaimedPayload, WebhookCustomerSeatRevokedPayload, WebhookCustomerStateChangedPayload, WebhookCustomerUpdatedPayload, WebhookMemberCreatedPayload, WebhookMemberDeletedPayload, WebhookMemberUpdatedPayload, WebhookOrderCreatedPayload, WebhookOrderPaidPayload, WebhookOrderRefundedPayload, WebhookOrderUpdatedPayload, WebhookOrganizationUpdatedPayload, WebhookPayload, WebhookProductCreatedPayload, WebhookProductUpdatedPayload, WebhookRefundCreatedPayload, WebhookRefundUpdatedPayload, WebhookSubscriptionActivePayload, WebhookSubscriptionCanceledPayload, WebhookSubscriptionCreatedPayload, WebhookSubscriptionPastDuePayload, WebhookSubscriptionPausedPayload, WebhookSubscriptionResumedPayload, WebhookSubscriptionRevokedPayload, WebhookSubscriptionUncanceledPayload, WebhookSubscriptionUpdatedPayload, validateEvent };
|
|
1452
|
+
}
|
|
1453
|
+
/**
|
|
1454
|
+
* Sent when a new benefit is created.
|
|
1455
|
+
*
|
|
1456
|
+
* **Discord & Slack support:** Basic
|
|
1457
|
+
*/
|
|
1458
|
+
interface WebhookBenefitCreatedPayload {
|
|
1459
|
+
/**
|
|
1460
|
+
* type
|
|
1461
|
+
*/
|
|
1462
|
+
type: "benefit.created";
|
|
1463
|
+
/**
|
|
1464
|
+
* timestamp
|
|
1465
|
+
*/
|
|
1466
|
+
timestamp: string;
|
|
1467
|
+
/**
|
|
1468
|
+
* data
|
|
1469
|
+
*/
|
|
1470
|
+
data: Benefit;
|
|
1471
|
+
}
|
|
1472
|
+
/**
|
|
1473
|
+
* Sent when a new benefit grant is created.
|
|
1474
|
+
*
|
|
1475
|
+
* **Discord & Slack support:** Basic
|
|
1476
|
+
*/
|
|
1477
|
+
interface WebhookBenefitGrantCreatedPayload {
|
|
1478
|
+
/**
|
|
1479
|
+
* type
|
|
1480
|
+
*/
|
|
1481
|
+
type: "benefit_grant.created";
|
|
1482
|
+
/**
|
|
1483
|
+
* timestamp
|
|
1484
|
+
*/
|
|
1485
|
+
timestamp: string;
|
|
1486
|
+
/**
|
|
1487
|
+
* data
|
|
1488
|
+
*/
|
|
1489
|
+
data: BenefitGrantWebhook;
|
|
1490
|
+
}
|
|
1491
|
+
/**
|
|
1492
|
+
* Sent when a benefit grant is cycled,
|
|
1493
|
+
* meaning the related subscription has been renewed for another period.
|
|
1494
|
+
*
|
|
1495
|
+
* **Discord & Slack support:** Basic
|
|
1496
|
+
*/
|
|
1497
|
+
interface WebhookBenefitGrantCycledPayload {
|
|
1498
|
+
/**
|
|
1499
|
+
* type
|
|
1500
|
+
*/
|
|
1501
|
+
type: "benefit_grant.cycled";
|
|
1502
|
+
/**
|
|
1503
|
+
* timestamp
|
|
1504
|
+
*/
|
|
1505
|
+
timestamp: string;
|
|
1506
|
+
/**
|
|
1507
|
+
* data
|
|
1508
|
+
*/
|
|
1509
|
+
data: BenefitGrantWebhook;
|
|
1510
|
+
}
|
|
1511
|
+
/**
|
|
1512
|
+
* Sent when a benefit grant is revoked.
|
|
1513
|
+
*
|
|
1514
|
+
* **Discord & Slack support:** Basic
|
|
1515
|
+
*/
|
|
1516
|
+
interface WebhookBenefitGrantRevokedPayload {
|
|
1517
|
+
/**
|
|
1518
|
+
* type
|
|
1519
|
+
*/
|
|
1520
|
+
type: "benefit_grant.revoked";
|
|
1521
|
+
/**
|
|
1522
|
+
* timestamp
|
|
1523
|
+
*/
|
|
1524
|
+
timestamp: string;
|
|
1525
|
+
/**
|
|
1526
|
+
* data
|
|
1527
|
+
*/
|
|
1528
|
+
data: BenefitGrantWebhook;
|
|
1529
|
+
}
|
|
1530
|
+
/**
|
|
1531
|
+
* Sent when a benefit grant is updated.
|
|
1532
|
+
*
|
|
1533
|
+
* **Discord & Slack support:** Basic
|
|
1534
|
+
*/
|
|
1535
|
+
interface WebhookBenefitGrantUpdatedPayload {
|
|
1536
|
+
/**
|
|
1537
|
+
* type
|
|
1538
|
+
*/
|
|
1539
|
+
type: "benefit_grant.updated";
|
|
1540
|
+
/**
|
|
1541
|
+
* timestamp
|
|
1542
|
+
*/
|
|
1543
|
+
timestamp: string;
|
|
1544
|
+
/**
|
|
1545
|
+
* data
|
|
1546
|
+
*/
|
|
1547
|
+
data: BenefitGrantWebhook;
|
|
1548
|
+
}
|
|
1549
|
+
/**
|
|
1550
|
+
* Sent when a benefit is updated.
|
|
1551
|
+
*
|
|
1552
|
+
* **Discord & Slack support:** Basic
|
|
1553
|
+
*/
|
|
1554
|
+
interface WebhookBenefitUpdatedPayload {
|
|
1555
|
+
/**
|
|
1556
|
+
* type
|
|
1557
|
+
*/
|
|
1558
|
+
type: "benefit.updated";
|
|
1559
|
+
/**
|
|
1560
|
+
* timestamp
|
|
1561
|
+
*/
|
|
1562
|
+
timestamp: string;
|
|
1563
|
+
/**
|
|
1564
|
+
* data
|
|
1565
|
+
*/
|
|
1566
|
+
data: Benefit;
|
|
1567
|
+
}
|
|
1568
|
+
/**
|
|
1569
|
+
* Sent when a new checkout is created.
|
|
1570
|
+
*
|
|
1571
|
+
* **Discord & Slack support:** Basic
|
|
1572
|
+
*/
|
|
1573
|
+
interface WebhookCheckoutCreatedPayload {
|
|
1574
|
+
/**
|
|
1575
|
+
* type
|
|
1576
|
+
*/
|
|
1577
|
+
type: "checkout.created";
|
|
1578
|
+
/**
|
|
1579
|
+
* timestamp
|
|
1580
|
+
*/
|
|
1581
|
+
timestamp: string;
|
|
1582
|
+
/**
|
|
1583
|
+
* data
|
|
1584
|
+
*/
|
|
1585
|
+
data: Checkout;
|
|
1586
|
+
}
|
|
1587
|
+
/**
|
|
1588
|
+
* Sent when a checkout expires.
|
|
1589
|
+
*
|
|
1590
|
+
* This event fires when a checkout reaches its expiration time without being completed.
|
|
1591
|
+
* Developers can use this to send reminder emails or track checkout abandonment.
|
|
1592
|
+
*
|
|
1593
|
+
* **Discord & Slack support:** Basic
|
|
1594
|
+
*/
|
|
1595
|
+
interface WebhookCheckoutExpiredPayload {
|
|
1596
|
+
/**
|
|
1597
|
+
* type
|
|
1598
|
+
*/
|
|
1599
|
+
type: "checkout.expired";
|
|
1600
|
+
/**
|
|
1601
|
+
* timestamp
|
|
1602
|
+
*/
|
|
1603
|
+
timestamp: string;
|
|
1604
|
+
/**
|
|
1605
|
+
* data
|
|
1606
|
+
*/
|
|
1607
|
+
data: Checkout;
|
|
1608
|
+
}
|
|
1609
|
+
/**
|
|
1610
|
+
* Sent when a checkout is updated.
|
|
1611
|
+
*
|
|
1612
|
+
* **Discord & Slack support:** Basic
|
|
1613
|
+
*/
|
|
1614
|
+
interface WebhookCheckoutUpdatedPayload {
|
|
1615
|
+
/**
|
|
1616
|
+
* type
|
|
1617
|
+
*/
|
|
1618
|
+
type: "checkout.updated";
|
|
1619
|
+
/**
|
|
1620
|
+
* timestamp
|
|
1621
|
+
*/
|
|
1622
|
+
timestamp: string;
|
|
1623
|
+
/**
|
|
1624
|
+
* data
|
|
1625
|
+
*/
|
|
1626
|
+
data: Checkout;
|
|
1627
|
+
}
|
|
1628
|
+
/**
|
|
1629
|
+
* Sent when a new customer is created.
|
|
1630
|
+
*
|
|
1631
|
+
* A customer can be created:
|
|
1632
|
+
*
|
|
1633
|
+
* * After a successful checkout.
|
|
1634
|
+
* * Programmatically via the API.
|
|
1635
|
+
*
|
|
1636
|
+
* **Discord & Slack support:** Basic
|
|
1637
|
+
*/
|
|
1638
|
+
interface WebhookCustomerCreatedPayload {
|
|
1639
|
+
/**
|
|
1640
|
+
* type
|
|
1641
|
+
*/
|
|
1642
|
+
type: "customer.created";
|
|
1643
|
+
/**
|
|
1644
|
+
* timestamp
|
|
1645
|
+
*/
|
|
1646
|
+
timestamp: string;
|
|
1647
|
+
/**
|
|
1648
|
+
* data
|
|
1649
|
+
*/
|
|
1650
|
+
data: Customer;
|
|
1651
|
+
}
|
|
1652
|
+
/**
|
|
1653
|
+
* Sent when a customer is deleted.
|
|
1654
|
+
*
|
|
1655
|
+
* **Discord & Slack support:** Basic
|
|
1656
|
+
*/
|
|
1657
|
+
interface WebhookCustomerDeletedPayload {
|
|
1658
|
+
/**
|
|
1659
|
+
* type
|
|
1660
|
+
*/
|
|
1661
|
+
type: "customer.deleted";
|
|
1662
|
+
/**
|
|
1663
|
+
* timestamp
|
|
1664
|
+
*/
|
|
1665
|
+
timestamp: string;
|
|
1666
|
+
/**
|
|
1667
|
+
* data
|
|
1668
|
+
*/
|
|
1669
|
+
data: Customer;
|
|
1670
|
+
}
|
|
1671
|
+
/**
|
|
1672
|
+
* Sent when a new customer seat is assigned.
|
|
1673
|
+
*
|
|
1674
|
+
* This event is triggered when a seat is assigned to a customer by the organization.
|
|
1675
|
+
* The customer will receive an invitation email to claim the seat.
|
|
1676
|
+
*/
|
|
1677
|
+
interface WebhookCustomerSeatAssignedPayload {
|
|
1678
|
+
/**
|
|
1679
|
+
* type
|
|
1680
|
+
*/
|
|
1681
|
+
type: "customer_seat.assigned";
|
|
1682
|
+
/**
|
|
1683
|
+
* timestamp
|
|
1684
|
+
*/
|
|
1685
|
+
timestamp: string;
|
|
1686
|
+
/**
|
|
1687
|
+
* data
|
|
1688
|
+
*/
|
|
1689
|
+
data: CustomerSeat;
|
|
1690
|
+
}
|
|
1691
|
+
/**
|
|
1692
|
+
* Sent when a customer seat is claimed.
|
|
1693
|
+
*
|
|
1694
|
+
* This event is triggered when a customer accepts the seat invitation and claims their access.
|
|
1695
|
+
*/
|
|
1696
|
+
interface WebhookCustomerSeatClaimedPayload {
|
|
1697
|
+
/**
|
|
1698
|
+
* type
|
|
1699
|
+
*/
|
|
1700
|
+
type: "customer_seat.claimed";
|
|
1701
|
+
/**
|
|
1702
|
+
* timestamp
|
|
1703
|
+
*/
|
|
1704
|
+
timestamp: string;
|
|
1705
|
+
/**
|
|
1706
|
+
* data
|
|
1707
|
+
*/
|
|
1708
|
+
data: CustomerSeat;
|
|
1709
|
+
}
|
|
1710
|
+
/**
|
|
1711
|
+
* Sent when a customer seat is revoked.
|
|
1712
|
+
*
|
|
1713
|
+
* This event is triggered when access to a seat is revoked, either manually by the organization or automatically when a subscription is canceled.
|
|
1714
|
+
*/
|
|
1715
|
+
interface WebhookCustomerSeatRevokedPayload {
|
|
1716
|
+
/**
|
|
1717
|
+
* type
|
|
1718
|
+
*/
|
|
1719
|
+
type: "customer_seat.revoked";
|
|
1720
|
+
/**
|
|
1721
|
+
* timestamp
|
|
1722
|
+
*/
|
|
1723
|
+
timestamp: string;
|
|
1724
|
+
/**
|
|
1725
|
+
* data
|
|
1726
|
+
*/
|
|
1727
|
+
data: CustomerSeat;
|
|
1728
|
+
}
|
|
1729
|
+
/**
|
|
1730
|
+
* Sent when a customer state has changed.
|
|
1731
|
+
*
|
|
1732
|
+
* It's triggered when:
|
|
1733
|
+
*
|
|
1734
|
+
* * Customer is created, updated or deleted.
|
|
1735
|
+
* * A subscription is created or updated.
|
|
1736
|
+
* * A benefit is granted or revoked.
|
|
1737
|
+
*
|
|
1738
|
+
* **Discord & Slack support:** Basic
|
|
1739
|
+
*/
|
|
1740
|
+
interface WebhookCustomerStateChangedPayload {
|
|
1741
|
+
/**
|
|
1742
|
+
* type
|
|
1743
|
+
*/
|
|
1744
|
+
type: "customer.state_changed";
|
|
1745
|
+
/**
|
|
1746
|
+
* timestamp
|
|
1747
|
+
*/
|
|
1748
|
+
timestamp: string;
|
|
1749
|
+
/**
|
|
1750
|
+
* data
|
|
1751
|
+
*/
|
|
1752
|
+
data: CustomerState;
|
|
1753
|
+
}
|
|
1754
|
+
/**
|
|
1755
|
+
* Sent when a customer is updated.
|
|
1756
|
+
*
|
|
1757
|
+
* This event is fired when the customer details are updated.
|
|
1758
|
+
*
|
|
1759
|
+
* If you want to be notified when a customer subscription or benefit state changes, you should listen to the `customer_state_changed` event.
|
|
1760
|
+
*
|
|
1761
|
+
* **Discord & Slack support:** Basic
|
|
1762
|
+
*/
|
|
1763
|
+
interface WebhookCustomerUpdatedPayload {
|
|
1764
|
+
/**
|
|
1765
|
+
* type
|
|
1766
|
+
*/
|
|
1767
|
+
type: "customer.updated";
|
|
1768
|
+
/**
|
|
1769
|
+
* timestamp
|
|
1770
|
+
*/
|
|
1771
|
+
timestamp: string;
|
|
1772
|
+
/**
|
|
1773
|
+
* data
|
|
1774
|
+
*/
|
|
1775
|
+
data: Customer;
|
|
1776
|
+
}
|
|
1777
|
+
/**
|
|
1778
|
+
* Sent when a new member is created.
|
|
1779
|
+
*
|
|
1780
|
+
* A member represents an individual within a customer (team).
|
|
1781
|
+
* This event is triggered when a member is added to a customer,
|
|
1782
|
+
* either programmatically via the API or when an owner is automatically
|
|
1783
|
+
* created for a new customer.
|
|
1784
|
+
*
|
|
1785
|
+
* **Discord & Slack support:** Basic
|
|
1786
|
+
*/
|
|
1787
|
+
interface WebhookMemberCreatedPayload {
|
|
1788
|
+
/**
|
|
1789
|
+
* type
|
|
1790
|
+
*/
|
|
1791
|
+
type: "member.created";
|
|
1792
|
+
/**
|
|
1793
|
+
* timestamp
|
|
1794
|
+
*/
|
|
1795
|
+
timestamp: string;
|
|
1796
|
+
/**
|
|
1797
|
+
* data
|
|
1798
|
+
*/
|
|
1799
|
+
data: Member;
|
|
1800
|
+
}
|
|
1801
|
+
/**
|
|
1802
|
+
* Sent when a member is deleted.
|
|
1803
|
+
*
|
|
1804
|
+
* This event is triggered when a member is removed from a customer.
|
|
1805
|
+
* Any active seats assigned to the member will be automatically revoked.
|
|
1806
|
+
*
|
|
1807
|
+
* **Discord & Slack support:** Basic
|
|
1808
|
+
*/
|
|
1809
|
+
interface WebhookMemberDeletedPayload {
|
|
1810
|
+
/**
|
|
1811
|
+
* type
|
|
1812
|
+
*/
|
|
1813
|
+
type: "member.deleted";
|
|
1814
|
+
/**
|
|
1815
|
+
* timestamp
|
|
1816
|
+
*/
|
|
1817
|
+
timestamp: string;
|
|
1818
|
+
/**
|
|
1819
|
+
* data
|
|
1820
|
+
*/
|
|
1821
|
+
data: Member;
|
|
1822
|
+
}
|
|
1823
|
+
/**
|
|
1824
|
+
* Sent when a member is updated.
|
|
1825
|
+
*
|
|
1826
|
+
* This event is triggered when member details are updated,
|
|
1827
|
+
* such as their name or role within the customer.
|
|
1828
|
+
*
|
|
1829
|
+
* **Discord & Slack support:** Basic
|
|
1830
|
+
*/
|
|
1831
|
+
interface WebhookMemberUpdatedPayload {
|
|
1832
|
+
/**
|
|
1833
|
+
* type
|
|
1834
|
+
*/
|
|
1835
|
+
type: "member.updated";
|
|
1836
|
+
/**
|
|
1837
|
+
* timestamp
|
|
1838
|
+
*/
|
|
1839
|
+
timestamp: string;
|
|
1840
|
+
/**
|
|
1841
|
+
* data
|
|
1842
|
+
*/
|
|
1843
|
+
data: Member;
|
|
1844
|
+
}
|
|
1845
|
+
/**
|
|
1846
|
+
* Sent when a new order is created.
|
|
1847
|
+
*
|
|
1848
|
+
* A new order is created when:
|
|
1849
|
+
*
|
|
1850
|
+
* * A customer purchases a one-time product. In this case, `billing_reason` is set to `purchase`.
|
|
1851
|
+
* * A customer starts a subscription. In this case, `billing_reason` is set to `subscription_create`.
|
|
1852
|
+
* * A subscription is renewed. In this case, `billing_reason` is set to `subscription_cycle`.
|
|
1853
|
+
* * A subscription is upgraded or downgraded with an immediate proration invoice. In this case, `billing_reason` is set to `subscription_update`.
|
|
1854
|
+
*
|
|
1855
|
+
* > [!WARNING]
|
|
1856
|
+
* > The order might not be paid yet, so the `status` field might be `pending`.
|
|
1857
|
+
*
|
|
1858
|
+
* **Discord & Slack support:** Full
|
|
1859
|
+
*/
|
|
1860
|
+
interface WebhookOrderCreatedPayload {
|
|
1861
|
+
/**
|
|
1862
|
+
* type
|
|
1863
|
+
*/
|
|
1864
|
+
type: "order.created";
|
|
1865
|
+
/**
|
|
1866
|
+
* timestamp
|
|
1867
|
+
*/
|
|
1868
|
+
timestamp: string;
|
|
1869
|
+
/**
|
|
1870
|
+
* data
|
|
1871
|
+
*/
|
|
1872
|
+
data: Order;
|
|
1873
|
+
}
|
|
1874
|
+
/**
|
|
1875
|
+
* Sent when an order is paid.
|
|
1876
|
+
*
|
|
1877
|
+
* When you receive this event, the order is fully processed and payment has been received.
|
|
1878
|
+
*
|
|
1879
|
+
* **Discord & Slack support:** Full
|
|
1880
|
+
*/
|
|
1881
|
+
interface WebhookOrderPaidPayload {
|
|
1882
|
+
/**
|
|
1883
|
+
* type
|
|
1884
|
+
*/
|
|
1885
|
+
type: "order.paid";
|
|
1886
|
+
/**
|
|
1887
|
+
* timestamp
|
|
1888
|
+
*/
|
|
1889
|
+
timestamp: string;
|
|
1890
|
+
/**
|
|
1891
|
+
* data
|
|
1892
|
+
*/
|
|
1893
|
+
data: Order;
|
|
1894
|
+
}
|
|
1895
|
+
/**
|
|
1896
|
+
* Sent when an order is fully or partially refunded.
|
|
1897
|
+
*
|
|
1898
|
+
* **Discord & Slack support:** Full
|
|
1899
|
+
*/
|
|
1900
|
+
interface WebhookOrderRefundedPayload {
|
|
1901
|
+
/**
|
|
1902
|
+
* type
|
|
1903
|
+
*/
|
|
1904
|
+
type: "order.refunded";
|
|
1905
|
+
/**
|
|
1906
|
+
* timestamp
|
|
1907
|
+
*/
|
|
1908
|
+
timestamp: string;
|
|
1909
|
+
/**
|
|
1910
|
+
* data
|
|
1911
|
+
*/
|
|
1912
|
+
data: Order;
|
|
1913
|
+
}
|
|
1914
|
+
/**
|
|
1915
|
+
* Sent when an order is updated.
|
|
1916
|
+
*
|
|
1917
|
+
* An order is updated when:
|
|
1918
|
+
*
|
|
1919
|
+
* * Its status changes, e.g. from `pending` to `paid`.
|
|
1920
|
+
* * It's refunded, partially or fully.
|
|
1921
|
+
*
|
|
1922
|
+
* **Discord & Slack support:** Full
|
|
1923
|
+
*/
|
|
1924
|
+
interface WebhookOrderUpdatedPayload {
|
|
1925
|
+
/**
|
|
1926
|
+
* type
|
|
1927
|
+
*/
|
|
1928
|
+
type: "order.updated";
|
|
1929
|
+
/**
|
|
1930
|
+
* timestamp
|
|
1931
|
+
*/
|
|
1932
|
+
timestamp: string;
|
|
1933
|
+
/**
|
|
1934
|
+
* data
|
|
1935
|
+
*/
|
|
1936
|
+
data: Order;
|
|
1937
|
+
}
|
|
1938
|
+
/**
|
|
1939
|
+
* Sent when a organization is updated.
|
|
1940
|
+
*
|
|
1941
|
+
* **Discord & Slack support:** Basic
|
|
1942
|
+
*/
|
|
1943
|
+
interface WebhookOrganizationUpdatedPayload {
|
|
1944
|
+
/**
|
|
1945
|
+
* type
|
|
1946
|
+
*/
|
|
1947
|
+
type: "organization.updated";
|
|
1948
|
+
/**
|
|
1949
|
+
* timestamp
|
|
1950
|
+
*/
|
|
1951
|
+
timestamp: string;
|
|
1952
|
+
/**
|
|
1953
|
+
* data
|
|
1954
|
+
*/
|
|
1955
|
+
data: Organization;
|
|
1956
|
+
}
|
|
1957
|
+
/**
|
|
1958
|
+
* Sent when a new product is created.
|
|
1959
|
+
*
|
|
1960
|
+
* **Discord & Slack support:** Basic
|
|
1961
|
+
*/
|
|
1962
|
+
interface WebhookProductCreatedPayload {
|
|
1963
|
+
/**
|
|
1964
|
+
* type
|
|
1965
|
+
*/
|
|
1966
|
+
type: "product.created";
|
|
1967
|
+
/**
|
|
1968
|
+
* timestamp
|
|
1969
|
+
*/
|
|
1970
|
+
timestamp: string;
|
|
1971
|
+
/**
|
|
1972
|
+
* data
|
|
1973
|
+
*/
|
|
1974
|
+
data: Product;
|
|
1975
|
+
}
|
|
1976
|
+
/**
|
|
1977
|
+
* Sent when a product is updated.
|
|
1978
|
+
*
|
|
1979
|
+
* **Discord & Slack support:** Basic
|
|
1980
|
+
*/
|
|
1981
|
+
interface WebhookProductUpdatedPayload {
|
|
1982
|
+
/**
|
|
1983
|
+
* type
|
|
1984
|
+
*/
|
|
1985
|
+
type: "product.updated";
|
|
1986
|
+
/**
|
|
1987
|
+
* timestamp
|
|
1988
|
+
*/
|
|
1989
|
+
timestamp: string;
|
|
1990
|
+
/**
|
|
1991
|
+
* data
|
|
1992
|
+
*/
|
|
1993
|
+
data: Product;
|
|
1994
|
+
}
|
|
1995
|
+
/**
|
|
1996
|
+
* Sent when a refund is created regardless of status.
|
|
1997
|
+
*
|
|
1998
|
+
* **Discord & Slack support:** Full
|
|
1999
|
+
*/
|
|
2000
|
+
interface WebhookRefundCreatedPayload {
|
|
2001
|
+
/**
|
|
2002
|
+
* type
|
|
2003
|
+
*/
|
|
2004
|
+
type: "refund.created";
|
|
2005
|
+
/**
|
|
2006
|
+
* timestamp
|
|
2007
|
+
*/
|
|
2008
|
+
timestamp: string;
|
|
2009
|
+
/**
|
|
2010
|
+
* data
|
|
2011
|
+
*/
|
|
2012
|
+
data: Refund;
|
|
2013
|
+
}
|
|
2014
|
+
/**
|
|
2015
|
+
* Sent when a refund is updated.
|
|
2016
|
+
*
|
|
2017
|
+
* **Discord & Slack support:** Full
|
|
2018
|
+
*/
|
|
2019
|
+
interface WebhookRefundUpdatedPayload {
|
|
2020
|
+
/**
|
|
2021
|
+
* type
|
|
2022
|
+
*/
|
|
2023
|
+
type: "refund.updated";
|
|
2024
|
+
/**
|
|
2025
|
+
* timestamp
|
|
2026
|
+
*/
|
|
2027
|
+
timestamp: string;
|
|
2028
|
+
/**
|
|
2029
|
+
* data
|
|
2030
|
+
*/
|
|
2031
|
+
data: Refund;
|
|
2032
|
+
}
|
|
2033
|
+
/**
|
|
2034
|
+
* Sent when a subscription becomes active,
|
|
2035
|
+
* whether because it's a new paid subscription or because payment was recovered.
|
|
2036
|
+
*
|
|
2037
|
+
* **Discord & Slack support:** Full
|
|
2038
|
+
*/
|
|
2039
|
+
interface WebhookSubscriptionActivePayload {
|
|
2040
|
+
/**
|
|
2041
|
+
* type
|
|
2042
|
+
*/
|
|
2043
|
+
type: "subscription.active";
|
|
2044
|
+
/**
|
|
2045
|
+
* timestamp
|
|
2046
|
+
*/
|
|
2047
|
+
timestamp: string;
|
|
2048
|
+
/**
|
|
2049
|
+
* data
|
|
2050
|
+
*/
|
|
2051
|
+
data: Subscription;
|
|
2052
|
+
}
|
|
2053
|
+
/**
|
|
2054
|
+
* Sent when a subscription is canceled.
|
|
2055
|
+
* Customers might still have access until the end of the current period.
|
|
2056
|
+
*
|
|
2057
|
+
* **Discord & Slack support:** Full
|
|
2058
|
+
*/
|
|
2059
|
+
interface WebhookSubscriptionCanceledPayload {
|
|
2060
|
+
/**
|
|
2061
|
+
* type
|
|
2062
|
+
*/
|
|
2063
|
+
type: "subscription.canceled";
|
|
2064
|
+
/**
|
|
2065
|
+
* timestamp
|
|
2066
|
+
*/
|
|
2067
|
+
timestamp: string;
|
|
2068
|
+
/**
|
|
2069
|
+
* data
|
|
2070
|
+
*/
|
|
2071
|
+
data: Subscription;
|
|
2072
|
+
}
|
|
2073
|
+
/**
|
|
2074
|
+
* Sent when a new subscription is created.
|
|
2075
|
+
*
|
|
2076
|
+
* When this event occurs, the subscription `status` might not be `active` yet, as we can still have to wait for the first payment to be processed.
|
|
2077
|
+
*
|
|
2078
|
+
* **Discord & Slack support:** Full
|
|
2079
|
+
*/
|
|
2080
|
+
interface WebhookSubscriptionCreatedPayload {
|
|
2081
|
+
/**
|
|
2082
|
+
* type
|
|
2083
|
+
*/
|
|
2084
|
+
type: "subscription.created";
|
|
2085
|
+
/**
|
|
2086
|
+
* timestamp
|
|
2087
|
+
*/
|
|
2088
|
+
timestamp: string;
|
|
2089
|
+
/**
|
|
2090
|
+
* data
|
|
2091
|
+
*/
|
|
2092
|
+
data: Subscription;
|
|
2093
|
+
}
|
|
2094
|
+
/**
|
|
2095
|
+
* Sent when a subscription payment fails and the subscription enters `past_due` status.
|
|
2096
|
+
*
|
|
2097
|
+
* This is a recoverable state - the customer can update their payment method to restore the subscription.
|
|
2098
|
+
* Benefits may be revoked depending on the organization's grace period settings.
|
|
2099
|
+
*
|
|
2100
|
+
* If payment retries are exhausted, a `subscription.revoked` event will be sent.
|
|
2101
|
+
*
|
|
2102
|
+
* **Discord & Slack support:** Full
|
|
2103
|
+
*/
|
|
2104
|
+
interface WebhookSubscriptionPastDuePayload {
|
|
2105
|
+
/**
|
|
2106
|
+
* type
|
|
2107
|
+
*/
|
|
2108
|
+
type: "subscription.past_due";
|
|
2109
|
+
/**
|
|
2110
|
+
* timestamp
|
|
2111
|
+
*/
|
|
2112
|
+
timestamp: string;
|
|
2113
|
+
/**
|
|
2114
|
+
* data
|
|
2115
|
+
*/
|
|
2116
|
+
data: Subscription;
|
|
2117
|
+
}
|
|
2118
|
+
/**
|
|
2119
|
+
* Sent when a subscription is paused and the customer temporarily loses access.
|
|
2120
|
+
*
|
|
2121
|
+
* No order is created while paused. The subscription resumes either on its
|
|
2122
|
+
* scheduled resume date or when resumed manually, starting a new billing period.
|
|
2123
|
+
*
|
|
2124
|
+
* **Discord & Slack support:** Full
|
|
2125
|
+
*/
|
|
2126
|
+
interface WebhookSubscriptionPausedPayload {
|
|
2127
|
+
/**
|
|
2128
|
+
* type
|
|
2129
|
+
*/
|
|
2130
|
+
type: "subscription.paused";
|
|
2131
|
+
/**
|
|
2132
|
+
* timestamp
|
|
2133
|
+
*/
|
|
2134
|
+
timestamp: string;
|
|
2135
|
+
/**
|
|
2136
|
+
* data
|
|
2137
|
+
*/
|
|
2138
|
+
data: Subscription;
|
|
2139
|
+
}
|
|
2140
|
+
/**
|
|
2141
|
+
* Sent when a paused subscription resumes, restoring the customer's access.
|
|
2142
|
+
*
|
|
2143
|
+
* Resuming starts a new billing period and charges the customer immediately.
|
|
2144
|
+
*
|
|
2145
|
+
* **Discord & Slack support:** Full
|
|
2146
|
+
*/
|
|
2147
|
+
interface WebhookSubscriptionResumedPayload {
|
|
2148
|
+
/**
|
|
2149
|
+
* type
|
|
2150
|
+
*/
|
|
2151
|
+
type: "subscription.resumed";
|
|
2152
|
+
/**
|
|
2153
|
+
* timestamp
|
|
2154
|
+
*/
|
|
2155
|
+
timestamp: string;
|
|
2156
|
+
/**
|
|
2157
|
+
* data
|
|
2158
|
+
*/
|
|
2159
|
+
data: Subscription;
|
|
2160
|
+
}
|
|
2161
|
+
/**
|
|
2162
|
+
* Sent when a subscription is revoked and the user loses access immediately.
|
|
2163
|
+
* Happens when the subscription is canceled or payment retries are exhausted (status becomes `unpaid`).
|
|
2164
|
+
*
|
|
2165
|
+
* For payment failures that can still be recovered, see `subscription.past_due`.
|
|
2166
|
+
*
|
|
2167
|
+
* **Discord & Slack support:** Full
|
|
2168
|
+
*/
|
|
2169
|
+
interface WebhookSubscriptionRevokedPayload {
|
|
2170
|
+
/**
|
|
2171
|
+
* type
|
|
2172
|
+
*/
|
|
2173
|
+
type: "subscription.revoked";
|
|
2174
|
+
/**
|
|
2175
|
+
* timestamp
|
|
2176
|
+
*/
|
|
2177
|
+
timestamp: string;
|
|
2178
|
+
/**
|
|
2179
|
+
* data
|
|
2180
|
+
*/
|
|
2181
|
+
data: Subscription;
|
|
2182
|
+
}
|
|
2183
|
+
/**
|
|
2184
|
+
* Sent when a customer revokes a pending cancellation.
|
|
2185
|
+
*
|
|
2186
|
+
* When a customer cancels with "at period end", they retain access until the
|
|
2187
|
+
* subscription would renew. During this time, they can change their mind and
|
|
2188
|
+
* undo the cancellation. This event is triggered when they do so.
|
|
2189
|
+
*
|
|
2190
|
+
* **Discord & Slack support:** Full
|
|
2191
|
+
*/
|
|
2192
|
+
interface WebhookSubscriptionUncanceledPayload {
|
|
2193
|
+
/**
|
|
2194
|
+
* type
|
|
2195
|
+
*/
|
|
2196
|
+
type: "subscription.uncanceled";
|
|
2197
|
+
/**
|
|
2198
|
+
* timestamp
|
|
2199
|
+
*/
|
|
2200
|
+
timestamp: string;
|
|
2201
|
+
/**
|
|
2202
|
+
* data
|
|
2203
|
+
*/
|
|
2204
|
+
data: Subscription;
|
|
2205
|
+
}
|
|
2206
|
+
/**
|
|
2207
|
+
* Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals.
|
|
2208
|
+
*
|
|
2209
|
+
* If you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, `subscription.past_due`, and `subscription.revoked`.
|
|
2210
|
+
*
|
|
2211
|
+
* To listen specifically for renewals, you can listen to `order.created` events and check the `billing_reason` field.
|
|
2212
|
+
*
|
|
2213
|
+
* **Discord & Slack support:** On cancellation, past due, and revocation. Renewals are skipped.
|
|
2214
|
+
*/
|
|
2215
|
+
interface WebhookSubscriptionUpdatedPayload {
|
|
2216
|
+
/**
|
|
2217
|
+
* type
|
|
2218
|
+
*/
|
|
2219
|
+
type: "subscription.updated";
|
|
2220
|
+
/**
|
|
2221
|
+
* timestamp
|
|
2222
|
+
*/
|
|
2223
|
+
timestamp: string;
|
|
2224
|
+
/**
|
|
2225
|
+
* data
|
|
2226
|
+
*/
|
|
2227
|
+
data: Subscription;
|
|
2228
|
+
}
|
|
2229
|
+
type WebhookPayload = WebhookBenefitCreatedPayload | WebhookBenefitGrantCreatedPayload | WebhookBenefitGrantCycledPayload | WebhookBenefitGrantRevokedPayload | WebhookBenefitGrantUpdatedPayload | WebhookBenefitUpdatedPayload | WebhookCheckoutCreatedPayload | WebhookCheckoutExpiredPayload | WebhookCheckoutUpdatedPayload | WebhookCustomerCreatedPayload | WebhookCustomerDeletedPayload | WebhookCustomerSeatAssignedPayload | WebhookCustomerSeatClaimedPayload | WebhookCustomerSeatRevokedPayload | WebhookCustomerStateChangedPayload | WebhookCustomerUpdatedPayload | WebhookMemberCreatedPayload | WebhookMemberDeletedPayload | WebhookMemberUpdatedPayload | WebhookOrderCreatedPayload | WebhookOrderPaidPayload | WebhookOrderRefundedPayload | WebhookOrderUpdatedPayload | WebhookOrganizationUpdatedPayload | WebhookProductCreatedPayload | WebhookProductUpdatedPayload | WebhookRefundCreatedPayload | WebhookRefundUpdatedPayload | WebhookSubscriptionActivePayload | WebhookSubscriptionCanceledPayload | WebhookSubscriptionCreatedPayload | WebhookSubscriptionPastDuePayload | WebhookSubscriptionPausedPayload | WebhookSubscriptionResumedPayload | WebhookSubscriptionRevokedPayload | WebhookSubscriptionUncanceledPayload | WebhookSubscriptionUpdatedPayload;
|
|
2230
|
+
/**
|
|
2231
|
+
* Verify a raw Polar webhook request and return its typed payload.
|
|
2232
|
+
*/
|
|
2233
|
+
declare const validateEvent: (body: string | Uint8Array, headers: Record<string, string>, secret: string) => Promise<WebhookPayload>;
|
|
2234
|
+
//#endregion
|
|
2235
|
+
export { type Environment, type Polar, type PolarCore, type PolarOptions, createPolar, createPolarCore, errors_d_exports as errors, models_d_exports as models, webhooks_d_exports as webhooks };
|
|
1440
2236
|
//# sourceMappingURL=index.d.cts.map
|