@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/2026-04/client.ts","../../src/2026-04/models.ts"],"sourcesContent":["import { ClientBase, ClientOptions, resolveBaseUrl } from \"../base\";\nimport { createBenefitGrantsService } from \"./services/benefit_grants\";\nimport { createBenefitsService } from \"./services/benefits\";\nimport { createCheckoutLinksService } from \"./services/checkout_links\";\nimport { createCheckoutsService } from \"./services/checkouts\";\nimport { createCustomFieldsService } from \"./services/custom_fields\";\nimport { createCustomerMetersService } from \"./services/customer_meters\";\nimport { createCustomerPortalService } from \"./services/customer_portal\";\nimport { createCustomerSeatsService } from \"./services/customer_seats\";\nimport { createCustomerSessionsService } from \"./services/customer_sessions\";\nimport { createCustomersService } from \"./services/customers\";\nimport { createDiscountsService } from \"./services/discounts\";\nimport { createDisputesService } from \"./services/disputes\";\nimport { createEventTypesService } from \"./services/event_types\";\nimport { createEventsService } from \"./services/events\";\nimport { createFilesService } from \"./services/files\";\nimport { createLicenseKeysService } from \"./services/license_keys\";\nimport { createMembersService } from \"./services/members\";\nimport { createMetersService } from \"./services/meters\";\nimport { createMetricsService } from \"./services/metrics\";\nimport { createOauth2Service } from \"./services/oauth2\";\nimport { createOrdersService } from \"./services/orders\";\nimport { createOrganizationsService } from \"./services/organizations\";\nimport { createPaymentsService } from \"./services/payments\";\nimport { createProductsService } from \"./services/products\";\nimport { createRefundsService } from \"./services/refunds\";\nimport { createSubscriptionsService } from \"./services/subscriptions\";\nimport { createWebhooksService } from \"./services/webhooks\";\n\nexport type Environment = \"production\" | \"sandbox\";\n\nconst SERVERS: Record<Environment, string> = {\n production: \"https://api.polar.sh\",\n sandbox: \"https://sandbox-api.polar.sh\",\n};\n\nexport interface PolarOptions extends Omit<ClientOptions, \"baseUrl\" | \"version\"> {\n version?: string;\n environment?: Environment;\n baseUrl?: string;\n}\n\nexport function createPolarCore(options: PolarOptions) {\n return new ClientBase({\n ...options,\n baseUrl: resolveBaseUrl(SERVERS, options.environment ?? \"production\", options.baseUrl),\n version: options.version ?? \"2026-04\",\n });\n}\n\nexport type PolarCore = ReturnType<typeof createPolarCore>;\n\nexport function createPolar(options: PolarOptions) {\n const client = createPolarCore(options);\n\n return {\n organizations: createOrganizationsService(client),\n subscriptions: createSubscriptionsService(client),\n oauth2: createOauth2Service(client),\n benefits: createBenefitsService(client),\n benefitGrants: createBenefitGrantsService(client),\n webhooks: createWebhooksService(client),\n products: createProductsService(client),\n orders: createOrdersService(client),\n refunds: createRefundsService(client),\n disputes: createDisputesService(client),\n checkouts: createCheckoutsService(client),\n files: createFilesService(client),\n metrics: createMetricsService(client),\n licenseKeys: createLicenseKeysService(client),\n checkoutLinks: createCheckoutLinksService(client),\n customFields: createCustomFieldsService(client),\n discounts: createDiscountsService(client),\n customers: createCustomersService(client),\n members: createMembersService(client),\n customerPortal: createCustomerPortalService(client),\n customerSeats: createCustomerSeatsService(client),\n customerSessions: createCustomerSessionsService(client),\n events: createEventsService(client),\n eventTypes: createEventTypesService(client),\n meters: createMetersService(client),\n customerMeters: createCustomerMetersService(client),\n payments: createPaymentsService(client),\n };\n}\n\nexport type Polar = ReturnType<typeof createPolar>;\n","/**\n * AggregationFunction\n */\nexport type AggregationFunction = \"count\" | \"sum\" | \"max\" | \"min\" | \"avg\" | \"unique\";\n/**\n * BenefitGrantSortProperty\n */\nexport type BenefitGrantSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"granted_at\"\n | \"-granted_at\"\n | \"revoked_at\"\n | \"-revoked_at\";\n/**\n * BenefitSortProperty\n */\nexport type BenefitSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"description\"\n | \"-description\"\n | \"type\"\n | \"-type\"\n | \"user_order\"\n | \"-user_order\";\n/**\n * BenefitType\n */\nexport type BenefitType =\n | \"custom\"\n | \"discord\"\n | \"github_repository\"\n | \"downloadables\"\n | \"license_keys\"\n | \"meter_credit\"\n | \"feature_flag\"\n | \"slack_shared_channel\";\n/**\n * BenefitVisibility\n */\nexport type BenefitVisibility = \"draft\" | \"private\" | \"public\";\n/**\n * BillingAddressFieldMode\n */\nexport type BillingAddressFieldMode = \"required\" | \"optional\" | \"disabled\";\n/**\n * CheckoutLinkSortProperty\n */\nexport type CheckoutLinkSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"label\"\n | \"-label\"\n | \"success_url\"\n | \"-success_url\"\n | \"allow_discount_codes\"\n | \"-allow_discount_codes\";\n/**\n * CheckoutSortProperty\n */\nexport type CheckoutSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"expires_at\"\n | \"-expires_at\"\n | \"status\"\n | \"-status\";\n/**\n * CheckoutStatus\n */\nexport type CheckoutStatus = \"open\" | \"expired\" | \"confirmed\" | \"succeeded\" | \"failed\";\n/**\n * CountryAlpha2\n */\nexport type CountryAlpha2 =\n | \"AD\"\n | \"AE\"\n | \"AF\"\n | \"AG\"\n | \"AI\"\n | \"AL\"\n | \"AM\"\n | \"AO\"\n | \"AQ\"\n | \"AR\"\n | \"AS\"\n | \"AT\"\n | \"AU\"\n | \"AW\"\n | \"AX\"\n | \"AZ\"\n | \"BA\"\n | \"BB\"\n | \"BD\"\n | \"BE\"\n | \"BF\"\n | \"BG\"\n | \"BH\"\n | \"BI\"\n | \"BJ\"\n | \"BL\"\n | \"BM\"\n | \"BN\"\n | \"BO\"\n | \"BQ\"\n | \"BR\"\n | \"BS\"\n | \"BT\"\n | \"BV\"\n | \"BW\"\n | \"BY\"\n | \"BZ\"\n | \"CA\"\n | \"CC\"\n | \"CD\"\n | \"CF\"\n | \"CG\"\n | \"CH\"\n | \"CI\"\n | \"CK\"\n | \"CL\"\n | \"CM\"\n | \"CN\"\n | \"CO\"\n | \"CR\"\n | \"CU\"\n | \"CV\"\n | \"CW\"\n | \"CX\"\n | \"CY\"\n | \"CZ\"\n | \"DE\"\n | \"DJ\"\n | \"DK\"\n | \"DM\"\n | \"DO\"\n | \"DZ\"\n | \"EC\"\n | \"EE\"\n | \"EG\"\n | \"EH\"\n | \"ER\"\n | \"ES\"\n | \"ET\"\n | \"FI\"\n | \"FJ\"\n | \"FK\"\n | \"FM\"\n | \"FO\"\n | \"FR\"\n | \"GA\"\n | \"GB\"\n | \"GD\"\n | \"GE\"\n | \"GF\"\n | \"GG\"\n | \"GH\"\n | \"GI\"\n | \"GL\"\n | \"GM\"\n | \"GN\"\n | \"GP\"\n | \"GQ\"\n | \"GR\"\n | \"GS\"\n | \"GT\"\n | \"GU\"\n | \"GW\"\n | \"GY\"\n | \"HK\"\n | \"HM\"\n | \"HN\"\n | \"HR\"\n | \"HT\"\n | \"HU\"\n | \"ID\"\n | \"IE\"\n | \"IL\"\n | \"IM\"\n | \"IN\"\n | \"IO\"\n | \"IQ\"\n | \"IR\"\n | \"IS\"\n | \"IT\"\n | \"JE\"\n | \"JM\"\n | \"JO\"\n | \"JP\"\n | \"KE\"\n | \"KG\"\n | \"KH\"\n | \"KI\"\n | \"KM\"\n | \"KN\"\n | \"KP\"\n | \"KR\"\n | \"KW\"\n | \"KY\"\n | \"KZ\"\n | \"LA\"\n | \"LB\"\n | \"LC\"\n | \"LI\"\n | \"LK\"\n | \"LR\"\n | \"LS\"\n | \"LT\"\n | \"LU\"\n | \"LV\"\n | \"LY\"\n | \"MA\"\n | \"MC\"\n | \"MD\"\n | \"ME\"\n | \"MF\"\n | \"MG\"\n | \"MH\"\n | \"MK\"\n | \"ML\"\n | \"MM\"\n | \"MN\"\n | \"MO\"\n | \"MP\"\n | \"MQ\"\n | \"MR\"\n | \"MS\"\n | \"MT\"\n | \"MU\"\n | \"MV\"\n | \"MW\"\n | \"MX\"\n | \"MY\"\n | \"MZ\"\n | \"NA\"\n | \"NC\"\n | \"NE\"\n | \"NF\"\n | \"NG\"\n | \"NI\"\n | \"NL\"\n | \"NO\"\n | \"NP\"\n | \"NR\"\n | \"NU\"\n | \"NZ\"\n | \"OM\"\n | \"PA\"\n | \"PE\"\n | \"PF\"\n | \"PG\"\n | \"PH\"\n | \"PK\"\n | \"PL\"\n | \"PM\"\n | \"PN\"\n | \"PR\"\n | \"PS\"\n | \"PT\"\n | \"PW\"\n | \"PY\"\n | \"QA\"\n | \"RE\"\n | \"RO\"\n | \"RS\"\n | \"RU\"\n | \"RW\"\n | \"SA\"\n | \"SB\"\n | \"SC\"\n | \"SD\"\n | \"SE\"\n | \"SG\"\n | \"SH\"\n | \"SI\"\n | \"SJ\"\n | \"SK\"\n | \"SL\"\n | \"SM\"\n | \"SN\"\n | \"SO\"\n | \"SR\"\n | \"SS\"\n | \"ST\"\n | \"SV\"\n | \"SX\"\n | \"SY\"\n | \"SZ\"\n | \"TC\"\n | \"TD\"\n | \"TF\"\n | \"TG\"\n | \"TH\"\n | \"TJ\"\n | \"TK\"\n | \"TL\"\n | \"TM\"\n | \"TN\"\n | \"TO\"\n | \"TR\"\n | \"TT\"\n | \"TV\"\n | \"TW\"\n | \"TZ\"\n | \"UA\"\n | \"UG\"\n | \"UM\"\n | \"US\"\n | \"UY\"\n | \"UZ\"\n | \"VA\"\n | \"VC\"\n | \"VE\"\n | \"VG\"\n | \"VI\"\n | \"VN\"\n | \"VU\"\n | \"WF\"\n | \"WS\"\n | \"YE\"\n | \"YT\"\n | \"ZA\"\n | \"ZM\"\n | \"ZW\";\n/**\n * CountryAlpha2Input\n */\nexport type CountryAlpha2Input =\n | \"AD\"\n | \"AE\"\n | \"AF\"\n | \"AG\"\n | \"AI\"\n | \"AL\"\n | \"AM\"\n | \"AO\"\n | \"AQ\"\n | \"AR\"\n | \"AS\"\n | \"AT\"\n | \"AU\"\n | \"AW\"\n | \"AX\"\n | \"AZ\"\n | \"BA\"\n | \"BB\"\n | \"BD\"\n | \"BE\"\n | \"BF\"\n | \"BG\"\n | \"BH\"\n | \"BI\"\n | \"BJ\"\n | \"BL\"\n | \"BM\"\n | \"BN\"\n | \"BO\"\n | \"BQ\"\n | \"BR\"\n | \"BS\"\n | \"BT\"\n | \"BV\"\n | \"BW\"\n | \"BY\"\n | \"BZ\"\n | \"CA\"\n | \"CC\"\n | \"CD\"\n | \"CF\"\n | \"CG\"\n | \"CH\"\n | \"CI\"\n | \"CK\"\n | \"CL\"\n | \"CM\"\n | \"CN\"\n | \"CO\"\n | \"CR\"\n | \"CV\"\n | \"CW\"\n | \"CX\"\n | \"CY\"\n | \"CZ\"\n | \"DE\"\n | \"DJ\"\n | \"DK\"\n | \"DM\"\n | \"DO\"\n | \"DZ\"\n | \"EC\"\n | \"EE\"\n | \"EG\"\n | \"EH\"\n | \"ER\"\n | \"ES\"\n | \"ET\"\n | \"FI\"\n | \"FJ\"\n | \"FK\"\n | \"FM\"\n | \"FO\"\n | \"FR\"\n | \"GA\"\n | \"GB\"\n | \"GD\"\n | \"GE\"\n | \"GF\"\n | \"GG\"\n | \"GH\"\n | \"GI\"\n | \"GL\"\n | \"GM\"\n | \"GN\"\n | \"GP\"\n | \"GQ\"\n | \"GR\"\n | \"GS\"\n | \"GT\"\n | \"GU\"\n | \"GW\"\n | \"GY\"\n | \"HK\"\n | \"HM\"\n | \"HN\"\n | \"HR\"\n | \"HT\"\n | \"HU\"\n | \"ID\"\n | \"IE\"\n | \"IL\"\n | \"IM\"\n | \"IN\"\n | \"IO\"\n | \"IQ\"\n | \"IS\"\n | \"IT\"\n | \"JE\"\n | \"JM\"\n | \"JO\"\n | \"JP\"\n | \"KE\"\n | \"KG\"\n | \"KH\"\n | \"KI\"\n | \"KM\"\n | \"KN\"\n | \"KR\"\n | \"KW\"\n | \"KY\"\n | \"KZ\"\n | \"LA\"\n | \"LB\"\n | \"LC\"\n | \"LI\"\n | \"LK\"\n | \"LR\"\n | \"LS\"\n | \"LT\"\n | \"LU\"\n | \"LV\"\n | \"LY\"\n | \"MA\"\n | \"MC\"\n | \"MD\"\n | \"ME\"\n | \"MF\"\n | \"MG\"\n | \"MH\"\n | \"MK\"\n | \"ML\"\n | \"MM\"\n | \"MN\"\n | \"MO\"\n | \"MP\"\n | \"MQ\"\n | \"MR\"\n | \"MS\"\n | \"MT\"\n | \"MU\"\n | \"MV\"\n | \"MW\"\n | \"MX\"\n | \"MY\"\n | \"MZ\"\n | \"NA\"\n | \"NC\"\n | \"NE\"\n | \"NF\"\n | \"NG\"\n | \"NI\"\n | \"NL\"\n | \"NO\"\n | \"NP\"\n | \"NR\"\n | \"NU\"\n | \"NZ\"\n | \"OM\"\n | \"PA\"\n | \"PE\"\n | \"PF\"\n | \"PG\"\n | \"PH\"\n | \"PK\"\n | \"PL\"\n | \"PM\"\n | \"PN\"\n | \"PR\"\n | \"PS\"\n | \"PT\"\n | \"PW\"\n | \"PY\"\n | \"QA\"\n | \"RE\"\n | \"RO\"\n | \"RS\"\n | \"RW\"\n | \"SA\"\n | \"SB\"\n | \"SC\"\n | \"SD\"\n | \"SE\"\n | \"SG\"\n | \"SH\"\n | \"SI\"\n | \"SJ\"\n | \"SK\"\n | \"SL\"\n | \"SM\"\n | \"SN\"\n | \"SO\"\n | \"SR\"\n | \"SS\"\n | \"ST\"\n | \"SV\"\n | \"SX\"\n | \"SZ\"\n | \"TC\"\n | \"TD\"\n | \"TF\"\n | \"TG\"\n | \"TH\"\n | \"TJ\"\n | \"TK\"\n | \"TL\"\n | \"TM\"\n | \"TN\"\n | \"TO\"\n | \"TR\"\n | \"TT\"\n | \"TV\"\n | \"TW\"\n | \"TZ\"\n | \"UA\"\n | \"UG\"\n | \"UM\"\n | \"US\"\n | \"UY\"\n | \"UZ\"\n | \"VA\"\n | \"VC\"\n | \"VE\"\n | \"VG\"\n | \"VI\"\n | \"VN\"\n | \"VU\"\n | \"WF\"\n | \"WS\"\n | \"YE\"\n | \"YT\"\n | \"ZA\"\n | \"ZM\"\n | \"ZW\";\n/**\n * CustomFieldSortProperty\n */\nexport type CustomFieldSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"slug\"\n | \"-slug\"\n | \"name\"\n | \"-name\"\n | \"type\"\n | \"-type\";\n/**\n * CustomFieldType\n */\nexport type CustomFieldType = \"text\" | \"number\" | \"date\" | \"checkbox\" | \"select\";\n/**\n * CustomerBenefitGrantSortProperty\n */\nexport type CustomerBenefitGrantSortProperty =\n | \"granted_at\"\n | \"-granted_at\"\n | \"type\"\n | \"-type\"\n | \"organization\"\n | \"-organization\"\n | \"product_benefit\"\n | \"-product_benefit\";\n/**\n * CustomerCancellationReason\n */\nexport type CustomerCancellationReason =\n | \"customer_service\"\n | \"low_quality\"\n | \"missing_features\"\n | \"switched_service\"\n | \"too_complex\"\n | \"too_expensive\"\n | \"unused\"\n | \"other\";\n/**\n * CustomerCustomerMeterSortProperty\n */\nexport type CustomerCustomerMeterSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"modified_at\"\n | \"-modified_at\"\n | \"meter_id\"\n | \"-meter_id\"\n | \"meter_name\"\n | \"-meter_name\"\n | \"consumed_units\"\n | \"-consumed_units\"\n | \"credited_units\"\n | \"-credited_units\"\n | \"balance\"\n | \"-balance\";\n/**\n * CustomerMeterSortProperty\n */\nexport type CustomerMeterSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"modified_at\"\n | \"-modified_at\"\n | \"customer_id\"\n | \"-customer_id\"\n | \"customer_name\"\n | \"-customer_name\"\n | \"meter_id\"\n | \"-meter_id\"\n | \"meter_name\"\n | \"-meter_name\"\n | \"consumed_units\"\n | \"-consumed_units\"\n | \"credited_units\"\n | \"-credited_units\"\n | \"balance\"\n | \"-balance\";\n/**\n * CustomerOrderSortProperty\n */\nexport type CustomerOrderSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"amount\"\n | \"-amount\"\n | \"net_amount\"\n | \"-net_amount\"\n | \"product\"\n | \"-product\"\n | \"subscription\"\n | \"-subscription\";\n/**\n * CustomerSortProperty\n */\nexport type CustomerSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"email\"\n | \"-email\"\n | \"name\"\n | \"-name\";\n/**\n * CustomerSubscriptionSortProperty\n */\nexport type CustomerSubscriptionSortProperty =\n | \"started_at\"\n | \"-started_at\"\n | \"amount\"\n | \"-amount\"\n | \"status\"\n | \"-status\"\n | \"organization\"\n | \"-organization\"\n | \"product\"\n | \"-product\";\n/**\n * CustomerType\n */\nexport type CustomerType = \"individual\" | \"team\";\n/**\n * CustomerWalletSortProperty\n */\nexport type CustomerWalletSortProperty = \"created_at\" | \"-created_at\" | \"balance\" | \"-balance\";\n/**\n * DiscountDuration\n */\nexport type DiscountDuration = \"once\" | \"forever\" | \"repeating\";\n/**\n * DiscountSortProperty\n */\nexport type DiscountSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"name\"\n | \"-name\"\n | \"code\"\n | \"-code\"\n | \"redemptions_count\"\n | \"-redemptions_count\"\n | \"ends_at\"\n | \"-ends_at\";\n/**\n * DiscountType\n */\nexport type DiscountType = \"fixed\" | \"percentage\";\n/**\n * DisputeSortProperty\n */\nexport type DisputeSortProperty = \"created_at\" | \"-created_at\" | \"amount\" | \"-amount\";\n/**\n * DisputeStatus\n */\nexport type DisputeStatus =\n | \"prevented\"\n | \"early_warning\"\n | \"needs_response\"\n | \"under_review\"\n | \"lost\"\n | \"won\";\n/**\n * EventNamesSortProperty\n */\nexport type EventNamesSortProperty =\n | \"name\"\n | \"-name\"\n | \"occurrences\"\n | \"-occurrences\"\n | \"first_seen\"\n | \"-first_seen\"\n | \"last_seen\"\n | \"-last_seen\";\n/**\n * EventSortProperty\n */\nexport type EventSortProperty = \"timestamp\" | \"-timestamp\";\n/**\n * EventSource\n */\nexport type EventSource = \"system\" | \"user\";\n/**\n * EventTypesSortProperty\n */\nexport type EventTypesSortProperty =\n | \"name\"\n | \"-name\"\n | \"label\"\n | \"-label\"\n | \"occurrences\"\n | \"-occurrences\"\n | \"first_seen\"\n | \"-first_seen\"\n | \"last_seen\"\n | \"-last_seen\";\n/**\n * FileServiceTypes\n */\nexport type FileServiceTypes =\n | \"downloadable\"\n | \"product_media\"\n | \"organization_avatar\"\n | \"support_case_attachment\";\n/**\n * FilterConjunction\n */\nexport type FilterConjunction = \"and\" | \"or\";\n/**\n * FilterOperator\n */\nexport type FilterOperator = \"eq\" | \"ne\" | \"gt\" | \"gte\" | \"lt\" | \"lte\" | \"like\" | \"not_like\";\n/**\n * Func\n */\nexport type Func = \"sum\" | \"max\" | \"min\" | \"avg\";\n/**\n * LicenseKeyStatus\n */\nexport type LicenseKeyStatus = \"granted\" | \"revoked\" | \"disabled\";\n/**\n * MemberRole\n */\nexport type MemberRole = \"owner\" | \"billing_manager\" | \"member\";\n/**\n * MemberSortProperty\n */\nexport type MemberSortProperty = \"created_at\" | \"-created_at\";\n/**\n * MeterSortProperty\n */\nexport type MeterSortProperty = \"created_at\" | \"-created_at\" | \"name\" | \"-name\";\n/**\n * MeterUnit\n */\nexport type MeterUnit = \"scalar\" | \"token\" | \"custom\";\n/**\n * MetricType\n */\nexport type MetricType = \"scalar\" | \"currency\" | \"currency_sub_cent\" | \"percentage\";\n/**\n * OrderBillingReason\n */\nexport type OrderBillingReason =\n | \"purchase\"\n | \"subscription_create\"\n | \"subscription_cycle\"\n | \"subscription_update\";\n/**\n * OrderSortProperty\n */\nexport type OrderSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"status\"\n | \"-status\"\n | \"invoice_number\"\n | \"-invoice_number\"\n | \"amount\"\n | \"-amount\"\n | \"net_amount\"\n | \"-net_amount\"\n | \"customer\"\n | \"-customer\"\n | \"product\"\n | \"-product\"\n | \"discount\"\n | \"-discount\"\n | \"subscription\"\n | \"-subscription\";\n/**\n * OrderStatus\n */\nexport type OrderStatus = \"draft\" | \"pending\" | \"paid\" | \"refunded\" | \"partially_refunded\" | \"void\";\n/**\n * OrganizationSocialPlatforms\n */\nexport type OrganizationSocialPlatforms =\n | \"x\"\n | \"github\"\n | \"facebook\"\n | \"instagram\"\n | \"youtube\"\n | \"tiktok\"\n | \"linkedin\"\n | \"threads\"\n | \"discord\"\n | \"other\";\n/**\n * OrganizationSortProperty\n */\nexport type OrganizationSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"slug\"\n | \"-slug\"\n | \"name\"\n | \"-name\"\n | \"next_review_threshold\"\n | \"-next_review_threshold\"\n | \"days_in_status\"\n | \"-days_in_status\";\n/**\n * OrganizationStatus\n */\nexport type OrganizationStatus =\n | \"created\"\n | \"review\"\n | \"snoozed\"\n | \"denied\"\n | \"active\"\n | \"blocked\"\n | \"offboarding\"\n | \"offboarded\";\n/**\n * PaymentProcessor\n */\nexport type PaymentProcessor = \"stripe\";\n/**\n * PaymentSortProperty\n */\nexport type PaymentSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"status\"\n | \"-status\"\n | \"amount\"\n | \"-amount\"\n | \"method\"\n | \"-method\";\n/**\n * PaymentStatus\n */\nexport type PaymentStatus = \"pending\" | \"succeeded\" | \"failed\";\n/**\n * PaymentTrigger\n */\nexport type PaymentTrigger =\n | \"purchase\"\n | \"subscription_cycle\"\n | \"retry_dunning\"\n | \"retry_customer\"\n | \"retry_payment_method_update\"\n | \"retry_admin\";\n/**\n * The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).\n */\nexport type Permission = \"pull\" | \"triage\" | \"push\" | \"maintain\" | \"admin\";\n/**\n * PresentmentCurrency\n */\nexport type PresentmentCurrency =\n | \"aed\"\n | \"all\"\n | \"amd\"\n | \"aoa\"\n | \"ars\"\n | \"aud\"\n | \"awg\"\n | \"azn\"\n | \"bam\"\n | \"bbd\"\n | \"bdt\"\n | \"bif\"\n | \"bmd\"\n | \"bnd\"\n | \"bob\"\n | \"brl\"\n | \"bsd\"\n | \"bwp\"\n | \"bzd\"\n | \"cad\"\n | \"cdf\"\n | \"chf\"\n | \"clp\"\n | \"cny\"\n | \"cop\"\n | \"crc\"\n | \"cve\"\n | \"czk\"\n | \"djf\"\n | \"dkk\"\n | \"dop\"\n | \"dzd\"\n | \"egp\"\n | \"etb\"\n | \"eur\"\n | \"fjd\"\n | \"fkp\"\n | \"gbp\"\n | \"gel\"\n | \"gip\"\n | \"gmd\"\n | \"gnf\"\n | \"gtq\"\n | \"gyd\"\n | \"hkd\"\n | \"hnl\"\n | \"htg\"\n | \"huf\"\n | \"idr\"\n | \"ils\"\n | \"inr\"\n | \"isk\"\n | \"jmd\"\n | \"jpy\"\n | \"kes\"\n | \"kgs\"\n | \"khr\"\n | \"kmf\"\n | \"krw\"\n | \"kyd\"\n | \"kzt\"\n | \"lak\"\n | \"lkr\"\n | \"lrd\"\n | \"lsl\"\n | \"mad\"\n | \"mdl\"\n | \"mga\"\n | \"mkd\"\n | \"mnt\"\n | \"mop\"\n | \"mur\"\n | \"mvr\"\n | \"mwk\"\n | \"mxn\"\n | \"myr\"\n | \"mzn\"\n | \"nad\"\n | \"ngn\"\n | \"nio\"\n | \"nok\"\n | \"npr\"\n | \"nzd\"\n | \"pab\"\n | \"pen\"\n | \"pgk\"\n | \"php\"\n | \"pkr\"\n | \"pln\"\n | \"pyg\"\n | \"qar\"\n | \"ron\"\n | \"rsd\"\n | \"rwf\"\n | \"sar\"\n | \"sbd\"\n | \"scr\"\n | \"sek\"\n | \"sgd\"\n | \"shp\"\n | \"sos\"\n | \"srd\"\n | \"szl\"\n | \"thb\"\n | \"tjs\"\n | \"top\"\n | \"try\"\n | \"ttd\"\n | \"twd\"\n | \"tzs\"\n | \"uah\"\n | \"ugx\"\n | \"usd\"\n | \"uyu\"\n | \"uzs\"\n | \"vnd\"\n | \"vuv\"\n | \"wst\"\n | \"xaf\"\n | \"xcd\"\n | \"xcg\"\n | \"xof\"\n | \"xpf\"\n | \"yer\"\n | \"zar\"\n | \"zmw\";\n/**\n * ProductBillingType\n */\nexport type ProductBillingType = \"one_time\" | \"recurring\";\n/**\n * ProductPriceSource\n */\nexport type ProductPriceSource = \"catalog\" | \"ad_hoc\";\n/**\n * ProductSortProperty\n */\nexport type ProductSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"name\"\n | \"-name\"\n | \"price_amount_type\"\n | \"-price_amount_type\"\n | \"price_amount\"\n | \"-price_amount\";\n/**\n * ProductVisibility\n */\nexport type ProductVisibility = \"draft\" | \"private\" | \"public\";\n/**\n * PublicSubscriptionProrationBehavior\n */\nexport type PublicSubscriptionProrationBehavior = \"invoice\" | \"prorate\" | \"next_period\";\n/**\n * Reason for the refund.\n */\nexport type Reason =\n | \"duplicate\"\n | \"fraudulent\"\n | \"customer_request\"\n | \"service_disruption\"\n | \"satisfaction_guarantee\"\n | \"other\";\n/**\n * RecurringInterval\n */\nexport type RecurringInterval = \"day\" | \"week\" | \"month\" | \"year\";\n/**\n * RefundReason\n */\nexport type RefundReason =\n | \"duplicate\"\n | \"fraudulent\"\n | \"customer_request\"\n | \"service_disruption\"\n | \"satisfaction_guarantee\"\n | \"dispute_prevention\"\n | \"other\";\n/**\n * RefundSortProperty\n */\nexport type RefundSortProperty = \"created_at\" | \"-created_at\" | \"amount\" | \"-amount\";\n/**\n * RefundStatus\n */\nexport type RefundStatus = \"pending\" | \"succeeded\" | \"failed\" | \"canceled\";\n/**\n * The role of the member within the customer. To assign or transfer ownership, use the member update endpoint.\n */\nexport type Role = \"member\" | \"billing_manager\";\n/**\n * Scope\n */\nexport type Scope =\n | \"openid\"\n | \"profile\"\n | \"email\"\n | \"user:read\"\n | \"user:write\"\n | \"organizations:read\"\n | \"organizations:write\"\n | \"custom_fields:read\"\n | \"custom_fields:write\"\n | \"discounts:read\"\n | \"discounts:write\"\n | \"checkout_links:read\"\n | \"checkout_links:write\"\n | \"checkouts:read\"\n | \"checkouts:write\"\n | \"transactions:read\"\n | \"transactions:write\"\n | \"payouts:read\"\n | \"payouts:write\"\n | \"products:read\"\n | \"products:write\"\n | \"benefits:read\"\n | \"benefits:write\"\n | \"events:read\"\n | \"events:write\"\n | \"meters:read\"\n | \"meters:write\"\n | \"files:read\"\n | \"files:write\"\n | \"subscriptions:read\"\n | \"subscriptions:write\"\n | \"customers:read\"\n | \"customers:write\"\n | \"members:read\"\n | \"members:write\"\n | \"wallets:read\"\n | \"wallets:write\"\n | \"disputes:read\"\n | \"disputes:write\"\n | \"customer_meters:read\"\n | \"customer_sessions:write\"\n | \"member_sessions:write\"\n | \"customer_seats:read\"\n | \"customer_seats:write\"\n | \"orders:read\"\n | \"orders:write\"\n | \"refunds:read\"\n | \"refunds:write\"\n | \"payments:read\"\n | \"metrics:read\"\n | \"metrics:write\"\n | \"webhooks:read\"\n | \"webhooks:write\"\n | \"license_keys:read\"\n | \"license_keys:write\"\n | \"customer_portal:read\"\n | \"customer_portal:write\"\n | \"notifications:read\"\n | \"notifications:write\"\n | \"notification_recipients:read\"\n | \"notification_recipients:write\"\n | \"organization_access_tokens:read\"\n | \"organization_access_tokens:write\";\n/**\n * SeatStatus\n */\nexport type SeatStatus = \"pending\" | \"claimed\" | \"revoked\";\n/**\n * SeatTierType\n */\nexport type SeatTierType = \"volume\" | \"graduated\";\n/**\n * Status\n */\nexport type Status = \"active\" | \"trialing\";\n/**\n * SubType\n */\nexport type SubType = \"user\" | \"organization\";\n/**\n * SubscriptionProrationBehavior\n */\nexport type SubscriptionProrationBehavior = \"invoice\" | \"prorate\" | \"next_period\" | \"reset\";\n/**\n * SubscriptionSortProperty\n */\nexport type SubscriptionSortProperty =\n | \"customer\"\n | \"-customer\"\n | \"status\"\n | \"-status\"\n | \"started_at\"\n | \"-started_at\"\n | \"current_period_end\"\n | \"-current_period_end\"\n | \"ended_at\"\n | \"-ended_at\"\n | \"ends_at\"\n | \"-ends_at\"\n | \"amount\"\n | \"-amount\"\n | \"product\"\n | \"-product\"\n | \"discount\"\n | \"-discount\";\n/**\n * SubscriptionStatus\n */\nexport type SubscriptionStatus =\n | \"incomplete\"\n | \"incomplete_expired\"\n | \"trialing\"\n | \"active\"\n | \"past_due\"\n | \"canceled\"\n | \"unpaid\"\n | \"paused\";\n/**\n * TaxBehavior\n */\nexport type TaxBehavior = \"inclusive\" | \"exclusive\";\n/**\n * TaxBehaviorOption\n */\nexport type TaxBehaviorOption = \"location\" | \"inclusive\" | \"exclusive\";\n/**\n * TimeInterval\n */\nexport type TimeInterval = \"year\" | \"month\" | \"week\" | \"day\" | \"hour\";\n/**\n * Timeframe\n */\nexport type Timeframe = \"year\" | \"month\" | \"day\";\n/**\n * Timezone to use for the timestamps. Default is UTC.\n */\nexport type Timezone =\n | \"Africa/Abidjan\"\n | \"Africa/Accra\"\n | \"Africa/Addis_Ababa\"\n | \"Africa/Algiers\"\n | \"Africa/Asmara\"\n | \"Africa/Asmera\"\n | \"Africa/Bamako\"\n | \"Africa/Bangui\"\n | \"Africa/Banjul\"\n | \"Africa/Bissau\"\n | \"Africa/Blantyre\"\n | \"Africa/Brazzaville\"\n | \"Africa/Bujumbura\"\n | \"Africa/Cairo\"\n | \"Africa/Casablanca\"\n | \"Africa/Ceuta\"\n | \"Africa/Conakry\"\n | \"Africa/Dakar\"\n | \"Africa/Dar_es_Salaam\"\n | \"Africa/Djibouti\"\n | \"Africa/Douala\"\n | \"Africa/El_Aaiun\"\n | \"Africa/Freetown\"\n | \"Africa/Gaborone\"\n | \"Africa/Harare\"\n | \"Africa/Johannesburg\"\n | \"Africa/Juba\"\n | \"Africa/Kampala\"\n | \"Africa/Khartoum\"\n | \"Africa/Kigali\"\n | \"Africa/Kinshasa\"\n | \"Africa/Lagos\"\n | \"Africa/Libreville\"\n | \"Africa/Lome\"\n | \"Africa/Luanda\"\n | \"Africa/Lubumbashi\"\n | \"Africa/Lusaka\"\n | \"Africa/Malabo\"\n | \"Africa/Maputo\"\n | \"Africa/Maseru\"\n | \"Africa/Mbabane\"\n | \"Africa/Mogadishu\"\n | \"Africa/Monrovia\"\n | \"Africa/Nairobi\"\n | \"Africa/Ndjamena\"\n | \"Africa/Niamey\"\n | \"Africa/Nouakchott\"\n | \"Africa/Ouagadougou\"\n | \"Africa/Porto-Novo\"\n | \"Africa/Sao_Tome\"\n | \"Africa/Timbuktu\"\n | \"Africa/Tripoli\"\n | \"Africa/Tunis\"\n | \"Africa/Windhoek\"\n | \"America/Adak\"\n | \"America/Anchorage\"\n | \"America/Anguilla\"\n | \"America/Antigua\"\n | \"America/Araguaina\"\n | \"America/Argentina/Buenos_Aires\"\n | \"America/Argentina/Catamarca\"\n | \"America/Argentina/ComodRivadavia\"\n | \"America/Argentina/Cordoba\"\n | \"America/Argentina/Jujuy\"\n | \"America/Argentina/La_Rioja\"\n | \"America/Argentina/Mendoza\"\n | \"America/Argentina/Rio_Gallegos\"\n | \"America/Argentina/Salta\"\n | \"America/Argentina/San_Juan\"\n | \"America/Argentina/San_Luis\"\n | \"America/Argentina/Tucuman\"\n | \"America/Argentina/Ushuaia\"\n | \"America/Aruba\"\n | \"America/Asuncion\"\n | \"America/Atikokan\"\n | \"America/Atka\"\n | \"America/Bahia\"\n | \"America/Bahia_Banderas\"\n | \"America/Barbados\"\n | \"America/Belem\"\n | \"America/Belize\"\n | \"America/Blanc-Sablon\"\n | \"America/Boa_Vista\"\n | \"America/Bogota\"\n | \"America/Boise\"\n | \"America/Buenos_Aires\"\n | \"America/Cambridge_Bay\"\n | \"America/Campo_Grande\"\n | \"America/Cancun\"\n | \"America/Caracas\"\n | \"America/Catamarca\"\n | \"America/Cayenne\"\n | \"America/Cayman\"\n | \"America/Chicago\"\n | \"America/Chihuahua\"\n | \"America/Ciudad_Juarez\"\n | \"America/Coral_Harbour\"\n | \"America/Cordoba\"\n | \"America/Costa_Rica\"\n | \"America/Coyhaique\"\n | \"America/Creston\"\n | \"America/Cuiaba\"\n | \"America/Curacao\"\n | \"America/Danmarkshavn\"\n | \"America/Dawson\"\n | \"America/Dawson_Creek\"\n | \"America/Denver\"\n | \"America/Detroit\"\n | \"America/Dominica\"\n | \"America/Edmonton\"\n | \"America/Eirunepe\"\n | \"America/El_Salvador\"\n | \"America/Ensenada\"\n | \"America/Fort_Nelson\"\n | \"America/Fort_Wayne\"\n | \"America/Fortaleza\"\n | \"America/Glace_Bay\"\n | \"America/Godthab\"\n | \"America/Goose_Bay\"\n | \"America/Grand_Turk\"\n | \"America/Grenada\"\n | \"America/Guadeloupe\"\n | \"America/Guatemala\"\n | \"America/Guayaquil\"\n | \"America/Guyana\"\n | \"America/Halifax\"\n | \"America/Havana\"\n | \"America/Hermosillo\"\n | \"America/Indiana/Indianapolis\"\n | \"America/Indiana/Knox\"\n | \"America/Indiana/Marengo\"\n | \"America/Indiana/Petersburg\"\n | \"America/Indiana/Tell_City\"\n | \"America/Indiana/Vevay\"\n | \"America/Indiana/Vincennes\"\n | \"America/Indiana/Winamac\"\n | \"America/Indianapolis\"\n | \"America/Inuvik\"\n | \"America/Iqaluit\"\n | \"America/Jamaica\"\n | \"America/Jujuy\"\n | \"America/Juneau\"\n | \"America/Kentucky/Louisville\"\n | \"America/Kentucky/Monticello\"\n | \"America/Knox_IN\"\n | \"America/Kralendijk\"\n | \"America/La_Paz\"\n | \"America/Lima\"\n | \"America/Los_Angeles\"\n | \"America/Louisville\"\n | \"America/Lower_Princes\"\n | \"America/Maceio\"\n | \"America/Managua\"\n | \"America/Manaus\"\n | \"America/Marigot\"\n | \"America/Martinique\"\n | \"America/Matamoros\"\n | \"America/Mazatlan\"\n | \"America/Mendoza\"\n | \"America/Menominee\"\n | \"America/Merida\"\n | \"America/Metlakatla\"\n | \"America/Mexico_City\"\n | \"America/Miquelon\"\n | \"America/Moncton\"\n | \"America/Monterrey\"\n | \"America/Montevideo\"\n | \"America/Montreal\"\n | \"America/Montserrat\"\n | \"America/Nassau\"\n | \"America/New_York\"\n | \"America/Nipigon\"\n | \"America/Nome\"\n | \"America/Noronha\"\n | \"America/North_Dakota/Beulah\"\n | \"America/North_Dakota/Center\"\n | \"America/North_Dakota/New_Salem\"\n | \"America/Nuuk\"\n | \"America/Ojinaga\"\n | \"America/Panama\"\n | \"America/Pangnirtung\"\n | \"America/Paramaribo\"\n | \"America/Phoenix\"\n | \"America/Port-au-Prince\"\n | \"America/Port_of_Spain\"\n | \"America/Porto_Acre\"\n | \"America/Porto_Velho\"\n | \"America/Puerto_Rico\"\n | \"America/Punta_Arenas\"\n | \"America/Rainy_River\"\n | \"America/Rankin_Inlet\"\n | \"America/Recife\"\n | \"America/Regina\"\n | \"America/Resolute\"\n | \"America/Rio_Branco\"\n | \"America/Rosario\"\n | \"America/Santa_Isabel\"\n | \"America/Santarem\"\n | \"America/Santiago\"\n | \"America/Santo_Domingo\"\n | \"America/Sao_Paulo\"\n | \"America/Scoresbysund\"\n | \"America/Shiprock\"\n | \"America/Sitka\"\n | \"America/St_Barthelemy\"\n | \"America/St_Johns\"\n | \"America/St_Kitts\"\n | \"America/St_Lucia\"\n | \"America/St_Thomas\"\n | \"America/St_Vincent\"\n | \"America/Swift_Current\"\n | \"America/Tegucigalpa\"\n | \"America/Thule\"\n | \"America/Thunder_Bay\"\n | \"America/Tijuana\"\n | \"America/Toronto\"\n | \"America/Tortola\"\n | \"America/Vancouver\"\n | \"America/Virgin\"\n | \"America/Whitehorse\"\n | \"America/Winnipeg\"\n | \"America/Yakutat\"\n | \"America/Yellowknife\"\n | \"Antarctica/Casey\"\n | \"Antarctica/Davis\"\n | \"Antarctica/DumontDUrville\"\n | \"Antarctica/Macquarie\"\n | \"Antarctica/Mawson\"\n | \"Antarctica/McMurdo\"\n | \"Antarctica/Palmer\"\n | \"Antarctica/Rothera\"\n | \"Antarctica/South_Pole\"\n | \"Antarctica/Syowa\"\n | \"Antarctica/Troll\"\n | \"Antarctica/Vostok\"\n | \"Arctic/Longyearbyen\"\n | \"Asia/Aden\"\n | \"Asia/Almaty\"\n | \"Asia/Amman\"\n | \"Asia/Anadyr\"\n | \"Asia/Aqtau\"\n | \"Asia/Aqtobe\"\n | \"Asia/Ashgabat\"\n | \"Asia/Ashkhabad\"\n | \"Asia/Atyrau\"\n | \"Asia/Baghdad\"\n | \"Asia/Bahrain\"\n | \"Asia/Baku\"\n | \"Asia/Bangkok\"\n | \"Asia/Barnaul\"\n | \"Asia/Beirut\"\n | \"Asia/Bishkek\"\n | \"Asia/Brunei\"\n | \"Asia/Calcutta\"\n | \"Asia/Chita\"\n | \"Asia/Choibalsan\"\n | \"Asia/Chongqing\"\n | \"Asia/Chungking\"\n | \"Asia/Colombo\"\n | \"Asia/Dacca\"\n | \"Asia/Damascus\"\n | \"Asia/Dhaka\"\n | \"Asia/Dili\"\n | \"Asia/Dubai\"\n | \"Asia/Dushanbe\"\n | \"Asia/Famagusta\"\n | \"Asia/Gaza\"\n | \"Asia/Harbin\"\n | \"Asia/Hebron\"\n | \"Asia/Ho_Chi_Minh\"\n | \"Asia/Hong_Kong\"\n | \"Asia/Hovd\"\n | \"Asia/Irkutsk\"\n | \"Asia/Istanbul\"\n | \"Asia/Jakarta\"\n | \"Asia/Jayapura\"\n | \"Asia/Jerusalem\"\n | \"Asia/Kabul\"\n | \"Asia/Kamchatka\"\n | \"Asia/Karachi\"\n | \"Asia/Kashgar\"\n | \"Asia/Kathmandu\"\n | \"Asia/Katmandu\"\n | \"Asia/Khandyga\"\n | \"Asia/Kolkata\"\n | \"Asia/Krasnoyarsk\"\n | \"Asia/Kuala_Lumpur\"\n | \"Asia/Kuching\"\n | \"Asia/Kuwait\"\n | \"Asia/Macao\"\n | \"Asia/Macau\"\n | \"Asia/Magadan\"\n | \"Asia/Makassar\"\n | \"Asia/Manila\"\n | \"Asia/Muscat\"\n | \"Asia/Nicosia\"\n | \"Asia/Novokuznetsk\"\n | \"Asia/Novosibirsk\"\n | \"Asia/Omsk\"\n | \"Asia/Oral\"\n | \"Asia/Phnom_Penh\"\n | \"Asia/Pontianak\"\n | \"Asia/Pyongyang\"\n | \"Asia/Qatar\"\n | \"Asia/Qostanay\"\n | \"Asia/Qyzylorda\"\n | \"Asia/Rangoon\"\n | \"Asia/Riyadh\"\n | \"Asia/Saigon\"\n | \"Asia/Sakhalin\"\n | \"Asia/Samarkand\"\n | \"Asia/Seoul\"\n | \"Asia/Shanghai\"\n | \"Asia/Singapore\"\n | \"Asia/Srednekolymsk\"\n | \"Asia/Taipei\"\n | \"Asia/Tashkent\"\n | \"Asia/Tbilisi\"\n | \"Asia/Tehran\"\n | \"Asia/Tel_Aviv\"\n | \"Asia/Thimbu\"\n | \"Asia/Thimphu\"\n | \"Asia/Tokyo\"\n | \"Asia/Tomsk\"\n | \"Asia/Ujung_Pandang\"\n | \"Asia/Ulaanbaatar\"\n | \"Asia/Ulan_Bator\"\n | \"Asia/Urumqi\"\n | \"Asia/Ust-Nera\"\n | \"Asia/Vientiane\"\n | \"Asia/Vladivostok\"\n | \"Asia/Yakutsk\"\n | \"Asia/Yangon\"\n | \"Asia/Yekaterinburg\"\n | \"Asia/Yerevan\"\n | \"Atlantic/Azores\"\n | \"Atlantic/Bermuda\"\n | \"Atlantic/Canary\"\n | \"Atlantic/Cape_Verde\"\n | \"Atlantic/Faeroe\"\n | \"Atlantic/Faroe\"\n | \"Atlantic/Jan_Mayen\"\n | \"Atlantic/Madeira\"\n | \"Atlantic/Reykjavik\"\n | \"Atlantic/South_Georgia\"\n | \"Atlantic/St_Helena\"\n | \"Atlantic/Stanley\"\n | \"Australia/ACT\"\n | \"Australia/Adelaide\"\n | \"Australia/Brisbane\"\n | \"Australia/Broken_Hill\"\n | \"Australia/Canberra\"\n | \"Australia/Currie\"\n | \"Australia/Darwin\"\n | \"Australia/Eucla\"\n | \"Australia/Hobart\"\n | \"Australia/LHI\"\n | \"Australia/Lindeman\"\n | \"Australia/Lord_Howe\"\n | \"Australia/Melbourne\"\n | \"Australia/NSW\"\n | \"Australia/North\"\n | \"Australia/Perth\"\n | \"Australia/Queensland\"\n | \"Australia/South\"\n | \"Australia/Sydney\"\n | \"Australia/Tasmania\"\n | \"Australia/Victoria\"\n | \"Australia/West\"\n | \"Australia/Yancowinna\"\n | \"Brazil/Acre\"\n | \"Brazil/DeNoronha\"\n | \"Brazil/East\"\n | \"Brazil/West\"\n | \"CET\"\n | \"CST6CDT\"\n | \"Canada/Atlantic\"\n | \"Canada/Central\"\n | \"Canada/Eastern\"\n | \"Canada/Mountain\"\n | \"Canada/Newfoundland\"\n | \"Canada/Pacific\"\n | \"Canada/Saskatchewan\"\n | \"Canada/Yukon\"\n | \"Chile/Continental\"\n | \"Chile/EasterIsland\"\n | \"Cuba\"\n | \"EET\"\n | \"EST\"\n | \"EST5EDT\"\n | \"Egypt\"\n | \"Eire\"\n | \"Etc/GMT\"\n | \"Etc/GMT+0\"\n | \"Etc/GMT+1\"\n | \"Etc/GMT+10\"\n | \"Etc/GMT+11\"\n | \"Etc/GMT+12\"\n | \"Etc/GMT+2\"\n | \"Etc/GMT+3\"\n | \"Etc/GMT+4\"\n | \"Etc/GMT+5\"\n | \"Etc/GMT+6\"\n | \"Etc/GMT+7\"\n | \"Etc/GMT+8\"\n | \"Etc/GMT+9\"\n | \"Etc/GMT-0\"\n | \"Etc/GMT-1\"\n | \"Etc/GMT-10\"\n | \"Etc/GMT-11\"\n | \"Etc/GMT-12\"\n | \"Etc/GMT-13\"\n | \"Etc/GMT-14\"\n | \"Etc/GMT-2\"\n | \"Etc/GMT-3\"\n | \"Etc/GMT-4\"\n | \"Etc/GMT-5\"\n | \"Etc/GMT-6\"\n | \"Etc/GMT-7\"\n | \"Etc/GMT-8\"\n | \"Etc/GMT-9\"\n | \"Etc/GMT0\"\n | \"Etc/Greenwich\"\n | \"Etc/UCT\"\n | \"Etc/UTC\"\n | \"Etc/Universal\"\n | \"Etc/Zulu\"\n | \"Europe/Amsterdam\"\n | \"Europe/Andorra\"\n | \"Europe/Astrakhan\"\n | \"Europe/Athens\"\n | \"Europe/Belfast\"\n | \"Europe/Belgrade\"\n | \"Europe/Berlin\"\n | \"Europe/Bratislava\"\n | \"Europe/Brussels\"\n | \"Europe/Bucharest\"\n | \"Europe/Budapest\"\n | \"Europe/Busingen\"\n | \"Europe/Chisinau\"\n | \"Europe/Copenhagen\"\n | \"Europe/Dublin\"\n | \"Europe/Gibraltar\"\n | \"Europe/Guernsey\"\n | \"Europe/Helsinki\"\n | \"Europe/Isle_of_Man\"\n | \"Europe/Istanbul\"\n | \"Europe/Jersey\"\n | \"Europe/Kaliningrad\"\n | \"Europe/Kiev\"\n | \"Europe/Kirov\"\n | \"Europe/Kyiv\"\n | \"Europe/Lisbon\"\n | \"Europe/Ljubljana\"\n | \"Europe/London\"\n | \"Europe/Luxembourg\"\n | \"Europe/Madrid\"\n | \"Europe/Malta\"\n | \"Europe/Mariehamn\"\n | \"Europe/Minsk\"\n | \"Europe/Monaco\"\n | \"Europe/Moscow\"\n | \"Europe/Nicosia\"\n | \"Europe/Oslo\"\n | \"Europe/Paris\"\n | \"Europe/Podgorica\"\n | \"Europe/Prague\"\n | \"Europe/Riga\"\n | \"Europe/Rome\"\n | \"Europe/Samara\"\n | \"Europe/San_Marino\"\n | \"Europe/Sarajevo\"\n | \"Europe/Saratov\"\n | \"Europe/Simferopol\"\n | \"Europe/Skopje\"\n | \"Europe/Sofia\"\n | \"Europe/Stockholm\"\n | \"Europe/Tallinn\"\n | \"Europe/Tirane\"\n | \"Europe/Tiraspol\"\n | \"Europe/Ulyanovsk\"\n | \"Europe/Uzhgorod\"\n | \"Europe/Vaduz\"\n | \"Europe/Vatican\"\n | \"Europe/Vienna\"\n | \"Europe/Vilnius\"\n | \"Europe/Volgograd\"\n | \"Europe/Warsaw\"\n | \"Europe/Zagreb\"\n | \"Europe/Zaporozhye\"\n | \"Europe/Zurich\"\n | \"Factory\"\n | \"GB\"\n | \"GB-Eire\"\n | \"GMT\"\n | \"GMT+0\"\n | \"GMT-0\"\n | \"GMT0\"\n | \"Greenwich\"\n | \"HST\"\n | \"Hongkong\"\n | \"Iceland\"\n | \"Indian/Antananarivo\"\n | \"Indian/Chagos\"\n | \"Indian/Christmas\"\n | \"Indian/Cocos\"\n | \"Indian/Comoro\"\n | \"Indian/Kerguelen\"\n | \"Indian/Mahe\"\n | \"Indian/Maldives\"\n | \"Indian/Mauritius\"\n | \"Indian/Mayotte\"\n | \"Indian/Reunion\"\n | \"Iran\"\n | \"Israel\"\n | \"Jamaica\"\n | \"Japan\"\n | \"Kwajalein\"\n | \"Libya\"\n | \"MET\"\n | \"MST\"\n | \"MST7MDT\"\n | \"Mexico/BajaNorte\"\n | \"Mexico/BajaSur\"\n | \"Mexico/General\"\n | \"NZ\"\n | \"NZ-CHAT\"\n | \"Navajo\"\n | \"PRC\"\n | \"PST8PDT\"\n | \"Pacific/Apia\"\n | \"Pacific/Auckland\"\n | \"Pacific/Bougainville\"\n | \"Pacific/Chatham\"\n | \"Pacific/Chuuk\"\n | \"Pacific/Easter\"\n | \"Pacific/Efate\"\n | \"Pacific/Enderbury\"\n | \"Pacific/Fakaofo\"\n | \"Pacific/Fiji\"\n | \"Pacific/Funafuti\"\n | \"Pacific/Galapagos\"\n | \"Pacific/Gambier\"\n | \"Pacific/Guadalcanal\"\n | \"Pacific/Guam\"\n | \"Pacific/Honolulu\"\n | \"Pacific/Johnston\"\n | \"Pacific/Kanton\"\n | \"Pacific/Kiritimati\"\n | \"Pacific/Kosrae\"\n | \"Pacific/Kwajalein\"\n | \"Pacific/Majuro\"\n | \"Pacific/Marquesas\"\n | \"Pacific/Midway\"\n | \"Pacific/Nauru\"\n | \"Pacific/Niue\"\n | \"Pacific/Norfolk\"\n | \"Pacific/Noumea\"\n | \"Pacific/Pago_Pago\"\n | \"Pacific/Palau\"\n | \"Pacific/Pitcairn\"\n | \"Pacific/Pohnpei\"\n | \"Pacific/Ponape\"\n | \"Pacific/Port_Moresby\"\n | \"Pacific/Rarotonga\"\n | \"Pacific/Saipan\"\n | \"Pacific/Samoa\"\n | \"Pacific/Tahiti\"\n | \"Pacific/Tarawa\"\n | \"Pacific/Tongatapu\"\n | \"Pacific/Truk\"\n | \"Pacific/Wake\"\n | \"Pacific/Wallis\"\n | \"Pacific/Yap\"\n | \"Poland\"\n | \"Portugal\"\n | \"ROC\"\n | \"ROK\"\n | \"Singapore\"\n | \"Turkey\"\n | \"UCT\"\n | \"US/Alaska\"\n | \"US/Aleutian\"\n | \"US/Arizona\"\n | \"US/Central\"\n | \"US/East-Indiana\"\n | \"US/Eastern\"\n | \"US/Hawaii\"\n | \"US/Indiana-Starke\"\n | \"US/Michigan\"\n | \"US/Mountain\"\n | \"US/Pacific\"\n | \"US/Samoa\"\n | \"UTC\"\n | \"Universal\"\n | \"W-SU\"\n | \"WET\"\n | \"Zulu\";\n/**\n * TokenEndpointAuthMethod\n */\nexport type TokenEndpointAuthMethod = \"client_secret_basic\" | \"client_secret_post\" | \"none\";\n/**\n * TokenType\n */\nexport type TokenType = \"access_token\" | \"refresh_token\";\n/**\n * TrialInterval\n */\nexport type TrialInterval = \"day\" | \"week\" | \"month\" | \"year\";\n/**\n * WebhookEventType\n */\nexport type WebhookEventType =\n | \"checkout.created\"\n | \"checkout.updated\"\n | \"checkout.expired\"\n | \"customer.created\"\n | \"customer.updated\"\n | \"customer.deleted\"\n | \"customer.state_changed\"\n | \"customer_seat.assigned\"\n | \"customer_seat.claimed\"\n | \"customer_seat.revoked\"\n | \"member.created\"\n | \"member.updated\"\n | \"member.deleted\"\n | \"order.created\"\n | \"order.updated\"\n | \"order.paid\"\n | \"order.refunded\"\n | \"subscription.created\"\n | \"subscription.updated\"\n | \"subscription.active\"\n | \"subscription.canceled\"\n | \"subscription.uncanceled\"\n | \"subscription.revoked\"\n | \"subscription.past_due\"\n | \"subscription.paused\"\n | \"subscription.resumed\"\n | \"refund.created\"\n | \"refund.updated\"\n | \"product.created\"\n | \"product.updated\"\n | \"benefit.created\"\n | \"benefit.updated\"\n | \"benefit_grant.created\"\n | \"benefit_grant.cycled\"\n | \"benefit_grant.updated\"\n | \"benefit_grant.revoked\"\n | \"organization.updated\";\n/**\n * WebhookFormat\n */\nexport type WebhookFormat = \"raw\" | \"discord\" | \"slack\";\n\n/**\n * Address\n */\nexport interface Address {\n /**\n * line1\n */\n line1?: string | null;\n /**\n * line2\n */\n line2?: string | null;\n /**\n * postal_code\n */\n postal_code?: string | null;\n /**\n * city\n */\n city?: string | null;\n /**\n * state\n */\n state?: string | null;\n /**\n * country\n */\n country: CountryAlpha2;\n}\n/**\n * AddressDict\n */\nexport interface AddressDict {\n /**\n * line1\n */\n line1?: string;\n /**\n * line2\n */\n line2?: string;\n /**\n * postal_code\n */\n postal_code?: string;\n /**\n * city\n */\n city?: string;\n /**\n * state\n */\n state?: string;\n /**\n * country\n */\n country: string;\n}\n/**\n * AddressInput\n */\nexport interface AddressInput {\n /**\n * line1\n */\n line1?: string | null;\n /**\n * line2\n */\n line2?: string | null;\n /**\n * postal_code\n */\n postal_code?: string | null;\n /**\n * city\n */\n city?: string | null;\n /**\n * state\n */\n state?: string | null;\n /**\n * country\n */\n country: CountryAlpha2Input;\n}\n/**\n * AlreadyActiveSubscriptionError\n */\nexport interface AlreadyActiveSubscriptionError {\n /**\n * error\n */\n error: \"AlreadyActiveSubscriptionError\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * AlreadyCanceledSubscription\n */\nexport interface AlreadyCanceledSubscription {\n /**\n * error\n */\n error: \"AlreadyCanceledSubscription\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * AmbiguousExternalCustomerID\n */\nexport interface AmbiguousExternalCustomerID {\n /**\n * error\n */\n error: \"AmbiguousExternalCustomerID\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * Schema of a custom field attached to a resource.\n */\nexport interface AttachedCustomField {\n /**\n * ID of the custom field.\n */\n custom_field_id: string;\n /**\n * custom_field\n */\n custom_field: CustomField;\n /**\n * Order of the custom field in the resource.\n */\n order: number;\n /**\n * Whether the value is required for this custom field.\n */\n required: boolean;\n}\n/**\n * Schema to attach a custom field to a resource.\n */\nexport interface AttachedCustomFieldCreate {\n /**\n * ID of the custom field to attach.\n */\n custom_field_id: string;\n /**\n * Whether the value is required for this custom field.\n */\n required: boolean;\n}\n/**\n * AuthorizeOrganization\n */\nexport interface AuthorizeOrganization {\n /**\n * id\n */\n id: string;\n /**\n * slug\n */\n slug: string;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n}\n/**\n * AuthorizeResponseOrganization\n */\nexport interface AuthorizeResponseOrganization {\n /**\n * client\n */\n client: OAuth2ClientPublic;\n /**\n * sub_type\n */\n sub_type: \"organization\";\n /**\n * sub\n */\n sub: AuthorizeOrganization | null;\n /**\n * scopes\n */\n scopes: Scope[];\n /**\n * organizations\n */\n organizations: AuthorizeOrganization[];\n /**\n * requires_single_organization\n */\n requires_single_organization?: boolean;\n /**\n * scope_display_names\n */\n scope_display_names?: Record<string, string>;\n}\n/**\n * AuthorizeResponseUser\n */\nexport interface AuthorizeResponseUser {\n /**\n * client\n */\n client: OAuth2ClientPublic;\n /**\n * sub_type\n */\n sub_type: \"user\";\n /**\n * sub\n */\n sub: AuthorizeUser | null;\n /**\n * scopes\n */\n scopes: Scope[];\n /**\n * organizations\n */\n organizations: AuthorizeOrganization[];\n /**\n * requires_single_organization\n */\n requires_single_organization?: boolean;\n /**\n * scope_display_names\n */\n scope_display_names?: Record<string, string>;\n}\n/**\n * AuthorizeUser\n */\nexport interface AuthorizeUser {\n /**\n * id\n */\n id: string;\n /**\n * email\n */\n email: string;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n}\n/**\n * An event created by Polar when an order is paid via customer balance.\n */\nexport interface BalanceCreditOrderEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"balance.credit_order\";\n /**\n * metadata\n */\n metadata: BalanceCreditOrderMetadata;\n}\n/**\n * BalanceCreditOrderMetadata\n */\nexport interface BalanceCreditOrderMetadata {\n /**\n * order_id\n */\n order_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * subscription_id\n */\n subscription_id?: string;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * tax_amount\n */\n tax_amount: number;\n /**\n * tax_state\n */\n tax_state?: string | null;\n /**\n * tax_country\n */\n tax_country?: string | null;\n /**\n * fee\n */\n fee: number;\n /**\n * exchange_rate\n */\n exchange_rate?: number;\n}\n/**\n * An event created by Polar when an order is disputed.\n */\nexport interface BalanceDisputeEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"balance.dispute\";\n /**\n * metadata\n */\n metadata: BalanceDisputeMetadata;\n}\n/**\n * BalanceDisputeMetadata\n */\nexport interface BalanceDisputeMetadata {\n /**\n * transaction_id\n */\n transaction_id: string;\n /**\n * dispute_id\n */\n dispute_id: string;\n /**\n * order_id\n */\n order_id?: string;\n /**\n * order_created_at\n */\n order_created_at?: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * subscription_id\n */\n subscription_id?: string;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * presentment_amount\n */\n presentment_amount: number;\n /**\n * presentment_currency\n */\n presentment_currency: string;\n /**\n * tax_amount\n */\n tax_amount: number;\n /**\n * tax_state\n */\n tax_state?: string | null;\n /**\n * tax_country\n */\n tax_country?: string | null;\n /**\n * fee\n */\n fee: number;\n /**\n * exchange_rate\n */\n exchange_rate?: number;\n}\n/**\n * An event created by Polar when a dispute is won and funds are reinstated.\n */\nexport interface BalanceDisputeReversalEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"balance.dispute_reversal\";\n /**\n * metadata\n */\n metadata: BalanceDisputeMetadata;\n}\n/**\n * An event created by Polar when an order is paid.\n */\nexport interface BalanceOrderEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"balance.order\";\n /**\n * metadata\n */\n metadata: BalanceOrderMetadata;\n}\n/**\n * BalanceOrderMetadata\n */\nexport interface BalanceOrderMetadata {\n /**\n * transaction_id\n */\n transaction_id: string;\n /**\n * order_id\n */\n order_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * subscription_id\n */\n subscription_id?: string;\n /**\n * amount\n */\n amount: number;\n /**\n * net_amount\n */\n net_amount?: number;\n /**\n * currency\n */\n currency: string;\n /**\n * presentment_amount\n */\n presentment_amount: number;\n /**\n * presentment_currency\n */\n presentment_currency: string;\n /**\n * tax_amount\n */\n tax_amount: number;\n /**\n * tax_state\n */\n tax_state?: string | null;\n /**\n * tax_country\n */\n tax_country?: string | null;\n /**\n * fee\n */\n fee: number;\n /**\n * exchange_rate\n */\n exchange_rate?: number;\n}\n/**\n * An event created by Polar when an order is refunded.\n */\nexport interface BalanceRefundEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"balance.refund\";\n /**\n * metadata\n */\n metadata: BalanceRefundMetadata;\n}\n/**\n * BalanceRefundMetadata\n */\nexport interface BalanceRefundMetadata {\n /**\n * transaction_id\n */\n transaction_id: string;\n /**\n * refund_id\n */\n refund_id: string;\n /**\n * order_id\n */\n order_id?: string;\n /**\n * order_created_at\n */\n order_created_at?: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * subscription_id\n */\n subscription_id?: string;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * presentment_amount\n */\n presentment_amount: number;\n /**\n * presentment_currency\n */\n presentment_currency: string;\n /**\n * refundable_amount\n */\n refundable_amount?: number;\n /**\n * tax_amount\n */\n tax_amount: number;\n /**\n * tax_state\n */\n tax_state?: string | null;\n /**\n * tax_country\n */\n tax_country?: string | null;\n /**\n * fee\n */\n fee: number;\n /**\n * exchange_rate\n */\n exchange_rate?: number;\n}\n/**\n * An event created by Polar when a refund is reverted.\n */\nexport interface BalanceRefundReversalEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"balance.refund_reversal\";\n /**\n * metadata\n */\n metadata: BalanceRefundMetadata;\n}\n/**\n * A benefit of type `custom`.\n\nUse it to grant any kind of benefit that doesn't fit in the other types.\n */\nexport interface BenefitCustom {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"custom\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * visibility\n */\n visibility: BenefitVisibility;\n /**\n * properties\n */\n properties: BenefitCustomProperties;\n /**\n * visibility_configurable\n */\n visibility_configurable: boolean;\n}\n/**\n * Schema to create a benefit of type `custom`.\n */\nexport interface BenefitCustomCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"custom\";\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description: string;\n /**\n * The ID of the organization owning the benefit. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * properties\n */\n properties: BenefitCustomCreateProperties;\n}\n/**\n * Properties for creating a benefit of type `custom`.\n */\nexport interface BenefitCustomCreateProperties {\n /**\n * note\n */\n note?: (string | null) | null;\n}\n/**\n * Properties for a benefit of type `custom`.\n */\nexport interface BenefitCustomProperties {\n /**\n * note\n */\n note: (string | null) | null;\n}\n/**\n * BenefitCustomSubscriber\n */\nexport interface BenefitCustomSubscriber {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"custom\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * organization\n */\n organization: BenefitSubscriberOrganization;\n /**\n * properties\n */\n properties: BenefitCustomSubscriberProperties;\n}\n/**\n * Properties available to subscribers for a benefit of type `custom`.\n */\nexport interface BenefitCustomSubscriberProperties {\n /**\n * note\n */\n note: (string | null) | null;\n}\n/**\n * BenefitCustomUpdate\n */\nexport interface BenefitCustomUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * type\n */\n type: \"custom\";\n /**\n * properties\n */\n properties?: BenefitCustomProperties | null;\n}\n/**\n * An event created by Polar when a benefit is cycled.\n */\nexport interface BenefitCycledEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"benefit.cycled\";\n /**\n * metadata\n */\n metadata: BenefitGrantMetadata;\n}\n/**\n * A benefit of type `discord`.\n\nUse it to automatically invite your backers to a Discord server.\n */\nexport interface BenefitDiscord {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"discord\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * visibility\n */\n visibility: BenefitVisibility;\n /**\n * properties\n */\n properties: BenefitDiscordProperties;\n /**\n * visibility_configurable\n */\n visibility_configurable: boolean;\n}\n/**\n * BenefitDiscordCreate\n */\nexport interface BenefitDiscordCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"discord\";\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description: string;\n /**\n * The ID of the organization owning the benefit. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * properties\n */\n properties: BenefitDiscordCreateProperties;\n}\n/**\n * Properties to create a benefit of type `discord`.\n */\nexport interface BenefitDiscordCreateProperties {\n /**\n * guild_token\n */\n guild_token: string;\n /**\n * The ID of the Discord role to grant.\n */\n role_id: string;\n /**\n * Whether to kick the member from the Discord server on revocation.\n */\n kick_member: boolean;\n}\n/**\n * Properties for a benefit of type `discord`.\n */\nexport interface BenefitDiscordProperties {\n /**\n * The ID of the Discord server.\n */\n guild_id: string;\n /**\n * The ID of the Discord role to grant.\n */\n role_id: string;\n /**\n * Whether to kick the member from the Discord server on revocation.\n */\n kick_member: boolean;\n /**\n * guild_token\n */\n guild_token: string;\n}\n/**\n * BenefitDiscordSubscriber\n */\nexport interface BenefitDiscordSubscriber {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"discord\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * organization\n */\n organization: BenefitSubscriberOrganization;\n /**\n * properties\n */\n properties: BenefitDiscordSubscriberProperties;\n}\n/**\n * Properties available to subscribers for a benefit of type `discord`.\n */\nexport interface BenefitDiscordSubscriberProperties {\n /**\n * The ID of the Discord server.\n */\n guild_id: string;\n}\n/**\n * BenefitDiscordUpdate\n */\nexport interface BenefitDiscordUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description?: string | null;\n /**\n * type\n */\n type: \"discord\";\n /**\n * properties\n */\n properties?: BenefitDiscordCreateProperties | null;\n}\n/**\n * BenefitDownloadables\n */\nexport interface BenefitDownloadables {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"downloadables\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * visibility\n */\n visibility: BenefitVisibility;\n /**\n * properties\n */\n properties: BenefitDownloadablesProperties;\n /**\n * visibility_configurable\n */\n visibility_configurable: boolean;\n}\n/**\n * BenefitDownloadablesCreate\n */\nexport interface BenefitDownloadablesCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"downloadables\";\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description: string;\n /**\n * The ID of the organization owning the benefit. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * properties\n */\n properties: BenefitDownloadablesCreateProperties;\n}\n/**\n * BenefitDownloadablesCreateProperties\n */\nexport interface BenefitDownloadablesCreateProperties {\n /**\n * archived\n */\n archived?: Record<string, boolean>;\n /**\n * files\n */\n files: string[];\n}\n/**\n * BenefitDownloadablesProperties\n */\nexport interface BenefitDownloadablesProperties {\n /**\n * archived\n */\n archived: Record<string, boolean>;\n /**\n * files\n */\n files: string[];\n}\n/**\n * BenefitDownloadablesSubscriber\n */\nexport interface BenefitDownloadablesSubscriber {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"downloadables\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * organization\n */\n organization: BenefitSubscriberOrganization;\n /**\n * properties\n */\n properties: BenefitDownloadablesSubscriberProperties;\n}\n/**\n * BenefitDownloadablesSubscriberProperties\n */\nexport interface BenefitDownloadablesSubscriberProperties {\n /**\n * active_files\n */\n active_files: string[];\n}\n/**\n * BenefitDownloadablesUpdate\n */\nexport interface BenefitDownloadablesUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description?: string | null;\n /**\n * type\n */\n type: \"downloadables\";\n /**\n * properties\n */\n properties?: BenefitDownloadablesCreateProperties | null;\n}\n/**\n * A benefit of type `feature_flag`.\n\nUse it to grant feature flags with key-value metadata\nthat can be queried via the API and webhooks.\n */\nexport interface BenefitFeatureFlag {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"feature_flag\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * visibility\n */\n visibility: BenefitVisibility;\n /**\n * properties\n */\n properties: BenefitFeatureFlagProperties;\n /**\n * visibility_configurable\n */\n visibility_configurable: boolean;\n}\n/**\n * Schema to create a benefit of type `feature_flag`.\n */\nexport interface BenefitFeatureFlagCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"feature_flag\";\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description: string;\n /**\n * The ID of the organization owning the benefit. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * properties\n */\n properties: BenefitFeatureFlagCreateProperties;\n}\n/**\n * Properties for creating a benefit of type `feature_flag`.\n */\nexport interface BenefitFeatureFlagCreateProperties extends Record<string, never> {}\n/**\n * Properties for a benefit of type `feature_flag`.\n */\nexport interface BenefitFeatureFlagProperties extends Record<string, never> {}\n/**\n * BenefitFeatureFlagSubscriber\n */\nexport interface BenefitFeatureFlagSubscriber {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"feature_flag\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * organization\n */\n organization: BenefitSubscriberOrganization;\n /**\n * properties\n */\n properties: BenefitFeatureFlagSubscriberProperties;\n}\n/**\n * Properties available to subscribers for a benefit of type `feature_flag`.\n */\nexport interface BenefitFeatureFlagSubscriberProperties extends Record<string, never> {}\n/**\n * BenefitFeatureFlagUpdate\n */\nexport interface BenefitFeatureFlagUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * type\n */\n type: \"feature_flag\";\n /**\n * properties\n */\n properties?: BenefitFeatureFlagProperties | null;\n}\n/**\n * A benefit of type `github_repository`.\n\nUse it to automatically invite your backers to a private GitHub repository.\n */\nexport interface BenefitGitHubRepository {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"github_repository\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * visibility\n */\n visibility: BenefitVisibility;\n /**\n * properties\n */\n properties: BenefitGitHubRepositoryProperties;\n /**\n * visibility_configurable\n */\n visibility_configurable: boolean;\n}\n/**\n * BenefitGitHubRepositoryCreate\n */\nexport interface BenefitGitHubRepositoryCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"github_repository\";\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description: string;\n /**\n * The ID of the organization owning the benefit. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * properties\n */\n properties: BenefitGitHubRepositoryCreateProperties;\n}\n/**\n * Properties to create a benefit of type `github_repository`.\n */\nexport interface BenefitGitHubRepositoryCreateProperties {\n /**\n * The owner of the repository.\n */\n repository_owner: string;\n /**\n * The name of the repository.\n */\n repository_name: string;\n /**\n * The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).\n */\n permission: Permission;\n}\n/**\n * Properties for a benefit of type `github_repository`.\n */\nexport interface BenefitGitHubRepositoryProperties {\n /**\n * The owner of the repository.\n */\n repository_owner: string;\n /**\n * The name of the repository.\n */\n repository_name: string;\n /**\n * The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).\n */\n permission: Permission;\n}\n/**\n * BenefitGitHubRepositorySubscriber\n */\nexport interface BenefitGitHubRepositorySubscriber {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"github_repository\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * organization\n */\n organization: BenefitSubscriberOrganization;\n /**\n * properties\n */\n properties: BenefitGitHubRepositorySubscriberProperties;\n}\n/**\n * Properties available to subscribers for a benefit of type `github_repository`.\n */\nexport interface BenefitGitHubRepositorySubscriberProperties {\n /**\n * The owner of the repository.\n */\n repository_owner: string;\n /**\n * The name of the repository.\n */\n repository_name: string;\n}\n/**\n * BenefitGitHubRepositoryUpdate\n */\nexport interface BenefitGitHubRepositoryUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description?: string | null;\n /**\n * type\n */\n type: \"github_repository\";\n /**\n * properties\n */\n properties?: BenefitGitHubRepositoryCreateProperties | null;\n}\n/**\n * BenefitGrant\n */\nexport interface BenefitGrant {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the grant.\n */\n id: string;\n /**\n * The timestamp when the benefit was granted. If `None`, the benefit is not granted.\n */\n granted_at?: string | null;\n /**\n * Whether the benefit is granted.\n */\n is_granted: boolean;\n /**\n * The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.\n */\n revoked_at?: string | null;\n /**\n * Whether the benefit is revoked.\n */\n is_revoked: boolean;\n /**\n * The ID of the subscription that granted this benefit.\n */\n subscription_id: string | null;\n /**\n * The ID of the order that granted this benefit.\n */\n order_id: string | null;\n /**\n * The ID of the customer concerned by this grant.\n */\n customer_id: string;\n /**\n * The ID of the member concerned by this grant.\n */\n member_id?: string | null;\n /**\n * The ID of the benefit concerned by this grant.\n */\n benefit_id: string;\n /**\n * The error information if the benefit grant failed with an unrecoverable error.\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: Customer;\n /**\n * member\n */\n member?: Member | null;\n /**\n * benefit\n */\n benefit: Benefit;\n /**\n * properties\n */\n properties:\n | BenefitGrantDiscordProperties\n | BenefitGrantGitHubRepositoryProperties\n | BenefitGrantDownloadablesProperties\n | BenefitGrantLicenseKeysProperties\n | BenefitGrantCustomProperties\n | BenefitGrantFeatureFlagProperties\n | BenefitGrantSlackSharedChannelProperties;\n}\n/**\n * BenefitGrantCustomProperties\n */\nexport interface BenefitGrantCustomProperties extends Record<string, never> {}\n/**\n * BenefitGrantDiscordProperties\n */\nexport interface BenefitGrantDiscordProperties {\n /**\n * account_id\n */\n account_id?: string | null;\n /**\n * guild_id\n */\n guild_id?: string;\n /**\n * role_id\n */\n role_id?: string;\n /**\n * granted_account_id\n */\n granted_account_id?: string;\n}\n/**\n * BenefitGrantDownloadablesProperties\n */\nexport interface BenefitGrantDownloadablesProperties {\n /**\n * files\n */\n files?: string[];\n}\n/**\n * BenefitGrantError\n */\nexport interface BenefitGrantError {\n /**\n * message\n */\n message: string;\n /**\n * type\n */\n type: string;\n /**\n * timestamp\n */\n timestamp: string;\n}\n/**\n * BenefitGrantFeatureFlagProperties\n */\nexport interface BenefitGrantFeatureFlagProperties extends Record<string, never> {}\n/**\n * BenefitGrantGitHubRepositoryProperties\n */\nexport interface BenefitGrantGitHubRepositoryProperties {\n /**\n * account_id\n */\n account_id?: string | null;\n /**\n * repository_owner\n */\n repository_owner?: string;\n /**\n * repository_name\n */\n repository_name?: string;\n /**\n * permission\n */\n permission?: Permission;\n /**\n * granted_account_id\n */\n granted_account_id?: string;\n}\n/**\n * BenefitGrantLicenseKeysProperties\n */\nexport interface BenefitGrantLicenseKeysProperties {\n /**\n * user_provided_key\n */\n user_provided_key?: string;\n /**\n * license_key_id\n */\n license_key_id?: string;\n /**\n * display_key\n */\n display_key?: string;\n}\n/**\n * BenefitGrantMetadata\n */\nexport interface BenefitGrantMetadata {\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * benefit_grant_id\n */\n benefit_grant_id: string;\n /**\n * benefit_type\n */\n benefit_type: BenefitType;\n /**\n * member_id\n */\n member_id?: string;\n}\n/**\n * BenefitGrantMeterCreditProperties\n */\nexport interface BenefitGrantMeterCreditProperties {\n /**\n * last_credited_meter_id\n */\n last_credited_meter_id?: string;\n /**\n * last_credited_units\n */\n last_credited_units?: number;\n /**\n * last_credited_at\n */\n last_credited_at?: string;\n}\n/**\n * BenefitGrantSlackSharedChannelProperties\n */\nexport interface BenefitGrantSlackSharedChannelProperties {\n /**\n * invited_email\n */\n invited_email?: string;\n /**\n * channel_id\n */\n channel_id?: string;\n /**\n * channel_name\n */\n channel_name?: string;\n /**\n * invite_id\n */\n invite_id?: string;\n /**\n * invite_url\n */\n invite_url?: string;\n /**\n * connected_team_id\n */\n connected_team_id?: string;\n}\n/**\n * An event created by Polar when a benefit is granted to a customer.\n */\nexport interface BenefitGrantedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"benefit.granted\";\n /**\n * metadata\n */\n metadata: BenefitGrantMetadata;\n}\n/**\n * BenefitLicenseKeyActivationCreateProperties\n */\nexport interface BenefitLicenseKeyActivationCreateProperties {\n /**\n * limit\n */\n limit: number;\n /**\n * enable_customer_admin\n */\n enable_customer_admin: boolean;\n}\n/**\n * BenefitLicenseKeyActivationProperties\n */\nexport interface BenefitLicenseKeyActivationProperties {\n /**\n * limit\n */\n limit: number;\n /**\n * enable_customer_admin\n */\n enable_customer_admin: boolean;\n}\n/**\n * BenefitLicenseKeyExpirationProperties\n */\nexport interface BenefitLicenseKeyExpirationProperties {\n /**\n * ttl\n */\n ttl: number;\n /**\n * timeframe\n */\n timeframe: Timeframe;\n}\n/**\n * BenefitLicenseKeys\n */\nexport interface BenefitLicenseKeys {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"license_keys\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * visibility\n */\n visibility: BenefitVisibility;\n /**\n * properties\n */\n properties: BenefitLicenseKeysProperties;\n /**\n * visibility_configurable\n */\n visibility_configurable: boolean;\n}\n/**\n * BenefitLicenseKeysCreate\n */\nexport interface BenefitLicenseKeysCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"license_keys\";\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description: string;\n /**\n * The ID of the organization owning the benefit. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * properties\n */\n properties: BenefitLicenseKeysCreateProperties;\n}\n/**\n * BenefitLicenseKeysCreateProperties\n */\nexport interface BenefitLicenseKeysCreateProperties {\n /**\n * prefix\n */\n prefix?: string | null;\n /**\n * expires\n */\n expires?: BenefitLicenseKeyExpirationProperties | null;\n /**\n * activations\n */\n activations?: BenefitLicenseKeyActivationCreateProperties | null;\n /**\n * limit_usage\n */\n limit_usage?: number | null;\n}\n/**\n * BenefitLicenseKeysProperties\n */\nexport interface BenefitLicenseKeysProperties {\n /**\n * prefix\n */\n prefix: string | null;\n /**\n * expires\n */\n expires: BenefitLicenseKeyExpirationProperties | null;\n /**\n * activations\n */\n activations: BenefitLicenseKeyActivationProperties | null;\n /**\n * limit_usage\n */\n limit_usage: number | null;\n}\n/**\n * BenefitLicenseKeysSubscriber\n */\nexport interface BenefitLicenseKeysSubscriber {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"license_keys\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * organization\n */\n organization: BenefitSubscriberOrganization;\n /**\n * properties\n */\n properties: BenefitLicenseKeysSubscriberProperties;\n}\n/**\n * BenefitLicenseKeysSubscriberProperties\n */\nexport interface BenefitLicenseKeysSubscriberProperties {\n /**\n * prefix\n */\n prefix: string | null;\n /**\n * expires\n */\n expires: BenefitLicenseKeyExpirationProperties | null;\n /**\n * activations\n */\n activations: BenefitLicenseKeyActivationProperties | null;\n /**\n * limit_usage\n */\n limit_usage: number | null;\n}\n/**\n * BenefitLicenseKeysUpdate\n */\nexport interface BenefitLicenseKeysUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * type\n */\n type: \"license_keys\";\n /**\n * properties\n */\n properties?: BenefitLicenseKeysCreateProperties | null;\n}\n/**\n * A benefit of type `meter_unit`.\n\nUse it to grant a number of units on a specific meter.\n */\nexport interface BenefitMeterCredit {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"meter_credit\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * visibility\n */\n visibility: BenefitVisibility;\n /**\n * properties\n */\n properties: BenefitMeterCreditProperties;\n /**\n * visibility_configurable\n */\n visibility_configurable: boolean;\n}\n/**\n * Schema to create a benefit of type `meter_unit`.\n */\nexport interface BenefitMeterCreditCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"meter_credit\";\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description: string;\n /**\n * The ID of the organization owning the benefit. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * properties\n */\n properties: BenefitMeterCreditCreateProperties;\n}\n/**\n * Properties for creating a benefit of type `meter_unit`.\n */\nexport interface BenefitMeterCreditCreateProperties {\n /**\n * units\n */\n units: number;\n /**\n * rollover\n */\n rollover: boolean;\n /**\n * meter_id\n */\n meter_id: string;\n}\n/**\n * Properties for a benefit of type `meter_unit`.\n */\nexport interface BenefitMeterCreditProperties {\n /**\n * units\n */\n units: number;\n /**\n * rollover\n */\n rollover: boolean;\n /**\n * meter_id\n */\n meter_id: string;\n}\n/**\n * BenefitMeterCreditSubscriber\n */\nexport interface BenefitMeterCreditSubscriber {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"meter_credit\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * organization\n */\n organization: BenefitSubscriberOrganization;\n /**\n * properties\n */\n properties: BenefitMeterCreditSubscriberProperties;\n}\n/**\n * Properties available to subscribers for a benefit of type `meter_unit`.\n */\nexport interface BenefitMeterCreditSubscriberProperties {\n /**\n * units\n */\n units: number;\n /**\n * rollover\n */\n rollover: boolean;\n /**\n * meter_id\n */\n meter_id: string;\n}\n/**\n * BenefitMeterCreditUpdate\n */\nexport interface BenefitMeterCreditUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * type\n */\n type: \"meter_credit\";\n /**\n * properties\n */\n properties?: BenefitMeterCreditCreateProperties | null;\n}\n/**\n * BenefitPublic\n */\nexport interface BenefitPublic {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: BenefitType;\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n}\n/**\n * An event created by Polar when a benefit is revoked from a customer.\n */\nexport interface BenefitRevokedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"benefit.revoked\";\n /**\n * metadata\n */\n metadata: BenefitGrantMetadata;\n}\n/**\n * BenefitSlackSharedChannel\n */\nexport interface BenefitSlackSharedChannel {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"slack_shared_channel\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * visibility\n */\n visibility: BenefitVisibility;\n /**\n * properties\n */\n properties: BenefitSlackSharedChannelProperties;\n /**\n * visibility_configurable\n */\n visibility_configurable: boolean;\n}\n/**\n * BenefitSlackSharedChannelCreate\n */\nexport interface BenefitSlackSharedChannelCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"slack_shared_channel\";\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description: string;\n /**\n * The ID of the organization owning the benefit. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * properties\n */\n properties: BenefitSlackSharedChannelCreateProperties;\n}\n/**\n * BenefitSlackSharedChannelCreateProperties\n */\nexport interface BenefitSlackSharedChannelCreateProperties {\n /**\n * Polar Slack integration to use for this benefit.\n */\n slack_integration_id: string;\n /**\n * channel_name_template\n */\n channel_name_template: string;\n /**\n * private\n */\n private?: boolean;\n /**\n * welcome_message\n */\n welcome_message?: string | null;\n /**\n * archive_on_revoke\n */\n archive_on_revoke?: boolean;\n /**\n * team_invitees\n */\n team_invitees?: string[];\n}\n/**\n * BenefitSlackSharedChannelProperties\n */\nexport interface BenefitSlackSharedChannelProperties {\n /**\n * Polar Slack integration linked to this benefit.\n */\n slack_integration_id: string;\n /**\n * Template for the channel name. Supports placeholders: {customer_name}, {customer_email_local}, and {metadata.<key>} for any value stored in customer user metadata.\n */\n channel_name_template: string;\n /**\n * Create the channel as private (recommended).\n */\n private?: boolean;\n /**\n * Optional message posted to the channel right after creation.\n */\n welcome_message?: string | null;\n /**\n * Archive the channel when the benefit is revoked.\n */\n archive_on_revoke?: boolean;\n /**\n * Slack user IDs from the merchant workspace to invite to every channel created for this benefit.\n */\n team_invitees?: string[];\n}\n/**\n * BenefitSlackSharedChannelSubscriber\n */\nexport interface BenefitSlackSharedChannelSubscriber {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"slack_shared_channel\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * organization\n */\n organization: BenefitSubscriberOrganization;\n /**\n * properties\n */\n properties: BenefitSlackSharedChannelSubscriberProperties;\n}\n/**\n * BenefitSlackSharedChannelSubscriberProperties\n */\nexport interface BenefitSlackSharedChannelSubscriberProperties extends Record<string, never> {}\n/**\n * BenefitSlackSharedChannelUpdate\n */\nexport interface BenefitSlackSharedChannelUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description?: string | null;\n /**\n * type\n */\n type: \"slack_shared_channel\";\n /**\n * properties\n */\n properties?: BenefitSlackSharedChannelCreateProperties | null;\n}\n/**\n * BenefitSubscriberOrganization\n */\nexport interface BenefitSubscriberOrganization {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Organization name shown in checkout, customer portal, emails etc.\n */\n name: string;\n /**\n * Unique organization slug in checkout, customer portal and credit card statements.\n */\n slug: string;\n /**\n * Avatar URL shown in checkout, customer portal, emails etc.\n */\n avatar_url: string | null;\n /**\n * proration_behavior\n */\n proration_behavior: SubscriptionProrationBehavior;\n /**\n * Whether customers can update their subscriptions from the customer portal.\n */\n allow_customer_updates: boolean;\n}\n/**\n * An event created by Polar when a benefit is updated.\n */\nexport interface BenefitUpdatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"benefit.updated\";\n /**\n * metadata\n */\n metadata: BenefitGrantMetadata;\n}\n/**\n * CannotCreateOrganizationError\n */\nexport interface CannotCreateOrganizationError {\n /**\n * error\n */\n error: \"CannotCreateOrganizationError\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * Schema of a payment with a card payment method.\n */\nexport interface CardPayment {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * processor\n */\n processor: PaymentProcessor;\n /**\n * status\n */\n status: PaymentStatus;\n /**\n * The payment amount in cents.\n */\n amount: number;\n /**\n * The payment currency. Currently, only `usd` is supported.\n */\n currency: string;\n /**\n * The payment method used.\n */\n method: \"card\";\n /**\n * What initiated this payment attempt, e.g. initial purchase, subscription renewal, or an automated dunning retry.\n */\n trigger: PaymentTrigger | null;\n /**\n * Error code, if the payment was declined.\n */\n decline_reason: string | null;\n /**\n * Human-readable error message, if the payment was declined.\n */\n decline_message: string | null;\n /**\n * The ID of the organization that owns the payment.\n */\n organization_id: string;\n /**\n * The ID of the checkout session associated with this payment.\n */\n checkout_id: string | null;\n /**\n * The ID of the order associated with this payment.\n */\n order_id: string | null;\n /**\n * Additional metadata from the payment processor for internal use.\n */\n processor_metadata?: Record<string, unknown>;\n /**\n * method_metadata\n */\n method_metadata: CardPaymentMetadata;\n}\n/**\n * Additional metadata for a card payment method.\n */\nexport interface CardPaymentMetadata {\n /**\n * The brand of the card used for the payment.\n */\n brand: string;\n /**\n * The last 4 digits of the card number.\n */\n last4: string;\n}\n/**\n * Checkout session data retrieved using an access token.\n */\nexport interface Checkout {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * payment_processor\n */\n payment_processor: PaymentProcessor;\n /**\n * status\n */\n status: CheckoutStatus;\n /**\n * Client secret used to update and complete the checkout session from the client.\n */\n client_secret: string;\n /**\n * URL where the customer can access the checkout session.\n */\n url: string;\n /**\n * Expiration date and time of the checkout session.\n */\n expires_at: string;\n /**\n * URL where the customer will be redirected after a successful payment.\n */\n success_url: string;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url: string | null;\n /**\n * When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page.\n */\n embed_origin: string | null;\n /**\n * Amount in cents, before discounts and taxes.\n */\n amount: number;\n /**\n * Predefined number of seats (works with seat-based pricing only)\n */\n seats?: number | null;\n /**\n * Minimum number of seats (works with seat-based pricing only)\n */\n min_seats?: number | null;\n /**\n * Maximum number of seats (works with seat-based pricing only)\n */\n max_seats?: number | null;\n /**\n * Discount amount in cents.\n */\n discount_amount: number;\n /**\n * Amount in cents, after discounts but before taxes.\n */\n net_amount: number;\n /**\n * Sales tax amount in cents. If `null`, it means there is no enough information yet to calculate it.\n */\n tax_amount: number | null;\n /**\n * Tax behavior of the checkout. `inclusive` means the price includes tax, `exclusive` means tax is added on top. If `null`, tax is not yet calculated.\n */\n tax_behavior: TaxBehavior | null;\n /**\n * Amount in cents, after discounts and taxes.\n */\n total_amount: number;\n /**\n * Currency code of the checkout session.\n */\n currency: string;\n /**\n * Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured.\n */\n allow_trial: boolean | null;\n /**\n * Interval unit of the trial period, if any. This value is either set from the checkout, if `trial_interval` is set, or from the selected product.\n */\n active_trial_interval: TrialInterval | null;\n /**\n * Number of interval units of the trial period, if any. This value is either set from the checkout, if `trial_interval_count` is set, or from the selected product.\n */\n active_trial_interval_count: number | null;\n /**\n * End date and time of the trial period, if any.\n */\n trial_end: string | null;\n /**\n * ID of the organization owning the checkout session.\n */\n organization_id: string;\n /**\n * ID of the product to checkout.\n */\n product_id: string | null;\n /**\n * ID of the product price to checkout.\n */\n product_price_id: string | null;\n /**\n * ID of the discount applied to the checkout.\n */\n discount_id: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes: boolean;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`.\n */\n require_billing_address: boolean;\n /**\n * Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable.\n */\n is_discount_applicable: boolean;\n /**\n * Whether the product price is free, regardless of discounts.\n */\n is_free_product_price: boolean;\n /**\n * Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount.\n */\n is_payment_required: boolean;\n /**\n * Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles.\n */\n is_payment_setup_required: boolean;\n /**\n * Whether the checkout requires a payment form, whether because of a payment or payment method setup.\n */\n is_payment_form_required: boolean;\n /**\n * customer_id\n */\n customer_id: string | null;\n /**\n * Whether the customer is a business or an individual. If `true`, the customer will be required to fill their full billing address and billing name.\n */\n is_business_customer: boolean;\n /**\n * Name of the customer.\n */\n customer_name: string | null;\n /**\n * Email address of the customer.\n */\n customer_email: string | null;\n /**\n * customer_ip_address\n */\n customer_ip_address: string | null;\n /**\n * customer_billing_name\n */\n customer_billing_name: string | null;\n /**\n * customer_billing_address\n */\n customer_billing_address: Address | null;\n /**\n * customer_tax_id\n */\n customer_tax_id: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * payment_processor_metadata\n */\n payment_processor_metadata: Record<string, string>;\n /**\n * billing_address_fields\n */\n billing_address_fields: CheckoutBillingAddressFields;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * ID of the customer in your system. If a matching customer exists on Polar, the resulting order will be linked to this customer. Otherwise, a new customer will be created with this external ID set.\n */\n external_customer_id: string | null;\n /**\n * List of products available to select.\n */\n products: CheckoutProduct[];\n /**\n * Product selected to checkout.\n */\n product: CheckoutProduct | null;\n /**\n * Price of the selected product.\n */\n product_price: (LegacyRecurringProductPrice | ProductPrice) | null;\n /**\n * Mapping of product IDs to their list of prices.\n */\n prices: Record<string, (LegacyRecurringProductPrice | ProductPrice)[]> | null;\n /**\n * discount\n */\n discount:\n | (\n | CheckoutDiscountFixedOnceForeverDuration\n | CheckoutDiscountFixedRepeatDuration\n | CheckoutDiscountPercentageOnceForeverDuration\n | CheckoutDiscountPercentageRepeatDuration\n )\n | null;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * attached_custom_fields\n */\n attached_custom_fields: AttachedCustomField[] | null;\n /**\n * customer_metadata\n */\n customer_metadata: Record<string, string | number | boolean>;\n}\n/**\n * CheckoutBillingAddressFields\n */\nexport interface CheckoutBillingAddressFields {\n /**\n * country\n */\n country: BillingAddressFieldMode;\n /**\n * state\n */\n state: BillingAddressFieldMode;\n /**\n * city\n */\n city: BillingAddressFieldMode;\n /**\n * postal_code\n */\n postal_code: BillingAddressFieldMode;\n /**\n * line1\n */\n line1: BillingAddressFieldMode;\n /**\n * line2\n */\n line2: BillingAddressFieldMode;\n}\n/**\n * Confirm a checkout session using a Stripe confirmation token.\n */\nexport interface CheckoutConfirmStripe {\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * ID of the product to checkout. Must be present in the checkout's product list.\n */\n product_id?: string | null;\n /**\n * ID of the product price to checkout. Must correspond to a price present in the checkout's product list.\n */\n product_price_id?: string | null;\n /**\n * amount\n */\n amount?: number | null;\n /**\n * Number of seats for seat-based pricing.\n */\n seats?: number | null;\n /**\n * is_business_customer\n */\n is_business_customer?: boolean | null;\n /**\n * customer_name\n */\n customer_name?: string | null;\n /**\n * customer_email\n */\n customer_email?: string | null;\n /**\n * customer_billing_name\n */\n customer_billing_name?: string | null;\n /**\n * customer_billing_address\n */\n customer_billing_address?: AddressInput | null;\n /**\n * customer_tax_id\n */\n customer_tax_id?: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * Discount code to apply to the checkout.\n */\n discount_code?: string | null;\n /**\n * Disable the trial period for the checkout session. It's mainly useful when the trial is blocked because the customer already redeemed one.\n */\n allow_trial?: false | null;\n /**\n * ID of the Stripe confirmation token. Required for fixed prices and custom prices.\n */\n confirmation_token_id?: string | null;\n}\n/**\n * Create a new checkout session from a list of products.\nCustomers will be able to switch between those products.\n\nMetadata set on the checkout will be copied\nto the resulting order and/or subscription.\n */\nexport interface CheckoutCreate {\n /**\n * The interval unit for the trial period.\n */\n trial_interval?: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count?: number | null;\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * ID of the discount to apply to the checkout.\n */\n discount_id?: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes?: boolean;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`.\n */\n require_billing_address?: boolean;\n /**\n * amount\n */\n amount?: number | null;\n /**\n * Predefined number of seats (works with seat-based pricing only)\n */\n seats?: number | null;\n /**\n * Minimum number of seats (works with seat-based pricing only)\n */\n min_seats?: number | null;\n /**\n * Maximum number of seats (works with seat-based pricing only)\n */\n max_seats?: number | null;\n /**\n * Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured.\n */\n allow_trial?: boolean;\n /**\n * ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer.\n */\n customer_id?: string | null;\n /**\n * Whether the customer is a business or an individual. If `true`, the customer will be required to fill their full billing address and billing name.\n */\n is_business_customer?: boolean;\n /**\n * ID of the customer in your system. If a matching customer exists on Polar, the resulting order will be linked to this customer. Otherwise, a new customer will be created with this external ID set.\n */\n external_customer_id?: string | null;\n /**\n * customer_name\n */\n customer_name?: string | null;\n /**\n * customer_email\n */\n customer_email?: string | null;\n /**\n * customer_ip_address\n */\n customer_ip_address?: string | null;\n /**\n * customer_billing_name\n */\n customer_billing_name?: string | null;\n /**\n * customer_billing_address\n */\n customer_billing_address?: AddressInput | null;\n /**\n * customer_tax_id\n */\n customer_tax_id?: string | null;\n /**\n * Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n customer_metadata?: Record<string, string | number | number | boolean>;\n /**\n * ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten.\n */\n subscription_id?: string | null;\n /**\n * URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id.\n */\n success_url?: string | null;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url?: string | null;\n /**\n * If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page.\n */\n embed_origin?: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * currency\n */\n currency?: PresentmentCurrency | null;\n /**\n * List of product IDs available to select at that checkout. The first one will be selected by default.\n */\n products: string[];\n /**\n * Optional mapping of product IDs to a list of ad-hoc prices to create for that product. If not set, catalog prices of the product will be used.\n */\n prices?: Record<\n string,\n (\n | ProductPriceFixedCreate\n | ProductPriceCustomCreate\n | ProductPriceSeatBasedCreate\n | ProductPriceMeteredUnitCreate\n )[]\n > | null;\n}\n/**\n * An event created by Polar when a checkout is created.\n */\nexport interface CheckoutCreatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"checkout.created\";\n /**\n * metadata\n */\n metadata: CheckoutCreatedMetadata;\n}\n/**\n * CheckoutCreatedMetadata\n */\nexport interface CheckoutCreatedMetadata {\n /**\n * checkout_id\n */\n checkout_id: string;\n /**\n * checkout_status\n */\n checkout_status: string;\n /**\n * product_id\n */\n product_id?: string;\n}\n/**\n * Schema for a fixed amount discount that is applied once or forever.\n */\nexport interface CheckoutDiscountFixedOnceForeverDuration {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * type\n */\n type: DiscountType;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * Map of currency to fixed amount to discount from the total.\n */\n amounts: Record<string, number>;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * name\n */\n name: string;\n /**\n * code\n */\n code: string | null;\n}\n/**\n * Schema for a fixed amount discount that is applied on every invoice\nfor a certain number of months.\n */\nexport interface CheckoutDiscountFixedRepeatDuration {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * duration_in_months\n */\n duration_in_months: number;\n /**\n * type\n */\n type: DiscountType;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * Map of currency to fixed amount to discount from the total.\n */\n amounts: Record<string, number>;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * name\n */\n name: string;\n /**\n * code\n */\n code: string | null;\n}\n/**\n * Schema for a percentage discount that is applied once or forever.\n */\nexport interface CheckoutDiscountPercentageOnceForeverDuration {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * type\n */\n type: DiscountType;\n /**\n * Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.\n */\n basis_points: number;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * name\n */\n name: string;\n /**\n * code\n */\n code: string | null;\n}\n/**\n * Schema for a percentage discount that is applied on every invoice\nfor a certain number of months.\n */\nexport interface CheckoutDiscountPercentageRepeatDuration {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * duration_in_months\n */\n duration_in_months: number;\n /**\n * type\n */\n type: DiscountType;\n /**\n * Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.\n */\n basis_points: number;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * name\n */\n name: string;\n /**\n * code\n */\n code: string | null;\n}\n/**\n * Checkout link data.\n */\nexport interface CheckoutLink {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * payment_processor\n */\n payment_processor: PaymentProcessor;\n /**\n * Client secret used to access the checkout link.\n */\n client_secret: string;\n /**\n * URL where the customer will be redirected after a successful payment.\n */\n success_url: string | null;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url: string | null;\n /**\n * Optional label to distinguish links internally\n */\n label: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes: boolean;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.\n */\n require_billing_address: boolean;\n /**\n * ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored.\n */\n discount_id: string | null;\n /**\n * Preconfigured number of seats for seat-based pricing. When set, checkout sessions created from this link are locked to this number of seats and the customer won't be able to change it. All products on the link must use seat-based pricing and allow this number of seats. If the products no longer accommodate this value when the link is opened, it'll be ignored.\n */\n seats: number | null;\n /**\n * The organization ID.\n */\n organization_id: string;\n /**\n * products\n */\n products: CheckoutLinkProduct[];\n /**\n * discount\n */\n discount:\n | (\n | DiscountFixedOnceForeverDurationBase\n | DiscountFixedRepeatDurationBase\n | DiscountPercentageOnceForeverDurationBase\n | DiscountPercentageRepeatDurationBase\n )\n | null;\n /**\n * url\n */\n url: string;\n}\n/**\n * Schema to create a new checkout link from a a single product.\n\n**Deprecated**: Use `CheckoutLinkCreateProducts` instead.\n */\nexport interface CheckoutLinkCreateProduct {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The interval unit for the trial period.\n */\n trial_interval?: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count?: number | null;\n /**\n * Payment processor to use. Currently only Stripe is supported.\n */\n payment_processor: \"stripe\";\n /**\n * Optional label to distinguish links internally\n */\n label?: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes?: boolean;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.\n */\n require_billing_address?: boolean;\n /**\n * ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored.\n */\n discount_id?: string | null;\n /**\n * Preconfigured number of seats for seat-based pricing. When set, checkout sessions created from this link are locked to this number of seats and the customer won't be able to change it. All products on the link must use seat-based pricing and allow this number of seats. If the products no longer accommodate this value when the link is opened, it'll be ignored.\n */\n seats?: number | null;\n /**\n * URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id.\n */\n success_url?: string | null;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url?: string | null;\n /**\n * product_id\n */\n product_id: string;\n}\n/**\n * Schema to create a new checkout link from a a single product price.\n\n**Deprecated**: Use `CheckoutLinkCreateProducts` instead.\n */\nexport interface CheckoutLinkCreateProductPrice {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The interval unit for the trial period.\n */\n trial_interval?: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count?: number | null;\n /**\n * Payment processor to use. Currently only Stripe is supported.\n */\n payment_processor: \"stripe\";\n /**\n * Optional label to distinguish links internally\n */\n label?: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes?: boolean;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.\n */\n require_billing_address?: boolean;\n /**\n * ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored.\n */\n discount_id?: string | null;\n /**\n * Preconfigured number of seats for seat-based pricing. When set, checkout sessions created from this link are locked to this number of seats and the customer won't be able to change it. All products on the link must use seat-based pricing and allow this number of seats. If the products no longer accommodate this value when the link is opened, it'll be ignored.\n */\n seats?: number | null;\n /**\n * URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id.\n */\n success_url?: string | null;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url?: string | null;\n /**\n * product_price_id\n */\n product_price_id: string;\n}\n/**\n * Schema to create a new checkout link.\n */\nexport interface CheckoutLinkCreateProducts {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The interval unit for the trial period.\n */\n trial_interval?: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count?: number | null;\n /**\n * Payment processor to use. Currently only Stripe is supported.\n */\n payment_processor: \"stripe\";\n /**\n * Optional label to distinguish links internally\n */\n label?: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes?: boolean;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.\n */\n require_billing_address?: boolean;\n /**\n * ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored.\n */\n discount_id?: string | null;\n /**\n * Preconfigured number of seats for seat-based pricing. When set, checkout sessions created from this link are locked to this number of seats and the customer won't be able to change it. All products on the link must use seat-based pricing and allow this number of seats. If the products no longer accommodate this value when the link is opened, it'll be ignored.\n */\n seats?: number | null;\n /**\n * URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id.\n */\n success_url?: string | null;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url?: string | null;\n /**\n * List of products that will be available to select at checkout.\n */\n products: string[];\n}\n/**\n * Product data for a checkout link.\n */\nexport interface CheckoutLinkProduct {\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description: string | null;\n /**\n * visibility\n */\n visibility: ProductVisibility;\n /**\n * The recurring interval of the product. If `None`, the product is a one-time purchase.\n */\n recurring_interval: RecurringInterval | null;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.\n */\n recurring_interval_count: number | null;\n /**\n * The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval.\n */\n meter_interval: RecurringInterval | null;\n /**\n * Number of meter interval units. None when no meter cycle is set.\n */\n meter_interval_count: number | null;\n /**\n * Whether the product is a subscription.\n */\n is_recurring: boolean;\n /**\n * Whether the product is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the organization owning the product.\n */\n organization_id: string;\n /**\n * List of prices for this product.\n */\n prices: (LegacyRecurringProductPrice | ProductPrice)[];\n /**\n * List of benefits granted by the product.\n */\n benefits: BenefitPublic[];\n /**\n * List of medias associated to the product.\n */\n medias: ProductMediaFileRead[];\n}\n/**\n * Schema to update an existing checkout link.\n */\nexport interface CheckoutLinkUpdate {\n /**\n * The interval unit for the trial period.\n */\n trial_interval?: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count?: number | null;\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * List of products that will be available to select at checkout.\n */\n products?: string[] | null;\n /**\n * label\n */\n label?: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes?: boolean | null;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.\n */\n require_billing_address?: boolean | null;\n /**\n * ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored.\n */\n discount_id?: string | null;\n /**\n * Preconfigured number of seats for seat-based pricing. When set, checkout sessions created from this link are locked to this number of seats and the customer won't be able to change it. All products on the link must use seat-based pricing and allow this number of seats. If the products no longer accommodate this value when the link is opened, it'll be ignored.\n */\n seats?: number | null;\n /**\n * URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id.\n */\n success_url?: string | null;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url?: string | null;\n}\n/**\n * CheckoutOrganization\n */\nexport interface CheckoutOrganization {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Organization name shown in checkout, customer portal, emails etc.\n */\n name: string;\n /**\n * Unique organization slug in checkout, customer portal and credit card statements.\n */\n slug: string;\n /**\n * Avatar URL shown in checkout, customer portal, emails etc.\n */\n avatar_url: string | null;\n /**\n * proration_behavior\n */\n proration_behavior: SubscriptionProrationBehavior;\n /**\n * Whether customers can update their subscriptions from the customer portal.\n */\n allow_customer_updates: boolean;\n}\n/**\n * Product data for a checkout session.\n */\nexport interface CheckoutProduct {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description: string | null;\n /**\n * visibility\n */\n visibility: ProductVisibility;\n /**\n * The recurring interval of the product. If `None`, the product is a one-time purchase.\n */\n recurring_interval: RecurringInterval | null;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.\n */\n recurring_interval_count: number | null;\n /**\n * The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval.\n */\n meter_interval: RecurringInterval | null;\n /**\n * Number of meter interval units. None when no meter cycle is set.\n */\n meter_interval_count: number | null;\n /**\n * Whether the product is a subscription.\n */\n is_recurring: boolean;\n /**\n * Whether the product is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the organization owning the product.\n */\n organization_id: string;\n /**\n * List of prices for this product.\n */\n prices: (LegacyRecurringProductPrice | ProductPrice)[];\n /**\n * List of benefits granted by the product.\n */\n benefits: BenefitPublic[];\n /**\n * List of medias associated to the product.\n */\n medias: ProductMediaFileRead[];\n}\n/**\n * Checkout session data retrieved using the client secret.\n */\nexport interface CheckoutPublic {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * payment_processor\n */\n payment_processor: PaymentProcessor;\n /**\n * status\n */\n status: CheckoutStatus;\n /**\n * Client secret used to update and complete the checkout session from the client.\n */\n client_secret: string;\n /**\n * URL where the customer can access the checkout session.\n */\n url: string;\n /**\n * Expiration date and time of the checkout session.\n */\n expires_at: string;\n /**\n * URL where the customer will be redirected after a successful payment.\n */\n success_url: string;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url: string | null;\n /**\n * When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page.\n */\n embed_origin: string | null;\n /**\n * Amount in cents, before discounts and taxes.\n */\n amount: number;\n /**\n * Predefined number of seats (works with seat-based pricing only)\n */\n seats?: number | null;\n /**\n * Minimum number of seats (works with seat-based pricing only)\n */\n min_seats?: number | null;\n /**\n * Maximum number of seats (works with seat-based pricing only)\n */\n max_seats?: number | null;\n /**\n * Discount amount in cents.\n */\n discount_amount: number;\n /**\n * Amount in cents, after discounts but before taxes.\n */\n net_amount: number;\n /**\n * Sales tax amount in cents. If `null`, it means there is no enough information yet to calculate it.\n */\n tax_amount: number | null;\n /**\n * Tax behavior of the checkout. `inclusive` means the price includes tax, `exclusive` means tax is added on top. If `null`, tax is not yet calculated.\n */\n tax_behavior: TaxBehavior | null;\n /**\n * Amount in cents, after discounts and taxes.\n */\n total_amount: number;\n /**\n * Currency code of the checkout session.\n */\n currency: string;\n /**\n * Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured.\n */\n allow_trial: boolean | null;\n /**\n * Interval unit of the trial period, if any. This value is either set from the checkout, if `trial_interval` is set, or from the selected product.\n */\n active_trial_interval: TrialInterval | null;\n /**\n * Number of interval units of the trial period, if any. This value is either set from the checkout, if `trial_interval_count` is set, or from the selected product.\n */\n active_trial_interval_count: number | null;\n /**\n * End date and time of the trial period, if any.\n */\n trial_end: string | null;\n /**\n * ID of the organization owning the checkout session.\n */\n organization_id: string;\n /**\n * ID of the product to checkout.\n */\n product_id: string | null;\n /**\n * ID of the product price to checkout.\n */\n product_price_id: string | null;\n /**\n * ID of the discount applied to the checkout.\n */\n discount_id: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes: boolean;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`.\n */\n require_billing_address: boolean;\n /**\n * Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable.\n */\n is_discount_applicable: boolean;\n /**\n * Whether the product price is free, regardless of discounts.\n */\n is_free_product_price: boolean;\n /**\n * Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount.\n */\n is_payment_required: boolean;\n /**\n * Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles.\n */\n is_payment_setup_required: boolean;\n /**\n * Whether the checkout requires a payment form, whether because of a payment or payment method setup.\n */\n is_payment_form_required: boolean;\n /**\n * customer_id\n */\n customer_id: string | null;\n /**\n * Whether the customer is a business or an individual. If `true`, the customer will be required to fill their full billing address and billing name.\n */\n is_business_customer: boolean;\n /**\n * Name of the customer.\n */\n customer_name: string | null;\n /**\n * Email address of the customer.\n */\n customer_email: string | null;\n /**\n * customer_ip_address\n */\n customer_ip_address: string | null;\n /**\n * customer_billing_name\n */\n customer_billing_name: string | null;\n /**\n * customer_billing_address\n */\n customer_billing_address: Address | null;\n /**\n * customer_tax_id\n */\n customer_tax_id: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * payment_processor_metadata\n */\n payment_processor_metadata: Record<string, string>;\n /**\n * billing_address_fields\n */\n billing_address_fields: CheckoutBillingAddressFields;\n /**\n * List of products available to select.\n */\n products: CheckoutProduct[];\n /**\n * Product selected to checkout.\n */\n product: CheckoutProduct | null;\n /**\n * Price of the selected product.\n */\n product_price: (LegacyRecurringProductPrice | ProductPrice) | null;\n /**\n * Mapping of product IDs to their list of prices.\n */\n prices: Record<string, (LegacyRecurringProductPrice | ProductPrice)[]> | null;\n /**\n * discount\n */\n discount:\n | (\n | CheckoutDiscountFixedOnceForeverDuration\n | CheckoutDiscountFixedRepeatDuration\n | CheckoutDiscountPercentageOnceForeverDuration\n | CheckoutDiscountPercentageRepeatDuration\n )\n | null;\n /**\n * organization\n */\n organization: CheckoutOrganization;\n /**\n * attached_custom_fields\n */\n attached_custom_fields: AttachedCustomField[] | null;\n}\n/**\n * Checkout session data retrieved using the client secret after confirmation.\n\nIt contains a customer session token to retrieve order information\nright after the checkout.\n */\nexport interface CheckoutPublicConfirmed {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * payment_processor\n */\n payment_processor: PaymentProcessor;\n /**\n * status\n */\n status: \"confirmed\";\n /**\n * Client secret used to update and complete the checkout session from the client.\n */\n client_secret: string;\n /**\n * URL where the customer can access the checkout session.\n */\n url: string;\n /**\n * Expiration date and time of the checkout session.\n */\n expires_at: string;\n /**\n * URL where the customer will be redirected after a successful payment.\n */\n success_url: string;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url: string | null;\n /**\n * When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page.\n */\n embed_origin: string | null;\n /**\n * Amount in cents, before discounts and taxes.\n */\n amount: number;\n /**\n * Predefined number of seats (works with seat-based pricing only)\n */\n seats?: number | null;\n /**\n * Minimum number of seats (works with seat-based pricing only)\n */\n min_seats?: number | null;\n /**\n * Maximum number of seats (works with seat-based pricing only)\n */\n max_seats?: number | null;\n /**\n * Discount amount in cents.\n */\n discount_amount: number;\n /**\n * Amount in cents, after discounts but before taxes.\n */\n net_amount: number;\n /**\n * Sales tax amount in cents. If `null`, it means there is no enough information yet to calculate it.\n */\n tax_amount: number | null;\n /**\n * Tax behavior of the checkout. `inclusive` means the price includes tax, `exclusive` means tax is added on top. If `null`, tax is not yet calculated.\n */\n tax_behavior: TaxBehavior | null;\n /**\n * Amount in cents, after discounts and taxes.\n */\n total_amount: number;\n /**\n * Currency code of the checkout session.\n */\n currency: string;\n /**\n * Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured.\n */\n allow_trial: boolean | null;\n /**\n * Interval unit of the trial period, if any. This value is either set from the checkout, if `trial_interval` is set, or from the selected product.\n */\n active_trial_interval: TrialInterval | null;\n /**\n * Number of interval units of the trial period, if any. This value is either set from the checkout, if `trial_interval_count` is set, or from the selected product.\n */\n active_trial_interval_count: number | null;\n /**\n * End date and time of the trial period, if any.\n */\n trial_end: string | null;\n /**\n * ID of the organization owning the checkout session.\n */\n organization_id: string;\n /**\n * ID of the product to checkout.\n */\n product_id: string | null;\n /**\n * ID of the product price to checkout.\n */\n product_price_id: string | null;\n /**\n * ID of the discount applied to the checkout.\n */\n discount_id: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes: boolean;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`.\n */\n require_billing_address: boolean;\n /**\n * Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable.\n */\n is_discount_applicable: boolean;\n /**\n * Whether the product price is free, regardless of discounts.\n */\n is_free_product_price: boolean;\n /**\n * Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount.\n */\n is_payment_required: boolean;\n /**\n * Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles.\n */\n is_payment_setup_required: boolean;\n /**\n * Whether the checkout requires a payment form, whether because of a payment or payment method setup.\n */\n is_payment_form_required: boolean;\n /**\n * customer_id\n */\n customer_id: string | null;\n /**\n * Whether the customer is a business or an individual. If `true`, the customer will be required to fill their full billing address and billing name.\n */\n is_business_customer: boolean;\n /**\n * Name of the customer.\n */\n customer_name: string | null;\n /**\n * Email address of the customer.\n */\n customer_email: string | null;\n /**\n * customer_ip_address\n */\n customer_ip_address: string | null;\n /**\n * customer_billing_name\n */\n customer_billing_name: string | null;\n /**\n * customer_billing_address\n */\n customer_billing_address: Address | null;\n /**\n * customer_tax_id\n */\n customer_tax_id: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * payment_processor_metadata\n */\n payment_processor_metadata: Record<string, string>;\n /**\n * billing_address_fields\n */\n billing_address_fields: CheckoutBillingAddressFields;\n /**\n * List of products available to select.\n */\n products: CheckoutProduct[];\n /**\n * Product selected to checkout.\n */\n product: CheckoutProduct | null;\n /**\n * Price of the selected product.\n */\n product_price: (LegacyRecurringProductPrice | ProductPrice) | null;\n /**\n * Mapping of product IDs to their list of prices.\n */\n prices: Record<string, (LegacyRecurringProductPrice | ProductPrice)[]> | null;\n /**\n * discount\n */\n discount:\n | (\n | CheckoutDiscountFixedOnceForeverDuration\n | CheckoutDiscountFixedRepeatDuration\n | CheckoutDiscountPercentageOnceForeverDuration\n | CheckoutDiscountPercentageRepeatDuration\n )\n | null;\n /**\n * organization\n */\n organization: CheckoutOrganization;\n /**\n * attached_custom_fields\n */\n attached_custom_fields: AttachedCustomField[] | null;\n /**\n * customer_session_token\n */\n customer_session_token: string | null;\n}\n/**\n * Update an existing checkout session using an access token.\n */\nexport interface CheckoutUpdate {\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * ID of the product to checkout. Must be present in the checkout's product list.\n */\n product_id?: string | null;\n /**\n * ID of the product price to checkout. Must correspond to a price present in the checkout's product list.\n */\n product_price_id?: string | null;\n /**\n * amount\n */\n amount?: number | null;\n /**\n * Number of seats for seat-based pricing.\n */\n seats?: number | null;\n /**\n * is_business_customer\n */\n is_business_customer?: boolean | null;\n /**\n * customer_name\n */\n customer_name?: string | null;\n /**\n * customer_email\n */\n customer_email?: string | null;\n /**\n * customer_billing_name\n */\n customer_billing_name?: string | null;\n /**\n * customer_billing_address\n */\n customer_billing_address?: AddressInput | null;\n /**\n * customer_tax_id\n */\n customer_tax_id?: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval?: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count?: number | null;\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * currency\n */\n currency?: PresentmentCurrency | null;\n /**\n * ID of the discount to apply to the checkout.\n */\n discount_id?: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes?: boolean | null;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`.\n */\n require_billing_address?: boolean | null;\n /**\n * Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured.\n */\n allow_trial?: boolean | null;\n /**\n * customer_ip_address\n */\n customer_ip_address?: string | null;\n /**\n * Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n customer_metadata?: Record<string, string | number | number | boolean> | null;\n /**\n * URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id.\n */\n success_url?: string | null;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url?: string | null;\n /**\n * If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page.\n */\n embed_origin?: string | null;\n}\n/**\n * Update an existing checkout session using the client secret.\n */\nexport interface CheckoutUpdatePublic {\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * ID of the product to checkout. Must be present in the checkout's product list.\n */\n product_id?: string | null;\n /**\n * ID of the product price to checkout. Must correspond to a price present in the checkout's product list.\n */\n product_price_id?: string | null;\n /**\n * amount\n */\n amount?: number | null;\n /**\n * Number of seats for seat-based pricing.\n */\n seats?: number | null;\n /**\n * is_business_customer\n */\n is_business_customer?: boolean | null;\n /**\n * customer_name\n */\n customer_name?: string | null;\n /**\n * customer_email\n */\n customer_email?: string | null;\n /**\n * customer_billing_name\n */\n customer_billing_name?: string | null;\n /**\n * customer_billing_address\n */\n customer_billing_address?: AddressInput | null;\n /**\n * customer_tax_id\n */\n customer_tax_id?: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * Discount code to apply to the checkout.\n */\n discount_code?: string | null;\n /**\n * Disable the trial period for the checkout session. It's mainly useful when the trial is blocked because the customer already redeemed one.\n */\n allow_trial?: false | null;\n}\n/**\n * Context\n */\nexport interface Context extends Record<string, never> {}\n/**\n * CostMetadataInput\n */\nexport interface CostMetadataInput {\n /**\n * The amount in cents.\n */\n amount: number | string;\n /**\n * The currency. Currently, only `usd` is supported.\n */\n currency: string;\n}\n/**\n * CostMetadataOutput\n */\nexport interface CostMetadataOutput {\n /**\n * The amount in cents.\n */\n amount: string;\n /**\n * The currency. Currently, only `usd` is supported.\n */\n currency: string;\n}\n/**\n * CountAggregation\n */\nexport interface CountAggregation {\n /**\n * func\n */\n func?: \"count\";\n}\n/**\n * CursorPagination\n */\nexport interface CursorPagination {\n /**\n * has_next_page\n */\n has_next_page: boolean;\n}\n/**\n * Schema for a custom field of type checkbox.\n */\nexport interface CustomFieldCheckbox {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * type\n */\n type: \"checkbox\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field.\n */\n organization_id: string;\n /**\n * properties\n */\n properties: CustomFieldCheckboxProperties;\n}\n/**\n * CustomFieldCheckboxProperties\n */\nexport interface CustomFieldCheckboxProperties {\n /**\n * form_label\n */\n form_label?: string;\n /**\n * form_help_text\n */\n form_help_text?: string;\n /**\n * form_placeholder\n */\n form_placeholder?: string;\n}\n/**\n * Schema to create a custom field of type checkbox.\n */\nexport interface CustomFieldCreateCheckbox {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"checkbox\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * properties\n */\n properties: CustomFieldCheckboxProperties;\n}\n/**\n * Schema to create a custom field of type date.\n */\nexport interface CustomFieldCreateDate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"date\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * properties\n */\n properties: CustomFieldDateProperties;\n}\n/**\n * Schema to create a custom field of type number.\n */\nexport interface CustomFieldCreateNumber {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"number\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * properties\n */\n properties: CustomFieldNumberProperties;\n}\n/**\n * Schema to create a custom field of type select.\n */\nexport interface CustomFieldCreateSelect {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"select\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * properties\n */\n properties: CustomFieldSelectProperties;\n}\n/**\n * Schema to create a custom field of type text.\n */\nexport interface CustomFieldCreateText {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"text\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * properties\n */\n properties: CustomFieldTextProperties;\n}\n/**\n * Schema for a custom field of type date.\n */\nexport interface CustomFieldDate {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * type\n */\n type: \"date\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field.\n */\n organization_id: string;\n /**\n * properties\n */\n properties: CustomFieldDateProperties;\n}\n/**\n * CustomFieldDateProperties\n */\nexport interface CustomFieldDateProperties {\n /**\n * form_label\n */\n form_label?: string;\n /**\n * form_help_text\n */\n form_help_text?: string;\n /**\n * form_placeholder\n */\n form_placeholder?: string;\n /**\n * ge\n */\n ge?: number;\n /**\n * le\n */\n le?: number;\n}\n/**\n * Schema for a custom field of type number.\n */\nexport interface CustomFieldNumber {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * type\n */\n type: \"number\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field.\n */\n organization_id: string;\n /**\n * properties\n */\n properties: CustomFieldNumberProperties;\n}\n/**\n * CustomFieldNumberProperties\n */\nexport interface CustomFieldNumberProperties {\n /**\n * form_label\n */\n form_label?: string;\n /**\n * form_help_text\n */\n form_help_text?: string;\n /**\n * form_placeholder\n */\n form_placeholder?: string;\n /**\n * ge\n */\n ge?: number;\n /**\n * le\n */\n le?: number;\n}\n/**\n * Schema for a custom field of type select.\n */\nexport interface CustomFieldSelect {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * type\n */\n type: \"select\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field.\n */\n organization_id: string;\n /**\n * properties\n */\n properties: CustomFieldSelectProperties;\n}\n/**\n * CustomFieldSelectOption\n */\nexport interface CustomFieldSelectOption {\n /**\n * value\n */\n value: string;\n /**\n * label\n */\n label: string;\n}\n/**\n * CustomFieldSelectProperties\n */\nexport interface CustomFieldSelectProperties {\n /**\n * form_label\n */\n form_label?: string;\n /**\n * form_help_text\n */\n form_help_text?: string;\n /**\n * form_placeholder\n */\n form_placeholder?: string;\n /**\n * options\n */\n options: CustomFieldSelectOption[];\n}\n/**\n * Schema for a custom field of type text.\n */\nexport interface CustomFieldText {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * type\n */\n type: \"text\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field.\n */\n organization_id: string;\n /**\n * properties\n */\n properties: CustomFieldTextProperties;\n}\n/**\n * CustomFieldTextProperties\n */\nexport interface CustomFieldTextProperties {\n /**\n * form_label\n */\n form_label?: string;\n /**\n * form_help_text\n */\n form_help_text?: string;\n /**\n * form_placeholder\n */\n form_placeholder?: string;\n /**\n * textarea\n */\n textarea?: boolean;\n /**\n * min_length\n */\n min_length?: number;\n /**\n * max_length\n */\n max_length?: number;\n}\n/**\n * Schema to update a custom field of type checkbox.\n */\nexport interface CustomFieldUpdateCheckbox {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * name\n */\n name?: string | null;\n /**\n * slug\n */\n slug?: string | null;\n /**\n * type\n */\n type: \"checkbox\";\n /**\n * properties\n */\n properties?: CustomFieldCheckboxProperties | null;\n}\n/**\n * Schema to update a custom field of type date.\n */\nexport interface CustomFieldUpdateDate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * name\n */\n name?: string | null;\n /**\n * slug\n */\n slug?: string | null;\n /**\n * type\n */\n type: \"date\";\n /**\n * properties\n */\n properties?: CustomFieldDateProperties | null;\n}\n/**\n * Schema to update a custom field of type number.\n */\nexport interface CustomFieldUpdateNumber {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * name\n */\n name?: string | null;\n /**\n * slug\n */\n slug?: string | null;\n /**\n * type\n */\n type: \"number\";\n /**\n * properties\n */\n properties?: CustomFieldNumberProperties | null;\n}\n/**\n * Schema to update a custom field of type select.\n */\nexport interface CustomFieldUpdateSelect {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * name\n */\n name?: string | null;\n /**\n * slug\n */\n slug?: string | null;\n /**\n * type\n */\n type: \"select\";\n /**\n * properties\n */\n properties?: CustomFieldSelectProperties | null;\n}\n/**\n * Schema to update a custom field of type text.\n */\nexport interface CustomFieldUpdateText {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * name\n */\n name?: string | null;\n /**\n * slug\n */\n slug?: string | null;\n /**\n * type\n */\n type: \"text\";\n /**\n * properties\n */\n properties?: CustomFieldTextProperties | null;\n}\n/**\n * CustomerBenefitGrantCustom\n */\nexport interface CustomerBenefitGrantCustom {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * granted_at\n */\n granted_at: string | null;\n /**\n * revoked_at\n */\n revoked_at: string | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * member_id\n */\n member_id?: string | null;\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * order_id\n */\n order_id: string | null;\n /**\n * is_granted\n */\n is_granted: boolean;\n /**\n * is_revoked\n */\n is_revoked: boolean;\n /**\n * error\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: CustomerPortalCustomer;\n /**\n * benefit\n */\n benefit: BenefitCustomSubscriber;\n /**\n * properties\n */\n properties: BenefitGrantCustomProperties;\n}\n/**\n * CustomerBenefitGrantCustomUpdate\n */\nexport interface CustomerBenefitGrantCustomUpdate {\n /**\n * benefit_type\n */\n benefit_type: \"custom\";\n}\n/**\n * CustomerBenefitGrantDiscord\n */\nexport interface CustomerBenefitGrantDiscord {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * granted_at\n */\n granted_at: string | null;\n /**\n * revoked_at\n */\n revoked_at: string | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * member_id\n */\n member_id?: string | null;\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * order_id\n */\n order_id: string | null;\n /**\n * is_granted\n */\n is_granted: boolean;\n /**\n * is_revoked\n */\n is_revoked: boolean;\n /**\n * error\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: CustomerPortalCustomer;\n /**\n * benefit\n */\n benefit: BenefitDiscordSubscriber;\n /**\n * properties\n */\n properties: BenefitGrantDiscordProperties;\n}\n/**\n * CustomerBenefitGrantDiscordPropertiesUpdate\n */\nexport interface CustomerBenefitGrantDiscordPropertiesUpdate {\n /**\n * account_id\n */\n account_id: string | null;\n}\n/**\n * CustomerBenefitGrantDiscordUpdate\n */\nexport interface CustomerBenefitGrantDiscordUpdate {\n /**\n * benefit_type\n */\n benefit_type: \"discord\";\n /**\n * properties\n */\n properties: CustomerBenefitGrantDiscordPropertiesUpdate;\n}\n/**\n * CustomerBenefitGrantDownloadables\n */\nexport interface CustomerBenefitGrantDownloadables {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * granted_at\n */\n granted_at: string | null;\n /**\n * revoked_at\n */\n revoked_at: string | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * member_id\n */\n member_id?: string | null;\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * order_id\n */\n order_id: string | null;\n /**\n * is_granted\n */\n is_granted: boolean;\n /**\n * is_revoked\n */\n is_revoked: boolean;\n /**\n * error\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: CustomerPortalCustomer;\n /**\n * benefit\n */\n benefit: BenefitDownloadablesSubscriber;\n /**\n * properties\n */\n properties: BenefitGrantDownloadablesProperties;\n}\n/**\n * CustomerBenefitGrantDownloadablesUpdate\n */\nexport interface CustomerBenefitGrantDownloadablesUpdate {\n /**\n * benefit_type\n */\n benefit_type: \"downloadables\";\n}\n/**\n * CustomerBenefitGrantFeatureFlag\n */\nexport interface CustomerBenefitGrantFeatureFlag {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * granted_at\n */\n granted_at: string | null;\n /**\n * revoked_at\n */\n revoked_at: string | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * member_id\n */\n member_id?: string | null;\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * order_id\n */\n order_id: string | null;\n /**\n * is_granted\n */\n is_granted: boolean;\n /**\n * is_revoked\n */\n is_revoked: boolean;\n /**\n * error\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: CustomerPortalCustomer;\n /**\n * benefit\n */\n benefit: BenefitFeatureFlagSubscriber;\n /**\n * properties\n */\n properties: BenefitGrantFeatureFlagProperties;\n}\n/**\n * CustomerBenefitGrantFeatureFlagUpdate\n */\nexport interface CustomerBenefitGrantFeatureFlagUpdate {\n /**\n * benefit_type\n */\n benefit_type: \"feature_flag\";\n}\n/**\n * CustomerBenefitGrantGitHubRepository\n */\nexport interface CustomerBenefitGrantGitHubRepository {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * granted_at\n */\n granted_at: string | null;\n /**\n * revoked_at\n */\n revoked_at: string | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * member_id\n */\n member_id?: string | null;\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * order_id\n */\n order_id: string | null;\n /**\n * is_granted\n */\n is_granted: boolean;\n /**\n * is_revoked\n */\n is_revoked: boolean;\n /**\n * error\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: CustomerPortalCustomer;\n /**\n * benefit\n */\n benefit: BenefitGitHubRepositorySubscriber;\n /**\n * properties\n */\n properties: BenefitGrantGitHubRepositoryProperties;\n}\n/**\n * CustomerBenefitGrantGitHubRepositoryPropertiesUpdate\n */\nexport interface CustomerBenefitGrantGitHubRepositoryPropertiesUpdate {\n /**\n * account_id\n */\n account_id: string | null;\n}\n/**\n * CustomerBenefitGrantGitHubRepositoryUpdate\n */\nexport interface CustomerBenefitGrantGitHubRepositoryUpdate {\n /**\n * benefit_type\n */\n benefit_type: \"github_repository\";\n /**\n * properties\n */\n properties: CustomerBenefitGrantGitHubRepositoryPropertiesUpdate;\n}\n/**\n * CustomerBenefitGrantLicenseKeys\n */\nexport interface CustomerBenefitGrantLicenseKeys {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * granted_at\n */\n granted_at: string | null;\n /**\n * revoked_at\n */\n revoked_at: string | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * member_id\n */\n member_id?: string | null;\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * order_id\n */\n order_id: string | null;\n /**\n * is_granted\n */\n is_granted: boolean;\n /**\n * is_revoked\n */\n is_revoked: boolean;\n /**\n * error\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: CustomerPortalCustomer;\n /**\n * benefit\n */\n benefit: BenefitLicenseKeysSubscriber;\n /**\n * properties\n */\n properties: BenefitGrantLicenseKeysProperties;\n}\n/**\n * CustomerBenefitGrantLicenseKeysUpdate\n */\nexport interface CustomerBenefitGrantLicenseKeysUpdate {\n /**\n * benefit_type\n */\n benefit_type: \"license_keys\";\n}\n/**\n * CustomerBenefitGrantMeterCredit\n */\nexport interface CustomerBenefitGrantMeterCredit {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * granted_at\n */\n granted_at: string | null;\n /**\n * revoked_at\n */\n revoked_at: string | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * member_id\n */\n member_id?: string | null;\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * order_id\n */\n order_id: string | null;\n /**\n * is_granted\n */\n is_granted: boolean;\n /**\n * is_revoked\n */\n is_revoked: boolean;\n /**\n * error\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: CustomerPortalCustomer;\n /**\n * benefit\n */\n benefit: BenefitMeterCreditSubscriber;\n /**\n * properties\n */\n properties: BenefitGrantMeterCreditProperties;\n}\n/**\n * CustomerBenefitGrantMeterCreditUpdate\n */\nexport interface CustomerBenefitGrantMeterCreditUpdate {\n /**\n * benefit_type\n */\n benefit_type: \"meter_credit\";\n}\n/**\n * CustomerBenefitGrantSlackSharedChannel\n */\nexport interface CustomerBenefitGrantSlackSharedChannel {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * granted_at\n */\n granted_at: string | null;\n /**\n * revoked_at\n */\n revoked_at: string | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * member_id\n */\n member_id?: string | null;\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * order_id\n */\n order_id: string | null;\n /**\n * is_granted\n */\n is_granted: boolean;\n /**\n * is_revoked\n */\n is_revoked: boolean;\n /**\n * error\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: CustomerPortalCustomer;\n /**\n * benefit\n */\n benefit: BenefitSlackSharedChannelSubscriber;\n /**\n * properties\n */\n properties: BenefitGrantSlackSharedChannelProperties;\n}\n/**\n * CustomerBenefitGrantSlackSharedChannelPropertiesUpdate\n */\nexport interface CustomerBenefitGrantSlackSharedChannelPropertiesUpdate {\n /**\n * invited_email\n */\n invited_email: string;\n}\n/**\n * CustomerBenefitGrantSlackSharedChannelUpdate\n */\nexport interface CustomerBenefitGrantSlackSharedChannelUpdate {\n /**\n * benefit_type\n */\n benefit_type: \"slack_shared_channel\";\n /**\n * properties\n */\n properties: CustomerBenefitGrantSlackSharedChannelPropertiesUpdate;\n}\n/**\n * An event created by Polar when a customer is created.\n */\nexport interface CustomerCreatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"customer.created\";\n /**\n * metadata\n */\n metadata: CustomerCreatedMetadata;\n}\n/**\n * CustomerCreatedMetadata\n */\nexport interface CustomerCreatedMetadata {\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * customer_email\n */\n customer_email: string | null;\n /**\n * customer_name\n */\n customer_name: string | null;\n /**\n * customer_external_id\n */\n customer_external_id: string | null;\n}\n/**\n * CustomerCustomerMeter\n */\nexport interface CustomerCustomerMeter {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the customer.\n */\n customer_id: string;\n /**\n * The ID of the meter.\n */\n meter_id: string;\n /**\n * The number of consumed units.\n */\n consumed_units: number;\n /**\n * The number of credited units.\n */\n credited_units: number;\n /**\n * The balance of the meter, i.e. the difference between credited and consumed units.\n */\n balance: number;\n /**\n * meter\n */\n meter: CustomerCustomerMeterMeter;\n}\n/**\n * CustomerCustomerMeterMeter\n */\nexport interface CustomerCustomerMeterMeter {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The name of the meter. Will be shown on customer's invoices and usage.\n */\n name: string;\n}\n/**\n * CustomerCustomerSession\n */\nexport interface CustomerCustomerSession {\n /**\n * expires_at\n */\n expires_at: string;\n /**\n * return_url\n */\n return_url: string | null;\n}\n/**\n * An event created by Polar when a customer is deleted.\n */\nexport interface CustomerDeletedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"customer.deleted\";\n /**\n * metadata\n */\n metadata: CustomerDeletedMetadata;\n}\n/**\n * CustomerDeletedMetadata\n */\nexport interface CustomerDeletedMetadata {\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * customer_email\n */\n customer_email: string | null;\n /**\n * customer_name\n */\n customer_name: string | null;\n /**\n * customer_external_id\n */\n customer_external_id: string | null;\n}\n/**\n * CustomerEmailUpdateRequest\n */\nexport interface CustomerEmailUpdateRequest {\n /**\n * email\n */\n email: string;\n}\n/**\n * CustomerEmailUpdateVerifyRequest\n */\nexport interface CustomerEmailUpdateVerifyRequest {\n /**\n * token\n */\n token: string;\n}\n/**\n * CustomerEmailUpdateVerifyResponse\n */\nexport interface CustomerEmailUpdateVerifyResponse {\n /**\n * token\n */\n token: string;\n}\n/**\n * A customer in an organization.\n */\nexport interface CustomerIndividual {\n /**\n * The ID of the customer.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email: string;\n /**\n * Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.\n */\n email_verified: boolean;\n /**\n * The type of customer.\n */\n type: \"individual\";\n /**\n * The name of the customer.\n */\n name: string | null;\n /**\n * The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * tax_id\n */\n tax_id: unknown[] | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer.\n */\n organization_id: string;\n /**\n * The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details.\n */\n default_payment_method_id?: string | null;\n /**\n * Timestamp for when the customer was soft deleted.\n */\n deleted_at: string | null;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n}\n/**\n * CustomerIndividualCreate\n */\nexport interface CustomerIndividualCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * name\n */\n name?: string | null;\n /**\n * billing_address\n */\n billing_address?: AddressInput | null;\n /**\n * tax_id\n */\n tax_id?: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * Optional owner member to create with the customer. If not provided, an owner member will be automatically created using the customer's email and name.\n */\n owner?: MemberOwnerCreate | null;\n /**\n * type\n */\n type?: \"individual\";\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email: string;\n}\n/**\n * An active customer meter, with current consumed and credited units.\n */\nexport interface CustomerMeter {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the customer.\n */\n customer_id: string;\n /**\n * The ID of the meter.\n */\n meter_id: string;\n /**\n * The number of consumed units.\n */\n consumed_units: number;\n /**\n * The number of credited units.\n */\n credited_units: number;\n /**\n * The balance of the meter, i.e. the difference between credited and consumed units.\n */\n balance: number;\n /**\n * customer\n */\n customer: Customer;\n /**\n * meter\n */\n meter: Meter;\n}\n/**\n * CustomerNotReady\n */\nexport interface CustomerNotReady {\n /**\n * error\n */\n error: \"CustomerNotReady\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * CustomerOrder\n */\nexport interface CustomerOrder {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * status\n */\n status: OrderStatus;\n /**\n * Whether the order has been paid for.\n */\n paid: boolean;\n /**\n * Amount in cents, before discounts and taxes.\n */\n subtotal_amount: number;\n /**\n * Discount amount in cents.\n */\n discount_amount: number;\n /**\n * Amount in cents, after discounts but before taxes.\n */\n net_amount: number;\n /**\n * Sales tax amount in cents.\n */\n tax_amount: number;\n /**\n * Amount in cents, after discounts and taxes.\n */\n total_amount: number;\n /**\n * Customer's balance amount applied to this invoice. Can increase the total amount paid, if the customer has a negative balance, or decrease it, if the customer has a positive balance.Amount in cents.\n */\n applied_balance_amount: number;\n /**\n * Amount in cents that is due for this order.\n */\n due_amount: number;\n /**\n * Amount refunded in cents.\n */\n refunded_amount: number;\n /**\n * Sales tax refunded in cents.\n */\n refunded_tax_amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * billing_reason\n */\n billing_reason: OrderBillingReason;\n /**\n * The name of the customer that should appear on the invoice.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * The invoice number associated with this order. `null` while the order is in `draft` status; assigned at finalize.\n */\n invoice_number: string | null;\n /**\n * Whether an invoice has been generated for this order.\n */\n is_invoice_generated: boolean;\n /**\n * The receipt number for this order. Set once the order is paid for organizations with receipts enabled. When set, a downloadable receipt PDF can be obtained via the receipt endpoint.\n */\n receipt_number: string | null;\n /**\n * Number of seats purchased (for seat-based one-time orders).\n */\n seats?: number | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * product_id\n */\n product_id: string | null;\n /**\n * discount_id\n */\n discount_id: string | null;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * checkout_id\n */\n checkout_id: string | null;\n /**\n * When the next automatic payment retry is scheduled. `null` if the order is not in dunning or all retries have been exhausted.\n */\n next_payment_attempt_at?: string | null;\n /**\n * product\n */\n product: CustomerOrderProduct | null;\n /**\n * subscription\n */\n subscription: CustomerOrderSubscription | null;\n /**\n * Line items composing the order.\n */\n items: OrderItemSchema[];\n /**\n * A summary description of the order.\n */\n description: string;\n /**\n * Amount in cents that can still be refunded (net, before taxes). Accounts for any applied customer balance and previous refunds.\n */\n refundable_amount: number;\n /**\n * Sales tax in cents that would be refunded if the full refundable amount is refunded.\n */\n refundable_tax_amount: number;\n}\n/**\n * Schema to confirm a retry payment using either a saved payment method or a new confirmation token.\n */\nexport interface CustomerOrderConfirmPayment {\n /**\n * ID of the Stripe confirmation token for new payment methods.\n */\n confirmation_token_id?: string | null;\n /**\n * ID of an existing saved payment method.\n */\n payment_method_id?: string | null;\n /**\n * payment_processor\n */\n payment_processor?: PaymentProcessor;\n}\n/**\n * Order's invoice data.\n */\nexport interface CustomerOrderInvoice {\n /**\n * The URL to the invoice.\n */\n url: string;\n}\n/**\n * Response after confirming a retry payment.\n */\nexport interface CustomerOrderPaymentConfirmation {\n /**\n * Payment status after confirmation.\n */\n status: string;\n /**\n * Client secret for handling additional actions.\n */\n client_secret?: string | null;\n /**\n * Error message if confirmation failed.\n */\n error?: string | null;\n}\n/**\n * Payment status for an order.\n */\nexport interface CustomerOrderPaymentStatus {\n /**\n * Current payment status.\n */\n status: string;\n /**\n * Error message if payment failed.\n */\n error?: string | null;\n}\n/**\n * CustomerOrderProduct\n */\nexport interface CustomerOrderProduct {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description: string | null;\n /**\n * visibility\n */\n visibility: ProductVisibility;\n /**\n * The recurring interval of the product. If `None`, the product is a one-time purchase.\n */\n recurring_interval: RecurringInterval | null;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.\n */\n recurring_interval_count: number | null;\n /**\n * The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval.\n */\n meter_interval: RecurringInterval | null;\n /**\n * Number of meter interval units. None when no meter cycle is set.\n */\n meter_interval_count: number | null;\n /**\n * Whether the product is a subscription.\n */\n is_recurring: boolean;\n /**\n * Whether the product is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the organization owning the product.\n */\n organization_id: string;\n /**\n * List of prices for this product.\n */\n prices: (LegacyRecurringProductPrice | ProductPrice)[];\n /**\n * List of benefits granted by the product.\n */\n benefits: BenefitPublic[];\n /**\n * List of medias associated to the product.\n */\n medias: ProductMediaFileRead[];\n /**\n * organization\n */\n organization: CustomerOrganization;\n}\n/**\n * Order's receipt data.\n */\nexport interface CustomerOrderReceipt {\n /**\n * The URL to the receipt PDF.\n */\n url: string;\n}\n/**\n * CustomerOrderSubscription\n */\nexport interface CustomerOrderSubscription {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The amount of the subscription.\n */\n amount: number;\n /**\n * The currency of the subscription.\n */\n currency: string;\n /**\n * recurring_interval\n */\n recurring_interval: RecurringInterval;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.\n */\n recurring_interval_count: number;\n /**\n * status\n */\n status: SubscriptionStatus;\n /**\n * The start timestamp of the current billing period.\n */\n current_period_start: string;\n /**\n * The end timestamp of the current billing period.\n */\n current_period_end: string;\n /**\n * The start timestamp of the current meter period, if the product has a meter cycle set. Metered credits are granted and overage is settled on this cadence.\n */\n current_meter_period_start: string | null;\n /**\n * The end timestamp of the current meter period, if the product has a meter cycle set. This is when credits next renew.\n */\n current_meter_period_end: string | null;\n /**\n * The start timestamp of the trial period, if any.\n */\n trial_start: string | null;\n /**\n * The end timestamp of the trial period, if any.\n */\n trial_end: string | null;\n /**\n * Whether the subscription will be canceled at the end of the current period.\n */\n cancel_at_period_end: boolean;\n /**\n * The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.\n */\n canceled_at: string | null;\n /**\n * The timestamp when the subscription started.\n */\n started_at: string | null;\n /**\n * The timestamp when the subscription will end.\n */\n ends_at: string | null;\n /**\n * The timestamp when the subscription ended.\n */\n ended_at: string | null;\n /**\n * The timestamp when the subscription entered `past_due` status.\n */\n past_due_at?: string | null;\n /**\n * Whether the subscription will be paused at the end of the current period.\n */\n pause_at_period_end: boolean;\n /**\n * The timestamp when the subscription was paused.\n */\n paused_at: string | null;\n /**\n * The timestamp when a paused subscription is scheduled to automatically resume, if set.\n */\n resumes_at: string | null;\n /**\n * The ID of the subscribed customer.\n */\n customer_id: string;\n /**\n * The ID of the subscribed product.\n */\n product_id: string;\n /**\n * The ID of the applied discount, if any.\n */\n discount_id: string | null;\n /**\n * checkout_id\n */\n checkout_id: string | null;\n /**\n * The number of seats for seat-based subscriptions. None for non-seat subscriptions.\n */\n seats?: number | null;\n /**\n * customer_cancellation_reason\n */\n customer_cancellation_reason: CustomerCancellationReason | null;\n /**\n * customer_cancellation_comment\n */\n customer_cancellation_comment: string | null;\n}\n/**\n * Schema to update an order.\n */\nexport interface CustomerOrderUpdate {\n /**\n * The name of the customer that should appear on the invoice.\n */\n billing_name?: string | null;\n /**\n * The address of the customer that should appear on the invoice. Country and state fields cannot be updated.\n */\n billing_address?: AddressInput | null;\n}\n/**\n * CustomerOrganization\n */\nexport interface CustomerOrganization {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Organization name shown in checkout, customer portal, emails etc.\n */\n name: string;\n /**\n * Unique organization slug in checkout, customer portal and credit card statements.\n */\n slug: string;\n /**\n * Avatar URL shown in checkout, customer portal, emails etc.\n */\n avatar_url: string | null;\n /**\n * proration_behavior\n */\n proration_behavior: SubscriptionProrationBehavior;\n /**\n * Whether customers can update their subscriptions from the customer portal.\n */\n allow_customer_updates: boolean;\n /**\n * customer_portal_settings\n */\n customer_portal_settings: OrganizationCustomerPortalSettings;\n /**\n * organization_features\n */\n organization_features?: CustomerOrganizationFeatureSettings;\n}\n/**\n * Schema of an organization and related data for customer portal.\n */\nexport interface CustomerOrganizationData {\n /**\n * organization\n */\n organization: CustomerOrganization;\n /**\n * products\n */\n products: CustomerProduct[];\n}\n/**\n * Feature flags exposed to the customer portal.\n */\nexport interface CustomerOrganizationFeatureSettings {\n /**\n * Whether the member model is enabled for this organization.\n */\n member_model_enabled?: boolean;\n /**\n * Whether localization is enabled for this organization.\n */\n checkout_localization_enabled?: boolean;\n}\n/**\n * CustomerPaymentMethodCard\n */\nexport interface CustomerPaymentMethodCard {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * processor\n */\n processor: PaymentProcessor;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * type\n */\n type: \"card\";\n /**\n * method_metadata\n */\n method_metadata: PaymentMethodCardMetadata;\n /**\n * Whether this payment method is the customer's default payment method.\n */\n is_default: boolean;\n}\n/**\n * CustomerPaymentMethodConfirm\n */\nexport interface CustomerPaymentMethodConfirm {\n /**\n * setup_intent_id\n */\n setup_intent_id: string;\n /**\n * set_default\n */\n set_default: boolean;\n}\n/**\n * CustomerPaymentMethodCreate\n */\nexport interface CustomerPaymentMethodCreate {\n /**\n * confirmation_token_id\n */\n confirmation_token_id: string;\n /**\n * set_default\n */\n set_default: boolean;\n /**\n * return_url\n */\n return_url: string;\n}\n/**\n * CustomerPaymentMethodCreateRequiresActionResponse\n */\nexport interface CustomerPaymentMethodCreateRequiresActionResponse {\n /**\n * status\n */\n status: \"requires_action\";\n /**\n * client_secret\n */\n client_secret: string;\n}\n/**\n * CustomerPaymentMethodCreateSucceededResponse\n */\nexport interface CustomerPaymentMethodCreateSucceededResponse {\n /**\n * status\n */\n status: \"succeeded\";\n /**\n * payment_method\n */\n payment_method: CustomerPaymentMethod;\n}\n/**\n * CustomerPaymentMethodGeneric\n */\nexport interface CustomerPaymentMethodGeneric {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * processor\n */\n processor: PaymentProcessor;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * type\n */\n type: string;\n /**\n * Whether this payment method is the customer's default payment method.\n */\n is_default: boolean;\n}\n/**\n * CustomerPortalCustomer\n */\nexport interface CustomerPortalCustomer {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * email\n */\n email: string | null;\n /**\n * email_verified\n */\n email_verified: boolean;\n /**\n * name\n */\n name: string | null;\n /**\n * billing_name\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * tax_id\n */\n tax_id: unknown[] | null;\n /**\n * oauth_accounts\n */\n oauth_accounts: Record<string, CustomerPortalOAuthAccount>;\n /**\n * default_payment_method_id\n */\n default_payment_method_id?: string | null;\n /**\n * type\n */\n type?: CustomerType | null;\n /**\n * locale\n */\n locale?: string | null;\n}\n/**\n * CustomerPortalCustomerSettings\n */\nexport interface CustomerPortalCustomerSettings {\n /**\n * allow_email_change\n */\n allow_email_change?: boolean;\n}\n/**\n * CustomerPortalCustomerUpdate\n */\nexport interface CustomerPortalCustomerUpdate {\n /**\n * billing_name\n */\n billing_name?: string | null;\n /**\n * billing_address\n */\n billing_address?: AddressInput | null;\n /**\n * tax_id\n */\n tax_id?: string | null;\n /**\n * default_payment_method_id\n */\n default_payment_method_id?: string | null;\n}\n/**\n * A member of the customer's team as seen in the customer portal.\n */\nexport interface CustomerPortalMember {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The email address of the member.\n */\n email: string;\n /**\n * The name of the member.\n */\n name: string | null;\n /**\n * role\n */\n role: MemberRole;\n}\n/**\n * Schema for adding a new member to the customer's team.\n */\nexport interface CustomerPortalMemberCreate {\n /**\n * The email address of the new member.\n */\n email: string;\n /**\n * The name of the new member (optional).\n */\n name?: string | null;\n /**\n * role\n */\n role?: MemberRole;\n}\n/**\n * Schema for updating a member in the customer portal.\n */\nexport interface CustomerPortalMemberUpdate {\n /**\n * The new name for the member.\n */\n name?: string | null;\n /**\n * The new role for the member.\n */\n role?: MemberRole | null;\n}\n/**\n * CustomerPortalOAuthAccount\n */\nexport interface CustomerPortalOAuthAccount {\n /**\n * account_id\n */\n account_id: string;\n /**\n * account_username\n */\n account_username: string | null;\n}\n/**\n * CustomerPortalSubscriptionSettings\n */\nexport interface CustomerPortalSubscriptionSettings {\n /**\n * update_seats\n */\n update_seats: boolean;\n /**\n * update_plan\n */\n update_plan: boolean;\n /**\n * pause\n */\n pause?: boolean;\n}\n/**\n * CustomerPortalUsageSettings\n */\nexport interface CustomerPortalUsageSettings {\n /**\n * show\n */\n show: boolean;\n}\n/**\n * Schema of a product for customer portal.\n */\nexport interface CustomerProduct {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description: string | null;\n /**\n * visibility\n */\n visibility: ProductVisibility;\n /**\n * The recurring interval of the product. If `None`, the product is a one-time purchase.\n */\n recurring_interval: RecurringInterval | null;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.\n */\n recurring_interval_count: number | null;\n /**\n * The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval.\n */\n meter_interval: RecurringInterval | null;\n /**\n * Number of meter interval units. None when no meter cycle is set.\n */\n meter_interval_count: number | null;\n /**\n * Whether the product is a subscription.\n */\n is_recurring: boolean;\n /**\n * Whether the product is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the organization owning the product.\n */\n organization_id: string;\n /**\n * List of available prices for this product.\n */\n prices: (LegacyRecurringProductPrice | ProductPrice)[];\n /**\n * List of benefits granted by the product.\n */\n benefits: BenefitPublic[];\n /**\n * The medias associated to the product.\n */\n medias: ProductMediaFileRead[];\n}\n/**\n * CustomerSeat\n */\nexport interface CustomerSeat {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The seat ID\n */\n id: string;\n /**\n * The subscription ID (for recurring seats)\n */\n subscription_id: string | null;\n /**\n * The order ID (for one-time purchase seats)\n */\n order_id: string | null;\n /**\n * status\n */\n status: SeatStatus;\n /**\n * The customer ID. When member_model_enabled is true, this is the billing customer (purchaser). When false, this is the seat member customer.\n */\n customer_id: string | null;\n /**\n * The member ID of the seat occupant\n */\n member_id: string | null;\n /**\n * The member associated with this seat\n */\n member: Member | null;\n /**\n * Email of the seat member (set when member_model_enabled is true)\n */\n email: string | null;\n /**\n * The assigned customer email\n */\n customer_email: string | null;\n /**\n * When the invitation token expires\n */\n invitation_token_expires_at: string | null;\n /**\n * When the seat was claimed\n */\n claimed_at: string | null;\n /**\n * When the seat was revoked\n */\n revoked_at: string | null;\n /**\n * Additional metadata for the seat\n */\n seat_metadata: Record<string, unknown> | null;\n}\n/**\n * CustomerSeatAssign\n */\nexport interface CustomerSeatAssign {\n /**\n * Subscription ID. Required if neither order_id nor checkout_id is provided.\n */\n subscription_id?: string | null;\n /**\n * Order ID for one-time purchases. Required if subscription_id is not provided.\n */\n order_id?: string | null;\n /**\n * Email of the customer to assign the seat to\n */\n email?: string | null;\n /**\n * External customer ID for the seat assignment\n */\n external_customer_id?: string | null;\n /**\n * Customer ID for the seat assignment\n */\n customer_id?: string | null;\n /**\n * External member ID for the seat assignment. Can be used alone (lookup existing member) or with email (create/validate member).\n */\n external_member_id?: string | null;\n /**\n * Member ID for the seat assignment.\n */\n member_id?: string | null;\n /**\n * Additional metadata for the seat (max 10 keys, 1KB total)\n */\n metadata?: Record<string, unknown> | null;\n /**\n * If true, the seat will be immediately claimed without sending an invitation email. API-only feature.\n */\n immediate_claim?: boolean;\n /**\n * Checkout ID. Resolves to the subscription or order produced by the checkout.\n */\n checkout_id?: string | null;\n}\n/**\n * Response after successfully claiming a seat.\n */\nexport interface CustomerSeatClaimResponse {\n /**\n * seat\n */\n seat: CustomerSeat;\n /**\n * Session token for immediate customer portal access\n */\n customer_session_token: string;\n}\n/**\n * A customer session that can be used to authenticate as a customer.\n */\nexport interface CustomerSession {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * token\n */\n token: string;\n /**\n * expires_at\n */\n expires_at: string;\n /**\n * return_url\n */\n return_url: string | null;\n /**\n * customer_portal_url\n */\n customer_portal_url: string;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * customer\n */\n customer: Customer;\n}\n/**\n * Schema for creating a customer session using an external customer ID.\n */\nexport interface CustomerSessionCustomerExternalIDCreate {\n /**\n * ID of the member to create a session for. When not provided and the organization has `member_model_enabled`, the owner member of the customer will be used for individual customers.\n */\n member_id?: string | null;\n /**\n * External ID of the member to create a session for. Alternative to `member_id`.\n */\n external_member_id?: string | null;\n /**\n * When set, a back button will be shown in the customer portal to return to this URL.\n */\n return_url?: string | null;\n /**\n * External ID of the customer to create a session for.\n */\n external_customer_id: string;\n}\n/**\n * Schema for creating a customer session using a customer ID.\n */\nexport interface CustomerSessionCustomerIDCreate {\n /**\n * ID of the member to create a session for. When not provided and the organization has `member_model_enabled`, the owner member of the customer will be used for individual customers.\n */\n member_id?: string | null;\n /**\n * External ID of the member to create a session for. Alternative to `member_id`.\n */\n external_member_id?: string | null;\n /**\n * When set, a back button will be shown in the customer portal to return to this URL.\n */\n return_url?: string | null;\n /**\n * ID of the customer to create a session for.\n */\n customer_id: string;\n}\n/**\n * An active benefit grant for a customer.\n */\nexport interface CustomerStateBenefitGrant {\n /**\n * The ID of the grant.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The timestamp when the benefit was granted.\n */\n granted_at: string;\n /**\n * The ID of the benefit concerned by this grant.\n */\n benefit_id: string;\n /**\n * benefit_type\n */\n benefit_type: BenefitType;\n /**\n * benefit_metadata\n */\n benefit_metadata: MetadataOutputType;\n /**\n * properties\n */\n properties:\n | BenefitGrantDiscordProperties\n | BenefitGrantGitHubRepositoryProperties\n | BenefitGrantDownloadablesProperties\n | BenefitGrantLicenseKeysProperties\n | BenefitGrantCustomProperties\n | BenefitGrantFeatureFlagProperties\n | BenefitGrantSlackSharedChannelProperties;\n}\n/**\n * A customer along with additional state information:\n\n* Active subscriptions\n* Granted benefits\n* Active meters\n */\nexport interface CustomerStateIndividual {\n /**\n * The ID of the customer.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email: string;\n /**\n * Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.\n */\n email_verified: boolean;\n /**\n * The type of customer.\n */\n type: \"individual\";\n /**\n * The name of the customer.\n */\n name: string | null;\n /**\n * The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * tax_id\n */\n tax_id: unknown[] | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer.\n */\n organization_id: string;\n /**\n * The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details.\n */\n default_payment_method_id?: string | null;\n /**\n * Timestamp for when the customer was soft deleted.\n */\n deleted_at: string | null;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n /**\n * The customer's active subscriptions.\n */\n active_subscriptions: CustomerStateSubscription[];\n /**\n * The customer's active benefit grants.\n */\n granted_benefits: CustomerStateBenefitGrant[];\n /**\n * The customer's active meters.\n */\n active_meters: CustomerStateMeter[];\n}\n/**\n * An active meter for a customer, with latest consumed and credited units.\n */\nexport interface CustomerStateMeter {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the meter.\n */\n meter_id: string;\n /**\n * The number of consumed units.\n */\n consumed_units: number;\n /**\n * The number of credited units.\n */\n credited_units: number;\n /**\n * The balance of the meter, i.e. the difference between credited and consumed units.\n */\n balance: number;\n}\n/**\n * An active customer subscription.\n */\nexport interface CustomerStateSubscription {\n /**\n * The ID of the subscription.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * status\n */\n status: Status;\n /**\n * The amount of the subscription.\n */\n amount: number;\n /**\n * The currency of the subscription.\n */\n currency: string;\n /**\n * recurring_interval\n */\n recurring_interval: RecurringInterval;\n /**\n * The start timestamp of the current billing period.\n */\n current_period_start: string;\n /**\n * The end timestamp of the current billing period.\n */\n current_period_end: string;\n /**\n * The start timestamp of the trial period, if any.\n */\n trial_start: string | null;\n /**\n * The end timestamp of the trial period, if any.\n */\n trial_end: string | null;\n /**\n * Whether the subscription will be canceled at the end of the current period.\n */\n cancel_at_period_end: boolean;\n /**\n * The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.\n */\n canceled_at: string | null;\n /**\n * The timestamp when the subscription started.\n */\n started_at: string | null;\n /**\n * The timestamp when the subscription will end.\n */\n ends_at: string | null;\n /**\n * The ID of the subscribed product.\n */\n product_id: string;\n /**\n * The ID of the applied discount, if any.\n */\n discount_id: string | null;\n /**\n * List of meters associated with the subscription.\n */\n meters: CustomerStateSubscriptionMeter[];\n}\n/**\n * Current consumption and spending for a subscription meter.\n */\nexport interface CustomerStateSubscriptionMeter {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The number of consumed units so far in this billing period.\n */\n consumed_units: number;\n /**\n * The number of credited units so far in this billing period.\n */\n credited_units: number;\n /**\n * The amount due in cents so far in this billing period.\n */\n amount: number;\n /**\n * The ID of the meter.\n */\n meter_id: string;\n}\n/**\n * A team customer along with additional state information:\n\n* Active subscriptions\n* Granted benefits\n* Active meters\n */\nexport interface CustomerStateTeam {\n /**\n * The ID of the customer.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email?: string | null;\n /**\n * Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.\n */\n email_verified: boolean;\n /**\n * The type of customer. Team customers can have multiple members.\n */\n type: \"team\";\n /**\n * The name of the customer.\n */\n name: string | null;\n /**\n * The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * tax_id\n */\n tax_id: unknown[] | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer.\n */\n organization_id: string;\n /**\n * The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details.\n */\n default_payment_method_id?: string | null;\n /**\n * Timestamp for when the customer was soft deleted.\n */\n deleted_at: string | null;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n /**\n * The customer's active subscriptions.\n */\n active_subscriptions: CustomerStateSubscription[];\n /**\n * The customer's active benefit grants.\n */\n granted_benefits: CustomerStateBenefitGrant[];\n /**\n * The customer's active meters.\n */\n active_meters: CustomerStateMeter[];\n}\n/**\n * CustomerSubscription\n */\nexport interface CustomerSubscription {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The amount of the subscription.\n */\n amount: number;\n /**\n * The currency of the subscription.\n */\n currency: string;\n /**\n * recurring_interval\n */\n recurring_interval: RecurringInterval;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.\n */\n recurring_interval_count: number;\n /**\n * status\n */\n status: SubscriptionStatus;\n /**\n * The start timestamp of the current billing period.\n */\n current_period_start: string;\n /**\n * The end timestamp of the current billing period.\n */\n current_period_end: string;\n /**\n * The start timestamp of the current meter period, if the product has a meter cycle set. Metered credits are granted and overage is settled on this cadence.\n */\n current_meter_period_start: string | null;\n /**\n * The end timestamp of the current meter period, if the product has a meter cycle set. This is when credits next renew.\n */\n current_meter_period_end: string | null;\n /**\n * The start timestamp of the trial period, if any.\n */\n trial_start: string | null;\n /**\n * The end timestamp of the trial period, if any.\n */\n trial_end: string | null;\n /**\n * Whether the subscription will be canceled at the end of the current period.\n */\n cancel_at_period_end: boolean;\n /**\n * The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.\n */\n canceled_at: string | null;\n /**\n * The timestamp when the subscription started.\n */\n started_at: string | null;\n /**\n * The timestamp when the subscription will end.\n */\n ends_at: string | null;\n /**\n * The timestamp when the subscription ended.\n */\n ended_at: string | null;\n /**\n * The timestamp when the subscription entered `past_due` status.\n */\n past_due_at?: string | null;\n /**\n * Whether the subscription will be paused at the end of the current period.\n */\n pause_at_period_end: boolean;\n /**\n * The timestamp when the subscription was paused.\n */\n paused_at: string | null;\n /**\n * The timestamp when a paused subscription is scheduled to automatically resume, if set.\n */\n resumes_at: string | null;\n /**\n * The ID of the subscribed customer.\n */\n customer_id: string;\n /**\n * The ID of the subscribed product.\n */\n product_id: string;\n /**\n * The ID of the applied discount, if any.\n */\n discount_id: string | null;\n /**\n * checkout_id\n */\n checkout_id: string | null;\n /**\n * The number of seats for seat-based subscriptions. None for non-seat subscriptions.\n */\n seats?: number | null;\n /**\n * customer_cancellation_reason\n */\n customer_cancellation_reason: CustomerCancellationReason | null;\n /**\n * customer_cancellation_comment\n */\n customer_cancellation_comment: string | null;\n /**\n * product\n */\n product: CustomerSubscriptionProduct;\n /**\n * List of enabled prices for the subscription.\n */\n prices: (LegacyRecurringProductPrice | ProductPrice)[];\n /**\n * List of meters associated with the subscription.\n */\n meters: CustomerSubscriptionMeter[];\n /**\n * Pending subscription update that will be applied at the beginning of the next period. If `null`, there is no pending update.\n */\n pending_update: PendingSubscriptionUpdate | null;\n}\n/**\n * CustomerSubscriptionCancel\n */\nexport interface CustomerSubscriptionCancel {\n /**\n * Cancel an active subscription once the current period ends.\n\nOr uncancel a subscription currently set to be revoked at period end.\n */\n cancel_at_period_end?: boolean | null;\n /**\n * Customers reason for cancellation.\n\n* `too_expensive`: Too expensive for the customer.\n* `missing_features`: Customer is missing certain features.\n* `switched_service`: Customer switched to another service.\n* `unused`: Customer is not using it enough.\n* `customer_service`: Customer is not satisfied with the customer service.\n* `low_quality`: Customer is unhappy with the quality.\n* `too_complex`: Customer considers the service too complicated.\n* `other`: Other reason(s).\n */\n cancellation_reason?: CustomerCancellationReason | null;\n /**\n * Customer feedback and why they decided to cancel.\n */\n cancellation_comment?: string | null;\n}\n/**\n * CustomerSubscriptionMeter\n */\nexport interface CustomerSubscriptionMeter {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The number of consumed units so far in this billing period.\n */\n consumed_units: number;\n /**\n * The number of credited units so far in this billing period.\n */\n credited_units: number;\n /**\n * The amount due in cents so far in this billing period.\n */\n amount: number;\n /**\n * The ID of the meter.\n */\n meter_id: string;\n /**\n * meter\n */\n meter: CustomerSubscriptionMeterMeter;\n}\n/**\n * CustomerSubscriptionMeterMeter\n */\nexport interface CustomerSubscriptionMeterMeter {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The name of the meter. Will be shown on customer's invoices and usage.\n */\n name: string;\n}\n/**\n * CustomerSubscriptionPause\n */\nexport interface CustomerSubscriptionPause {\n /**\n * Pause an active subscription at the end of the current period.\n\nOr cancel a scheduled pause on a subscription set to be paused at\nperiod end.\n */\n pause_at_period_end: boolean;\n /**\n * Date at which the paused subscription should automatically resume. If not set, it stays paused until resumed. Must be after the current period end.\n */\n resumes_at?: string | null;\n}\n/**\n * CustomerSubscriptionProduct\n */\nexport interface CustomerSubscriptionProduct {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description: string | null;\n /**\n * visibility\n */\n visibility: ProductVisibility;\n /**\n * The recurring interval of the product. If `None`, the product is a one-time purchase.\n */\n recurring_interval: RecurringInterval | null;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.\n */\n recurring_interval_count: number | null;\n /**\n * The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval.\n */\n meter_interval: RecurringInterval | null;\n /**\n * Number of meter interval units. None when no meter cycle is set.\n */\n meter_interval_count: number | null;\n /**\n * Whether the product is a subscription.\n */\n is_recurring: boolean;\n /**\n * Whether the product is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the organization owning the product.\n */\n organization_id: string;\n /**\n * List of prices for this product.\n */\n prices: (LegacyRecurringProductPrice | ProductPrice)[];\n /**\n * List of benefits granted by the product.\n */\n benefits: BenefitPublic[];\n /**\n * List of medias associated to the product.\n */\n medias: ProductMediaFileRead[];\n /**\n * organization\n */\n organization: CustomerOrganization;\n}\n/**\n * CustomerSubscriptionResume\n */\nexport interface CustomerSubscriptionResume {\n /**\n * Resume a paused subscription immediately, starting a new billing period and charging the customer.\n */\n resume: true;\n}\n/**\n * CustomerSubscriptionUpdateClear\n */\nexport interface CustomerSubscriptionUpdateClear {\n /**\n * Clear the pending subscription update.\n */\n pending_update: null;\n}\n/**\n * CustomerSubscriptionUpdateProduct\n */\nexport interface CustomerSubscriptionUpdateProduct {\n /**\n * Update subscription to another product.\n */\n product_id: string;\n}\n/**\n * CustomerSubscriptionUpdateSeats\n */\nexport interface CustomerSubscriptionUpdateSeats {\n /**\n * Update the number of seats for this subscription.\n */\n seats: number;\n}\n/**\n * A team customer in an organization.\n */\nexport interface CustomerTeam {\n /**\n * The ID of the customer.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email?: string | null;\n /**\n * Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.\n */\n email_verified: boolean;\n /**\n * The type of customer. Team customers can have multiple members.\n */\n type: \"team\";\n /**\n * The name of the customer.\n */\n name: string | null;\n /**\n * The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * tax_id\n */\n tax_id: unknown[] | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer.\n */\n organization_id: string;\n /**\n * The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details.\n */\n default_payment_method_id?: string | null;\n /**\n * Timestamp for when the customer was soft deleted.\n */\n deleted_at: string | null;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n}\n/**\n * CustomerTeamCreate\n */\nexport interface CustomerTeamCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * name\n */\n name?: string | null;\n /**\n * billing_address\n */\n billing_address?: AddressInput | null;\n /**\n * tax_id\n */\n tax_id?: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * Optional owner member to create with the customer. If not provided, an owner member will be automatically created using the customer's email and name.\n */\n owner?: MemberOwnerCreate | null;\n /**\n * type\n */\n type: \"team\";\n /**\n * The email address of the team customer. Optional for team customers — if omitted, an owner with an email must be provided.\n */\n email?: string | null;\n}\n/**\n * CustomerUpdate\n */\nexport interface CustomerUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email?: string | null;\n /**\n * name\n */\n name?: string | null;\n /**\n * billing_address\n */\n billing_address?: AddressInput | null;\n /**\n * tax_id\n */\n tax_id?: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * The customer type. Can only be upgraded from 'individual' to 'team', never downgraded.\n */\n type?: CustomerType | null;\n}\n/**\n * CustomerUpdateExternalID\n */\nexport interface CustomerUpdateExternalID {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email?: string | null;\n /**\n * name\n */\n name?: string | null;\n /**\n * billing_address\n */\n billing_address?: AddressInput | null;\n /**\n * tax_id\n */\n tax_id?: string | null;\n /**\n * locale\n */\n locale?: string | null;\n}\n/**\n * An event created by Polar when a customer is updated.\n */\nexport interface CustomerUpdatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"customer.updated\";\n /**\n * metadata\n */\n metadata: CustomerUpdatedMetadata;\n}\n/**\n * CustomerUpdatedFields\n */\nexport interface CustomerUpdatedFields {\n /**\n * name\n */\n name?: string | null;\n /**\n * billing_name\n */\n billing_name?: string | null;\n /**\n * email\n */\n email?: string | null;\n /**\n * billing_address\n */\n billing_address?: AddressDict | null;\n /**\n * tax_id\n */\n tax_id?: string | null;\n /**\n * metadata\n */\n metadata?: Record<string, string | number | boolean> | null;\n}\n/**\n * CustomerUpdatedMetadata\n */\nexport interface CustomerUpdatedMetadata {\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * customer_email\n */\n customer_email: string | null;\n /**\n * customer_name\n */\n customer_name: string | null;\n /**\n * customer_external_id\n */\n customer_external_id: string | null;\n /**\n * updated_fields\n */\n updated_fields: CustomerUpdatedFields;\n}\n/**\n * A wallet represents your balance with an organization.\n\nYou can top-up your wallet and use the balance to pay for usage.\n */\nexport interface CustomerWallet {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the customer that owns the wallet.\n */\n customer_id: string;\n /**\n * The current balance of the wallet, in cents.\n */\n balance: number;\n /**\n * The currency of the wallet.\n */\n currency: string;\n}\n/**\n * Schema to create a fixed amount discount.\n */\nexport interface DiscountFixedCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API.\n */\n code?: string | null;\n /**\n * Optional timestamp after which the discount is redeemable.\n */\n starts_at?: string | null;\n /**\n * Optional timestamp after which the discount is no longer redeemable.\n */\n ends_at?: string | null;\n /**\n * Optional maximum number of times the discount can be redeemed.\n */\n max_redemptions?: number | null;\n /**\n * products\n */\n products?: string[] | null;\n /**\n * The ID of the organization owning the discount. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * type\n */\n type?: \"fixed\";\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * Number of months the discount should be applied.\n\nRequired when `duration` is `repeating`. Must be omitted otherwise.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24.\n */\n duration_in_months?: number | null;\n /**\n * amount\n */\n amount?: number | null;\n /**\n * currency\n */\n currency?: PresentmentCurrency | null;\n /**\n * amounts\n */\n amounts?: Record<string, number> | null;\n}\n/**\n * Schema for a fixed amount discount that is applied once or forever.\n */\nexport interface DiscountFixedOnceForeverDuration {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * type\n */\n type: DiscountType;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * Map of currency to fixed amount to discount from the total.\n */\n amounts: Record<string, number>;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout.\n */\n code: string | null;\n /**\n * Timestamp after which the discount is redeemable.\n */\n starts_at: string | null;\n /**\n * Timestamp after which the discount is no longer redeemable.\n */\n ends_at: string | null;\n /**\n * Maximum number of times the discount can be redeemed.\n */\n max_redemptions: number | null;\n /**\n * Number of times the discount has been redeemed.\n */\n redemptions_count: number;\n /**\n * The organization ID.\n */\n organization_id: string;\n /**\n * products\n */\n products: DiscountProduct[];\n}\n/**\n * DiscountFixedOnceForeverDurationBase\n */\nexport interface DiscountFixedOnceForeverDurationBase {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * type\n */\n type: DiscountType;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * Map of currency to fixed amount to discount from the total.\n */\n amounts: Record<string, number>;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout.\n */\n code: string | null;\n /**\n * Timestamp after which the discount is redeemable.\n */\n starts_at: string | null;\n /**\n * Timestamp after which the discount is no longer redeemable.\n */\n ends_at: string | null;\n /**\n * Maximum number of times the discount can be redeemed.\n */\n max_redemptions: number | null;\n /**\n * Number of times the discount has been redeemed.\n */\n redemptions_count: number;\n /**\n * The organization ID.\n */\n organization_id: string;\n}\n/**\n * Schema for a fixed amount discount that is applied on every invoice\nfor a certain number of months.\n */\nexport interface DiscountFixedRepeatDuration {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * duration_in_months\n */\n duration_in_months: number;\n /**\n * type\n */\n type: DiscountType;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * Map of currency to fixed amount to discount from the total.\n */\n amounts: Record<string, number>;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout.\n */\n code: string | null;\n /**\n * Timestamp after which the discount is redeemable.\n */\n starts_at: string | null;\n /**\n * Timestamp after which the discount is no longer redeemable.\n */\n ends_at: string | null;\n /**\n * Maximum number of times the discount can be redeemed.\n */\n max_redemptions: number | null;\n /**\n * Number of times the discount has been redeemed.\n */\n redemptions_count: number;\n /**\n * The organization ID.\n */\n organization_id: string;\n /**\n * products\n */\n products: DiscountProduct[];\n}\n/**\n * DiscountFixedRepeatDurationBase\n */\nexport interface DiscountFixedRepeatDurationBase {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * duration_in_months\n */\n duration_in_months: number;\n /**\n * type\n */\n type: DiscountType;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * Map of currency to fixed amount to discount from the total.\n */\n amounts: Record<string, number>;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout.\n */\n code: string | null;\n /**\n * Timestamp after which the discount is redeemable.\n */\n starts_at: string | null;\n /**\n * Timestamp after which the discount is no longer redeemable.\n */\n ends_at: string | null;\n /**\n * Maximum number of times the discount can be redeemed.\n */\n max_redemptions: number | null;\n /**\n * Number of times the discount has been redeemed.\n */\n redemptions_count: number;\n /**\n * The organization ID.\n */\n organization_id: string;\n}\n/**\n * Schema to create a percentage discount.\n */\nexport interface DiscountPercentageCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API.\n */\n code?: string | null;\n /**\n * Optional timestamp after which the discount is redeemable.\n */\n starts_at?: string | null;\n /**\n * Optional timestamp after which the discount is no longer redeemable.\n */\n ends_at?: string | null;\n /**\n * Optional maximum number of times the discount can be redeemed.\n */\n max_redemptions?: number | null;\n /**\n * products\n */\n products?: string[] | null;\n /**\n * The ID of the organization owning the discount. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * type\n */\n type?: \"percentage\";\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * Number of months the discount should be applied.\n\nRequired when `duration` is `repeating`. Must be omitted otherwise.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24.\n */\n duration_in_months?: number | null;\n /**\n * Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550.\n */\n basis_points: number;\n}\n/**\n * Schema for a percentage discount that is applied once or forever.\n */\nexport interface DiscountPercentageOnceForeverDuration {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * type\n */\n type: DiscountType;\n /**\n * Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.\n */\n basis_points: number;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout.\n */\n code: string | null;\n /**\n * Timestamp after which the discount is redeemable.\n */\n starts_at: string | null;\n /**\n * Timestamp after which the discount is no longer redeemable.\n */\n ends_at: string | null;\n /**\n * Maximum number of times the discount can be redeemed.\n */\n max_redemptions: number | null;\n /**\n * Number of times the discount has been redeemed.\n */\n redemptions_count: number;\n /**\n * The organization ID.\n */\n organization_id: string;\n /**\n * products\n */\n products: DiscountProduct[];\n}\n/**\n * DiscountPercentageOnceForeverDurationBase\n */\nexport interface DiscountPercentageOnceForeverDurationBase {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * type\n */\n type: DiscountType;\n /**\n * Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.\n */\n basis_points: number;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout.\n */\n code: string | null;\n /**\n * Timestamp after which the discount is redeemable.\n */\n starts_at: string | null;\n /**\n * Timestamp after which the discount is no longer redeemable.\n */\n ends_at: string | null;\n /**\n * Maximum number of times the discount can be redeemed.\n */\n max_redemptions: number | null;\n /**\n * Number of times the discount has been redeemed.\n */\n redemptions_count: number;\n /**\n * The organization ID.\n */\n organization_id: string;\n}\n/**\n * Schema for a percentage discount that is applied on every invoice\nfor a certain number of months.\n */\nexport interface DiscountPercentageRepeatDuration {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * duration_in_months\n */\n duration_in_months: number;\n /**\n * type\n */\n type: DiscountType;\n /**\n * Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.\n */\n basis_points: number;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout.\n */\n code: string | null;\n /**\n * Timestamp after which the discount is redeemable.\n */\n starts_at: string | null;\n /**\n * Timestamp after which the discount is no longer redeemable.\n */\n ends_at: string | null;\n /**\n * Maximum number of times the discount can be redeemed.\n */\n max_redemptions: number | null;\n /**\n * Number of times the discount has been redeemed.\n */\n redemptions_count: number;\n /**\n * The organization ID.\n */\n organization_id: string;\n /**\n * products\n */\n products: DiscountProduct[];\n}\n/**\n * DiscountPercentageRepeatDurationBase\n */\nexport interface DiscountPercentageRepeatDurationBase {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * duration_in_months\n */\n duration_in_months: number;\n /**\n * type\n */\n type: DiscountType;\n /**\n * Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.\n */\n basis_points: number;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout.\n */\n code: string | null;\n /**\n * Timestamp after which the discount is redeemable.\n */\n starts_at: string | null;\n /**\n * Timestamp after which the discount is no longer redeemable.\n */\n ends_at: string | null;\n /**\n * Maximum number of times the discount can be redeemed.\n */\n max_redemptions: number | null;\n /**\n * Number of times the discount has been redeemed.\n */\n redemptions_count: number;\n /**\n * The organization ID.\n */\n organization_id: string;\n}\n/**\n * A product that a discount can be applied to.\n */\nexport interface DiscountProduct {\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description: string | null;\n /**\n * visibility\n */\n visibility: ProductVisibility;\n /**\n * The recurring interval of the product. If `None`, the product is a one-time purchase.\n */\n recurring_interval: RecurringInterval | null;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.\n */\n recurring_interval_count: number | null;\n /**\n * The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval.\n */\n meter_interval: RecurringInterval | null;\n /**\n * Number of meter interval units. None when no meter cycle is set.\n */\n meter_interval_count: number | null;\n /**\n * Whether the product is a subscription.\n */\n is_recurring: boolean;\n /**\n * Whether the product is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the organization owning the product.\n */\n organization_id: string;\n}\n/**\n * Schema to update a discount.\n */\nexport interface DiscountUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * name\n */\n name?: string | null;\n /**\n * Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API.\n */\n code?: string | null;\n /**\n * Optional timestamp after which the discount is redeemable.\n */\n starts_at?: string | null;\n /**\n * Optional timestamp after which the discount is no longer redeemable.\n */\n ends_at?: string | null;\n /**\n * Optional maximum number of times the discount can be redeemed.\n */\n max_redemptions?: number | null;\n /**\n * duration\n */\n duration?: DiscountDuration | null;\n /**\n * duration_in_months\n */\n duration_in_months?: number | null;\n /**\n * type\n */\n type?: DiscountType | null;\n /**\n * amount\n */\n amount?: number | null;\n /**\n * currency\n */\n currency?: PresentmentCurrency | null;\n /**\n * amounts\n */\n amounts?: Record<string, number> | null;\n /**\n * basis_points\n */\n basis_points?: number | null;\n /**\n * products\n */\n products?: string[] | null;\n}\n/**\n * Schema representing a dispute.\n\nA dispute is a challenge raised by a customer or their bank regarding a payment.\n */\nexport interface Dispute {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * status\n */\n status: DisputeStatus;\n /**\n * Whether the dispute has been resolved (won or lost).\n */\n resolved: boolean;\n /**\n * Whether the dispute is closed (prevented, won, or lost).\n */\n closed: boolean;\n /**\n * Amount in cents disputed.\n */\n amount: number;\n /**\n * Tax amount in cents disputed.\n */\n tax_amount: number;\n /**\n * Currency code of the dispute.\n */\n currency: string;\n /**\n * The reason for the dispute as reported by the card network (e.g. `fraudulent`, `product_not_received`). `None` until the processor reports it.\n */\n reason: string | null;\n /**\n * Deadline to submit evidence in response to the dispute. `None` when no response is required.\n */\n evidence_due_by: string | null;\n /**\n * Whether the evidence submission deadline has passed.\n */\n past_due: boolean;\n /**\n * The ID of the order associated with the dispute.\n */\n order_id: string;\n /**\n * The ID of the payment associated with the dispute.\n */\n payment_id: string;\n /**\n * customer\n */\n customer: DisputeCustomer;\n /**\n * The ID of the support case for this dispute, if one was opened.\n */\n case_id: string | null;\n}\n/**\n * DisputeCustomer\n */\nexport interface DisputeCustomer {\n /**\n * The ID of the customer.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email?: string | null;\n /**\n * Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.\n */\n email_verified: boolean;\n /**\n * type\n */\n type: CustomerType;\n /**\n * The name of the customer.\n */\n name: string | null;\n /**\n * The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * tax_id\n */\n tax_id: unknown[] | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer.\n */\n organization_id: string;\n /**\n * The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details.\n */\n default_payment_method_id?: string | null;\n /**\n * Timestamp for when the customer was soft deleted.\n */\n deleted_at: string | null;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n}\n/**\n * DisputeNotOpenError\n */\nexport interface DisputeNotOpenError {\n /**\n * error\n */\n error: \"DisputeNotOpenError\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * Schema to create a file to be associated with the downloadables benefit.\n */\nexport interface DownloadableFileCreate {\n /**\n * organization_id\n */\n organization_id?: string | null;\n /**\n * name\n */\n name: string;\n /**\n * mime_type\n */\n mime_type: string;\n /**\n * size\n */\n size: number;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64?: string | null;\n /**\n * upload\n */\n upload: S3FileCreateMultipart;\n /**\n * service\n */\n service: \"downloadable\";\n /**\n * version\n */\n version?: string | null;\n}\n/**\n * File to be associated with the downloadables benefit.\n */\nexport interface DownloadableFileRead {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * name\n */\n name: string;\n /**\n * path\n */\n path: string;\n /**\n * mime_type\n */\n mime_type: string;\n /**\n * size\n */\n size: number;\n /**\n * storage_version\n */\n storage_version: string | null;\n /**\n * checksum_etag\n */\n checksum_etag: string | null;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64: string | null;\n /**\n * checksum_sha256_hex\n */\n checksum_sha256_hex: string | null;\n /**\n * last_modified_at\n */\n last_modified_at: string | null;\n /**\n * version\n */\n version: string | null;\n /**\n * service\n */\n service: \"downloadable\";\n /**\n * is_uploaded\n */\n is_uploaded: boolean;\n /**\n * created_at\n */\n created_at: string;\n /**\n * size_readable\n */\n size_readable: string;\n}\n/**\n * DownloadableRead\n */\nexport interface DownloadableRead {\n /**\n * id\n */\n id: string;\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * file\n */\n file: FileDownload;\n}\n/**\n * EventCreateCustomer\n */\nexport interface EventCreateCustomer {\n /**\n * The timestamp of the event.\n */\n timestamp?: string;\n /**\n * The name of the event.\n */\n name: string;\n /**\n * The ID of the organization owning the event. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * Your unique identifier for this event. Useful for deduplication and parent-child relationships.\n */\n external_id?: string | null;\n /**\n * The ID of the parent event. Can be either a Polar event ID (UUID) or an external event ID.\n */\n parent_id?: string | null;\n /**\n * metadata\n */\n metadata?: EventMetadataInput;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string;\n /**\n * ID of the member within the customer's organization who performed the action. Used for member-level attribution in B2B.\n */\n member_id?: string | null;\n}\n/**\n * EventCreateExternalCustomer\n */\nexport interface EventCreateExternalCustomer {\n /**\n * The timestamp of the event.\n */\n timestamp?: string;\n /**\n * The name of the event.\n */\n name: string;\n /**\n * The ID of the organization owning the event. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * Your unique identifier for this event. Useful for deduplication and parent-child relationships.\n */\n external_id?: string | null;\n /**\n * The ID of the parent event. Can be either a Polar event ID (UUID) or an external event ID.\n */\n parent_id?: string | null;\n /**\n * metadata\n */\n metadata?: EventMetadataInput;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string;\n /**\n * ID of the member in your system within the customer's organization who performed the action. Used for member-level attribution in B2B.\n */\n external_member_id?: string | null;\n}\n/**\n * EventMetadataInput\n */\nexport interface EventMetadataInput {\n /**\n * _cost\n */\n _cost?: CostMetadataInput;\n /**\n * _llm\n */\n _llm?: LLMMetadata;\n}\n/**\n * EventMetadataOutput\n */\nexport interface EventMetadataOutput {\n /**\n * _cost\n */\n _cost?: CostMetadataOutput;\n /**\n * _llm\n */\n _llm?: LLMMetadata;\n}\n/**\n * EventName\n */\nexport interface EventName {\n /**\n * The name of the event.\n */\n name: string;\n /**\n * Human readable label of the event.\n */\n label: string;\n /**\n * source\n */\n source: EventSource;\n /**\n * Number of times the event has occurred.\n */\n occurrences: number;\n /**\n * The first time the event occurred.\n */\n first_seen: string;\n /**\n * The last time the event occurred.\n */\n last_seen: string;\n}\n/**\n * EventType\n */\nexport interface EventType {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The name of the event type.\n */\n name: string;\n /**\n * The label for the event type.\n */\n label: string;\n /**\n * Property path to extract dynamic label from event metadata.\n */\n label_property_selector?: string | null;\n /**\n * The ID of the organization owning the event type.\n */\n organization_id: string;\n}\n/**\n * EventTypeUpdate\n */\nexport interface EventTypeUpdate {\n /**\n * The label for the event type.\n */\n label: string;\n /**\n * Property path to extract dynamic label from event metadata (e.g., 'subject' or 'metadata.subject').\n */\n label_property_selector?: string | null;\n}\n/**\n * EventTypeWithStats\n */\nexport interface EventTypeWithStats {\n /**\n * The ID of the event type. Null for system event types.\n */\n id?: string | null;\n /**\n * Creation timestamp of the event type. Null for system event types.\n */\n created_at?: string | null;\n /**\n * Last modification timestamp of the event type. Null for system event types.\n */\n modified_at?: string | null;\n /**\n * The name of the event type.\n */\n name: string;\n /**\n * The label for the event type.\n */\n label: string;\n /**\n * Property path to extract dynamic label from event metadata.\n */\n label_property_selector?: string | null;\n /**\n * The ID of the organization owning the event type.\n */\n organization_id: string;\n /**\n * source\n */\n source: EventSource;\n /**\n * Number of times the event has occurred.\n */\n occurrences: number;\n /**\n * The first time the event occurred.\n */\n first_seen: string;\n /**\n * The last time the event occurred.\n */\n last_seen: string;\n}\n/**\n * EventsIngest\n */\nexport interface EventsIngest {\n /**\n * List of events to ingest.\n */\n events: (EventCreateCustomer | EventCreateExternalCustomer)[];\n}\n/**\n * EventsIngestResponse\n */\nexport interface EventsIngestResponse {\n /**\n * Number of events inserted.\n */\n inserted: number;\n /**\n * Number of duplicate events skipped.\n */\n duplicates?: number;\n}\n/**\n * A price that already exists for this product.\n\nUseful when updating a product if you want to keep an existing price.\n */\nexport interface ExistingProductPrice {\n /**\n * id\n */\n id: string;\n}\n/**\n * ExpiredCheckoutError\n */\nexport interface ExpiredCheckoutError {\n /**\n * error\n */\n error: \"ExpiredCheckoutError\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * FileDownload\n */\nexport interface FileDownload {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * name\n */\n name: string;\n /**\n * path\n */\n path: string;\n /**\n * mime_type\n */\n mime_type: string;\n /**\n * size\n */\n size: number;\n /**\n * storage_version\n */\n storage_version: string | null;\n /**\n * checksum_etag\n */\n checksum_etag: string | null;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64: string | null;\n /**\n * checksum_sha256_hex\n */\n checksum_sha256_hex: string | null;\n /**\n * last_modified_at\n */\n last_modified_at: string | null;\n /**\n * download\n */\n download: S3DownloadURL;\n /**\n * version\n */\n version: string | null;\n /**\n * is_uploaded\n */\n is_uploaded: boolean;\n /**\n * service\n */\n service: FileServiceTypes;\n /**\n * size_readable\n */\n size_readable: string;\n}\n/**\n * FilePatch\n */\nexport interface FilePatch {\n /**\n * name\n */\n name?: string | null;\n /**\n * version\n */\n version?: string | null;\n}\n/**\n * FileUpload\n */\nexport interface FileUpload {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * name\n */\n name: string;\n /**\n * path\n */\n path: string;\n /**\n * mime_type\n */\n mime_type: string;\n /**\n * size\n */\n size: number;\n /**\n * storage_version\n */\n storage_version: string | null;\n /**\n * checksum_etag\n */\n checksum_etag: string | null;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64: string | null;\n /**\n * checksum_sha256_hex\n */\n checksum_sha256_hex: string | null;\n /**\n * last_modified_at\n */\n last_modified_at: string | null;\n /**\n * upload\n */\n upload: S3FileUploadMultipart;\n /**\n * version\n */\n version: string | null;\n /**\n * is_uploaded\n */\n is_uploaded?: boolean;\n /**\n * service\n */\n service: FileServiceTypes;\n /**\n * size_readable\n */\n size_readable: string;\n}\n/**\n * FileUploadCompleted\n */\nexport interface FileUploadCompleted {\n /**\n * id\n */\n id: string;\n /**\n * path\n */\n path: string;\n /**\n * parts\n */\n parts: S3FileUploadCompletedPart[];\n}\n/**\n * Filter\n */\nexport interface Filter {\n /**\n * conjunction\n */\n conjunction: FilterConjunction;\n /**\n * clauses\n */\n clauses: (FilterClause | Filter)[];\n}\n/**\n * FilterClause\n */\nexport interface FilterClause {\n /**\n * property\n */\n property: string;\n /**\n * operator\n */\n operator: FilterOperator;\n /**\n * value\n */\n value: string | number | boolean;\n}\n/**\n * Schema of a payment with a generic payment method.\n */\nexport interface GenericPayment {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * processor\n */\n processor: PaymentProcessor;\n /**\n * status\n */\n status: PaymentStatus;\n /**\n * The payment amount in cents.\n */\n amount: number;\n /**\n * The payment currency. Currently, only `usd` is supported.\n */\n currency: string;\n /**\n * The payment method used.\n */\n method: string;\n /**\n * What initiated this payment attempt, e.g. initial purchase, subscription renewal, or an automated dunning retry.\n */\n trigger: PaymentTrigger | null;\n /**\n * Error code, if the payment was declined.\n */\n decline_reason: string | null;\n /**\n * Human-readable error message, if the payment was declined.\n */\n decline_message: string | null;\n /**\n * The ID of the organization that owns the payment.\n */\n organization_id: string;\n /**\n * The ID of the checkout session associated with this payment.\n */\n checkout_id: string | null;\n /**\n * The ID of the order associated with this payment.\n */\n order_id: string | null;\n /**\n * Additional metadata from the payment processor for internal use.\n */\n processor_metadata?: Record<string, unknown>;\n}\n/**\n * HTTPValidationError\n */\nexport interface HTTPValidationError {\n /**\n * detail\n */\n detail?: ValidationError[];\n}\n/**\n * IntrospectTokenResponse\n */\nexport interface IntrospectTokenResponse {\n /**\n * active\n */\n active: boolean;\n /**\n * client_id\n */\n client_id: string;\n /**\n * token_type\n */\n token_type: TokenType;\n /**\n * scope\n */\n scope: string;\n /**\n * sub_type\n */\n sub_type: SubType;\n /**\n * sub\n */\n sub: string;\n /**\n * organizations\n */\n organizations: string[];\n /**\n * aud\n */\n aud: string;\n /**\n * iss\n */\n iss: string;\n /**\n * exp\n */\n exp: number;\n /**\n * iat\n */\n iat: number;\n}\n/**\n * LLMMetadata\n */\nexport interface LLMMetadata {\n /**\n * The vendor of the event.\n */\n vendor: string;\n /**\n * The model used for the event.\n */\n model: string;\n /**\n * The LLM prompt used for the event.\n */\n prompt?: string | null;\n /**\n * The LLM response used for the event.\n */\n response?: string | null;\n /**\n * The number of LLM input tokens used for the event.\n */\n input_tokens: number;\n /**\n * The number of LLM cached tokens that were used for the event.\n */\n cached_input_tokens?: number;\n /**\n * The number of LLM output tokens used for the event.\n */\n output_tokens: number;\n /**\n * The total number of LLM tokens used for the event.\n */\n total_tokens: number;\n}\n/**\n * A pay-what-you-want recurring price for a product, i.e. a subscription.\n\n**Deprecated**: The recurring interval should be set on the product itself.\n */\nexport interface LegacyRecurringProductPriceCustom {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the price.\n */\n id: string;\n /**\n * source\n */\n source: ProductPriceSource;\n /**\n * amount_type\n */\n amount_type: \"custom\";\n /**\n * The currency in which the customer will be charged.\n */\n price_currency: string;\n /**\n * The tax behavior of the price. If null, it defaults to the organization's default tax behavior.\n */\n tax_behavior: TaxBehaviorOption | null;\n /**\n * Whether the price is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the product owning the price.\n */\n product_id: string;\n /**\n * The type of the price.\n */\n type: \"recurring\";\n /**\n * recurring_interval\n */\n recurring_interval: RecurringInterval;\n /**\n * The minimum amount the customer can pay. If 0, the price is 'free or pay what you want'.\n */\n minimum_amount: number;\n /**\n * The maximum amount the customer can pay.\n */\n maximum_amount: number | null;\n /**\n * The initial amount shown to the customer.\n */\n preset_amount: number | null;\n /**\n * legacy\n */\n legacy: true;\n}\n/**\n * A recurring price for a product, i.e. a subscription.\n\n**Deprecated**: The recurring interval should be set on the product itself.\n */\nexport interface LegacyRecurringProductPriceFixed {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the price.\n */\n id: string;\n /**\n * source\n */\n source: ProductPriceSource;\n /**\n * amount_type\n */\n amount_type: \"fixed\";\n /**\n * The currency in which the customer will be charged.\n */\n price_currency: string;\n /**\n * The tax behavior of the price. If null, it defaults to the organization's default tax behavior.\n */\n tax_behavior: TaxBehaviorOption | null;\n /**\n * Whether the price is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the product owning the price.\n */\n product_id: string;\n /**\n * The type of the price.\n */\n type: \"recurring\";\n /**\n * recurring_interval\n */\n recurring_interval: RecurringInterval;\n /**\n * The price in cents.\n */\n price_amount: number;\n /**\n * legacy\n */\n legacy: true;\n}\n/**\n * LicenseKeyActivate\n */\nexport interface LicenseKeyActivate {\n /**\n * key\n */\n key: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * label\n */\n label: string;\n /**\n * Key-value object allowing you to set conditions that must match when validating the license key.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n conditions?: Record<string, string | number | number | boolean>;\n /**\n * Key-value object allowing you to store additional information about the activation\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n meta?: Record<string, string | number | number | boolean>;\n}\n/**\n * LicenseKeyActivationBase\n */\nexport interface LicenseKeyActivationBase {\n /**\n * id\n */\n id: string;\n /**\n * license_key_id\n */\n license_key_id: string;\n /**\n * label\n */\n label: string;\n /**\n * meta\n */\n meta: Record<string, string | number | number | boolean>;\n /**\n * created_at\n */\n created_at: string;\n /**\n * modified_at\n */\n modified_at: string | null;\n}\n/**\n * LicenseKeyActivationRead\n */\nexport interface LicenseKeyActivationRead {\n /**\n * id\n */\n id: string;\n /**\n * license_key_id\n */\n license_key_id: string;\n /**\n * label\n */\n label: string;\n /**\n * meta\n */\n meta: Record<string, string | number | number | boolean>;\n /**\n * created_at\n */\n created_at: string;\n /**\n * modified_at\n */\n modified_at: string | null;\n /**\n * license_key\n */\n license_key: LicenseKeyRead;\n}\n/**\n * LicenseKeyCustomer\n */\nexport interface LicenseKeyCustomer {\n /**\n * The ID of the customer.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email?: string | null;\n /**\n * Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.\n */\n email_verified: boolean;\n /**\n * type\n */\n type: CustomerType;\n /**\n * The name of the customer.\n */\n name: string | null;\n /**\n * The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * tax_id\n */\n tax_id: unknown[] | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer.\n */\n organization_id: string;\n /**\n * The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details.\n */\n default_payment_method_id?: string | null;\n /**\n * Timestamp for when the customer was soft deleted.\n */\n deleted_at: string | null;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n}\n/**\n * LicenseKeyDeactivate\n */\nexport interface LicenseKeyDeactivate {\n /**\n * key\n */\n key: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * activation_id\n */\n activation_id: string;\n}\n/**\n * LicenseKeyRead\n */\nexport interface LicenseKeyRead {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * customer\n */\n customer: LicenseKeyCustomer;\n /**\n * The benefit ID.\n */\n benefit_id: string;\n /**\n * key\n */\n key: string;\n /**\n * display_key\n */\n display_key: string;\n /**\n * status\n */\n status: LicenseKeyStatus;\n /**\n * limit_activations\n */\n limit_activations: number | null;\n /**\n * usage\n */\n usage: number;\n /**\n * limit_usage\n */\n limit_usage: number | null;\n /**\n * validations\n */\n validations: number;\n /**\n * last_validated_at\n */\n last_validated_at: string | null;\n /**\n * expires_at\n */\n expires_at: string | null;\n}\n/**\n * LicenseKeyUpdate\n */\nexport interface LicenseKeyUpdate {\n /**\n * status\n */\n status?: LicenseKeyStatus | null;\n /**\n * usage\n */\n usage?: number;\n /**\n * limit_activations\n */\n limit_activations?: number | null;\n /**\n * limit_usage\n */\n limit_usage?: number | null;\n /**\n * expires_at\n */\n expires_at?: string | null;\n}\n/**\n * LicenseKeyValidate\n */\nexport interface LicenseKeyValidate {\n /**\n * key\n */\n key: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * activation_id\n */\n activation_id?: string | null;\n /**\n * benefit_id\n */\n benefit_id?: string | null;\n /**\n * customer_id\n */\n customer_id?: string | null;\n /**\n * increment_usage\n */\n increment_usage?: number | null;\n /**\n * Key-value object allowing you to set conditions that must match when validating the license key.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n conditions?: Record<string, string | number | number | boolean>;\n}\n/**\n * LicenseKeyWithActivations\n */\nexport interface LicenseKeyWithActivations {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * customer\n */\n customer: LicenseKeyCustomer;\n /**\n * The benefit ID.\n */\n benefit_id: string;\n /**\n * key\n */\n key: string;\n /**\n * display_key\n */\n display_key: string;\n /**\n * status\n */\n status: LicenseKeyStatus;\n /**\n * limit_activations\n */\n limit_activations: number | null;\n /**\n * usage\n */\n usage: number;\n /**\n * limit_usage\n */\n limit_usage: number | null;\n /**\n * validations\n */\n validations: number;\n /**\n * last_validated_at\n */\n last_validated_at: string | null;\n /**\n * expires_at\n */\n expires_at: string | null;\n /**\n * activations\n */\n activations: LicenseKeyActivationBase[];\n}\n/**\n * ListResourceBenefit\n */\nexport interface ListResourceBenefit {\n /**\n * items\n */\n items: Benefit[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceBenefitGrant\n */\nexport interface ListResourceBenefitGrant {\n /**\n * items\n */\n items: BenefitGrant[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCheckout\n */\nexport interface ListResourceCheckout {\n /**\n * items\n */\n items: Checkout[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCheckoutLink\n */\nexport interface ListResourceCheckoutLink {\n /**\n * items\n */\n items: CheckoutLink[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomField\n */\nexport interface ListResourceCustomField {\n /**\n * items\n */\n items: CustomField[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomer\n */\nexport interface ListResourceCustomer {\n /**\n * items\n */\n items: Customer[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomerBenefitGrant\n */\nexport interface ListResourceCustomerBenefitGrant {\n /**\n * items\n */\n items: CustomerBenefitGrant[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomerCustomerMeter\n */\nexport interface ListResourceCustomerCustomerMeter {\n /**\n * items\n */\n items: CustomerCustomerMeter[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomerMeter\n */\nexport interface ListResourceCustomerMeter {\n /**\n * items\n */\n items: CustomerMeter[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomerOrder\n */\nexport interface ListResourceCustomerOrder {\n /**\n * items\n */\n items: CustomerOrder[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomerPaymentMethod\n */\nexport interface ListResourceCustomerPaymentMethod {\n /**\n * items\n */\n items: CustomerPaymentMethod[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomerPortalMember\n */\nexport interface ListResourceCustomerPortalMember {\n /**\n * items\n */\n items: CustomerPortalMember[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomerSubscription\n */\nexport interface ListResourceCustomerSubscription {\n /**\n * items\n */\n items: CustomerSubscription[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomerWallet\n */\nexport interface ListResourceCustomerWallet {\n /**\n * items\n */\n items: CustomerWallet[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceDiscount\n */\nexport interface ListResourceDiscount {\n /**\n * items\n */\n items: Discount[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceDispute\n */\nexport interface ListResourceDispute {\n /**\n * items\n */\n items: Dispute[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceDownloadableRead\n */\nexport interface ListResourceDownloadableRead {\n /**\n * items\n */\n items: DownloadableRead[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceEvent\n */\nexport interface ListResourceEvent {\n /**\n * items\n */\n items: Event[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceEventName\n */\nexport interface ListResourceEventName {\n /**\n * items\n */\n items: EventName[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceEventTypeWithStats\n */\nexport interface ListResourceEventTypeWithStats {\n /**\n * items\n */\n items: EventTypeWithStats[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceFileRead\n */\nexport interface ListResourceFileRead {\n /**\n * items\n */\n items: FileRead[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceLicenseKeyRead\n */\nexport interface ListResourceLicenseKeyRead {\n /**\n * items\n */\n items: LicenseKeyRead[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceMember\n */\nexport interface ListResourceMember {\n /**\n * items\n */\n items: Member[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceMeter\n */\nexport interface ListResourceMeter {\n /**\n * items\n */\n items: Meter[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceOrder\n */\nexport interface ListResourceOrder {\n /**\n * items\n */\n items: Order[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceOrganization\n */\nexport interface ListResourceOrganization {\n /**\n * items\n */\n items: Organization[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourcePayment\n */\nexport interface ListResourcePayment {\n /**\n * items\n */\n items: Payment[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourcePaymentMethod\n */\nexport interface ListResourcePaymentMethod {\n /**\n * items\n */\n items: PaymentMethod[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceProduct\n */\nexport interface ListResourceProduct {\n /**\n * items\n */\n items: Product[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceRefund\n */\nexport interface ListResourceRefund {\n /**\n * items\n */\n items: Refund[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceSubscription\n */\nexport interface ListResourceSubscription {\n /**\n * items\n */\n items: Subscription[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceWebhookDelivery\n */\nexport interface ListResourceWebhookDelivery {\n /**\n * items\n */\n items: WebhookDelivery[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceWebhookEndpoint\n */\nexport interface ListResourceWebhookEndpoint {\n /**\n * items\n */\n items: WebhookEndpoint[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceWithCursorPaginationEvent\n */\nexport interface ListResourceWithCursorPaginationEvent {\n /**\n * items\n */\n items: Event[];\n /**\n * pagination\n */\n pagination: CursorPagination;\n}\n/**\n * ManualRetryLimitExceeded\n */\nexport interface ManualRetryLimitExceeded {\n /**\n * error\n */\n error: \"ManualRetryLimitExceeded\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * A member of a customer.\n */\nexport interface Member {\n /**\n * The ID of the member.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the customer this member belongs to.\n */\n customer_id: string;\n /**\n * The email address of the member.\n */\n email: string;\n /**\n * The name of the member.\n */\n name: string | null;\n /**\n * The ID of the member in your system. This must be unique within the customer.\n */\n external_id: string | null;\n /**\n * role\n */\n role: MemberRole;\n}\n/**\n * Schema for creating a new member nested under a customer.\n\nThe customer is taken from the URL path, so it's not part of the body.\n */\nexport interface MemberCreateFromCustomer {\n /**\n * The email address of the member.\n */\n email: string;\n /**\n * name\n */\n name?: string | null;\n /**\n * The ID of the member in your system. This must be unique within the customer.\n */\n external_id?: string | null;\n /**\n * The role of the member within the customer. To assign or transfer ownership, use the member update endpoint.\n */\n role?: Role;\n}\n/**\n * Schema for creating an owner member during customer creation.\n */\nexport interface MemberOwnerCreate {\n /**\n * The email address of the member.\n */\n email: string;\n /**\n * name\n */\n name?: string | null;\n /**\n * The ID of the member in your system. This must be unique within the customer.\n */\n external_id?: string | null;\n}\n/**\n * Schema for updating a member.\n */\nexport interface MemberUpdate {\n /**\n * name\n */\n name?: string | null;\n /**\n * email\n */\n email?: string | null;\n /**\n * The role of the member within the customer.\n */\n role?: MemberRole | null;\n}\n/**\n * MetadataOutputType\n */\nexport interface MetadataOutputType extends Record<string, never> {}\n/**\n * Meter\n */\nexport interface Meter {\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The name of the meter. Will be shown on customer's invoices and usage.\n */\n name: string;\n /**\n * unit\n */\n unit: MeterUnit;\n /**\n * The label for the custom unit.\n */\n custom_label?: string | null;\n /**\n * The multiplier to convert from base unit to display scale.\n */\n custom_multiplier?: number | null;\n /**\n * filter\n */\n filter: Filter;\n /**\n * The aggregation to apply on the filtered events to calculate the meter.\n */\n aggregation: CountAggregation | PropertyAggregation | UniqueAggregation;\n /**\n * The ID of the organization owning the meter.\n */\n organization_id: string;\n /**\n * Whether the meter is archived and the time it was archived.\n */\n archived_at?: string | null;\n}\n/**\n * MeterCreate\n */\nexport interface MeterCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The name of the meter. Will be shown on customer's invoices and usage.\n */\n name: string;\n /**\n * unit\n */\n unit?: MeterUnit;\n /**\n * The label for the custom unit, e.g. 'request'. Required when unit is 'custom'.\n */\n custom_label?: string | null;\n /**\n * The multiplier to convert from the base unit to display scale, e.g. 1000 to display per 1000 units. Defaults to 1 when not provided.\n */\n custom_multiplier?: number | null;\n /**\n * filter\n */\n filter: Filter;\n /**\n * The aggregation to apply on the filtered events to calculate the meter.\n */\n aggregation: CountAggregation | PropertyAggregation | UniqueAggregation;\n /**\n * The ID of the organization owning the meter. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n}\n/**\n * An event created by Polar when credits are added to a customer meter.\n */\nexport interface MeterCreditEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"meter.credited\";\n /**\n * metadata\n */\n metadata: MeterCreditedMetadata;\n}\n/**\n * MeterCreditedMetadata\n */\nexport interface MeterCreditedMetadata {\n /**\n * meter_id\n */\n meter_id: string;\n /**\n * units\n */\n units: number;\n /**\n * rollover\n */\n rollover: boolean;\n}\n/**\n * MeterQuantities\n */\nexport interface MeterQuantities {\n /**\n * quantities\n */\n quantities: MeterQuantity[];\n /**\n * The total quantity for the period.\n */\n total: number;\n}\n/**\n * MeterQuantity\n */\nexport interface MeterQuantity {\n /**\n * The timestamp for the current period.\n */\n timestamp: string;\n /**\n * The quantity for the current period.\n */\n quantity: number;\n}\n/**\n * An event created by Polar when a customer meter is reset.\n */\nexport interface MeterResetEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"meter.reset\";\n /**\n * metadata\n */\n metadata: MeterResetMetadata;\n}\n/**\n * MeterResetMetadata\n */\nexport interface MeterResetMetadata {\n /**\n * meter_id\n */\n meter_id: string;\n}\n/**\n * MeterUpdate\n */\nexport interface MeterUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The name of the meter. Will be shown on customer's invoices and usage.\n */\n name?: string | null;\n /**\n * The unit of the meter.\n */\n unit?: MeterUnit | null;\n /**\n * The label for the custom unit. Required when unit is 'custom'.\n */\n custom_label?: string | null;\n /**\n * The multiplier to convert from base unit to display scale. Required when unit is 'custom'.\n */\n custom_multiplier?: number | null;\n /**\n * The filter to apply on events that'll be used to calculate the meter.\n */\n filter?: Filter | null;\n /**\n * The aggregation to apply on the filtered events to calculate the meter.\n */\n aggregation?: (CountAggregation | PropertyAggregation | UniqueAggregation) | null;\n /**\n * Whether the meter is archived. Archived meters are no longer used for billing.\n */\n is_archived?: boolean | null;\n}\n/**\n * Information about a metric.\n */\nexport interface Metric {\n /**\n * Unique identifier for the metric.\n */\n slug: string;\n /**\n * Human-readable name for the metric.\n */\n display_name: string;\n /**\n * type\n */\n type: MetricType;\n}\n/**\n * Schema for creating a metrics dashboard.\n */\nexport interface MetricDashboardCreate {\n /**\n * Display name for the dashboard.\n */\n name: string;\n /**\n * List of metric slugs to display in this dashboard.\n */\n metrics?: string[];\n /**\n * The ID of the organization owning this dashboard. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n}\n/**\n * A user-defined metrics dashboard.\n */\nexport interface MetricDashboardSchema {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Display name for the dashboard.\n */\n name: string;\n /**\n * List of metric slugs displayed in this dashboard.\n */\n metrics: string[];\n /**\n * The ID of the organization owning this dashboard.\n */\n organization_id: string;\n}\n/**\n * Schema for updating a metrics dashboard.\n */\nexport interface MetricDashboardUpdate {\n /**\n * Display name for the dashboard.\n */\n name?: string | null;\n /**\n * List of metric slugs to display in this dashboard.\n */\n metrics?: string[] | null;\n}\n/**\n * MetricPeriod\n */\nexport interface MetricPeriod {\n /**\n * Timestamp of this period data.\n */\n timestamp: string;\n /**\n * active_subscriptions\n */\n active_subscriptions?: number | number | null;\n /**\n * committed_subscriptions\n */\n committed_subscriptions?: number | number | null;\n /**\n * monthly_recurring_revenue\n */\n monthly_recurring_revenue?: number | number | null;\n /**\n * trial_monthly_recurring_revenue\n */\n trial_monthly_recurring_revenue?: number | number | null;\n /**\n * committed_monthly_recurring_revenue\n */\n committed_monthly_recurring_revenue?: number | number | null;\n /**\n * trial_committed_monthly_recurring_revenue\n */\n trial_committed_monthly_recurring_revenue?: number | number | null;\n /**\n * average_revenue_per_user\n */\n average_revenue_per_user?: number | number | null;\n /**\n * checkouts\n */\n checkouts?: number | number | null;\n /**\n * succeeded_checkouts\n */\n succeeded_checkouts?: number | number | null;\n /**\n * churned_subscriptions\n */\n churned_subscriptions?: number | number | null;\n /**\n * churn_rate\n */\n churn_rate?: number | number | null;\n /**\n * seats_total\n */\n seats_total?: number | number | null;\n /**\n * seats_claimed\n */\n seats_claimed?: number | number | null;\n /**\n * seats_pending\n */\n seats_pending?: number | number | null;\n /**\n * seat_customers\n */\n seat_customers?: number | number | null;\n /**\n * new_seat_customers\n */\n new_seat_customers?: number | number | null;\n /**\n * churned_seat_customers\n */\n churned_seat_customers?: number | number | null;\n /**\n * orders\n */\n orders?: number | number | null;\n /**\n * revenue\n */\n revenue?: number | number | null;\n /**\n * net_revenue\n */\n net_revenue?: number | number | null;\n /**\n * cumulative_revenue\n */\n cumulative_revenue?: number | number | null;\n /**\n * net_cumulative_revenue\n */\n net_cumulative_revenue?: number | number | null;\n /**\n * costs\n */\n costs?: number | number | null;\n /**\n * cumulative_costs\n */\n cumulative_costs?: number | number | null;\n /**\n * average_order_value\n */\n average_order_value?: number | number | null;\n /**\n * net_average_order_value\n */\n net_average_order_value?: number | number | null;\n /**\n * cost_per_user\n */\n cost_per_user?: number | number | null;\n /**\n * active_user_by_event\n */\n active_user_by_event?: number | number | null;\n /**\n * one_time_products\n */\n one_time_products?: number | number | null;\n /**\n * one_time_products_revenue\n */\n one_time_products_revenue?: number | number | null;\n /**\n * one_time_products_net_revenue\n */\n one_time_products_net_revenue?: number | number | null;\n /**\n * new_subscriptions\n */\n new_subscriptions?: number | number | null;\n /**\n * new_subscriptions_revenue\n */\n new_subscriptions_revenue?: number | number | null;\n /**\n * new_subscriptions_net_revenue\n */\n new_subscriptions_net_revenue?: number | number | null;\n /**\n * renewed_subscriptions\n */\n renewed_subscriptions?: number | number | null;\n /**\n * renewed_subscriptions_revenue\n */\n renewed_subscriptions_revenue?: number | number | null;\n /**\n * renewed_subscriptions_net_revenue\n */\n renewed_subscriptions_net_revenue?: number | number | null;\n /**\n * canceled_subscriptions\n */\n canceled_subscriptions?: number | number | null;\n /**\n * canceled_subscriptions_customer_service\n */\n canceled_subscriptions_customer_service?: number | number | null;\n /**\n * canceled_subscriptions_low_quality\n */\n canceled_subscriptions_low_quality?: number | number | null;\n /**\n * canceled_subscriptions_missing_features\n */\n canceled_subscriptions_missing_features?: number | number | null;\n /**\n * canceled_subscriptions_switched_service\n */\n canceled_subscriptions_switched_service?: number | number | null;\n /**\n * canceled_subscriptions_too_complex\n */\n canceled_subscriptions_too_complex?: number | number | null;\n /**\n * canceled_subscriptions_too_expensive\n */\n canceled_subscriptions_too_expensive?: number | number | null;\n /**\n * canceled_subscriptions_unused\n */\n canceled_subscriptions_unused?: number | number | null;\n /**\n * canceled_subscriptions_other\n */\n canceled_subscriptions_other?: number | number | null;\n /**\n * annual_recurring_revenue\n */\n annual_recurring_revenue?: number | number | null;\n /**\n * committed_annual_recurring_revenue\n */\n committed_annual_recurring_revenue?: number | number | null;\n /**\n * checkouts_conversion\n */\n checkouts_conversion?: number | number | null;\n /**\n * ltv\n */\n ltv?: number | number | null;\n /**\n * gross_margin\n */\n gross_margin?: number | number | null;\n /**\n * gross_margin_percentage\n */\n gross_margin_percentage?: number | number | null;\n /**\n * cashflow\n */\n cashflow?: number | number | null;\n /**\n * average_seats_per_customer\n */\n average_seats_per_customer?: number | number | null;\n /**\n * seat_utilization_rate\n */\n seat_utilization_rate?: number | number | null;\n}\n/**\n * Metrics\n */\nexport interface Metrics {\n /**\n * active_subscriptions\n */\n active_subscriptions?: Metric | null;\n /**\n * committed_subscriptions\n */\n committed_subscriptions?: Metric | null;\n /**\n * monthly_recurring_revenue\n */\n monthly_recurring_revenue?: Metric | null;\n /**\n * trial_monthly_recurring_revenue\n */\n trial_monthly_recurring_revenue?: Metric | null;\n /**\n * committed_monthly_recurring_revenue\n */\n committed_monthly_recurring_revenue?: Metric | null;\n /**\n * trial_committed_monthly_recurring_revenue\n */\n trial_committed_monthly_recurring_revenue?: Metric | null;\n /**\n * average_revenue_per_user\n */\n average_revenue_per_user?: Metric | null;\n /**\n * checkouts\n */\n checkouts?: Metric | null;\n /**\n * succeeded_checkouts\n */\n succeeded_checkouts?: Metric | null;\n /**\n * churned_subscriptions\n */\n churned_subscriptions?: Metric | null;\n /**\n * churn_rate\n */\n churn_rate?: Metric | null;\n /**\n * seats_total\n */\n seats_total?: Metric | null;\n /**\n * seats_claimed\n */\n seats_claimed?: Metric | null;\n /**\n * seats_pending\n */\n seats_pending?: Metric | null;\n /**\n * seat_customers\n */\n seat_customers?: Metric | null;\n /**\n * new_seat_customers\n */\n new_seat_customers?: Metric | null;\n /**\n * churned_seat_customers\n */\n churned_seat_customers?: Metric | null;\n /**\n * orders\n */\n orders?: Metric | null;\n /**\n * revenue\n */\n revenue?: Metric | null;\n /**\n * net_revenue\n */\n net_revenue?: Metric | null;\n /**\n * cumulative_revenue\n */\n cumulative_revenue?: Metric | null;\n /**\n * net_cumulative_revenue\n */\n net_cumulative_revenue?: Metric | null;\n /**\n * costs\n */\n costs?: Metric | null;\n /**\n * cumulative_costs\n */\n cumulative_costs?: Metric | null;\n /**\n * average_order_value\n */\n average_order_value?: Metric | null;\n /**\n * net_average_order_value\n */\n net_average_order_value?: Metric | null;\n /**\n * cost_per_user\n */\n cost_per_user?: Metric | null;\n /**\n * active_user_by_event\n */\n active_user_by_event?: Metric | null;\n /**\n * one_time_products\n */\n one_time_products?: Metric | null;\n /**\n * one_time_products_revenue\n */\n one_time_products_revenue?: Metric | null;\n /**\n * one_time_products_net_revenue\n */\n one_time_products_net_revenue?: Metric | null;\n /**\n * new_subscriptions\n */\n new_subscriptions?: Metric | null;\n /**\n * new_subscriptions_revenue\n */\n new_subscriptions_revenue?: Metric | null;\n /**\n * new_subscriptions_net_revenue\n */\n new_subscriptions_net_revenue?: Metric | null;\n /**\n * renewed_subscriptions\n */\n renewed_subscriptions?: Metric | null;\n /**\n * renewed_subscriptions_revenue\n */\n renewed_subscriptions_revenue?: Metric | null;\n /**\n * renewed_subscriptions_net_revenue\n */\n renewed_subscriptions_net_revenue?: Metric | null;\n /**\n * canceled_subscriptions\n */\n canceled_subscriptions?: Metric | null;\n /**\n * canceled_subscriptions_customer_service\n */\n canceled_subscriptions_customer_service?: Metric | null;\n /**\n * canceled_subscriptions_low_quality\n */\n canceled_subscriptions_low_quality?: Metric | null;\n /**\n * canceled_subscriptions_missing_features\n */\n canceled_subscriptions_missing_features?: Metric | null;\n /**\n * canceled_subscriptions_switched_service\n */\n canceled_subscriptions_switched_service?: Metric | null;\n /**\n * canceled_subscriptions_too_complex\n */\n canceled_subscriptions_too_complex?: Metric | null;\n /**\n * canceled_subscriptions_too_expensive\n */\n canceled_subscriptions_too_expensive?: Metric | null;\n /**\n * canceled_subscriptions_unused\n */\n canceled_subscriptions_unused?: Metric | null;\n /**\n * canceled_subscriptions_other\n */\n canceled_subscriptions_other?: Metric | null;\n /**\n * annual_recurring_revenue\n */\n annual_recurring_revenue?: Metric | null;\n /**\n * committed_annual_recurring_revenue\n */\n committed_annual_recurring_revenue?: Metric | null;\n /**\n * checkouts_conversion\n */\n checkouts_conversion?: Metric | null;\n /**\n * ltv\n */\n ltv?: Metric | null;\n /**\n * gross_margin\n */\n gross_margin?: Metric | null;\n /**\n * gross_margin_percentage\n */\n gross_margin_percentage?: Metric | null;\n /**\n * cashflow\n */\n cashflow?: Metric | null;\n /**\n * average_seats_per_customer\n */\n average_seats_per_customer?: Metric | null;\n /**\n * seat_utilization_rate\n */\n seat_utilization_rate?: Metric | null;\n}\n/**\n * Date interval limit to get metrics for a given interval.\n */\nexport interface MetricsIntervalLimit {\n /**\n * Minimum number of days for this interval.\n */\n min_days: number;\n /**\n * Maximum number of days for this interval.\n */\n max_days: number;\n}\n/**\n * Date interval limits to get metrics for each interval.\n */\nexport interface MetricsIntervalsLimits {\n /**\n * hour\n */\n hour: MetricsIntervalLimit;\n /**\n * day\n */\n day: MetricsIntervalLimit;\n /**\n * week\n */\n week: MetricsIntervalLimit;\n /**\n * month\n */\n month: MetricsIntervalLimit;\n /**\n * year\n */\n year: MetricsIntervalLimit;\n}\n/**\n * Date limits to get metrics.\n */\nexport interface MetricsLimits {\n /**\n * Minimum date to get metrics.\n */\n min_date: string;\n /**\n * intervals\n */\n intervals: MetricsIntervalsLimits;\n}\n/**\n * Metrics response schema.\n */\nexport interface MetricsResponse {\n /**\n * List of data for each timestamp.\n */\n periods: MetricPeriod[];\n /**\n * totals\n */\n totals: MetricsTotals;\n /**\n * metrics\n */\n metrics: Metrics;\n}\n/**\n * MetricsTotals\n */\nexport interface MetricsTotals {\n /**\n * active_subscriptions\n */\n active_subscriptions?: number | number | null;\n /**\n * committed_subscriptions\n */\n committed_subscriptions?: number | number | null;\n /**\n * monthly_recurring_revenue\n */\n monthly_recurring_revenue?: number | number | null;\n /**\n * trial_monthly_recurring_revenue\n */\n trial_monthly_recurring_revenue?: number | number | null;\n /**\n * committed_monthly_recurring_revenue\n */\n committed_monthly_recurring_revenue?: number | number | null;\n /**\n * trial_committed_monthly_recurring_revenue\n */\n trial_committed_monthly_recurring_revenue?: number | number | null;\n /**\n * average_revenue_per_user\n */\n average_revenue_per_user?: number | number | null;\n /**\n * checkouts\n */\n checkouts?: number | number | null;\n /**\n * succeeded_checkouts\n */\n succeeded_checkouts?: number | number | null;\n /**\n * churned_subscriptions\n */\n churned_subscriptions?: number | number | null;\n /**\n * churn_rate\n */\n churn_rate?: number | number | null;\n /**\n * seats_total\n */\n seats_total?: number | number | null;\n /**\n * seats_claimed\n */\n seats_claimed?: number | number | null;\n /**\n * seats_pending\n */\n seats_pending?: number | number | null;\n /**\n * seat_customers\n */\n seat_customers?: number | number | null;\n /**\n * new_seat_customers\n */\n new_seat_customers?: number | number | null;\n /**\n * churned_seat_customers\n */\n churned_seat_customers?: number | number | null;\n /**\n * orders\n */\n orders?: number | number | null;\n /**\n * revenue\n */\n revenue?: number | number | null;\n /**\n * net_revenue\n */\n net_revenue?: number | number | null;\n /**\n * cumulative_revenue\n */\n cumulative_revenue?: number | number | null;\n /**\n * net_cumulative_revenue\n */\n net_cumulative_revenue?: number | number | null;\n /**\n * costs\n */\n costs?: number | number | null;\n /**\n * cumulative_costs\n */\n cumulative_costs?: number | number | null;\n /**\n * average_order_value\n */\n average_order_value?: number | number | null;\n /**\n * net_average_order_value\n */\n net_average_order_value?: number | number | null;\n /**\n * cost_per_user\n */\n cost_per_user?: number | number | null;\n /**\n * active_user_by_event\n */\n active_user_by_event?: number | number | null;\n /**\n * one_time_products\n */\n one_time_products?: number | number | null;\n /**\n * one_time_products_revenue\n */\n one_time_products_revenue?: number | number | null;\n /**\n * one_time_products_net_revenue\n */\n one_time_products_net_revenue?: number | number | null;\n /**\n * new_subscriptions\n */\n new_subscriptions?: number | number | null;\n /**\n * new_subscriptions_revenue\n */\n new_subscriptions_revenue?: number | number | null;\n /**\n * new_subscriptions_net_revenue\n */\n new_subscriptions_net_revenue?: number | number | null;\n /**\n * renewed_subscriptions\n */\n renewed_subscriptions?: number | number | null;\n /**\n * renewed_subscriptions_revenue\n */\n renewed_subscriptions_revenue?: number | number | null;\n /**\n * renewed_subscriptions_net_revenue\n */\n renewed_subscriptions_net_revenue?: number | number | null;\n /**\n * canceled_subscriptions\n */\n canceled_subscriptions?: number | number | null;\n /**\n * canceled_subscriptions_customer_service\n */\n canceled_subscriptions_customer_service?: number | number | null;\n /**\n * canceled_subscriptions_low_quality\n */\n canceled_subscriptions_low_quality?: number | number | null;\n /**\n * canceled_subscriptions_missing_features\n */\n canceled_subscriptions_missing_features?: number | number | null;\n /**\n * canceled_subscriptions_switched_service\n */\n canceled_subscriptions_switched_service?: number | number | null;\n /**\n * canceled_subscriptions_too_complex\n */\n canceled_subscriptions_too_complex?: number | number | null;\n /**\n * canceled_subscriptions_too_expensive\n */\n canceled_subscriptions_too_expensive?: number | number | null;\n /**\n * canceled_subscriptions_unused\n */\n canceled_subscriptions_unused?: number | number | null;\n /**\n * canceled_subscriptions_other\n */\n canceled_subscriptions_other?: number | number | null;\n /**\n * annual_recurring_revenue\n */\n annual_recurring_revenue?: number | number | null;\n /**\n * committed_annual_recurring_revenue\n */\n committed_annual_recurring_revenue?: number | number | null;\n /**\n * checkouts_conversion\n */\n checkouts_conversion?: number | number | null;\n /**\n * ltv\n */\n ltv?: number | number | null;\n /**\n * gross_margin\n */\n gross_margin?: number | number | null;\n /**\n * gross_margin_percentage\n */\n gross_margin_percentage?: number | number | null;\n /**\n * cashflow\n */\n cashflow?: number | number | null;\n /**\n * average_seats_per_customer\n */\n average_seats_per_customer?: number | number | null;\n /**\n * seat_utilization_rate\n */\n seat_utilization_rate?: number | number | null;\n}\n/**\n * MissingInvoiceBillingDetails\n */\nexport interface MissingInvoiceBillingDetails {\n /**\n * error\n */\n error: \"MissingInvoiceBillingDetails\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * NotOpenCheckout\n */\nexport interface NotOpenCheckout {\n /**\n * error\n */\n error: \"NotOpenCheckout\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * NotPermitted\n */\nexport interface NotPermitted {\n /**\n * error\n */\n error: \"NotPermitted\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * OAuth2ClientConfiguration\n */\nexport interface OAuth2ClientConfiguration {\n /**\n * redirect_uris\n */\n redirect_uris: string[];\n /**\n * token_endpoint_auth_method\n */\n token_endpoint_auth_method?: TokenEndpointAuthMethod;\n /**\n * grant_types\n */\n grant_types?: (\"authorization_code\" | \"refresh_token\")[];\n /**\n * response_types\n */\n response_types?: \"code\"[];\n /**\n * scope\n */\n scope?: string;\n /**\n * client_name\n */\n client_name: string;\n /**\n * client_uri\n */\n client_uri?: string | null;\n /**\n * logo_uri\n */\n logo_uri?: string | null;\n /**\n * tos_uri\n */\n tos_uri?: string | null;\n /**\n * policy_uri\n */\n policy_uri?: string | null;\n /**\n * default_sub_type\n */\n default_sub_type?: SubType;\n}\n/**\n * OAuth2ClientConfigurationUpdate\n */\nexport interface OAuth2ClientConfigurationUpdate {\n /**\n * redirect_uris\n */\n redirect_uris: string[];\n /**\n * token_endpoint_auth_method\n */\n token_endpoint_auth_method?: TokenEndpointAuthMethod;\n /**\n * grant_types\n */\n grant_types?: (\"authorization_code\" | \"refresh_token\")[];\n /**\n * response_types\n */\n response_types?: \"code\"[];\n /**\n * scope\n */\n scope?: string;\n /**\n * client_name\n */\n client_name: string;\n /**\n * client_uri\n */\n client_uri?: string | null;\n /**\n * logo_uri\n */\n logo_uri?: string | null;\n /**\n * tos_uri\n */\n tos_uri?: string | null;\n /**\n * policy_uri\n */\n policy_uri?: string | null;\n /**\n * default_sub_type\n */\n default_sub_type?: SubType;\n /**\n * client_id\n */\n client_id: string;\n}\n/**\n * OAuth2ClientPublic\n */\nexport interface OAuth2ClientPublic {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * client_id\n */\n client_id: string;\n /**\n * client_name\n */\n client_name: string | null;\n /**\n * client_uri\n */\n client_uri: string | null;\n /**\n * logo_uri\n */\n logo_uri: string | null;\n /**\n * tos_uri\n */\n tos_uri: string | null;\n /**\n * policy_uri\n */\n policy_uri: string | null;\n}\n/**\n * OffSessionChargesNotEnabled\n */\nexport interface OffSessionChargesNotEnabled {\n /**\n * error\n */\n error: \"OffSessionChargesNotEnabled\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * Order\n */\nexport interface Order {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * status\n */\n status: OrderStatus;\n /**\n * Whether the order has been paid for.\n */\n paid: boolean;\n /**\n * Amount in cents, before discounts and taxes.\n */\n subtotal_amount: number;\n /**\n * Discount amount in cents.\n */\n discount_amount: number;\n /**\n * Amount in cents, after discounts but before taxes.\n */\n net_amount: number;\n /**\n * Sales tax amount in cents.\n */\n tax_amount: number;\n /**\n * Amount in cents, after discounts and taxes.\n */\n total_amount: number;\n /**\n * Customer's balance amount applied to this invoice. Can increase the total amount paid, if the customer has a negative balance, or decrease it, if the customer has a positive balance.Amount in cents.\n */\n applied_balance_amount: number;\n /**\n * Amount in cents that is due for this order.\n */\n due_amount: number;\n /**\n * Amount refunded in cents.\n */\n refunded_amount: number;\n /**\n * Sales tax refunded in cents.\n */\n refunded_tax_amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * billing_reason\n */\n billing_reason: OrderBillingReason;\n /**\n * The name of the customer that should appear on the invoice.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * The invoice number associated with this order. `null` while the order is in `draft` status; assigned at finalize.\n */\n invoice_number: string | null;\n /**\n * Whether an invoice has been generated for this order.\n */\n is_invoice_generated: boolean;\n /**\n * The receipt number for this order. Set once the order is paid for organizations with receipts enabled. When set, a downloadable receipt PDF can be obtained via the receipt endpoint.\n */\n receipt_number: string | null;\n /**\n * Number of seats purchased (for seat-based one-time orders).\n */\n seats?: number | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * product_id\n */\n product_id: string | null;\n /**\n * discount_id\n */\n discount_id: string | null;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * checkout_id\n */\n checkout_id: string | null;\n /**\n * When the next automatic payment retry is scheduled. `null` if the order is not in dunning or all retries have been exhausted.\n */\n next_payment_attempt_at?: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * Platform fee amount in cents.\n */\n platform_fee_amount: number;\n /**\n * Currency of the platform fee.\n */\n platform_fee_currency: string | null;\n /**\n * customer\n */\n customer: OrderCustomer;\n /**\n * product\n */\n product: OrderProduct | null;\n /**\n * discount\n */\n discount:\n | (\n | DiscountFixedOnceForeverDurationBase\n | DiscountFixedRepeatDurationBase\n | DiscountPercentageOnceForeverDurationBase\n | DiscountPercentageRepeatDurationBase\n )\n | null;\n /**\n * subscription\n */\n subscription: OrderSubscription | null;\n /**\n * Line items composing the order.\n */\n items: OrderItemSchema[];\n /**\n * A summary description of the order.\n */\n description: string;\n /**\n * Amount in cents that can still be refunded (net, before taxes). Accounts for any applied customer balance and previous refunds.\n */\n refundable_amount: number;\n /**\n * Sales tax in cents that would be refunded if the full refundable amount is refunded.\n */\n refundable_tax_amount: number;\n}\n/**\n * Schema to create a draft order for an off-session charge.\n */\nexport interface OrderCreate {\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The ID of the organization the order belongs to. **Required unless you use an organization token.** The customer and product must belong to this organization.\n */\n organization_id?: string | null;\n /**\n * The ID of the customer the order is for. Must belong to the order's organization.\n */\n customer_id: string;\n /**\n * The ID of the one-time product to charge for. Must belong to the order's organization. Only fixed-price and free products are supported.\n */\n product_id: string;\n /**\n * The currency to charge in (ISO 4217, lowercase, e.g. `usd`). Defaults to the organization's default currency; specify it to force a different one, or when the product isn't priced in the organization's default currency.\n */\n currency?: string | null;\n /**\n * A custom amount to charge, in the smallest currency unit. Overrides the product's price; defaults to the product's configured price (0 for free products). A positive amount must be at least the currency's minimum.\n */\n amount?: number | null;\n /**\n * A custom description for the order's line item, shown on the invoice and receipt (e.g. `5,000 tokens`). Defaults to the product name.\n */\n description?: string | null;\n}\n/**\n * OrderCustomer\n */\nexport interface OrderCustomer {\n /**\n * The ID of the customer.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email?: string | null;\n /**\n * Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.\n */\n email_verified: boolean;\n /**\n * type\n */\n type: CustomerType;\n /**\n * The name of the customer.\n */\n name: string | null;\n /**\n * The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * tax_id\n */\n tax_id: unknown[] | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer.\n */\n organization_id: string;\n /**\n * The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details.\n */\n default_payment_method_id?: string | null;\n /**\n * Timestamp for when the customer was soft deleted.\n */\n deleted_at: string | null;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n}\n/**\n * Schema to finalize a draft order and trigger an off-session charge.\n */\nexport interface OrderFinalize {\n /**\n * ID of the payment method to charge. Must belong to the order's customer. Falls back to the customer's default payment method when unset.\n */\n payment_method_id?: string | null;\n}\n/**\n * Order's invoice data.\n */\nexport interface OrderInvoice {\n /**\n * The URL to the invoice.\n */\n url: string;\n}\n/**\n * An order line item.\n */\nexport interface OrderItemSchema {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Description of the line item charge.\n */\n label: string;\n /**\n * Amount in cents, before discounts and taxes.\n */\n amount: number;\n /**\n * Sales tax amount in cents.\n */\n tax_amount: number;\n /**\n * Whether this charge is due to a proration.\n */\n proration: boolean;\n /**\n * Associated price ID, if any.\n */\n product_price_id: string | null;\n}\n/**\n * OrderNotDraft\n */\nexport interface OrderNotDraft {\n /**\n * error\n */\n error: \"OrderNotDraft\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * OrderNotEligibleForInvoice\n */\nexport interface OrderNotEligibleForInvoice {\n /**\n * error\n */\n error: \"OrderNotEligibleForInvoice\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * OrderNotEligibleForRetry\n */\nexport interface OrderNotEligibleForRetry {\n /**\n * error\n */\n error: \"OrderNotEligibleForRetry\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * An event created by Polar when an order is paid.\n */\nexport interface OrderPaidEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"order.paid\";\n /**\n * metadata\n */\n metadata: OrderPaidMetadata;\n}\n/**\n * OrderPaidMetadata\n */\nexport interface OrderPaidMetadata {\n /**\n * order_id\n */\n order_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * billing_type\n */\n billing_type?: string;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency?: string;\n /**\n * net_amount\n */\n net_amount?: number;\n /**\n * tax_amount\n */\n tax_amount?: number;\n /**\n * applied_balance_amount\n */\n applied_balance_amount?: number;\n /**\n * discount_amount\n */\n discount_amount?: number;\n /**\n * discount_id\n */\n discount_id?: string;\n /**\n * platform_fee\n */\n platform_fee?: number;\n /**\n * subscription_id\n */\n subscription_id?: string;\n /**\n * recurring_interval\n */\n recurring_interval?: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count?: number;\n}\n/**\n * OrderProduct\n */\nexport interface OrderProduct {\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description: string | null;\n /**\n * visibility\n */\n visibility: ProductVisibility;\n /**\n * The recurring interval of the product. If `None`, the product is a one-time purchase.\n */\n recurring_interval: RecurringInterval | null;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.\n */\n recurring_interval_count: number | null;\n /**\n * The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval.\n */\n meter_interval: RecurringInterval | null;\n /**\n * Number of meter interval units. None when no meter cycle is set.\n */\n meter_interval_count: number | null;\n /**\n * Whether the product is a subscription.\n */\n is_recurring: boolean;\n /**\n * Whether the product is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the organization owning the product.\n */\n organization_id: string;\n}\n/**\n * Order's receipt data.\n */\nexport interface OrderReceipt {\n /**\n * The URL to the receipt PDF.\n */\n url: string;\n}\n/**\n * An event created by Polar when an order is refunded.\n */\nexport interface OrderRefundedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"order.refunded\";\n /**\n * metadata\n */\n metadata: OrderRefundedMetadata;\n}\n/**\n * OrderRefundedMetadata\n */\nexport interface OrderRefundedMetadata {\n /**\n * order_id\n */\n order_id: string;\n /**\n * refunded_amount\n */\n refunded_amount: number;\n /**\n * currency\n */\n currency: string;\n}\n/**\n * OrderSubscription\n */\nexport interface OrderSubscription {\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The amount of the subscription.\n */\n amount: number;\n /**\n * The currency of the subscription.\n */\n currency: string;\n /**\n * recurring_interval\n */\n recurring_interval: RecurringInterval;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.\n */\n recurring_interval_count: number;\n /**\n * status\n */\n status: SubscriptionStatus;\n /**\n * The start timestamp of the current billing period.\n */\n current_period_start: string;\n /**\n * The end timestamp of the current billing period.\n */\n current_period_end: string;\n /**\n * The start timestamp of the current meter period, if the product has a meter cycle set. Metered credits are granted and overage is settled on this cadence.\n */\n current_meter_period_start: string | null;\n /**\n * The end timestamp of the current meter period, if the product has a meter cycle set. This is when credits next renew.\n */\n current_meter_period_end: string | null;\n /**\n * The start timestamp of the trial period, if any.\n */\n trial_start: string | null;\n /**\n * The end timestamp of the trial period, if any.\n */\n trial_end: string | null;\n /**\n * Whether the subscription will be canceled at the end of the current period.\n */\n cancel_at_period_end: boolean;\n /**\n * The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.\n */\n canceled_at: string | null;\n /**\n * The timestamp when the subscription started.\n */\n started_at: string | null;\n /**\n * The timestamp when the subscription will end.\n */\n ends_at: string | null;\n /**\n * The timestamp when the subscription ended.\n */\n ended_at: string | null;\n /**\n * The timestamp when the subscription entered `past_due` status.\n */\n past_due_at?: string | null;\n /**\n * Whether the subscription will be paused at the end of the current period.\n */\n pause_at_period_end: boolean;\n /**\n * The timestamp when the subscription was paused.\n */\n paused_at: string | null;\n /**\n * The timestamp when a paused subscription is scheduled to automatically resume, if set.\n */\n resumes_at: string | null;\n /**\n * The ID of the subscribed customer.\n */\n customer_id: string;\n /**\n * The ID of the subscribed product.\n */\n product_id: string;\n /**\n * The ID of the applied discount, if any.\n */\n discount_id: string | null;\n /**\n * checkout_id\n */\n checkout_id: string | null;\n /**\n * The number of seats for seat-based subscriptions. None for non-seat subscriptions.\n */\n seats?: number | null;\n /**\n * customer_cancellation_reason\n */\n customer_cancellation_reason: CustomerCancellationReason | null;\n /**\n * customer_cancellation_comment\n */\n customer_cancellation_comment: string | null;\n}\n/**\n * Schema to update an order.\n */\nexport interface OrderUpdate {\n /**\n * The name of the customer that should appear on the invoice.\n */\n billing_name?: string | null;\n /**\n * The address of the customer that should appear on the invoice. Country and state fields cannot be updated.\n */\n billing_address?: AddressInput | null;\n}\n/**\n * An event created by Polar when an order is voided.\n */\nexport interface OrderVoidedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"order.voided\";\n /**\n * metadata\n */\n metadata: OrderVoidedMetadata;\n}\n/**\n * OrderVoidedMetadata\n */\nexport interface OrderVoidedMetadata {\n /**\n * order_id\n */\n order_id: string;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n}\n/**\n * Organization\n */\nexport interface Organization {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Organization name shown in checkout, customer portal, emails etc.\n */\n name: string;\n /**\n * Unique organization slug in checkout, customer portal and credit card statements.\n */\n slug: string;\n /**\n * Avatar URL shown in checkout, customer portal, emails etc.\n */\n avatar_url: string | null;\n /**\n * proration_behavior\n */\n proration_behavior: SubscriptionProrationBehavior;\n /**\n * Whether customers can update their subscriptions from the customer portal.\n */\n allow_customer_updates: boolean;\n /**\n * Public support email.\n */\n email: string | null;\n /**\n * Official website of the organization.\n */\n website: string | null;\n /**\n * Links to social profiles.\n */\n socials: OrganizationSocialLink[];\n /**\n * status\n */\n status: OrganizationStatus;\n /**\n * When the business details were submitted for review.\n */\n details_submitted_at: string | null;\n /**\n * Whether members must access this organization through its SSO connection.\n */\n sso_enforced: boolean;\n /**\n * Default presentment currency. Used as fallback in checkout and customer portal, if the customer's local currency is not available.\n */\n default_presentment_currency: string;\n /**\n * default_tax_behavior\n */\n default_tax_behavior: TaxBehaviorOption;\n /**\n * Organization feature settings\n */\n feature_settings: OrganizationFeatureSettings | null;\n /**\n * subscription_settings\n */\n subscription_settings: OrganizationSubscriptionSettings;\n /**\n * customer_email_settings\n */\n customer_email_settings: OrganizationCustomerEmailSettings;\n /**\n * customer_portal_settings\n */\n customer_portal_settings: OrganizationCustomerPortalSettings;\n /**\n * Two-letter country code (ISO 3166-1 alpha-2).\n */\n country?: CountryAlpha2 | null;\n /**\n * ID of the transactions account.\n */\n account_id: string | null;\n /**\n * ID of the payout account.\n */\n payout_account_id: string | null;\n /**\n * capabilities\n */\n capabilities: OrganizationCapabilities;\n}\n/**\n * Schema to create a file to be used as an organization avatar.\n */\nexport interface OrganizationAvatarFileCreate {\n /**\n * organization_id\n */\n organization_id?: string | null;\n /**\n * name\n */\n name: string;\n /**\n * MIME type of the file. Only images are supported for this type of file.\n */\n mime_type: string;\n /**\n * Size of the file. A maximum of 1 MB is allowed for this type of file.\n */\n size: number;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64?: string | null;\n /**\n * upload\n */\n upload: S3FileCreateMultipart;\n /**\n * service\n */\n service: \"organization_avatar\";\n /**\n * version\n */\n version?: string | null;\n}\n/**\n * File to be used as an organization avatar.\n */\nexport interface OrganizationAvatarFileRead {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * name\n */\n name: string;\n /**\n * path\n */\n path: string;\n /**\n * mime_type\n */\n mime_type: string;\n /**\n * size\n */\n size: number;\n /**\n * storage_version\n */\n storage_version: string | null;\n /**\n * checksum_etag\n */\n checksum_etag: string | null;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64: string | null;\n /**\n * checksum_sha256_hex\n */\n checksum_sha256_hex: string | null;\n /**\n * last_modified_at\n */\n last_modified_at: string | null;\n /**\n * version\n */\n version: string | null;\n /**\n * service\n */\n service: \"organization_avatar\";\n /**\n * is_uploaded\n */\n is_uploaded: boolean;\n /**\n * created_at\n */\n created_at: string;\n /**\n * size_readable\n */\n size_readable: string;\n /**\n * public_url\n */\n public_url: string;\n}\n/**\n * OrganizationCapabilities\n */\nexport interface OrganizationCapabilities {\n /**\n * Whether the organization can accept new checkout payments.\n */\n checkout_payments: boolean;\n /**\n * Whether the organization can process subscription renewals.\n */\n subscription_renewals: boolean;\n /**\n * Whether the organization can withdraw its balance.\n */\n payouts: boolean;\n /**\n * Whether the organization can issue refunds.\n */\n refunds: boolean;\n /**\n * Whether the organization can access the API.\n */\n api_access: boolean;\n /**\n * Whether the organization can access the dashboard.\n */\n dashboard_access: boolean;\n}\n/**\n * OrganizationCompanyLegalEntitySchema\n */\nexport interface OrganizationCompanyLegalEntitySchema {\n /**\n * type\n */\n type: \"company\";\n /**\n * registered_name\n */\n registered_name: string;\n}\n/**\n * OrganizationCreate\n */\nexport interface OrganizationCreate {\n /**\n * name\n */\n name: string;\n /**\n * slug\n */\n slug: string;\n /**\n * avatar_url\n */\n avatar_url?: string | null;\n /**\n * legal_entity\n */\n legal_entity?:\n | (OrganizationIndividualLegalEntitySchema | OrganizationCompanyLegalEntitySchema)\n | null;\n /**\n * Public support email.\n */\n email?: string | null;\n /**\n * Official website of the organization.\n */\n website?: string | null;\n /**\n * Link to social profiles.\n */\n socials?: OrganizationSocialLink[] | null;\n /**\n * Additional, private, business details Polar needs about active organizations for compliance (KYC).\n */\n details?: OrganizationDetails | null;\n /**\n * Two-letter country code (ISO 3166-1 alpha-2).\n */\n country?: CountryAlpha2Input | null;\n /**\n * feature_settings\n */\n feature_settings?: OrganizationFeatureSettingsUpdate | null;\n /**\n * subscription_settings\n */\n subscription_settings?: OrganizationSubscriptionSettings | null;\n /**\n * customer_email_settings\n */\n customer_email_settings?: OrganizationCustomerEmailSettings | null;\n /**\n * customer_portal_settings\n */\n customer_portal_settings?: OrganizationCustomerPortalSettings | null;\n /**\n * default_presentment_currency\n */\n default_presentment_currency?: PresentmentCurrency;\n /**\n * default_tax_behavior\n */\n default_tax_behavior?: TaxBehaviorOption;\n}\n/**\n * OrganizationCustomerEmailSettings\n */\nexport interface OrganizationCustomerEmailSettings {\n /**\n * order_confirmation\n */\n order_confirmation: boolean;\n /**\n * subscription_cancellation\n */\n subscription_cancellation: boolean;\n /**\n * subscription_confirmation\n */\n subscription_confirmation: boolean;\n /**\n * subscription_cycled\n */\n subscription_cycled: boolean;\n /**\n * subscription_cycled_after_trial\n */\n subscription_cycled_after_trial: boolean;\n /**\n * subscription_past_due\n */\n subscription_past_due: boolean;\n /**\n * subscription_paused\n */\n subscription_paused: boolean;\n /**\n * subscription_resumed\n */\n subscription_resumed: boolean;\n /**\n * subscription_renewal_reminder\n */\n subscription_renewal_reminder: boolean;\n /**\n * subscription_revoked\n */\n subscription_revoked: boolean;\n /**\n * subscription_trial_conversion_reminder\n */\n subscription_trial_conversion_reminder: boolean;\n /**\n * subscription_uncanceled\n */\n subscription_uncanceled: boolean;\n /**\n * subscription_updated\n */\n subscription_updated: boolean;\n}\n/**\n * OrganizationCustomerPortalSettings\n */\nexport interface OrganizationCustomerPortalSettings {\n /**\n * usage\n */\n usage: CustomerPortalUsageSettings;\n /**\n * subscription\n */\n subscription: CustomerPortalSubscriptionSettings;\n /**\n * customer\n */\n customer?: CustomerPortalCustomerSettings;\n}\n/**\n * OrganizationDetails\n */\nexport interface OrganizationDetails {\n /**\n * Brief information about you and your business.\n */\n about?: string | null;\n /**\n * Description of digital products being sold.\n */\n product_description?: string | null;\n /**\n * Categories of products being sold.\n */\n selling_categories?: string[];\n /**\n * Pricing models used by the organization.\n */\n pricing_models?: string[];\n /**\n * How the organization will integrate and use Polar.\n */\n intended_use?: string | null;\n /**\n * Main customer acquisition channels.\n */\n customer_acquisition?: string[];\n /**\n * Estimated revenue in the next 12 months\n */\n future_annual_revenue?: number | null;\n /**\n * Switching from another platform?\n */\n switching?: boolean;\n /**\n * Which platform the organization is migrating from.\n */\n switching_from?: (\"paddle\" | \"lemon_squeezy\" | \"gumroad\" | \"stripe\" | \"other\") | null;\n /**\n * Revenue from last year if applicable.\n */\n previous_annual_revenue?: number | null;\n}\n/**\n * OrganizationFeatureSettings\n */\nexport interface OrganizationFeatureSettings {\n /**\n * If this organization has issue funding enabled\n */\n issue_funding_enabled?: boolean;\n /**\n * If this organization has seat-based pricing enabled\n */\n seat_based_pricing_enabled?: boolean;\n /**\n * If this organization has Wallets enabled\n */\n wallets_enabled?: boolean;\n /**\n * If this organization has the Member model enabled\n */\n member_model_enabled?: boolean;\n /**\n * If this organization has checkout localization enabled\n */\n checkout_localization_enabled?: boolean;\n /**\n * Ordered list of metric slugs shown on the dashboard overview.\n */\n overview_metrics?: string[] | null;\n /**\n * If this organization has access to reset proration behavior.\n */\n reset_proration_behavior_enabled?: boolean;\n /**\n * If this organization can create and finalize draft orders via the API (off-session charges against a saved payment method).\n */\n off_session_charges_enabled?: boolean;\n /**\n * Enables the slack shared channel benefit\n */\n slack_benefit_enabled?: boolean;\n /**\n * If this organization has preview access to new features enabled\n */\n preview_access_enabled?: boolean;\n /**\n * If this organization has the disputes dashboard enabled\n */\n disputes_enabled?: boolean;\n /**\n * If this organization has single sign-on configuration enabled\n */\n sso_enabled?: boolean;\n /**\n * If this organization has the split product navigation (Billing / Compass / Customers) enabled in the dashboard\n */\n compass_enabled?: boolean;\n /**\n * If this organization can migrate its billing from another provider (e.g. Stripe) to Polar.\n */\n merchant_migration_enabled?: boolean;\n}\n/**\n * Feature settings that organizations can update themselves.\n\nOther feature settings are managed by Polar staff: they're ignored if\nprovided and keep their current value.\n */\nexport interface OrganizationFeatureSettingsUpdate {\n /**\n * If this organization has seat-based pricing enabled\n */\n seat_based_pricing_enabled?: boolean;\n /**\n * If this organization has the Member model enabled\n */\n member_model_enabled?: boolean;\n /**\n * If this organization has checkout localization enabled\n */\n checkout_localization_enabled?: boolean;\n /**\n * Ordered list of metric slugs shown on the dashboard overview.\n */\n overview_metrics?: string[] | null;\n}\n/**\n * OrganizationIndividualLegalEntitySchema\n */\nexport interface OrganizationIndividualLegalEntitySchema {\n /**\n * type\n */\n type: \"individual\";\n}\n/**\n * OrganizationNotReadyForPayments\n */\nexport interface OrganizationNotReadyForPayments {\n /**\n * error\n */\n error: \"OrganizationNotReadyForPayments\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * OrganizationSocialLink\n */\nexport interface OrganizationSocialLink {\n /**\n * platform\n */\n platform: OrganizationSocialPlatforms;\n /**\n * The URL to the organization profile\n */\n url: string;\n}\n/**\n * OrganizationSubscriptionSettings\n */\nexport interface OrganizationSubscriptionSettings {\n /**\n * allow_multiple_subscriptions\n */\n allow_multiple_subscriptions: boolean;\n /**\n * proration_behavior\n */\n proration_behavior: PublicSubscriptionProrationBehavior;\n /**\n * benefit_revocation_grace_period\n */\n benefit_revocation_grace_period: number;\n /**\n * prevent_trial_abuse\n */\n prevent_trial_abuse: boolean;\n /**\n * allow_customer_updates\n */\n allow_customer_updates: boolean;\n}\n/**\n * OrganizationUpdate\n */\nexport interface OrganizationUpdate {\n /**\n * name\n */\n name?: string | null;\n /**\n * avatar_url\n */\n avatar_url?: string | null;\n /**\n * Public support email.\n */\n email?: string | null;\n /**\n * Official website of the organization.\n */\n website?: string | null;\n /**\n * Links to social profiles.\n */\n socials?: OrganizationSocialLink[] | null;\n /**\n * Additional, private, business details Polar needs about active organizations for compliance (KYC).\n */\n details?: OrganizationDetails | null;\n /**\n * Two-letter country code (ISO 3166-1 alpha-2).\n */\n country?: CountryAlpha2Input | null;\n /**\n * feature_settings\n */\n feature_settings?: OrganizationFeatureSettingsUpdate | null;\n /**\n * subscription_settings\n */\n subscription_settings?: OrganizationSubscriptionSettings | null;\n /**\n * customer_email_settings\n */\n customer_email_settings?: OrganizationCustomerEmailSettings | null;\n /**\n * customer_portal_settings\n */\n customer_portal_settings?: OrganizationCustomerPortalSettings | null;\n /**\n * Default presentment currency for the organization\n */\n default_presentment_currency?: PresentmentCurrency | null;\n /**\n * Default tax behavior applied on products.\n */\n default_tax_behavior?: TaxBehaviorOption | null;\n /**\n * Whether members must access this organization through its SSO connection. Turning this on requires an active SSO session for this organization and at least one enabled SSO connection.\n */\n sso_enforced?: boolean | null;\n}\n/**\n * Pagination\n */\nexport interface Pagination {\n /**\n * total_count\n */\n total_count: number;\n /**\n * max_page\n */\n max_page: number;\n}\n/**\n * PauseResumeNotAllowed\n */\nexport interface PauseResumeNotAllowed {\n /**\n * error\n */\n error: \"PauseResumeNotAllowed\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * PaymentActionRequired\n */\nexport interface PaymentActionRequired {\n /**\n * error\n */\n error: \"PaymentActionRequired\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * PaymentAlreadyInProgress\n */\nexport interface PaymentAlreadyInProgress {\n /**\n * error\n */\n error: \"PaymentAlreadyInProgress\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * PaymentError\n */\nexport interface PaymentError {\n /**\n * error\n */\n error: \"PaymentError\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * PaymentFailed\n */\nexport interface PaymentFailed {\n /**\n * error\n */\n error: \"PaymentFailed\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * PaymentMethodCard\n */\nexport interface PaymentMethodCard {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * processor\n */\n processor: PaymentProcessor;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * type\n */\n type: \"card\";\n /**\n * method_metadata\n */\n method_metadata: PaymentMethodCardMetadata;\n}\n/**\n * PaymentMethodCardMetadata\n */\nexport interface PaymentMethodCardMetadata {\n /**\n * brand\n */\n brand: string;\n /**\n * last4\n */\n last4: string;\n /**\n * exp_month\n */\n exp_month: number;\n /**\n * exp_year\n */\n exp_year: number;\n /**\n * wallet\n */\n wallet?: string | null;\n}\n/**\n * PaymentMethodGeneric\n */\nexport interface PaymentMethodGeneric {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * processor\n */\n processor: PaymentProcessor;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * type\n */\n type: string;\n}\n/**\n * PaymentMethodInUseByActiveSubscription\n */\nexport interface PaymentMethodInUseByActiveSubscription {\n /**\n * error\n */\n error: \"PaymentMethodInUseByActiveSubscription\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * PaymentMethodSetupFailed\n */\nexport interface PaymentMethodSetupFailed {\n /**\n * error\n */\n error: \"PaymentMethodSetupFailed\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * PaymentNotReady\n */\nexport interface PaymentNotReady {\n /**\n * error\n */\n error: \"PaymentNotReady\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * Pending update to be applied to a subscription at the beginning of the next period.\n */\nexport interface PendingSubscriptionUpdate {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The date and time when the subscription update will be applied.\n */\n applies_at: string;\n /**\n * ID of the new product to apply to the subscription. If `null`, the product won't be changed.\n */\n product_id: string | null;\n /**\n * Number of seats to apply to the subscription. If `null`, the number of seats won't be changed.\n */\n seats: number | null;\n}\n/**\n * Information about the authenticated portal user.\n */\nexport interface PortalAuthenticatedUser {\n /**\n * Type of authenticated user: 'customer' or 'member'\n */\n type: string;\n /**\n * User's name, if available.\n */\n name: string | null;\n /**\n * User's email address.\n */\n email: string;\n /**\n * Associated customer ID.\n */\n customer_id: string;\n /**\n * Member ID. Only set for members.\n */\n member_id?: string | null;\n /**\n * Member role (owner, billing_manager, member). Only set for members.\n */\n role?: string | null;\n}\n/**\n * A product.\n */\nexport interface Product {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description: string | null;\n /**\n * visibility\n */\n visibility: ProductVisibility;\n /**\n * The recurring interval of the product. If `None`, the product is a one-time purchase.\n */\n recurring_interval: RecurringInterval | null;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.\n */\n recurring_interval_count: number | null;\n /**\n * The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval.\n */\n meter_interval: RecurringInterval | null;\n /**\n * Number of meter interval units. None when no meter cycle is set.\n */\n meter_interval_count: number | null;\n /**\n * Whether the product is a subscription.\n */\n is_recurring: boolean;\n /**\n * Whether the product is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the organization owning the product.\n */\n organization_id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * List of prices for this product.\n */\n prices: (LegacyRecurringProductPrice | ProductPrice)[];\n /**\n * List of benefits granted by the product.\n */\n benefits: Benefit[];\n /**\n * List of medias associated to the product.\n */\n medias: ProductMediaFileRead[];\n /**\n * List of custom fields attached to the product.\n */\n attached_custom_fields: AttachedCustomField[];\n}\n/**\n * Schema to update the benefits granted by a product.\n */\nexport interface ProductBenefitsUpdate {\n /**\n * List of benefit IDs. Each one must be on the same organization as the product.\n */\n benefits: string[];\n}\n/**\n * ProductCreateOneTime\n */\nexport interface ProductCreateOneTime {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description?: string | null;\n /**\n * visibility\n */\n visibility?: ProductVisibility;\n /**\n * List of available prices for this product. It may combine at most one fixed price with one seat-based price (billed as `fixed + seat_charge`), or contain a single custom or free price, plus any number of metered prices. A free price cannot be combined with other prices, and a custom price cannot be combined with a fixed or seat-based price. Metered prices are not supported on one-time purchase products.\n */\n prices: (\n | ProductPriceFixedCreate\n | ProductPriceCustomCreate\n | ProductPriceSeatBasedCreate\n | ProductPriceMeteredUnitCreate\n )[];\n /**\n * List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded.\n */\n medias?: string[] | null;\n /**\n * List of custom fields to attach.\n */\n attached_custom_fields?: AttachedCustomFieldCreate[];\n /**\n * The ID of the organization owning the product. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * States that the product is a one-time purchase.\n */\n recurring_interval?: null;\n /**\n * One-time products don't have a recurring interval count.\n */\n recurring_interval_count?: null;\n}\n/**\n * ProductCreateRecurring\n */\nexport interface ProductCreateRecurring {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description?: string | null;\n /**\n * visibility\n */\n visibility?: ProductVisibility;\n /**\n * List of available prices for this product. It may combine at most one fixed price with one seat-based price (billed as `fixed + seat_charge`), or contain a single custom or free price, plus any number of metered prices. A free price cannot be combined with other prices, and a custom price cannot be combined with a fixed or seat-based price. Metered prices are not supported on one-time purchase products.\n */\n prices: (\n | ProductPriceFixedCreate\n | ProductPriceCustomCreate\n | ProductPriceSeatBasedCreate\n | ProductPriceMeteredUnitCreate\n )[];\n /**\n * List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded.\n */\n medias?: string[] | null;\n /**\n * List of custom fields to attach.\n */\n attached_custom_fields?: AttachedCustomFieldCreate[];\n /**\n * The ID of the organization owning the product. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval?: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count?: number | null;\n /**\n * recurring_interval\n */\n recurring_interval: RecurringInterval;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.\n */\n recurring_interval_count?: number;\n /**\n * Optional meter cycle, independent of the billing interval. When set, overage settlement, meter resets and meter-credit grants run on this cadence rather than the billing interval — e.g. yearly billing with monthly credits. It must evenly divide the billing interval. If `None`, metered concerns follow the billing interval. **Once set, it can't be changed.**\n */\n meter_interval?: RecurringInterval | null;\n /**\n * Number of meter interval units. Defaults to 1 when `meter_interval` is set. Ignored when `meter_interval` is `None`.\n */\n meter_interval_count?: number | null;\n}\n/**\n * Schema to create a file to be used as a product media file.\n */\nexport interface ProductMediaFileCreate {\n /**\n * organization_id\n */\n organization_id?: string | null;\n /**\n * name\n */\n name: string;\n /**\n * MIME type of the file. Only images are supported for this type of file.\n */\n mime_type: string;\n /**\n * Size of the file. A maximum of 10 MB is allowed for this type of file.\n */\n size: number;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64?: string | null;\n /**\n * upload\n */\n upload: S3FileCreateMultipart;\n /**\n * service\n */\n service: \"product_media\";\n /**\n * version\n */\n version?: string | null;\n}\n/**\n * File to be used as a product media file.\n */\nexport interface ProductMediaFileRead {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * name\n */\n name: string;\n /**\n * path\n */\n path: string;\n /**\n * mime_type\n */\n mime_type: string;\n /**\n * size\n */\n size: number;\n /**\n * storage_version\n */\n storage_version: string | null;\n /**\n * checksum_etag\n */\n checksum_etag: string | null;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64: string | null;\n /**\n * checksum_sha256_hex\n */\n checksum_sha256_hex: string | null;\n /**\n * last_modified_at\n */\n last_modified_at: string | null;\n /**\n * version\n */\n version: string | null;\n /**\n * service\n */\n service: \"product_media\";\n /**\n * is_uploaded\n */\n is_uploaded: boolean;\n /**\n * created_at\n */\n created_at: string;\n /**\n * size_readable\n */\n size_readable: string;\n /**\n * public_url\n */\n public_url: string;\n}\n/**\n * A pay-what-you-want price for a product.\n */\nexport interface ProductPriceCustom {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the price.\n */\n id: string;\n /**\n * source\n */\n source: ProductPriceSource;\n /**\n * amount_type\n */\n amount_type: \"custom\";\n /**\n * The currency in which the customer will be charged.\n */\n price_currency: string;\n /**\n * The tax behavior of the price. If null, it defaults to the organization's default tax behavior.\n */\n tax_behavior: TaxBehaviorOption | null;\n /**\n * Whether the price is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the product owning the price.\n */\n product_id: string;\n /**\n * The minimum amount the customer can pay. If 0, the price is 'free or pay what you want'.\n */\n minimum_amount: number;\n /**\n * The maximum amount the customer can pay.\n */\n maximum_amount: number | null;\n /**\n * The initial amount shown to the customer.\n */\n preset_amount: number | null;\n}\n/**\n * Schema to create a pay-what-you-want price.\n */\nexport interface ProductPriceCustomCreate {\n /**\n * amount_type\n */\n amount_type: \"custom\";\n /**\n * price_currency\n */\n price_currency?: PresentmentCurrency;\n /**\n * The tax behavior of the price. If not set, it will default to the organization's default tax behavior.\n */\n tax_behavior?: TaxBehaviorOption | null;\n /**\n * The minimum amount the customer can pay. If set to 0, the price is 'free or pay what you want' and $0 is accepted. If set to a value below the minimum price amount for the currency, it will be rejected. Defaults to the minimum price amount for the currency. Minimum per currency:\n- USD: 0.5\n- AED: 2\n- ALL: 50\n- AMD: 200\n- AOA: 500\n- ARS: 750\n- AUD: 0.7\n- AWG: 1\n- AZN: 1\n- BAM: 1\n- BBD: 2\n- BDT: 70\n- BIF: 2,000\n- BMD: 1\n- BND: 1\n- BOB: 5\n- BRL: 2.5\n- BSD: 1\n- BWP: 10\n- BZD: 2\n- CAD: 0.7\n- CDF: 2,000\n- CHF: 0.5\n- CLP: 500\n- CNY: 5\n- COP: 2,000\n- CRC: 300\n- CVE: 50\n- CZK: 15\n- DJF: 100\n- DKK: 3.2\n- DOP: 40\n- DZD: 70\n- EGP: 30\n- ETB: 80\n- EUR: 0.5\n- FJD: 2\n- FKP: 1\n- GBP: 0.4\n- GEL: 2\n- GNF: 5,000\n- GIP: 1\n- GMD: 40\n- GTQ: 5\n- GYD: 200\n- HKD: 4\n- HNL: 20\n- HTG: 70\n- HUF: 175\n- IDR: 9,000\n- ILS: 1.5\n- INR: 60\n- ISK: 70\n- JMD: 80\n- JPY: 80\n- KES: 70\n- KGS: 50\n- KHR: 3,000\n- KMF: 500\n- KRW: 800\n- KYD: 1\n- KZT: 300\n- LAK: 20,000\n- LKR: 200\n- LRD: 100\n- LSL: 10\n- MAD: 5\n- MDL: 10\n- MGA: 3,000\n- MKD: 50\n- MNT: 2,000\n- MOP: 5\n- MUR: 50\n- MVR: 8\n- MXN: 9\n- MWK: 1,000\n- MYR: 2\n- MZN: 50\n- NAD: 10\n- NGN: 700\n- NIO: 20\n- NOK: 5\n- NPR: 80\n- NZD: 0.9\n- PAB: 1\n- PEN: 2\n- PGK: 3\n- PHP: 35\n- PKR: 200\n- PLN: 2\n- PYG: 4,000\n- QAR: 2\n- RON: 2.5\n- RSD: 60\n- RWF: 1,000\n- SAR: 2\n- SBD: 4\n- SCR: 8\n- SEK: 5\n- SGD: 0.7\n- SHP: 1\n- SOS: 500\n- SRD: 20\n- SZL: 10\n- THB: 20\n- TJS: 5\n- TOP: 2\n- TRY: 30\n- TTD: 4\n- TWD: 20\n- TZS: 2,000\n- UAH: 30\n- UGX: 2,000\n- UYU: 20\n- UZS: 7,000\n- VND: 20,000\n- VUV: 100\n- WST: 2\n- XAF: 500\n- XCD: 2\n- XCG: 1\n- XOF: 500\n- XPF: 100\n- YER: 200\n- ZAR: 9\n- ZMW: 10\n- Other currencies: 50 minor units\n */\n minimum_amount?: number;\n /**\n * The maximum amount the customer can pay. Maximum per currency:\n- USD: 999,999.99\n- EUR: 999,999.99\n- GBP: 999,999.99\n- ARS: 1,400,000\n- CDF: 2,800,000\n- COP: 4,000,000\n- IDR: 16,000,000\n- KHR: 4,000,000\n- LAK: 21,000,000\n- MNT: 3,500,000\n- MWK: 1,750,000\n- NGN: 1,550,000\n- TZS: 2,500,000\n- UGX: 3,700,000\n- UZS: 12,500,000\n- Other currencies: 99,999,999 minor units\n */\n maximum_amount?: number | null;\n /**\n * The initial amount shown to the customer. If 0, the customer will see $0 as the default. If set to a value below the minimum price amount for the currency, it will be rejected.Minimum per currency:\n- USD: 0.5\n- AED: 2\n- ALL: 50\n- AMD: 200\n- AOA: 500\n- ARS: 750\n- AUD: 0.7\n- AWG: 1\n- AZN: 1\n- BAM: 1\n- BBD: 2\n- BDT: 70\n- BIF: 2,000\n- BMD: 1\n- BND: 1\n- BOB: 5\n- BRL: 2.5\n- BSD: 1\n- BWP: 10\n- BZD: 2\n- CAD: 0.7\n- CDF: 2,000\n- CHF: 0.5\n- CLP: 500\n- CNY: 5\n- COP: 2,000\n- CRC: 300\n- CVE: 50\n- CZK: 15\n- DJF: 100\n- DKK: 3.2\n- DOP: 40\n- DZD: 70\n- EGP: 30\n- ETB: 80\n- EUR: 0.5\n- FJD: 2\n- FKP: 1\n- GBP: 0.4\n- GEL: 2\n- GNF: 5,000\n- GIP: 1\n- GMD: 40\n- GTQ: 5\n- GYD: 200\n- HKD: 4\n- HNL: 20\n- HTG: 70\n- HUF: 175\n- IDR: 9,000\n- ILS: 1.5\n- INR: 60\n- ISK: 70\n- JMD: 80\n- JPY: 80\n- KES: 70\n- KGS: 50\n- KHR: 3,000\n- KMF: 500\n- KRW: 800\n- KYD: 1\n- KZT: 300\n- LAK: 20,000\n- LKR: 200\n- LRD: 100\n- LSL: 10\n- MAD: 5\n- MDL: 10\n- MGA: 3,000\n- MKD: 50\n- MNT: 2,000\n- MOP: 5\n- MUR: 50\n- MVR: 8\n- MXN: 9\n- MWK: 1,000\n- MYR: 2\n- MZN: 50\n- NAD: 10\n- NGN: 700\n- NIO: 20\n- NOK: 5\n- NPR: 80\n- NZD: 0.9\n- PAB: 1\n- PEN: 2\n- PGK: 3\n- PHP: 35\n- PKR: 200\n- PLN: 2\n- PYG: 4,000\n- QAR: 2\n- RON: 2.5\n- RSD: 60\n- RWF: 1,000\n- SAR: 2\n- SBD: 4\n- SCR: 8\n- SEK: 5\n- SGD: 0.7\n- SHP: 1\n- SOS: 500\n- SRD: 20\n- SZL: 10\n- THB: 20\n- TJS: 5\n- TOP: 2\n- TRY: 30\n- TTD: 4\n- TWD: 20\n- TZS: 2,000\n- UAH: 30\n- UGX: 2,000\n- UYU: 20\n- UZS: 7,000\n- VND: 20,000\n- VUV: 100\n- WST: 2\n- XAF: 500\n- XCD: 2\n- XCG: 1\n- XOF: 500\n- XPF: 100\n- YER: 200\n- ZAR: 9\n- ZMW: 10\n- Other currencies: 50 minor units\n */\n preset_amount?: number | null;\n}\n/**\n * A fixed price for a product.\n */\nexport interface ProductPriceFixed {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the price.\n */\n id: string;\n /**\n * source\n */\n source: ProductPriceSource;\n /**\n * amount_type\n */\n amount_type: \"fixed\";\n /**\n * The currency in which the customer will be charged.\n */\n price_currency: string;\n /**\n * The tax behavior of the price. If null, it defaults to the organization's default tax behavior.\n */\n tax_behavior: TaxBehaviorOption | null;\n /**\n * Whether the price is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the product owning the price.\n */\n product_id: string;\n /**\n * The price in cents.\n */\n price_amount: number;\n}\n/**\n * Schema to create a fixed price.\n */\nexport interface ProductPriceFixedCreate {\n /**\n * amount_type\n */\n amount_type: \"fixed\";\n /**\n * price_currency\n */\n price_currency?: PresentmentCurrency;\n /**\n * The tax behavior of the price. If not set, it will default to the organization's default tax behavior.\n */\n tax_behavior?: TaxBehaviorOption | null;\n /**\n * The price in cents. Set to `0` for a free price.\nMinimum amounts per currency:\n- USD: 0.5\n- AED: 2\n- ALL: 50\n- AMD: 200\n- AOA: 500\n- ARS: 750\n- AUD: 0.7\n- AWG: 1\n- AZN: 1\n- BAM: 1\n- BBD: 2\n- BDT: 70\n- BIF: 2,000\n- BMD: 1\n- BND: 1\n- BOB: 5\n- BRL: 2.5\n- BSD: 1\n- BWP: 10\n- BZD: 2\n- CAD: 0.7\n- CDF: 2,000\n- CHF: 0.5\n- CLP: 500\n- CNY: 5\n- COP: 2,000\n- CRC: 300\n- CVE: 50\n- CZK: 15\n- DJF: 100\n- DKK: 3.2\n- DOP: 40\n- DZD: 70\n- EGP: 30\n- ETB: 80\n- EUR: 0.5\n- FJD: 2\n- FKP: 1\n- GBP: 0.4\n- GEL: 2\n- GNF: 5,000\n- GIP: 1\n- GMD: 40\n- GTQ: 5\n- GYD: 200\n- HKD: 4\n- HNL: 20\n- HTG: 70\n- HUF: 175\n- IDR: 9,000\n- ILS: 1.5\n- INR: 60\n- ISK: 70\n- JMD: 80\n- JPY: 80\n- KES: 70\n- KGS: 50\n- KHR: 3,000\n- KMF: 500\n- KRW: 800\n- KYD: 1\n- KZT: 300\n- LAK: 20,000\n- LKR: 200\n- LRD: 100\n- LSL: 10\n- MAD: 5\n- MDL: 10\n- MGA: 3,000\n- MKD: 50\n- MNT: 2,000\n- MOP: 5\n- MUR: 50\n- MVR: 8\n- MXN: 9\n- MWK: 1,000\n- MYR: 2\n- MZN: 50\n- NAD: 10\n- NGN: 700\n- NIO: 20\n- NOK: 5\n- NPR: 80\n- NZD: 0.9\n- PAB: 1\n- PEN: 2\n- PGK: 3\n- PHP: 35\n- PKR: 200\n- PLN: 2\n- PYG: 4,000\n- QAR: 2\n- RON: 2.5\n- RSD: 60\n- RWF: 1,000\n- SAR: 2\n- SBD: 4\n- SCR: 8\n- SEK: 5\n- SGD: 0.7\n- SHP: 1\n- SOS: 500\n- SRD: 20\n- SZL: 10\n- THB: 20\n- TJS: 5\n- TOP: 2\n- TRY: 30\n- TTD: 4\n- TWD: 20\n- TZS: 2,000\n- UAH: 30\n- UGX: 2,000\n- UYU: 20\n- UZS: 7,000\n- VND: 20,000\n- VUV: 100\n- WST: 2\n- XAF: 500\n- XCD: 2\n- XCG: 1\n- XOF: 500\n- XPF: 100\n- YER: 200\n- ZAR: 9\n- ZMW: 10\n- Other currencies: 50 minor units\n */\n price_amount: number;\n}\n/**\n * A meter associated to a metered price.\n */\nexport interface ProductPriceMeter {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The name of the meter.\n */\n name: string;\n /**\n * unit\n */\n unit: MeterUnit;\n /**\n * The label for the custom unit.\n */\n custom_label: string | null;\n /**\n * The multiplier to convert from base unit to display scale.\n */\n custom_multiplier: number | null;\n}\n/**\n * A metered, usage-based, price for a product, with a fixed unit price.\n */\nexport interface ProductPriceMeteredUnit {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the price.\n */\n id: string;\n /**\n * source\n */\n source: ProductPriceSource;\n /**\n * amount_type\n */\n amount_type: \"metered_unit\";\n /**\n * The currency in which the customer will be charged.\n */\n price_currency: string;\n /**\n * The tax behavior of the price. If null, it defaults to the organization's default tax behavior.\n */\n tax_behavior: TaxBehaviorOption | null;\n /**\n * Whether the price is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the product owning the price.\n */\n product_id: string;\n /**\n * The price per unit in cents.\n */\n unit_amount: string;\n /**\n * The maximum amount in cents that can be charged, regardless of the number of units consumed.\n */\n cap_amount: number | null;\n /**\n * The ID of the meter associated to the price.\n */\n meter_id: string;\n /**\n * meter\n */\n meter: ProductPriceMeter;\n}\n/**\n * Schema to create a metered price with a fixed unit price.\n */\nexport interface ProductPriceMeteredUnitCreate {\n /**\n * amount_type\n */\n amount_type: \"metered_unit\";\n /**\n * price_currency\n */\n price_currency?: PresentmentCurrency;\n /**\n * The tax behavior of the price. If not set, it will default to the organization's default tax behavior.\n */\n tax_behavior?: TaxBehaviorOption | null;\n /**\n * The ID of the meter associated to the price.\n */\n meter_id: string;\n /**\n * The price per unit in cents. Supports up to 12 decimal places.\n */\n unit_amount: number | string;\n /**\n * Optional maximum amount in cents that can be charged, regardless of the number of units consumed.\n */\n cap_amount?: number | null;\n}\n/**\n * A seat-based price for a product.\n */\nexport interface ProductPriceSeatBased {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the price.\n */\n id: string;\n /**\n * source\n */\n source: ProductPriceSource;\n /**\n * amount_type\n */\n amount_type: \"seat_based\";\n /**\n * The currency in which the customer will be charged.\n */\n price_currency: string;\n /**\n * The tax behavior of the price. If null, it defaults to the organization's default tax behavior.\n */\n tax_behavior: TaxBehaviorOption | null;\n /**\n * Whether the price is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the product owning the price.\n */\n product_id: string;\n /**\n * seat_tiers\n */\n seat_tiers: ProductPriceSeatTiersOutput;\n}\n/**\n * Schema to create a seat-based price with volume-based tiers.\n */\nexport interface ProductPriceSeatBasedCreate {\n /**\n * amount_type\n */\n amount_type: \"seat_based\";\n /**\n * price_currency\n */\n price_currency?: PresentmentCurrency;\n /**\n * The tax behavior of the price. If not set, it will default to the organization's default tax behavior.\n */\n tax_behavior?: TaxBehaviorOption | null;\n /**\n * seat_tiers\n */\n seat_tiers: ProductPriceSeatTiersInput;\n}\n/**\n * A pricing tier for seat-based pricing.\n */\nexport interface ProductPriceSeatTier {\n /**\n * Minimum number of seats (inclusive)\n */\n min_seats: number;\n /**\n * Maximum number of seats (inclusive). None for unlimited.\n */\n max_seats?: number | null;\n /**\n * Price per seat in cents for this tier\n */\n price_per_seat: number;\n}\n/**\n * List of pricing tiers for seat-based pricing.\n\nThe minimum and maximum seat limits are derived from the tiers:\n- minimum_seats = first tier's min_seats\n- maximum_seats = last tier's max_seats (None for unlimited)\n */\nexport interface ProductPriceSeatTiersInput {\n /**\n * seat_tier_type\n */\n seat_tier_type?: SeatTierType;\n /**\n * List of pricing tiers\n */\n tiers: ProductPriceSeatTier[];\n}\n/**\n * List of pricing tiers for seat-based pricing.\n\nThe minimum and maximum seat limits are derived from the tiers:\n- minimum_seats = first tier's min_seats\n- maximum_seats = last tier's max_seats (None for unlimited)\n */\nexport interface ProductPriceSeatTiersOutput {\n /**\n * seat_tier_type\n */\n seat_tier_type?: SeatTierType;\n /**\n * List of pricing tiers\n */\n tiers: ProductPriceSeatTier[];\n /**\n * Minimum number of seats required for purchase, derived from first tier.\n */\n minimum_seats: number;\n /**\n * Maximum number of seats allowed for purchase, derived from last tier. None for unlimited.\n */\n maximum_seats: number | null;\n}\n/**\n * Schema to update a product.\n */\nexport interface ProductUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The interval unit for the trial period.\n */\n trial_interval?: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count?: number | null;\n /**\n * name\n */\n name?: string | null;\n /**\n * The description of the product.\n */\n description?: string | null;\n /**\n * The recurring interval of the product. If `None`, the product is a one-time purchase. **Can only be set on legacy recurring products. Once set, it can't be changed.**\n */\n recurring_interval?: RecurringInterval | null;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. Once set, it can't be changed.**\n */\n recurring_interval_count?: number | null;\n /**\n * 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.\n */\n is_archived?: boolean | null;\n /**\n * The visibility of the product.\n */\n visibility?: ProductVisibility | null;\n /**\n * List of available prices for this product. If you want to keep existing prices, include them in the list as an `ExistingProductPrice` object.\n */\n prices?:\n | (\n | ExistingProductPrice\n | (\n | ProductPriceFixedCreate\n | ProductPriceCustomCreate\n | ProductPriceSeatBasedCreate\n | ProductPriceMeteredUnitCreate\n )\n )[]\n | null;\n /**\n * List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded.\n */\n medias?: string[] | null;\n /**\n * attached_custom_fields\n */\n attached_custom_fields?: AttachedCustomFieldCreate[] | null;\n}\n/**\n * PropertyAggregation\n */\nexport interface PropertyAggregation {\n /**\n * func\n */\n func: Func;\n /**\n * property\n */\n property: string;\n}\n/**\n * Refund\n */\nexport interface Refund {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * status\n */\n status: RefundStatus;\n /**\n * reason\n */\n reason: RefundReason;\n /**\n * amount\n */\n amount: number;\n /**\n * tax_amount\n */\n tax_amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * order_id\n */\n order_id: string;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * revoke_benefits\n */\n revoke_benefits: boolean;\n /**\n * dispute\n */\n dispute: RefundDispute | null;\n}\n/**\n * RefundCreate\n */\nexport interface RefundCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * order_id\n */\n order_id: string;\n /**\n * Reason for the refund.\n */\n reason: Reason;\n /**\n * Amount to refund in cents. Minimum is 1.\n */\n amount: number;\n /**\n * An internal comment about the refund.\n */\n comment?: string | null;\n /**\n * Should this refund trigger the associated customer benefits to be revoked?\n\n**Note:**\nOnly allowed in case the `order` is a one-time purchase.\nSubscriptions automatically revoke customer benefits once the\nsubscription itself is revoked, i.e fully canceled.\n */\n revoke_benefits?: boolean;\n}\n/**\n * Dispute associated with a refund,\nin case we prevented a dispute by issuing a refund.\n */\nexport interface RefundDispute {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * status\n */\n status: DisputeStatus;\n /**\n * Whether the dispute has been resolved (won or lost).\n */\n resolved: boolean;\n /**\n * Whether the dispute is closed (prevented, won, or lost).\n */\n closed: boolean;\n /**\n * Amount in cents disputed.\n */\n amount: number;\n /**\n * Tax amount in cents disputed.\n */\n tax_amount: number;\n /**\n * Currency code of the dispute.\n */\n currency: string;\n /**\n * The reason for the dispute as reported by the card network (e.g. `fraudulent`, `product_not_received`). `None` until the processor reports it.\n */\n reason: string | null;\n /**\n * Deadline to submit evidence in response to the dispute. `None` when no response is required.\n */\n evidence_due_by: string | null;\n /**\n * Whether the evidence submission deadline has passed.\n */\n past_due: boolean;\n /**\n * The ID of the order associated with the dispute.\n */\n order_id: string;\n /**\n * The ID of the payment associated with the dispute.\n */\n payment_id: string;\n}\n/**\n * RefundedAlready\n */\nexport interface RefundedAlready {\n /**\n * error\n */\n error: \"RefundedAlready\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * ResourceNotFound\n */\nexport interface ResourceNotFound {\n /**\n * error\n */\n error: \"ResourceNotFound\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * RevokeTokenResponse\n */\nexport interface RevokeTokenResponse extends Record<string, never> {}\n/**\n * S3DownloadURL\n */\nexport interface S3DownloadURL {\n /**\n * url\n */\n url: string;\n /**\n * headers\n */\n headers?: Record<string, string>;\n /**\n * expires_at\n */\n expires_at: string;\n}\n/**\n * S3FileCreateMultipart\n */\nexport interface S3FileCreateMultipart {\n /**\n * parts\n */\n parts: S3FileCreatePart[];\n}\n/**\n * S3FileCreatePart\n */\nexport interface S3FileCreatePart {\n /**\n * number\n */\n number: number;\n /**\n * chunk_start\n */\n chunk_start: number;\n /**\n * chunk_end\n */\n chunk_end: number;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64?: string | null;\n}\n/**\n * S3FileUploadCompletedPart\n */\nexport interface S3FileUploadCompletedPart {\n /**\n * number\n */\n number: number;\n /**\n * checksum_etag\n */\n checksum_etag: string;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64: string | null;\n}\n/**\n * S3FileUploadMultipart\n */\nexport interface S3FileUploadMultipart {\n /**\n * id\n */\n id: string;\n /**\n * path\n */\n path: string;\n /**\n * parts\n */\n parts: S3FileUploadPart[];\n}\n/**\n * S3FileUploadPart\n */\nexport interface S3FileUploadPart {\n /**\n * number\n */\n number: number;\n /**\n * chunk_start\n */\n chunk_start: number;\n /**\n * chunk_end\n */\n chunk_end: number;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64?: string | null;\n /**\n * url\n */\n url: string;\n /**\n * expires_at\n */\n expires_at: string;\n /**\n * headers\n */\n headers?: Record<string, string>;\n}\n/**\n * SSOEnforcementRequiresConnection\n */\nexport interface SSOEnforcementRequiresConnection {\n /**\n * error\n */\n error: \"SSOEnforcementRequiresConnection\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * SeatAssign\n */\nexport interface SeatAssign {\n /**\n * Subscription ID. Required if neither order_id nor checkout_id is provided.\n */\n subscription_id?: string | null;\n /**\n * Order ID for one-time purchases. Required if subscription_id is not provided.\n */\n order_id?: string | null;\n /**\n * Email of the customer to assign the seat to\n */\n email?: string | null;\n /**\n * External customer ID for the seat assignment\n */\n external_customer_id?: string | null;\n /**\n * Customer ID for the seat assignment\n */\n customer_id?: string | null;\n /**\n * External member ID for the seat assignment. Can be used alone (lookup existing member) or with email (create/validate member).\n */\n external_member_id?: string | null;\n /**\n * Member ID for the seat assignment.\n */\n member_id?: string | null;\n /**\n * Additional metadata for the seat (max 10 keys, 1KB total)\n */\n metadata?: Record<string, unknown> | null;\n /**\n * If true, the seat will be immediately claimed without sending an invitation email. API-only feature.\n */\n immediate_claim?: boolean;\n}\n/**\n * SeatClaim\n */\nexport interface SeatClaim {\n /**\n * Invitation token to claim the seat\n */\n invitation_token: string;\n}\n/**\n * Read-only information about a seat claim invitation.\nSafe for email scanners - no side effects when fetched.\n */\nexport interface SeatClaimInfo {\n /**\n * Name of the product\n */\n product_name: string;\n /**\n * ID of the product\n */\n product_id: string;\n /**\n * Name of the organization\n */\n organization_name: string;\n /**\n * Slug of the organization\n */\n organization_slug: string;\n /**\n * Email of the customer assigned to this seat\n */\n customer_email: string;\n /**\n * Whether the seat can be claimed\n */\n can_claim: boolean;\n}\n/**\n * SeatsList\n */\nexport interface SeatsList {\n /**\n * List of seats\n */\n seats: CustomerSeat[];\n /**\n * Number of available seats\n */\n available_seats: number;\n /**\n * Total number of seats for the subscription\n */\n total_seats: number;\n}\n/**\n * Subscription\n */\nexport interface Subscription {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The amount of the subscription.\n */\n amount: number;\n /**\n * The currency of the subscription.\n */\n currency: string;\n /**\n * recurring_interval\n */\n recurring_interval: RecurringInterval;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.\n */\n recurring_interval_count: number;\n /**\n * status\n */\n status: SubscriptionStatus;\n /**\n * The start timestamp of the current billing period.\n */\n current_period_start: string;\n /**\n * The end timestamp of the current billing period.\n */\n current_period_end: string;\n /**\n * The start timestamp of the current meter period, if the product has a meter cycle set. Metered credits are granted and overage is settled on this cadence.\n */\n current_meter_period_start: string | null;\n /**\n * The end timestamp of the current meter period, if the product has a meter cycle set. This is when credits next renew.\n */\n current_meter_period_end: string | null;\n /**\n * The start timestamp of the trial period, if any.\n */\n trial_start: string | null;\n /**\n * The end timestamp of the trial period, if any.\n */\n trial_end: string | null;\n /**\n * Whether the subscription will be canceled at the end of the current period.\n */\n cancel_at_period_end: boolean;\n /**\n * The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.\n */\n canceled_at: string | null;\n /**\n * The timestamp when the subscription started.\n */\n started_at: string | null;\n /**\n * The timestamp when the subscription will end.\n */\n ends_at: string | null;\n /**\n * The timestamp when the subscription ended.\n */\n ended_at: string | null;\n /**\n * The timestamp when the subscription entered `past_due` status.\n */\n past_due_at?: string | null;\n /**\n * Whether the subscription will be paused at the end of the current period.\n */\n pause_at_period_end: boolean;\n /**\n * The timestamp when the subscription was paused.\n */\n paused_at: string | null;\n /**\n * The timestamp when a paused subscription is scheduled to automatically resume, if set.\n */\n resumes_at: string | null;\n /**\n * The ID of the subscribed customer.\n */\n customer_id: string;\n /**\n * The ID of the subscribed product.\n */\n product_id: string;\n /**\n * The ID of the applied discount, if any.\n */\n discount_id: string | null;\n /**\n * checkout_id\n */\n checkout_id: string | null;\n /**\n * The number of seats for seat-based subscriptions. None for non-seat subscriptions.\n */\n seats?: number | null;\n /**\n * customer_cancellation_reason\n */\n customer_cancellation_reason: CustomerCancellationReason | null;\n /**\n * customer_cancellation_comment\n */\n customer_cancellation_comment: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * customer\n */\n customer: SubscriptionCustomer;\n /**\n * product\n */\n product: Product;\n /**\n * discount\n */\n discount:\n | (\n | DiscountFixedOnceForeverDurationBase\n | DiscountFixedRepeatDurationBase\n | DiscountPercentageOnceForeverDurationBase\n | DiscountPercentageRepeatDurationBase\n )\n | null;\n /**\n * List of enabled prices for the subscription.\n */\n prices: (LegacyRecurringProductPrice | ProductPrice)[];\n /**\n * List of meters associated with the subscription.\n */\n meters: SubscriptionMeter[];\n /**\n * Pending subscription update that will be applied at the beginning of the next period. If `null`, there is no pending update.\n */\n pending_update: PendingSubscriptionUpdate | null;\n}\n/**\n * An event created by Polar when a subscription billing period is updated.\n */\nexport interface SubscriptionBillingPeriodUpdatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.billing_period_updated\";\n /**\n * metadata\n */\n metadata: SubscriptionBillingPeriodUpdatedMetadata;\n}\n/**\n * SubscriptionBillingPeriodUpdatedMetadata\n */\nexport interface SubscriptionBillingPeriodUpdatedMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * old_period_end\n */\n old_period_end: string;\n /**\n * new_period_end\n */\n new_period_end: string;\n}\n/**\n * SubscriptionCancel\n */\nexport interface SubscriptionCancel {\n /**\n * Customer reason for cancellation.\n\nHelpful to monitor reasons behind churn for future improvements.\n\nOnly set this in case your own service is requesting the reason from the\ncustomer. Or you know based on direct conversations, i.e support, with\nthe customer.\n\n* `too_expensive`: Too expensive for the customer.\n* `missing_features`: Customer is missing certain features.\n* `switched_service`: Customer switched to another service.\n* `unused`: Customer is not using it enough.\n* `customer_service`: Customer is not satisfied with the customer service.\n* `low_quality`: Customer is unhappy with the quality.\n* `too_complex`: Customer considers the service too complicated.\n* `other`: Other reason(s).\n */\n customer_cancellation_reason?: CustomerCancellationReason | null;\n /**\n * Customer feedback and why they decided to cancel.\n\n**IMPORTANT:**\nDo not use this to store internal notes! It's intended to be input\nfrom the customer and is therefore also available in their Polar\npurchases library.\n\nOnly set this in case your own service is requesting the reason from the\ncustomer. Or you copy a message directly from a customer\nconversation, i.e support.\n */\n customer_cancellation_comment?: string | null;\n /**\n * Cancel an active subscription once the current period ends.\n\nOr uncancel a subscription currently set to be revoked at period end.\n */\n cancel_at_period_end: boolean;\n}\n/**\n * An event created by Polar when a subscription is canceled.\n */\nexport interface SubscriptionCanceledEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.canceled\";\n /**\n * metadata\n */\n metadata: SubscriptionCanceledMetadata;\n}\n/**\n * SubscriptionCanceledMetadata\n */\nexport interface SubscriptionCanceledMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * recurring_interval\n */\n recurring_interval: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count: number;\n /**\n * customer_cancellation_reason\n */\n customer_cancellation_reason?: string;\n /**\n * customer_cancellation_comment\n */\n customer_cancellation_comment?: string;\n /**\n * canceled_at\n */\n canceled_at: string;\n /**\n * ends_at\n */\n ends_at?: string;\n /**\n * cancel_at_period_end\n */\n cancel_at_period_end?: boolean;\n}\n/**\n * Create a subscription for an existing customer.\n */\nexport interface SubscriptionCreateCustomer {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The ID of the recurring product to subscribe to. Must be a free product, otherwise the customer should go through a checkout flow.\n */\n product_id: string;\n /**\n * The ID of the customer to create the subscription for.\n */\n customer_id: string;\n}\n/**\n * Create a subscription for an existing customer identified by an external ID.\n */\nexport interface SubscriptionCreateExternalCustomer {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The ID of the recurring product to subscribe to. Must be a free product, otherwise the customer should go through a checkout flow.\n */\n product_id: string;\n /**\n * The ID of the customer in your system to create the subscription for. It must already exist in Polar.\n */\n external_customer_id: string;\n}\n/**\n * An event created by Polar when a subscription is created.\n */\nexport interface SubscriptionCreatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.created\";\n /**\n * metadata\n */\n metadata: SubscriptionCreatedMetadata;\n}\n/**\n * SubscriptionCreatedMetadata\n */\nexport interface SubscriptionCreatedMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * product_id\n */\n product_id: string;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * recurring_interval\n */\n recurring_interval: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count: number;\n /**\n * started_at\n */\n started_at: string;\n}\n/**\n * SubscriptionCustomer\n */\nexport interface SubscriptionCustomer {\n /**\n * The ID of the customer.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email?: string | null;\n /**\n * Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.\n */\n email_verified: boolean;\n /**\n * type\n */\n type: CustomerType;\n /**\n * The name of the customer.\n */\n name: string | null;\n /**\n * The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * tax_id\n */\n tax_id: unknown[] | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer.\n */\n organization_id: string;\n /**\n * The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details.\n */\n default_payment_method_id?: string | null;\n /**\n * Timestamp for when the customer was soft deleted.\n */\n deleted_at: string | null;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n}\n/**\n * An event created by Polar when a subscription is cycled.\n */\nexport interface SubscriptionCycledEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.cycled\";\n /**\n * metadata\n */\n metadata: SubscriptionCycledMetadata;\n}\n/**\n * SubscriptionCycledMetadata\n */\nexport interface SubscriptionCycledMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * amount\n */\n amount?: number;\n /**\n * currency\n */\n currency?: string;\n /**\n * recurring_interval\n */\n recurring_interval?: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count?: number;\n}\n/**\n * SubscriptionLocked\n */\nexport interface SubscriptionLocked {\n /**\n * error\n */\n error: \"SubscriptionLocked\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * Current consumption and spending for a subscription meter.\n */\nexport interface SubscriptionMeter {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The number of consumed units so far in this billing period.\n */\n consumed_units: number;\n /**\n * The number of credited units so far in this billing period.\n */\n credited_units: number;\n /**\n * The amount due in cents so far in this billing period.\n */\n amount: number;\n /**\n * The ID of the meter.\n */\n meter_id: string;\n /**\n * meter\n */\n meter: Meter;\n}\n/**\n * An event created by Polar when a subscription becomes past due.\n */\nexport interface SubscriptionPastDueEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.past_due\";\n /**\n * metadata\n */\n metadata: SubscriptionPastDueMetadata;\n}\n/**\n * SubscriptionPastDueMetadata\n */\nexport interface SubscriptionPastDueMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * past_due_at\n */\n past_due_at: string;\n /**\n * amount\n */\n amount?: number;\n /**\n * currency\n */\n currency?: string;\n /**\n * recurring_interval\n */\n recurring_interval?: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count?: number;\n}\n/**\n * SubscriptionPause\n */\nexport interface SubscriptionPause {\n /**\n * Pause an active subscription at the end of the current period.\n\nOr cancel a scheduled pause on a subscription set to be paused at\nperiod end.\n */\n pause_at_period_end: boolean;\n /**\n * Date at which the paused subscription should automatically resume.\n\nIf not set, the subscription stays paused until it is resumed manually.\nMust be after the current period end.\n */\n resumes_at?: string | null;\n}\n/**\n * An event created by Polar when a subscription is paused.\n */\nexport interface SubscriptionPausedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.paused\";\n /**\n * metadata\n */\n metadata: SubscriptionPausedMetadata;\n}\n/**\n * SubscriptionPausedMetadata\n */\nexport interface SubscriptionPausedMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * amount\n */\n amount?: number;\n /**\n * currency\n */\n currency?: string;\n /**\n * recurring_interval\n */\n recurring_interval?: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count?: number;\n /**\n * paused_at\n */\n paused_at: string;\n /**\n * resumes_at\n */\n resumes_at?: string;\n}\n/**\n * An event created by Polar when a subscription changes the product.\n */\nexport interface SubscriptionProductUpdatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.product_updated\";\n /**\n * metadata\n */\n metadata: SubscriptionProductUpdatedMetadata;\n}\n/**\n * SubscriptionProductUpdatedMetadata\n */\nexport interface SubscriptionProductUpdatedMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * old_product_id\n */\n old_product_id: string;\n /**\n * new_product_id\n */\n new_product_id: string;\n}\n/**\n * An event created by Polar when a past due subscription is recovered.\n */\nexport interface SubscriptionReactivatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.reactivated\";\n /**\n * metadata\n */\n metadata: SubscriptionReactivatedMetadata;\n}\n/**\n * SubscriptionReactivatedMetadata\n */\nexport interface SubscriptionReactivatedMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * amount\n */\n amount?: number;\n /**\n * currency\n */\n currency?: string;\n /**\n * recurring_interval\n */\n recurring_interval?: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count?: number;\n}\n/**\n * SubscriptionResume\n */\nexport interface SubscriptionResume {\n /**\n * Resume a paused subscription immediately, starting a new billing period and charging the customer.\n */\n resume: true;\n}\n/**\n * An event created by Polar when a paused subscription is resumed.\n */\nexport interface SubscriptionResumedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.resumed\";\n /**\n * metadata\n */\n metadata: SubscriptionResumedMetadata;\n}\n/**\n * SubscriptionResumedMetadata\n */\nexport interface SubscriptionResumedMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * amount\n */\n amount?: number;\n /**\n * currency\n */\n currency?: string;\n /**\n * recurring_interval\n */\n recurring_interval?: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count?: number;\n}\n/**\n * SubscriptionRevoke\n */\nexport interface SubscriptionRevoke {\n /**\n * Customer reason for cancellation.\n\nHelpful to monitor reasons behind churn for future improvements.\n\nOnly set this in case your own service is requesting the reason from the\ncustomer. Or you know based on direct conversations, i.e support, with\nthe customer.\n\n* `too_expensive`: Too expensive for the customer.\n* `missing_features`: Customer is missing certain features.\n* `switched_service`: Customer switched to another service.\n* `unused`: Customer is not using it enough.\n* `customer_service`: Customer is not satisfied with the customer service.\n* `low_quality`: Customer is unhappy with the quality.\n* `too_complex`: Customer considers the service too complicated.\n* `other`: Other reason(s).\n */\n customer_cancellation_reason?: CustomerCancellationReason | null;\n /**\n * Customer feedback and why they decided to cancel.\n\n**IMPORTANT:**\nDo not use this to store internal notes! It's intended to be input\nfrom the customer and is therefore also available in their Polar\npurchases library.\n\nOnly set this in case your own service is requesting the reason from the\ncustomer. Or you copy a message directly from a customer\nconversation, i.e support.\n */\n customer_cancellation_comment?: string | null;\n /**\n * Cancel and revoke an active subscription immediately\n */\n revoke: true;\n}\n/**\n * An event created by Polar when a subscription is revoked from a customer.\n */\nexport interface SubscriptionRevokedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.revoked\";\n /**\n * metadata\n */\n metadata: SubscriptionRevokedMetadata;\n}\n/**\n * SubscriptionRevokedMetadata\n */\nexport interface SubscriptionRevokedMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * amount\n */\n amount?: number;\n /**\n * currency\n */\n currency?: string;\n /**\n * recurring_interval\n */\n recurring_interval?: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count?: number;\n}\n/**\n * An event created by Polar when a the seats on a subscription is changed.\n */\nexport interface SubscriptionSeatsUpdatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.seats_updated\";\n /**\n * metadata\n */\n metadata: SubscriptionSeatsUpdatedMetadata;\n}\n/**\n * SubscriptionSeatsUpdatedMetadata\n */\nexport interface SubscriptionSeatsUpdatedMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * old_seats\n */\n old_seats: number;\n /**\n * new_seats\n */\n new_seats: number;\n /**\n * proration_behavior\n */\n proration_behavior: string;\n}\n/**\n * An event created by Polar when a subscription cancellation is reversed.\n */\nexport interface SubscriptionUncanceledEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.uncanceled\";\n /**\n * metadata\n */\n metadata: SubscriptionUncanceledMetadata;\n}\n/**\n * SubscriptionUncanceledMetadata\n */\nexport interface SubscriptionUncanceledMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * product_id\n */\n product_id: string;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * recurring_interval\n */\n recurring_interval: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count: number;\n}\n/**\n * SubscriptionUpdateBase\n */\nexport interface SubscriptionUpdateBase {\n /**\n * Update subscription to another product.\n */\n product_id?: string | null;\n /**\n * Determine how to handle the proration billing. If not provided, will use the default organization setting.\n */\n proration_behavior?: SubscriptionProrationBehavior | null;\n /**\n * Update the subscription to apply a new discount. If set to `null`, the discount will be removed. The change will be applied on the next billing cycle.\n */\n discount_id?: string | null;\n /**\n * Set or extend the trial period of the subscription. If set to `now`, the trial will end immediately.\n */\n trial_end?: string | \"now\" | null;\n}\n/**\n * SubscriptionUpdateBillingPeriod\n */\nexport interface SubscriptionUpdateBillingPeriod {\n /**\n * Set a new date for the end of the current billing period. The subscription will renew on this date. The new date can be earlier or later than the current period end, as long as it's in the future.\n\nIt is not possible to update the current billing period on a canceled subscription.\n */\n current_billing_period_end: string;\n}\n/**\n * SubscriptionUpdateClear\n */\nexport interface SubscriptionUpdateClear {\n /**\n * Clear the pending subscription update. Set to null to remove scheduled changes.\n */\n pending_update: null;\n}\n/**\n * An event created by Polar when a pending subscription update is cleared without being applied.\n */\nexport interface SubscriptionUpdateClearedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.update_cleared\";\n /**\n * metadata\n */\n metadata: SubscriptionUpdateClearedMetadata;\n}\n/**\n * SubscriptionUpdateClearedMetadata\n */\nexport interface SubscriptionUpdateClearedMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n}\n/**\n * SubscriptionUpdateSeats\n */\nexport interface SubscriptionUpdateSeats {\n /**\n * Update the number of seats for this subscription.\n */\n seats: number;\n /**\n * Determine how to handle the proration billing. If not provided, will use the default organization setting.\n */\n proration_behavior?: SubscriptionProrationBehavior | null;\n}\n/**\n * An event created by Polar when a subscription is updated.\n */\nexport interface SubscriptionUpdatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.updated\";\n /**\n * metadata\n */\n metadata: SubscriptionUpdatedMetadata;\n}\n/**\n * SubscriptionUpdatedMetadata\n */\nexport interface SubscriptionUpdatedMetadata {\n /**\n * product_id\n */\n product_id?: string;\n /**\n * proration_behavior\n */\n proration_behavior?: SubscriptionProrationBehavior;\n /**\n * discount_id\n */\n discount_id?: string | null;\n /**\n * trial_end\n */\n trial_end?: string;\n /**\n * seats\n */\n seats?: number;\n /**\n * billing_period_end\n */\n billing_period_end?: string;\n /**\n * subscription_id\n */\n subscription_id: string;\n}\n/**\n * Schema to create a file attached to a support case.\n */\nexport interface SupportCaseAttachmentFileCreate {\n /**\n * organization_id\n */\n organization_id?: string | null;\n /**\n * name\n */\n name: string;\n /**\n * MIME type of the file. Images, videos, PDF, CSV, plain text, Word and Excel documents are supported.\n */\n mime_type: string;\n /**\n * Size of the file. A maximum of 250 MB is allowed for this type of file.\n */\n size: number;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64?: string | null;\n /**\n * upload\n */\n upload: S3FileCreateMultipart;\n /**\n * service\n */\n service: \"support_case_attachment\";\n /**\n * version\n */\n version?: string | null;\n}\n/**\n * File attached to a support case (private; fetched via presigned URL).\n */\nexport interface SupportCaseAttachmentFileRead {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * name\n */\n name: string;\n /**\n * path\n */\n path: string;\n /**\n * mime_type\n */\n mime_type: string;\n /**\n * size\n */\n size: number;\n /**\n * storage_version\n */\n storage_version: string | null;\n /**\n * checksum_etag\n */\n checksum_etag: string | null;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64: string | null;\n /**\n * checksum_sha256_hex\n */\n checksum_sha256_hex: string | null;\n /**\n * last_modified_at\n */\n last_modified_at: string | null;\n /**\n * version\n */\n version: string | null;\n /**\n * service\n */\n service: \"support_case_attachment\";\n /**\n * is_uploaded\n */\n is_uploaded: boolean;\n /**\n * created_at\n */\n created_at: string;\n /**\n * size_readable\n */\n size_readable: string;\n}\n/**\n * TokenResponse\n */\nexport interface TokenResponse {\n /**\n * access_token\n */\n access_token: string;\n /**\n * token_type\n */\n token_type: \"Bearer\";\n /**\n * expires_in\n */\n expires_in: number;\n /**\n * refresh_token\n */\n refresh_token?: string | null;\n /**\n * scope\n */\n scope: string;\n /**\n * id_token\n */\n id_token?: string | null;\n}\n/**\n * TrialAlreadyRedeemed\n */\nexport interface TrialAlreadyRedeemed {\n /**\n * error\n */\n error: \"TrialAlreadyRedeemed\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * Unauthorized\n */\nexport interface Unauthorized {\n /**\n * error\n */\n error: \"Unauthorized\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * UniqueAggregation\n */\nexport interface UniqueAggregation {\n /**\n * func\n */\n func?: \"unique\";\n /**\n * property\n */\n property: string;\n}\n/**\n * An event you created through the ingestion API.\n */\nexport interface UserEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The name of the event.\n */\n name: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"user\";\n /**\n * metadata\n */\n metadata: EventMetadataOutput;\n}\n/**\n * UserInfoOrganization\n */\nexport interface UserInfoOrganization {\n /**\n * sub\n */\n sub: string;\n /**\n * name\n */\n name?: string | null;\n}\n/**\n * UserInfoUser\n */\nexport interface UserInfoUser {\n /**\n * sub\n */\n sub: string;\n /**\n * name\n */\n name?: string | null;\n /**\n * email\n */\n email?: string | null;\n /**\n * email_verified\n */\n email_verified?: boolean | null;\n}\n/**\n * ValidatedLicenseKey\n */\nexport interface ValidatedLicenseKey {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * customer\n */\n customer: LicenseKeyCustomer;\n /**\n * The benefit ID.\n */\n benefit_id: string;\n /**\n * key\n */\n key: string;\n /**\n * display_key\n */\n display_key: string;\n /**\n * status\n */\n status: LicenseKeyStatus;\n /**\n * limit_activations\n */\n limit_activations: number | null;\n /**\n * usage\n */\n usage: number;\n /**\n * limit_usage\n */\n limit_usage: number | null;\n /**\n * validations\n */\n validations: number;\n /**\n * last_validated_at\n */\n last_validated_at: string | null;\n /**\n * expires_at\n */\n expires_at: string | null;\n /**\n * activation\n */\n activation?: LicenseKeyActivationBase | null;\n}\n/**\n * ValidationError\n */\nexport interface ValidationError {\n /**\n * loc\n */\n loc: (string | number)[];\n /**\n * msg\n */\n msg: string;\n /**\n * type\n */\n type: string;\n /**\n * input\n */\n input?: unknown;\n /**\n * ctx\n */\n ctx?: Context;\n}\n/**\n * A webhook delivery for a webhook event.\n */\nexport interface WebhookDelivery {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Whether the delivery was successful.\n */\n succeeded: boolean;\n /**\n * The HTTP code returned by the URL. `null` if the endpoint was unreachable.\n */\n http_code: number | null;\n /**\n * The response body returned by the URL, or the error message if the endpoint was unreachable.\n */\n response: string | null;\n /**\n * webhook_event\n */\n webhook_event: WebhookEvent;\n}\n/**\n * A webhook endpoint.\n */\nexport interface WebhookEndpoint {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The URL where the webhook events will be sent.\n */\n url: string;\n /**\n * An optional name for the webhook endpoint to help organize and identify it.\n */\n name?: string | null;\n /**\n * format\n */\n format: WebhookFormat;\n /**\n * The secret used to sign the webhook events.\n */\n secret: string;\n /**\n * The organization ID associated with the webhook endpoint.\n */\n organization_id: string;\n /**\n * The events that will trigger the webhook.\n */\n events: WebhookEventType[];\n /**\n * Whether the webhook endpoint is enabled and will receive events.\n */\n enabled: boolean;\n}\n/**\n * Schema to create a webhook endpoint.\n */\nexport interface WebhookEndpointCreate {\n /**\n * The URL where the webhook events will be sent.\n */\n url: string;\n /**\n * An optional name for the webhook endpoint to help organize and identify it.\n */\n name?: string | null;\n /**\n * format\n */\n format: WebhookFormat;\n /**\n * The events that will trigger the webhook.\n */\n events: WebhookEventType[];\n /**\n * The organization ID associated with the webhook endpoint. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n}\n/**\n * Schema to update a webhook endpoint.\n */\nexport interface WebhookEndpointUpdate {\n /**\n * url\n */\n url?: string | null;\n /**\n * An optional name for the webhook endpoint to help organize and identify it.\n */\n name?: string | null;\n /**\n * format\n */\n format?: WebhookFormat | null;\n /**\n * events\n */\n events?: WebhookEventType[] | null;\n /**\n * Whether the webhook endpoint is enabled.\n */\n enabled?: boolean | null;\n}\n/**\n * A webhook event.\n\nAn event represent something that happened in the system\nthat should be sent to the webhook endpoint.\n\nIt can be delivered multiple times until it's marked as succeeded,\neach one creating a new delivery.\n */\nexport interface WebhookEvent {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Last HTTP code returned by the URL. `null` if no delviery has been attempted or if the endpoint was unreachable.\n */\n last_http_code?: number | null;\n /**\n * Whether this event was successfully delivered. `null` if no delivery has been attempted.\n */\n succeeded?: boolean | null;\n /**\n * Whether this event was skipped because the webhook endpoint was disabled.\n */\n skipped: boolean;\n /**\n * The payload of the webhook event.\n */\n payload: string | null;\n /**\n * type\n */\n type: WebhookEventType;\n /**\n * Whether this event is archived. Archived events can't be redelivered, and the payload is not accessible anymore.\n */\n is_archived: boolean;\n}\n\n/**\n * Benefit\n */\nexport type Benefit =\n | BenefitCustom\n | BenefitDiscord\n | BenefitGitHubRepository\n | BenefitDownloadables\n | BenefitLicenseKeys\n | BenefitMeterCredit\n | BenefitFeatureFlag\n | BenefitSlackSharedChannel;\n/**\n * BenefitCreate\n */\nexport type BenefitCreate =\n | BenefitCustomCreate\n | BenefitDiscordCreate\n | BenefitGitHubRepositoryCreate\n | BenefitDownloadablesCreate\n | BenefitLicenseKeysCreate\n | BenefitMeterCreditCreate\n | BenefitFeatureFlagCreate\n | BenefitSlackSharedChannelCreate;\n/**\n * CheckoutForbiddenError\n */\nexport type CheckoutForbiddenError =\n | AlreadyActiveSubscriptionError\n | NotOpenCheckout\n | PaymentNotReady\n | TrialAlreadyRedeemed;\n/**\n * CheckoutLinkCreate\n */\nexport type CheckoutLinkCreate =\n | CheckoutLinkCreateProductPrice\n | CheckoutLinkCreateProduct\n | CheckoutLinkCreateProducts;\n/**\n * CustomField\n */\nexport type CustomField =\n | CustomFieldText\n | CustomFieldNumber\n | CustomFieldDate\n | CustomFieldCheckbox\n | CustomFieldSelect;\n/**\n * CustomFieldCreate\n */\nexport type CustomFieldCreate =\n | CustomFieldCreateText\n | CustomFieldCreateNumber\n | CustomFieldCreateDate\n | CustomFieldCreateCheckbox\n | CustomFieldCreateSelect;\n/**\n * CustomFieldUpdate\n */\nexport type CustomFieldUpdate =\n | CustomFieldUpdateText\n | CustomFieldUpdateNumber\n | CustomFieldUpdateDate\n | CustomFieldUpdateCheckbox\n | CustomFieldUpdateSelect;\n/**\n * Customer\n */\nexport type Customer = CustomerIndividual | CustomerTeam;\n/**\n * CustomerBenefitGrant\n */\nexport type CustomerBenefitGrant =\n | CustomerBenefitGrantDiscord\n | CustomerBenefitGrantGitHubRepository\n | CustomerBenefitGrantDownloadables\n | CustomerBenefitGrantLicenseKeys\n | CustomerBenefitGrantCustom\n | CustomerBenefitGrantMeterCredit\n | CustomerBenefitGrantFeatureFlag\n | CustomerBenefitGrantSlackSharedChannel;\n/**\n * CustomerBenefitGrantUpdate\n */\nexport type CustomerBenefitGrantUpdate =\n | CustomerBenefitGrantDiscordUpdate\n | CustomerBenefitGrantGitHubRepositoryUpdate\n | CustomerBenefitGrantDownloadablesUpdate\n | CustomerBenefitGrantLicenseKeysUpdate\n | CustomerBenefitGrantCustomUpdate\n | CustomerBenefitGrantMeterCreditUpdate\n | CustomerBenefitGrantFeatureFlagUpdate\n | CustomerBenefitGrantSlackSharedChannelUpdate;\n/**\n * CustomerCreate\n */\nexport type CustomerCreate = CustomerIndividualCreate | CustomerTeamCreate;\n/**\n * CustomerPaymentMethod\n */\nexport type CustomerPaymentMethod = PaymentMethodCard | PaymentMethodGeneric;\n/**\n * CustomerPaymentMethodCreateResponse\n */\nexport type CustomerPaymentMethodCreateResponse =\n | CustomerPaymentMethodCreateSucceededResponse\n | CustomerPaymentMethodCreateRequiresActionResponse;\n/**\n * CustomerState\n */\nexport type CustomerState = CustomerStateIndividual | CustomerStateTeam;\n/**\n * CustomerSubscriptionUpdate\n */\nexport type CustomerSubscriptionUpdate =\n | CustomerSubscriptionUpdateProduct\n | CustomerSubscriptionUpdateSeats\n | CustomerSubscriptionCancel\n | CustomerSubscriptionPause\n | CustomerSubscriptionResume\n | CustomerSubscriptionUpdateClear;\n/**\n * Discount\n */\nexport type Discount =\n | DiscountFixedOnceForeverDuration\n | DiscountFixedRepeatDuration\n | DiscountPercentageOnceForeverDuration\n | DiscountPercentageRepeatDuration;\n/**\n * DiscountCreate\n */\nexport type DiscountCreate = DiscountFixedCreate | DiscountPercentageCreate;\n/**\n * Event\n */\nexport type Event = SystemEvent | UserEvent;\n/**\n * FileCreate\n */\nexport type FileCreate =\n | DownloadableFileCreate\n | ProductMediaFileCreate\n | OrganizationAvatarFileCreate\n | SupportCaseAttachmentFileCreate;\n/**\n * FileRead\n */\nexport type FileRead =\n | DownloadableFileRead\n | ProductMediaFileRead\n | OrganizationAvatarFileRead\n | SupportCaseAttachmentFileRead;\n/**\n * LegacyRecurringProductPrice\n */\nexport type LegacyRecurringProductPrice =\n | LegacyRecurringProductPriceFixed\n | LegacyRecurringProductPriceCustom;\n/**\n * MetadataQuery\n */\nexport type MetadataQuery = Record<\n string,\n string | number | boolean | string[] | number[] | boolean[]\n> | null;\n/**\n * Payment\n */\nexport type Payment = CardPayment | GenericPayment;\n/**\n * PaymentMethod\n */\nexport type PaymentMethod = CustomerPaymentMethodCard | CustomerPaymentMethodGeneric;\n/**\n * ProductCreate\n */\nexport type ProductCreate = ProductCreateRecurring | ProductCreateOneTime;\n/**\n * ProductPrice\n */\nexport type ProductPrice =\n | ProductPriceFixed\n | ProductPriceCustom\n | ProductPriceSeatBased\n | ProductPriceMeteredUnit;\n/**\n * SubscriptionUpdate\n */\nexport type SubscriptionUpdate =\n | SubscriptionUpdateBase\n | SubscriptionUpdateSeats\n | SubscriptionUpdateBillingPeriod\n | SubscriptionCancel\n | SubscriptionRevoke\n | SubscriptionPause\n | SubscriptionResume\n | SubscriptionUpdateClear;\n/**\n * SystemEvent\n */\nexport type SystemEvent =\n | MeterCreditEvent\n | MeterResetEvent\n | BenefitGrantedEvent\n | BenefitCycledEvent\n | BenefitUpdatedEvent\n | BenefitRevokedEvent\n | SubscriptionCreatedEvent\n | SubscriptionUpdatedEvent\n | SubscriptionCycledEvent\n | SubscriptionCanceledEvent\n | SubscriptionRevokedEvent\n | SubscriptionPastDueEvent\n | SubscriptionReactivatedEvent\n | SubscriptionPausedEvent\n | SubscriptionResumedEvent\n | SubscriptionUncanceledEvent\n | SubscriptionProductUpdatedEvent\n | SubscriptionSeatsUpdatedEvent\n | SubscriptionBillingPeriodUpdatedEvent\n | SubscriptionUpdateClearedEvent\n | OrderPaidEvent\n | OrderRefundedEvent\n | OrderVoidedEvent\n | CheckoutCreatedEvent\n | CustomerCreatedEvent\n | CustomerUpdatedEvent\n | CustomerDeletedEvent\n | BalanceOrderEvent\n | BalanceCreditOrderEvent\n | BalanceRefundEvent\n | BalanceRefundReversalEvent\n | BalanceDisputeEvent\n | BalanceDisputeReversalEvent;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAM,UAAuC;CAC3C,YAAY;CACZ,SAAS;AACX;AAQA,SAAgB,gBAAgB,SAAuB;CACrD,OAAO,IAAI,WAAW;EACpB,GAAG;EACH,SAAS,eAAe,SAAS,QAAQ,eAAe,cAAc,QAAQ,OAAO;EACrF,SAAS,QAAQ,WAAW;CAC9B,CAAC;AACH;AAIA,SAAgB,YAAY,SAAuB;CACjD,MAAM,SAAS,gBAAgB,OAAO;CAEtC,OAAO;EACL,eAAe,2BAA2B,MAAM;EAChD,eAAe,2BAA2B,MAAM;EAChD,QAAQ,oBAAoB,MAAM;EAClC,UAAU,sBAAsB,MAAM;EACtC,eAAe,2BAA2B,MAAM;EAChD,UAAU,sBAAsB,MAAM;EACtC,UAAU,sBAAsB,MAAM;EACtC,QAAQ,oBAAoB,MAAM;EAClC,SAAS,qBAAqB,MAAM;EACpC,UAAU,sBAAsB,MAAM;EACtC,WAAW,uBAAuB,MAAM;EACxC,OAAO,mBAAmB,MAAM;EAChC,SAAS,qBAAqB,MAAM;EACpC,aAAa,yBAAyB,MAAM;EAC5C,eAAe,2BAA2B,MAAM;EAChD,cAAc,0BAA0B,MAAM;EAC9C,WAAW,uBAAuB,MAAM;EACxC,WAAW,uBAAuB,MAAM;EACxC,SAAS,qBAAqB,MAAM;EACpC,gBAAgB,4BAA4B,MAAM;EAClD,eAAe,2BAA2B,MAAM;EAChD,kBAAkB,8BAA8B,MAAM;EACtD,QAAQ,oBAAoB,MAAM;EAClC,YAAY,wBAAwB,MAAM;EAC1C,QAAQ,oBAAoB,MAAM;EAClC,gBAAgB,4BAA4B,MAAM;EAClD,UAAU,sBAAsB,MAAM;CACxC;AACF"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/2026-04/client.ts","../../src/2026-04/models.ts","../../src/webhooks.ts","../../src/2026-04/webhooks.ts"],"sourcesContent":["import { ClientBase, ClientOptions, resolveBaseUrl } from \"../base\";\nimport { createBenefitGrantsService } from \"./services/benefit_grants\";\nimport { createBenefitsService } from \"./services/benefits\";\nimport { createCheckoutLinksService } from \"./services/checkout_links\";\nimport { createCheckoutsService } from \"./services/checkouts\";\nimport { createCustomFieldsService } from \"./services/custom_fields\";\nimport { createCustomerMetersService } from \"./services/customer_meters\";\nimport { createCustomerPortalService } from \"./services/customer_portal\";\nimport { createCustomerSeatsService } from \"./services/customer_seats\";\nimport { createCustomerSessionsService } from \"./services/customer_sessions\";\nimport { createCustomersService } from \"./services/customers\";\nimport { createDiscountsService } from \"./services/discounts\";\nimport { createDisputesService } from \"./services/disputes\";\nimport { createEventTypesService } from \"./services/event_types\";\nimport { createEventsService } from \"./services/events\";\nimport { createFilesService } from \"./services/files\";\nimport { createLicenseKeysService } from \"./services/license_keys\";\nimport { createMembersService } from \"./services/members\";\nimport { createMetersService } from \"./services/meters\";\nimport { createMetricsService } from \"./services/metrics\";\nimport { createOauth2Service } from \"./services/oauth2\";\nimport { createOrdersService } from \"./services/orders\";\nimport { createOrganizationsService } from \"./services/organizations\";\nimport { createPaymentsService } from \"./services/payments\";\nimport { createProductsService } from \"./services/products\";\nimport { createRefundsService } from \"./services/refunds\";\nimport { createSubscriptionsService } from \"./services/subscriptions\";\nimport { createWebhooksService } from \"./services/webhooks\";\n\nexport type Environment = \"production\" | \"sandbox\";\n\nconst SERVERS: Record<Environment, string> = {\n production: \"https://api.polar.sh\",\n sandbox: \"https://sandbox-api.polar.sh\",\n};\n\nexport interface PolarOptions extends Omit<ClientOptions, \"baseUrl\" | \"version\"> {\n version?: string;\n environment?: Environment;\n baseUrl?: string;\n}\n\nexport function createPolarCore(options: PolarOptions) {\n return new ClientBase({\n ...options,\n baseUrl: resolveBaseUrl(SERVERS, options.environment ?? \"production\", options.baseUrl),\n version: options.version ?? \"2026-04\",\n });\n}\n\nexport type PolarCore = ReturnType<typeof createPolarCore>;\n\nexport function createPolar(options: PolarOptions) {\n const client = createPolarCore(options);\n\n return {\n organizations: createOrganizationsService(client),\n subscriptions: createSubscriptionsService(client),\n oauth2: createOauth2Service(client),\n benefits: createBenefitsService(client),\n benefitGrants: createBenefitGrantsService(client),\n webhooks: createWebhooksService(client),\n products: createProductsService(client),\n orders: createOrdersService(client),\n refunds: createRefundsService(client),\n disputes: createDisputesService(client),\n checkouts: createCheckoutsService(client),\n files: createFilesService(client),\n metrics: createMetricsService(client),\n licenseKeys: createLicenseKeysService(client),\n checkoutLinks: createCheckoutLinksService(client),\n customFields: createCustomFieldsService(client),\n discounts: createDiscountsService(client),\n customers: createCustomersService(client),\n members: createMembersService(client),\n customerPortal: createCustomerPortalService(client),\n customerSeats: createCustomerSeatsService(client),\n customerSessions: createCustomerSessionsService(client),\n events: createEventsService(client),\n eventTypes: createEventTypesService(client),\n meters: createMetersService(client),\n customerMeters: createCustomerMetersService(client),\n payments: createPaymentsService(client),\n };\n}\n\nexport type Polar = ReturnType<typeof createPolar>;\n","/**\n * AggregationFunction\n */\nexport type AggregationFunction = \"count\" | \"sum\" | \"max\" | \"min\" | \"avg\" | \"unique\";\n/**\n * BenefitGrantSortProperty\n */\nexport type BenefitGrantSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"granted_at\"\n | \"-granted_at\"\n | \"revoked_at\"\n | \"-revoked_at\";\n/**\n * BenefitSortProperty\n */\nexport type BenefitSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"description\"\n | \"-description\"\n | \"type\"\n | \"-type\"\n | \"user_order\"\n | \"-user_order\";\n/**\n * BenefitType\n */\nexport type BenefitType =\n | \"custom\"\n | \"discord\"\n | \"github_repository\"\n | \"downloadables\"\n | \"license_keys\"\n | \"meter_credit\"\n | \"feature_flag\"\n | \"slack_shared_channel\";\n/**\n * BenefitVisibility\n */\nexport type BenefitVisibility = \"draft\" | \"private\" | \"public\";\n/**\n * BillingAddressFieldMode\n */\nexport type BillingAddressFieldMode = \"required\" | \"optional\" | \"disabled\";\n/**\n * CheckoutLinkSortProperty\n */\nexport type CheckoutLinkSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"label\"\n | \"-label\"\n | \"success_url\"\n | \"-success_url\"\n | \"allow_discount_codes\"\n | \"-allow_discount_codes\";\n/**\n * CheckoutSortProperty\n */\nexport type CheckoutSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"expires_at\"\n | \"-expires_at\"\n | \"status\"\n | \"-status\";\n/**\n * CheckoutStatus\n */\nexport type CheckoutStatus = \"open\" | \"expired\" | \"confirmed\" | \"succeeded\" | \"failed\";\n/**\n * CountryAlpha2\n */\nexport type CountryAlpha2 =\n | \"AD\"\n | \"AE\"\n | \"AF\"\n | \"AG\"\n | \"AI\"\n | \"AL\"\n | \"AM\"\n | \"AO\"\n | \"AQ\"\n | \"AR\"\n | \"AS\"\n | \"AT\"\n | \"AU\"\n | \"AW\"\n | \"AX\"\n | \"AZ\"\n | \"BA\"\n | \"BB\"\n | \"BD\"\n | \"BE\"\n | \"BF\"\n | \"BG\"\n | \"BH\"\n | \"BI\"\n | \"BJ\"\n | \"BL\"\n | \"BM\"\n | \"BN\"\n | \"BO\"\n | \"BQ\"\n | \"BR\"\n | \"BS\"\n | \"BT\"\n | \"BV\"\n | \"BW\"\n | \"BY\"\n | \"BZ\"\n | \"CA\"\n | \"CC\"\n | \"CD\"\n | \"CF\"\n | \"CG\"\n | \"CH\"\n | \"CI\"\n | \"CK\"\n | \"CL\"\n | \"CM\"\n | \"CN\"\n | \"CO\"\n | \"CR\"\n | \"CU\"\n | \"CV\"\n | \"CW\"\n | \"CX\"\n | \"CY\"\n | \"CZ\"\n | \"DE\"\n | \"DJ\"\n | \"DK\"\n | \"DM\"\n | \"DO\"\n | \"DZ\"\n | \"EC\"\n | \"EE\"\n | \"EG\"\n | \"EH\"\n | \"ER\"\n | \"ES\"\n | \"ET\"\n | \"FI\"\n | \"FJ\"\n | \"FK\"\n | \"FM\"\n | \"FO\"\n | \"FR\"\n | \"GA\"\n | \"GB\"\n | \"GD\"\n | \"GE\"\n | \"GF\"\n | \"GG\"\n | \"GH\"\n | \"GI\"\n | \"GL\"\n | \"GM\"\n | \"GN\"\n | \"GP\"\n | \"GQ\"\n | \"GR\"\n | \"GS\"\n | \"GT\"\n | \"GU\"\n | \"GW\"\n | \"GY\"\n | \"HK\"\n | \"HM\"\n | \"HN\"\n | \"HR\"\n | \"HT\"\n | \"HU\"\n | \"ID\"\n | \"IE\"\n | \"IL\"\n | \"IM\"\n | \"IN\"\n | \"IO\"\n | \"IQ\"\n | \"IR\"\n | \"IS\"\n | \"IT\"\n | \"JE\"\n | \"JM\"\n | \"JO\"\n | \"JP\"\n | \"KE\"\n | \"KG\"\n | \"KH\"\n | \"KI\"\n | \"KM\"\n | \"KN\"\n | \"KP\"\n | \"KR\"\n | \"KW\"\n | \"KY\"\n | \"KZ\"\n | \"LA\"\n | \"LB\"\n | \"LC\"\n | \"LI\"\n | \"LK\"\n | \"LR\"\n | \"LS\"\n | \"LT\"\n | \"LU\"\n | \"LV\"\n | \"LY\"\n | \"MA\"\n | \"MC\"\n | \"MD\"\n | \"ME\"\n | \"MF\"\n | \"MG\"\n | \"MH\"\n | \"MK\"\n | \"ML\"\n | \"MM\"\n | \"MN\"\n | \"MO\"\n | \"MP\"\n | \"MQ\"\n | \"MR\"\n | \"MS\"\n | \"MT\"\n | \"MU\"\n | \"MV\"\n | \"MW\"\n | \"MX\"\n | \"MY\"\n | \"MZ\"\n | \"NA\"\n | \"NC\"\n | \"NE\"\n | \"NF\"\n | \"NG\"\n | \"NI\"\n | \"NL\"\n | \"NO\"\n | \"NP\"\n | \"NR\"\n | \"NU\"\n | \"NZ\"\n | \"OM\"\n | \"PA\"\n | \"PE\"\n | \"PF\"\n | \"PG\"\n | \"PH\"\n | \"PK\"\n | \"PL\"\n | \"PM\"\n | \"PN\"\n | \"PR\"\n | \"PS\"\n | \"PT\"\n | \"PW\"\n | \"PY\"\n | \"QA\"\n | \"RE\"\n | \"RO\"\n | \"RS\"\n | \"RU\"\n | \"RW\"\n | \"SA\"\n | \"SB\"\n | \"SC\"\n | \"SD\"\n | \"SE\"\n | \"SG\"\n | \"SH\"\n | \"SI\"\n | \"SJ\"\n | \"SK\"\n | \"SL\"\n | \"SM\"\n | \"SN\"\n | \"SO\"\n | \"SR\"\n | \"SS\"\n | \"ST\"\n | \"SV\"\n | \"SX\"\n | \"SY\"\n | \"SZ\"\n | \"TC\"\n | \"TD\"\n | \"TF\"\n | \"TG\"\n | \"TH\"\n | \"TJ\"\n | \"TK\"\n | \"TL\"\n | \"TM\"\n | \"TN\"\n | \"TO\"\n | \"TR\"\n | \"TT\"\n | \"TV\"\n | \"TW\"\n | \"TZ\"\n | \"UA\"\n | \"UG\"\n | \"UM\"\n | \"US\"\n | \"UY\"\n | \"UZ\"\n | \"VA\"\n | \"VC\"\n | \"VE\"\n | \"VG\"\n | \"VI\"\n | \"VN\"\n | \"VU\"\n | \"WF\"\n | \"WS\"\n | \"YE\"\n | \"YT\"\n | \"ZA\"\n | \"ZM\"\n | \"ZW\";\n/**\n * CountryAlpha2Input\n */\nexport type CountryAlpha2Input =\n | \"AD\"\n | \"AE\"\n | \"AF\"\n | \"AG\"\n | \"AI\"\n | \"AL\"\n | \"AM\"\n | \"AO\"\n | \"AQ\"\n | \"AR\"\n | \"AS\"\n | \"AT\"\n | \"AU\"\n | \"AW\"\n | \"AX\"\n | \"AZ\"\n | \"BA\"\n | \"BB\"\n | \"BD\"\n | \"BE\"\n | \"BF\"\n | \"BG\"\n | \"BH\"\n | \"BI\"\n | \"BJ\"\n | \"BL\"\n | \"BM\"\n | \"BN\"\n | \"BO\"\n | \"BQ\"\n | \"BR\"\n | \"BS\"\n | \"BT\"\n | \"BV\"\n | \"BW\"\n | \"BY\"\n | \"BZ\"\n | \"CA\"\n | \"CC\"\n | \"CD\"\n | \"CF\"\n | \"CG\"\n | \"CH\"\n | \"CI\"\n | \"CK\"\n | \"CL\"\n | \"CM\"\n | \"CN\"\n | \"CO\"\n | \"CR\"\n | \"CV\"\n | \"CW\"\n | \"CX\"\n | \"CY\"\n | \"CZ\"\n | \"DE\"\n | \"DJ\"\n | \"DK\"\n | \"DM\"\n | \"DO\"\n | \"DZ\"\n | \"EC\"\n | \"EE\"\n | \"EG\"\n | \"EH\"\n | \"ER\"\n | \"ES\"\n | \"ET\"\n | \"FI\"\n | \"FJ\"\n | \"FK\"\n | \"FM\"\n | \"FO\"\n | \"FR\"\n | \"GA\"\n | \"GB\"\n | \"GD\"\n | \"GE\"\n | \"GF\"\n | \"GG\"\n | \"GH\"\n | \"GI\"\n | \"GL\"\n | \"GM\"\n | \"GN\"\n | \"GP\"\n | \"GQ\"\n | \"GR\"\n | \"GS\"\n | \"GT\"\n | \"GU\"\n | \"GW\"\n | \"GY\"\n | \"HK\"\n | \"HM\"\n | \"HN\"\n | \"HR\"\n | \"HT\"\n | \"HU\"\n | \"ID\"\n | \"IE\"\n | \"IL\"\n | \"IM\"\n | \"IN\"\n | \"IO\"\n | \"IQ\"\n | \"IS\"\n | \"IT\"\n | \"JE\"\n | \"JM\"\n | \"JO\"\n | \"JP\"\n | \"KE\"\n | \"KG\"\n | \"KH\"\n | \"KI\"\n | \"KM\"\n | \"KN\"\n | \"KR\"\n | \"KW\"\n | \"KY\"\n | \"KZ\"\n | \"LA\"\n | \"LB\"\n | \"LC\"\n | \"LI\"\n | \"LK\"\n | \"LR\"\n | \"LS\"\n | \"LT\"\n | \"LU\"\n | \"LV\"\n | \"LY\"\n | \"MA\"\n | \"MC\"\n | \"MD\"\n | \"ME\"\n | \"MF\"\n | \"MG\"\n | \"MH\"\n | \"MK\"\n | \"ML\"\n | \"MM\"\n | \"MN\"\n | \"MO\"\n | \"MP\"\n | \"MQ\"\n | \"MR\"\n | \"MS\"\n | \"MT\"\n | \"MU\"\n | \"MV\"\n | \"MW\"\n | \"MX\"\n | \"MY\"\n | \"MZ\"\n | \"NA\"\n | \"NC\"\n | \"NE\"\n | \"NF\"\n | \"NG\"\n | \"NI\"\n | \"NL\"\n | \"NO\"\n | \"NP\"\n | \"NR\"\n | \"NU\"\n | \"NZ\"\n | \"OM\"\n | \"PA\"\n | \"PE\"\n | \"PF\"\n | \"PG\"\n | \"PH\"\n | \"PK\"\n | \"PL\"\n | \"PM\"\n | \"PN\"\n | \"PR\"\n | \"PS\"\n | \"PT\"\n | \"PW\"\n | \"PY\"\n | \"QA\"\n | \"RE\"\n | \"RO\"\n | \"RS\"\n | \"RW\"\n | \"SA\"\n | \"SB\"\n | \"SC\"\n | \"SD\"\n | \"SE\"\n | \"SG\"\n | \"SH\"\n | \"SI\"\n | \"SJ\"\n | \"SK\"\n | \"SL\"\n | \"SM\"\n | \"SN\"\n | \"SO\"\n | \"SR\"\n | \"SS\"\n | \"ST\"\n | \"SV\"\n | \"SX\"\n | \"SZ\"\n | \"TC\"\n | \"TD\"\n | \"TF\"\n | \"TG\"\n | \"TH\"\n | \"TJ\"\n | \"TK\"\n | \"TL\"\n | \"TM\"\n | \"TN\"\n | \"TO\"\n | \"TR\"\n | \"TT\"\n | \"TV\"\n | \"TW\"\n | \"TZ\"\n | \"UA\"\n | \"UG\"\n | \"UM\"\n | \"US\"\n | \"UY\"\n | \"UZ\"\n | \"VA\"\n | \"VC\"\n | \"VE\"\n | \"VG\"\n | \"VI\"\n | \"VN\"\n | \"VU\"\n | \"WF\"\n | \"WS\"\n | \"YE\"\n | \"YT\"\n | \"ZA\"\n | \"ZM\"\n | \"ZW\";\n/**\n * CustomFieldSortProperty\n */\nexport type CustomFieldSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"slug\"\n | \"-slug\"\n | \"name\"\n | \"-name\"\n | \"type\"\n | \"-type\";\n/**\n * CustomFieldType\n */\nexport type CustomFieldType = \"text\" | \"number\" | \"date\" | \"checkbox\" | \"select\";\n/**\n * CustomerBenefitGrantSortProperty\n */\nexport type CustomerBenefitGrantSortProperty =\n | \"granted_at\"\n | \"-granted_at\"\n | \"type\"\n | \"-type\"\n | \"organization\"\n | \"-organization\"\n | \"product_benefit\"\n | \"-product_benefit\";\n/**\n * CustomerCancellationReason\n */\nexport type CustomerCancellationReason =\n | \"customer_service\"\n | \"low_quality\"\n | \"missing_features\"\n | \"switched_service\"\n | \"too_complex\"\n | \"too_expensive\"\n | \"unused\"\n | \"other\";\n/**\n * CustomerCustomerMeterSortProperty\n */\nexport type CustomerCustomerMeterSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"modified_at\"\n | \"-modified_at\"\n | \"meter_id\"\n | \"-meter_id\"\n | \"meter_name\"\n | \"-meter_name\"\n | \"consumed_units\"\n | \"-consumed_units\"\n | \"credited_units\"\n | \"-credited_units\"\n | \"balance\"\n | \"-balance\";\n/**\n * CustomerMeterSortProperty\n */\nexport type CustomerMeterSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"modified_at\"\n | \"-modified_at\"\n | \"customer_id\"\n | \"-customer_id\"\n | \"customer_name\"\n | \"-customer_name\"\n | \"meter_id\"\n | \"-meter_id\"\n | \"meter_name\"\n | \"-meter_name\"\n | \"consumed_units\"\n | \"-consumed_units\"\n | \"credited_units\"\n | \"-credited_units\"\n | \"balance\"\n | \"-balance\";\n/**\n * CustomerOrderSortProperty\n */\nexport type CustomerOrderSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"amount\"\n | \"-amount\"\n | \"net_amount\"\n | \"-net_amount\"\n | \"product\"\n | \"-product\"\n | \"subscription\"\n | \"-subscription\";\n/**\n * CustomerSortProperty\n */\nexport type CustomerSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"email\"\n | \"-email\"\n | \"name\"\n | \"-name\";\n/**\n * CustomerSubscriptionSortProperty\n */\nexport type CustomerSubscriptionSortProperty =\n | \"started_at\"\n | \"-started_at\"\n | \"amount\"\n | \"-amount\"\n | \"status\"\n | \"-status\"\n | \"organization\"\n | \"-organization\"\n | \"product\"\n | \"-product\";\n/**\n * CustomerType\n */\nexport type CustomerType = \"individual\" | \"team\";\n/**\n * CustomerWalletSortProperty\n */\nexport type CustomerWalletSortProperty = \"created_at\" | \"-created_at\" | \"balance\" | \"-balance\";\n/**\n * DiscountDuration\n */\nexport type DiscountDuration = \"once\" | \"forever\" | \"repeating\";\n/**\n * DiscountSortProperty\n */\nexport type DiscountSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"name\"\n | \"-name\"\n | \"code\"\n | \"-code\"\n | \"redemptions_count\"\n | \"-redemptions_count\"\n | \"ends_at\"\n | \"-ends_at\";\n/**\n * DiscountType\n */\nexport type DiscountType = \"fixed\" | \"percentage\";\n/**\n * DisputeSortProperty\n */\nexport type DisputeSortProperty = \"created_at\" | \"-created_at\" | \"amount\" | \"-amount\";\n/**\n * DisputeStatus\n */\nexport type DisputeStatus =\n | \"prevented\"\n | \"early_warning\"\n | \"needs_response\"\n | \"under_review\"\n | \"lost\"\n | \"won\";\n/**\n * EventNamesSortProperty\n */\nexport type EventNamesSortProperty =\n | \"name\"\n | \"-name\"\n | \"occurrences\"\n | \"-occurrences\"\n | \"first_seen\"\n | \"-first_seen\"\n | \"last_seen\"\n | \"-last_seen\";\n/**\n * EventSortProperty\n */\nexport type EventSortProperty = \"timestamp\" | \"-timestamp\";\n/**\n * EventSource\n */\nexport type EventSource = \"system\" | \"user\";\n/**\n * EventTypesSortProperty\n */\nexport type EventTypesSortProperty =\n | \"name\"\n | \"-name\"\n | \"label\"\n | \"-label\"\n | \"occurrences\"\n | \"-occurrences\"\n | \"first_seen\"\n | \"-first_seen\"\n | \"last_seen\"\n | \"-last_seen\";\n/**\n * FileServiceTypes\n */\nexport type FileServiceTypes =\n | \"downloadable\"\n | \"product_media\"\n | \"organization_avatar\"\n | \"support_case_attachment\";\n/**\n * FilterConjunction\n */\nexport type FilterConjunction = \"and\" | \"or\";\n/**\n * FilterOperator\n */\nexport type FilterOperator = \"eq\" | \"ne\" | \"gt\" | \"gte\" | \"lt\" | \"lte\" | \"like\" | \"not_like\";\n/**\n * Func\n */\nexport type Func = \"sum\" | \"max\" | \"min\" | \"avg\";\n/**\n * LicenseKeyStatus\n */\nexport type LicenseKeyStatus = \"granted\" | \"revoked\" | \"disabled\";\n/**\n * MemberRole\n */\nexport type MemberRole = \"owner\" | \"billing_manager\" | \"member\";\n/**\n * MemberSortProperty\n */\nexport type MemberSortProperty = \"created_at\" | \"-created_at\";\n/**\n * MeterSortProperty\n */\nexport type MeterSortProperty = \"created_at\" | \"-created_at\" | \"name\" | \"-name\";\n/**\n * MeterUnit\n */\nexport type MeterUnit = \"scalar\" | \"token\" | \"custom\";\n/**\n * MetricType\n */\nexport type MetricType = \"scalar\" | \"currency\" | \"currency_sub_cent\" | \"percentage\";\n/**\n * OrderBillingReason\n */\nexport type OrderBillingReason =\n | \"purchase\"\n | \"subscription_create\"\n | \"subscription_cycle\"\n | \"subscription_update\";\n/**\n * OrderSortProperty\n */\nexport type OrderSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"status\"\n | \"-status\"\n | \"invoice_number\"\n | \"-invoice_number\"\n | \"amount\"\n | \"-amount\"\n | \"net_amount\"\n | \"-net_amount\"\n | \"customer\"\n | \"-customer\"\n | \"product\"\n | \"-product\"\n | \"discount\"\n | \"-discount\"\n | \"subscription\"\n | \"-subscription\";\n/**\n * OrderStatus\n */\nexport type OrderStatus = \"draft\" | \"pending\" | \"paid\" | \"refunded\" | \"partially_refunded\" | \"void\";\n/**\n * OrganizationSocialPlatforms\n */\nexport type OrganizationSocialPlatforms =\n | \"x\"\n | \"github\"\n | \"facebook\"\n | \"instagram\"\n | \"youtube\"\n | \"tiktok\"\n | \"linkedin\"\n | \"threads\"\n | \"discord\"\n | \"other\";\n/**\n * OrganizationSortProperty\n */\nexport type OrganizationSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"slug\"\n | \"-slug\"\n | \"name\"\n | \"-name\"\n | \"next_review_threshold\"\n | \"-next_review_threshold\"\n | \"days_in_status\"\n | \"-days_in_status\";\n/**\n * OrganizationStatus\n */\nexport type OrganizationStatus =\n | \"created\"\n | \"review\"\n | \"snoozed\"\n | \"denied\"\n | \"active\"\n | \"blocked\"\n | \"offboarding\"\n | \"offboarded\";\n/**\n * PaymentProcessor\n */\nexport type PaymentProcessor = \"stripe\";\n/**\n * PaymentSortProperty\n */\nexport type PaymentSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"status\"\n | \"-status\"\n | \"amount\"\n | \"-amount\"\n | \"method\"\n | \"-method\";\n/**\n * PaymentStatus\n */\nexport type PaymentStatus = \"pending\" | \"succeeded\" | \"failed\";\n/**\n * PaymentTrigger\n */\nexport type PaymentTrigger =\n | \"purchase\"\n | \"subscription_cycle\"\n | \"retry_dunning\"\n | \"retry_customer\"\n | \"retry_payment_method_update\"\n | \"retry_admin\";\n/**\n * The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).\n */\nexport type Permission = \"pull\" | \"triage\" | \"push\" | \"maintain\" | \"admin\";\n/**\n * PresentmentCurrency\n */\nexport type PresentmentCurrency =\n | \"aed\"\n | \"all\"\n | \"amd\"\n | \"aoa\"\n | \"ars\"\n | \"aud\"\n | \"awg\"\n | \"azn\"\n | \"bam\"\n | \"bbd\"\n | \"bdt\"\n | \"bif\"\n | \"bmd\"\n | \"bnd\"\n | \"bob\"\n | \"brl\"\n | \"bsd\"\n | \"bwp\"\n | \"bzd\"\n | \"cad\"\n | \"cdf\"\n | \"chf\"\n | \"clp\"\n | \"cny\"\n | \"cop\"\n | \"crc\"\n | \"cve\"\n | \"czk\"\n | \"djf\"\n | \"dkk\"\n | \"dop\"\n | \"dzd\"\n | \"egp\"\n | \"etb\"\n | \"eur\"\n | \"fjd\"\n | \"fkp\"\n | \"gbp\"\n | \"gel\"\n | \"gip\"\n | \"gmd\"\n | \"gnf\"\n | \"gtq\"\n | \"gyd\"\n | \"hkd\"\n | \"hnl\"\n | \"htg\"\n | \"huf\"\n | \"idr\"\n | \"ils\"\n | \"inr\"\n | \"isk\"\n | \"jmd\"\n | \"jpy\"\n | \"kes\"\n | \"kgs\"\n | \"khr\"\n | \"kmf\"\n | \"krw\"\n | \"kyd\"\n | \"kzt\"\n | \"lak\"\n | \"lkr\"\n | \"lrd\"\n | \"lsl\"\n | \"mad\"\n | \"mdl\"\n | \"mga\"\n | \"mkd\"\n | \"mnt\"\n | \"mop\"\n | \"mur\"\n | \"mvr\"\n | \"mwk\"\n | \"mxn\"\n | \"myr\"\n | \"mzn\"\n | \"nad\"\n | \"ngn\"\n | \"nio\"\n | \"nok\"\n | \"npr\"\n | \"nzd\"\n | \"pab\"\n | \"pen\"\n | \"pgk\"\n | \"php\"\n | \"pkr\"\n | \"pln\"\n | \"pyg\"\n | \"qar\"\n | \"ron\"\n | \"rsd\"\n | \"rwf\"\n | \"sar\"\n | \"sbd\"\n | \"scr\"\n | \"sek\"\n | \"sgd\"\n | \"shp\"\n | \"sos\"\n | \"srd\"\n | \"szl\"\n | \"thb\"\n | \"tjs\"\n | \"top\"\n | \"try\"\n | \"ttd\"\n | \"twd\"\n | \"tzs\"\n | \"uah\"\n | \"ugx\"\n | \"usd\"\n | \"uyu\"\n | \"uzs\"\n | \"vnd\"\n | \"vuv\"\n | \"wst\"\n | \"xaf\"\n | \"xcd\"\n | \"xcg\"\n | \"xof\"\n | \"xpf\"\n | \"yer\"\n | \"zar\"\n | \"zmw\";\n/**\n * ProductBillingType\n */\nexport type ProductBillingType = \"one_time\" | \"recurring\";\n/**\n * ProductPriceSource\n */\nexport type ProductPriceSource = \"catalog\" | \"ad_hoc\";\n/**\n * ProductSortProperty\n */\nexport type ProductSortProperty =\n | \"created_at\"\n | \"-created_at\"\n | \"name\"\n | \"-name\"\n | \"price_amount_type\"\n | \"-price_amount_type\"\n | \"price_amount\"\n | \"-price_amount\";\n/**\n * ProductVisibility\n */\nexport type ProductVisibility = \"draft\" | \"private\" | \"public\";\n/**\n * PublicSubscriptionProrationBehavior\n */\nexport type PublicSubscriptionProrationBehavior = \"invoice\" | \"prorate\" | \"next_period\";\n/**\n * Reason for the refund.\n */\nexport type Reason =\n | \"duplicate\"\n | \"fraudulent\"\n | \"customer_request\"\n | \"service_disruption\"\n | \"satisfaction_guarantee\"\n | \"other\";\n/**\n * RecurringInterval\n */\nexport type RecurringInterval = \"day\" | \"week\" | \"month\" | \"year\";\n/**\n * RefundReason\n */\nexport type RefundReason =\n | \"duplicate\"\n | \"fraudulent\"\n | \"customer_request\"\n | \"service_disruption\"\n | \"satisfaction_guarantee\"\n | \"dispute_prevention\"\n | \"other\";\n/**\n * RefundSortProperty\n */\nexport type RefundSortProperty = \"created_at\" | \"-created_at\" | \"amount\" | \"-amount\";\n/**\n * RefundStatus\n */\nexport type RefundStatus = \"pending\" | \"succeeded\" | \"failed\" | \"canceled\";\n/**\n * The role of the member within the customer. To assign or transfer ownership, use the member update endpoint.\n */\nexport type Role = \"member\" | \"billing_manager\";\n/**\n * Scope\n */\nexport type Scope =\n | \"openid\"\n | \"profile\"\n | \"email\"\n | \"user:read\"\n | \"user:write\"\n | \"organizations:read\"\n | \"organizations:write\"\n | \"custom_fields:read\"\n | \"custom_fields:write\"\n | \"discounts:read\"\n | \"discounts:write\"\n | \"checkout_links:read\"\n | \"checkout_links:write\"\n | \"checkouts:read\"\n | \"checkouts:write\"\n | \"transactions:read\"\n | \"transactions:write\"\n | \"payouts:read\"\n | \"payouts:write\"\n | \"products:read\"\n | \"products:write\"\n | \"benefits:read\"\n | \"benefits:write\"\n | \"events:read\"\n | \"events:write\"\n | \"meters:read\"\n | \"meters:write\"\n | \"files:read\"\n | \"files:write\"\n | \"subscriptions:read\"\n | \"subscriptions:write\"\n | \"customers:read\"\n | \"customers:write\"\n | \"members:read\"\n | \"members:write\"\n | \"wallets:read\"\n | \"wallets:write\"\n | \"disputes:read\"\n | \"disputes:write\"\n | \"customer_meters:read\"\n | \"customer_sessions:write\"\n | \"member_sessions:write\"\n | \"customer_seats:read\"\n | \"customer_seats:write\"\n | \"orders:read\"\n | \"orders:write\"\n | \"refunds:read\"\n | \"refunds:write\"\n | \"payments:read\"\n | \"metrics:read\"\n | \"metrics:write\"\n | \"webhooks:read\"\n | \"webhooks:write\"\n | \"license_keys:read\"\n | \"license_keys:write\"\n | \"customer_portal:read\"\n | \"customer_portal:write\"\n | \"notifications:read\"\n | \"notifications:write\"\n | \"notification_recipients:read\"\n | \"notification_recipients:write\"\n | \"organization_access_tokens:read\"\n | \"organization_access_tokens:write\";\n/**\n * SeatStatus\n */\nexport type SeatStatus = \"pending\" | \"claimed\" | \"revoked\";\n/**\n * SeatTierType\n */\nexport type SeatTierType = \"volume\" | \"graduated\";\n/**\n * Status\n */\nexport type Status = \"active\" | \"trialing\";\n/**\n * SubType\n */\nexport type SubType = \"user\" | \"organization\";\n/**\n * SubscriptionProrationBehavior\n */\nexport type SubscriptionProrationBehavior = \"invoice\" | \"prorate\" | \"next_period\" | \"reset\";\n/**\n * SubscriptionSortProperty\n */\nexport type SubscriptionSortProperty =\n | \"customer\"\n | \"-customer\"\n | \"status\"\n | \"-status\"\n | \"started_at\"\n | \"-started_at\"\n | \"current_period_end\"\n | \"-current_period_end\"\n | \"ended_at\"\n | \"-ended_at\"\n | \"ends_at\"\n | \"-ends_at\"\n | \"amount\"\n | \"-amount\"\n | \"product\"\n | \"-product\"\n | \"discount\"\n | \"-discount\";\n/**\n * SubscriptionStatus\n */\nexport type SubscriptionStatus =\n | \"incomplete\"\n | \"incomplete_expired\"\n | \"trialing\"\n | \"active\"\n | \"past_due\"\n | \"canceled\"\n | \"unpaid\"\n | \"paused\";\n/**\n * TaxBehavior\n */\nexport type TaxBehavior = \"inclusive\" | \"exclusive\";\n/**\n * TaxBehaviorOption\n */\nexport type TaxBehaviorOption = \"location\" | \"inclusive\" | \"exclusive\";\n/**\n * TimeInterval\n */\nexport type TimeInterval = \"year\" | \"month\" | \"week\" | \"day\" | \"hour\";\n/**\n * Timeframe\n */\nexport type Timeframe = \"year\" | \"month\" | \"day\";\n/**\n * Timezone to use for the timestamps. Default is UTC.\n */\nexport type Timezone =\n | \"Africa/Abidjan\"\n | \"Africa/Accra\"\n | \"Africa/Addis_Ababa\"\n | \"Africa/Algiers\"\n | \"Africa/Asmara\"\n | \"Africa/Asmera\"\n | \"Africa/Bamako\"\n | \"Africa/Bangui\"\n | \"Africa/Banjul\"\n | \"Africa/Bissau\"\n | \"Africa/Blantyre\"\n | \"Africa/Brazzaville\"\n | \"Africa/Bujumbura\"\n | \"Africa/Cairo\"\n | \"Africa/Casablanca\"\n | \"Africa/Ceuta\"\n | \"Africa/Conakry\"\n | \"Africa/Dakar\"\n | \"Africa/Dar_es_Salaam\"\n | \"Africa/Djibouti\"\n | \"Africa/Douala\"\n | \"Africa/El_Aaiun\"\n | \"Africa/Freetown\"\n | \"Africa/Gaborone\"\n | \"Africa/Harare\"\n | \"Africa/Johannesburg\"\n | \"Africa/Juba\"\n | \"Africa/Kampala\"\n | \"Africa/Khartoum\"\n | \"Africa/Kigali\"\n | \"Africa/Kinshasa\"\n | \"Africa/Lagos\"\n | \"Africa/Libreville\"\n | \"Africa/Lome\"\n | \"Africa/Luanda\"\n | \"Africa/Lubumbashi\"\n | \"Africa/Lusaka\"\n | \"Africa/Malabo\"\n | \"Africa/Maputo\"\n | \"Africa/Maseru\"\n | \"Africa/Mbabane\"\n | \"Africa/Mogadishu\"\n | \"Africa/Monrovia\"\n | \"Africa/Nairobi\"\n | \"Africa/Ndjamena\"\n | \"Africa/Niamey\"\n | \"Africa/Nouakchott\"\n | \"Africa/Ouagadougou\"\n | \"Africa/Porto-Novo\"\n | \"Africa/Sao_Tome\"\n | \"Africa/Timbuktu\"\n | \"Africa/Tripoli\"\n | \"Africa/Tunis\"\n | \"Africa/Windhoek\"\n | \"America/Adak\"\n | \"America/Anchorage\"\n | \"America/Anguilla\"\n | \"America/Antigua\"\n | \"America/Araguaina\"\n | \"America/Argentina/Buenos_Aires\"\n | \"America/Argentina/Catamarca\"\n | \"America/Argentina/ComodRivadavia\"\n | \"America/Argentina/Cordoba\"\n | \"America/Argentina/Jujuy\"\n | \"America/Argentina/La_Rioja\"\n | \"America/Argentina/Mendoza\"\n | \"America/Argentina/Rio_Gallegos\"\n | \"America/Argentina/Salta\"\n | \"America/Argentina/San_Juan\"\n | \"America/Argentina/San_Luis\"\n | \"America/Argentina/Tucuman\"\n | \"America/Argentina/Ushuaia\"\n | \"America/Aruba\"\n | \"America/Asuncion\"\n | \"America/Atikokan\"\n | \"America/Atka\"\n | \"America/Bahia\"\n | \"America/Bahia_Banderas\"\n | \"America/Barbados\"\n | \"America/Belem\"\n | \"America/Belize\"\n | \"America/Blanc-Sablon\"\n | \"America/Boa_Vista\"\n | \"America/Bogota\"\n | \"America/Boise\"\n | \"America/Buenos_Aires\"\n | \"America/Cambridge_Bay\"\n | \"America/Campo_Grande\"\n | \"America/Cancun\"\n | \"America/Caracas\"\n | \"America/Catamarca\"\n | \"America/Cayenne\"\n | \"America/Cayman\"\n | \"America/Chicago\"\n | \"America/Chihuahua\"\n | \"America/Ciudad_Juarez\"\n | \"America/Coral_Harbour\"\n | \"America/Cordoba\"\n | \"America/Costa_Rica\"\n | \"America/Coyhaique\"\n | \"America/Creston\"\n | \"America/Cuiaba\"\n | \"America/Curacao\"\n | \"America/Danmarkshavn\"\n | \"America/Dawson\"\n | \"America/Dawson_Creek\"\n | \"America/Denver\"\n | \"America/Detroit\"\n | \"America/Dominica\"\n | \"America/Edmonton\"\n | \"America/Eirunepe\"\n | \"America/El_Salvador\"\n | \"America/Ensenada\"\n | \"America/Fort_Nelson\"\n | \"America/Fort_Wayne\"\n | \"America/Fortaleza\"\n | \"America/Glace_Bay\"\n | \"America/Godthab\"\n | \"America/Goose_Bay\"\n | \"America/Grand_Turk\"\n | \"America/Grenada\"\n | \"America/Guadeloupe\"\n | \"America/Guatemala\"\n | \"America/Guayaquil\"\n | \"America/Guyana\"\n | \"America/Halifax\"\n | \"America/Havana\"\n | \"America/Hermosillo\"\n | \"America/Indiana/Indianapolis\"\n | \"America/Indiana/Knox\"\n | \"America/Indiana/Marengo\"\n | \"America/Indiana/Petersburg\"\n | \"America/Indiana/Tell_City\"\n | \"America/Indiana/Vevay\"\n | \"America/Indiana/Vincennes\"\n | \"America/Indiana/Winamac\"\n | \"America/Indianapolis\"\n | \"America/Inuvik\"\n | \"America/Iqaluit\"\n | \"America/Jamaica\"\n | \"America/Jujuy\"\n | \"America/Juneau\"\n | \"America/Kentucky/Louisville\"\n | \"America/Kentucky/Monticello\"\n | \"America/Knox_IN\"\n | \"America/Kralendijk\"\n | \"America/La_Paz\"\n | \"America/Lima\"\n | \"America/Los_Angeles\"\n | \"America/Louisville\"\n | \"America/Lower_Princes\"\n | \"America/Maceio\"\n | \"America/Managua\"\n | \"America/Manaus\"\n | \"America/Marigot\"\n | \"America/Martinique\"\n | \"America/Matamoros\"\n | \"America/Mazatlan\"\n | \"America/Mendoza\"\n | \"America/Menominee\"\n | \"America/Merida\"\n | \"America/Metlakatla\"\n | \"America/Mexico_City\"\n | \"America/Miquelon\"\n | \"America/Moncton\"\n | \"America/Monterrey\"\n | \"America/Montevideo\"\n | \"America/Montreal\"\n | \"America/Montserrat\"\n | \"America/Nassau\"\n | \"America/New_York\"\n | \"America/Nipigon\"\n | \"America/Nome\"\n | \"America/Noronha\"\n | \"America/North_Dakota/Beulah\"\n | \"America/North_Dakota/Center\"\n | \"America/North_Dakota/New_Salem\"\n | \"America/Nuuk\"\n | \"America/Ojinaga\"\n | \"America/Panama\"\n | \"America/Pangnirtung\"\n | \"America/Paramaribo\"\n | \"America/Phoenix\"\n | \"America/Port-au-Prince\"\n | \"America/Port_of_Spain\"\n | \"America/Porto_Acre\"\n | \"America/Porto_Velho\"\n | \"America/Puerto_Rico\"\n | \"America/Punta_Arenas\"\n | \"America/Rainy_River\"\n | \"America/Rankin_Inlet\"\n | \"America/Recife\"\n | \"America/Regina\"\n | \"America/Resolute\"\n | \"America/Rio_Branco\"\n | \"America/Rosario\"\n | \"America/Santa_Isabel\"\n | \"America/Santarem\"\n | \"America/Santiago\"\n | \"America/Santo_Domingo\"\n | \"America/Sao_Paulo\"\n | \"America/Scoresbysund\"\n | \"America/Shiprock\"\n | \"America/Sitka\"\n | \"America/St_Barthelemy\"\n | \"America/St_Johns\"\n | \"America/St_Kitts\"\n | \"America/St_Lucia\"\n | \"America/St_Thomas\"\n | \"America/St_Vincent\"\n | \"America/Swift_Current\"\n | \"America/Tegucigalpa\"\n | \"America/Thule\"\n | \"America/Thunder_Bay\"\n | \"America/Tijuana\"\n | \"America/Toronto\"\n | \"America/Tortola\"\n | \"America/Vancouver\"\n | \"America/Virgin\"\n | \"America/Whitehorse\"\n | \"America/Winnipeg\"\n | \"America/Yakutat\"\n | \"America/Yellowknife\"\n | \"Antarctica/Casey\"\n | \"Antarctica/Davis\"\n | \"Antarctica/DumontDUrville\"\n | \"Antarctica/Macquarie\"\n | \"Antarctica/Mawson\"\n | \"Antarctica/McMurdo\"\n | \"Antarctica/Palmer\"\n | \"Antarctica/Rothera\"\n | \"Antarctica/South_Pole\"\n | \"Antarctica/Syowa\"\n | \"Antarctica/Troll\"\n | \"Antarctica/Vostok\"\n | \"Arctic/Longyearbyen\"\n | \"Asia/Aden\"\n | \"Asia/Almaty\"\n | \"Asia/Amman\"\n | \"Asia/Anadyr\"\n | \"Asia/Aqtau\"\n | \"Asia/Aqtobe\"\n | \"Asia/Ashgabat\"\n | \"Asia/Ashkhabad\"\n | \"Asia/Atyrau\"\n | \"Asia/Baghdad\"\n | \"Asia/Bahrain\"\n | \"Asia/Baku\"\n | \"Asia/Bangkok\"\n | \"Asia/Barnaul\"\n | \"Asia/Beirut\"\n | \"Asia/Bishkek\"\n | \"Asia/Brunei\"\n | \"Asia/Calcutta\"\n | \"Asia/Chita\"\n | \"Asia/Choibalsan\"\n | \"Asia/Chongqing\"\n | \"Asia/Chungking\"\n | \"Asia/Colombo\"\n | \"Asia/Dacca\"\n | \"Asia/Damascus\"\n | \"Asia/Dhaka\"\n | \"Asia/Dili\"\n | \"Asia/Dubai\"\n | \"Asia/Dushanbe\"\n | \"Asia/Famagusta\"\n | \"Asia/Gaza\"\n | \"Asia/Harbin\"\n | \"Asia/Hebron\"\n | \"Asia/Ho_Chi_Minh\"\n | \"Asia/Hong_Kong\"\n | \"Asia/Hovd\"\n | \"Asia/Irkutsk\"\n | \"Asia/Istanbul\"\n | \"Asia/Jakarta\"\n | \"Asia/Jayapura\"\n | \"Asia/Jerusalem\"\n | \"Asia/Kabul\"\n | \"Asia/Kamchatka\"\n | \"Asia/Karachi\"\n | \"Asia/Kashgar\"\n | \"Asia/Kathmandu\"\n | \"Asia/Katmandu\"\n | \"Asia/Khandyga\"\n | \"Asia/Kolkata\"\n | \"Asia/Krasnoyarsk\"\n | \"Asia/Kuala_Lumpur\"\n | \"Asia/Kuching\"\n | \"Asia/Kuwait\"\n | \"Asia/Macao\"\n | \"Asia/Macau\"\n | \"Asia/Magadan\"\n | \"Asia/Makassar\"\n | \"Asia/Manila\"\n | \"Asia/Muscat\"\n | \"Asia/Nicosia\"\n | \"Asia/Novokuznetsk\"\n | \"Asia/Novosibirsk\"\n | \"Asia/Omsk\"\n | \"Asia/Oral\"\n | \"Asia/Phnom_Penh\"\n | \"Asia/Pontianak\"\n | \"Asia/Pyongyang\"\n | \"Asia/Qatar\"\n | \"Asia/Qostanay\"\n | \"Asia/Qyzylorda\"\n | \"Asia/Rangoon\"\n | \"Asia/Riyadh\"\n | \"Asia/Saigon\"\n | \"Asia/Sakhalin\"\n | \"Asia/Samarkand\"\n | \"Asia/Seoul\"\n | \"Asia/Shanghai\"\n | \"Asia/Singapore\"\n | \"Asia/Srednekolymsk\"\n | \"Asia/Taipei\"\n | \"Asia/Tashkent\"\n | \"Asia/Tbilisi\"\n | \"Asia/Tehran\"\n | \"Asia/Tel_Aviv\"\n | \"Asia/Thimbu\"\n | \"Asia/Thimphu\"\n | \"Asia/Tokyo\"\n | \"Asia/Tomsk\"\n | \"Asia/Ujung_Pandang\"\n | \"Asia/Ulaanbaatar\"\n | \"Asia/Ulan_Bator\"\n | \"Asia/Urumqi\"\n | \"Asia/Ust-Nera\"\n | \"Asia/Vientiane\"\n | \"Asia/Vladivostok\"\n | \"Asia/Yakutsk\"\n | \"Asia/Yangon\"\n | \"Asia/Yekaterinburg\"\n | \"Asia/Yerevan\"\n | \"Atlantic/Azores\"\n | \"Atlantic/Bermuda\"\n | \"Atlantic/Canary\"\n | \"Atlantic/Cape_Verde\"\n | \"Atlantic/Faeroe\"\n | \"Atlantic/Faroe\"\n | \"Atlantic/Jan_Mayen\"\n | \"Atlantic/Madeira\"\n | \"Atlantic/Reykjavik\"\n | \"Atlantic/South_Georgia\"\n | \"Atlantic/St_Helena\"\n | \"Atlantic/Stanley\"\n | \"Australia/ACT\"\n | \"Australia/Adelaide\"\n | \"Australia/Brisbane\"\n | \"Australia/Broken_Hill\"\n | \"Australia/Canberra\"\n | \"Australia/Currie\"\n | \"Australia/Darwin\"\n | \"Australia/Eucla\"\n | \"Australia/Hobart\"\n | \"Australia/LHI\"\n | \"Australia/Lindeman\"\n | \"Australia/Lord_Howe\"\n | \"Australia/Melbourne\"\n | \"Australia/NSW\"\n | \"Australia/North\"\n | \"Australia/Perth\"\n | \"Australia/Queensland\"\n | \"Australia/South\"\n | \"Australia/Sydney\"\n | \"Australia/Tasmania\"\n | \"Australia/Victoria\"\n | \"Australia/West\"\n | \"Australia/Yancowinna\"\n | \"Brazil/Acre\"\n | \"Brazil/DeNoronha\"\n | \"Brazil/East\"\n | \"Brazil/West\"\n | \"CET\"\n | \"CST6CDT\"\n | \"Canada/Atlantic\"\n | \"Canada/Central\"\n | \"Canada/Eastern\"\n | \"Canada/Mountain\"\n | \"Canada/Newfoundland\"\n | \"Canada/Pacific\"\n | \"Canada/Saskatchewan\"\n | \"Canada/Yukon\"\n | \"Chile/Continental\"\n | \"Chile/EasterIsland\"\n | \"Cuba\"\n | \"EET\"\n | \"EST\"\n | \"EST5EDT\"\n | \"Egypt\"\n | \"Eire\"\n | \"Etc/GMT\"\n | \"Etc/GMT+0\"\n | \"Etc/GMT+1\"\n | \"Etc/GMT+10\"\n | \"Etc/GMT+11\"\n | \"Etc/GMT+12\"\n | \"Etc/GMT+2\"\n | \"Etc/GMT+3\"\n | \"Etc/GMT+4\"\n | \"Etc/GMT+5\"\n | \"Etc/GMT+6\"\n | \"Etc/GMT+7\"\n | \"Etc/GMT+8\"\n | \"Etc/GMT+9\"\n | \"Etc/GMT-0\"\n | \"Etc/GMT-1\"\n | \"Etc/GMT-10\"\n | \"Etc/GMT-11\"\n | \"Etc/GMT-12\"\n | \"Etc/GMT-13\"\n | \"Etc/GMT-14\"\n | \"Etc/GMT-2\"\n | \"Etc/GMT-3\"\n | \"Etc/GMT-4\"\n | \"Etc/GMT-5\"\n | \"Etc/GMT-6\"\n | \"Etc/GMT-7\"\n | \"Etc/GMT-8\"\n | \"Etc/GMT-9\"\n | \"Etc/GMT0\"\n | \"Etc/Greenwich\"\n | \"Etc/UCT\"\n | \"Etc/UTC\"\n | \"Etc/Universal\"\n | \"Etc/Zulu\"\n | \"Europe/Amsterdam\"\n | \"Europe/Andorra\"\n | \"Europe/Astrakhan\"\n | \"Europe/Athens\"\n | \"Europe/Belfast\"\n | \"Europe/Belgrade\"\n | \"Europe/Berlin\"\n | \"Europe/Bratislava\"\n | \"Europe/Brussels\"\n | \"Europe/Bucharest\"\n | \"Europe/Budapest\"\n | \"Europe/Busingen\"\n | \"Europe/Chisinau\"\n | \"Europe/Copenhagen\"\n | \"Europe/Dublin\"\n | \"Europe/Gibraltar\"\n | \"Europe/Guernsey\"\n | \"Europe/Helsinki\"\n | \"Europe/Isle_of_Man\"\n | \"Europe/Istanbul\"\n | \"Europe/Jersey\"\n | \"Europe/Kaliningrad\"\n | \"Europe/Kiev\"\n | \"Europe/Kirov\"\n | \"Europe/Kyiv\"\n | \"Europe/Lisbon\"\n | \"Europe/Ljubljana\"\n | \"Europe/London\"\n | \"Europe/Luxembourg\"\n | \"Europe/Madrid\"\n | \"Europe/Malta\"\n | \"Europe/Mariehamn\"\n | \"Europe/Minsk\"\n | \"Europe/Monaco\"\n | \"Europe/Moscow\"\n | \"Europe/Nicosia\"\n | \"Europe/Oslo\"\n | \"Europe/Paris\"\n | \"Europe/Podgorica\"\n | \"Europe/Prague\"\n | \"Europe/Riga\"\n | \"Europe/Rome\"\n | \"Europe/Samara\"\n | \"Europe/San_Marino\"\n | \"Europe/Sarajevo\"\n | \"Europe/Saratov\"\n | \"Europe/Simferopol\"\n | \"Europe/Skopje\"\n | \"Europe/Sofia\"\n | \"Europe/Stockholm\"\n | \"Europe/Tallinn\"\n | \"Europe/Tirane\"\n | \"Europe/Tiraspol\"\n | \"Europe/Ulyanovsk\"\n | \"Europe/Uzhgorod\"\n | \"Europe/Vaduz\"\n | \"Europe/Vatican\"\n | \"Europe/Vienna\"\n | \"Europe/Vilnius\"\n | \"Europe/Volgograd\"\n | \"Europe/Warsaw\"\n | \"Europe/Zagreb\"\n | \"Europe/Zaporozhye\"\n | \"Europe/Zurich\"\n | \"Factory\"\n | \"GB\"\n | \"GB-Eire\"\n | \"GMT\"\n | \"GMT+0\"\n | \"GMT-0\"\n | \"GMT0\"\n | \"Greenwich\"\n | \"HST\"\n | \"Hongkong\"\n | \"Iceland\"\n | \"Indian/Antananarivo\"\n | \"Indian/Chagos\"\n | \"Indian/Christmas\"\n | \"Indian/Cocos\"\n | \"Indian/Comoro\"\n | \"Indian/Kerguelen\"\n | \"Indian/Mahe\"\n | \"Indian/Maldives\"\n | \"Indian/Mauritius\"\n | \"Indian/Mayotte\"\n | \"Indian/Reunion\"\n | \"Iran\"\n | \"Israel\"\n | \"Jamaica\"\n | \"Japan\"\n | \"Kwajalein\"\n | \"Libya\"\n | \"MET\"\n | \"MST\"\n | \"MST7MDT\"\n | \"Mexico/BajaNorte\"\n | \"Mexico/BajaSur\"\n | \"Mexico/General\"\n | \"NZ\"\n | \"NZ-CHAT\"\n | \"Navajo\"\n | \"PRC\"\n | \"PST8PDT\"\n | \"Pacific/Apia\"\n | \"Pacific/Auckland\"\n | \"Pacific/Bougainville\"\n | \"Pacific/Chatham\"\n | \"Pacific/Chuuk\"\n | \"Pacific/Easter\"\n | \"Pacific/Efate\"\n | \"Pacific/Enderbury\"\n | \"Pacific/Fakaofo\"\n | \"Pacific/Fiji\"\n | \"Pacific/Funafuti\"\n | \"Pacific/Galapagos\"\n | \"Pacific/Gambier\"\n | \"Pacific/Guadalcanal\"\n | \"Pacific/Guam\"\n | \"Pacific/Honolulu\"\n | \"Pacific/Johnston\"\n | \"Pacific/Kanton\"\n | \"Pacific/Kiritimati\"\n | \"Pacific/Kosrae\"\n | \"Pacific/Kwajalein\"\n | \"Pacific/Majuro\"\n | \"Pacific/Marquesas\"\n | \"Pacific/Midway\"\n | \"Pacific/Nauru\"\n | \"Pacific/Niue\"\n | \"Pacific/Norfolk\"\n | \"Pacific/Noumea\"\n | \"Pacific/Pago_Pago\"\n | \"Pacific/Palau\"\n | \"Pacific/Pitcairn\"\n | \"Pacific/Pohnpei\"\n | \"Pacific/Ponape\"\n | \"Pacific/Port_Moresby\"\n | \"Pacific/Rarotonga\"\n | \"Pacific/Saipan\"\n | \"Pacific/Samoa\"\n | \"Pacific/Tahiti\"\n | \"Pacific/Tarawa\"\n | \"Pacific/Tongatapu\"\n | \"Pacific/Truk\"\n | \"Pacific/Wake\"\n | \"Pacific/Wallis\"\n | \"Pacific/Yap\"\n | \"Poland\"\n | \"Portugal\"\n | \"ROC\"\n | \"ROK\"\n | \"Singapore\"\n | \"Turkey\"\n | \"UCT\"\n | \"US/Alaska\"\n | \"US/Aleutian\"\n | \"US/Arizona\"\n | \"US/Central\"\n | \"US/East-Indiana\"\n | \"US/Eastern\"\n | \"US/Hawaii\"\n | \"US/Indiana-Starke\"\n | \"US/Michigan\"\n | \"US/Mountain\"\n | \"US/Pacific\"\n | \"US/Samoa\"\n | \"UTC\"\n | \"Universal\"\n | \"W-SU\"\n | \"WET\"\n | \"Zulu\";\n/**\n * TokenEndpointAuthMethod\n */\nexport type TokenEndpointAuthMethod = \"client_secret_basic\" | \"client_secret_post\" | \"none\";\n/**\n * TokenType\n */\nexport type TokenType = \"access_token\" | \"refresh_token\";\n/**\n * TrialInterval\n */\nexport type TrialInterval = \"day\" | \"week\" | \"month\" | \"year\";\n/**\n * WebhookEventType\n */\nexport type WebhookEventType =\n | \"checkout.created\"\n | \"checkout.updated\"\n | \"checkout.expired\"\n | \"customer.created\"\n | \"customer.updated\"\n | \"customer.deleted\"\n | \"customer.state_changed\"\n | \"customer_seat.assigned\"\n | \"customer_seat.claimed\"\n | \"customer_seat.revoked\"\n | \"member.created\"\n | \"member.updated\"\n | \"member.deleted\"\n | \"order.created\"\n | \"order.updated\"\n | \"order.paid\"\n | \"order.refunded\"\n | \"subscription.created\"\n | \"subscription.updated\"\n | \"subscription.active\"\n | \"subscription.canceled\"\n | \"subscription.uncanceled\"\n | \"subscription.revoked\"\n | \"subscription.past_due\"\n | \"subscription.paused\"\n | \"subscription.resumed\"\n | \"refund.created\"\n | \"refund.updated\"\n | \"product.created\"\n | \"product.updated\"\n | \"benefit.created\"\n | \"benefit.updated\"\n | \"benefit_grant.created\"\n | \"benefit_grant.cycled\"\n | \"benefit_grant.updated\"\n | \"benefit_grant.revoked\"\n | \"organization.updated\";\n/**\n * WebhookFormat\n */\nexport type WebhookFormat = \"raw\" | \"discord\" | \"slack\";\n\n/**\n * Address\n */\nexport interface Address {\n /**\n * line1\n */\n line1?: string | null;\n /**\n * line2\n */\n line2?: string | null;\n /**\n * postal_code\n */\n postal_code?: string | null;\n /**\n * city\n */\n city?: string | null;\n /**\n * state\n */\n state?: string | null;\n /**\n * country\n */\n country: CountryAlpha2;\n}\n/**\n * AddressDict\n */\nexport interface AddressDict {\n /**\n * line1\n */\n line1?: string;\n /**\n * line2\n */\n line2?: string;\n /**\n * postal_code\n */\n postal_code?: string;\n /**\n * city\n */\n city?: string;\n /**\n * state\n */\n state?: string;\n /**\n * country\n */\n country: string;\n}\n/**\n * AddressInput\n */\nexport interface AddressInput {\n /**\n * line1\n */\n line1?: string | null;\n /**\n * line2\n */\n line2?: string | null;\n /**\n * postal_code\n */\n postal_code?: string | null;\n /**\n * city\n */\n city?: string | null;\n /**\n * state\n */\n state?: string | null;\n /**\n * country\n */\n country: CountryAlpha2Input;\n}\n/**\n * AlreadyActiveSubscriptionError\n */\nexport interface AlreadyActiveSubscriptionError {\n /**\n * error\n */\n error: \"AlreadyActiveSubscriptionError\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * AlreadyCanceledSubscription\n */\nexport interface AlreadyCanceledSubscription {\n /**\n * error\n */\n error: \"AlreadyCanceledSubscription\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * AmbiguousExternalCustomerID\n */\nexport interface AmbiguousExternalCustomerID {\n /**\n * error\n */\n error: \"AmbiguousExternalCustomerID\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * Schema of a custom field attached to a resource.\n */\nexport interface AttachedCustomField {\n /**\n * ID of the custom field.\n */\n custom_field_id: string;\n /**\n * custom_field\n */\n custom_field: CustomField;\n /**\n * Order of the custom field in the resource.\n */\n order: number;\n /**\n * Whether the value is required for this custom field.\n */\n required: boolean;\n}\n/**\n * Schema to attach a custom field to a resource.\n */\nexport interface AttachedCustomFieldCreate {\n /**\n * ID of the custom field to attach.\n */\n custom_field_id: string;\n /**\n * Whether the value is required for this custom field.\n */\n required: boolean;\n}\n/**\n * AuthorizeOrganization\n */\nexport interface AuthorizeOrganization {\n /**\n * id\n */\n id: string;\n /**\n * slug\n */\n slug: string;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n}\n/**\n * AuthorizeResponseOrganization\n */\nexport interface AuthorizeResponseOrganization {\n /**\n * client\n */\n client: OAuth2ClientPublic;\n /**\n * sub_type\n */\n sub_type: \"organization\";\n /**\n * sub\n */\n sub: AuthorizeOrganization | null;\n /**\n * scopes\n */\n scopes: Scope[];\n /**\n * organizations\n */\n organizations: AuthorizeOrganization[];\n /**\n * requires_single_organization\n */\n requires_single_organization?: boolean;\n /**\n * scope_display_names\n */\n scope_display_names?: Record<string, string>;\n}\n/**\n * AuthorizeResponseUser\n */\nexport interface AuthorizeResponseUser {\n /**\n * client\n */\n client: OAuth2ClientPublic;\n /**\n * sub_type\n */\n sub_type: \"user\";\n /**\n * sub\n */\n sub: AuthorizeUser | null;\n /**\n * scopes\n */\n scopes: Scope[];\n /**\n * organizations\n */\n organizations: AuthorizeOrganization[];\n /**\n * requires_single_organization\n */\n requires_single_organization?: boolean;\n /**\n * scope_display_names\n */\n scope_display_names?: Record<string, string>;\n}\n/**\n * AuthorizeUser\n */\nexport interface AuthorizeUser {\n /**\n * id\n */\n id: string;\n /**\n * email\n */\n email: string;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n}\n/**\n * An event created by Polar when an order is paid via customer balance.\n */\nexport interface BalanceCreditOrderEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"balance.credit_order\";\n /**\n * metadata\n */\n metadata: BalanceCreditOrderMetadata;\n}\n/**\n * BalanceCreditOrderMetadata\n */\nexport interface BalanceCreditOrderMetadata {\n /**\n * order_id\n */\n order_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * subscription_id\n */\n subscription_id?: string;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * tax_amount\n */\n tax_amount: number;\n /**\n * tax_state\n */\n tax_state?: string | null;\n /**\n * tax_country\n */\n tax_country?: string | null;\n /**\n * fee\n */\n fee: number;\n /**\n * exchange_rate\n */\n exchange_rate?: number;\n}\n/**\n * An event created by Polar when an order is disputed.\n */\nexport interface BalanceDisputeEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"balance.dispute\";\n /**\n * metadata\n */\n metadata: BalanceDisputeMetadata;\n}\n/**\n * BalanceDisputeMetadata\n */\nexport interface BalanceDisputeMetadata {\n /**\n * transaction_id\n */\n transaction_id: string;\n /**\n * dispute_id\n */\n dispute_id: string;\n /**\n * order_id\n */\n order_id?: string;\n /**\n * order_created_at\n */\n order_created_at?: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * subscription_id\n */\n subscription_id?: string;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * presentment_amount\n */\n presentment_amount: number;\n /**\n * presentment_currency\n */\n presentment_currency: string;\n /**\n * tax_amount\n */\n tax_amount: number;\n /**\n * tax_state\n */\n tax_state?: string | null;\n /**\n * tax_country\n */\n tax_country?: string | null;\n /**\n * fee\n */\n fee: number;\n /**\n * exchange_rate\n */\n exchange_rate?: number;\n}\n/**\n * An event created by Polar when a dispute is won and funds are reinstated.\n */\nexport interface BalanceDisputeReversalEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"balance.dispute_reversal\";\n /**\n * metadata\n */\n metadata: BalanceDisputeMetadata;\n}\n/**\n * An event created by Polar when an order is paid.\n */\nexport interface BalanceOrderEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"balance.order\";\n /**\n * metadata\n */\n metadata: BalanceOrderMetadata;\n}\n/**\n * BalanceOrderMetadata\n */\nexport interface BalanceOrderMetadata {\n /**\n * transaction_id\n */\n transaction_id: string;\n /**\n * order_id\n */\n order_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * subscription_id\n */\n subscription_id?: string;\n /**\n * amount\n */\n amount: number;\n /**\n * net_amount\n */\n net_amount?: number;\n /**\n * currency\n */\n currency: string;\n /**\n * presentment_amount\n */\n presentment_amount: number;\n /**\n * presentment_currency\n */\n presentment_currency: string;\n /**\n * tax_amount\n */\n tax_amount: number;\n /**\n * tax_state\n */\n tax_state?: string | null;\n /**\n * tax_country\n */\n tax_country?: string | null;\n /**\n * fee\n */\n fee: number;\n /**\n * exchange_rate\n */\n exchange_rate?: number;\n}\n/**\n * An event created by Polar when an order is refunded.\n */\nexport interface BalanceRefundEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"balance.refund\";\n /**\n * metadata\n */\n metadata: BalanceRefundMetadata;\n}\n/**\n * BalanceRefundMetadata\n */\nexport interface BalanceRefundMetadata {\n /**\n * transaction_id\n */\n transaction_id: string;\n /**\n * refund_id\n */\n refund_id: string;\n /**\n * order_id\n */\n order_id?: string;\n /**\n * order_created_at\n */\n order_created_at?: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * subscription_id\n */\n subscription_id?: string;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * presentment_amount\n */\n presentment_amount: number;\n /**\n * presentment_currency\n */\n presentment_currency: string;\n /**\n * refundable_amount\n */\n refundable_amount?: number;\n /**\n * tax_amount\n */\n tax_amount: number;\n /**\n * tax_state\n */\n tax_state?: string | null;\n /**\n * tax_country\n */\n tax_country?: string | null;\n /**\n * fee\n */\n fee: number;\n /**\n * exchange_rate\n */\n exchange_rate?: number;\n}\n/**\n * An event created by Polar when a refund is reverted.\n */\nexport interface BalanceRefundReversalEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"balance.refund_reversal\";\n /**\n * metadata\n */\n metadata: BalanceRefundMetadata;\n}\n/**\n * A benefit of type `custom`.\n\nUse it to grant any kind of benefit that doesn't fit in the other types.\n */\nexport interface BenefitCustom {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"custom\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * visibility\n */\n visibility: BenefitVisibility;\n /**\n * properties\n */\n properties: BenefitCustomProperties;\n /**\n * visibility_configurable\n */\n visibility_configurable: boolean;\n}\n/**\n * Schema to create a benefit of type `custom`.\n */\nexport interface BenefitCustomCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"custom\";\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description: string;\n /**\n * The ID of the organization owning the benefit. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * properties\n */\n properties: BenefitCustomCreateProperties;\n}\n/**\n * Properties for creating a benefit of type `custom`.\n */\nexport interface BenefitCustomCreateProperties {\n /**\n * note\n */\n note?: (string | null) | null;\n}\n/**\n * Properties for a benefit of type `custom`.\n */\nexport interface BenefitCustomProperties {\n /**\n * note\n */\n note: (string | null) | null;\n}\n/**\n * BenefitCustomSubscriber\n */\nexport interface BenefitCustomSubscriber {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"custom\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * organization\n */\n organization: BenefitSubscriberOrganization;\n /**\n * properties\n */\n properties: BenefitCustomSubscriberProperties;\n}\n/**\n * Properties available to subscribers for a benefit of type `custom`.\n */\nexport interface BenefitCustomSubscriberProperties {\n /**\n * note\n */\n note: (string | null) | null;\n}\n/**\n * BenefitCustomUpdate\n */\nexport interface BenefitCustomUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * type\n */\n type: \"custom\";\n /**\n * properties\n */\n properties?: BenefitCustomProperties | null;\n}\n/**\n * An event created by Polar when a benefit is cycled.\n */\nexport interface BenefitCycledEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"benefit.cycled\";\n /**\n * metadata\n */\n metadata: BenefitGrantMetadata;\n}\n/**\n * A benefit of type `discord`.\n\nUse it to automatically invite your backers to a Discord server.\n */\nexport interface BenefitDiscord {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"discord\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * visibility\n */\n visibility: BenefitVisibility;\n /**\n * properties\n */\n properties: BenefitDiscordProperties;\n /**\n * visibility_configurable\n */\n visibility_configurable: boolean;\n}\n/**\n * BenefitDiscordCreate\n */\nexport interface BenefitDiscordCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"discord\";\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description: string;\n /**\n * The ID of the organization owning the benefit. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * properties\n */\n properties: BenefitDiscordCreateProperties;\n}\n/**\n * Properties to create a benefit of type `discord`.\n */\nexport interface BenefitDiscordCreateProperties {\n /**\n * guild_token\n */\n guild_token: string;\n /**\n * The ID of the Discord role to grant.\n */\n role_id: string;\n /**\n * Whether to kick the member from the Discord server on revocation.\n */\n kick_member: boolean;\n}\n/**\n * Properties for a benefit of type `discord`.\n */\nexport interface BenefitDiscordProperties {\n /**\n * The ID of the Discord server.\n */\n guild_id: string;\n /**\n * The ID of the Discord role to grant.\n */\n role_id: string;\n /**\n * Whether to kick the member from the Discord server on revocation.\n */\n kick_member: boolean;\n /**\n * guild_token\n */\n guild_token: string;\n}\n/**\n * BenefitDiscordSubscriber\n */\nexport interface BenefitDiscordSubscriber {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"discord\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * organization\n */\n organization: BenefitSubscriberOrganization;\n /**\n * properties\n */\n properties: BenefitDiscordSubscriberProperties;\n}\n/**\n * Properties available to subscribers for a benefit of type `discord`.\n */\nexport interface BenefitDiscordSubscriberProperties {\n /**\n * The ID of the Discord server.\n */\n guild_id: string;\n}\n/**\n * BenefitDiscordUpdate\n */\nexport interface BenefitDiscordUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description?: string | null;\n /**\n * type\n */\n type: \"discord\";\n /**\n * properties\n */\n properties?: BenefitDiscordCreateProperties | null;\n}\n/**\n * BenefitDownloadables\n */\nexport interface BenefitDownloadables {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"downloadables\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * visibility\n */\n visibility: BenefitVisibility;\n /**\n * properties\n */\n properties: BenefitDownloadablesProperties;\n /**\n * visibility_configurable\n */\n visibility_configurable: boolean;\n}\n/**\n * BenefitDownloadablesCreate\n */\nexport interface BenefitDownloadablesCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"downloadables\";\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description: string;\n /**\n * The ID of the organization owning the benefit. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * properties\n */\n properties: BenefitDownloadablesCreateProperties;\n}\n/**\n * BenefitDownloadablesCreateProperties\n */\nexport interface BenefitDownloadablesCreateProperties {\n /**\n * archived\n */\n archived?: Record<string, boolean>;\n /**\n * files\n */\n files: string[];\n}\n/**\n * BenefitDownloadablesProperties\n */\nexport interface BenefitDownloadablesProperties {\n /**\n * archived\n */\n archived: Record<string, boolean>;\n /**\n * files\n */\n files: string[];\n}\n/**\n * BenefitDownloadablesSubscriber\n */\nexport interface BenefitDownloadablesSubscriber {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"downloadables\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * organization\n */\n organization: BenefitSubscriberOrganization;\n /**\n * properties\n */\n properties: BenefitDownloadablesSubscriberProperties;\n}\n/**\n * BenefitDownloadablesSubscriberProperties\n */\nexport interface BenefitDownloadablesSubscriberProperties {\n /**\n * active_files\n */\n active_files: string[];\n}\n/**\n * BenefitDownloadablesUpdate\n */\nexport interface BenefitDownloadablesUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description?: string | null;\n /**\n * type\n */\n type: \"downloadables\";\n /**\n * properties\n */\n properties?: BenefitDownloadablesCreateProperties | null;\n}\n/**\n * A benefit of type `feature_flag`.\n\nUse it to grant feature flags with key-value metadata\nthat can be queried via the API and webhooks.\n */\nexport interface BenefitFeatureFlag {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"feature_flag\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * visibility\n */\n visibility: BenefitVisibility;\n /**\n * properties\n */\n properties: BenefitFeatureFlagProperties;\n /**\n * visibility_configurable\n */\n visibility_configurable: boolean;\n}\n/**\n * Schema to create a benefit of type `feature_flag`.\n */\nexport interface BenefitFeatureFlagCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"feature_flag\";\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description: string;\n /**\n * The ID of the organization owning the benefit. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * properties\n */\n properties: BenefitFeatureFlagCreateProperties;\n}\n/**\n * Properties for creating a benefit of type `feature_flag`.\n */\nexport interface BenefitFeatureFlagCreateProperties extends Record<string, never> {}\n/**\n * Properties for a benefit of type `feature_flag`.\n */\nexport interface BenefitFeatureFlagProperties extends Record<string, never> {}\n/**\n * BenefitFeatureFlagSubscriber\n */\nexport interface BenefitFeatureFlagSubscriber {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"feature_flag\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * organization\n */\n organization: BenefitSubscriberOrganization;\n /**\n * properties\n */\n properties: BenefitFeatureFlagSubscriberProperties;\n}\n/**\n * Properties available to subscribers for a benefit of type `feature_flag`.\n */\nexport interface BenefitFeatureFlagSubscriberProperties extends Record<string, never> {}\n/**\n * BenefitFeatureFlagUpdate\n */\nexport interface BenefitFeatureFlagUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * type\n */\n type: \"feature_flag\";\n /**\n * properties\n */\n properties?: BenefitFeatureFlagProperties | null;\n}\n/**\n * A benefit of type `github_repository`.\n\nUse it to automatically invite your backers to a private GitHub repository.\n */\nexport interface BenefitGitHubRepository {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"github_repository\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * visibility\n */\n visibility: BenefitVisibility;\n /**\n * properties\n */\n properties: BenefitGitHubRepositoryProperties;\n /**\n * visibility_configurable\n */\n visibility_configurable: boolean;\n}\n/**\n * BenefitGitHubRepositoryCreate\n */\nexport interface BenefitGitHubRepositoryCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"github_repository\";\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description: string;\n /**\n * The ID of the organization owning the benefit. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * properties\n */\n properties: BenefitGitHubRepositoryCreateProperties;\n}\n/**\n * Properties to create a benefit of type `github_repository`.\n */\nexport interface BenefitGitHubRepositoryCreateProperties {\n /**\n * The owner of the repository.\n */\n repository_owner: string;\n /**\n * The name of the repository.\n */\n repository_name: string;\n /**\n * The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).\n */\n permission: Permission;\n}\n/**\n * Properties for a benefit of type `github_repository`.\n */\nexport interface BenefitGitHubRepositoryProperties {\n /**\n * The owner of the repository.\n */\n repository_owner: string;\n /**\n * The name of the repository.\n */\n repository_name: string;\n /**\n * The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).\n */\n permission: Permission;\n}\n/**\n * BenefitGitHubRepositorySubscriber\n */\nexport interface BenefitGitHubRepositorySubscriber {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"github_repository\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * organization\n */\n organization: BenefitSubscriberOrganization;\n /**\n * properties\n */\n properties: BenefitGitHubRepositorySubscriberProperties;\n}\n/**\n * Properties available to subscribers for a benefit of type `github_repository`.\n */\nexport interface BenefitGitHubRepositorySubscriberProperties {\n /**\n * The owner of the repository.\n */\n repository_owner: string;\n /**\n * The name of the repository.\n */\n repository_name: string;\n}\n/**\n * BenefitGitHubRepositoryUpdate\n */\nexport interface BenefitGitHubRepositoryUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description?: string | null;\n /**\n * type\n */\n type: \"github_repository\";\n /**\n * properties\n */\n properties?: BenefitGitHubRepositoryCreateProperties | null;\n}\n/**\n * BenefitGrant\n */\nexport interface BenefitGrant {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the grant.\n */\n id: string;\n /**\n * The timestamp when the benefit was granted. If `None`, the benefit is not granted.\n */\n granted_at?: string | null;\n /**\n * Whether the benefit is granted.\n */\n is_granted: boolean;\n /**\n * The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.\n */\n revoked_at?: string | null;\n /**\n * Whether the benefit is revoked.\n */\n is_revoked: boolean;\n /**\n * The ID of the subscription that granted this benefit.\n */\n subscription_id: string | null;\n /**\n * The ID of the order that granted this benefit.\n */\n order_id: string | null;\n /**\n * The ID of the customer concerned by this grant.\n */\n customer_id: string;\n /**\n * The ID of the member concerned by this grant.\n */\n member_id?: string | null;\n /**\n * The ID of the benefit concerned by this grant.\n */\n benefit_id: string;\n /**\n * The error information if the benefit grant failed with an unrecoverable error.\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: Customer;\n /**\n * member\n */\n member?: Member | null;\n /**\n * benefit\n */\n benefit: Benefit;\n /**\n * properties\n */\n properties:\n | BenefitGrantDiscordProperties\n | BenefitGrantGitHubRepositoryProperties\n | BenefitGrantDownloadablesProperties\n | BenefitGrantLicenseKeysProperties\n | BenefitGrantCustomProperties\n | BenefitGrantFeatureFlagProperties\n | BenefitGrantSlackSharedChannelProperties;\n}\n/**\n * BenefitGrantCustomProperties\n */\nexport interface BenefitGrantCustomProperties extends Record<string, never> {}\n/**\n * BenefitGrantCustomWebhook\n */\nexport interface BenefitGrantCustomWebhook {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the grant.\n */\n id: string;\n /**\n * The timestamp when the benefit was granted. If `None`, the benefit is not granted.\n */\n granted_at?: string | null;\n /**\n * Whether the benefit is granted.\n */\n is_granted: boolean;\n /**\n * The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.\n */\n revoked_at?: string | null;\n /**\n * Whether the benefit is revoked.\n */\n is_revoked: boolean;\n /**\n * The ID of the subscription that granted this benefit.\n */\n subscription_id: string | null;\n /**\n * The ID of the order that granted this benefit.\n */\n order_id: string | null;\n /**\n * The ID of the customer concerned by this grant.\n */\n customer_id: string;\n /**\n * The ID of the member concerned by this grant.\n */\n member_id?: string | null;\n /**\n * The ID of the benefit concerned by this grant.\n */\n benefit_id: string;\n /**\n * The error information if the benefit grant failed with an unrecoverable error.\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: Customer;\n /**\n * member\n */\n member?: Member | null;\n /**\n * benefit\n */\n benefit: BenefitCustom;\n /**\n * properties\n */\n properties: BenefitGrantCustomProperties;\n /**\n * previous_properties\n */\n previous_properties?: BenefitGrantCustomProperties | null;\n}\n/**\n * BenefitGrantDiscordProperties\n */\nexport interface BenefitGrantDiscordProperties {\n /**\n * account_id\n */\n account_id?: string | null;\n /**\n * guild_id\n */\n guild_id?: string;\n /**\n * role_id\n */\n role_id?: string;\n /**\n * granted_account_id\n */\n granted_account_id?: string;\n}\n/**\n * BenefitGrantDiscordWebhook\n */\nexport interface BenefitGrantDiscordWebhook {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the grant.\n */\n id: string;\n /**\n * The timestamp when the benefit was granted. If `None`, the benefit is not granted.\n */\n granted_at?: string | null;\n /**\n * Whether the benefit is granted.\n */\n is_granted: boolean;\n /**\n * The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.\n */\n revoked_at?: string | null;\n /**\n * Whether the benefit is revoked.\n */\n is_revoked: boolean;\n /**\n * The ID of the subscription that granted this benefit.\n */\n subscription_id: string | null;\n /**\n * The ID of the order that granted this benefit.\n */\n order_id: string | null;\n /**\n * The ID of the customer concerned by this grant.\n */\n customer_id: string;\n /**\n * The ID of the member concerned by this grant.\n */\n member_id?: string | null;\n /**\n * The ID of the benefit concerned by this grant.\n */\n benefit_id: string;\n /**\n * The error information if the benefit grant failed with an unrecoverable error.\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: Customer;\n /**\n * member\n */\n member?: Member | null;\n /**\n * benefit\n */\n benefit: BenefitDiscord;\n /**\n * properties\n */\n properties: BenefitGrantDiscordProperties;\n /**\n * previous_properties\n */\n previous_properties?: BenefitGrantDiscordProperties | null;\n}\n/**\n * BenefitGrantDownloadablesProperties\n */\nexport interface BenefitGrantDownloadablesProperties {\n /**\n * files\n */\n files?: string[];\n}\n/**\n * BenefitGrantDownloadablesWebhook\n */\nexport interface BenefitGrantDownloadablesWebhook {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the grant.\n */\n id: string;\n /**\n * The timestamp when the benefit was granted. If `None`, the benefit is not granted.\n */\n granted_at?: string | null;\n /**\n * Whether the benefit is granted.\n */\n is_granted: boolean;\n /**\n * The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.\n */\n revoked_at?: string | null;\n /**\n * Whether the benefit is revoked.\n */\n is_revoked: boolean;\n /**\n * The ID of the subscription that granted this benefit.\n */\n subscription_id: string | null;\n /**\n * The ID of the order that granted this benefit.\n */\n order_id: string | null;\n /**\n * The ID of the customer concerned by this grant.\n */\n customer_id: string;\n /**\n * The ID of the member concerned by this grant.\n */\n member_id?: string | null;\n /**\n * The ID of the benefit concerned by this grant.\n */\n benefit_id: string;\n /**\n * The error information if the benefit grant failed with an unrecoverable error.\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: Customer;\n /**\n * member\n */\n member?: Member | null;\n /**\n * benefit\n */\n benefit: BenefitDownloadables;\n /**\n * properties\n */\n properties: BenefitGrantDownloadablesProperties;\n /**\n * previous_properties\n */\n previous_properties?: BenefitGrantDownloadablesProperties | null;\n}\n/**\n * BenefitGrantError\n */\nexport interface BenefitGrantError {\n /**\n * message\n */\n message: string;\n /**\n * type\n */\n type: string;\n /**\n * timestamp\n */\n timestamp: string;\n}\n/**\n * BenefitGrantFeatureFlagProperties\n */\nexport interface BenefitGrantFeatureFlagProperties extends Record<string, never> {}\n/**\n * BenefitGrantFeatureFlagWebhook\n */\nexport interface BenefitGrantFeatureFlagWebhook {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the grant.\n */\n id: string;\n /**\n * The timestamp when the benefit was granted. If `None`, the benefit is not granted.\n */\n granted_at?: string | null;\n /**\n * Whether the benefit is granted.\n */\n is_granted: boolean;\n /**\n * The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.\n */\n revoked_at?: string | null;\n /**\n * Whether the benefit is revoked.\n */\n is_revoked: boolean;\n /**\n * The ID of the subscription that granted this benefit.\n */\n subscription_id: string | null;\n /**\n * The ID of the order that granted this benefit.\n */\n order_id: string | null;\n /**\n * The ID of the customer concerned by this grant.\n */\n customer_id: string;\n /**\n * The ID of the member concerned by this grant.\n */\n member_id?: string | null;\n /**\n * The ID of the benefit concerned by this grant.\n */\n benefit_id: string;\n /**\n * The error information if the benefit grant failed with an unrecoverable error.\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: Customer;\n /**\n * member\n */\n member?: Member | null;\n /**\n * benefit\n */\n benefit: BenefitFeatureFlag;\n /**\n * properties\n */\n properties: BenefitGrantFeatureFlagProperties;\n /**\n * previous_properties\n */\n previous_properties?: BenefitGrantFeatureFlagProperties | null;\n}\n/**\n * BenefitGrantGitHubRepositoryProperties\n */\nexport interface BenefitGrantGitHubRepositoryProperties {\n /**\n * account_id\n */\n account_id?: string | null;\n /**\n * repository_owner\n */\n repository_owner?: string;\n /**\n * repository_name\n */\n repository_name?: string;\n /**\n * permission\n */\n permission?: Permission;\n /**\n * granted_account_id\n */\n granted_account_id?: string;\n}\n/**\n * BenefitGrantGitHubRepositoryWebhook\n */\nexport interface BenefitGrantGitHubRepositoryWebhook {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the grant.\n */\n id: string;\n /**\n * The timestamp when the benefit was granted. If `None`, the benefit is not granted.\n */\n granted_at?: string | null;\n /**\n * Whether the benefit is granted.\n */\n is_granted: boolean;\n /**\n * The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.\n */\n revoked_at?: string | null;\n /**\n * Whether the benefit is revoked.\n */\n is_revoked: boolean;\n /**\n * The ID of the subscription that granted this benefit.\n */\n subscription_id: string | null;\n /**\n * The ID of the order that granted this benefit.\n */\n order_id: string | null;\n /**\n * The ID of the customer concerned by this grant.\n */\n customer_id: string;\n /**\n * The ID of the member concerned by this grant.\n */\n member_id?: string | null;\n /**\n * The ID of the benefit concerned by this grant.\n */\n benefit_id: string;\n /**\n * The error information if the benefit grant failed with an unrecoverable error.\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: Customer;\n /**\n * member\n */\n member?: Member | null;\n /**\n * benefit\n */\n benefit: BenefitGitHubRepository;\n /**\n * properties\n */\n properties: BenefitGrantGitHubRepositoryProperties;\n /**\n * previous_properties\n */\n previous_properties?: BenefitGrantGitHubRepositoryProperties | null;\n}\n/**\n * BenefitGrantLicenseKeysProperties\n */\nexport interface BenefitGrantLicenseKeysProperties {\n /**\n * user_provided_key\n */\n user_provided_key?: string;\n /**\n * license_key_id\n */\n license_key_id?: string;\n /**\n * display_key\n */\n display_key?: string;\n}\n/**\n * BenefitGrantLicenseKeysWebhook\n */\nexport interface BenefitGrantLicenseKeysWebhook {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the grant.\n */\n id: string;\n /**\n * The timestamp when the benefit was granted. If `None`, the benefit is not granted.\n */\n granted_at?: string | null;\n /**\n * Whether the benefit is granted.\n */\n is_granted: boolean;\n /**\n * The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.\n */\n revoked_at?: string | null;\n /**\n * Whether the benefit is revoked.\n */\n is_revoked: boolean;\n /**\n * The ID of the subscription that granted this benefit.\n */\n subscription_id: string | null;\n /**\n * The ID of the order that granted this benefit.\n */\n order_id: string | null;\n /**\n * The ID of the customer concerned by this grant.\n */\n customer_id: string;\n /**\n * The ID of the member concerned by this grant.\n */\n member_id?: string | null;\n /**\n * The ID of the benefit concerned by this grant.\n */\n benefit_id: string;\n /**\n * The error information if the benefit grant failed with an unrecoverable error.\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: Customer;\n /**\n * member\n */\n member?: Member | null;\n /**\n * benefit\n */\n benefit: BenefitLicenseKeys;\n /**\n * properties\n */\n properties: BenefitGrantLicenseKeysProperties;\n /**\n * previous_properties\n */\n previous_properties?: BenefitGrantLicenseKeysProperties | null;\n}\n/**\n * BenefitGrantMetadata\n */\nexport interface BenefitGrantMetadata {\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * benefit_grant_id\n */\n benefit_grant_id: string;\n /**\n * benefit_type\n */\n benefit_type: BenefitType;\n /**\n * member_id\n */\n member_id?: string;\n}\n/**\n * BenefitGrantMeterCreditProperties\n */\nexport interface BenefitGrantMeterCreditProperties {\n /**\n * last_credited_meter_id\n */\n last_credited_meter_id?: string;\n /**\n * last_credited_units\n */\n last_credited_units?: number;\n /**\n * last_credited_at\n */\n last_credited_at?: string;\n}\n/**\n * BenefitGrantMeterCreditWebhook\n */\nexport interface BenefitGrantMeterCreditWebhook {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the grant.\n */\n id: string;\n /**\n * The timestamp when the benefit was granted. If `None`, the benefit is not granted.\n */\n granted_at?: string | null;\n /**\n * Whether the benefit is granted.\n */\n is_granted: boolean;\n /**\n * The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.\n */\n revoked_at?: string | null;\n /**\n * Whether the benefit is revoked.\n */\n is_revoked: boolean;\n /**\n * The ID of the subscription that granted this benefit.\n */\n subscription_id: string | null;\n /**\n * The ID of the order that granted this benefit.\n */\n order_id: string | null;\n /**\n * The ID of the customer concerned by this grant.\n */\n customer_id: string;\n /**\n * The ID of the member concerned by this grant.\n */\n member_id?: string | null;\n /**\n * The ID of the benefit concerned by this grant.\n */\n benefit_id: string;\n /**\n * The error information if the benefit grant failed with an unrecoverable error.\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: Customer;\n /**\n * member\n */\n member?: Member | null;\n /**\n * benefit\n */\n benefit: BenefitMeterCredit;\n /**\n * properties\n */\n properties: BenefitGrantMeterCreditProperties;\n /**\n * previous_properties\n */\n previous_properties?: BenefitGrantMeterCreditProperties | null;\n}\n/**\n * BenefitGrantSlackSharedChannelProperties\n */\nexport interface BenefitGrantSlackSharedChannelProperties {\n /**\n * invited_email\n */\n invited_email?: string;\n /**\n * channel_id\n */\n channel_id?: string;\n /**\n * channel_name\n */\n channel_name?: string;\n /**\n * invite_id\n */\n invite_id?: string;\n /**\n * invite_url\n */\n invite_url?: string;\n /**\n * connected_team_id\n */\n connected_team_id?: string;\n}\n/**\n * BenefitGrantSlackSharedChannelWebhook\n */\nexport interface BenefitGrantSlackSharedChannelWebhook {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the grant.\n */\n id: string;\n /**\n * The timestamp when the benefit was granted. If `None`, the benefit is not granted.\n */\n granted_at?: string | null;\n /**\n * Whether the benefit is granted.\n */\n is_granted: boolean;\n /**\n * The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.\n */\n revoked_at?: string | null;\n /**\n * Whether the benefit is revoked.\n */\n is_revoked: boolean;\n /**\n * The ID of the subscription that granted this benefit.\n */\n subscription_id: string | null;\n /**\n * The ID of the order that granted this benefit.\n */\n order_id: string | null;\n /**\n * The ID of the customer concerned by this grant.\n */\n customer_id: string;\n /**\n * The ID of the member concerned by this grant.\n */\n member_id?: string | null;\n /**\n * The ID of the benefit concerned by this grant.\n */\n benefit_id: string;\n /**\n * The error information if the benefit grant failed with an unrecoverable error.\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: Customer;\n /**\n * member\n */\n member?: Member | null;\n /**\n * benefit\n */\n benefit: BenefitSlackSharedChannel;\n /**\n * properties\n */\n properties: BenefitGrantSlackSharedChannelProperties;\n /**\n * previous_properties\n */\n previous_properties?: BenefitGrantSlackSharedChannelProperties | null;\n}\n/**\n * An event created by Polar when a benefit is granted to a customer.\n */\nexport interface BenefitGrantedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"benefit.granted\";\n /**\n * metadata\n */\n metadata: BenefitGrantMetadata;\n}\n/**\n * BenefitLicenseKeyActivationCreateProperties\n */\nexport interface BenefitLicenseKeyActivationCreateProperties {\n /**\n * limit\n */\n limit: number;\n /**\n * enable_customer_admin\n */\n enable_customer_admin: boolean;\n}\n/**\n * BenefitLicenseKeyActivationProperties\n */\nexport interface BenefitLicenseKeyActivationProperties {\n /**\n * limit\n */\n limit: number;\n /**\n * enable_customer_admin\n */\n enable_customer_admin: boolean;\n}\n/**\n * BenefitLicenseKeyExpirationProperties\n */\nexport interface BenefitLicenseKeyExpirationProperties {\n /**\n * ttl\n */\n ttl: number;\n /**\n * timeframe\n */\n timeframe: Timeframe;\n}\n/**\n * BenefitLicenseKeys\n */\nexport interface BenefitLicenseKeys {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"license_keys\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * visibility\n */\n visibility: BenefitVisibility;\n /**\n * properties\n */\n properties: BenefitLicenseKeysProperties;\n /**\n * visibility_configurable\n */\n visibility_configurable: boolean;\n}\n/**\n * BenefitLicenseKeysCreate\n */\nexport interface BenefitLicenseKeysCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"license_keys\";\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description: string;\n /**\n * The ID of the organization owning the benefit. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * properties\n */\n properties: BenefitLicenseKeysCreateProperties;\n}\n/**\n * BenefitLicenseKeysCreateProperties\n */\nexport interface BenefitLicenseKeysCreateProperties {\n /**\n * prefix\n */\n prefix?: string | null;\n /**\n * expires\n */\n expires?: BenefitLicenseKeyExpirationProperties | null;\n /**\n * activations\n */\n activations?: BenefitLicenseKeyActivationCreateProperties | null;\n /**\n * limit_usage\n */\n limit_usage?: number | null;\n}\n/**\n * BenefitLicenseKeysProperties\n */\nexport interface BenefitLicenseKeysProperties {\n /**\n * prefix\n */\n prefix: string | null;\n /**\n * expires\n */\n expires: BenefitLicenseKeyExpirationProperties | null;\n /**\n * activations\n */\n activations: BenefitLicenseKeyActivationProperties | null;\n /**\n * limit_usage\n */\n limit_usage: number | null;\n}\n/**\n * BenefitLicenseKeysSubscriber\n */\nexport interface BenefitLicenseKeysSubscriber {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"license_keys\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * organization\n */\n organization: BenefitSubscriberOrganization;\n /**\n * properties\n */\n properties: BenefitLicenseKeysSubscriberProperties;\n}\n/**\n * BenefitLicenseKeysSubscriberProperties\n */\nexport interface BenefitLicenseKeysSubscriberProperties {\n /**\n * prefix\n */\n prefix: string | null;\n /**\n * expires\n */\n expires: BenefitLicenseKeyExpirationProperties | null;\n /**\n * activations\n */\n activations: BenefitLicenseKeyActivationProperties | null;\n /**\n * limit_usage\n */\n limit_usage: number | null;\n}\n/**\n * BenefitLicenseKeysUpdate\n */\nexport interface BenefitLicenseKeysUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * type\n */\n type: \"license_keys\";\n /**\n * properties\n */\n properties?: BenefitLicenseKeysCreateProperties | null;\n}\n/**\n * A benefit of type `meter_unit`.\n\nUse it to grant a number of units on a specific meter.\n */\nexport interface BenefitMeterCredit {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"meter_credit\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * visibility\n */\n visibility: BenefitVisibility;\n /**\n * properties\n */\n properties: BenefitMeterCreditProperties;\n /**\n * visibility_configurable\n */\n visibility_configurable: boolean;\n}\n/**\n * Schema to create a benefit of type `meter_unit`.\n */\nexport interface BenefitMeterCreditCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"meter_credit\";\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description: string;\n /**\n * The ID of the organization owning the benefit. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * properties\n */\n properties: BenefitMeterCreditCreateProperties;\n}\n/**\n * Properties for creating a benefit of type `meter_unit`.\n */\nexport interface BenefitMeterCreditCreateProperties {\n /**\n * units\n */\n units: number;\n /**\n * rollover\n */\n rollover: boolean;\n /**\n * meter_id\n */\n meter_id: string;\n}\n/**\n * Properties for a benefit of type `meter_unit`.\n */\nexport interface BenefitMeterCreditProperties {\n /**\n * units\n */\n units: number;\n /**\n * rollover\n */\n rollover: boolean;\n /**\n * meter_id\n */\n meter_id: string;\n}\n/**\n * BenefitMeterCreditSubscriber\n */\nexport interface BenefitMeterCreditSubscriber {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"meter_credit\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * organization\n */\n organization: BenefitSubscriberOrganization;\n /**\n * properties\n */\n properties: BenefitMeterCreditSubscriberProperties;\n}\n/**\n * Properties available to subscribers for a benefit of type `meter_unit`.\n */\nexport interface BenefitMeterCreditSubscriberProperties {\n /**\n * units\n */\n units: number;\n /**\n * rollover\n */\n rollover: boolean;\n /**\n * meter_id\n */\n meter_id: string;\n}\n/**\n * BenefitMeterCreditUpdate\n */\nexport interface BenefitMeterCreditUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * type\n */\n type: \"meter_credit\";\n /**\n * properties\n */\n properties?: BenefitMeterCreditCreateProperties | null;\n}\n/**\n * BenefitPublic\n */\nexport interface BenefitPublic {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: BenefitType;\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n}\n/**\n * An event created by Polar when a benefit is revoked from a customer.\n */\nexport interface BenefitRevokedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"benefit.revoked\";\n /**\n * metadata\n */\n metadata: BenefitGrantMetadata;\n}\n/**\n * BenefitSlackSharedChannel\n */\nexport interface BenefitSlackSharedChannel {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"slack_shared_channel\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * visibility\n */\n visibility: BenefitVisibility;\n /**\n * properties\n */\n properties: BenefitSlackSharedChannelProperties;\n /**\n * visibility_configurable\n */\n visibility_configurable: boolean;\n}\n/**\n * BenefitSlackSharedChannelCreate\n */\nexport interface BenefitSlackSharedChannelCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"slack_shared_channel\";\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description: string;\n /**\n * The ID of the organization owning the benefit. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * The visibility of the benefit in the customer portal.\n */\n visibility?: BenefitVisibility | null;\n /**\n * properties\n */\n properties: BenefitSlackSharedChannelCreateProperties;\n}\n/**\n * BenefitSlackSharedChannelCreateProperties\n */\nexport interface BenefitSlackSharedChannelCreateProperties {\n /**\n * Polar Slack integration to use for this benefit.\n */\n slack_integration_id: string;\n /**\n * channel_name_template\n */\n channel_name_template: string;\n /**\n * private\n */\n private?: boolean;\n /**\n * welcome_message\n */\n welcome_message?: string | null;\n /**\n * archive_on_revoke\n */\n archive_on_revoke?: boolean;\n /**\n * team_invitees\n */\n team_invitees?: string[];\n}\n/**\n * BenefitSlackSharedChannelProperties\n */\nexport interface BenefitSlackSharedChannelProperties {\n /**\n * Polar Slack integration linked to this benefit.\n */\n slack_integration_id: string;\n /**\n * Template for the channel name. Supports placeholders: {customer_name}, {customer_email_local}, and {metadata.<key>} for any value stored in customer user metadata.\n */\n channel_name_template: string;\n /**\n * Create the channel as private (recommended).\n */\n private?: boolean;\n /**\n * Optional message posted to the channel right after creation.\n */\n welcome_message?: string | null;\n /**\n * Archive the channel when the benefit is revoked.\n */\n archive_on_revoke?: boolean;\n /**\n * Slack user IDs from the merchant workspace to invite to every channel created for this benefit.\n */\n team_invitees?: string[];\n}\n/**\n * BenefitSlackSharedChannelSubscriber\n */\nexport interface BenefitSlackSharedChannelSubscriber {\n /**\n * The ID of the benefit.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * type\n */\n type: \"slack_shared_channel\";\n /**\n * The description of the benefit.\n */\n description: string;\n /**\n * Whether the benefit is selectable when creating a product.\n */\n selectable: boolean;\n /**\n * Whether the benefit is deletable.\n */\n deletable: boolean;\n /**\n * Whether the benefit is deleted.\n */\n is_deleted: boolean;\n /**\n * The ID of the organization owning the benefit.\n */\n organization_id: string;\n /**\n * organization\n */\n organization: BenefitSubscriberOrganization;\n /**\n * properties\n */\n properties: BenefitSlackSharedChannelSubscriberProperties;\n}\n/**\n * BenefitSlackSharedChannelSubscriberProperties\n */\nexport interface BenefitSlackSharedChannelSubscriberProperties extends Record<string, never> {}\n/**\n * BenefitSlackSharedChannelUpdate\n */\nexport interface BenefitSlackSharedChannelUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The description of the benefit. Will be displayed on products having this benefit.\n */\n description?: string | null;\n /**\n * type\n */\n type: \"slack_shared_channel\";\n /**\n * properties\n */\n properties?: BenefitSlackSharedChannelCreateProperties | null;\n}\n/**\n * BenefitSubscriberOrganization\n */\nexport interface BenefitSubscriberOrganization {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Organization name shown in checkout, customer portal, emails etc.\n */\n name: string;\n /**\n * Unique organization slug in checkout, customer portal and credit card statements.\n */\n slug: string;\n /**\n * Avatar URL shown in checkout, customer portal, emails etc.\n */\n avatar_url: string | null;\n /**\n * proration_behavior\n */\n proration_behavior: SubscriptionProrationBehavior;\n /**\n * Whether customers can update their subscriptions from the customer portal.\n */\n allow_customer_updates: boolean;\n}\n/**\n * An event created by Polar when a benefit is updated.\n */\nexport interface BenefitUpdatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"benefit.updated\";\n /**\n * metadata\n */\n metadata: BenefitGrantMetadata;\n}\n/**\n * CannotCreateOrganizationError\n */\nexport interface CannotCreateOrganizationError {\n /**\n * error\n */\n error: \"CannotCreateOrganizationError\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * Schema of a payment with a card payment method.\n */\nexport interface CardPayment {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * processor\n */\n processor: PaymentProcessor;\n /**\n * status\n */\n status: PaymentStatus;\n /**\n * The payment amount in cents.\n */\n amount: number;\n /**\n * The payment currency. Currently, only `usd` is supported.\n */\n currency: string;\n /**\n * The payment method used.\n */\n method: \"card\";\n /**\n * What initiated this payment attempt, e.g. initial purchase, subscription renewal, or an automated dunning retry.\n */\n trigger: PaymentTrigger | null;\n /**\n * Error code, if the payment was declined.\n */\n decline_reason: string | null;\n /**\n * Human-readable error message, if the payment was declined.\n */\n decline_message: string | null;\n /**\n * The ID of the organization that owns the payment.\n */\n organization_id: string;\n /**\n * The ID of the checkout session associated with this payment.\n */\n checkout_id: string | null;\n /**\n * The ID of the order associated with this payment.\n */\n order_id: string | null;\n /**\n * Additional metadata from the payment processor for internal use.\n */\n processor_metadata?: Record<string, unknown>;\n /**\n * method_metadata\n */\n method_metadata: CardPaymentMetadata;\n}\n/**\n * Additional metadata for a card payment method.\n */\nexport interface CardPaymentMetadata {\n /**\n * The brand of the card used for the payment.\n */\n brand: string;\n /**\n * The last 4 digits of the card number.\n */\n last4: string;\n}\n/**\n * Checkout session data retrieved using an access token.\n */\nexport interface Checkout {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * payment_processor\n */\n payment_processor: PaymentProcessor;\n /**\n * status\n */\n status: CheckoutStatus;\n /**\n * Client secret used to update and complete the checkout session from the client.\n */\n client_secret: string;\n /**\n * URL where the customer can access the checkout session.\n */\n url: string;\n /**\n * Expiration date and time of the checkout session.\n */\n expires_at: string;\n /**\n * URL where the customer will be redirected after a successful payment.\n */\n success_url: string;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url: string | null;\n /**\n * When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page.\n */\n embed_origin: string | null;\n /**\n * Amount in cents, before discounts and taxes.\n */\n amount: number;\n /**\n * Predefined number of seats (works with seat-based pricing only)\n */\n seats?: number | null;\n /**\n * Minimum number of seats (works with seat-based pricing only)\n */\n min_seats?: number | null;\n /**\n * Maximum number of seats (works with seat-based pricing only)\n */\n max_seats?: number | null;\n /**\n * Discount amount in cents.\n */\n discount_amount: number;\n /**\n * Amount in cents, after discounts but before taxes.\n */\n net_amount: number;\n /**\n * Sales tax amount in cents. If `null`, it means there is no enough information yet to calculate it.\n */\n tax_amount: number | null;\n /**\n * Tax behavior of the checkout. `inclusive` means the price includes tax, `exclusive` means tax is added on top. If `null`, tax is not yet calculated.\n */\n tax_behavior: TaxBehavior | null;\n /**\n * Amount in cents, after discounts and taxes.\n */\n total_amount: number;\n /**\n * Currency code of the checkout session.\n */\n currency: string;\n /**\n * Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured.\n */\n allow_trial: boolean | null;\n /**\n * Interval unit of the trial period, if any. This value is either set from the checkout, if `trial_interval` is set, or from the selected product.\n */\n active_trial_interval: TrialInterval | null;\n /**\n * Number of interval units of the trial period, if any. This value is either set from the checkout, if `trial_interval_count` is set, or from the selected product.\n */\n active_trial_interval_count: number | null;\n /**\n * End date and time of the trial period, if any.\n */\n trial_end: string | null;\n /**\n * ID of the organization owning the checkout session.\n */\n organization_id: string;\n /**\n * ID of the product to checkout.\n */\n product_id: string | null;\n /**\n * ID of the product price to checkout.\n */\n product_price_id: string | null;\n /**\n * ID of the discount applied to the checkout.\n */\n discount_id: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes: boolean;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`.\n */\n require_billing_address: boolean;\n /**\n * Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable.\n */\n is_discount_applicable: boolean;\n /**\n * Whether the product price is free, regardless of discounts.\n */\n is_free_product_price: boolean;\n /**\n * Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount.\n */\n is_payment_required: boolean;\n /**\n * Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles.\n */\n is_payment_setup_required: boolean;\n /**\n * Whether the checkout requires a payment form, whether because of a payment or payment method setup.\n */\n is_payment_form_required: boolean;\n /**\n * customer_id\n */\n customer_id: string | null;\n /**\n * Whether the customer is a business or an individual. If `true`, the customer will be required to fill their full billing address and billing name.\n */\n is_business_customer: boolean;\n /**\n * Name of the customer.\n */\n customer_name: string | null;\n /**\n * Email address of the customer.\n */\n customer_email: string | null;\n /**\n * customer_ip_address\n */\n customer_ip_address: string | null;\n /**\n * customer_billing_name\n */\n customer_billing_name: string | null;\n /**\n * customer_billing_address\n */\n customer_billing_address: Address | null;\n /**\n * customer_tax_id\n */\n customer_tax_id: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * payment_processor_metadata\n */\n payment_processor_metadata: Record<string, string>;\n /**\n * billing_address_fields\n */\n billing_address_fields: CheckoutBillingAddressFields;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * ID of the customer in your system. If a matching customer exists on Polar, the resulting order will be linked to this customer. Otherwise, a new customer will be created with this external ID set.\n */\n external_customer_id: string | null;\n /**\n * List of products available to select.\n */\n products: CheckoutProduct[];\n /**\n * Product selected to checkout.\n */\n product: CheckoutProduct | null;\n /**\n * Price of the selected product.\n */\n product_price: (LegacyRecurringProductPrice | ProductPrice) | null;\n /**\n * Mapping of product IDs to their list of prices.\n */\n prices: Record<string, (LegacyRecurringProductPrice | ProductPrice)[]> | null;\n /**\n * discount\n */\n discount:\n | (\n | CheckoutDiscountFixedOnceForeverDuration\n | CheckoutDiscountFixedRepeatDuration\n | CheckoutDiscountPercentageOnceForeverDuration\n | CheckoutDiscountPercentageRepeatDuration\n )\n | null;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * attached_custom_fields\n */\n attached_custom_fields: AttachedCustomField[] | null;\n /**\n * customer_metadata\n */\n customer_metadata: Record<string, string | number | boolean>;\n}\n/**\n * CheckoutBillingAddressFields\n */\nexport interface CheckoutBillingAddressFields {\n /**\n * country\n */\n country: BillingAddressFieldMode;\n /**\n * state\n */\n state: BillingAddressFieldMode;\n /**\n * city\n */\n city: BillingAddressFieldMode;\n /**\n * postal_code\n */\n postal_code: BillingAddressFieldMode;\n /**\n * line1\n */\n line1: BillingAddressFieldMode;\n /**\n * line2\n */\n line2: BillingAddressFieldMode;\n}\n/**\n * Confirm a checkout session using a Stripe confirmation token.\n */\nexport interface CheckoutConfirmStripe {\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * ID of the product to checkout. Must be present in the checkout's product list.\n */\n product_id?: string | null;\n /**\n * ID of the product price to checkout. Must correspond to a price present in the checkout's product list.\n */\n product_price_id?: string | null;\n /**\n * amount\n */\n amount?: number | null;\n /**\n * Number of seats for seat-based pricing.\n */\n seats?: number | null;\n /**\n * is_business_customer\n */\n is_business_customer?: boolean | null;\n /**\n * customer_name\n */\n customer_name?: string | null;\n /**\n * customer_email\n */\n customer_email?: string | null;\n /**\n * customer_billing_name\n */\n customer_billing_name?: string | null;\n /**\n * customer_billing_address\n */\n customer_billing_address?: AddressInput | null;\n /**\n * customer_tax_id\n */\n customer_tax_id?: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * Discount code to apply to the checkout.\n */\n discount_code?: string | null;\n /**\n * Disable the trial period for the checkout session. It's mainly useful when the trial is blocked because the customer already redeemed one.\n */\n allow_trial?: false | null;\n /**\n * ID of the Stripe confirmation token. Required for fixed prices and custom prices.\n */\n confirmation_token_id?: string | null;\n}\n/**\n * Create a new checkout session from a list of products.\nCustomers will be able to switch between those products.\n\nMetadata set on the checkout will be copied\nto the resulting order and/or subscription.\n */\nexport interface CheckoutCreate {\n /**\n * The interval unit for the trial period.\n */\n trial_interval?: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count?: number | null;\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * ID of the discount to apply to the checkout.\n */\n discount_id?: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes?: boolean;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`.\n */\n require_billing_address?: boolean;\n /**\n * amount\n */\n amount?: number | null;\n /**\n * Predefined number of seats (works with seat-based pricing only)\n */\n seats?: number | null;\n /**\n * Minimum number of seats (works with seat-based pricing only)\n */\n min_seats?: number | null;\n /**\n * Maximum number of seats (works with seat-based pricing only)\n */\n max_seats?: number | null;\n /**\n * Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured.\n */\n allow_trial?: boolean;\n /**\n * ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer.\n */\n customer_id?: string | null;\n /**\n * Whether the customer is a business or an individual. If `true`, the customer will be required to fill their full billing address and billing name.\n */\n is_business_customer?: boolean;\n /**\n * ID of the customer in your system. If a matching customer exists on Polar, the resulting order will be linked to this customer. Otherwise, a new customer will be created with this external ID set.\n */\n external_customer_id?: string | null;\n /**\n * customer_name\n */\n customer_name?: string | null;\n /**\n * customer_email\n */\n customer_email?: string | null;\n /**\n * customer_ip_address\n */\n customer_ip_address?: string | null;\n /**\n * customer_billing_name\n */\n customer_billing_name?: string | null;\n /**\n * customer_billing_address\n */\n customer_billing_address?: AddressInput | null;\n /**\n * customer_tax_id\n */\n customer_tax_id?: string | null;\n /**\n * Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n customer_metadata?: Record<string, string | number | number | boolean>;\n /**\n * ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten.\n */\n subscription_id?: string | null;\n /**\n * URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id.\n */\n success_url?: string | null;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url?: string | null;\n /**\n * If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page.\n */\n embed_origin?: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * currency\n */\n currency?: PresentmentCurrency | null;\n /**\n * List of product IDs available to select at that checkout. The first one will be selected by default.\n */\n products: string[];\n /**\n * Optional mapping of product IDs to a list of ad-hoc prices to create for that product. If not set, catalog prices of the product will be used.\n */\n prices?: Record<\n string,\n (\n | ProductPriceFixedCreate\n | ProductPriceCustomCreate\n | ProductPriceSeatBasedCreate\n | ProductPriceMeteredUnitCreate\n )[]\n > | null;\n}\n/**\n * An event created by Polar when a checkout is created.\n */\nexport interface CheckoutCreatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"checkout.created\";\n /**\n * metadata\n */\n metadata: CheckoutCreatedMetadata;\n}\n/**\n * CheckoutCreatedMetadata\n */\nexport interface CheckoutCreatedMetadata {\n /**\n * checkout_id\n */\n checkout_id: string;\n /**\n * checkout_status\n */\n checkout_status: string;\n /**\n * product_id\n */\n product_id?: string;\n}\n/**\n * Schema for a fixed amount discount that is applied once or forever.\n */\nexport interface CheckoutDiscountFixedOnceForeverDuration {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * type\n */\n type: DiscountType;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * Map of currency to fixed amount to discount from the total.\n */\n amounts: Record<string, number>;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * name\n */\n name: string;\n /**\n * code\n */\n code: string | null;\n}\n/**\n * Schema for a fixed amount discount that is applied on every invoice\nfor a certain number of months.\n */\nexport interface CheckoutDiscountFixedRepeatDuration {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * duration_in_months\n */\n duration_in_months: number;\n /**\n * type\n */\n type: DiscountType;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * Map of currency to fixed amount to discount from the total.\n */\n amounts: Record<string, number>;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * name\n */\n name: string;\n /**\n * code\n */\n code: string | null;\n}\n/**\n * Schema for a percentage discount that is applied once or forever.\n */\nexport interface CheckoutDiscountPercentageOnceForeverDuration {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * type\n */\n type: DiscountType;\n /**\n * Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.\n */\n basis_points: number;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * name\n */\n name: string;\n /**\n * code\n */\n code: string | null;\n}\n/**\n * Schema for a percentage discount that is applied on every invoice\nfor a certain number of months.\n */\nexport interface CheckoutDiscountPercentageRepeatDuration {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * duration_in_months\n */\n duration_in_months: number;\n /**\n * type\n */\n type: DiscountType;\n /**\n * Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.\n */\n basis_points: number;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * name\n */\n name: string;\n /**\n * code\n */\n code: string | null;\n}\n/**\n * Checkout link data.\n */\nexport interface CheckoutLink {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * payment_processor\n */\n payment_processor: PaymentProcessor;\n /**\n * Client secret used to access the checkout link.\n */\n client_secret: string;\n /**\n * URL where the customer will be redirected after a successful payment.\n */\n success_url: string | null;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url: string | null;\n /**\n * Optional label to distinguish links internally\n */\n label: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes: boolean;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.\n */\n require_billing_address: boolean;\n /**\n * ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored.\n */\n discount_id: string | null;\n /**\n * Preconfigured number of seats for seat-based pricing. When set, checkout sessions created from this link are locked to this number of seats and the customer won't be able to change it. All products on the link must use seat-based pricing and allow this number of seats. If the products no longer accommodate this value when the link is opened, it'll be ignored.\n */\n seats: number | null;\n /**\n * The organization ID.\n */\n organization_id: string;\n /**\n * products\n */\n products: CheckoutLinkProduct[];\n /**\n * discount\n */\n discount:\n | (\n | DiscountFixedOnceForeverDurationBase\n | DiscountFixedRepeatDurationBase\n | DiscountPercentageOnceForeverDurationBase\n | DiscountPercentageRepeatDurationBase\n )\n | null;\n /**\n * url\n */\n url: string;\n}\n/**\n * Schema to create a new checkout link from a a single product.\n\n**Deprecated**: Use `CheckoutLinkCreateProducts` instead.\n */\nexport interface CheckoutLinkCreateProduct {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The interval unit for the trial period.\n */\n trial_interval?: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count?: number | null;\n /**\n * Payment processor to use. Currently only Stripe is supported.\n */\n payment_processor: \"stripe\";\n /**\n * Optional label to distinguish links internally\n */\n label?: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes?: boolean;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.\n */\n require_billing_address?: boolean;\n /**\n * ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored.\n */\n discount_id?: string | null;\n /**\n * Preconfigured number of seats for seat-based pricing. When set, checkout sessions created from this link are locked to this number of seats and the customer won't be able to change it. All products on the link must use seat-based pricing and allow this number of seats. If the products no longer accommodate this value when the link is opened, it'll be ignored.\n */\n seats?: number | null;\n /**\n * URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id.\n */\n success_url?: string | null;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url?: string | null;\n /**\n * product_id\n */\n product_id: string;\n}\n/**\n * Schema to create a new checkout link from a a single product price.\n\n**Deprecated**: Use `CheckoutLinkCreateProducts` instead.\n */\nexport interface CheckoutLinkCreateProductPrice {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The interval unit for the trial period.\n */\n trial_interval?: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count?: number | null;\n /**\n * Payment processor to use. Currently only Stripe is supported.\n */\n payment_processor: \"stripe\";\n /**\n * Optional label to distinguish links internally\n */\n label?: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes?: boolean;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.\n */\n require_billing_address?: boolean;\n /**\n * ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored.\n */\n discount_id?: string | null;\n /**\n * Preconfigured number of seats for seat-based pricing. When set, checkout sessions created from this link are locked to this number of seats and the customer won't be able to change it. All products on the link must use seat-based pricing and allow this number of seats. If the products no longer accommodate this value when the link is opened, it'll be ignored.\n */\n seats?: number | null;\n /**\n * URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id.\n */\n success_url?: string | null;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url?: string | null;\n /**\n * product_price_id\n */\n product_price_id: string;\n}\n/**\n * Schema to create a new checkout link.\n */\nexport interface CheckoutLinkCreateProducts {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The interval unit for the trial period.\n */\n trial_interval?: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count?: number | null;\n /**\n * Payment processor to use. Currently only Stripe is supported.\n */\n payment_processor: \"stripe\";\n /**\n * Optional label to distinguish links internally\n */\n label?: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes?: boolean;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.\n */\n require_billing_address?: boolean;\n /**\n * ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored.\n */\n discount_id?: string | null;\n /**\n * Preconfigured number of seats for seat-based pricing. When set, checkout sessions created from this link are locked to this number of seats and the customer won't be able to change it. All products on the link must use seat-based pricing and allow this number of seats. If the products no longer accommodate this value when the link is opened, it'll be ignored.\n */\n seats?: number | null;\n /**\n * URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id.\n */\n success_url?: string | null;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url?: string | null;\n /**\n * List of products that will be available to select at checkout.\n */\n products: string[];\n}\n/**\n * Product data for a checkout link.\n */\nexport interface CheckoutLinkProduct {\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description: string | null;\n /**\n * visibility\n */\n visibility: ProductVisibility;\n /**\n * The recurring interval of the product. If `None`, the product is a one-time purchase.\n */\n recurring_interval: RecurringInterval | null;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.\n */\n recurring_interval_count: number | null;\n /**\n * The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval.\n */\n meter_interval: RecurringInterval | null;\n /**\n * Number of meter interval units. None when no meter cycle is set.\n */\n meter_interval_count: number | null;\n /**\n * Whether the product is a subscription.\n */\n is_recurring: boolean;\n /**\n * Whether the product is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the organization owning the product.\n */\n organization_id: string;\n /**\n * List of prices for this product.\n */\n prices: (LegacyRecurringProductPrice | ProductPrice)[];\n /**\n * List of benefits granted by the product.\n */\n benefits: BenefitPublic[];\n /**\n * List of medias associated to the product.\n */\n medias: ProductMediaFileRead[];\n}\n/**\n * Schema to update an existing checkout link.\n */\nexport interface CheckoutLinkUpdate {\n /**\n * The interval unit for the trial period.\n */\n trial_interval?: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count?: number | null;\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * List of products that will be available to select at checkout.\n */\n products?: string[] | null;\n /**\n * label\n */\n label?: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes?: boolean | null;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.\n */\n require_billing_address?: boolean | null;\n /**\n * ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored.\n */\n discount_id?: string | null;\n /**\n * Preconfigured number of seats for seat-based pricing. When set, checkout sessions created from this link are locked to this number of seats and the customer won't be able to change it. All products on the link must use seat-based pricing and allow this number of seats. If the products no longer accommodate this value when the link is opened, it'll be ignored.\n */\n seats?: number | null;\n /**\n * URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id.\n */\n success_url?: string | null;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url?: string | null;\n}\n/**\n * CheckoutOrganization\n */\nexport interface CheckoutOrganization {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Organization name shown in checkout, customer portal, emails etc.\n */\n name: string;\n /**\n * Unique organization slug in checkout, customer portal and credit card statements.\n */\n slug: string;\n /**\n * Avatar URL shown in checkout, customer portal, emails etc.\n */\n avatar_url: string | null;\n /**\n * proration_behavior\n */\n proration_behavior: SubscriptionProrationBehavior;\n /**\n * Whether customers can update their subscriptions from the customer portal.\n */\n allow_customer_updates: boolean;\n}\n/**\n * Product data for a checkout session.\n */\nexport interface CheckoutProduct {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description: string | null;\n /**\n * visibility\n */\n visibility: ProductVisibility;\n /**\n * The recurring interval of the product. If `None`, the product is a one-time purchase.\n */\n recurring_interval: RecurringInterval | null;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.\n */\n recurring_interval_count: number | null;\n /**\n * The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval.\n */\n meter_interval: RecurringInterval | null;\n /**\n * Number of meter interval units. None when no meter cycle is set.\n */\n meter_interval_count: number | null;\n /**\n * Whether the product is a subscription.\n */\n is_recurring: boolean;\n /**\n * Whether the product is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the organization owning the product.\n */\n organization_id: string;\n /**\n * List of prices for this product.\n */\n prices: (LegacyRecurringProductPrice | ProductPrice)[];\n /**\n * List of benefits granted by the product.\n */\n benefits: BenefitPublic[];\n /**\n * List of medias associated to the product.\n */\n medias: ProductMediaFileRead[];\n}\n/**\n * Checkout session data retrieved using the client secret.\n */\nexport interface CheckoutPublic {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * payment_processor\n */\n payment_processor: PaymentProcessor;\n /**\n * status\n */\n status: CheckoutStatus;\n /**\n * Client secret used to update and complete the checkout session from the client.\n */\n client_secret: string;\n /**\n * URL where the customer can access the checkout session.\n */\n url: string;\n /**\n * Expiration date and time of the checkout session.\n */\n expires_at: string;\n /**\n * URL where the customer will be redirected after a successful payment.\n */\n success_url: string;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url: string | null;\n /**\n * When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page.\n */\n embed_origin: string | null;\n /**\n * Amount in cents, before discounts and taxes.\n */\n amount: number;\n /**\n * Predefined number of seats (works with seat-based pricing only)\n */\n seats?: number | null;\n /**\n * Minimum number of seats (works with seat-based pricing only)\n */\n min_seats?: number | null;\n /**\n * Maximum number of seats (works with seat-based pricing only)\n */\n max_seats?: number | null;\n /**\n * Discount amount in cents.\n */\n discount_amount: number;\n /**\n * Amount in cents, after discounts but before taxes.\n */\n net_amount: number;\n /**\n * Sales tax amount in cents. If `null`, it means there is no enough information yet to calculate it.\n */\n tax_amount: number | null;\n /**\n * Tax behavior of the checkout. `inclusive` means the price includes tax, `exclusive` means tax is added on top. If `null`, tax is not yet calculated.\n */\n tax_behavior: TaxBehavior | null;\n /**\n * Amount in cents, after discounts and taxes.\n */\n total_amount: number;\n /**\n * Currency code of the checkout session.\n */\n currency: string;\n /**\n * Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured.\n */\n allow_trial: boolean | null;\n /**\n * Interval unit of the trial period, if any. This value is either set from the checkout, if `trial_interval` is set, or from the selected product.\n */\n active_trial_interval: TrialInterval | null;\n /**\n * Number of interval units of the trial period, if any. This value is either set from the checkout, if `trial_interval_count` is set, or from the selected product.\n */\n active_trial_interval_count: number | null;\n /**\n * End date and time of the trial period, if any.\n */\n trial_end: string | null;\n /**\n * ID of the organization owning the checkout session.\n */\n organization_id: string;\n /**\n * ID of the product to checkout.\n */\n product_id: string | null;\n /**\n * ID of the product price to checkout.\n */\n product_price_id: string | null;\n /**\n * ID of the discount applied to the checkout.\n */\n discount_id: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes: boolean;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`.\n */\n require_billing_address: boolean;\n /**\n * Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable.\n */\n is_discount_applicable: boolean;\n /**\n * Whether the product price is free, regardless of discounts.\n */\n is_free_product_price: boolean;\n /**\n * Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount.\n */\n is_payment_required: boolean;\n /**\n * Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles.\n */\n is_payment_setup_required: boolean;\n /**\n * Whether the checkout requires a payment form, whether because of a payment or payment method setup.\n */\n is_payment_form_required: boolean;\n /**\n * customer_id\n */\n customer_id: string | null;\n /**\n * Whether the customer is a business or an individual. If `true`, the customer will be required to fill their full billing address and billing name.\n */\n is_business_customer: boolean;\n /**\n * Name of the customer.\n */\n customer_name: string | null;\n /**\n * Email address of the customer.\n */\n customer_email: string | null;\n /**\n * customer_ip_address\n */\n customer_ip_address: string | null;\n /**\n * customer_billing_name\n */\n customer_billing_name: string | null;\n /**\n * customer_billing_address\n */\n customer_billing_address: Address | null;\n /**\n * customer_tax_id\n */\n customer_tax_id: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * payment_processor_metadata\n */\n payment_processor_metadata: Record<string, string>;\n /**\n * billing_address_fields\n */\n billing_address_fields: CheckoutBillingAddressFields;\n /**\n * List of products available to select.\n */\n products: CheckoutProduct[];\n /**\n * Product selected to checkout.\n */\n product: CheckoutProduct | null;\n /**\n * Price of the selected product.\n */\n product_price: (LegacyRecurringProductPrice | ProductPrice) | null;\n /**\n * Mapping of product IDs to their list of prices.\n */\n prices: Record<string, (LegacyRecurringProductPrice | ProductPrice)[]> | null;\n /**\n * discount\n */\n discount:\n | (\n | CheckoutDiscountFixedOnceForeverDuration\n | CheckoutDiscountFixedRepeatDuration\n | CheckoutDiscountPercentageOnceForeverDuration\n | CheckoutDiscountPercentageRepeatDuration\n )\n | null;\n /**\n * organization\n */\n organization: CheckoutOrganization;\n /**\n * attached_custom_fields\n */\n attached_custom_fields: AttachedCustomField[] | null;\n}\n/**\n * Checkout session data retrieved using the client secret after confirmation.\n\nIt contains a customer session token to retrieve order information\nright after the checkout.\n */\nexport interface CheckoutPublicConfirmed {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * payment_processor\n */\n payment_processor: PaymentProcessor;\n /**\n * status\n */\n status: \"confirmed\";\n /**\n * Client secret used to update and complete the checkout session from the client.\n */\n client_secret: string;\n /**\n * URL where the customer can access the checkout session.\n */\n url: string;\n /**\n * Expiration date and time of the checkout session.\n */\n expires_at: string;\n /**\n * URL where the customer will be redirected after a successful payment.\n */\n success_url: string;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url: string | null;\n /**\n * When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page.\n */\n embed_origin: string | null;\n /**\n * Amount in cents, before discounts and taxes.\n */\n amount: number;\n /**\n * Predefined number of seats (works with seat-based pricing only)\n */\n seats?: number | null;\n /**\n * Minimum number of seats (works with seat-based pricing only)\n */\n min_seats?: number | null;\n /**\n * Maximum number of seats (works with seat-based pricing only)\n */\n max_seats?: number | null;\n /**\n * Discount amount in cents.\n */\n discount_amount: number;\n /**\n * Amount in cents, after discounts but before taxes.\n */\n net_amount: number;\n /**\n * Sales tax amount in cents. If `null`, it means there is no enough information yet to calculate it.\n */\n tax_amount: number | null;\n /**\n * Tax behavior of the checkout. `inclusive` means the price includes tax, `exclusive` means tax is added on top. If `null`, tax is not yet calculated.\n */\n tax_behavior: TaxBehavior | null;\n /**\n * Amount in cents, after discounts and taxes.\n */\n total_amount: number;\n /**\n * Currency code of the checkout session.\n */\n currency: string;\n /**\n * Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured.\n */\n allow_trial: boolean | null;\n /**\n * Interval unit of the trial period, if any. This value is either set from the checkout, if `trial_interval` is set, or from the selected product.\n */\n active_trial_interval: TrialInterval | null;\n /**\n * Number of interval units of the trial period, if any. This value is either set from the checkout, if `trial_interval_count` is set, or from the selected product.\n */\n active_trial_interval_count: number | null;\n /**\n * End date and time of the trial period, if any.\n */\n trial_end: string | null;\n /**\n * ID of the organization owning the checkout session.\n */\n organization_id: string;\n /**\n * ID of the product to checkout.\n */\n product_id: string | null;\n /**\n * ID of the product price to checkout.\n */\n product_price_id: string | null;\n /**\n * ID of the discount applied to the checkout.\n */\n discount_id: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes: boolean;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`.\n */\n require_billing_address: boolean;\n /**\n * Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable.\n */\n is_discount_applicable: boolean;\n /**\n * Whether the product price is free, regardless of discounts.\n */\n is_free_product_price: boolean;\n /**\n * Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount.\n */\n is_payment_required: boolean;\n /**\n * Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles.\n */\n is_payment_setup_required: boolean;\n /**\n * Whether the checkout requires a payment form, whether because of a payment or payment method setup.\n */\n is_payment_form_required: boolean;\n /**\n * customer_id\n */\n customer_id: string | null;\n /**\n * Whether the customer is a business or an individual. If `true`, the customer will be required to fill their full billing address and billing name.\n */\n is_business_customer: boolean;\n /**\n * Name of the customer.\n */\n customer_name: string | null;\n /**\n * Email address of the customer.\n */\n customer_email: string | null;\n /**\n * customer_ip_address\n */\n customer_ip_address: string | null;\n /**\n * customer_billing_name\n */\n customer_billing_name: string | null;\n /**\n * customer_billing_address\n */\n customer_billing_address: Address | null;\n /**\n * customer_tax_id\n */\n customer_tax_id: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * payment_processor_metadata\n */\n payment_processor_metadata: Record<string, string>;\n /**\n * billing_address_fields\n */\n billing_address_fields: CheckoutBillingAddressFields;\n /**\n * List of products available to select.\n */\n products: CheckoutProduct[];\n /**\n * Product selected to checkout.\n */\n product: CheckoutProduct | null;\n /**\n * Price of the selected product.\n */\n product_price: (LegacyRecurringProductPrice | ProductPrice) | null;\n /**\n * Mapping of product IDs to their list of prices.\n */\n prices: Record<string, (LegacyRecurringProductPrice | ProductPrice)[]> | null;\n /**\n * discount\n */\n discount:\n | (\n | CheckoutDiscountFixedOnceForeverDuration\n | CheckoutDiscountFixedRepeatDuration\n | CheckoutDiscountPercentageOnceForeverDuration\n | CheckoutDiscountPercentageRepeatDuration\n )\n | null;\n /**\n * organization\n */\n organization: CheckoutOrganization;\n /**\n * attached_custom_fields\n */\n attached_custom_fields: AttachedCustomField[] | null;\n /**\n * customer_session_token\n */\n customer_session_token: string | null;\n}\n/**\n * Update an existing checkout session using an access token.\n */\nexport interface CheckoutUpdate {\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * ID of the product to checkout. Must be present in the checkout's product list.\n */\n product_id?: string | null;\n /**\n * ID of the product price to checkout. Must correspond to a price present in the checkout's product list.\n */\n product_price_id?: string | null;\n /**\n * amount\n */\n amount?: number | null;\n /**\n * Number of seats for seat-based pricing.\n */\n seats?: number | null;\n /**\n * is_business_customer\n */\n is_business_customer?: boolean | null;\n /**\n * customer_name\n */\n customer_name?: string | null;\n /**\n * customer_email\n */\n customer_email?: string | null;\n /**\n * customer_billing_name\n */\n customer_billing_name?: string | null;\n /**\n * customer_billing_address\n */\n customer_billing_address?: AddressInput | null;\n /**\n * customer_tax_id\n */\n customer_tax_id?: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval?: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count?: number | null;\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * currency\n */\n currency?: PresentmentCurrency | null;\n /**\n * ID of the discount to apply to the checkout.\n */\n discount_id?: string | null;\n /**\n * Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.\n */\n allow_discount_codes?: boolean | null;\n /**\n * Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`.\n */\n require_billing_address?: boolean | null;\n /**\n * Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured.\n */\n allow_trial?: boolean | null;\n /**\n * customer_ip_address\n */\n customer_ip_address?: string | null;\n /**\n * Key-value object allowing you to store additional information that'll be copied to the created customer.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n customer_metadata?: Record<string, string | number | number | boolean> | null;\n /**\n * URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id.\n */\n success_url?: string | null;\n /**\n * When set, a back button will be shown in the checkout to return to this URL.\n */\n return_url?: string | null;\n /**\n * If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page.\n */\n embed_origin?: string | null;\n}\n/**\n * Update an existing checkout session using the client secret.\n */\nexport interface CheckoutUpdatePublic {\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * ID of the product to checkout. Must be present in the checkout's product list.\n */\n product_id?: string | null;\n /**\n * ID of the product price to checkout. Must correspond to a price present in the checkout's product list.\n */\n product_price_id?: string | null;\n /**\n * amount\n */\n amount?: number | null;\n /**\n * Number of seats for seat-based pricing.\n */\n seats?: number | null;\n /**\n * is_business_customer\n */\n is_business_customer?: boolean | null;\n /**\n * customer_name\n */\n customer_name?: string | null;\n /**\n * customer_email\n */\n customer_email?: string | null;\n /**\n * customer_billing_name\n */\n customer_billing_name?: string | null;\n /**\n * customer_billing_address\n */\n customer_billing_address?: AddressInput | null;\n /**\n * customer_tax_id\n */\n customer_tax_id?: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * Discount code to apply to the checkout.\n */\n discount_code?: string | null;\n /**\n * Disable the trial period for the checkout session. It's mainly useful when the trial is blocked because the customer already redeemed one.\n */\n allow_trial?: false | null;\n}\n/**\n * Context\n */\nexport interface Context extends Record<string, never> {}\n/**\n * CostMetadataInput\n */\nexport interface CostMetadataInput {\n /**\n * The amount in cents.\n */\n amount: number | string;\n /**\n * The currency. Currently, only `usd` is supported.\n */\n currency: string;\n}\n/**\n * CostMetadataOutput\n */\nexport interface CostMetadataOutput {\n /**\n * The amount in cents.\n */\n amount: string;\n /**\n * The currency. Currently, only `usd` is supported.\n */\n currency: string;\n}\n/**\n * CountAggregation\n */\nexport interface CountAggregation {\n /**\n * func\n */\n func?: \"count\";\n}\n/**\n * CursorPagination\n */\nexport interface CursorPagination {\n /**\n * has_next_page\n */\n has_next_page: boolean;\n}\n/**\n * Schema for a custom field of type checkbox.\n */\nexport interface CustomFieldCheckbox {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * type\n */\n type: \"checkbox\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field.\n */\n organization_id: string;\n /**\n * properties\n */\n properties: CustomFieldCheckboxProperties;\n}\n/**\n * CustomFieldCheckboxProperties\n */\nexport interface CustomFieldCheckboxProperties {\n /**\n * form_label\n */\n form_label?: string;\n /**\n * form_help_text\n */\n form_help_text?: string;\n /**\n * form_placeholder\n */\n form_placeholder?: string;\n}\n/**\n * Schema to create a custom field of type checkbox.\n */\nexport interface CustomFieldCreateCheckbox {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"checkbox\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * properties\n */\n properties: CustomFieldCheckboxProperties;\n}\n/**\n * Schema to create a custom field of type date.\n */\nexport interface CustomFieldCreateDate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"date\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * properties\n */\n properties: CustomFieldDateProperties;\n}\n/**\n * Schema to create a custom field of type number.\n */\nexport interface CustomFieldCreateNumber {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"number\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * properties\n */\n properties: CustomFieldNumberProperties;\n}\n/**\n * Schema to create a custom field of type select.\n */\nexport interface CustomFieldCreateSelect {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"select\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * properties\n */\n properties: CustomFieldSelectProperties;\n}\n/**\n * Schema to create a custom field of type text.\n */\nexport interface CustomFieldCreateText {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * type\n */\n type: \"text\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * properties\n */\n properties: CustomFieldTextProperties;\n}\n/**\n * Schema for a custom field of type date.\n */\nexport interface CustomFieldDate {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * type\n */\n type: \"date\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field.\n */\n organization_id: string;\n /**\n * properties\n */\n properties: CustomFieldDateProperties;\n}\n/**\n * CustomFieldDateProperties\n */\nexport interface CustomFieldDateProperties {\n /**\n * form_label\n */\n form_label?: string;\n /**\n * form_help_text\n */\n form_help_text?: string;\n /**\n * form_placeholder\n */\n form_placeholder?: string;\n /**\n * ge\n */\n ge?: number;\n /**\n * le\n */\n le?: number;\n}\n/**\n * Schema for a custom field of type number.\n */\nexport interface CustomFieldNumber {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * type\n */\n type: \"number\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field.\n */\n organization_id: string;\n /**\n * properties\n */\n properties: CustomFieldNumberProperties;\n}\n/**\n * CustomFieldNumberProperties\n */\nexport interface CustomFieldNumberProperties {\n /**\n * form_label\n */\n form_label?: string;\n /**\n * form_help_text\n */\n form_help_text?: string;\n /**\n * form_placeholder\n */\n form_placeholder?: string;\n /**\n * ge\n */\n ge?: number;\n /**\n * le\n */\n le?: number;\n}\n/**\n * Schema for a custom field of type select.\n */\nexport interface CustomFieldSelect {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * type\n */\n type: \"select\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field.\n */\n organization_id: string;\n /**\n * properties\n */\n properties: CustomFieldSelectProperties;\n}\n/**\n * CustomFieldSelectOption\n */\nexport interface CustomFieldSelectOption {\n /**\n * value\n */\n value: string;\n /**\n * label\n */\n label: string;\n}\n/**\n * CustomFieldSelectProperties\n */\nexport interface CustomFieldSelectProperties {\n /**\n * form_label\n */\n form_label?: string;\n /**\n * form_help_text\n */\n form_help_text?: string;\n /**\n * form_placeholder\n */\n form_placeholder?: string;\n /**\n * options\n */\n options: CustomFieldSelectOption[];\n}\n/**\n * Schema for a custom field of type text.\n */\nexport interface CustomFieldText {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * type\n */\n type: \"text\";\n /**\n * Identifier of the custom field. It'll be used as key when storing the value.\n */\n slug: string;\n /**\n * Name of the custom field.\n */\n name: string;\n /**\n * The ID of the organization owning the custom field.\n */\n organization_id: string;\n /**\n * properties\n */\n properties: CustomFieldTextProperties;\n}\n/**\n * CustomFieldTextProperties\n */\nexport interface CustomFieldTextProperties {\n /**\n * form_label\n */\n form_label?: string;\n /**\n * form_help_text\n */\n form_help_text?: string;\n /**\n * form_placeholder\n */\n form_placeholder?: string;\n /**\n * textarea\n */\n textarea?: boolean;\n /**\n * min_length\n */\n min_length?: number;\n /**\n * max_length\n */\n max_length?: number;\n}\n/**\n * Schema to update a custom field of type checkbox.\n */\nexport interface CustomFieldUpdateCheckbox {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * name\n */\n name?: string | null;\n /**\n * slug\n */\n slug?: string | null;\n /**\n * type\n */\n type: \"checkbox\";\n /**\n * properties\n */\n properties?: CustomFieldCheckboxProperties | null;\n}\n/**\n * Schema to update a custom field of type date.\n */\nexport interface CustomFieldUpdateDate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * name\n */\n name?: string | null;\n /**\n * slug\n */\n slug?: string | null;\n /**\n * type\n */\n type: \"date\";\n /**\n * properties\n */\n properties?: CustomFieldDateProperties | null;\n}\n/**\n * Schema to update a custom field of type number.\n */\nexport interface CustomFieldUpdateNumber {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * name\n */\n name?: string | null;\n /**\n * slug\n */\n slug?: string | null;\n /**\n * type\n */\n type: \"number\";\n /**\n * properties\n */\n properties?: CustomFieldNumberProperties | null;\n}\n/**\n * Schema to update a custom field of type select.\n */\nexport interface CustomFieldUpdateSelect {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * name\n */\n name?: string | null;\n /**\n * slug\n */\n slug?: string | null;\n /**\n * type\n */\n type: \"select\";\n /**\n * properties\n */\n properties?: CustomFieldSelectProperties | null;\n}\n/**\n * Schema to update a custom field of type text.\n */\nexport interface CustomFieldUpdateText {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * name\n */\n name?: string | null;\n /**\n * slug\n */\n slug?: string | null;\n /**\n * type\n */\n type: \"text\";\n /**\n * properties\n */\n properties?: CustomFieldTextProperties | null;\n}\n/**\n * CustomerBenefitGrantCustom\n */\nexport interface CustomerBenefitGrantCustom {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * granted_at\n */\n granted_at: string | null;\n /**\n * revoked_at\n */\n revoked_at: string | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * member_id\n */\n member_id?: string | null;\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * order_id\n */\n order_id: string | null;\n /**\n * is_granted\n */\n is_granted: boolean;\n /**\n * is_revoked\n */\n is_revoked: boolean;\n /**\n * error\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: CustomerPortalCustomer;\n /**\n * benefit\n */\n benefit: BenefitCustomSubscriber;\n /**\n * properties\n */\n properties: BenefitGrantCustomProperties;\n}\n/**\n * CustomerBenefitGrantCustomUpdate\n */\nexport interface CustomerBenefitGrantCustomUpdate {\n /**\n * benefit_type\n */\n benefit_type: \"custom\";\n}\n/**\n * CustomerBenefitGrantDiscord\n */\nexport interface CustomerBenefitGrantDiscord {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * granted_at\n */\n granted_at: string | null;\n /**\n * revoked_at\n */\n revoked_at: string | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * member_id\n */\n member_id?: string | null;\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * order_id\n */\n order_id: string | null;\n /**\n * is_granted\n */\n is_granted: boolean;\n /**\n * is_revoked\n */\n is_revoked: boolean;\n /**\n * error\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: CustomerPortalCustomer;\n /**\n * benefit\n */\n benefit: BenefitDiscordSubscriber;\n /**\n * properties\n */\n properties: BenefitGrantDiscordProperties;\n}\n/**\n * CustomerBenefitGrantDiscordPropertiesUpdate\n */\nexport interface CustomerBenefitGrantDiscordPropertiesUpdate {\n /**\n * account_id\n */\n account_id: string | null;\n}\n/**\n * CustomerBenefitGrantDiscordUpdate\n */\nexport interface CustomerBenefitGrantDiscordUpdate {\n /**\n * benefit_type\n */\n benefit_type: \"discord\";\n /**\n * properties\n */\n properties: CustomerBenefitGrantDiscordPropertiesUpdate;\n}\n/**\n * CustomerBenefitGrantDownloadables\n */\nexport interface CustomerBenefitGrantDownloadables {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * granted_at\n */\n granted_at: string | null;\n /**\n * revoked_at\n */\n revoked_at: string | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * member_id\n */\n member_id?: string | null;\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * order_id\n */\n order_id: string | null;\n /**\n * is_granted\n */\n is_granted: boolean;\n /**\n * is_revoked\n */\n is_revoked: boolean;\n /**\n * error\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: CustomerPortalCustomer;\n /**\n * benefit\n */\n benefit: BenefitDownloadablesSubscriber;\n /**\n * properties\n */\n properties: BenefitGrantDownloadablesProperties;\n}\n/**\n * CustomerBenefitGrantDownloadablesUpdate\n */\nexport interface CustomerBenefitGrantDownloadablesUpdate {\n /**\n * benefit_type\n */\n benefit_type: \"downloadables\";\n}\n/**\n * CustomerBenefitGrantFeatureFlag\n */\nexport interface CustomerBenefitGrantFeatureFlag {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * granted_at\n */\n granted_at: string | null;\n /**\n * revoked_at\n */\n revoked_at: string | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * member_id\n */\n member_id?: string | null;\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * order_id\n */\n order_id: string | null;\n /**\n * is_granted\n */\n is_granted: boolean;\n /**\n * is_revoked\n */\n is_revoked: boolean;\n /**\n * error\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: CustomerPortalCustomer;\n /**\n * benefit\n */\n benefit: BenefitFeatureFlagSubscriber;\n /**\n * properties\n */\n properties: BenefitGrantFeatureFlagProperties;\n}\n/**\n * CustomerBenefitGrantFeatureFlagUpdate\n */\nexport interface CustomerBenefitGrantFeatureFlagUpdate {\n /**\n * benefit_type\n */\n benefit_type: \"feature_flag\";\n}\n/**\n * CustomerBenefitGrantGitHubRepository\n */\nexport interface CustomerBenefitGrantGitHubRepository {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * granted_at\n */\n granted_at: string | null;\n /**\n * revoked_at\n */\n revoked_at: string | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * member_id\n */\n member_id?: string | null;\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * order_id\n */\n order_id: string | null;\n /**\n * is_granted\n */\n is_granted: boolean;\n /**\n * is_revoked\n */\n is_revoked: boolean;\n /**\n * error\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: CustomerPortalCustomer;\n /**\n * benefit\n */\n benefit: BenefitGitHubRepositorySubscriber;\n /**\n * properties\n */\n properties: BenefitGrantGitHubRepositoryProperties;\n}\n/**\n * CustomerBenefitGrantGitHubRepositoryPropertiesUpdate\n */\nexport interface CustomerBenefitGrantGitHubRepositoryPropertiesUpdate {\n /**\n * account_id\n */\n account_id: string | null;\n}\n/**\n * CustomerBenefitGrantGitHubRepositoryUpdate\n */\nexport interface CustomerBenefitGrantGitHubRepositoryUpdate {\n /**\n * benefit_type\n */\n benefit_type: \"github_repository\";\n /**\n * properties\n */\n properties: CustomerBenefitGrantGitHubRepositoryPropertiesUpdate;\n}\n/**\n * CustomerBenefitGrantLicenseKeys\n */\nexport interface CustomerBenefitGrantLicenseKeys {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * granted_at\n */\n granted_at: string | null;\n /**\n * revoked_at\n */\n revoked_at: string | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * member_id\n */\n member_id?: string | null;\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * order_id\n */\n order_id: string | null;\n /**\n * is_granted\n */\n is_granted: boolean;\n /**\n * is_revoked\n */\n is_revoked: boolean;\n /**\n * error\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: CustomerPortalCustomer;\n /**\n * benefit\n */\n benefit: BenefitLicenseKeysSubscriber;\n /**\n * properties\n */\n properties: BenefitGrantLicenseKeysProperties;\n}\n/**\n * CustomerBenefitGrantLicenseKeysUpdate\n */\nexport interface CustomerBenefitGrantLicenseKeysUpdate {\n /**\n * benefit_type\n */\n benefit_type: \"license_keys\";\n}\n/**\n * CustomerBenefitGrantMeterCredit\n */\nexport interface CustomerBenefitGrantMeterCredit {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * granted_at\n */\n granted_at: string | null;\n /**\n * revoked_at\n */\n revoked_at: string | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * member_id\n */\n member_id?: string | null;\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * order_id\n */\n order_id: string | null;\n /**\n * is_granted\n */\n is_granted: boolean;\n /**\n * is_revoked\n */\n is_revoked: boolean;\n /**\n * error\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: CustomerPortalCustomer;\n /**\n * benefit\n */\n benefit: BenefitMeterCreditSubscriber;\n /**\n * properties\n */\n properties: BenefitGrantMeterCreditProperties;\n}\n/**\n * CustomerBenefitGrantMeterCreditUpdate\n */\nexport interface CustomerBenefitGrantMeterCreditUpdate {\n /**\n * benefit_type\n */\n benefit_type: \"meter_credit\";\n}\n/**\n * CustomerBenefitGrantSlackSharedChannel\n */\nexport interface CustomerBenefitGrantSlackSharedChannel {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * granted_at\n */\n granted_at: string | null;\n /**\n * revoked_at\n */\n revoked_at: string | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * member_id\n */\n member_id?: string | null;\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * order_id\n */\n order_id: string | null;\n /**\n * is_granted\n */\n is_granted: boolean;\n /**\n * is_revoked\n */\n is_revoked: boolean;\n /**\n * error\n */\n error?: BenefitGrantError | null;\n /**\n * customer\n */\n customer: CustomerPortalCustomer;\n /**\n * benefit\n */\n benefit: BenefitSlackSharedChannelSubscriber;\n /**\n * properties\n */\n properties: BenefitGrantSlackSharedChannelProperties;\n}\n/**\n * CustomerBenefitGrantSlackSharedChannelPropertiesUpdate\n */\nexport interface CustomerBenefitGrantSlackSharedChannelPropertiesUpdate {\n /**\n * invited_email\n */\n invited_email: string;\n}\n/**\n * CustomerBenefitGrantSlackSharedChannelUpdate\n */\nexport interface CustomerBenefitGrantSlackSharedChannelUpdate {\n /**\n * benefit_type\n */\n benefit_type: \"slack_shared_channel\";\n /**\n * properties\n */\n properties: CustomerBenefitGrantSlackSharedChannelPropertiesUpdate;\n}\n/**\n * An event created by Polar when a customer is created.\n */\nexport interface CustomerCreatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"customer.created\";\n /**\n * metadata\n */\n metadata: CustomerCreatedMetadata;\n}\n/**\n * CustomerCreatedMetadata\n */\nexport interface CustomerCreatedMetadata {\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * customer_email\n */\n customer_email: string | null;\n /**\n * customer_name\n */\n customer_name: string | null;\n /**\n * customer_external_id\n */\n customer_external_id: string | null;\n}\n/**\n * CustomerCustomerMeter\n */\nexport interface CustomerCustomerMeter {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the customer.\n */\n customer_id: string;\n /**\n * The ID of the meter.\n */\n meter_id: string;\n /**\n * The number of consumed units.\n */\n consumed_units: number;\n /**\n * The number of credited units.\n */\n credited_units: number;\n /**\n * The balance of the meter, i.e. the difference between credited and consumed units.\n */\n balance: number;\n /**\n * meter\n */\n meter: CustomerCustomerMeterMeter;\n}\n/**\n * CustomerCustomerMeterMeter\n */\nexport interface CustomerCustomerMeterMeter {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The name of the meter. Will be shown on customer's invoices and usage.\n */\n name: string;\n}\n/**\n * CustomerCustomerSession\n */\nexport interface CustomerCustomerSession {\n /**\n * expires_at\n */\n expires_at: string;\n /**\n * return_url\n */\n return_url: string | null;\n}\n/**\n * An event created by Polar when a customer is deleted.\n */\nexport interface CustomerDeletedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"customer.deleted\";\n /**\n * metadata\n */\n metadata: CustomerDeletedMetadata;\n}\n/**\n * CustomerDeletedMetadata\n */\nexport interface CustomerDeletedMetadata {\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * customer_email\n */\n customer_email: string | null;\n /**\n * customer_name\n */\n customer_name: string | null;\n /**\n * customer_external_id\n */\n customer_external_id: string | null;\n}\n/**\n * CustomerEmailUpdateRequest\n */\nexport interface CustomerEmailUpdateRequest {\n /**\n * email\n */\n email: string;\n}\n/**\n * CustomerEmailUpdateVerifyRequest\n */\nexport interface CustomerEmailUpdateVerifyRequest {\n /**\n * token\n */\n token: string;\n}\n/**\n * CustomerEmailUpdateVerifyResponse\n */\nexport interface CustomerEmailUpdateVerifyResponse {\n /**\n * token\n */\n token: string;\n}\n/**\n * A customer in an organization.\n */\nexport interface CustomerIndividual {\n /**\n * The ID of the customer.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email: string;\n /**\n * Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.\n */\n email_verified: boolean;\n /**\n * The type of customer.\n */\n type: \"individual\";\n /**\n * The name of the customer.\n */\n name: string | null;\n /**\n * The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * tax_id\n */\n tax_id: unknown[] | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer.\n */\n organization_id: string;\n /**\n * The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details.\n */\n default_payment_method_id?: string | null;\n /**\n * Timestamp for when the customer was soft deleted.\n */\n deleted_at: string | null;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n}\n/**\n * CustomerIndividualCreate\n */\nexport interface CustomerIndividualCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * name\n */\n name?: string | null;\n /**\n * billing_address\n */\n billing_address?: AddressInput | null;\n /**\n * tax_id\n */\n tax_id?: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * Optional owner member to create with the customer. If not provided, an owner member will be automatically created using the customer's email and name.\n */\n owner?: MemberOwnerCreate | null;\n /**\n * type\n */\n type?: \"individual\";\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email: string;\n}\n/**\n * An active customer meter, with current consumed and credited units.\n */\nexport interface CustomerMeter {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the customer.\n */\n customer_id: string;\n /**\n * The ID of the meter.\n */\n meter_id: string;\n /**\n * The number of consumed units.\n */\n consumed_units: number;\n /**\n * The number of credited units.\n */\n credited_units: number;\n /**\n * The balance of the meter, i.e. the difference between credited and consumed units.\n */\n balance: number;\n /**\n * customer\n */\n customer: Customer;\n /**\n * meter\n */\n meter: Meter;\n}\n/**\n * CustomerNotReady\n */\nexport interface CustomerNotReady {\n /**\n * error\n */\n error: \"CustomerNotReady\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * CustomerOrder\n */\nexport interface CustomerOrder {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * status\n */\n status: OrderStatus;\n /**\n * Whether the order has been paid for.\n */\n paid: boolean;\n /**\n * Amount in cents, before discounts and taxes.\n */\n subtotal_amount: number;\n /**\n * Discount amount in cents.\n */\n discount_amount: number;\n /**\n * Amount in cents, after discounts but before taxes.\n */\n net_amount: number;\n /**\n * Sales tax amount in cents.\n */\n tax_amount: number;\n /**\n * Amount in cents, after discounts and taxes.\n */\n total_amount: number;\n /**\n * Customer's balance amount applied to this invoice. Can increase the total amount paid, if the customer has a negative balance, or decrease it, if the customer has a positive balance.Amount in cents.\n */\n applied_balance_amount: number;\n /**\n * Amount in cents that is due for this order.\n */\n due_amount: number;\n /**\n * Amount refunded in cents.\n */\n refunded_amount: number;\n /**\n * Sales tax refunded in cents.\n */\n refunded_tax_amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * billing_reason\n */\n billing_reason: OrderBillingReason;\n /**\n * The name of the customer that should appear on the invoice.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * The invoice number associated with this order. `null` while the order is in `draft` status; assigned at finalize.\n */\n invoice_number: string | null;\n /**\n * Whether an invoice has been generated for this order.\n */\n is_invoice_generated: boolean;\n /**\n * The receipt number for this order. Set once the order is paid for organizations with receipts enabled. When set, a downloadable receipt PDF can be obtained via the receipt endpoint.\n */\n receipt_number: string | null;\n /**\n * Number of seats purchased (for seat-based one-time orders).\n */\n seats?: number | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * product_id\n */\n product_id: string | null;\n /**\n * discount_id\n */\n discount_id: string | null;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * checkout_id\n */\n checkout_id: string | null;\n /**\n * When the next automatic payment retry is scheduled. `null` if the order is not in dunning or all retries have been exhausted.\n */\n next_payment_attempt_at?: string | null;\n /**\n * product\n */\n product: CustomerOrderProduct | null;\n /**\n * subscription\n */\n subscription: CustomerOrderSubscription | null;\n /**\n * Line items composing the order.\n */\n items: OrderItemSchema[];\n /**\n * A summary description of the order.\n */\n description: string;\n /**\n * Amount in cents that can still be refunded (net, before taxes). Accounts for any applied customer balance and previous refunds.\n */\n refundable_amount: number;\n /**\n * Sales tax in cents that would be refunded if the full refundable amount is refunded.\n */\n refundable_tax_amount: number;\n}\n/**\n * Schema to confirm a retry payment using either a saved payment method or a new confirmation token.\n */\nexport interface CustomerOrderConfirmPayment {\n /**\n * ID of the Stripe confirmation token for new payment methods.\n */\n confirmation_token_id?: string | null;\n /**\n * ID of an existing saved payment method.\n */\n payment_method_id?: string | null;\n /**\n * payment_processor\n */\n payment_processor?: PaymentProcessor;\n}\n/**\n * Order's invoice data.\n */\nexport interface CustomerOrderInvoice {\n /**\n * The URL to the invoice.\n */\n url: string;\n}\n/**\n * Response after confirming a retry payment.\n */\nexport interface CustomerOrderPaymentConfirmation {\n /**\n * Payment status after confirmation.\n */\n status: string;\n /**\n * Client secret for handling additional actions.\n */\n client_secret?: string | null;\n /**\n * Error message if confirmation failed.\n */\n error?: string | null;\n}\n/**\n * Payment status for an order.\n */\nexport interface CustomerOrderPaymentStatus {\n /**\n * Current payment status.\n */\n status: string;\n /**\n * Error message if payment failed.\n */\n error?: string | null;\n}\n/**\n * CustomerOrderProduct\n */\nexport interface CustomerOrderProduct {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description: string | null;\n /**\n * visibility\n */\n visibility: ProductVisibility;\n /**\n * The recurring interval of the product. If `None`, the product is a one-time purchase.\n */\n recurring_interval: RecurringInterval | null;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.\n */\n recurring_interval_count: number | null;\n /**\n * The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval.\n */\n meter_interval: RecurringInterval | null;\n /**\n * Number of meter interval units. None when no meter cycle is set.\n */\n meter_interval_count: number | null;\n /**\n * Whether the product is a subscription.\n */\n is_recurring: boolean;\n /**\n * Whether the product is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the organization owning the product.\n */\n organization_id: string;\n /**\n * List of prices for this product.\n */\n prices: (LegacyRecurringProductPrice | ProductPrice)[];\n /**\n * List of benefits granted by the product.\n */\n benefits: BenefitPublic[];\n /**\n * List of medias associated to the product.\n */\n medias: ProductMediaFileRead[];\n /**\n * organization\n */\n organization: CustomerOrganization;\n}\n/**\n * Order's receipt data.\n */\nexport interface CustomerOrderReceipt {\n /**\n * The URL to the receipt PDF.\n */\n url: string;\n}\n/**\n * CustomerOrderSubscription\n */\nexport interface CustomerOrderSubscription {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The amount of the subscription.\n */\n amount: number;\n /**\n * The currency of the subscription.\n */\n currency: string;\n /**\n * recurring_interval\n */\n recurring_interval: RecurringInterval;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.\n */\n recurring_interval_count: number;\n /**\n * status\n */\n status: SubscriptionStatus;\n /**\n * The start timestamp of the current billing period.\n */\n current_period_start: string;\n /**\n * The end timestamp of the current billing period.\n */\n current_period_end: string;\n /**\n * The start timestamp of the current meter period, if the product has a meter cycle set. Metered credits are granted and overage is settled on this cadence.\n */\n current_meter_period_start: string | null;\n /**\n * The end timestamp of the current meter period, if the product has a meter cycle set. This is when credits next renew.\n */\n current_meter_period_end: string | null;\n /**\n * The start timestamp of the trial period, if any.\n */\n trial_start: string | null;\n /**\n * The end timestamp of the trial period, if any.\n */\n trial_end: string | null;\n /**\n * Whether the subscription will be canceled at the end of the current period.\n */\n cancel_at_period_end: boolean;\n /**\n * The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.\n */\n canceled_at: string | null;\n /**\n * The timestamp when the subscription started.\n */\n started_at: string | null;\n /**\n * The timestamp when the subscription will end.\n */\n ends_at: string | null;\n /**\n * The timestamp when the subscription ended.\n */\n ended_at: string | null;\n /**\n * The timestamp when the subscription entered `past_due` status.\n */\n past_due_at?: string | null;\n /**\n * Whether the subscription will be paused at the end of the current period.\n */\n pause_at_period_end: boolean;\n /**\n * The timestamp when the subscription was paused.\n */\n paused_at: string | null;\n /**\n * The timestamp when a paused subscription is scheduled to automatically resume, if set.\n */\n resumes_at: string | null;\n /**\n * The ID of the subscribed customer.\n */\n customer_id: string;\n /**\n * The ID of the subscribed product.\n */\n product_id: string;\n /**\n * The ID of the applied discount, if any.\n */\n discount_id: string | null;\n /**\n * checkout_id\n */\n checkout_id: string | null;\n /**\n * The number of seats for seat-based subscriptions. None for non-seat subscriptions.\n */\n seats?: number | null;\n /**\n * customer_cancellation_reason\n */\n customer_cancellation_reason: CustomerCancellationReason | null;\n /**\n * customer_cancellation_comment\n */\n customer_cancellation_comment: string | null;\n}\n/**\n * Schema to update an order.\n */\nexport interface CustomerOrderUpdate {\n /**\n * The name of the customer that should appear on the invoice.\n */\n billing_name?: string | null;\n /**\n * The address of the customer that should appear on the invoice. Country and state fields cannot be updated.\n */\n billing_address?: AddressInput | null;\n}\n/**\n * CustomerOrganization\n */\nexport interface CustomerOrganization {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Organization name shown in checkout, customer portal, emails etc.\n */\n name: string;\n /**\n * Unique organization slug in checkout, customer portal and credit card statements.\n */\n slug: string;\n /**\n * Avatar URL shown in checkout, customer portal, emails etc.\n */\n avatar_url: string | null;\n /**\n * proration_behavior\n */\n proration_behavior: SubscriptionProrationBehavior;\n /**\n * Whether customers can update their subscriptions from the customer portal.\n */\n allow_customer_updates: boolean;\n /**\n * customer_portal_settings\n */\n customer_portal_settings: OrganizationCustomerPortalSettings;\n /**\n * organization_features\n */\n organization_features?: CustomerOrganizationFeatureSettings;\n}\n/**\n * Schema of an organization and related data for customer portal.\n */\nexport interface CustomerOrganizationData {\n /**\n * organization\n */\n organization: CustomerOrganization;\n /**\n * products\n */\n products: CustomerProduct[];\n}\n/**\n * Feature flags exposed to the customer portal.\n */\nexport interface CustomerOrganizationFeatureSettings {\n /**\n * Whether the member model is enabled for this organization.\n */\n member_model_enabled?: boolean;\n /**\n * Whether localization is enabled for this organization.\n */\n checkout_localization_enabled?: boolean;\n}\n/**\n * CustomerPaymentMethodCard\n */\nexport interface CustomerPaymentMethodCard {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * processor\n */\n processor: PaymentProcessor;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * type\n */\n type: \"card\";\n /**\n * method_metadata\n */\n method_metadata: PaymentMethodCardMetadata;\n /**\n * Whether this payment method is the customer's default payment method.\n */\n is_default: boolean;\n}\n/**\n * CustomerPaymentMethodConfirm\n */\nexport interface CustomerPaymentMethodConfirm {\n /**\n * setup_intent_id\n */\n setup_intent_id: string;\n /**\n * set_default\n */\n set_default: boolean;\n}\n/**\n * CustomerPaymentMethodCreate\n */\nexport interface CustomerPaymentMethodCreate {\n /**\n * confirmation_token_id\n */\n confirmation_token_id: string;\n /**\n * set_default\n */\n set_default: boolean;\n /**\n * return_url\n */\n return_url: string;\n}\n/**\n * CustomerPaymentMethodCreateRequiresActionResponse\n */\nexport interface CustomerPaymentMethodCreateRequiresActionResponse {\n /**\n * status\n */\n status: \"requires_action\";\n /**\n * client_secret\n */\n client_secret: string;\n}\n/**\n * CustomerPaymentMethodCreateSucceededResponse\n */\nexport interface CustomerPaymentMethodCreateSucceededResponse {\n /**\n * status\n */\n status: \"succeeded\";\n /**\n * payment_method\n */\n payment_method: CustomerPaymentMethod;\n}\n/**\n * CustomerPaymentMethodGeneric\n */\nexport interface CustomerPaymentMethodGeneric {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * processor\n */\n processor: PaymentProcessor;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * type\n */\n type: string;\n /**\n * Whether this payment method is the customer's default payment method.\n */\n is_default: boolean;\n}\n/**\n * CustomerPortalCustomer\n */\nexport interface CustomerPortalCustomer {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * email\n */\n email: string | null;\n /**\n * email_verified\n */\n email_verified: boolean;\n /**\n * name\n */\n name: string | null;\n /**\n * billing_name\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * tax_id\n */\n tax_id: unknown[] | null;\n /**\n * oauth_accounts\n */\n oauth_accounts: Record<string, CustomerPortalOAuthAccount>;\n /**\n * default_payment_method_id\n */\n default_payment_method_id?: string | null;\n /**\n * type\n */\n type?: CustomerType | null;\n /**\n * locale\n */\n locale?: string | null;\n}\n/**\n * CustomerPortalCustomerSettings\n */\nexport interface CustomerPortalCustomerSettings {\n /**\n * allow_email_change\n */\n allow_email_change?: boolean;\n}\n/**\n * CustomerPortalCustomerUpdate\n */\nexport interface CustomerPortalCustomerUpdate {\n /**\n * billing_name\n */\n billing_name?: string | null;\n /**\n * billing_address\n */\n billing_address?: AddressInput | null;\n /**\n * tax_id\n */\n tax_id?: string | null;\n /**\n * default_payment_method_id\n */\n default_payment_method_id?: string | null;\n}\n/**\n * A member of the customer's team as seen in the customer portal.\n */\nexport interface CustomerPortalMember {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The email address of the member.\n */\n email: string;\n /**\n * The name of the member.\n */\n name: string | null;\n /**\n * role\n */\n role: MemberRole;\n}\n/**\n * Schema for adding a new member to the customer's team.\n */\nexport interface CustomerPortalMemberCreate {\n /**\n * The email address of the new member.\n */\n email: string;\n /**\n * The name of the new member (optional).\n */\n name?: string | null;\n /**\n * role\n */\n role?: MemberRole;\n}\n/**\n * Schema for updating a member in the customer portal.\n */\nexport interface CustomerPortalMemberUpdate {\n /**\n * The new name for the member.\n */\n name?: string | null;\n /**\n * The new role for the member.\n */\n role?: MemberRole | null;\n}\n/**\n * CustomerPortalOAuthAccount\n */\nexport interface CustomerPortalOAuthAccount {\n /**\n * account_id\n */\n account_id: string;\n /**\n * account_username\n */\n account_username: string | null;\n}\n/**\n * CustomerPortalSubscriptionSettings\n */\nexport interface CustomerPortalSubscriptionSettings {\n /**\n * update_seats\n */\n update_seats: boolean;\n /**\n * update_plan\n */\n update_plan: boolean;\n /**\n * pause\n */\n pause?: boolean;\n}\n/**\n * CustomerPortalUsageSettings\n */\nexport interface CustomerPortalUsageSettings {\n /**\n * show\n */\n show: boolean;\n}\n/**\n * Schema of a product for customer portal.\n */\nexport interface CustomerProduct {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description: string | null;\n /**\n * visibility\n */\n visibility: ProductVisibility;\n /**\n * The recurring interval of the product. If `None`, the product is a one-time purchase.\n */\n recurring_interval: RecurringInterval | null;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.\n */\n recurring_interval_count: number | null;\n /**\n * The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval.\n */\n meter_interval: RecurringInterval | null;\n /**\n * Number of meter interval units. None when no meter cycle is set.\n */\n meter_interval_count: number | null;\n /**\n * Whether the product is a subscription.\n */\n is_recurring: boolean;\n /**\n * Whether the product is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the organization owning the product.\n */\n organization_id: string;\n /**\n * List of available prices for this product.\n */\n prices: (LegacyRecurringProductPrice | ProductPrice)[];\n /**\n * List of benefits granted by the product.\n */\n benefits: BenefitPublic[];\n /**\n * The medias associated to the product.\n */\n medias: ProductMediaFileRead[];\n}\n/**\n * CustomerSeat\n */\nexport interface CustomerSeat {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The seat ID\n */\n id: string;\n /**\n * The subscription ID (for recurring seats)\n */\n subscription_id: string | null;\n /**\n * The order ID (for one-time purchase seats)\n */\n order_id: string | null;\n /**\n * status\n */\n status: SeatStatus;\n /**\n * The customer ID. When member_model_enabled is true, this is the billing customer (purchaser). When false, this is the seat member customer.\n */\n customer_id: string | null;\n /**\n * The member ID of the seat occupant\n */\n member_id: string | null;\n /**\n * The member associated with this seat\n */\n member: Member | null;\n /**\n * Email of the seat member (set when member_model_enabled is true)\n */\n email: string | null;\n /**\n * The assigned customer email\n */\n customer_email: string | null;\n /**\n * When the invitation token expires\n */\n invitation_token_expires_at: string | null;\n /**\n * When the seat was claimed\n */\n claimed_at: string | null;\n /**\n * When the seat was revoked\n */\n revoked_at: string | null;\n /**\n * Additional metadata for the seat\n */\n seat_metadata: Record<string, unknown> | null;\n}\n/**\n * CustomerSeatAssign\n */\nexport interface CustomerSeatAssign {\n /**\n * Subscription ID. Required if neither order_id nor checkout_id is provided.\n */\n subscription_id?: string | null;\n /**\n * Order ID for one-time purchases. Required if subscription_id is not provided.\n */\n order_id?: string | null;\n /**\n * Email of the customer to assign the seat to\n */\n email?: string | null;\n /**\n * External customer ID for the seat assignment\n */\n external_customer_id?: string | null;\n /**\n * Customer ID for the seat assignment\n */\n customer_id?: string | null;\n /**\n * External member ID for the seat assignment. Can be used alone (lookup existing member) or with email (create/validate member).\n */\n external_member_id?: string | null;\n /**\n * Member ID for the seat assignment.\n */\n member_id?: string | null;\n /**\n * Additional metadata for the seat (max 10 keys, 1KB total)\n */\n metadata?: Record<string, unknown> | null;\n /**\n * If true, the seat will be immediately claimed without sending an invitation email. API-only feature.\n */\n immediate_claim?: boolean;\n /**\n * Checkout ID. Resolves to the subscription or order produced by the checkout.\n */\n checkout_id?: string | null;\n}\n/**\n * Response after successfully claiming a seat.\n */\nexport interface CustomerSeatClaimResponse {\n /**\n * seat\n */\n seat: CustomerSeat;\n /**\n * Session token for immediate customer portal access\n */\n customer_session_token: string;\n}\n/**\n * A customer session that can be used to authenticate as a customer.\n */\nexport interface CustomerSession {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * token\n */\n token: string;\n /**\n * expires_at\n */\n expires_at: string;\n /**\n * return_url\n */\n return_url: string | null;\n /**\n * customer_portal_url\n */\n customer_portal_url: string;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * customer\n */\n customer: Customer;\n}\n/**\n * Schema for creating a customer session using an external customer ID.\n */\nexport interface CustomerSessionCustomerExternalIDCreate {\n /**\n * ID of the member to create a session for. When not provided and the organization has `member_model_enabled`, the owner member of the customer will be used for individual customers.\n */\n member_id?: string | null;\n /**\n * External ID of the member to create a session for. Alternative to `member_id`.\n */\n external_member_id?: string | null;\n /**\n * When set, a back button will be shown in the customer portal to return to this URL.\n */\n return_url?: string | null;\n /**\n * External ID of the customer to create a session for.\n */\n external_customer_id: string;\n}\n/**\n * Schema for creating a customer session using a customer ID.\n */\nexport interface CustomerSessionCustomerIDCreate {\n /**\n * ID of the member to create a session for. When not provided and the organization has `member_model_enabled`, the owner member of the customer will be used for individual customers.\n */\n member_id?: string | null;\n /**\n * External ID of the member to create a session for. Alternative to `member_id`.\n */\n external_member_id?: string | null;\n /**\n * When set, a back button will be shown in the customer portal to return to this URL.\n */\n return_url?: string | null;\n /**\n * ID of the customer to create a session for.\n */\n customer_id: string;\n}\n/**\n * An active benefit grant for a customer.\n */\nexport interface CustomerStateBenefitGrant {\n /**\n * The ID of the grant.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The timestamp when the benefit was granted.\n */\n granted_at: string;\n /**\n * The ID of the benefit concerned by this grant.\n */\n benefit_id: string;\n /**\n * benefit_type\n */\n benefit_type: BenefitType;\n /**\n * benefit_metadata\n */\n benefit_metadata: MetadataOutputType;\n /**\n * properties\n */\n properties:\n | BenefitGrantDiscordProperties\n | BenefitGrantGitHubRepositoryProperties\n | BenefitGrantDownloadablesProperties\n | BenefitGrantLicenseKeysProperties\n | BenefitGrantCustomProperties\n | BenefitGrantFeatureFlagProperties\n | BenefitGrantSlackSharedChannelProperties;\n}\n/**\n * A customer along with additional state information:\n\n* Active subscriptions\n* Granted benefits\n* Active meters\n */\nexport interface CustomerStateIndividual {\n /**\n * The ID of the customer.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email: string;\n /**\n * Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.\n */\n email_verified: boolean;\n /**\n * The type of customer.\n */\n type: \"individual\";\n /**\n * The name of the customer.\n */\n name: string | null;\n /**\n * The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * tax_id\n */\n tax_id: unknown[] | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer.\n */\n organization_id: string;\n /**\n * The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details.\n */\n default_payment_method_id?: string | null;\n /**\n * Timestamp for when the customer was soft deleted.\n */\n deleted_at: string | null;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n /**\n * The customer's active subscriptions.\n */\n active_subscriptions: CustomerStateSubscription[];\n /**\n * The customer's active benefit grants.\n */\n granted_benefits: CustomerStateBenefitGrant[];\n /**\n * The customer's active meters.\n */\n active_meters: CustomerStateMeter[];\n}\n/**\n * An active meter for a customer, with latest consumed and credited units.\n */\nexport interface CustomerStateMeter {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the meter.\n */\n meter_id: string;\n /**\n * The number of consumed units.\n */\n consumed_units: number;\n /**\n * The number of credited units.\n */\n credited_units: number;\n /**\n * The balance of the meter, i.e. the difference between credited and consumed units.\n */\n balance: number;\n}\n/**\n * An active customer subscription.\n */\nexport interface CustomerStateSubscription {\n /**\n * The ID of the subscription.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * status\n */\n status: Status;\n /**\n * The amount of the subscription.\n */\n amount: number;\n /**\n * The currency of the subscription.\n */\n currency: string;\n /**\n * recurring_interval\n */\n recurring_interval: RecurringInterval;\n /**\n * The start timestamp of the current billing period.\n */\n current_period_start: string;\n /**\n * The end timestamp of the current billing period.\n */\n current_period_end: string;\n /**\n * The start timestamp of the trial period, if any.\n */\n trial_start: string | null;\n /**\n * The end timestamp of the trial period, if any.\n */\n trial_end: string | null;\n /**\n * Whether the subscription will be canceled at the end of the current period.\n */\n cancel_at_period_end: boolean;\n /**\n * The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.\n */\n canceled_at: string | null;\n /**\n * The timestamp when the subscription started.\n */\n started_at: string | null;\n /**\n * The timestamp when the subscription will end.\n */\n ends_at: string | null;\n /**\n * The ID of the subscribed product.\n */\n product_id: string;\n /**\n * The ID of the applied discount, if any.\n */\n discount_id: string | null;\n /**\n * List of meters associated with the subscription.\n */\n meters: CustomerStateSubscriptionMeter[];\n}\n/**\n * Current consumption and spending for a subscription meter.\n */\nexport interface CustomerStateSubscriptionMeter {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The number of consumed units so far in this billing period.\n */\n consumed_units: number;\n /**\n * The number of credited units so far in this billing period.\n */\n credited_units: number;\n /**\n * The amount due in cents so far in this billing period.\n */\n amount: number;\n /**\n * The ID of the meter.\n */\n meter_id: string;\n}\n/**\n * A team customer along with additional state information:\n\n* Active subscriptions\n* Granted benefits\n* Active meters\n */\nexport interface CustomerStateTeam {\n /**\n * The ID of the customer.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email?: string | null;\n /**\n * Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.\n */\n email_verified: boolean;\n /**\n * The type of customer. Team customers can have multiple members.\n */\n type: \"team\";\n /**\n * The name of the customer.\n */\n name: string | null;\n /**\n * The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * tax_id\n */\n tax_id: unknown[] | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer.\n */\n organization_id: string;\n /**\n * The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details.\n */\n default_payment_method_id?: string | null;\n /**\n * Timestamp for when the customer was soft deleted.\n */\n deleted_at: string | null;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n /**\n * The customer's active subscriptions.\n */\n active_subscriptions: CustomerStateSubscription[];\n /**\n * The customer's active benefit grants.\n */\n granted_benefits: CustomerStateBenefitGrant[];\n /**\n * The customer's active meters.\n */\n active_meters: CustomerStateMeter[];\n}\n/**\n * CustomerSubscription\n */\nexport interface CustomerSubscription {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The amount of the subscription.\n */\n amount: number;\n /**\n * The currency of the subscription.\n */\n currency: string;\n /**\n * recurring_interval\n */\n recurring_interval: RecurringInterval;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.\n */\n recurring_interval_count: number;\n /**\n * status\n */\n status: SubscriptionStatus;\n /**\n * The start timestamp of the current billing period.\n */\n current_period_start: string;\n /**\n * The end timestamp of the current billing period.\n */\n current_period_end: string;\n /**\n * The start timestamp of the current meter period, if the product has a meter cycle set. Metered credits are granted and overage is settled on this cadence.\n */\n current_meter_period_start: string | null;\n /**\n * The end timestamp of the current meter period, if the product has a meter cycle set. This is when credits next renew.\n */\n current_meter_period_end: string | null;\n /**\n * The start timestamp of the trial period, if any.\n */\n trial_start: string | null;\n /**\n * The end timestamp of the trial period, if any.\n */\n trial_end: string | null;\n /**\n * Whether the subscription will be canceled at the end of the current period.\n */\n cancel_at_period_end: boolean;\n /**\n * The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.\n */\n canceled_at: string | null;\n /**\n * The timestamp when the subscription started.\n */\n started_at: string | null;\n /**\n * The timestamp when the subscription will end.\n */\n ends_at: string | null;\n /**\n * The timestamp when the subscription ended.\n */\n ended_at: string | null;\n /**\n * The timestamp when the subscription entered `past_due` status.\n */\n past_due_at?: string | null;\n /**\n * Whether the subscription will be paused at the end of the current period.\n */\n pause_at_period_end: boolean;\n /**\n * The timestamp when the subscription was paused.\n */\n paused_at: string | null;\n /**\n * The timestamp when a paused subscription is scheduled to automatically resume, if set.\n */\n resumes_at: string | null;\n /**\n * The ID of the subscribed customer.\n */\n customer_id: string;\n /**\n * The ID of the subscribed product.\n */\n product_id: string;\n /**\n * The ID of the applied discount, if any.\n */\n discount_id: string | null;\n /**\n * checkout_id\n */\n checkout_id: string | null;\n /**\n * The number of seats for seat-based subscriptions. None for non-seat subscriptions.\n */\n seats?: number | null;\n /**\n * customer_cancellation_reason\n */\n customer_cancellation_reason: CustomerCancellationReason | null;\n /**\n * customer_cancellation_comment\n */\n customer_cancellation_comment: string | null;\n /**\n * product\n */\n product: CustomerSubscriptionProduct;\n /**\n * List of enabled prices for the subscription.\n */\n prices: (LegacyRecurringProductPrice | ProductPrice)[];\n /**\n * List of meters associated with the subscription.\n */\n meters: CustomerSubscriptionMeter[];\n /**\n * Pending subscription update that will be applied at the beginning of the next period. If `null`, there is no pending update.\n */\n pending_update: PendingSubscriptionUpdate | null;\n}\n/**\n * CustomerSubscriptionCancel\n */\nexport interface CustomerSubscriptionCancel {\n /**\n * Cancel an active subscription once the current period ends.\n\nOr uncancel a subscription currently set to be revoked at period end.\n */\n cancel_at_period_end?: boolean | null;\n /**\n * Customers reason for cancellation.\n\n* `too_expensive`: Too expensive for the customer.\n* `missing_features`: Customer is missing certain features.\n* `switched_service`: Customer switched to another service.\n* `unused`: Customer is not using it enough.\n* `customer_service`: Customer is not satisfied with the customer service.\n* `low_quality`: Customer is unhappy with the quality.\n* `too_complex`: Customer considers the service too complicated.\n* `other`: Other reason(s).\n */\n cancellation_reason?: CustomerCancellationReason | null;\n /**\n * Customer feedback and why they decided to cancel.\n */\n cancellation_comment?: string | null;\n}\n/**\n * CustomerSubscriptionMeter\n */\nexport interface CustomerSubscriptionMeter {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The number of consumed units so far in this billing period.\n */\n consumed_units: number;\n /**\n * The number of credited units so far in this billing period.\n */\n credited_units: number;\n /**\n * The amount due in cents so far in this billing period.\n */\n amount: number;\n /**\n * The ID of the meter.\n */\n meter_id: string;\n /**\n * meter\n */\n meter: CustomerSubscriptionMeterMeter;\n}\n/**\n * CustomerSubscriptionMeterMeter\n */\nexport interface CustomerSubscriptionMeterMeter {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The name of the meter. Will be shown on customer's invoices and usage.\n */\n name: string;\n}\n/**\n * CustomerSubscriptionPause\n */\nexport interface CustomerSubscriptionPause {\n /**\n * Pause an active subscription at the end of the current period.\n\nOr cancel a scheduled pause on a subscription set to be paused at\nperiod end.\n */\n pause_at_period_end: boolean;\n /**\n * Date at which the paused subscription should automatically resume. If not set, it stays paused until resumed. Must be after the current period end.\n */\n resumes_at?: string | null;\n}\n/**\n * CustomerSubscriptionProduct\n */\nexport interface CustomerSubscriptionProduct {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description: string | null;\n /**\n * visibility\n */\n visibility: ProductVisibility;\n /**\n * The recurring interval of the product. If `None`, the product is a one-time purchase.\n */\n recurring_interval: RecurringInterval | null;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.\n */\n recurring_interval_count: number | null;\n /**\n * The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval.\n */\n meter_interval: RecurringInterval | null;\n /**\n * Number of meter interval units. None when no meter cycle is set.\n */\n meter_interval_count: number | null;\n /**\n * Whether the product is a subscription.\n */\n is_recurring: boolean;\n /**\n * Whether the product is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the organization owning the product.\n */\n organization_id: string;\n /**\n * List of prices for this product.\n */\n prices: (LegacyRecurringProductPrice | ProductPrice)[];\n /**\n * List of benefits granted by the product.\n */\n benefits: BenefitPublic[];\n /**\n * List of medias associated to the product.\n */\n medias: ProductMediaFileRead[];\n /**\n * organization\n */\n organization: CustomerOrganization;\n}\n/**\n * CustomerSubscriptionResume\n */\nexport interface CustomerSubscriptionResume {\n /**\n * Resume a paused subscription immediately, starting a new billing period and charging the customer.\n */\n resume: true;\n}\n/**\n * CustomerSubscriptionUpdateClear\n */\nexport interface CustomerSubscriptionUpdateClear {\n /**\n * Clear the pending subscription update.\n */\n pending_update: null;\n}\n/**\n * CustomerSubscriptionUpdateProduct\n */\nexport interface CustomerSubscriptionUpdateProduct {\n /**\n * Update subscription to another product.\n */\n product_id: string;\n}\n/**\n * CustomerSubscriptionUpdateSeats\n */\nexport interface CustomerSubscriptionUpdateSeats {\n /**\n * Update the number of seats for this subscription.\n */\n seats: number;\n}\n/**\n * A team customer in an organization.\n */\nexport interface CustomerTeam {\n /**\n * The ID of the customer.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email?: string | null;\n /**\n * Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.\n */\n email_verified: boolean;\n /**\n * The type of customer. Team customers can have multiple members.\n */\n type: \"team\";\n /**\n * The name of the customer.\n */\n name: string | null;\n /**\n * The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * tax_id\n */\n tax_id: unknown[] | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer.\n */\n organization_id: string;\n /**\n * The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details.\n */\n default_payment_method_id?: string | null;\n /**\n * Timestamp for when the customer was soft deleted.\n */\n deleted_at: string | null;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n}\n/**\n * CustomerTeamCreate\n */\nexport interface CustomerTeamCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * name\n */\n name?: string | null;\n /**\n * billing_address\n */\n billing_address?: AddressInput | null;\n /**\n * tax_id\n */\n tax_id?: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * Optional owner member to create with the customer. If not provided, an owner member will be automatically created using the customer's email and name.\n */\n owner?: MemberOwnerCreate | null;\n /**\n * type\n */\n type: \"team\";\n /**\n * The email address of the team customer. Optional for team customers — if omitted, an owner with an email must be provided.\n */\n email?: string | null;\n}\n/**\n * CustomerUpdate\n */\nexport interface CustomerUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email?: string | null;\n /**\n * name\n */\n name?: string | null;\n /**\n * billing_address\n */\n billing_address?: AddressInput | null;\n /**\n * tax_id\n */\n tax_id?: string | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * The customer type. Can only be upgraded from 'individual' to 'team', never downgraded.\n */\n type?: CustomerType | null;\n}\n/**\n * CustomerUpdateExternalID\n */\nexport interface CustomerUpdateExternalID {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email?: string | null;\n /**\n * name\n */\n name?: string | null;\n /**\n * billing_address\n */\n billing_address?: AddressInput | null;\n /**\n * tax_id\n */\n tax_id?: string | null;\n /**\n * locale\n */\n locale?: string | null;\n}\n/**\n * An event created by Polar when a customer is updated.\n */\nexport interface CustomerUpdatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"customer.updated\";\n /**\n * metadata\n */\n metadata: CustomerUpdatedMetadata;\n}\n/**\n * CustomerUpdatedFields\n */\nexport interface CustomerUpdatedFields {\n /**\n * name\n */\n name?: string | null;\n /**\n * billing_name\n */\n billing_name?: string | null;\n /**\n * email\n */\n email?: string | null;\n /**\n * billing_address\n */\n billing_address?: AddressDict | null;\n /**\n * tax_id\n */\n tax_id?: string | null;\n /**\n * metadata\n */\n metadata?: Record<string, string | number | boolean> | null;\n}\n/**\n * CustomerUpdatedMetadata\n */\nexport interface CustomerUpdatedMetadata {\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * customer_email\n */\n customer_email: string | null;\n /**\n * customer_name\n */\n customer_name: string | null;\n /**\n * customer_external_id\n */\n customer_external_id: string | null;\n /**\n * updated_fields\n */\n updated_fields: CustomerUpdatedFields;\n}\n/**\n * A wallet represents your balance with an organization.\n\nYou can top-up your wallet and use the balance to pay for usage.\n */\nexport interface CustomerWallet {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the customer that owns the wallet.\n */\n customer_id: string;\n /**\n * The current balance of the wallet, in cents.\n */\n balance: number;\n /**\n * The currency of the wallet.\n */\n currency: string;\n}\n/**\n * Schema to create a fixed amount discount.\n */\nexport interface DiscountFixedCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API.\n */\n code?: string | null;\n /**\n * Optional timestamp after which the discount is redeemable.\n */\n starts_at?: string | null;\n /**\n * Optional timestamp after which the discount is no longer redeemable.\n */\n ends_at?: string | null;\n /**\n * Optional maximum number of times the discount can be redeemed.\n */\n max_redemptions?: number | null;\n /**\n * products\n */\n products?: string[] | null;\n /**\n * The ID of the organization owning the discount. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * type\n */\n type?: \"fixed\";\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * Number of months the discount should be applied.\n\nRequired when `duration` is `repeating`. Must be omitted otherwise.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24.\n */\n duration_in_months?: number | null;\n /**\n * amount\n */\n amount?: number | null;\n /**\n * currency\n */\n currency?: PresentmentCurrency | null;\n /**\n * amounts\n */\n amounts?: Record<string, number> | null;\n}\n/**\n * Schema for a fixed amount discount that is applied once or forever.\n */\nexport interface DiscountFixedOnceForeverDuration {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * type\n */\n type: DiscountType;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * Map of currency to fixed amount to discount from the total.\n */\n amounts: Record<string, number>;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout.\n */\n code: string | null;\n /**\n * Timestamp after which the discount is redeemable.\n */\n starts_at: string | null;\n /**\n * Timestamp after which the discount is no longer redeemable.\n */\n ends_at: string | null;\n /**\n * Maximum number of times the discount can be redeemed.\n */\n max_redemptions: number | null;\n /**\n * Number of times the discount has been redeemed.\n */\n redemptions_count: number;\n /**\n * The organization ID.\n */\n organization_id: string;\n /**\n * products\n */\n products: DiscountProduct[];\n}\n/**\n * DiscountFixedOnceForeverDurationBase\n */\nexport interface DiscountFixedOnceForeverDurationBase {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * type\n */\n type: DiscountType;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * Map of currency to fixed amount to discount from the total.\n */\n amounts: Record<string, number>;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout.\n */\n code: string | null;\n /**\n * Timestamp after which the discount is redeemable.\n */\n starts_at: string | null;\n /**\n * Timestamp after which the discount is no longer redeemable.\n */\n ends_at: string | null;\n /**\n * Maximum number of times the discount can be redeemed.\n */\n max_redemptions: number | null;\n /**\n * Number of times the discount has been redeemed.\n */\n redemptions_count: number;\n /**\n * The organization ID.\n */\n organization_id: string;\n}\n/**\n * Schema for a fixed amount discount that is applied on every invoice\nfor a certain number of months.\n */\nexport interface DiscountFixedRepeatDuration {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * duration_in_months\n */\n duration_in_months: number;\n /**\n * type\n */\n type: DiscountType;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * Map of currency to fixed amount to discount from the total.\n */\n amounts: Record<string, number>;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout.\n */\n code: string | null;\n /**\n * Timestamp after which the discount is redeemable.\n */\n starts_at: string | null;\n /**\n * Timestamp after which the discount is no longer redeemable.\n */\n ends_at: string | null;\n /**\n * Maximum number of times the discount can be redeemed.\n */\n max_redemptions: number | null;\n /**\n * Number of times the discount has been redeemed.\n */\n redemptions_count: number;\n /**\n * The organization ID.\n */\n organization_id: string;\n /**\n * products\n */\n products: DiscountProduct[];\n}\n/**\n * DiscountFixedRepeatDurationBase\n */\nexport interface DiscountFixedRepeatDurationBase {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * duration_in_months\n */\n duration_in_months: number;\n /**\n * type\n */\n type: DiscountType;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * Map of currency to fixed amount to discount from the total.\n */\n amounts: Record<string, number>;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout.\n */\n code: string | null;\n /**\n * Timestamp after which the discount is redeemable.\n */\n starts_at: string | null;\n /**\n * Timestamp after which the discount is no longer redeemable.\n */\n ends_at: string | null;\n /**\n * Maximum number of times the discount can be redeemed.\n */\n max_redemptions: number | null;\n /**\n * Number of times the discount has been redeemed.\n */\n redemptions_count: number;\n /**\n * The organization ID.\n */\n organization_id: string;\n}\n/**\n * Schema to create a percentage discount.\n */\nexport interface DiscountPercentageCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API.\n */\n code?: string | null;\n /**\n * Optional timestamp after which the discount is redeemable.\n */\n starts_at?: string | null;\n /**\n * Optional timestamp after which the discount is no longer redeemable.\n */\n ends_at?: string | null;\n /**\n * Optional maximum number of times the discount can be redeemed.\n */\n max_redemptions?: number | null;\n /**\n * products\n */\n products?: string[] | null;\n /**\n * The ID of the organization owning the discount. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * type\n */\n type?: \"percentage\";\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * Number of months the discount should be applied.\n\nRequired when `duration` is `repeating`. Must be omitted otherwise.\n\nFor this to work on yearly pricing, you should multiply this by 12.\nFor example, to apply the discount for 2 years, set this to 24.\n */\n duration_in_months?: number | null;\n /**\n * Discount percentage in basis points.\n\nA basis point is 1/100th of a percent.\nFor example, to create a 25.5% discount, set this to 2550.\n */\n basis_points: number;\n}\n/**\n * Schema for a percentage discount that is applied once or forever.\n */\nexport interface DiscountPercentageOnceForeverDuration {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * type\n */\n type: DiscountType;\n /**\n * Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.\n */\n basis_points: number;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout.\n */\n code: string | null;\n /**\n * Timestamp after which the discount is redeemable.\n */\n starts_at: string | null;\n /**\n * Timestamp after which the discount is no longer redeemable.\n */\n ends_at: string | null;\n /**\n * Maximum number of times the discount can be redeemed.\n */\n max_redemptions: number | null;\n /**\n * Number of times the discount has been redeemed.\n */\n redemptions_count: number;\n /**\n * The organization ID.\n */\n organization_id: string;\n /**\n * products\n */\n products: DiscountProduct[];\n}\n/**\n * DiscountPercentageOnceForeverDurationBase\n */\nexport interface DiscountPercentageOnceForeverDurationBase {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * type\n */\n type: DiscountType;\n /**\n * Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.\n */\n basis_points: number;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout.\n */\n code: string | null;\n /**\n * Timestamp after which the discount is redeemable.\n */\n starts_at: string | null;\n /**\n * Timestamp after which the discount is no longer redeemable.\n */\n ends_at: string | null;\n /**\n * Maximum number of times the discount can be redeemed.\n */\n max_redemptions: number | null;\n /**\n * Number of times the discount has been redeemed.\n */\n redemptions_count: number;\n /**\n * The organization ID.\n */\n organization_id: string;\n}\n/**\n * Schema for a percentage discount that is applied on every invoice\nfor a certain number of months.\n */\nexport interface DiscountPercentageRepeatDuration {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * duration_in_months\n */\n duration_in_months: number;\n /**\n * type\n */\n type: DiscountType;\n /**\n * Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.\n */\n basis_points: number;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout.\n */\n code: string | null;\n /**\n * Timestamp after which the discount is redeemable.\n */\n starts_at: string | null;\n /**\n * Timestamp after which the discount is no longer redeemable.\n */\n ends_at: string | null;\n /**\n * Maximum number of times the discount can be redeemed.\n */\n max_redemptions: number | null;\n /**\n * Number of times the discount has been redeemed.\n */\n redemptions_count: number;\n /**\n * The organization ID.\n */\n organization_id: string;\n /**\n * products\n */\n products: DiscountProduct[];\n}\n/**\n * DiscountPercentageRepeatDurationBase\n */\nexport interface DiscountPercentageRepeatDurationBase {\n /**\n * duration\n */\n duration: DiscountDuration;\n /**\n * duration_in_months\n */\n duration_in_months: number;\n /**\n * type\n */\n type: DiscountType;\n /**\n * Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.\n */\n basis_points: number;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Name of the discount. Will be displayed to the customer when the discount is applied.\n */\n name: string;\n /**\n * Code customers can use to apply the discount during checkout.\n */\n code: string | null;\n /**\n * Timestamp after which the discount is redeemable.\n */\n starts_at: string | null;\n /**\n * Timestamp after which the discount is no longer redeemable.\n */\n ends_at: string | null;\n /**\n * Maximum number of times the discount can be redeemed.\n */\n max_redemptions: number | null;\n /**\n * Number of times the discount has been redeemed.\n */\n redemptions_count: number;\n /**\n * The organization ID.\n */\n organization_id: string;\n}\n/**\n * A product that a discount can be applied to.\n */\nexport interface DiscountProduct {\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description: string | null;\n /**\n * visibility\n */\n visibility: ProductVisibility;\n /**\n * The recurring interval of the product. If `None`, the product is a one-time purchase.\n */\n recurring_interval: RecurringInterval | null;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.\n */\n recurring_interval_count: number | null;\n /**\n * The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval.\n */\n meter_interval: RecurringInterval | null;\n /**\n * Number of meter interval units. None when no meter cycle is set.\n */\n meter_interval_count: number | null;\n /**\n * Whether the product is a subscription.\n */\n is_recurring: boolean;\n /**\n * Whether the product is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the organization owning the product.\n */\n organization_id: string;\n}\n/**\n * Schema to update a discount.\n */\nexport interface DiscountUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * name\n */\n name?: string | null;\n /**\n * Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API.\n */\n code?: string | null;\n /**\n * Optional timestamp after which the discount is redeemable.\n */\n starts_at?: string | null;\n /**\n * Optional timestamp after which the discount is no longer redeemable.\n */\n ends_at?: string | null;\n /**\n * Optional maximum number of times the discount can be redeemed.\n */\n max_redemptions?: number | null;\n /**\n * duration\n */\n duration?: DiscountDuration | null;\n /**\n * duration_in_months\n */\n duration_in_months?: number | null;\n /**\n * type\n */\n type?: DiscountType | null;\n /**\n * amount\n */\n amount?: number | null;\n /**\n * currency\n */\n currency?: PresentmentCurrency | null;\n /**\n * amounts\n */\n amounts?: Record<string, number> | null;\n /**\n * basis_points\n */\n basis_points?: number | null;\n /**\n * products\n */\n products?: string[] | null;\n}\n/**\n * Schema representing a dispute.\n\nA dispute is a challenge raised by a customer or their bank regarding a payment.\n */\nexport interface Dispute {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * status\n */\n status: DisputeStatus;\n /**\n * Whether the dispute has been resolved (won or lost).\n */\n resolved: boolean;\n /**\n * Whether the dispute is closed (prevented, won, or lost).\n */\n closed: boolean;\n /**\n * Amount in cents disputed.\n */\n amount: number;\n /**\n * Tax amount in cents disputed.\n */\n tax_amount: number;\n /**\n * Currency code of the dispute.\n */\n currency: string;\n /**\n * The reason for the dispute as reported by the card network (e.g. `fraudulent`, `product_not_received`). `None` until the processor reports it.\n */\n reason: string | null;\n /**\n * Deadline to submit evidence in response to the dispute. `None` when no response is required.\n */\n evidence_due_by: string | null;\n /**\n * Whether the evidence submission deadline has passed.\n */\n past_due: boolean;\n /**\n * The ID of the order associated with the dispute.\n */\n order_id: string;\n /**\n * The ID of the payment associated with the dispute.\n */\n payment_id: string;\n /**\n * customer\n */\n customer: DisputeCustomer;\n /**\n * The ID of the support case for this dispute, if one was opened.\n */\n case_id: string | null;\n}\n/**\n * DisputeCustomer\n */\nexport interface DisputeCustomer {\n /**\n * The ID of the customer.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email?: string | null;\n /**\n * Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.\n */\n email_verified: boolean;\n /**\n * type\n */\n type: CustomerType;\n /**\n * The name of the customer.\n */\n name: string | null;\n /**\n * The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * tax_id\n */\n tax_id: unknown[] | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer.\n */\n organization_id: string;\n /**\n * The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details.\n */\n default_payment_method_id?: string | null;\n /**\n * Timestamp for when the customer was soft deleted.\n */\n deleted_at: string | null;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n}\n/**\n * DisputeNotOpenError\n */\nexport interface DisputeNotOpenError {\n /**\n * error\n */\n error: \"DisputeNotOpenError\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * Schema to create a file to be associated with the downloadables benefit.\n */\nexport interface DownloadableFileCreate {\n /**\n * organization_id\n */\n organization_id?: string | null;\n /**\n * name\n */\n name: string;\n /**\n * mime_type\n */\n mime_type: string;\n /**\n * size\n */\n size: number;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64?: string | null;\n /**\n * upload\n */\n upload: S3FileCreateMultipart;\n /**\n * service\n */\n service: \"downloadable\";\n /**\n * version\n */\n version?: string | null;\n}\n/**\n * File to be associated with the downloadables benefit.\n */\nexport interface DownloadableFileRead {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * name\n */\n name: string;\n /**\n * path\n */\n path: string;\n /**\n * mime_type\n */\n mime_type: string;\n /**\n * size\n */\n size: number;\n /**\n * storage_version\n */\n storage_version: string | null;\n /**\n * checksum_etag\n */\n checksum_etag: string | null;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64: string | null;\n /**\n * checksum_sha256_hex\n */\n checksum_sha256_hex: string | null;\n /**\n * last_modified_at\n */\n last_modified_at: string | null;\n /**\n * version\n */\n version: string | null;\n /**\n * service\n */\n service: \"downloadable\";\n /**\n * is_uploaded\n */\n is_uploaded: boolean;\n /**\n * created_at\n */\n created_at: string;\n /**\n * size_readable\n */\n size_readable: string;\n}\n/**\n * DownloadableRead\n */\nexport interface DownloadableRead {\n /**\n * id\n */\n id: string;\n /**\n * benefit_id\n */\n benefit_id: string;\n /**\n * file\n */\n file: FileDownload;\n}\n/**\n * EventCreateCustomer\n */\nexport interface EventCreateCustomer {\n /**\n * The timestamp of the event.\n */\n timestamp?: string;\n /**\n * The name of the event.\n */\n name: string;\n /**\n * The ID of the organization owning the event. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * Your unique identifier for this event. Useful for deduplication and parent-child relationships.\n */\n external_id?: string | null;\n /**\n * The ID of the parent event. Can be either a Polar event ID (UUID) or an external event ID.\n */\n parent_id?: string | null;\n /**\n * metadata\n */\n metadata?: EventMetadataInput;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string;\n /**\n * ID of the member within the customer's organization who performed the action. Used for member-level attribution in B2B.\n */\n member_id?: string | null;\n}\n/**\n * EventCreateExternalCustomer\n */\nexport interface EventCreateExternalCustomer {\n /**\n * The timestamp of the event.\n */\n timestamp?: string;\n /**\n * The name of the event.\n */\n name: string;\n /**\n * The ID of the organization owning the event. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * Your unique identifier for this event. Useful for deduplication and parent-child relationships.\n */\n external_id?: string | null;\n /**\n * The ID of the parent event. Can be either a Polar event ID (UUID) or an external event ID.\n */\n parent_id?: string | null;\n /**\n * metadata\n */\n metadata?: EventMetadataInput;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string;\n /**\n * ID of the member in your system within the customer's organization who performed the action. Used for member-level attribution in B2B.\n */\n external_member_id?: string | null;\n}\n/**\n * EventMetadataInput\n */\nexport interface EventMetadataInput {\n /**\n * _cost\n */\n _cost?: CostMetadataInput;\n /**\n * _llm\n */\n _llm?: LLMMetadata;\n}\n/**\n * EventMetadataOutput\n */\nexport interface EventMetadataOutput {\n /**\n * _cost\n */\n _cost?: CostMetadataOutput;\n /**\n * _llm\n */\n _llm?: LLMMetadata;\n}\n/**\n * EventName\n */\nexport interface EventName {\n /**\n * The name of the event.\n */\n name: string;\n /**\n * Human readable label of the event.\n */\n label: string;\n /**\n * source\n */\n source: EventSource;\n /**\n * Number of times the event has occurred.\n */\n occurrences: number;\n /**\n * The first time the event occurred.\n */\n first_seen: string;\n /**\n * The last time the event occurred.\n */\n last_seen: string;\n}\n/**\n * EventType\n */\nexport interface EventType {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The name of the event type.\n */\n name: string;\n /**\n * The label for the event type.\n */\n label: string;\n /**\n * Property path to extract dynamic label from event metadata.\n */\n label_property_selector?: string | null;\n /**\n * The ID of the organization owning the event type.\n */\n organization_id: string;\n}\n/**\n * EventTypeUpdate\n */\nexport interface EventTypeUpdate {\n /**\n * The label for the event type.\n */\n label: string;\n /**\n * Property path to extract dynamic label from event metadata (e.g., 'subject' or 'metadata.subject').\n */\n label_property_selector?: string | null;\n}\n/**\n * EventTypeWithStats\n */\nexport interface EventTypeWithStats {\n /**\n * The ID of the event type. Null for system event types.\n */\n id?: string | null;\n /**\n * Creation timestamp of the event type. Null for system event types.\n */\n created_at?: string | null;\n /**\n * Last modification timestamp of the event type. Null for system event types.\n */\n modified_at?: string | null;\n /**\n * The name of the event type.\n */\n name: string;\n /**\n * The label for the event type.\n */\n label: string;\n /**\n * Property path to extract dynamic label from event metadata.\n */\n label_property_selector?: string | null;\n /**\n * The ID of the organization owning the event type.\n */\n organization_id: string;\n /**\n * source\n */\n source: EventSource;\n /**\n * Number of times the event has occurred.\n */\n occurrences: number;\n /**\n * The first time the event occurred.\n */\n first_seen: string;\n /**\n * The last time the event occurred.\n */\n last_seen: string;\n}\n/**\n * EventsIngest\n */\nexport interface EventsIngest {\n /**\n * List of events to ingest.\n */\n events: (EventCreateCustomer | EventCreateExternalCustomer)[];\n}\n/**\n * EventsIngestResponse\n */\nexport interface EventsIngestResponse {\n /**\n * Number of events inserted.\n */\n inserted: number;\n /**\n * Number of duplicate events skipped.\n */\n duplicates?: number;\n}\n/**\n * A price that already exists for this product.\n\nUseful when updating a product if you want to keep an existing price.\n */\nexport interface ExistingProductPrice {\n /**\n * id\n */\n id: string;\n}\n/**\n * ExpiredCheckoutError\n */\nexport interface ExpiredCheckoutError {\n /**\n * error\n */\n error: \"ExpiredCheckoutError\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * FileDownload\n */\nexport interface FileDownload {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * name\n */\n name: string;\n /**\n * path\n */\n path: string;\n /**\n * mime_type\n */\n mime_type: string;\n /**\n * size\n */\n size: number;\n /**\n * storage_version\n */\n storage_version: string | null;\n /**\n * checksum_etag\n */\n checksum_etag: string | null;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64: string | null;\n /**\n * checksum_sha256_hex\n */\n checksum_sha256_hex: string | null;\n /**\n * last_modified_at\n */\n last_modified_at: string | null;\n /**\n * download\n */\n download: S3DownloadURL;\n /**\n * version\n */\n version: string | null;\n /**\n * is_uploaded\n */\n is_uploaded: boolean;\n /**\n * service\n */\n service: FileServiceTypes;\n /**\n * size_readable\n */\n size_readable: string;\n}\n/**\n * FilePatch\n */\nexport interface FilePatch {\n /**\n * name\n */\n name?: string | null;\n /**\n * version\n */\n version?: string | null;\n}\n/**\n * FileUpload\n */\nexport interface FileUpload {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * name\n */\n name: string;\n /**\n * path\n */\n path: string;\n /**\n * mime_type\n */\n mime_type: string;\n /**\n * size\n */\n size: number;\n /**\n * storage_version\n */\n storage_version: string | null;\n /**\n * checksum_etag\n */\n checksum_etag: string | null;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64: string | null;\n /**\n * checksum_sha256_hex\n */\n checksum_sha256_hex: string | null;\n /**\n * last_modified_at\n */\n last_modified_at: string | null;\n /**\n * upload\n */\n upload: S3FileUploadMultipart;\n /**\n * version\n */\n version: string | null;\n /**\n * is_uploaded\n */\n is_uploaded?: boolean;\n /**\n * service\n */\n service: FileServiceTypes;\n /**\n * size_readable\n */\n size_readable: string;\n}\n/**\n * FileUploadCompleted\n */\nexport interface FileUploadCompleted {\n /**\n * id\n */\n id: string;\n /**\n * path\n */\n path: string;\n /**\n * parts\n */\n parts: S3FileUploadCompletedPart[];\n}\n/**\n * Filter\n */\nexport interface Filter {\n /**\n * conjunction\n */\n conjunction: FilterConjunction;\n /**\n * clauses\n */\n clauses: (FilterClause | Filter)[];\n}\n/**\n * FilterClause\n */\nexport interface FilterClause {\n /**\n * property\n */\n property: string;\n /**\n * operator\n */\n operator: FilterOperator;\n /**\n * value\n */\n value: string | number | boolean;\n}\n/**\n * Schema of a payment with a generic payment method.\n */\nexport interface GenericPayment {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * processor\n */\n processor: PaymentProcessor;\n /**\n * status\n */\n status: PaymentStatus;\n /**\n * The payment amount in cents.\n */\n amount: number;\n /**\n * The payment currency. Currently, only `usd` is supported.\n */\n currency: string;\n /**\n * The payment method used.\n */\n method: string;\n /**\n * What initiated this payment attempt, e.g. initial purchase, subscription renewal, or an automated dunning retry.\n */\n trigger: PaymentTrigger | null;\n /**\n * Error code, if the payment was declined.\n */\n decline_reason: string | null;\n /**\n * Human-readable error message, if the payment was declined.\n */\n decline_message: string | null;\n /**\n * The ID of the organization that owns the payment.\n */\n organization_id: string;\n /**\n * The ID of the checkout session associated with this payment.\n */\n checkout_id: string | null;\n /**\n * The ID of the order associated with this payment.\n */\n order_id: string | null;\n /**\n * Additional metadata from the payment processor for internal use.\n */\n processor_metadata?: Record<string, unknown>;\n}\n/**\n * HTTPValidationError\n */\nexport interface HTTPValidationError {\n /**\n * detail\n */\n detail?: ValidationError[];\n}\n/**\n * IntrospectTokenResponse\n */\nexport interface IntrospectTokenResponse {\n /**\n * active\n */\n active: boolean;\n /**\n * client_id\n */\n client_id: string;\n /**\n * token_type\n */\n token_type: TokenType;\n /**\n * scope\n */\n scope: string;\n /**\n * sub_type\n */\n sub_type: SubType;\n /**\n * sub\n */\n sub: string;\n /**\n * organizations\n */\n organizations: string[];\n /**\n * aud\n */\n aud: string;\n /**\n * iss\n */\n iss: string;\n /**\n * exp\n */\n exp: number;\n /**\n * iat\n */\n iat: number;\n}\n/**\n * LLMMetadata\n */\nexport interface LLMMetadata {\n /**\n * The vendor of the event.\n */\n vendor: string;\n /**\n * The model used for the event.\n */\n model: string;\n /**\n * The LLM prompt used for the event.\n */\n prompt?: string | null;\n /**\n * The LLM response used for the event.\n */\n response?: string | null;\n /**\n * The number of LLM input tokens used for the event.\n */\n input_tokens: number;\n /**\n * The number of LLM cached tokens that were used for the event.\n */\n cached_input_tokens?: number;\n /**\n * The number of LLM output tokens used for the event.\n */\n output_tokens: number;\n /**\n * The total number of LLM tokens used for the event.\n */\n total_tokens: number;\n}\n/**\n * A pay-what-you-want recurring price for a product, i.e. a subscription.\n\n**Deprecated**: The recurring interval should be set on the product itself.\n */\nexport interface LegacyRecurringProductPriceCustom {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the price.\n */\n id: string;\n /**\n * source\n */\n source: ProductPriceSource;\n /**\n * amount_type\n */\n amount_type: \"custom\";\n /**\n * The currency in which the customer will be charged.\n */\n price_currency: string;\n /**\n * The tax behavior of the price. If null, it defaults to the organization's default tax behavior.\n */\n tax_behavior: TaxBehaviorOption | null;\n /**\n * Whether the price is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the product owning the price.\n */\n product_id: string;\n /**\n * The type of the price.\n */\n type: \"recurring\";\n /**\n * recurring_interval\n */\n recurring_interval: RecurringInterval;\n /**\n * The minimum amount the customer can pay. If 0, the price is 'free or pay what you want'.\n */\n minimum_amount: number;\n /**\n * The maximum amount the customer can pay.\n */\n maximum_amount: number | null;\n /**\n * The initial amount shown to the customer.\n */\n preset_amount: number | null;\n /**\n * legacy\n */\n legacy: true;\n}\n/**\n * A recurring price for a product, i.e. a subscription.\n\n**Deprecated**: The recurring interval should be set on the product itself.\n */\nexport interface LegacyRecurringProductPriceFixed {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the price.\n */\n id: string;\n /**\n * source\n */\n source: ProductPriceSource;\n /**\n * amount_type\n */\n amount_type: \"fixed\";\n /**\n * The currency in which the customer will be charged.\n */\n price_currency: string;\n /**\n * The tax behavior of the price. If null, it defaults to the organization's default tax behavior.\n */\n tax_behavior: TaxBehaviorOption | null;\n /**\n * Whether the price is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the product owning the price.\n */\n product_id: string;\n /**\n * The type of the price.\n */\n type: \"recurring\";\n /**\n * recurring_interval\n */\n recurring_interval: RecurringInterval;\n /**\n * The price in cents.\n */\n price_amount: number;\n /**\n * legacy\n */\n legacy: true;\n}\n/**\n * LicenseKeyActivate\n */\nexport interface LicenseKeyActivate {\n /**\n * key\n */\n key: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * label\n */\n label: string;\n /**\n * Key-value object allowing you to set conditions that must match when validating the license key.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n conditions?: Record<string, string | number | number | boolean>;\n /**\n * Key-value object allowing you to store additional information about the activation\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n meta?: Record<string, string | number | number | boolean>;\n}\n/**\n * LicenseKeyActivationBase\n */\nexport interface LicenseKeyActivationBase {\n /**\n * id\n */\n id: string;\n /**\n * license_key_id\n */\n license_key_id: string;\n /**\n * label\n */\n label: string;\n /**\n * meta\n */\n meta: Record<string, string | number | number | boolean>;\n /**\n * created_at\n */\n created_at: string;\n /**\n * modified_at\n */\n modified_at: string | null;\n}\n/**\n * LicenseKeyActivationRead\n */\nexport interface LicenseKeyActivationRead {\n /**\n * id\n */\n id: string;\n /**\n * license_key_id\n */\n license_key_id: string;\n /**\n * label\n */\n label: string;\n /**\n * meta\n */\n meta: Record<string, string | number | number | boolean>;\n /**\n * created_at\n */\n created_at: string;\n /**\n * modified_at\n */\n modified_at: string | null;\n /**\n * license_key\n */\n license_key: LicenseKeyRead;\n}\n/**\n * LicenseKeyCustomer\n */\nexport interface LicenseKeyCustomer {\n /**\n * The ID of the customer.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email?: string | null;\n /**\n * Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.\n */\n email_verified: boolean;\n /**\n * type\n */\n type: CustomerType;\n /**\n * The name of the customer.\n */\n name: string | null;\n /**\n * The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * tax_id\n */\n tax_id: unknown[] | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer.\n */\n organization_id: string;\n /**\n * The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details.\n */\n default_payment_method_id?: string | null;\n /**\n * Timestamp for when the customer was soft deleted.\n */\n deleted_at: string | null;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n}\n/**\n * LicenseKeyDeactivate\n */\nexport interface LicenseKeyDeactivate {\n /**\n * key\n */\n key: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * activation_id\n */\n activation_id: string;\n}\n/**\n * LicenseKeyRead\n */\nexport interface LicenseKeyRead {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * customer\n */\n customer: LicenseKeyCustomer;\n /**\n * The benefit ID.\n */\n benefit_id: string;\n /**\n * key\n */\n key: string;\n /**\n * display_key\n */\n display_key: string;\n /**\n * status\n */\n status: LicenseKeyStatus;\n /**\n * limit_activations\n */\n limit_activations: number | null;\n /**\n * usage\n */\n usage: number;\n /**\n * limit_usage\n */\n limit_usage: number | null;\n /**\n * validations\n */\n validations: number;\n /**\n * last_validated_at\n */\n last_validated_at: string | null;\n /**\n * expires_at\n */\n expires_at: string | null;\n}\n/**\n * LicenseKeyUpdate\n */\nexport interface LicenseKeyUpdate {\n /**\n * status\n */\n status?: LicenseKeyStatus | null;\n /**\n * usage\n */\n usage?: number;\n /**\n * limit_activations\n */\n limit_activations?: number | null;\n /**\n * limit_usage\n */\n limit_usage?: number | null;\n /**\n * expires_at\n */\n expires_at?: string | null;\n}\n/**\n * LicenseKeyValidate\n */\nexport interface LicenseKeyValidate {\n /**\n * key\n */\n key: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * activation_id\n */\n activation_id?: string | null;\n /**\n * benefit_id\n */\n benefit_id?: string | null;\n /**\n * customer_id\n */\n customer_id?: string | null;\n /**\n * increment_usage\n */\n increment_usage?: number | null;\n /**\n * Key-value object allowing you to set conditions that must match when validating the license key.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n conditions?: Record<string, string | number | number | boolean>;\n}\n/**\n * LicenseKeyWithActivations\n */\nexport interface LicenseKeyWithActivations {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * customer\n */\n customer: LicenseKeyCustomer;\n /**\n * The benefit ID.\n */\n benefit_id: string;\n /**\n * key\n */\n key: string;\n /**\n * display_key\n */\n display_key: string;\n /**\n * status\n */\n status: LicenseKeyStatus;\n /**\n * limit_activations\n */\n limit_activations: number | null;\n /**\n * usage\n */\n usage: number;\n /**\n * limit_usage\n */\n limit_usage: number | null;\n /**\n * validations\n */\n validations: number;\n /**\n * last_validated_at\n */\n last_validated_at: string | null;\n /**\n * expires_at\n */\n expires_at: string | null;\n /**\n * activations\n */\n activations: LicenseKeyActivationBase[];\n}\n/**\n * ListResourceBenefit\n */\nexport interface ListResourceBenefit {\n /**\n * items\n */\n items: Benefit[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceBenefitGrant\n */\nexport interface ListResourceBenefitGrant {\n /**\n * items\n */\n items: BenefitGrant[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCheckout\n */\nexport interface ListResourceCheckout {\n /**\n * items\n */\n items: Checkout[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCheckoutLink\n */\nexport interface ListResourceCheckoutLink {\n /**\n * items\n */\n items: CheckoutLink[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomField\n */\nexport interface ListResourceCustomField {\n /**\n * items\n */\n items: CustomField[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomer\n */\nexport interface ListResourceCustomer {\n /**\n * items\n */\n items: Customer[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomerBenefitGrant\n */\nexport interface ListResourceCustomerBenefitGrant {\n /**\n * items\n */\n items: CustomerBenefitGrant[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomerCustomerMeter\n */\nexport interface ListResourceCustomerCustomerMeter {\n /**\n * items\n */\n items: CustomerCustomerMeter[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomerMeter\n */\nexport interface ListResourceCustomerMeter {\n /**\n * items\n */\n items: CustomerMeter[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomerOrder\n */\nexport interface ListResourceCustomerOrder {\n /**\n * items\n */\n items: CustomerOrder[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomerPaymentMethod\n */\nexport interface ListResourceCustomerPaymentMethod {\n /**\n * items\n */\n items: CustomerPaymentMethod[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomerPortalMember\n */\nexport interface ListResourceCustomerPortalMember {\n /**\n * items\n */\n items: CustomerPortalMember[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomerSubscription\n */\nexport interface ListResourceCustomerSubscription {\n /**\n * items\n */\n items: CustomerSubscription[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceCustomerWallet\n */\nexport interface ListResourceCustomerWallet {\n /**\n * items\n */\n items: CustomerWallet[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceDiscount\n */\nexport interface ListResourceDiscount {\n /**\n * items\n */\n items: Discount[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceDispute\n */\nexport interface ListResourceDispute {\n /**\n * items\n */\n items: Dispute[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceDownloadableRead\n */\nexport interface ListResourceDownloadableRead {\n /**\n * items\n */\n items: DownloadableRead[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceEvent\n */\nexport interface ListResourceEvent {\n /**\n * items\n */\n items: Event[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceEventName\n */\nexport interface ListResourceEventName {\n /**\n * items\n */\n items: EventName[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceEventTypeWithStats\n */\nexport interface ListResourceEventTypeWithStats {\n /**\n * items\n */\n items: EventTypeWithStats[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceFileRead\n */\nexport interface ListResourceFileRead {\n /**\n * items\n */\n items: FileRead[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceLicenseKeyRead\n */\nexport interface ListResourceLicenseKeyRead {\n /**\n * items\n */\n items: LicenseKeyRead[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceMember\n */\nexport interface ListResourceMember {\n /**\n * items\n */\n items: Member[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceMeter\n */\nexport interface ListResourceMeter {\n /**\n * items\n */\n items: Meter[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceOrder\n */\nexport interface ListResourceOrder {\n /**\n * items\n */\n items: Order[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceOrganization\n */\nexport interface ListResourceOrganization {\n /**\n * items\n */\n items: Organization[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourcePayment\n */\nexport interface ListResourcePayment {\n /**\n * items\n */\n items: Payment[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourcePaymentMethod\n */\nexport interface ListResourcePaymentMethod {\n /**\n * items\n */\n items: PaymentMethod[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceProduct\n */\nexport interface ListResourceProduct {\n /**\n * items\n */\n items: Product[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceRefund\n */\nexport interface ListResourceRefund {\n /**\n * items\n */\n items: Refund[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceSubscription\n */\nexport interface ListResourceSubscription {\n /**\n * items\n */\n items: Subscription[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceWebhookDelivery\n */\nexport interface ListResourceWebhookDelivery {\n /**\n * items\n */\n items: WebhookDelivery[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceWebhookEndpoint\n */\nexport interface ListResourceWebhookEndpoint {\n /**\n * items\n */\n items: WebhookEndpoint[];\n /**\n * pagination\n */\n pagination: Pagination;\n}\n/**\n * ListResourceWithCursorPaginationEvent\n */\nexport interface ListResourceWithCursorPaginationEvent {\n /**\n * items\n */\n items: Event[];\n /**\n * pagination\n */\n pagination: CursorPagination;\n}\n/**\n * ManualRetryLimitExceeded\n */\nexport interface ManualRetryLimitExceeded {\n /**\n * error\n */\n error: \"ManualRetryLimitExceeded\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * A member of a customer.\n */\nexport interface Member {\n /**\n * The ID of the member.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the customer this member belongs to.\n */\n customer_id: string;\n /**\n * The email address of the member.\n */\n email: string;\n /**\n * The name of the member.\n */\n name: string | null;\n /**\n * The ID of the member in your system. This must be unique within the customer.\n */\n external_id: string | null;\n /**\n * role\n */\n role: MemberRole;\n}\n/**\n * Schema for creating a new member nested under a customer.\n\nThe customer is taken from the URL path, so it's not part of the body.\n */\nexport interface MemberCreateFromCustomer {\n /**\n * The email address of the member.\n */\n email: string;\n /**\n * name\n */\n name?: string | null;\n /**\n * The ID of the member in your system. This must be unique within the customer.\n */\n external_id?: string | null;\n /**\n * The role of the member within the customer. To assign or transfer ownership, use the member update endpoint.\n */\n role?: Role;\n}\n/**\n * Schema for creating an owner member during customer creation.\n */\nexport interface MemberOwnerCreate {\n /**\n * The email address of the member.\n */\n email: string;\n /**\n * name\n */\n name?: string | null;\n /**\n * The ID of the member in your system. This must be unique within the customer.\n */\n external_id?: string | null;\n}\n/**\n * Schema for updating a member.\n */\nexport interface MemberUpdate {\n /**\n * name\n */\n name?: string | null;\n /**\n * email\n */\n email?: string | null;\n /**\n * The role of the member within the customer.\n */\n role?: MemberRole | null;\n}\n/**\n * MetadataOutputType\n */\nexport interface MetadataOutputType extends Record<string, never> {}\n/**\n * Meter\n */\nexport interface Meter {\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The name of the meter. Will be shown on customer's invoices and usage.\n */\n name: string;\n /**\n * unit\n */\n unit: MeterUnit;\n /**\n * The label for the custom unit.\n */\n custom_label?: string | null;\n /**\n * The multiplier to convert from base unit to display scale.\n */\n custom_multiplier?: number | null;\n /**\n * filter\n */\n filter: Filter;\n /**\n * The aggregation to apply on the filtered events to calculate the meter.\n */\n aggregation: CountAggregation | PropertyAggregation | UniqueAggregation;\n /**\n * The ID of the organization owning the meter.\n */\n organization_id: string;\n /**\n * Whether the meter is archived and the time it was archived.\n */\n archived_at?: string | null;\n}\n/**\n * MeterCreate\n */\nexport interface MeterCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The name of the meter. Will be shown on customer's invoices and usage.\n */\n name: string;\n /**\n * unit\n */\n unit?: MeterUnit;\n /**\n * The label for the custom unit, e.g. 'request'. Required when unit is 'custom'.\n */\n custom_label?: string | null;\n /**\n * The multiplier to convert from the base unit to display scale, e.g. 1000 to display per 1000 units. Defaults to 1 when not provided.\n */\n custom_multiplier?: number | null;\n /**\n * filter\n */\n filter: Filter;\n /**\n * The aggregation to apply on the filtered events to calculate the meter.\n */\n aggregation: CountAggregation | PropertyAggregation | UniqueAggregation;\n /**\n * The ID of the organization owning the meter. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n}\n/**\n * An event created by Polar when credits are added to a customer meter.\n */\nexport interface MeterCreditEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"meter.credited\";\n /**\n * metadata\n */\n metadata: MeterCreditedMetadata;\n}\n/**\n * MeterCreditedMetadata\n */\nexport interface MeterCreditedMetadata {\n /**\n * meter_id\n */\n meter_id: string;\n /**\n * units\n */\n units: number;\n /**\n * rollover\n */\n rollover: boolean;\n}\n/**\n * MeterQuantities\n */\nexport interface MeterQuantities {\n /**\n * quantities\n */\n quantities: MeterQuantity[];\n /**\n * The total quantity for the period.\n */\n total: number;\n}\n/**\n * MeterQuantity\n */\nexport interface MeterQuantity {\n /**\n * The timestamp for the current period.\n */\n timestamp: string;\n /**\n * The quantity for the current period.\n */\n quantity: number;\n}\n/**\n * An event created by Polar when a customer meter is reset.\n */\nexport interface MeterResetEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"meter.reset\";\n /**\n * metadata\n */\n metadata: MeterResetMetadata;\n}\n/**\n * MeterResetMetadata\n */\nexport interface MeterResetMetadata {\n /**\n * meter_id\n */\n meter_id: string;\n}\n/**\n * MeterUpdate\n */\nexport interface MeterUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The name of the meter. Will be shown on customer's invoices and usage.\n */\n name?: string | null;\n /**\n * The unit of the meter.\n */\n unit?: MeterUnit | null;\n /**\n * The label for the custom unit. Required when unit is 'custom'.\n */\n custom_label?: string | null;\n /**\n * The multiplier to convert from base unit to display scale. Required when unit is 'custom'.\n */\n custom_multiplier?: number | null;\n /**\n * The filter to apply on events that'll be used to calculate the meter.\n */\n filter?: Filter | null;\n /**\n * The aggregation to apply on the filtered events to calculate the meter.\n */\n aggregation?: (CountAggregation | PropertyAggregation | UniqueAggregation) | null;\n /**\n * Whether the meter is archived. Archived meters are no longer used for billing.\n */\n is_archived?: boolean | null;\n}\n/**\n * Information about a metric.\n */\nexport interface Metric {\n /**\n * Unique identifier for the metric.\n */\n slug: string;\n /**\n * Human-readable name for the metric.\n */\n display_name: string;\n /**\n * type\n */\n type: MetricType;\n}\n/**\n * Schema for creating a metrics dashboard.\n */\nexport interface MetricDashboardCreate {\n /**\n * Display name for the dashboard.\n */\n name: string;\n /**\n * List of metric slugs to display in this dashboard.\n */\n metrics?: string[];\n /**\n * The ID of the organization owning this dashboard. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n}\n/**\n * A user-defined metrics dashboard.\n */\nexport interface MetricDashboardSchema {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Display name for the dashboard.\n */\n name: string;\n /**\n * List of metric slugs displayed in this dashboard.\n */\n metrics: string[];\n /**\n * The ID of the organization owning this dashboard.\n */\n organization_id: string;\n}\n/**\n * Schema for updating a metrics dashboard.\n */\nexport interface MetricDashboardUpdate {\n /**\n * Display name for the dashboard.\n */\n name?: string | null;\n /**\n * List of metric slugs to display in this dashboard.\n */\n metrics?: string[] | null;\n}\n/**\n * MetricPeriod\n */\nexport interface MetricPeriod {\n /**\n * Timestamp of this period data.\n */\n timestamp: string;\n /**\n * active_subscriptions\n */\n active_subscriptions?: number | number | null;\n /**\n * committed_subscriptions\n */\n committed_subscriptions?: number | number | null;\n /**\n * monthly_recurring_revenue\n */\n monthly_recurring_revenue?: number | number | null;\n /**\n * trial_monthly_recurring_revenue\n */\n trial_monthly_recurring_revenue?: number | number | null;\n /**\n * committed_monthly_recurring_revenue\n */\n committed_monthly_recurring_revenue?: number | number | null;\n /**\n * trial_committed_monthly_recurring_revenue\n */\n trial_committed_monthly_recurring_revenue?: number | number | null;\n /**\n * average_revenue_per_user\n */\n average_revenue_per_user?: number | number | null;\n /**\n * checkouts\n */\n checkouts?: number | number | null;\n /**\n * succeeded_checkouts\n */\n succeeded_checkouts?: number | number | null;\n /**\n * churned_subscriptions\n */\n churned_subscriptions?: number | number | null;\n /**\n * churn_rate\n */\n churn_rate?: number | number | null;\n /**\n * seats_total\n */\n seats_total?: number | number | null;\n /**\n * seats_claimed\n */\n seats_claimed?: number | number | null;\n /**\n * seats_pending\n */\n seats_pending?: number | number | null;\n /**\n * seat_customers\n */\n seat_customers?: number | number | null;\n /**\n * new_seat_customers\n */\n new_seat_customers?: number | number | null;\n /**\n * churned_seat_customers\n */\n churned_seat_customers?: number | number | null;\n /**\n * orders\n */\n orders?: number | number | null;\n /**\n * revenue\n */\n revenue?: number | number | null;\n /**\n * net_revenue\n */\n net_revenue?: number | number | null;\n /**\n * cumulative_revenue\n */\n cumulative_revenue?: number | number | null;\n /**\n * net_cumulative_revenue\n */\n net_cumulative_revenue?: number | number | null;\n /**\n * costs\n */\n costs?: number | number | null;\n /**\n * cumulative_costs\n */\n cumulative_costs?: number | number | null;\n /**\n * average_order_value\n */\n average_order_value?: number | number | null;\n /**\n * net_average_order_value\n */\n net_average_order_value?: number | number | null;\n /**\n * cost_per_user\n */\n cost_per_user?: number | number | null;\n /**\n * active_user_by_event\n */\n active_user_by_event?: number | number | null;\n /**\n * one_time_products\n */\n one_time_products?: number | number | null;\n /**\n * one_time_products_revenue\n */\n one_time_products_revenue?: number | number | null;\n /**\n * one_time_products_net_revenue\n */\n one_time_products_net_revenue?: number | number | null;\n /**\n * new_subscriptions\n */\n new_subscriptions?: number | number | null;\n /**\n * new_subscriptions_revenue\n */\n new_subscriptions_revenue?: number | number | null;\n /**\n * new_subscriptions_net_revenue\n */\n new_subscriptions_net_revenue?: number | number | null;\n /**\n * renewed_subscriptions\n */\n renewed_subscriptions?: number | number | null;\n /**\n * renewed_subscriptions_revenue\n */\n renewed_subscriptions_revenue?: number | number | null;\n /**\n * renewed_subscriptions_net_revenue\n */\n renewed_subscriptions_net_revenue?: number | number | null;\n /**\n * canceled_subscriptions\n */\n canceled_subscriptions?: number | number | null;\n /**\n * canceled_subscriptions_customer_service\n */\n canceled_subscriptions_customer_service?: number | number | null;\n /**\n * canceled_subscriptions_low_quality\n */\n canceled_subscriptions_low_quality?: number | number | null;\n /**\n * canceled_subscriptions_missing_features\n */\n canceled_subscriptions_missing_features?: number | number | null;\n /**\n * canceled_subscriptions_switched_service\n */\n canceled_subscriptions_switched_service?: number | number | null;\n /**\n * canceled_subscriptions_too_complex\n */\n canceled_subscriptions_too_complex?: number | number | null;\n /**\n * canceled_subscriptions_too_expensive\n */\n canceled_subscriptions_too_expensive?: number | number | null;\n /**\n * canceled_subscriptions_unused\n */\n canceled_subscriptions_unused?: number | number | null;\n /**\n * canceled_subscriptions_other\n */\n canceled_subscriptions_other?: number | number | null;\n /**\n * annual_recurring_revenue\n */\n annual_recurring_revenue?: number | number | null;\n /**\n * committed_annual_recurring_revenue\n */\n committed_annual_recurring_revenue?: number | number | null;\n /**\n * checkouts_conversion\n */\n checkouts_conversion?: number | number | null;\n /**\n * ltv\n */\n ltv?: number | number | null;\n /**\n * gross_margin\n */\n gross_margin?: number | number | null;\n /**\n * gross_margin_percentage\n */\n gross_margin_percentage?: number | number | null;\n /**\n * cashflow\n */\n cashflow?: number | number | null;\n /**\n * average_seats_per_customer\n */\n average_seats_per_customer?: number | number | null;\n /**\n * seat_utilization_rate\n */\n seat_utilization_rate?: number | number | null;\n}\n/**\n * Metrics\n */\nexport interface Metrics {\n /**\n * active_subscriptions\n */\n active_subscriptions?: Metric | null;\n /**\n * committed_subscriptions\n */\n committed_subscriptions?: Metric | null;\n /**\n * monthly_recurring_revenue\n */\n monthly_recurring_revenue?: Metric | null;\n /**\n * trial_monthly_recurring_revenue\n */\n trial_monthly_recurring_revenue?: Metric | null;\n /**\n * committed_monthly_recurring_revenue\n */\n committed_monthly_recurring_revenue?: Metric | null;\n /**\n * trial_committed_monthly_recurring_revenue\n */\n trial_committed_monthly_recurring_revenue?: Metric | null;\n /**\n * average_revenue_per_user\n */\n average_revenue_per_user?: Metric | null;\n /**\n * checkouts\n */\n checkouts?: Metric | null;\n /**\n * succeeded_checkouts\n */\n succeeded_checkouts?: Metric | null;\n /**\n * churned_subscriptions\n */\n churned_subscriptions?: Metric | null;\n /**\n * churn_rate\n */\n churn_rate?: Metric | null;\n /**\n * seats_total\n */\n seats_total?: Metric | null;\n /**\n * seats_claimed\n */\n seats_claimed?: Metric | null;\n /**\n * seats_pending\n */\n seats_pending?: Metric | null;\n /**\n * seat_customers\n */\n seat_customers?: Metric | null;\n /**\n * new_seat_customers\n */\n new_seat_customers?: Metric | null;\n /**\n * churned_seat_customers\n */\n churned_seat_customers?: Metric | null;\n /**\n * orders\n */\n orders?: Metric | null;\n /**\n * revenue\n */\n revenue?: Metric | null;\n /**\n * net_revenue\n */\n net_revenue?: Metric | null;\n /**\n * cumulative_revenue\n */\n cumulative_revenue?: Metric | null;\n /**\n * net_cumulative_revenue\n */\n net_cumulative_revenue?: Metric | null;\n /**\n * costs\n */\n costs?: Metric | null;\n /**\n * cumulative_costs\n */\n cumulative_costs?: Metric | null;\n /**\n * average_order_value\n */\n average_order_value?: Metric | null;\n /**\n * net_average_order_value\n */\n net_average_order_value?: Metric | null;\n /**\n * cost_per_user\n */\n cost_per_user?: Metric | null;\n /**\n * active_user_by_event\n */\n active_user_by_event?: Metric | null;\n /**\n * one_time_products\n */\n one_time_products?: Metric | null;\n /**\n * one_time_products_revenue\n */\n one_time_products_revenue?: Metric | null;\n /**\n * one_time_products_net_revenue\n */\n one_time_products_net_revenue?: Metric | null;\n /**\n * new_subscriptions\n */\n new_subscriptions?: Metric | null;\n /**\n * new_subscriptions_revenue\n */\n new_subscriptions_revenue?: Metric | null;\n /**\n * new_subscriptions_net_revenue\n */\n new_subscriptions_net_revenue?: Metric | null;\n /**\n * renewed_subscriptions\n */\n renewed_subscriptions?: Metric | null;\n /**\n * renewed_subscriptions_revenue\n */\n renewed_subscriptions_revenue?: Metric | null;\n /**\n * renewed_subscriptions_net_revenue\n */\n renewed_subscriptions_net_revenue?: Metric | null;\n /**\n * canceled_subscriptions\n */\n canceled_subscriptions?: Metric | null;\n /**\n * canceled_subscriptions_customer_service\n */\n canceled_subscriptions_customer_service?: Metric | null;\n /**\n * canceled_subscriptions_low_quality\n */\n canceled_subscriptions_low_quality?: Metric | null;\n /**\n * canceled_subscriptions_missing_features\n */\n canceled_subscriptions_missing_features?: Metric | null;\n /**\n * canceled_subscriptions_switched_service\n */\n canceled_subscriptions_switched_service?: Metric | null;\n /**\n * canceled_subscriptions_too_complex\n */\n canceled_subscriptions_too_complex?: Metric | null;\n /**\n * canceled_subscriptions_too_expensive\n */\n canceled_subscriptions_too_expensive?: Metric | null;\n /**\n * canceled_subscriptions_unused\n */\n canceled_subscriptions_unused?: Metric | null;\n /**\n * canceled_subscriptions_other\n */\n canceled_subscriptions_other?: Metric | null;\n /**\n * annual_recurring_revenue\n */\n annual_recurring_revenue?: Metric | null;\n /**\n * committed_annual_recurring_revenue\n */\n committed_annual_recurring_revenue?: Metric | null;\n /**\n * checkouts_conversion\n */\n checkouts_conversion?: Metric | null;\n /**\n * ltv\n */\n ltv?: Metric | null;\n /**\n * gross_margin\n */\n gross_margin?: Metric | null;\n /**\n * gross_margin_percentage\n */\n gross_margin_percentage?: Metric | null;\n /**\n * cashflow\n */\n cashflow?: Metric | null;\n /**\n * average_seats_per_customer\n */\n average_seats_per_customer?: Metric | null;\n /**\n * seat_utilization_rate\n */\n seat_utilization_rate?: Metric | null;\n}\n/**\n * Date interval limit to get metrics for a given interval.\n */\nexport interface MetricsIntervalLimit {\n /**\n * Minimum number of days for this interval.\n */\n min_days: number;\n /**\n * Maximum number of days for this interval.\n */\n max_days: number;\n}\n/**\n * Date interval limits to get metrics for each interval.\n */\nexport interface MetricsIntervalsLimits {\n /**\n * hour\n */\n hour: MetricsIntervalLimit;\n /**\n * day\n */\n day: MetricsIntervalLimit;\n /**\n * week\n */\n week: MetricsIntervalLimit;\n /**\n * month\n */\n month: MetricsIntervalLimit;\n /**\n * year\n */\n year: MetricsIntervalLimit;\n}\n/**\n * Date limits to get metrics.\n */\nexport interface MetricsLimits {\n /**\n * Minimum date to get metrics.\n */\n min_date: string;\n /**\n * intervals\n */\n intervals: MetricsIntervalsLimits;\n}\n/**\n * Metrics response schema.\n */\nexport interface MetricsResponse {\n /**\n * List of data for each timestamp.\n */\n periods: MetricPeriod[];\n /**\n * totals\n */\n totals: MetricsTotals;\n /**\n * metrics\n */\n metrics: Metrics;\n}\n/**\n * MetricsTotals\n */\nexport interface MetricsTotals {\n /**\n * active_subscriptions\n */\n active_subscriptions?: number | number | null;\n /**\n * committed_subscriptions\n */\n committed_subscriptions?: number | number | null;\n /**\n * monthly_recurring_revenue\n */\n monthly_recurring_revenue?: number | number | null;\n /**\n * trial_monthly_recurring_revenue\n */\n trial_monthly_recurring_revenue?: number | number | null;\n /**\n * committed_monthly_recurring_revenue\n */\n committed_monthly_recurring_revenue?: number | number | null;\n /**\n * trial_committed_monthly_recurring_revenue\n */\n trial_committed_monthly_recurring_revenue?: number | number | null;\n /**\n * average_revenue_per_user\n */\n average_revenue_per_user?: number | number | null;\n /**\n * checkouts\n */\n checkouts?: number | number | null;\n /**\n * succeeded_checkouts\n */\n succeeded_checkouts?: number | number | null;\n /**\n * churned_subscriptions\n */\n churned_subscriptions?: number | number | null;\n /**\n * churn_rate\n */\n churn_rate?: number | number | null;\n /**\n * seats_total\n */\n seats_total?: number | number | null;\n /**\n * seats_claimed\n */\n seats_claimed?: number | number | null;\n /**\n * seats_pending\n */\n seats_pending?: number | number | null;\n /**\n * seat_customers\n */\n seat_customers?: number | number | null;\n /**\n * new_seat_customers\n */\n new_seat_customers?: number | number | null;\n /**\n * churned_seat_customers\n */\n churned_seat_customers?: number | number | null;\n /**\n * orders\n */\n orders?: number | number | null;\n /**\n * revenue\n */\n revenue?: number | number | null;\n /**\n * net_revenue\n */\n net_revenue?: number | number | null;\n /**\n * cumulative_revenue\n */\n cumulative_revenue?: number | number | null;\n /**\n * net_cumulative_revenue\n */\n net_cumulative_revenue?: number | number | null;\n /**\n * costs\n */\n costs?: number | number | null;\n /**\n * cumulative_costs\n */\n cumulative_costs?: number | number | null;\n /**\n * average_order_value\n */\n average_order_value?: number | number | null;\n /**\n * net_average_order_value\n */\n net_average_order_value?: number | number | null;\n /**\n * cost_per_user\n */\n cost_per_user?: number | number | null;\n /**\n * active_user_by_event\n */\n active_user_by_event?: number | number | null;\n /**\n * one_time_products\n */\n one_time_products?: number | number | null;\n /**\n * one_time_products_revenue\n */\n one_time_products_revenue?: number | number | null;\n /**\n * one_time_products_net_revenue\n */\n one_time_products_net_revenue?: number | number | null;\n /**\n * new_subscriptions\n */\n new_subscriptions?: number | number | null;\n /**\n * new_subscriptions_revenue\n */\n new_subscriptions_revenue?: number | number | null;\n /**\n * new_subscriptions_net_revenue\n */\n new_subscriptions_net_revenue?: number | number | null;\n /**\n * renewed_subscriptions\n */\n renewed_subscriptions?: number | number | null;\n /**\n * renewed_subscriptions_revenue\n */\n renewed_subscriptions_revenue?: number | number | null;\n /**\n * renewed_subscriptions_net_revenue\n */\n renewed_subscriptions_net_revenue?: number | number | null;\n /**\n * canceled_subscriptions\n */\n canceled_subscriptions?: number | number | null;\n /**\n * canceled_subscriptions_customer_service\n */\n canceled_subscriptions_customer_service?: number | number | null;\n /**\n * canceled_subscriptions_low_quality\n */\n canceled_subscriptions_low_quality?: number | number | null;\n /**\n * canceled_subscriptions_missing_features\n */\n canceled_subscriptions_missing_features?: number | number | null;\n /**\n * canceled_subscriptions_switched_service\n */\n canceled_subscriptions_switched_service?: number | number | null;\n /**\n * canceled_subscriptions_too_complex\n */\n canceled_subscriptions_too_complex?: number | number | null;\n /**\n * canceled_subscriptions_too_expensive\n */\n canceled_subscriptions_too_expensive?: number | number | null;\n /**\n * canceled_subscriptions_unused\n */\n canceled_subscriptions_unused?: number | number | null;\n /**\n * canceled_subscriptions_other\n */\n canceled_subscriptions_other?: number | number | null;\n /**\n * annual_recurring_revenue\n */\n annual_recurring_revenue?: number | number | null;\n /**\n * committed_annual_recurring_revenue\n */\n committed_annual_recurring_revenue?: number | number | null;\n /**\n * checkouts_conversion\n */\n checkouts_conversion?: number | number | null;\n /**\n * ltv\n */\n ltv?: number | number | null;\n /**\n * gross_margin\n */\n gross_margin?: number | number | null;\n /**\n * gross_margin_percentage\n */\n gross_margin_percentage?: number | number | null;\n /**\n * cashflow\n */\n cashflow?: number | number | null;\n /**\n * average_seats_per_customer\n */\n average_seats_per_customer?: number | number | null;\n /**\n * seat_utilization_rate\n */\n seat_utilization_rate?: number | number | null;\n}\n/**\n * MissingInvoiceBillingDetails\n */\nexport interface MissingInvoiceBillingDetails {\n /**\n * error\n */\n error: \"MissingInvoiceBillingDetails\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * NotOpenCheckout\n */\nexport interface NotOpenCheckout {\n /**\n * error\n */\n error: \"NotOpenCheckout\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * NotPermitted\n */\nexport interface NotPermitted {\n /**\n * error\n */\n error: \"NotPermitted\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * OAuth2ClientConfiguration\n */\nexport interface OAuth2ClientConfiguration {\n /**\n * redirect_uris\n */\n redirect_uris: string[];\n /**\n * token_endpoint_auth_method\n */\n token_endpoint_auth_method?: TokenEndpointAuthMethod;\n /**\n * grant_types\n */\n grant_types?: (\"authorization_code\" | \"refresh_token\")[];\n /**\n * response_types\n */\n response_types?: \"code\"[];\n /**\n * scope\n */\n scope?: string;\n /**\n * client_name\n */\n client_name: string;\n /**\n * client_uri\n */\n client_uri?: string | null;\n /**\n * logo_uri\n */\n logo_uri?: string | null;\n /**\n * tos_uri\n */\n tos_uri?: string | null;\n /**\n * policy_uri\n */\n policy_uri?: string | null;\n /**\n * default_sub_type\n */\n default_sub_type?: SubType;\n}\n/**\n * OAuth2ClientConfigurationUpdate\n */\nexport interface OAuth2ClientConfigurationUpdate {\n /**\n * redirect_uris\n */\n redirect_uris: string[];\n /**\n * token_endpoint_auth_method\n */\n token_endpoint_auth_method?: TokenEndpointAuthMethod;\n /**\n * grant_types\n */\n grant_types?: (\"authorization_code\" | \"refresh_token\")[];\n /**\n * response_types\n */\n response_types?: \"code\"[];\n /**\n * scope\n */\n scope?: string;\n /**\n * client_name\n */\n client_name: string;\n /**\n * client_uri\n */\n client_uri?: string | null;\n /**\n * logo_uri\n */\n logo_uri?: string | null;\n /**\n * tos_uri\n */\n tos_uri?: string | null;\n /**\n * policy_uri\n */\n policy_uri?: string | null;\n /**\n * default_sub_type\n */\n default_sub_type?: SubType;\n /**\n * client_id\n */\n client_id: string;\n}\n/**\n * OAuth2ClientPublic\n */\nexport interface OAuth2ClientPublic {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * client_id\n */\n client_id: string;\n /**\n * client_name\n */\n client_name: string | null;\n /**\n * client_uri\n */\n client_uri: string | null;\n /**\n * logo_uri\n */\n logo_uri: string | null;\n /**\n * tos_uri\n */\n tos_uri: string | null;\n /**\n * policy_uri\n */\n policy_uri: string | null;\n}\n/**\n * OffSessionChargesNotEnabled\n */\nexport interface OffSessionChargesNotEnabled {\n /**\n * error\n */\n error: \"OffSessionChargesNotEnabled\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * Order\n */\nexport interface Order {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * status\n */\n status: OrderStatus;\n /**\n * Whether the order has been paid for.\n */\n paid: boolean;\n /**\n * Amount in cents, before discounts and taxes.\n */\n subtotal_amount: number;\n /**\n * Discount amount in cents.\n */\n discount_amount: number;\n /**\n * Amount in cents, after discounts but before taxes.\n */\n net_amount: number;\n /**\n * Sales tax amount in cents.\n */\n tax_amount: number;\n /**\n * Amount in cents, after discounts and taxes.\n */\n total_amount: number;\n /**\n * Customer's balance amount applied to this invoice. Can increase the total amount paid, if the customer has a negative balance, or decrease it, if the customer has a positive balance.Amount in cents.\n */\n applied_balance_amount: number;\n /**\n * Amount in cents that is due for this order.\n */\n due_amount: number;\n /**\n * Amount refunded in cents.\n */\n refunded_amount: number;\n /**\n * Sales tax refunded in cents.\n */\n refunded_tax_amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * billing_reason\n */\n billing_reason: OrderBillingReason;\n /**\n * The name of the customer that should appear on the invoice.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * The invoice number associated with this order. `null` while the order is in `draft` status; assigned at finalize.\n */\n invoice_number: string | null;\n /**\n * Whether an invoice has been generated for this order.\n */\n is_invoice_generated: boolean;\n /**\n * The receipt number for this order. Set once the order is paid for organizations with receipts enabled. When set, a downloadable receipt PDF can be obtained via the receipt endpoint.\n */\n receipt_number: string | null;\n /**\n * Number of seats purchased (for seat-based one-time orders).\n */\n seats?: number | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * product_id\n */\n product_id: string | null;\n /**\n * discount_id\n */\n discount_id: string | null;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * checkout_id\n */\n checkout_id: string | null;\n /**\n * When the next automatic payment retry is scheduled. `null` if the order is not in dunning or all retries have been exhausted.\n */\n next_payment_attempt_at?: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * Platform fee amount in cents.\n */\n platform_fee_amount: number;\n /**\n * Currency of the platform fee.\n */\n platform_fee_currency: string | null;\n /**\n * customer\n */\n customer: OrderCustomer;\n /**\n * product\n */\n product: OrderProduct | null;\n /**\n * discount\n */\n discount:\n | (\n | DiscountFixedOnceForeverDurationBase\n | DiscountFixedRepeatDurationBase\n | DiscountPercentageOnceForeverDurationBase\n | DiscountPercentageRepeatDurationBase\n )\n | null;\n /**\n * subscription\n */\n subscription: OrderSubscription | null;\n /**\n * Line items composing the order.\n */\n items: OrderItemSchema[];\n /**\n * A summary description of the order.\n */\n description: string;\n /**\n * Amount in cents that can still be refunded (net, before taxes). Accounts for any applied customer balance and previous refunds.\n */\n refundable_amount: number;\n /**\n * Sales tax in cents that would be refunded if the full refundable amount is refunded.\n */\n refundable_tax_amount: number;\n}\n/**\n * Schema to create a draft order for an off-session charge.\n */\nexport interface OrderCreate {\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The ID of the organization the order belongs to. **Required unless you use an organization token.** The customer and product must belong to this organization.\n */\n organization_id?: string | null;\n /**\n * The ID of the customer the order is for. Must belong to the order's organization.\n */\n customer_id: string;\n /**\n * The ID of the one-time product to charge for. Must belong to the order's organization. Only fixed-price and free products are supported.\n */\n product_id: string;\n /**\n * The currency to charge in (ISO 4217, lowercase, e.g. `usd`). Defaults to the organization's default currency; specify it to force a different one, or when the product isn't priced in the organization's default currency.\n */\n currency?: string | null;\n /**\n * A custom amount to charge, in the smallest currency unit. Overrides the product's price; defaults to the product's configured price (0 for free products). A positive amount must be at least the currency's minimum.\n */\n amount?: number | null;\n /**\n * A custom description for the order's line item, shown on the invoice and receipt (e.g. `5,000 tokens`). Defaults to the product name.\n */\n description?: string | null;\n}\n/**\n * OrderCustomer\n */\nexport interface OrderCustomer {\n /**\n * The ID of the customer.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email?: string | null;\n /**\n * Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.\n */\n email_verified: boolean;\n /**\n * type\n */\n type: CustomerType;\n /**\n * The name of the customer.\n */\n name: string | null;\n /**\n * The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * tax_id\n */\n tax_id: unknown[] | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer.\n */\n organization_id: string;\n /**\n * The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details.\n */\n default_payment_method_id?: string | null;\n /**\n * Timestamp for when the customer was soft deleted.\n */\n deleted_at: string | null;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n}\n/**\n * Schema to finalize a draft order and trigger an off-session charge.\n */\nexport interface OrderFinalize {\n /**\n * ID of the payment method to charge. Must belong to the order's customer. Falls back to the customer's default payment method when unset.\n */\n payment_method_id?: string | null;\n}\n/**\n * Order's invoice data.\n */\nexport interface OrderInvoice {\n /**\n * The URL to the invoice.\n */\n url: string;\n}\n/**\n * An order line item.\n */\nexport interface OrderItemSchema {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Description of the line item charge.\n */\n label: string;\n /**\n * Amount in cents, before discounts and taxes.\n */\n amount: number;\n /**\n * Sales tax amount in cents.\n */\n tax_amount: number;\n /**\n * Whether this charge is due to a proration.\n */\n proration: boolean;\n /**\n * Associated price ID, if any.\n */\n product_price_id: string | null;\n}\n/**\n * OrderNotDraft\n */\nexport interface OrderNotDraft {\n /**\n * error\n */\n error: \"OrderNotDraft\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * OrderNotEligibleForInvoice\n */\nexport interface OrderNotEligibleForInvoice {\n /**\n * error\n */\n error: \"OrderNotEligibleForInvoice\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * OrderNotEligibleForRetry\n */\nexport interface OrderNotEligibleForRetry {\n /**\n * error\n */\n error: \"OrderNotEligibleForRetry\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * An event created by Polar when an order is paid.\n */\nexport interface OrderPaidEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"order.paid\";\n /**\n * metadata\n */\n metadata: OrderPaidMetadata;\n}\n/**\n * OrderPaidMetadata\n */\nexport interface OrderPaidMetadata {\n /**\n * order_id\n */\n order_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * billing_type\n */\n billing_type?: string;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency?: string;\n /**\n * net_amount\n */\n net_amount?: number;\n /**\n * tax_amount\n */\n tax_amount?: number;\n /**\n * applied_balance_amount\n */\n applied_balance_amount?: number;\n /**\n * discount_amount\n */\n discount_amount?: number;\n /**\n * discount_id\n */\n discount_id?: string;\n /**\n * platform_fee\n */\n platform_fee?: number;\n /**\n * subscription_id\n */\n subscription_id?: string;\n /**\n * recurring_interval\n */\n recurring_interval?: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count?: number;\n}\n/**\n * OrderProduct\n */\nexport interface OrderProduct {\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description: string | null;\n /**\n * visibility\n */\n visibility: ProductVisibility;\n /**\n * The recurring interval of the product. If `None`, the product is a one-time purchase.\n */\n recurring_interval: RecurringInterval | null;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.\n */\n recurring_interval_count: number | null;\n /**\n * The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval.\n */\n meter_interval: RecurringInterval | null;\n /**\n * Number of meter interval units. None when no meter cycle is set.\n */\n meter_interval_count: number | null;\n /**\n * Whether the product is a subscription.\n */\n is_recurring: boolean;\n /**\n * Whether the product is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the organization owning the product.\n */\n organization_id: string;\n}\n/**\n * Order's receipt data.\n */\nexport interface OrderReceipt {\n /**\n * The URL to the receipt PDF.\n */\n url: string;\n}\n/**\n * An event created by Polar when an order is refunded.\n */\nexport interface OrderRefundedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"order.refunded\";\n /**\n * metadata\n */\n metadata: OrderRefundedMetadata;\n}\n/**\n * OrderRefundedMetadata\n */\nexport interface OrderRefundedMetadata {\n /**\n * order_id\n */\n order_id: string;\n /**\n * refunded_amount\n */\n refunded_amount: number;\n /**\n * currency\n */\n currency: string;\n}\n/**\n * OrderSubscription\n */\nexport interface OrderSubscription {\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The amount of the subscription.\n */\n amount: number;\n /**\n * The currency of the subscription.\n */\n currency: string;\n /**\n * recurring_interval\n */\n recurring_interval: RecurringInterval;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.\n */\n recurring_interval_count: number;\n /**\n * status\n */\n status: SubscriptionStatus;\n /**\n * The start timestamp of the current billing period.\n */\n current_period_start: string;\n /**\n * The end timestamp of the current billing period.\n */\n current_period_end: string;\n /**\n * The start timestamp of the current meter period, if the product has a meter cycle set. Metered credits are granted and overage is settled on this cadence.\n */\n current_meter_period_start: string | null;\n /**\n * The end timestamp of the current meter period, if the product has a meter cycle set. This is when credits next renew.\n */\n current_meter_period_end: string | null;\n /**\n * The start timestamp of the trial period, if any.\n */\n trial_start: string | null;\n /**\n * The end timestamp of the trial period, if any.\n */\n trial_end: string | null;\n /**\n * Whether the subscription will be canceled at the end of the current period.\n */\n cancel_at_period_end: boolean;\n /**\n * The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.\n */\n canceled_at: string | null;\n /**\n * The timestamp when the subscription started.\n */\n started_at: string | null;\n /**\n * The timestamp when the subscription will end.\n */\n ends_at: string | null;\n /**\n * The timestamp when the subscription ended.\n */\n ended_at: string | null;\n /**\n * The timestamp when the subscription entered `past_due` status.\n */\n past_due_at?: string | null;\n /**\n * Whether the subscription will be paused at the end of the current period.\n */\n pause_at_period_end: boolean;\n /**\n * The timestamp when the subscription was paused.\n */\n paused_at: string | null;\n /**\n * The timestamp when a paused subscription is scheduled to automatically resume, if set.\n */\n resumes_at: string | null;\n /**\n * The ID of the subscribed customer.\n */\n customer_id: string;\n /**\n * The ID of the subscribed product.\n */\n product_id: string;\n /**\n * The ID of the applied discount, if any.\n */\n discount_id: string | null;\n /**\n * checkout_id\n */\n checkout_id: string | null;\n /**\n * The number of seats for seat-based subscriptions. None for non-seat subscriptions.\n */\n seats?: number | null;\n /**\n * customer_cancellation_reason\n */\n customer_cancellation_reason: CustomerCancellationReason | null;\n /**\n * customer_cancellation_comment\n */\n customer_cancellation_comment: string | null;\n}\n/**\n * Schema to update an order.\n */\nexport interface OrderUpdate {\n /**\n * The name of the customer that should appear on the invoice.\n */\n billing_name?: string | null;\n /**\n * The address of the customer that should appear on the invoice. Country and state fields cannot be updated.\n */\n billing_address?: AddressInput | null;\n}\n/**\n * An event created by Polar when an order is voided.\n */\nexport interface OrderVoidedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"order.voided\";\n /**\n * metadata\n */\n metadata: OrderVoidedMetadata;\n}\n/**\n * OrderVoidedMetadata\n */\nexport interface OrderVoidedMetadata {\n /**\n * order_id\n */\n order_id: string;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n}\n/**\n * Organization\n */\nexport interface Organization {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Organization name shown in checkout, customer portal, emails etc.\n */\n name: string;\n /**\n * Unique organization slug in checkout, customer portal and credit card statements.\n */\n slug: string;\n /**\n * Avatar URL shown in checkout, customer portal, emails etc.\n */\n avatar_url: string | null;\n /**\n * proration_behavior\n */\n proration_behavior: SubscriptionProrationBehavior;\n /**\n * Whether customers can update their subscriptions from the customer portal.\n */\n allow_customer_updates: boolean;\n /**\n * Public support email.\n */\n email: string | null;\n /**\n * Official website of the organization.\n */\n website: string | null;\n /**\n * Links to social profiles.\n */\n socials: OrganizationSocialLink[];\n /**\n * status\n */\n status: OrganizationStatus;\n /**\n * When the business details were submitted for review.\n */\n details_submitted_at: string | null;\n /**\n * Whether members must access this organization through its SSO connection.\n */\n sso_enforced: boolean;\n /**\n * Default presentment currency. Used as fallback in checkout and customer portal, if the customer's local currency is not available.\n */\n default_presentment_currency: string;\n /**\n * default_tax_behavior\n */\n default_tax_behavior: TaxBehaviorOption;\n /**\n * Organization feature settings\n */\n feature_settings: OrganizationFeatureSettings | null;\n /**\n * subscription_settings\n */\n subscription_settings: OrganizationSubscriptionSettings;\n /**\n * customer_email_settings\n */\n customer_email_settings: OrganizationCustomerEmailSettings;\n /**\n * customer_portal_settings\n */\n customer_portal_settings: OrganizationCustomerPortalSettings;\n /**\n * Two-letter country code (ISO 3166-1 alpha-2).\n */\n country?: CountryAlpha2 | null;\n /**\n * ID of the transactions account.\n */\n account_id: string | null;\n /**\n * ID of the payout account.\n */\n payout_account_id: string | null;\n /**\n * capabilities\n */\n capabilities: OrganizationCapabilities;\n}\n/**\n * Schema to create a file to be used as an organization avatar.\n */\nexport interface OrganizationAvatarFileCreate {\n /**\n * organization_id\n */\n organization_id?: string | null;\n /**\n * name\n */\n name: string;\n /**\n * MIME type of the file. Only images are supported for this type of file.\n */\n mime_type: string;\n /**\n * Size of the file. A maximum of 1 MB is allowed for this type of file.\n */\n size: number;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64?: string | null;\n /**\n * upload\n */\n upload: S3FileCreateMultipart;\n /**\n * service\n */\n service: \"organization_avatar\";\n /**\n * version\n */\n version?: string | null;\n}\n/**\n * File to be used as an organization avatar.\n */\nexport interface OrganizationAvatarFileRead {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * name\n */\n name: string;\n /**\n * path\n */\n path: string;\n /**\n * mime_type\n */\n mime_type: string;\n /**\n * size\n */\n size: number;\n /**\n * storage_version\n */\n storage_version: string | null;\n /**\n * checksum_etag\n */\n checksum_etag: string | null;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64: string | null;\n /**\n * checksum_sha256_hex\n */\n checksum_sha256_hex: string | null;\n /**\n * last_modified_at\n */\n last_modified_at: string | null;\n /**\n * version\n */\n version: string | null;\n /**\n * service\n */\n service: \"organization_avatar\";\n /**\n * is_uploaded\n */\n is_uploaded: boolean;\n /**\n * created_at\n */\n created_at: string;\n /**\n * size_readable\n */\n size_readable: string;\n /**\n * public_url\n */\n public_url: string;\n}\n/**\n * OrganizationCapabilities\n */\nexport interface OrganizationCapabilities {\n /**\n * Whether the organization can accept new checkout payments.\n */\n checkout_payments: boolean;\n /**\n * Whether the organization can process subscription renewals.\n */\n subscription_renewals: boolean;\n /**\n * Whether the organization can withdraw its balance.\n */\n payouts: boolean;\n /**\n * Whether the organization can issue refunds.\n */\n refunds: boolean;\n /**\n * Whether the organization can access the API.\n */\n api_access: boolean;\n /**\n * Whether the organization can access the dashboard.\n */\n dashboard_access: boolean;\n}\n/**\n * OrganizationCompanyLegalEntitySchema\n */\nexport interface OrganizationCompanyLegalEntitySchema {\n /**\n * type\n */\n type: \"company\";\n /**\n * registered_name\n */\n registered_name: string;\n}\n/**\n * OrganizationCreate\n */\nexport interface OrganizationCreate {\n /**\n * name\n */\n name: string;\n /**\n * slug\n */\n slug: string;\n /**\n * avatar_url\n */\n avatar_url?: string | null;\n /**\n * legal_entity\n */\n legal_entity?:\n | (OrganizationIndividualLegalEntitySchema | OrganizationCompanyLegalEntitySchema)\n | null;\n /**\n * Public support email.\n */\n email?: string | null;\n /**\n * Official website of the organization.\n */\n website?: string | null;\n /**\n * Link to social profiles.\n */\n socials?: OrganizationSocialLink[] | null;\n /**\n * Additional, private, business details Polar needs about active organizations for compliance (KYC).\n */\n details?: OrganizationDetails | null;\n /**\n * Two-letter country code (ISO 3166-1 alpha-2).\n */\n country?: CountryAlpha2Input | null;\n /**\n * feature_settings\n */\n feature_settings?: OrganizationFeatureSettingsUpdate | null;\n /**\n * subscription_settings\n */\n subscription_settings?: OrganizationSubscriptionSettings | null;\n /**\n * customer_email_settings\n */\n customer_email_settings?: OrganizationCustomerEmailSettings | null;\n /**\n * customer_portal_settings\n */\n customer_portal_settings?: OrganizationCustomerPortalSettings | null;\n /**\n * default_presentment_currency\n */\n default_presentment_currency?: PresentmentCurrency;\n /**\n * default_tax_behavior\n */\n default_tax_behavior?: TaxBehaviorOption;\n}\n/**\n * OrganizationCustomerEmailSettings\n */\nexport interface OrganizationCustomerEmailSettings {\n /**\n * order_confirmation\n */\n order_confirmation: boolean;\n /**\n * subscription_cancellation\n */\n subscription_cancellation: boolean;\n /**\n * subscription_confirmation\n */\n subscription_confirmation: boolean;\n /**\n * subscription_cycled\n */\n subscription_cycled: boolean;\n /**\n * subscription_cycled_after_trial\n */\n subscription_cycled_after_trial: boolean;\n /**\n * subscription_past_due\n */\n subscription_past_due: boolean;\n /**\n * subscription_paused\n */\n subscription_paused: boolean;\n /**\n * subscription_resumed\n */\n subscription_resumed: boolean;\n /**\n * subscription_renewal_reminder\n */\n subscription_renewal_reminder: boolean;\n /**\n * subscription_revoked\n */\n subscription_revoked: boolean;\n /**\n * subscription_trial_conversion_reminder\n */\n subscription_trial_conversion_reminder: boolean;\n /**\n * subscription_uncanceled\n */\n subscription_uncanceled: boolean;\n /**\n * subscription_updated\n */\n subscription_updated: boolean;\n}\n/**\n * OrganizationCustomerPortalSettings\n */\nexport interface OrganizationCustomerPortalSettings {\n /**\n * usage\n */\n usage: CustomerPortalUsageSettings;\n /**\n * subscription\n */\n subscription: CustomerPortalSubscriptionSettings;\n /**\n * customer\n */\n customer?: CustomerPortalCustomerSettings;\n}\n/**\n * OrganizationDetails\n */\nexport interface OrganizationDetails {\n /**\n * Brief information about you and your business.\n */\n about?: string | null;\n /**\n * Description of digital products being sold.\n */\n product_description?: string | null;\n /**\n * Categories of products being sold.\n */\n selling_categories?: string[];\n /**\n * Pricing models used by the organization.\n */\n pricing_models?: string[];\n /**\n * How the organization will integrate and use Polar.\n */\n intended_use?: string | null;\n /**\n * Main customer acquisition channels.\n */\n customer_acquisition?: string[];\n /**\n * Estimated revenue in the next 12 months\n */\n future_annual_revenue?: number | null;\n /**\n * Switching from another platform?\n */\n switching?: boolean;\n /**\n * Which platform the organization is migrating from.\n */\n switching_from?: (\"paddle\" | \"lemon_squeezy\" | \"gumroad\" | \"stripe\" | \"other\") | null;\n /**\n * Revenue from last year if applicable.\n */\n previous_annual_revenue?: number | null;\n}\n/**\n * OrganizationFeatureSettings\n */\nexport interface OrganizationFeatureSettings {\n /**\n * If this organization has issue funding enabled\n */\n issue_funding_enabled?: boolean;\n /**\n * If this organization has seat-based pricing enabled\n */\n seat_based_pricing_enabled?: boolean;\n /**\n * If this organization has Wallets enabled\n */\n wallets_enabled?: boolean;\n /**\n * If this organization has the Member model enabled\n */\n member_model_enabled?: boolean;\n /**\n * If this organization has checkout localization enabled\n */\n checkout_localization_enabled?: boolean;\n /**\n * Ordered list of metric slugs shown on the dashboard overview.\n */\n overview_metrics?: string[] | null;\n /**\n * If this organization has access to reset proration behavior.\n */\n reset_proration_behavior_enabled?: boolean;\n /**\n * If this organization can create and finalize draft orders via the API (off-session charges against a saved payment method).\n */\n off_session_charges_enabled?: boolean;\n /**\n * Enables the slack shared channel benefit\n */\n slack_benefit_enabled?: boolean;\n /**\n * If this organization has preview access to new features enabled\n */\n preview_access_enabled?: boolean;\n /**\n * If this organization has the disputes dashboard enabled\n */\n disputes_enabled?: boolean;\n /**\n * If this organization has single sign-on configuration enabled\n */\n sso_enabled?: boolean;\n /**\n * If this organization has the split product navigation (Billing / Compass / Customers) enabled in the dashboard\n */\n compass_enabled?: boolean;\n /**\n * If this organization can migrate its billing from another provider (e.g. Stripe) to Polar.\n */\n merchant_migration_enabled?: boolean;\n}\n/**\n * Feature settings that organizations can update themselves.\n\nOther feature settings are managed by Polar staff: they're ignored if\nprovided and keep their current value.\n */\nexport interface OrganizationFeatureSettingsUpdate {\n /**\n * If this organization has seat-based pricing enabled\n */\n seat_based_pricing_enabled?: boolean;\n /**\n * If this organization has the Member model enabled\n */\n member_model_enabled?: boolean;\n /**\n * If this organization has checkout localization enabled\n */\n checkout_localization_enabled?: boolean;\n /**\n * Ordered list of metric slugs shown on the dashboard overview.\n */\n overview_metrics?: string[] | null;\n}\n/**\n * OrganizationIndividualLegalEntitySchema\n */\nexport interface OrganizationIndividualLegalEntitySchema {\n /**\n * type\n */\n type: \"individual\";\n}\n/**\n * OrganizationNotReadyForPayments\n */\nexport interface OrganizationNotReadyForPayments {\n /**\n * error\n */\n error: \"OrganizationNotReadyForPayments\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * OrganizationSocialLink\n */\nexport interface OrganizationSocialLink {\n /**\n * platform\n */\n platform: OrganizationSocialPlatforms;\n /**\n * The URL to the organization profile\n */\n url: string;\n}\n/**\n * OrganizationSubscriptionSettings\n */\nexport interface OrganizationSubscriptionSettings {\n /**\n * allow_multiple_subscriptions\n */\n allow_multiple_subscriptions: boolean;\n /**\n * proration_behavior\n */\n proration_behavior: PublicSubscriptionProrationBehavior;\n /**\n * benefit_revocation_grace_period\n */\n benefit_revocation_grace_period: number;\n /**\n * prevent_trial_abuse\n */\n prevent_trial_abuse: boolean;\n /**\n * allow_customer_updates\n */\n allow_customer_updates: boolean;\n}\n/**\n * OrganizationUpdate\n */\nexport interface OrganizationUpdate {\n /**\n * name\n */\n name?: string | null;\n /**\n * avatar_url\n */\n avatar_url?: string | null;\n /**\n * Public support email.\n */\n email?: string | null;\n /**\n * Official website of the organization.\n */\n website?: string | null;\n /**\n * Links to social profiles.\n */\n socials?: OrganizationSocialLink[] | null;\n /**\n * Additional, private, business details Polar needs about active organizations for compliance (KYC).\n */\n details?: OrganizationDetails | null;\n /**\n * Two-letter country code (ISO 3166-1 alpha-2).\n */\n country?: CountryAlpha2Input | null;\n /**\n * feature_settings\n */\n feature_settings?: OrganizationFeatureSettingsUpdate | null;\n /**\n * subscription_settings\n */\n subscription_settings?: OrganizationSubscriptionSettings | null;\n /**\n * customer_email_settings\n */\n customer_email_settings?: OrganizationCustomerEmailSettings | null;\n /**\n * customer_portal_settings\n */\n customer_portal_settings?: OrganizationCustomerPortalSettings | null;\n /**\n * Default presentment currency for the organization\n */\n default_presentment_currency?: PresentmentCurrency | null;\n /**\n * Default tax behavior applied on products.\n */\n default_tax_behavior?: TaxBehaviorOption | null;\n /**\n * Whether members must access this organization through its SSO connection. Turning this on requires an active SSO session for this organization and at least one enabled SSO connection.\n */\n sso_enforced?: boolean | null;\n}\n/**\n * Pagination\n */\nexport interface Pagination {\n /**\n * total_count\n */\n total_count: number;\n /**\n * max_page\n */\n max_page: number;\n}\n/**\n * PauseResumeNotAllowed\n */\nexport interface PauseResumeNotAllowed {\n /**\n * error\n */\n error: \"PauseResumeNotAllowed\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * PaymentActionRequired\n */\nexport interface PaymentActionRequired {\n /**\n * error\n */\n error: \"PaymentActionRequired\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * PaymentAlreadyInProgress\n */\nexport interface PaymentAlreadyInProgress {\n /**\n * error\n */\n error: \"PaymentAlreadyInProgress\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * PaymentError\n */\nexport interface PaymentError {\n /**\n * error\n */\n error: \"PaymentError\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * PaymentFailed\n */\nexport interface PaymentFailed {\n /**\n * error\n */\n error: \"PaymentFailed\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * PaymentMethodCard\n */\nexport interface PaymentMethodCard {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * processor\n */\n processor: PaymentProcessor;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * type\n */\n type: \"card\";\n /**\n * method_metadata\n */\n method_metadata: PaymentMethodCardMetadata;\n}\n/**\n * PaymentMethodCardMetadata\n */\nexport interface PaymentMethodCardMetadata {\n /**\n * brand\n */\n brand: string;\n /**\n * last4\n */\n last4: string;\n /**\n * exp_month\n */\n exp_month: number;\n /**\n * exp_year\n */\n exp_year: number;\n /**\n * wallet\n */\n wallet?: string | null;\n}\n/**\n * PaymentMethodGeneric\n */\nexport interface PaymentMethodGeneric {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * processor\n */\n processor: PaymentProcessor;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * type\n */\n type: string;\n}\n/**\n * PaymentMethodInUseByActiveSubscription\n */\nexport interface PaymentMethodInUseByActiveSubscription {\n /**\n * error\n */\n error: \"PaymentMethodInUseByActiveSubscription\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * PaymentMethodSetupFailed\n */\nexport interface PaymentMethodSetupFailed {\n /**\n * error\n */\n error: \"PaymentMethodSetupFailed\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * PaymentNotReady\n */\nexport interface PaymentNotReady {\n /**\n * error\n */\n error: \"PaymentNotReady\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * Pending update to be applied to a subscription at the beginning of the next period.\n */\nexport interface PendingSubscriptionUpdate {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The date and time when the subscription update will be applied.\n */\n applies_at: string;\n /**\n * ID of the new product to apply to the subscription. If `null`, the product won't be changed.\n */\n product_id: string | null;\n /**\n * Number of seats to apply to the subscription. If `null`, the number of seats won't be changed.\n */\n seats: number | null;\n}\n/**\n * Information about the authenticated portal user.\n */\nexport interface PortalAuthenticatedUser {\n /**\n * Type of authenticated user: 'customer' or 'member'\n */\n type: string;\n /**\n * User's name, if available.\n */\n name: string | null;\n /**\n * User's email address.\n */\n email: string;\n /**\n * Associated customer ID.\n */\n customer_id: string;\n /**\n * Member ID. Only set for members.\n */\n member_id?: string | null;\n /**\n * Member role (owner, billing_manager, member). Only set for members.\n */\n role?: string | null;\n}\n/**\n * A product.\n */\nexport interface Product {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count: number | null;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description: string | null;\n /**\n * visibility\n */\n visibility: ProductVisibility;\n /**\n * The recurring interval of the product. If `None`, the product is a one-time purchase.\n */\n recurring_interval: RecurringInterval | null;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.\n */\n recurring_interval_count: number | null;\n /**\n * The meter cycle of the product, independent of the billing interval. If `None`, metered concerns follow the billing interval.\n */\n meter_interval: RecurringInterval | null;\n /**\n * Number of meter interval units. None when no meter cycle is set.\n */\n meter_interval_count: number | null;\n /**\n * Whether the product is a subscription.\n */\n is_recurring: boolean;\n /**\n * Whether the product is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the organization owning the product.\n */\n organization_id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * List of prices for this product.\n */\n prices: (LegacyRecurringProductPrice | ProductPrice)[];\n /**\n * List of benefits granted by the product.\n */\n benefits: Benefit[];\n /**\n * List of medias associated to the product.\n */\n medias: ProductMediaFileRead[];\n /**\n * List of custom fields attached to the product.\n */\n attached_custom_fields: AttachedCustomField[];\n}\n/**\n * Schema to update the benefits granted by a product.\n */\nexport interface ProductBenefitsUpdate {\n /**\n * List of benefit IDs. Each one must be on the same organization as the product.\n */\n benefits: string[];\n}\n/**\n * ProductCreateOneTime\n */\nexport interface ProductCreateOneTime {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description?: string | null;\n /**\n * visibility\n */\n visibility?: ProductVisibility;\n /**\n * List of available prices for this product. It may combine at most one fixed price with one seat-based price (billed as `fixed + seat_charge`), or contain a single custom or free price, plus any number of metered prices. A free price cannot be combined with other prices, and a custom price cannot be combined with a fixed or seat-based price. Metered prices are not supported on one-time purchase products.\n */\n prices: (\n | ProductPriceFixedCreate\n | ProductPriceCustomCreate\n | ProductPriceSeatBasedCreate\n | ProductPriceMeteredUnitCreate\n )[];\n /**\n * List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded.\n */\n medias?: string[] | null;\n /**\n * List of custom fields to attach.\n */\n attached_custom_fields?: AttachedCustomFieldCreate[];\n /**\n * The ID of the organization owning the product. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * States that the product is a one-time purchase.\n */\n recurring_interval?: null;\n /**\n * One-time products don't have a recurring interval count.\n */\n recurring_interval_count?: null;\n}\n/**\n * ProductCreateRecurring\n */\nexport interface ProductCreateRecurring {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The name of the product.\n */\n name: string;\n /**\n * The description of the product.\n */\n description?: string | null;\n /**\n * visibility\n */\n visibility?: ProductVisibility;\n /**\n * List of available prices for this product. It may combine at most one fixed price with one seat-based price (billed as `fixed + seat_charge`), or contain a single custom or free price, plus any number of metered prices. A free price cannot be combined with other prices, and a custom price cannot be combined with a fixed or seat-based price. Metered prices are not supported on one-time purchase products.\n */\n prices: (\n | ProductPriceFixedCreate\n | ProductPriceCustomCreate\n | ProductPriceSeatBasedCreate\n | ProductPriceMeteredUnitCreate\n )[];\n /**\n * List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded.\n */\n medias?: string[] | null;\n /**\n * List of custom fields to attach.\n */\n attached_custom_fields?: AttachedCustomFieldCreate[];\n /**\n * The ID of the organization owning the product. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n /**\n * The interval unit for the trial period.\n */\n trial_interval?: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count?: number | null;\n /**\n * recurring_interval\n */\n recurring_interval: RecurringInterval;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.\n */\n recurring_interval_count?: number;\n /**\n * Optional meter cycle, independent of the billing interval. When set, overage settlement, meter resets and meter-credit grants run on this cadence rather than the billing interval — e.g. yearly billing with monthly credits. It must evenly divide the billing interval. If `None`, metered concerns follow the billing interval. **Once set, it can't be changed.**\n */\n meter_interval?: RecurringInterval | null;\n /**\n * Number of meter interval units. Defaults to 1 when `meter_interval` is set. Ignored when `meter_interval` is `None`.\n */\n meter_interval_count?: number | null;\n}\n/**\n * Schema to create a file to be used as a product media file.\n */\nexport interface ProductMediaFileCreate {\n /**\n * organization_id\n */\n organization_id?: string | null;\n /**\n * name\n */\n name: string;\n /**\n * MIME type of the file. Only images are supported for this type of file.\n */\n mime_type: string;\n /**\n * Size of the file. A maximum of 10 MB is allowed for this type of file.\n */\n size: number;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64?: string | null;\n /**\n * upload\n */\n upload: S3FileCreateMultipart;\n /**\n * service\n */\n service: \"product_media\";\n /**\n * version\n */\n version?: string | null;\n}\n/**\n * File to be used as a product media file.\n */\nexport interface ProductMediaFileRead {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * name\n */\n name: string;\n /**\n * path\n */\n path: string;\n /**\n * mime_type\n */\n mime_type: string;\n /**\n * size\n */\n size: number;\n /**\n * storage_version\n */\n storage_version: string | null;\n /**\n * checksum_etag\n */\n checksum_etag: string | null;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64: string | null;\n /**\n * checksum_sha256_hex\n */\n checksum_sha256_hex: string | null;\n /**\n * last_modified_at\n */\n last_modified_at: string | null;\n /**\n * version\n */\n version: string | null;\n /**\n * service\n */\n service: \"product_media\";\n /**\n * is_uploaded\n */\n is_uploaded: boolean;\n /**\n * created_at\n */\n created_at: string;\n /**\n * size_readable\n */\n size_readable: string;\n /**\n * public_url\n */\n public_url: string;\n}\n/**\n * A pay-what-you-want price for a product.\n */\nexport interface ProductPriceCustom {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the price.\n */\n id: string;\n /**\n * source\n */\n source: ProductPriceSource;\n /**\n * amount_type\n */\n amount_type: \"custom\";\n /**\n * The currency in which the customer will be charged.\n */\n price_currency: string;\n /**\n * The tax behavior of the price. If null, it defaults to the organization's default tax behavior.\n */\n tax_behavior: TaxBehaviorOption | null;\n /**\n * Whether the price is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the product owning the price.\n */\n product_id: string;\n /**\n * The minimum amount the customer can pay. If 0, the price is 'free or pay what you want'.\n */\n minimum_amount: number;\n /**\n * The maximum amount the customer can pay.\n */\n maximum_amount: number | null;\n /**\n * The initial amount shown to the customer.\n */\n preset_amount: number | null;\n}\n/**\n * Schema to create a pay-what-you-want price.\n */\nexport interface ProductPriceCustomCreate {\n /**\n * amount_type\n */\n amount_type: \"custom\";\n /**\n * price_currency\n */\n price_currency?: PresentmentCurrency;\n /**\n * The tax behavior of the price. If not set, it will default to the organization's default tax behavior.\n */\n tax_behavior?: TaxBehaviorOption | null;\n /**\n * The minimum amount the customer can pay. If set to 0, the price is 'free or pay what you want' and $0 is accepted. If set to a value below the minimum price amount for the currency, it will be rejected. Defaults to the minimum price amount for the currency. Minimum per currency:\n- USD: 0.5\n- AED: 2\n- ALL: 50\n- AMD: 200\n- AOA: 500\n- ARS: 750\n- AUD: 0.7\n- AWG: 1\n- AZN: 1\n- BAM: 1\n- BBD: 2\n- BDT: 70\n- BIF: 2,000\n- BMD: 1\n- BND: 1\n- BOB: 5\n- BRL: 2.5\n- BSD: 1\n- BWP: 10\n- BZD: 2\n- CAD: 0.7\n- CDF: 2,000\n- CHF: 0.5\n- CLP: 500\n- CNY: 5\n- COP: 2,000\n- CRC: 300\n- CVE: 50\n- CZK: 15\n- DJF: 100\n- DKK: 3.2\n- DOP: 40\n- DZD: 70\n- EGP: 30\n- ETB: 80\n- EUR: 0.5\n- FJD: 2\n- FKP: 1\n- GBP: 0.4\n- GEL: 2\n- GNF: 5,000\n- GIP: 1\n- GMD: 40\n- GTQ: 5\n- GYD: 200\n- HKD: 4\n- HNL: 20\n- HTG: 70\n- HUF: 175\n- IDR: 9,000\n- ILS: 1.5\n- INR: 60\n- ISK: 70\n- JMD: 80\n- JPY: 80\n- KES: 70\n- KGS: 50\n- KHR: 3,000\n- KMF: 500\n- KRW: 800\n- KYD: 1\n- KZT: 300\n- LAK: 20,000\n- LKR: 200\n- LRD: 100\n- LSL: 10\n- MAD: 5\n- MDL: 10\n- MGA: 3,000\n- MKD: 50\n- MNT: 2,000\n- MOP: 5\n- MUR: 50\n- MVR: 8\n- MXN: 9\n- MWK: 1,000\n- MYR: 2\n- MZN: 50\n- NAD: 10\n- NGN: 700\n- NIO: 20\n- NOK: 5\n- NPR: 80\n- NZD: 0.9\n- PAB: 1\n- PEN: 2\n- PGK: 3\n- PHP: 35\n- PKR: 200\n- PLN: 2\n- PYG: 4,000\n- QAR: 2\n- RON: 2.5\n- RSD: 60\n- RWF: 1,000\n- SAR: 2\n- SBD: 4\n- SCR: 8\n- SEK: 5\n- SGD: 0.7\n- SHP: 1\n- SOS: 500\n- SRD: 20\n- SZL: 10\n- THB: 20\n- TJS: 5\n- TOP: 2\n- TRY: 30\n- TTD: 4\n- TWD: 20\n- TZS: 2,000\n- UAH: 30\n- UGX: 2,000\n- UYU: 20\n- UZS: 7,000\n- VND: 20,000\n- VUV: 100\n- WST: 2\n- XAF: 500\n- XCD: 2\n- XCG: 1\n- XOF: 500\n- XPF: 100\n- YER: 200\n- ZAR: 9\n- ZMW: 10\n- Other currencies: 50 minor units\n */\n minimum_amount?: number;\n /**\n * The maximum amount the customer can pay. Maximum per currency:\n- USD: 999,999.99\n- EUR: 999,999.99\n- GBP: 999,999.99\n- ARS: 1,400,000\n- CDF: 2,800,000\n- COP: 4,000,000\n- IDR: 16,000,000\n- KHR: 4,000,000\n- LAK: 21,000,000\n- MNT: 3,500,000\n- MWK: 1,750,000\n- NGN: 1,550,000\n- TZS: 2,500,000\n- UGX: 3,700,000\n- UZS: 12,500,000\n- Other currencies: 99,999,999 minor units\n */\n maximum_amount?: number | null;\n /**\n * The initial amount shown to the customer. If 0, the customer will see $0 as the default. If set to a value below the minimum price amount for the currency, it will be rejected.Minimum per currency:\n- USD: 0.5\n- AED: 2\n- ALL: 50\n- AMD: 200\n- AOA: 500\n- ARS: 750\n- AUD: 0.7\n- AWG: 1\n- AZN: 1\n- BAM: 1\n- BBD: 2\n- BDT: 70\n- BIF: 2,000\n- BMD: 1\n- BND: 1\n- BOB: 5\n- BRL: 2.5\n- BSD: 1\n- BWP: 10\n- BZD: 2\n- CAD: 0.7\n- CDF: 2,000\n- CHF: 0.5\n- CLP: 500\n- CNY: 5\n- COP: 2,000\n- CRC: 300\n- CVE: 50\n- CZK: 15\n- DJF: 100\n- DKK: 3.2\n- DOP: 40\n- DZD: 70\n- EGP: 30\n- ETB: 80\n- EUR: 0.5\n- FJD: 2\n- FKP: 1\n- GBP: 0.4\n- GEL: 2\n- GNF: 5,000\n- GIP: 1\n- GMD: 40\n- GTQ: 5\n- GYD: 200\n- HKD: 4\n- HNL: 20\n- HTG: 70\n- HUF: 175\n- IDR: 9,000\n- ILS: 1.5\n- INR: 60\n- ISK: 70\n- JMD: 80\n- JPY: 80\n- KES: 70\n- KGS: 50\n- KHR: 3,000\n- KMF: 500\n- KRW: 800\n- KYD: 1\n- KZT: 300\n- LAK: 20,000\n- LKR: 200\n- LRD: 100\n- LSL: 10\n- MAD: 5\n- MDL: 10\n- MGA: 3,000\n- MKD: 50\n- MNT: 2,000\n- MOP: 5\n- MUR: 50\n- MVR: 8\n- MXN: 9\n- MWK: 1,000\n- MYR: 2\n- MZN: 50\n- NAD: 10\n- NGN: 700\n- NIO: 20\n- NOK: 5\n- NPR: 80\n- NZD: 0.9\n- PAB: 1\n- PEN: 2\n- PGK: 3\n- PHP: 35\n- PKR: 200\n- PLN: 2\n- PYG: 4,000\n- QAR: 2\n- RON: 2.5\n- RSD: 60\n- RWF: 1,000\n- SAR: 2\n- SBD: 4\n- SCR: 8\n- SEK: 5\n- SGD: 0.7\n- SHP: 1\n- SOS: 500\n- SRD: 20\n- SZL: 10\n- THB: 20\n- TJS: 5\n- TOP: 2\n- TRY: 30\n- TTD: 4\n- TWD: 20\n- TZS: 2,000\n- UAH: 30\n- UGX: 2,000\n- UYU: 20\n- UZS: 7,000\n- VND: 20,000\n- VUV: 100\n- WST: 2\n- XAF: 500\n- XCD: 2\n- XCG: 1\n- XOF: 500\n- XPF: 100\n- YER: 200\n- ZAR: 9\n- ZMW: 10\n- Other currencies: 50 minor units\n */\n preset_amount?: number | null;\n}\n/**\n * A fixed price for a product.\n */\nexport interface ProductPriceFixed {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the price.\n */\n id: string;\n /**\n * source\n */\n source: ProductPriceSource;\n /**\n * amount_type\n */\n amount_type: \"fixed\";\n /**\n * The currency in which the customer will be charged.\n */\n price_currency: string;\n /**\n * The tax behavior of the price. If null, it defaults to the organization's default tax behavior.\n */\n tax_behavior: TaxBehaviorOption | null;\n /**\n * Whether the price is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the product owning the price.\n */\n product_id: string;\n /**\n * The price in cents.\n */\n price_amount: number;\n}\n/**\n * Schema to create a fixed price.\n */\nexport interface ProductPriceFixedCreate {\n /**\n * amount_type\n */\n amount_type: \"fixed\";\n /**\n * price_currency\n */\n price_currency?: PresentmentCurrency;\n /**\n * The tax behavior of the price. If not set, it will default to the organization's default tax behavior.\n */\n tax_behavior?: TaxBehaviorOption | null;\n /**\n * The price in cents. Set to `0` for a free price.\nMinimum amounts per currency:\n- USD: 0.5\n- AED: 2\n- ALL: 50\n- AMD: 200\n- AOA: 500\n- ARS: 750\n- AUD: 0.7\n- AWG: 1\n- AZN: 1\n- BAM: 1\n- BBD: 2\n- BDT: 70\n- BIF: 2,000\n- BMD: 1\n- BND: 1\n- BOB: 5\n- BRL: 2.5\n- BSD: 1\n- BWP: 10\n- BZD: 2\n- CAD: 0.7\n- CDF: 2,000\n- CHF: 0.5\n- CLP: 500\n- CNY: 5\n- COP: 2,000\n- CRC: 300\n- CVE: 50\n- CZK: 15\n- DJF: 100\n- DKK: 3.2\n- DOP: 40\n- DZD: 70\n- EGP: 30\n- ETB: 80\n- EUR: 0.5\n- FJD: 2\n- FKP: 1\n- GBP: 0.4\n- GEL: 2\n- GNF: 5,000\n- GIP: 1\n- GMD: 40\n- GTQ: 5\n- GYD: 200\n- HKD: 4\n- HNL: 20\n- HTG: 70\n- HUF: 175\n- IDR: 9,000\n- ILS: 1.5\n- INR: 60\n- ISK: 70\n- JMD: 80\n- JPY: 80\n- KES: 70\n- KGS: 50\n- KHR: 3,000\n- KMF: 500\n- KRW: 800\n- KYD: 1\n- KZT: 300\n- LAK: 20,000\n- LKR: 200\n- LRD: 100\n- LSL: 10\n- MAD: 5\n- MDL: 10\n- MGA: 3,000\n- MKD: 50\n- MNT: 2,000\n- MOP: 5\n- MUR: 50\n- MVR: 8\n- MXN: 9\n- MWK: 1,000\n- MYR: 2\n- MZN: 50\n- NAD: 10\n- NGN: 700\n- NIO: 20\n- NOK: 5\n- NPR: 80\n- NZD: 0.9\n- PAB: 1\n- PEN: 2\n- PGK: 3\n- PHP: 35\n- PKR: 200\n- PLN: 2\n- PYG: 4,000\n- QAR: 2\n- RON: 2.5\n- RSD: 60\n- RWF: 1,000\n- SAR: 2\n- SBD: 4\n- SCR: 8\n- SEK: 5\n- SGD: 0.7\n- SHP: 1\n- SOS: 500\n- SRD: 20\n- SZL: 10\n- THB: 20\n- TJS: 5\n- TOP: 2\n- TRY: 30\n- TTD: 4\n- TWD: 20\n- TZS: 2,000\n- UAH: 30\n- UGX: 2,000\n- UYU: 20\n- UZS: 7,000\n- VND: 20,000\n- VUV: 100\n- WST: 2\n- XAF: 500\n- XCD: 2\n- XCG: 1\n- XOF: 500\n- XPF: 100\n- YER: 200\n- ZAR: 9\n- ZMW: 10\n- Other currencies: 50 minor units\n */\n price_amount: number;\n}\n/**\n * A meter associated to a metered price.\n */\nexport interface ProductPriceMeter {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The name of the meter.\n */\n name: string;\n /**\n * unit\n */\n unit: MeterUnit;\n /**\n * The label for the custom unit.\n */\n custom_label: string | null;\n /**\n * The multiplier to convert from base unit to display scale.\n */\n custom_multiplier: number | null;\n}\n/**\n * A metered, usage-based, price for a product, with a fixed unit price.\n */\nexport interface ProductPriceMeteredUnit {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the price.\n */\n id: string;\n /**\n * source\n */\n source: ProductPriceSource;\n /**\n * amount_type\n */\n amount_type: \"metered_unit\";\n /**\n * The currency in which the customer will be charged.\n */\n price_currency: string;\n /**\n * The tax behavior of the price. If null, it defaults to the organization's default tax behavior.\n */\n tax_behavior: TaxBehaviorOption | null;\n /**\n * Whether the price is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the product owning the price.\n */\n product_id: string;\n /**\n * The price per unit in cents.\n */\n unit_amount: string;\n /**\n * The maximum amount in cents that can be charged, regardless of the number of units consumed.\n */\n cap_amount: number | null;\n /**\n * The ID of the meter associated to the price.\n */\n meter_id: string;\n /**\n * meter\n */\n meter: ProductPriceMeter;\n}\n/**\n * Schema to create a metered price with a fixed unit price.\n */\nexport interface ProductPriceMeteredUnitCreate {\n /**\n * amount_type\n */\n amount_type: \"metered_unit\";\n /**\n * price_currency\n */\n price_currency?: PresentmentCurrency;\n /**\n * The tax behavior of the price. If not set, it will default to the organization's default tax behavior.\n */\n tax_behavior?: TaxBehaviorOption | null;\n /**\n * The ID of the meter associated to the price.\n */\n meter_id: string;\n /**\n * The price per unit in cents. Supports up to 12 decimal places.\n */\n unit_amount: number | string;\n /**\n * Optional maximum amount in cents that can be charged, regardless of the number of units consumed.\n */\n cap_amount?: number | null;\n}\n/**\n * A seat-based price for a product.\n */\nexport interface ProductPriceSeatBased {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the price.\n */\n id: string;\n /**\n * source\n */\n source: ProductPriceSource;\n /**\n * amount_type\n */\n amount_type: \"seat_based\";\n /**\n * The currency in which the customer will be charged.\n */\n price_currency: string;\n /**\n * The tax behavior of the price. If null, it defaults to the organization's default tax behavior.\n */\n tax_behavior: TaxBehaviorOption | null;\n /**\n * Whether the price is archived and no longer available.\n */\n is_archived: boolean;\n /**\n * The ID of the product owning the price.\n */\n product_id: string;\n /**\n * seat_tiers\n */\n seat_tiers: ProductPriceSeatTiersOutput;\n}\n/**\n * Schema to create a seat-based price with volume-based tiers.\n */\nexport interface ProductPriceSeatBasedCreate {\n /**\n * amount_type\n */\n amount_type: \"seat_based\";\n /**\n * price_currency\n */\n price_currency?: PresentmentCurrency;\n /**\n * The tax behavior of the price. If not set, it will default to the organization's default tax behavior.\n */\n tax_behavior?: TaxBehaviorOption | null;\n /**\n * seat_tiers\n */\n seat_tiers: ProductPriceSeatTiersInput;\n}\n/**\n * A pricing tier for seat-based pricing.\n */\nexport interface ProductPriceSeatTier {\n /**\n * Minimum number of seats (inclusive)\n */\n min_seats: number;\n /**\n * Maximum number of seats (inclusive). None for unlimited.\n */\n max_seats?: number | null;\n /**\n * Price per seat in cents for this tier\n */\n price_per_seat: number;\n}\n/**\n * List of pricing tiers for seat-based pricing.\n\nThe minimum and maximum seat limits are derived from the tiers:\n- minimum_seats = first tier's min_seats\n- maximum_seats = last tier's max_seats (None for unlimited)\n */\nexport interface ProductPriceSeatTiersInput {\n /**\n * seat_tier_type\n */\n seat_tier_type?: SeatTierType;\n /**\n * List of pricing tiers\n */\n tiers: ProductPriceSeatTier[];\n}\n/**\n * List of pricing tiers for seat-based pricing.\n\nThe minimum and maximum seat limits are derived from the tiers:\n- minimum_seats = first tier's min_seats\n- maximum_seats = last tier's max_seats (None for unlimited)\n */\nexport interface ProductPriceSeatTiersOutput {\n /**\n * seat_tier_type\n */\n seat_tier_type?: SeatTierType;\n /**\n * List of pricing tiers\n */\n tiers: ProductPriceSeatTier[];\n /**\n * Minimum number of seats required for purchase, derived from first tier.\n */\n minimum_seats: number;\n /**\n * Maximum number of seats allowed for purchase, derived from last tier. None for unlimited.\n */\n maximum_seats: number | null;\n}\n/**\n * Schema to update a product.\n */\nexport interface ProductUpdate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The interval unit for the trial period.\n */\n trial_interval?: TrialInterval | null;\n /**\n * The number of interval units for the trial period.\n */\n trial_interval_count?: number | null;\n /**\n * name\n */\n name?: string | null;\n /**\n * The description of the product.\n */\n description?: string | null;\n /**\n * The recurring interval of the product. If `None`, the product is a one-time purchase. **Can only be set on legacy recurring products. Once set, it can't be changed.**\n */\n recurring_interval?: RecurringInterval | null;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. Once set, it can't be changed.**\n */\n recurring_interval_count?: number | null;\n /**\n * 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.\n */\n is_archived?: boolean | null;\n /**\n * The visibility of the product.\n */\n visibility?: ProductVisibility | null;\n /**\n * List of available prices for this product. If you want to keep existing prices, include them in the list as an `ExistingProductPrice` object.\n */\n prices?:\n | (\n | ExistingProductPrice\n | (\n | ProductPriceFixedCreate\n | ProductPriceCustomCreate\n | ProductPriceSeatBasedCreate\n | ProductPriceMeteredUnitCreate\n )\n )[]\n | null;\n /**\n * List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded.\n */\n medias?: string[] | null;\n /**\n * attached_custom_fields\n */\n attached_custom_fields?: AttachedCustomFieldCreate[] | null;\n}\n/**\n * PropertyAggregation\n */\nexport interface PropertyAggregation {\n /**\n * func\n */\n func: Func;\n /**\n * property\n */\n property: string;\n}\n/**\n * Refund\n */\nexport interface Refund {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * status\n */\n status: RefundStatus;\n /**\n * reason\n */\n reason: RefundReason;\n /**\n * amount\n */\n amount: number;\n /**\n * tax_amount\n */\n tax_amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * order_id\n */\n order_id: string;\n /**\n * subscription_id\n */\n subscription_id: string | null;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * revoke_benefits\n */\n revoke_benefits: boolean;\n /**\n * dispute\n */\n dispute: RefundDispute | null;\n}\n/**\n * RefundCreate\n */\nexport interface RefundCreate {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * order_id\n */\n order_id: string;\n /**\n * Reason for the refund.\n */\n reason: Reason;\n /**\n * Amount to refund in cents. Minimum is 1.\n */\n amount: number;\n /**\n * An internal comment about the refund.\n */\n comment?: string | null;\n /**\n * Should this refund trigger the associated customer benefits to be revoked?\n\n**Note:**\nOnly allowed in case the `order` is a one-time purchase.\nSubscriptions automatically revoke customer benefits once the\nsubscription itself is revoked, i.e fully canceled.\n */\n revoke_benefits?: boolean;\n}\n/**\n * Dispute associated with a refund,\nin case we prevented a dispute by issuing a refund.\n */\nexport interface RefundDispute {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * status\n */\n status: DisputeStatus;\n /**\n * Whether the dispute has been resolved (won or lost).\n */\n resolved: boolean;\n /**\n * Whether the dispute is closed (prevented, won, or lost).\n */\n closed: boolean;\n /**\n * Amount in cents disputed.\n */\n amount: number;\n /**\n * Tax amount in cents disputed.\n */\n tax_amount: number;\n /**\n * Currency code of the dispute.\n */\n currency: string;\n /**\n * The reason for the dispute as reported by the card network (e.g. `fraudulent`, `product_not_received`). `None` until the processor reports it.\n */\n reason: string | null;\n /**\n * Deadline to submit evidence in response to the dispute. `None` when no response is required.\n */\n evidence_due_by: string | null;\n /**\n * Whether the evidence submission deadline has passed.\n */\n past_due: boolean;\n /**\n * The ID of the order associated with the dispute.\n */\n order_id: string;\n /**\n * The ID of the payment associated with the dispute.\n */\n payment_id: string;\n}\n/**\n * RefundedAlready\n */\nexport interface RefundedAlready {\n /**\n * error\n */\n error: \"RefundedAlready\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * ResourceNotFound\n */\nexport interface ResourceNotFound {\n /**\n * error\n */\n error: \"ResourceNotFound\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * RevokeTokenResponse\n */\nexport interface RevokeTokenResponse extends Record<string, never> {}\n/**\n * S3DownloadURL\n */\nexport interface S3DownloadURL {\n /**\n * url\n */\n url: string;\n /**\n * headers\n */\n headers?: Record<string, string>;\n /**\n * expires_at\n */\n expires_at: string;\n}\n/**\n * S3FileCreateMultipart\n */\nexport interface S3FileCreateMultipart {\n /**\n * parts\n */\n parts: S3FileCreatePart[];\n}\n/**\n * S3FileCreatePart\n */\nexport interface S3FileCreatePart {\n /**\n * number\n */\n number: number;\n /**\n * chunk_start\n */\n chunk_start: number;\n /**\n * chunk_end\n */\n chunk_end: number;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64?: string | null;\n}\n/**\n * S3FileUploadCompletedPart\n */\nexport interface S3FileUploadCompletedPart {\n /**\n * number\n */\n number: number;\n /**\n * checksum_etag\n */\n checksum_etag: string;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64: string | null;\n}\n/**\n * S3FileUploadMultipart\n */\nexport interface S3FileUploadMultipart {\n /**\n * id\n */\n id: string;\n /**\n * path\n */\n path: string;\n /**\n * parts\n */\n parts: S3FileUploadPart[];\n}\n/**\n * S3FileUploadPart\n */\nexport interface S3FileUploadPart {\n /**\n * number\n */\n number: number;\n /**\n * chunk_start\n */\n chunk_start: number;\n /**\n * chunk_end\n */\n chunk_end: number;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64?: string | null;\n /**\n * url\n */\n url: string;\n /**\n * expires_at\n */\n expires_at: string;\n /**\n * headers\n */\n headers?: Record<string, string>;\n}\n/**\n * SSOEnforcementRequiresConnection\n */\nexport interface SSOEnforcementRequiresConnection {\n /**\n * error\n */\n error: \"SSOEnforcementRequiresConnection\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * SeatAssign\n */\nexport interface SeatAssign {\n /**\n * Subscription ID. Required if neither order_id nor checkout_id is provided.\n */\n subscription_id?: string | null;\n /**\n * Order ID for one-time purchases. Required if subscription_id is not provided.\n */\n order_id?: string | null;\n /**\n * Email of the customer to assign the seat to\n */\n email?: string | null;\n /**\n * External customer ID for the seat assignment\n */\n external_customer_id?: string | null;\n /**\n * Customer ID for the seat assignment\n */\n customer_id?: string | null;\n /**\n * External member ID for the seat assignment. Can be used alone (lookup existing member) or with email (create/validate member).\n */\n external_member_id?: string | null;\n /**\n * Member ID for the seat assignment.\n */\n member_id?: string | null;\n /**\n * Additional metadata for the seat (max 10 keys, 1KB total)\n */\n metadata?: Record<string, unknown> | null;\n /**\n * If true, the seat will be immediately claimed without sending an invitation email. API-only feature.\n */\n immediate_claim?: boolean;\n}\n/**\n * SeatClaim\n */\nexport interface SeatClaim {\n /**\n * Invitation token to claim the seat\n */\n invitation_token: string;\n}\n/**\n * Read-only information about a seat claim invitation.\nSafe for email scanners - no side effects when fetched.\n */\nexport interface SeatClaimInfo {\n /**\n * Name of the product\n */\n product_name: string;\n /**\n * ID of the product\n */\n product_id: string;\n /**\n * Name of the organization\n */\n organization_name: string;\n /**\n * Slug of the organization\n */\n organization_slug: string;\n /**\n * Email of the customer assigned to this seat\n */\n customer_email: string;\n /**\n * Whether the seat can be claimed\n */\n can_claim: boolean;\n}\n/**\n * SeatsList\n */\nexport interface SeatsList {\n /**\n * List of seats\n */\n seats: CustomerSeat[];\n /**\n * Number of available seats\n */\n available_seats: number;\n /**\n * Total number of seats for the subscription\n */\n total_seats: number;\n}\n/**\n * Subscription\n */\nexport interface Subscription {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The amount of the subscription.\n */\n amount: number;\n /**\n * The currency of the subscription.\n */\n currency: string;\n /**\n * recurring_interval\n */\n recurring_interval: RecurringInterval;\n /**\n * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.\n */\n recurring_interval_count: number;\n /**\n * status\n */\n status: SubscriptionStatus;\n /**\n * The start timestamp of the current billing period.\n */\n current_period_start: string;\n /**\n * The end timestamp of the current billing period.\n */\n current_period_end: string;\n /**\n * The start timestamp of the current meter period, if the product has a meter cycle set. Metered credits are granted and overage is settled on this cadence.\n */\n current_meter_period_start: string | null;\n /**\n * The end timestamp of the current meter period, if the product has a meter cycle set. This is when credits next renew.\n */\n current_meter_period_end: string | null;\n /**\n * The start timestamp of the trial period, if any.\n */\n trial_start: string | null;\n /**\n * The end timestamp of the trial period, if any.\n */\n trial_end: string | null;\n /**\n * Whether the subscription will be canceled at the end of the current period.\n */\n cancel_at_period_end: boolean;\n /**\n * The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.\n */\n canceled_at: string | null;\n /**\n * The timestamp when the subscription started.\n */\n started_at: string | null;\n /**\n * The timestamp when the subscription will end.\n */\n ends_at: string | null;\n /**\n * The timestamp when the subscription ended.\n */\n ended_at: string | null;\n /**\n * The timestamp when the subscription entered `past_due` status.\n */\n past_due_at?: string | null;\n /**\n * Whether the subscription will be paused at the end of the current period.\n */\n pause_at_period_end: boolean;\n /**\n * The timestamp when the subscription was paused.\n */\n paused_at: string | null;\n /**\n * The timestamp when a paused subscription is scheduled to automatically resume, if set.\n */\n resumes_at: string | null;\n /**\n * The ID of the subscribed customer.\n */\n customer_id: string;\n /**\n * The ID of the subscribed product.\n */\n product_id: string;\n /**\n * The ID of the applied discount, if any.\n */\n discount_id: string | null;\n /**\n * checkout_id\n */\n checkout_id: string | null;\n /**\n * The number of seats for seat-based subscriptions. None for non-seat subscriptions.\n */\n seats?: number | null;\n /**\n * customer_cancellation_reason\n */\n customer_cancellation_reason: CustomerCancellationReason | null;\n /**\n * customer_cancellation_comment\n */\n customer_cancellation_comment: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * Key-value object storing custom field values.\n */\n custom_field_data?: Record<string, string | number | boolean | string | null>;\n /**\n * customer\n */\n customer: SubscriptionCustomer;\n /**\n * product\n */\n product: Product;\n /**\n * discount\n */\n discount:\n | (\n | DiscountFixedOnceForeverDurationBase\n | DiscountFixedRepeatDurationBase\n | DiscountPercentageOnceForeverDurationBase\n | DiscountPercentageRepeatDurationBase\n )\n | null;\n /**\n * List of enabled prices for the subscription.\n */\n prices: (LegacyRecurringProductPrice | ProductPrice)[];\n /**\n * List of meters associated with the subscription.\n */\n meters: SubscriptionMeter[];\n /**\n * Pending subscription update that will be applied at the beginning of the next period. If `null`, there is no pending update.\n */\n pending_update: PendingSubscriptionUpdate | null;\n}\n/**\n * An event created by Polar when a subscription billing period is updated.\n */\nexport interface SubscriptionBillingPeriodUpdatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.billing_period_updated\";\n /**\n * metadata\n */\n metadata: SubscriptionBillingPeriodUpdatedMetadata;\n}\n/**\n * SubscriptionBillingPeriodUpdatedMetadata\n */\nexport interface SubscriptionBillingPeriodUpdatedMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * old_period_end\n */\n old_period_end: string;\n /**\n * new_period_end\n */\n new_period_end: string;\n}\n/**\n * SubscriptionCancel\n */\nexport interface SubscriptionCancel {\n /**\n * Customer reason for cancellation.\n\nHelpful to monitor reasons behind churn for future improvements.\n\nOnly set this in case your own service is requesting the reason from the\ncustomer. Or you know based on direct conversations, i.e support, with\nthe customer.\n\n* `too_expensive`: Too expensive for the customer.\n* `missing_features`: Customer is missing certain features.\n* `switched_service`: Customer switched to another service.\n* `unused`: Customer is not using it enough.\n* `customer_service`: Customer is not satisfied with the customer service.\n* `low_quality`: Customer is unhappy with the quality.\n* `too_complex`: Customer considers the service too complicated.\n* `other`: Other reason(s).\n */\n customer_cancellation_reason?: CustomerCancellationReason | null;\n /**\n * Customer feedback and why they decided to cancel.\n\n**IMPORTANT:**\nDo not use this to store internal notes! It's intended to be input\nfrom the customer and is therefore also available in their Polar\npurchases library.\n\nOnly set this in case your own service is requesting the reason from the\ncustomer. Or you copy a message directly from a customer\nconversation, i.e support.\n */\n customer_cancellation_comment?: string | null;\n /**\n * Cancel an active subscription once the current period ends.\n\nOr uncancel a subscription currently set to be revoked at period end.\n */\n cancel_at_period_end: boolean;\n}\n/**\n * An event created by Polar when a subscription is canceled.\n */\nexport interface SubscriptionCanceledEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.canceled\";\n /**\n * metadata\n */\n metadata: SubscriptionCanceledMetadata;\n}\n/**\n * SubscriptionCanceledMetadata\n */\nexport interface SubscriptionCanceledMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * recurring_interval\n */\n recurring_interval: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count: number;\n /**\n * customer_cancellation_reason\n */\n customer_cancellation_reason?: string;\n /**\n * customer_cancellation_comment\n */\n customer_cancellation_comment?: string;\n /**\n * canceled_at\n */\n canceled_at: string;\n /**\n * ends_at\n */\n ends_at?: string;\n /**\n * cancel_at_period_end\n */\n cancel_at_period_end?: boolean;\n}\n/**\n * Create a subscription for an existing customer.\n */\nexport interface SubscriptionCreateCustomer {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The ID of the recurring product to subscribe to. Must be a free product, otherwise the customer should go through a checkout flow.\n */\n product_id: string;\n /**\n * The ID of the customer to create the subscription for.\n */\n customer_id: string;\n}\n/**\n * Create a subscription for an existing customer identified by an external ID.\n */\nexport interface SubscriptionCreateExternalCustomer {\n /**\n * Key-value object allowing you to store additional information.\n\nThe key must be a string with a maximum length of **40 characters**.\nThe value must be either:\n\n* A string with a maximum length of **500 characters**\n* An integer\n* A floating-point number\n* A boolean\n\nYou can store up to **50 key-value pairs**.\n */\n metadata?: Record<string, string | number | number | boolean>;\n /**\n * The ID of the recurring product to subscribe to. Must be a free product, otherwise the customer should go through a checkout flow.\n */\n product_id: string;\n /**\n * The ID of the customer in your system to create the subscription for. It must already exist in Polar.\n */\n external_customer_id: string;\n}\n/**\n * An event created by Polar when a subscription is created.\n */\nexport interface SubscriptionCreatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.created\";\n /**\n * metadata\n */\n metadata: SubscriptionCreatedMetadata;\n}\n/**\n * SubscriptionCreatedMetadata\n */\nexport interface SubscriptionCreatedMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * product_id\n */\n product_id: string;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * recurring_interval\n */\n recurring_interval: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count: number;\n /**\n * started_at\n */\n started_at: string;\n}\n/**\n * SubscriptionCustomer\n */\nexport interface SubscriptionCustomer {\n /**\n * The ID of the customer.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * metadata\n */\n metadata: MetadataOutputType;\n /**\n * The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.\n */\n external_id?: string | null;\n /**\n * The email address of the customer. This must be unique within the organization.\n */\n email?: string | null;\n /**\n * Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.\n */\n email_verified: boolean;\n /**\n * type\n */\n type: CustomerType;\n /**\n * The name of the customer.\n */\n name: string | null;\n /**\n * The name that should appear on the customer's invoices. Falls back to the customer name when not explicitly set.\n */\n billing_name: string | null;\n /**\n * billing_address\n */\n billing_address: Address | null;\n /**\n * tax_id\n */\n tax_id: unknown[] | null;\n /**\n * locale\n */\n locale?: string | null;\n /**\n * The ID of the organization owning the customer.\n */\n organization_id: string;\n /**\n * The ID of the customer's default payment method, if any. Use the payment methods endpoint to retrieve its details.\n */\n default_payment_method_id?: string | null;\n /**\n * Timestamp for when the customer was soft deleted.\n */\n deleted_at: string | null;\n /**\n * avatar_url\n */\n avatar_url: string | null;\n}\n/**\n * An event created by Polar when a subscription is cycled.\n */\nexport interface SubscriptionCycledEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.cycled\";\n /**\n * metadata\n */\n metadata: SubscriptionCycledMetadata;\n}\n/**\n * SubscriptionCycledMetadata\n */\nexport interface SubscriptionCycledMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * amount\n */\n amount?: number;\n /**\n * currency\n */\n currency?: string;\n /**\n * recurring_interval\n */\n recurring_interval?: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count?: number;\n}\n/**\n * SubscriptionLocked\n */\nexport interface SubscriptionLocked {\n /**\n * error\n */\n error: \"SubscriptionLocked\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * Current consumption and spending for a subscription meter.\n */\nexport interface SubscriptionMeter {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The number of consumed units so far in this billing period.\n */\n consumed_units: number;\n /**\n * The number of credited units so far in this billing period.\n */\n credited_units: number;\n /**\n * The amount due in cents so far in this billing period.\n */\n amount: number;\n /**\n * The ID of the meter.\n */\n meter_id: string;\n /**\n * meter\n */\n meter: Meter;\n}\n/**\n * An event created by Polar when a subscription becomes past due.\n */\nexport interface SubscriptionPastDueEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.past_due\";\n /**\n * metadata\n */\n metadata: SubscriptionPastDueMetadata;\n}\n/**\n * SubscriptionPastDueMetadata\n */\nexport interface SubscriptionPastDueMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * past_due_at\n */\n past_due_at: string;\n /**\n * amount\n */\n amount?: number;\n /**\n * currency\n */\n currency?: string;\n /**\n * recurring_interval\n */\n recurring_interval?: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count?: number;\n}\n/**\n * SubscriptionPause\n */\nexport interface SubscriptionPause {\n /**\n * Pause an active subscription at the end of the current period.\n\nOr cancel a scheduled pause on a subscription set to be paused at\nperiod end.\n */\n pause_at_period_end: boolean;\n /**\n * Date at which the paused subscription should automatically resume.\n\nIf not set, the subscription stays paused until it is resumed manually.\nMust be after the current period end.\n */\n resumes_at?: string | null;\n}\n/**\n * An event created by Polar when a subscription is paused.\n */\nexport interface SubscriptionPausedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.paused\";\n /**\n * metadata\n */\n metadata: SubscriptionPausedMetadata;\n}\n/**\n * SubscriptionPausedMetadata\n */\nexport interface SubscriptionPausedMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * amount\n */\n amount?: number;\n /**\n * currency\n */\n currency?: string;\n /**\n * recurring_interval\n */\n recurring_interval?: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count?: number;\n /**\n * paused_at\n */\n paused_at: string;\n /**\n * resumes_at\n */\n resumes_at?: string;\n}\n/**\n * An event created by Polar when a subscription changes the product.\n */\nexport interface SubscriptionProductUpdatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.product_updated\";\n /**\n * metadata\n */\n metadata: SubscriptionProductUpdatedMetadata;\n}\n/**\n * SubscriptionProductUpdatedMetadata\n */\nexport interface SubscriptionProductUpdatedMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * old_product_id\n */\n old_product_id: string;\n /**\n * new_product_id\n */\n new_product_id: string;\n}\n/**\n * An event created by Polar when a past due subscription is recovered.\n */\nexport interface SubscriptionReactivatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.reactivated\";\n /**\n * metadata\n */\n metadata: SubscriptionReactivatedMetadata;\n}\n/**\n * SubscriptionReactivatedMetadata\n */\nexport interface SubscriptionReactivatedMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * amount\n */\n amount?: number;\n /**\n * currency\n */\n currency?: string;\n /**\n * recurring_interval\n */\n recurring_interval?: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count?: number;\n}\n/**\n * SubscriptionResume\n */\nexport interface SubscriptionResume {\n /**\n * Resume a paused subscription immediately, starting a new billing period and charging the customer.\n */\n resume: true;\n}\n/**\n * An event created by Polar when a paused subscription is resumed.\n */\nexport interface SubscriptionResumedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.resumed\";\n /**\n * metadata\n */\n metadata: SubscriptionResumedMetadata;\n}\n/**\n * SubscriptionResumedMetadata\n */\nexport interface SubscriptionResumedMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * amount\n */\n amount?: number;\n /**\n * currency\n */\n currency?: string;\n /**\n * recurring_interval\n */\n recurring_interval?: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count?: number;\n}\n/**\n * SubscriptionRevoke\n */\nexport interface SubscriptionRevoke {\n /**\n * Customer reason for cancellation.\n\nHelpful to monitor reasons behind churn for future improvements.\n\nOnly set this in case your own service is requesting the reason from the\ncustomer. Or you know based on direct conversations, i.e support, with\nthe customer.\n\n* `too_expensive`: Too expensive for the customer.\n* `missing_features`: Customer is missing certain features.\n* `switched_service`: Customer switched to another service.\n* `unused`: Customer is not using it enough.\n* `customer_service`: Customer is not satisfied with the customer service.\n* `low_quality`: Customer is unhappy with the quality.\n* `too_complex`: Customer considers the service too complicated.\n* `other`: Other reason(s).\n */\n customer_cancellation_reason?: CustomerCancellationReason | null;\n /**\n * Customer feedback and why they decided to cancel.\n\n**IMPORTANT:**\nDo not use this to store internal notes! It's intended to be input\nfrom the customer and is therefore also available in their Polar\npurchases library.\n\nOnly set this in case your own service is requesting the reason from the\ncustomer. Or you copy a message directly from a customer\nconversation, i.e support.\n */\n customer_cancellation_comment?: string | null;\n /**\n * Cancel and revoke an active subscription immediately\n */\n revoke: true;\n}\n/**\n * An event created by Polar when a subscription is revoked from a customer.\n */\nexport interface SubscriptionRevokedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.revoked\";\n /**\n * metadata\n */\n metadata: SubscriptionRevokedMetadata;\n}\n/**\n * SubscriptionRevokedMetadata\n */\nexport interface SubscriptionRevokedMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * product_id\n */\n product_id?: string;\n /**\n * amount\n */\n amount?: number;\n /**\n * currency\n */\n currency?: string;\n /**\n * recurring_interval\n */\n recurring_interval?: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count?: number;\n}\n/**\n * An event created by Polar when a the seats on a subscription is changed.\n */\nexport interface SubscriptionSeatsUpdatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.seats_updated\";\n /**\n * metadata\n */\n metadata: SubscriptionSeatsUpdatedMetadata;\n}\n/**\n * SubscriptionSeatsUpdatedMetadata\n */\nexport interface SubscriptionSeatsUpdatedMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * old_seats\n */\n old_seats: number;\n /**\n * new_seats\n */\n new_seats: number;\n /**\n * proration_behavior\n */\n proration_behavior: string;\n}\n/**\n * An event created by Polar when a subscription cancellation is reversed.\n */\nexport interface SubscriptionUncanceledEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.uncanceled\";\n /**\n * metadata\n */\n metadata: SubscriptionUncanceledMetadata;\n}\n/**\n * SubscriptionUncanceledMetadata\n */\nexport interface SubscriptionUncanceledMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n /**\n * product_id\n */\n product_id: string;\n /**\n * amount\n */\n amount: number;\n /**\n * currency\n */\n currency: string;\n /**\n * recurring_interval\n */\n recurring_interval: string;\n /**\n * recurring_interval_count\n */\n recurring_interval_count: number;\n}\n/**\n * SubscriptionUpdateBase\n */\nexport interface SubscriptionUpdateBase {\n /**\n * Update subscription to another product.\n */\n product_id?: string | null;\n /**\n * Determine how to handle the proration billing. If not provided, will use the default organization setting.\n */\n proration_behavior?: SubscriptionProrationBehavior | null;\n /**\n * Update the subscription to apply a new discount. If set to `null`, the discount will be removed. The change will be applied on the next billing cycle.\n */\n discount_id?: string | null;\n /**\n * Set or extend the trial period of the subscription. If set to `now`, the trial will end immediately.\n */\n trial_end?: string | \"now\" | null;\n}\n/**\n * SubscriptionUpdateBillingPeriod\n */\nexport interface SubscriptionUpdateBillingPeriod {\n /**\n * Set a new date for the end of the current billing period. The subscription will renew on this date. The new date can be earlier or later than the current period end, as long as it's in the future.\n\nIt is not possible to update the current billing period on a canceled subscription.\n */\n current_billing_period_end: string;\n}\n/**\n * SubscriptionUpdateClear\n */\nexport interface SubscriptionUpdateClear {\n /**\n * Clear the pending subscription update. Set to null to remove scheduled changes.\n */\n pending_update: null;\n}\n/**\n * An event created by Polar when a pending subscription update is cleared without being applied.\n */\nexport interface SubscriptionUpdateClearedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.update_cleared\";\n /**\n * metadata\n */\n metadata: SubscriptionUpdateClearedMetadata;\n}\n/**\n * SubscriptionUpdateClearedMetadata\n */\nexport interface SubscriptionUpdateClearedMetadata {\n /**\n * subscription_id\n */\n subscription_id: string;\n}\n/**\n * SubscriptionUpdateSeats\n */\nexport interface SubscriptionUpdateSeats {\n /**\n * Update the number of seats for this subscription.\n */\n seats: number;\n /**\n * Determine how to handle the proration billing. If not provided, will use the default organization setting.\n */\n proration_behavior?: SubscriptionProrationBehavior | null;\n}\n/**\n * An event created by Polar when a subscription is updated.\n */\nexport interface SubscriptionUpdatedEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"system\";\n /**\n * The name of the event.\n */\n name: \"subscription.updated\";\n /**\n * metadata\n */\n metadata: SubscriptionUpdatedMetadata;\n}\n/**\n * SubscriptionUpdatedMetadata\n */\nexport interface SubscriptionUpdatedMetadata {\n /**\n * product_id\n */\n product_id?: string;\n /**\n * proration_behavior\n */\n proration_behavior?: SubscriptionProrationBehavior;\n /**\n * discount_id\n */\n discount_id?: string | null;\n /**\n * trial_end\n */\n trial_end?: string;\n /**\n * seats\n */\n seats?: number;\n /**\n * billing_period_end\n */\n billing_period_end?: string;\n /**\n * subscription_id\n */\n subscription_id: string;\n}\n/**\n * Schema to create a file attached to a support case.\n */\nexport interface SupportCaseAttachmentFileCreate {\n /**\n * organization_id\n */\n organization_id?: string | null;\n /**\n * name\n */\n name: string;\n /**\n * MIME type of the file. Images, videos, PDF, CSV, plain text, Word and Excel documents are supported.\n */\n mime_type: string;\n /**\n * Size of the file. A maximum of 250 MB is allowed for this type of file.\n */\n size: number;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64?: string | null;\n /**\n * upload\n */\n upload: S3FileCreateMultipart;\n /**\n * service\n */\n service: \"support_case_attachment\";\n /**\n * version\n */\n version?: string | null;\n}\n/**\n * File attached to a support case (private; fetched via presigned URL).\n */\nexport interface SupportCaseAttachmentFileRead {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * name\n */\n name: string;\n /**\n * path\n */\n path: string;\n /**\n * mime_type\n */\n mime_type: string;\n /**\n * size\n */\n size: number;\n /**\n * storage_version\n */\n storage_version: string | null;\n /**\n * checksum_etag\n */\n checksum_etag: string | null;\n /**\n * checksum_sha256_base64\n */\n checksum_sha256_base64: string | null;\n /**\n * checksum_sha256_hex\n */\n checksum_sha256_hex: string | null;\n /**\n * last_modified_at\n */\n last_modified_at: string | null;\n /**\n * version\n */\n version: string | null;\n /**\n * service\n */\n service: \"support_case_attachment\";\n /**\n * is_uploaded\n */\n is_uploaded: boolean;\n /**\n * created_at\n */\n created_at: string;\n /**\n * size_readable\n */\n size_readable: string;\n}\n/**\n * TokenResponse\n */\nexport interface TokenResponse {\n /**\n * access_token\n */\n access_token: string;\n /**\n * token_type\n */\n token_type: \"Bearer\";\n /**\n * expires_in\n */\n expires_in: number;\n /**\n * refresh_token\n */\n refresh_token?: string | null;\n /**\n * scope\n */\n scope: string;\n /**\n * id_token\n */\n id_token?: string | null;\n}\n/**\n * TrialAlreadyRedeemed\n */\nexport interface TrialAlreadyRedeemed {\n /**\n * error\n */\n error: \"TrialAlreadyRedeemed\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * Unauthorized\n */\nexport interface Unauthorized {\n /**\n * error\n */\n error: \"Unauthorized\";\n /**\n * detail\n */\n detail: string;\n}\n/**\n * UniqueAggregation\n */\nexport interface UniqueAggregation {\n /**\n * func\n */\n func?: \"unique\";\n /**\n * property\n */\n property: string;\n}\n/**\n * An event you created through the ingestion API.\n */\nexport interface UserEvent {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The timestamp of the event.\n */\n timestamp: string;\n /**\n * The ID of the organization owning the event.\n */\n organization_id: string;\n /**\n * ID of the customer in your Polar organization associated with the event.\n */\n customer_id: string | null;\n /**\n * The customer associated with the event.\n */\n customer: Customer | null;\n /**\n * ID of the customer in your system associated with the event.\n */\n external_customer_id: string | null;\n /**\n * ID of the member within the customer's organization who performed the action inside B2B.\n */\n member_id?: string | null;\n /**\n * ID of the member in your system within the customer's organization who performed the action inside B2B.\n */\n external_member_id?: string | null;\n /**\n * Number of direct child events linked to this event.\n */\n child_count?: number;\n /**\n * The ID of the parent event.\n */\n parent_id?: string | null;\n /**\n * Human readable label of the event type.\n */\n label: string;\n /**\n * The name of the event.\n */\n name: string;\n /**\n * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.\n */\n source: \"user\";\n /**\n * metadata\n */\n metadata: EventMetadataOutput;\n}\n/**\n * UserInfoOrganization\n */\nexport interface UserInfoOrganization {\n /**\n * sub\n */\n sub: string;\n /**\n * name\n */\n name?: string | null;\n}\n/**\n * UserInfoUser\n */\nexport interface UserInfoUser {\n /**\n * sub\n */\n sub: string;\n /**\n * name\n */\n name?: string | null;\n /**\n * email\n */\n email?: string | null;\n /**\n * email_verified\n */\n email_verified?: boolean | null;\n}\n/**\n * ValidatedLicenseKey\n */\nexport interface ValidatedLicenseKey {\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * organization_id\n */\n organization_id: string;\n /**\n * customer_id\n */\n customer_id: string;\n /**\n * customer\n */\n customer: LicenseKeyCustomer;\n /**\n * The benefit ID.\n */\n benefit_id: string;\n /**\n * key\n */\n key: string;\n /**\n * display_key\n */\n display_key: string;\n /**\n * status\n */\n status: LicenseKeyStatus;\n /**\n * limit_activations\n */\n limit_activations: number | null;\n /**\n * usage\n */\n usage: number;\n /**\n * limit_usage\n */\n limit_usage: number | null;\n /**\n * validations\n */\n validations: number;\n /**\n * last_validated_at\n */\n last_validated_at: string | null;\n /**\n * expires_at\n */\n expires_at: string | null;\n /**\n * activation\n */\n activation?: LicenseKeyActivationBase | null;\n}\n/**\n * ValidationError\n */\nexport interface ValidationError {\n /**\n * loc\n */\n loc: (string | number)[];\n /**\n * msg\n */\n msg: string;\n /**\n * type\n */\n type: string;\n /**\n * input\n */\n input?: unknown;\n /**\n * ctx\n */\n ctx?: Context;\n}\n/**\n * A webhook delivery for a webhook event.\n */\nexport interface WebhookDelivery {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Whether the delivery was successful.\n */\n succeeded: boolean;\n /**\n * The HTTP code returned by the URL. `null` if the endpoint was unreachable.\n */\n http_code: number | null;\n /**\n * The response body returned by the URL, or the error message if the endpoint was unreachable.\n */\n response: string | null;\n /**\n * webhook_event\n */\n webhook_event: WebhookEvent;\n}\n/**\n * A webhook endpoint.\n */\nexport interface WebhookEndpoint {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * The URL where the webhook events will be sent.\n */\n url: string;\n /**\n * An optional name for the webhook endpoint to help organize and identify it.\n */\n name?: string | null;\n /**\n * format\n */\n format: WebhookFormat;\n /**\n * The secret used to sign the webhook events.\n */\n secret: string;\n /**\n * The organization ID associated with the webhook endpoint.\n */\n organization_id: string;\n /**\n * The events that will trigger the webhook.\n */\n events: WebhookEventType[];\n /**\n * Whether the webhook endpoint is enabled and will receive events.\n */\n enabled: boolean;\n}\n/**\n * Schema to create a webhook endpoint.\n */\nexport interface WebhookEndpointCreate {\n /**\n * The URL where the webhook events will be sent.\n */\n url: string;\n /**\n * An optional name for the webhook endpoint to help organize and identify it.\n */\n name?: string | null;\n /**\n * format\n */\n format: WebhookFormat;\n /**\n * The events that will trigger the webhook.\n */\n events: WebhookEventType[];\n /**\n * The organization ID associated with the webhook endpoint. **Required unless you use an organization token.**\n */\n organization_id?: string | null;\n}\n/**\n * Schema to update a webhook endpoint.\n */\nexport interface WebhookEndpointUpdate {\n /**\n * url\n */\n url?: string | null;\n /**\n * An optional name for the webhook endpoint to help organize and identify it.\n */\n name?: string | null;\n /**\n * format\n */\n format?: WebhookFormat | null;\n /**\n * events\n */\n events?: WebhookEventType[] | null;\n /**\n * Whether the webhook endpoint is enabled.\n */\n enabled?: boolean | null;\n}\n/**\n * A webhook event.\n\nAn event represent something that happened in the system\nthat should be sent to the webhook endpoint.\n\nIt can be delivered multiple times until it's marked as succeeded,\neach one creating a new delivery.\n */\nexport interface WebhookEvent {\n /**\n * Creation timestamp of the object.\n */\n created_at: string;\n /**\n * Last modification timestamp of the object.\n */\n modified_at: string | null;\n /**\n * The ID of the object.\n */\n id: string;\n /**\n * Last HTTP code returned by the URL. `null` if no delviery has been attempted or if the endpoint was unreachable.\n */\n last_http_code?: number | null;\n /**\n * Whether this event was successfully delivered. `null` if no delivery has been attempted.\n */\n succeeded?: boolean | null;\n /**\n * Whether this event was skipped because the webhook endpoint was disabled.\n */\n skipped: boolean;\n /**\n * The payload of the webhook event.\n */\n payload: string | null;\n /**\n * type\n */\n type: WebhookEventType;\n /**\n * Whether this event is archived. Archived events can't be redelivered, and the payload is not accessible anymore.\n */\n is_archived: boolean;\n}\n\n/**\n * Benefit\n */\nexport type Benefit =\n | BenefitCustom\n | BenefitDiscord\n | BenefitGitHubRepository\n | BenefitDownloadables\n | BenefitLicenseKeys\n | BenefitMeterCredit\n | BenefitFeatureFlag\n | BenefitSlackSharedChannel;\n/**\n * BenefitCreate\n */\nexport type BenefitCreate =\n | BenefitCustomCreate\n | BenefitDiscordCreate\n | BenefitGitHubRepositoryCreate\n | BenefitDownloadablesCreate\n | BenefitLicenseKeysCreate\n | BenefitMeterCreditCreate\n | BenefitFeatureFlagCreate\n | BenefitSlackSharedChannelCreate;\n/**\n * BenefitGrantWebhook\n */\nexport type BenefitGrantWebhook =\n | BenefitGrantDiscordWebhook\n | BenefitGrantCustomWebhook\n | BenefitGrantGitHubRepositoryWebhook\n | BenefitGrantDownloadablesWebhook\n | BenefitGrantLicenseKeysWebhook\n | BenefitGrantMeterCreditWebhook\n | BenefitGrantFeatureFlagWebhook\n | BenefitGrantSlackSharedChannelWebhook;\n/**\n * CheckoutForbiddenError\n */\nexport type CheckoutForbiddenError =\n | AlreadyActiveSubscriptionError\n | NotOpenCheckout\n | PaymentNotReady\n | TrialAlreadyRedeemed;\n/**\n * CheckoutLinkCreate\n */\nexport type CheckoutLinkCreate =\n | CheckoutLinkCreateProductPrice\n | CheckoutLinkCreateProduct\n | CheckoutLinkCreateProducts;\n/**\n * CustomField\n */\nexport type CustomField =\n | CustomFieldText\n | CustomFieldNumber\n | CustomFieldDate\n | CustomFieldCheckbox\n | CustomFieldSelect;\n/**\n * CustomFieldCreate\n */\nexport type CustomFieldCreate =\n | CustomFieldCreateText\n | CustomFieldCreateNumber\n | CustomFieldCreateDate\n | CustomFieldCreateCheckbox\n | CustomFieldCreateSelect;\n/**\n * CustomFieldUpdate\n */\nexport type CustomFieldUpdate =\n | CustomFieldUpdateText\n | CustomFieldUpdateNumber\n | CustomFieldUpdateDate\n | CustomFieldUpdateCheckbox\n | CustomFieldUpdateSelect;\n/**\n * Customer\n */\nexport type Customer = CustomerIndividual | CustomerTeam;\n/**\n * CustomerBenefitGrant\n */\nexport type CustomerBenefitGrant =\n | CustomerBenefitGrantDiscord\n | CustomerBenefitGrantGitHubRepository\n | CustomerBenefitGrantDownloadables\n | CustomerBenefitGrantLicenseKeys\n | CustomerBenefitGrantCustom\n | CustomerBenefitGrantMeterCredit\n | CustomerBenefitGrantFeatureFlag\n | CustomerBenefitGrantSlackSharedChannel;\n/**\n * CustomerBenefitGrantUpdate\n */\nexport type CustomerBenefitGrantUpdate =\n | CustomerBenefitGrantDiscordUpdate\n | CustomerBenefitGrantGitHubRepositoryUpdate\n | CustomerBenefitGrantDownloadablesUpdate\n | CustomerBenefitGrantLicenseKeysUpdate\n | CustomerBenefitGrantCustomUpdate\n | CustomerBenefitGrantMeterCreditUpdate\n | CustomerBenefitGrantFeatureFlagUpdate\n | CustomerBenefitGrantSlackSharedChannelUpdate;\n/**\n * CustomerCreate\n */\nexport type CustomerCreate = CustomerIndividualCreate | CustomerTeamCreate;\n/**\n * CustomerPaymentMethod\n */\nexport type CustomerPaymentMethod = PaymentMethodCard | PaymentMethodGeneric;\n/**\n * CustomerPaymentMethodCreateResponse\n */\nexport type CustomerPaymentMethodCreateResponse =\n | CustomerPaymentMethodCreateSucceededResponse\n | CustomerPaymentMethodCreateRequiresActionResponse;\n/**\n * CustomerState\n */\nexport type CustomerState = CustomerStateIndividual | CustomerStateTeam;\n/**\n * CustomerSubscriptionUpdate\n */\nexport type CustomerSubscriptionUpdate =\n | CustomerSubscriptionUpdateProduct\n | CustomerSubscriptionUpdateSeats\n | CustomerSubscriptionCancel\n | CustomerSubscriptionPause\n | CustomerSubscriptionResume\n | CustomerSubscriptionUpdateClear;\n/**\n * Discount\n */\nexport type Discount =\n | DiscountFixedOnceForeverDuration\n | DiscountFixedRepeatDuration\n | DiscountPercentageOnceForeverDuration\n | DiscountPercentageRepeatDuration;\n/**\n * DiscountCreate\n */\nexport type DiscountCreate = DiscountFixedCreate | DiscountPercentageCreate;\n/**\n * Event\n */\nexport type Event = SystemEvent | UserEvent;\n/**\n * FileCreate\n */\nexport type FileCreate =\n | DownloadableFileCreate\n | ProductMediaFileCreate\n | OrganizationAvatarFileCreate\n | SupportCaseAttachmentFileCreate;\n/**\n * FileRead\n */\nexport type FileRead =\n | DownloadableFileRead\n | ProductMediaFileRead\n | OrganizationAvatarFileRead\n | SupportCaseAttachmentFileRead;\n/**\n * LegacyRecurringProductPrice\n */\nexport type LegacyRecurringProductPrice =\n | LegacyRecurringProductPriceFixed\n | LegacyRecurringProductPriceCustom;\n/**\n * MetadataQuery\n */\nexport type MetadataQuery = Record<\n string,\n string | number | boolean | string[] | number[] | boolean[]\n> | null;\n/**\n * Payment\n */\nexport type Payment = CardPayment | GenericPayment;\n/**\n * PaymentMethod\n */\nexport type PaymentMethod = CustomerPaymentMethodCard | CustomerPaymentMethodGeneric;\n/**\n * ProductCreate\n */\nexport type ProductCreate = ProductCreateRecurring | ProductCreateOneTime;\n/**\n * ProductPrice\n */\nexport type ProductPrice =\n | ProductPriceFixed\n | ProductPriceCustom\n | ProductPriceSeatBased\n | ProductPriceMeteredUnit;\n/**\n * SubscriptionUpdate\n */\nexport type SubscriptionUpdate =\n | SubscriptionUpdateBase\n | SubscriptionUpdateSeats\n | SubscriptionUpdateBillingPeriod\n | SubscriptionCancel\n | SubscriptionRevoke\n | SubscriptionPause\n | SubscriptionResume\n | SubscriptionUpdateClear;\n/**\n * SystemEvent\n */\nexport type SystemEvent =\n | MeterCreditEvent\n | MeterResetEvent\n | BenefitGrantedEvent\n | BenefitCycledEvent\n | BenefitUpdatedEvent\n | BenefitRevokedEvent\n | SubscriptionCreatedEvent\n | SubscriptionUpdatedEvent\n | SubscriptionCycledEvent\n | SubscriptionCanceledEvent\n | SubscriptionRevokedEvent\n | SubscriptionPastDueEvent\n | SubscriptionReactivatedEvent\n | SubscriptionPausedEvent\n | SubscriptionResumedEvent\n | SubscriptionUncanceledEvent\n | SubscriptionProductUpdatedEvent\n | SubscriptionSeatsUpdatedEvent\n | SubscriptionBillingPeriodUpdatedEvent\n | SubscriptionUpdateClearedEvent\n | OrderPaidEvent\n | OrderRefundedEvent\n | OrderVoidedEvent\n | CheckoutCreatedEvent\n | CustomerCreatedEvent\n | CustomerUpdatedEvent\n | CustomerDeletedEvent\n | BalanceOrderEvent\n | BalanceCreditOrderEvent\n | BalanceRefundEvent\n | BalanceRefundReversalEvent\n | BalanceDisputeEvent\n | BalanceDisputeReversalEvent;\n","import { PolarError } from \"./base\";\n\nconst webhookToleranceSeconds = 5 * 60;\n\nexport class PolarWebhookError extends PolarError {\n constructor(message: string, options?: ErrorOptions) {\n super(message, options);\n this.name = \"PolarWebhookError\";\n }\n}\n\nexport class PolarWebhookVerificationError extends PolarWebhookError {\n constructor(message: string, options?: ErrorOptions) {\n super(message, options);\n this.name = \"PolarWebhookVerificationError\";\n }\n}\n\nexport class PolarWebhookUnknownTypeError extends PolarWebhookError {\n constructor(public readonly eventType: string | null) {\n super(`Unknown webhook event type: ${JSON.stringify(eventType)}`);\n this.name = \"PolarWebhookUnknownTypeError\";\n }\n}\n\nexport const validateWebhook = async <Payload>(\n body: string | Uint8Array,\n headers: Record<string, string>,\n secret: string,\n eventTypes: ReadonlySet<string>,\n): Promise<Payload> => {\n const bodyText = typeof body === \"string\" ? body : new TextDecoder().decode(body);\n await verifySignature(bodyText, headers, secret);\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(bodyText);\n } catch (error) {\n throw new PolarWebhookError(\"Failed to parse webhook payload\", {\n cause: error,\n });\n }\n\n const eventType =\n typeof parsed === \"object\" &&\n parsed !== null &&\n \"type\" in parsed &&\n typeof parsed.type === \"string\"\n ? parsed.type\n : null;\n if (eventType === null || !eventTypes.has(eventType)) {\n throw new PolarWebhookUnknownTypeError(eventType);\n }\n\n return parsed as Payload;\n};\n\nconst verifySignature = async (\n body: string,\n headers: Record<string, string>,\n secret: string,\n): Promise<void> => {\n if (secret.length === 0) {\n throw new PolarWebhookVerificationError(\"Secret can't be empty\");\n }\n\n const normalizedHeaders = Object.fromEntries(\n Object.entries(headers).map(([key, value]) => [key.toLowerCase(), value]),\n );\n const webhookId = normalizedHeaders[\"webhook-id\"];\n const webhookTimestamp = normalizedHeaders[\"webhook-timestamp\"];\n const webhookSignature = normalizedHeaders[\"webhook-signature\"];\n if (!webhookId || !webhookTimestamp || !webhookSignature) {\n throw new PolarWebhookVerificationError(\"Missing required headers\");\n }\n\n const timestamp = Number(webhookTimestamp);\n if (!Number.isFinite(timestamp)) {\n throw new PolarWebhookVerificationError(\"Invalid signature headers\");\n }\n\n const now = Date.now() / 1000;\n if (timestamp < now - webhookToleranceSeconds) {\n throw new PolarWebhookVerificationError(\"Message timestamp too old\");\n }\n if (timestamp > now + webhookToleranceSeconds) {\n throw new PolarWebhookVerificationError(\"Message timestamp too new\");\n }\n\n const signedContent = `${webhookId}.${Math.floor(timestamp)}.${body}`;\n const textEncoder = new TextEncoder();\n const signedContentBytes = textEncoder.encode(signedContent);\n const signingKey = await globalThis.crypto.subtle.importKey(\n \"raw\",\n textEncoder.encode(secret),\n { name: \"HMAC\", hash: \"SHA-256\" },\n false,\n [\"verify\"],\n );\n\n for (const versionedSignature of webhookSignature.split(\" \")) {\n const [version, signature] = versionedSignature.split(\",\", 2);\n if (version !== \"v1\" || signature === undefined) {\n continue;\n }\n const decodedSignature = decodeBase64(signature);\n if (\n decodedSignature !== null &&\n (await globalThis.crypto.subtle.verify(\n \"HMAC\",\n signingKey,\n decodedSignature,\n signedContentBytes,\n ))\n ) {\n return;\n }\n }\n\n throw new PolarWebhookVerificationError(\"No matching signature found\");\n};\n\nconst decodeBase64 = (value: string): Uint8Array<ArrayBuffer> | null => {\n try {\n const decodedValue = globalThis.atob(value);\n const bytes = new Uint8Array(new ArrayBuffer(decodedValue.length));\n for (let index = 0; index < decodedValue.length; index++) {\n bytes[index] = decodedValue.charCodeAt(index);\n }\n return bytes;\n } catch {\n return null;\n }\n};\n","import type {\n Benefit,\n BenefitGrantWebhook,\n Checkout,\n Customer,\n CustomerSeat,\n CustomerState,\n Member,\n Order,\n Organization,\n Product,\n Refund,\n Subscription,\n} from \"./models\";\n\nimport { validateWebhook } from \"../webhooks\";\n\nexport {\n PolarWebhookError,\n PolarWebhookUnknownTypeError,\n PolarWebhookVerificationError,\n} from \"../webhooks\";\n\n/**\n * Sent when a new benefit is created.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookBenefitCreatedPayload {\n /**\n * type\n */\n type: \"benefit.created\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Benefit;\n}\n/**\n * Sent when a new benefit grant is created.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookBenefitGrantCreatedPayload {\n /**\n * type\n */\n type: \"benefit_grant.created\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: BenefitGrantWebhook;\n}\n/**\n * Sent when a benefit grant is cycled,\n * meaning the related subscription has been renewed for another period.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookBenefitGrantCycledPayload {\n /**\n * type\n */\n type: \"benefit_grant.cycled\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: BenefitGrantWebhook;\n}\n/**\n * Sent when a benefit grant is revoked.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookBenefitGrantRevokedPayload {\n /**\n * type\n */\n type: \"benefit_grant.revoked\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: BenefitGrantWebhook;\n}\n/**\n * Sent when a benefit grant is updated.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookBenefitGrantUpdatedPayload {\n /**\n * type\n */\n type: \"benefit_grant.updated\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: BenefitGrantWebhook;\n}\n/**\n * Sent when a benefit is updated.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookBenefitUpdatedPayload {\n /**\n * type\n */\n type: \"benefit.updated\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Benefit;\n}\n/**\n * Sent when a new checkout is created.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookCheckoutCreatedPayload {\n /**\n * type\n */\n type: \"checkout.created\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Checkout;\n}\n/**\n * Sent when a checkout expires.\n *\n * This event fires when a checkout reaches its expiration time without being completed.\n * Developers can use this to send reminder emails or track checkout abandonment.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookCheckoutExpiredPayload {\n /**\n * type\n */\n type: \"checkout.expired\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Checkout;\n}\n/**\n * Sent when a checkout is updated.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookCheckoutUpdatedPayload {\n /**\n * type\n */\n type: \"checkout.updated\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Checkout;\n}\n/**\n * Sent when a new customer is created.\n *\n * A customer can be created:\n *\n * * After a successful checkout.\n * * Programmatically via the API.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookCustomerCreatedPayload {\n /**\n * type\n */\n type: \"customer.created\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Customer;\n}\n/**\n * Sent when a customer is deleted.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookCustomerDeletedPayload {\n /**\n * type\n */\n type: \"customer.deleted\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Customer;\n}\n/**\n * Sent when a new customer seat is assigned.\n *\n * This event is triggered when a seat is assigned to a customer by the organization.\n * The customer will receive an invitation email to claim the seat.\n */\nexport interface WebhookCustomerSeatAssignedPayload {\n /**\n * type\n */\n type: \"customer_seat.assigned\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: CustomerSeat;\n}\n/**\n * Sent when a customer seat is claimed.\n *\n * This event is triggered when a customer accepts the seat invitation and claims their access.\n */\nexport interface WebhookCustomerSeatClaimedPayload {\n /**\n * type\n */\n type: \"customer_seat.claimed\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: CustomerSeat;\n}\n/**\n * Sent when a customer seat is revoked.\n *\n * This event is triggered when access to a seat is revoked, either manually by the organization or automatically when a subscription is canceled.\n */\nexport interface WebhookCustomerSeatRevokedPayload {\n /**\n * type\n */\n type: \"customer_seat.revoked\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: CustomerSeat;\n}\n/**\n * Sent when a customer state has changed.\n *\n * It's triggered when:\n *\n * * Customer is created, updated or deleted.\n * * A subscription is created or updated.\n * * A benefit is granted or revoked.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookCustomerStateChangedPayload {\n /**\n * type\n */\n type: \"customer.state_changed\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: CustomerState;\n}\n/**\n * Sent when a customer is updated.\n *\n * This event is fired when the customer details are updated.\n *\n * If you want to be notified when a customer subscription or benefit state changes, you should listen to the `customer_state_changed` event.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookCustomerUpdatedPayload {\n /**\n * type\n */\n type: \"customer.updated\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Customer;\n}\n/**\n * Sent when a new member is created.\n *\n * A member represents an individual within a customer (team).\n * This event is triggered when a member is added to a customer,\n * either programmatically via the API or when an owner is automatically\n * created for a new customer.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookMemberCreatedPayload {\n /**\n * type\n */\n type: \"member.created\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Member;\n}\n/**\n * Sent when a member is deleted.\n *\n * This event is triggered when a member is removed from a customer.\n * Any active seats assigned to the member will be automatically revoked.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookMemberDeletedPayload {\n /**\n * type\n */\n type: \"member.deleted\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Member;\n}\n/**\n * Sent when a member is updated.\n *\n * This event is triggered when member details are updated,\n * such as their name or role within the customer.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookMemberUpdatedPayload {\n /**\n * type\n */\n type: \"member.updated\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Member;\n}\n/**\n * Sent when a new order is created.\n *\n * A new order is created when:\n *\n * * A customer purchases a one-time product. In this case, `billing_reason` is set to `purchase`.\n * * A customer starts a subscription. In this case, `billing_reason` is set to `subscription_create`.\n * * A subscription is renewed. In this case, `billing_reason` is set to `subscription_cycle`.\n * * A subscription is upgraded or downgraded with an immediate proration invoice. In this case, `billing_reason` is set to `subscription_update`.\n *\n * > [!WARNING]\n * > The order might not be paid yet, so the `status` field might be `pending`.\n *\n * **Discord & Slack support:** Full\n */\nexport interface WebhookOrderCreatedPayload {\n /**\n * type\n */\n type: \"order.created\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Order;\n}\n/**\n * Sent when an order is paid.\n *\n * When you receive this event, the order is fully processed and payment has been received.\n *\n * **Discord & Slack support:** Full\n */\nexport interface WebhookOrderPaidPayload {\n /**\n * type\n */\n type: \"order.paid\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Order;\n}\n/**\n * Sent when an order is fully or partially refunded.\n *\n * **Discord & Slack support:** Full\n */\nexport interface WebhookOrderRefundedPayload {\n /**\n * type\n */\n type: \"order.refunded\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Order;\n}\n/**\n * Sent when an order is updated.\n *\n * An order is updated when:\n *\n * * Its status changes, e.g. from `pending` to `paid`.\n * * It's refunded, partially or fully.\n *\n * **Discord & Slack support:** Full\n */\nexport interface WebhookOrderUpdatedPayload {\n /**\n * type\n */\n type: \"order.updated\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Order;\n}\n/**\n * Sent when a organization is updated.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookOrganizationUpdatedPayload {\n /**\n * type\n */\n type: \"organization.updated\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Organization;\n}\n/**\n * Sent when a new product is created.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookProductCreatedPayload {\n /**\n * type\n */\n type: \"product.created\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Product;\n}\n/**\n * Sent when a product is updated.\n *\n * **Discord & Slack support:** Basic\n */\nexport interface WebhookProductUpdatedPayload {\n /**\n * type\n */\n type: \"product.updated\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Product;\n}\n/**\n * Sent when a refund is created regardless of status.\n *\n * **Discord & Slack support:** Full\n */\nexport interface WebhookRefundCreatedPayload {\n /**\n * type\n */\n type: \"refund.created\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Refund;\n}\n/**\n * Sent when a refund is updated.\n *\n * **Discord & Slack support:** Full\n */\nexport interface WebhookRefundUpdatedPayload {\n /**\n * type\n */\n type: \"refund.updated\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Refund;\n}\n/**\n * Sent when a subscription becomes active,\n * whether because it's a new paid subscription or because payment was recovered.\n *\n * **Discord & Slack support:** Full\n */\nexport interface WebhookSubscriptionActivePayload {\n /**\n * type\n */\n type: \"subscription.active\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Subscription;\n}\n/**\n * Sent when a subscription is canceled.\n * Customers might still have access until the end of the current period.\n *\n * **Discord & Slack support:** Full\n */\nexport interface WebhookSubscriptionCanceledPayload {\n /**\n * type\n */\n type: \"subscription.canceled\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Subscription;\n}\n/**\n * Sent when a new subscription is created.\n *\n * 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.\n *\n * **Discord & Slack support:** Full\n */\nexport interface WebhookSubscriptionCreatedPayload {\n /**\n * type\n */\n type: \"subscription.created\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Subscription;\n}\n/**\n * Sent when a subscription payment fails and the subscription enters `past_due` status.\n *\n * This is a recoverable state - the customer can update their payment method to restore the subscription.\n * Benefits may be revoked depending on the organization's grace period settings.\n *\n * If payment retries are exhausted, a `subscription.revoked` event will be sent.\n *\n * **Discord & Slack support:** Full\n */\nexport interface WebhookSubscriptionPastDuePayload {\n /**\n * type\n */\n type: \"subscription.past_due\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Subscription;\n}\n/**\n * Sent when a subscription is paused and the customer temporarily loses access.\n *\n * No order is created while paused. The subscription resumes either on its\n * scheduled resume date or when resumed manually, starting a new billing period.\n *\n * **Discord & Slack support:** Full\n */\nexport interface WebhookSubscriptionPausedPayload {\n /**\n * type\n */\n type: \"subscription.paused\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Subscription;\n}\n/**\n * Sent when a paused subscription resumes, restoring the customer's access.\n *\n * Resuming starts a new billing period and charges the customer immediately.\n *\n * **Discord & Slack support:** Full\n */\nexport interface WebhookSubscriptionResumedPayload {\n /**\n * type\n */\n type: \"subscription.resumed\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Subscription;\n}\n/**\n * Sent when a subscription is revoked and the user loses access immediately.\n * Happens when the subscription is canceled or payment retries are exhausted (status becomes `unpaid`).\n *\n * For payment failures that can still be recovered, see `subscription.past_due`.\n *\n * **Discord & Slack support:** Full\n */\nexport interface WebhookSubscriptionRevokedPayload {\n /**\n * type\n */\n type: \"subscription.revoked\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Subscription;\n}\n/**\n * Sent when a customer revokes a pending cancellation.\n *\n * When a customer cancels with \"at period end\", they retain access until the\n * subscription would renew. During this time, they can change their mind and\n * undo the cancellation. This event is triggered when they do so.\n *\n * **Discord & Slack support:** Full\n */\nexport interface WebhookSubscriptionUncanceledPayload {\n /**\n * type\n */\n type: \"subscription.uncanceled\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Subscription;\n}\n/**\n * Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals.\n *\n * If you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, `subscription.past_due`, and `subscription.revoked`.\n *\n * To listen specifically for renewals, you can listen to `order.created` events and check the `billing_reason` field.\n *\n * **Discord & Slack support:** On cancellation, past due, and revocation. Renewals are skipped.\n */\nexport interface WebhookSubscriptionUpdatedPayload {\n /**\n * type\n */\n type: \"subscription.updated\";\n /**\n * timestamp\n */\n timestamp: string;\n /**\n * data\n */\n data: Subscription;\n}\nexport type WebhookPayload =\n | WebhookBenefitCreatedPayload\n | WebhookBenefitGrantCreatedPayload\n | WebhookBenefitGrantCycledPayload\n | WebhookBenefitGrantRevokedPayload\n | WebhookBenefitGrantUpdatedPayload\n | WebhookBenefitUpdatedPayload\n | WebhookCheckoutCreatedPayload\n | WebhookCheckoutExpiredPayload\n | WebhookCheckoutUpdatedPayload\n | WebhookCustomerCreatedPayload\n | WebhookCustomerDeletedPayload\n | WebhookCustomerSeatAssignedPayload\n | WebhookCustomerSeatClaimedPayload\n | WebhookCustomerSeatRevokedPayload\n | WebhookCustomerStateChangedPayload\n | WebhookCustomerUpdatedPayload\n | WebhookMemberCreatedPayload\n | WebhookMemberDeletedPayload\n | WebhookMemberUpdatedPayload\n | WebhookOrderCreatedPayload\n | WebhookOrderPaidPayload\n | WebhookOrderRefundedPayload\n | WebhookOrderUpdatedPayload\n | WebhookOrganizationUpdatedPayload\n | WebhookProductCreatedPayload\n | WebhookProductUpdatedPayload\n | WebhookRefundCreatedPayload\n | WebhookRefundUpdatedPayload\n | WebhookSubscriptionActivePayload\n | WebhookSubscriptionCanceledPayload\n | WebhookSubscriptionCreatedPayload\n | WebhookSubscriptionPastDuePayload\n | WebhookSubscriptionPausedPayload\n | WebhookSubscriptionResumedPayload\n | WebhookSubscriptionRevokedPayload\n | WebhookSubscriptionUncanceledPayload\n | WebhookSubscriptionUpdatedPayload;\n\nconst knownEventTypes = new Set<string>([\n \"benefit.created\",\n \"benefit.updated\",\n \"benefit_grant.created\",\n \"benefit_grant.cycled\",\n \"benefit_grant.revoked\",\n \"benefit_grant.updated\",\n \"checkout.created\",\n \"checkout.expired\",\n \"checkout.updated\",\n \"customer.created\",\n \"customer.deleted\",\n \"customer.state_changed\",\n \"customer.updated\",\n \"customer_seat.assigned\",\n \"customer_seat.claimed\",\n \"customer_seat.revoked\",\n \"member.created\",\n \"member.deleted\",\n \"member.updated\",\n \"order.created\",\n \"order.paid\",\n \"order.refunded\",\n \"order.updated\",\n \"organization.updated\",\n \"product.created\",\n \"product.updated\",\n \"refund.created\",\n \"refund.updated\",\n \"subscription.active\",\n \"subscription.canceled\",\n \"subscription.created\",\n \"subscription.past_due\",\n \"subscription.paused\",\n \"subscription.resumed\",\n \"subscription.revoked\",\n \"subscription.uncanceled\",\n \"subscription.updated\",\n]);\n\n/**\n * Verify a raw Polar webhook request and return its typed payload.\n */\nexport const validateEvent = (\n body: string | Uint8Array,\n headers: Record<string, string>,\n secret: string,\n): Promise<WebhookPayload> => {\n return validateWebhook<WebhookPayload>(body, headers, secret, knownEventTypes);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAM,UAAuC;CAC3C,YAAY;CACZ,SAAS;AACX;AAQA,SAAgB,gBAAgB,SAAuB;CACrD,OAAO,IAAI,WAAW;EACpB,GAAG;EACH,SAAS,eAAe,SAAS,QAAQ,eAAe,cAAc,QAAQ,OAAO;EACrF,SAAS,QAAQ,WAAW;CAC9B,CAAC;AACH;AAIA,SAAgB,YAAY,SAAuB;CACjD,MAAM,SAAS,gBAAgB,OAAO;CAEtC,OAAO;EACL,eAAe,2BAA2B,MAAM;EAChD,eAAe,2BAA2B,MAAM;EAChD,QAAQ,oBAAoB,MAAM;EAClC,UAAU,sBAAsB,MAAM;EACtC,eAAe,2BAA2B,MAAM;EAChD,UAAU,sBAAsB,MAAM;EACtC,UAAU,sBAAsB,MAAM;EACtC,QAAQ,oBAAoB,MAAM;EAClC,SAAS,qBAAqB,MAAM;EACpC,UAAU,sBAAsB,MAAM;EACtC,WAAW,uBAAuB,MAAM;EACxC,OAAO,mBAAmB,MAAM;EAChC,SAAS,qBAAqB,MAAM;EACpC,aAAa,yBAAyB,MAAM;EAC5C,eAAe,2BAA2B,MAAM;EAChD,cAAc,0BAA0B,MAAM;EAC9C,WAAW,uBAAuB,MAAM;EACxC,WAAW,uBAAuB,MAAM;EACxC,SAAS,qBAAqB,MAAM;EACpC,gBAAgB,4BAA4B,MAAM;EAClD,eAAe,2BAA2B,MAAM;EAChD,kBAAkB,8BAA8B,MAAM;EACtD,QAAQ,oBAAoB,MAAM;EAClC,YAAY,wBAAwB,MAAM;EAC1C,QAAQ,oBAAoB,MAAM;EAClC,gBAAgB,4BAA4B,MAAM;EAClD,UAAU,sBAAsB,MAAM;CACxC;AACF;;;;;;AElFA,MAAM,0BAA0B;AAEhC,IAAa,oBAAb,cAAuC,WAAW;CAChD,YAAY,SAAiB,SAAwB;EACnD,MAAM,SAAS,OAAO;EACtB,KAAK,OAAO;CACd;AACF;AAEA,IAAa,gCAAb,cAAmD,kBAAkB;CACnE,YAAY,SAAiB,SAAwB;EACnD,MAAM,SAAS,OAAO;EACtB,KAAK,OAAO;CACd;AACF;AAEA,IAAa,+BAAb,cAAkD,kBAAkB;CACtC;CAA5B,YAAY,WAA0C;EACpD,MAAM,+BAA+B,KAAK,UAAU,SAAS,GAAG;EADtC,KAAA,YAAA;EAE1B,KAAK,OAAO;CACd;AACF;AAEA,MAAa,kBAAkB,OAC7B,MACA,SACA,QACA,eACqB;CACrB,MAAM,WAAW,OAAO,SAAS,WAAW,OAAO,IAAI,YAAY,CAAC,CAAC,OAAO,IAAI;CAChF,MAAM,gBAAgB,UAAU,SAAS,MAAM;CAE/C,IAAI;CACJ,IAAI;EACF,SAAS,KAAK,MAAM,QAAQ;CAC9B,SAAS,OAAO;EACd,MAAM,IAAI,kBAAkB,mCAAmC,EAC7D,OAAO,MACT,CAAC;CACH;CAEA,MAAM,YACJ,OAAO,WAAW,YAClB,WAAW,QACX,UAAU,UACV,OAAO,OAAO,SAAS,WACnB,OAAO,OACP;CACN,IAAI,cAAc,QAAQ,CAAC,WAAW,IAAI,SAAS,GACjD,MAAM,IAAI,6BAA6B,SAAS;CAGlD,OAAO;AACT;AAEA,MAAM,kBAAkB,OACtB,MACA,SACA,WACkB;CAClB,IAAI,OAAO,WAAW,GACpB,MAAM,IAAI,8BAA8B,uBAAuB;CAGjE,MAAM,oBAAoB,OAAO,YAC/B,OAAO,QAAQ,OAAO,CAAC,CAAC,KAAK,CAAC,KAAK,WAAW,CAAC,IAAI,YAAY,GAAG,KAAK,CAAC,CAC1E;CACA,MAAM,YAAY,kBAAkB;CACpC,MAAM,mBAAmB,kBAAkB;CAC3C,MAAM,mBAAmB,kBAAkB;CAC3C,IAAI,CAAC,aAAa,CAAC,oBAAoB,CAAC,kBACtC,MAAM,IAAI,8BAA8B,0BAA0B;CAGpE,MAAM,YAAY,OAAO,gBAAgB;CACzC,IAAI,CAAC,OAAO,SAAS,SAAS,GAC5B,MAAM,IAAI,8BAA8B,2BAA2B;CAGrE,MAAM,MAAM,KAAK,IAAI,IAAI;CACzB,IAAI,YAAY,MAAM,yBACpB,MAAM,IAAI,8BAA8B,2BAA2B;CAErE,IAAI,YAAY,MAAM,yBACpB,MAAM,IAAI,8BAA8B,2BAA2B;CAGrE,MAAM,gBAAgB,GAAG,UAAU,GAAG,KAAK,MAAM,SAAS,EAAE,GAAG;CAC/D,MAAM,cAAc,IAAI,YAAY;CACpC,MAAM,qBAAqB,YAAY,OAAO,aAAa;CAC3D,MAAM,aAAa,MAAM,WAAW,OAAO,OAAO,UAChD,OACA,YAAY,OAAO,MAAM,GACzB;EAAE,MAAM;EAAQ,MAAM;CAAU,GAChC,OACA,CAAC,QAAQ,CACX;CAEA,KAAK,MAAM,sBAAsB,iBAAiB,MAAM,GAAG,GAAG;EAC5D,MAAM,CAAC,SAAS,aAAa,mBAAmB,MAAM,KAAK,CAAC;EAC5D,IAAI,YAAY,QAAQ,cAAc,KAAA,GACpC;EAEF,MAAM,mBAAmB,aAAa,SAAS;EAC/C,IACE,qBAAqB,QACpB,MAAM,WAAW,OAAO,OAAO,OAC9B,QACA,YACA,kBACA,kBACF,GAEA;CAEJ;CAEA,MAAM,IAAI,8BAA8B,6BAA6B;AACvE;AAEA,MAAM,gBAAgB,UAAkD;CACtE,IAAI;EACF,MAAM,eAAe,WAAW,KAAK,KAAK;EAC1C,MAAM,QAAQ,IAAI,WAAW,IAAI,YAAY,aAAa,MAAM,CAAC;EACjE,KAAK,IAAI,QAAQ,GAAG,QAAQ,aAAa,QAAQ,SAC/C,MAAM,SAAS,aAAa,WAAW,KAAK;EAE9C,OAAO;CACT,QAAQ;EACN,OAAO;CACT;AACF;;;;;;;;;ACisBA,MAAM,kCAAkB,IAAI,IAAY;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;AAKD,MAAa,iBACX,MACA,SACA,WAC4B;CAC5B,OAAO,gBAAgC,MAAM,SAAS,QAAQ,eAAe;AAC/E"}
|