@polar-sh/sdk 1.0.0-alpha.21 → 1.0.0
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/.agents/skills/polar-typescript-sdk/SKILL.md +3 -3
- package/.agents/skills/polar-typescript-sdk/references/migration-from-v0.md +1 -1
- package/.agents/skills/polar-typescript-sdk/references/usage-events.md +1 -1
- package/.agents/skills/polar-typescript-sdk/references/webhooks.md +1 -1
- package/README.md +6 -8
- package/dist/2026-04/index.cjs +2 -1
- package/dist/2026-04/index.cjs.map +1 -1
- package/dist/2026-04/index.d.cts +2 -2
- package/dist/2026-04/index.d.mts +2 -2
- package/dist/2026-04/index.mjs +2 -1
- package/dist/2026-04/index.mjs.map +1 -1
- package/dist/2026-04/services/benefit_grants.cjs +1 -1
- package/dist/2026-04/services/benefit_grants.d.cts +1 -1
- package/dist/2026-04/services/benefit_grants.d.mts +1 -1
- package/dist/2026-04/services/benefit_grants.mjs +1 -1
- package/dist/2026-04/services/benefits.cjs +1 -1
- package/dist/2026-04/services/benefits.d.cts +1 -1
- package/dist/2026-04/services/benefits.d.mts +1 -1
- package/dist/2026-04/services/benefits.mjs +1 -1
- package/dist/2026-04/services/checkout_links.cjs +1 -1
- package/dist/2026-04/services/checkout_links.d.cts +1 -1
- package/dist/2026-04/services/checkout_links.d.mts +1 -1
- package/dist/2026-04/services/checkout_links.mjs +1 -1
- package/dist/2026-04/services/checkouts.cjs +7 -1
- package/dist/2026-04/services/checkouts.cjs.map +1 -1
- package/dist/2026-04/services/checkouts.d.cts +1 -1
- package/dist/2026-04/services/checkouts.d.cts.map +1 -1
- package/dist/2026-04/services/checkouts.d.mts +1 -1
- package/dist/2026-04/services/checkouts.d.mts.map +1 -1
- package/dist/2026-04/services/checkouts.mjs +7 -1
- package/dist/2026-04/services/checkouts.mjs.map +1 -1
- package/dist/2026-04/services/custom_fields.cjs +1 -1
- package/dist/2026-04/services/custom_fields.d.cts +1 -1
- package/dist/2026-04/services/custom_fields.d.mts +1 -1
- package/dist/2026-04/services/custom_fields.mjs +1 -1
- package/dist/2026-04/services/customer_meters.cjs +1 -1
- package/dist/2026-04/services/customer_meters.d.cts +1 -1
- package/dist/2026-04/services/customer_meters.d.mts +1 -1
- package/dist/2026-04/services/customer_meters.mjs +1 -1
- package/dist/2026-04/services/customer_portal/benefit_grants.cjs +1 -1
- package/dist/2026-04/services/customer_portal/benefit_grants.d.cts +1 -1
- package/dist/2026-04/services/customer_portal/benefit_grants.d.mts +1 -1
- package/dist/2026-04/services/customer_portal/benefit_grants.mjs +1 -1
- package/dist/2026-04/services/customer_portal/customer_meters.cjs +1 -1
- package/dist/2026-04/services/customer_portal/customer_meters.d.cts +1 -1
- package/dist/2026-04/services/customer_portal/customer_meters.d.mts +1 -1
- package/dist/2026-04/services/customer_portal/customer_meters.mjs +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 +1 -1
- package/dist/2026-04/services/customer_portal/customers.d.cts +1 -1
- package/dist/2026-04/services/customer_portal/customers.d.mts +1 -1
- package/dist/2026-04/services/customer_portal/customers.mjs +1 -1
- package/dist/2026-04/services/customer_portal/downloadables.cjs +1 -1
- package/dist/2026-04/services/customer_portal/downloadables.d.cts +1 -1
- package/dist/2026-04/services/customer_portal/downloadables.d.mts +1 -1
- package/dist/2026-04/services/customer_portal/downloadables.mjs +1 -1
- package/dist/2026-04/services/customer_portal/index.d.cts +3 -3
- package/dist/2026-04/services/customer_portal/index.d.cts.map +1 -1
- package/dist/2026-04/services/customer_portal/index.d.mts +3 -3
- package/dist/2026-04/services/customer_portal/index.d.mts.map +1 -1
- package/dist/2026-04/services/customer_portal/license_keys.cjs +8 -6
- package/dist/2026-04/services/customer_portal/license_keys.cjs.map +1 -1
- package/dist/2026-04/services/customer_portal/license_keys.d.cts +5 -5
- package/dist/2026-04/services/customer_portal/license_keys.d.cts.map +1 -1
- package/dist/2026-04/services/customer_portal/license_keys.d.mts +5 -5
- package/dist/2026-04/services/customer_portal/license_keys.d.mts.map +1 -1
- package/dist/2026-04/services/customer_portal/license_keys.mjs +8 -6
- package/dist/2026-04/services/customer_portal/license_keys.mjs.map +1 -1
- package/dist/2026-04/services/customer_portal/members.cjs +1 -1
- package/dist/2026-04/services/customer_portal/members.d.cts +1 -1
- package/dist/2026-04/services/customer_portal/members.d.mts +1 -1
- package/dist/2026-04/services/customer_portal/members.mjs +1 -1
- package/dist/2026-04/services/customer_portal/orders.cjs +1 -1
- package/dist/2026-04/services/customer_portal/orders.d.cts +1 -1
- package/dist/2026-04/services/customer_portal/orders.d.mts +1 -1
- package/dist/2026-04/services/customer_portal/orders.mjs +1 -1
- package/dist/2026-04/services/customer_portal/organizations.cjs +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/organizations.mjs +1 -1
- package/dist/2026-04/services/customer_portal/seats.cjs +1 -1
- package/dist/2026-04/services/customer_portal/seats.d.cts +1 -1
- package/dist/2026-04/services/customer_portal/seats.d.mts +1 -1
- package/dist/2026-04/services/customer_portal/seats.mjs +1 -1
- package/dist/2026-04/services/customer_portal/subscriptions.cjs +1 -1
- package/dist/2026-04/services/customer_portal/subscriptions.d.cts +1 -1
- package/dist/2026-04/services/customer_portal/subscriptions.d.mts +1 -1
- package/dist/2026-04/services/customer_portal/subscriptions.mjs +1 -1
- package/dist/2026-04/services/customer_portal/wallets.cjs +1 -1
- package/dist/2026-04/services/customer_portal/wallets.d.cts +1 -1
- package/dist/2026-04/services/customer_portal/wallets.d.mts +1 -1
- package/dist/2026-04/services/customer_portal/wallets.mjs +1 -1
- package/dist/2026-04/services/customer_seats.cjs +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_seats.mjs +1 -1
- package/dist/2026-04/services/customer_sessions.cjs +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/customer_sessions.mjs +1 -1
- package/dist/2026-04/services/customers/index.cjs +1 -1
- package/dist/2026-04/services/customers/index.d.cts +1 -1
- package/dist/2026-04/services/customers/index.d.mts +1 -1
- package/dist/2026-04/services/customers/index.mjs +1 -1
- package/dist/2026-04/services/customers/members.cjs +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/customers/members.mjs +1 -1
- package/dist/2026-04/services/discounts.cjs +1 -1
- package/dist/2026-04/services/discounts.d.cts +1 -1
- package/dist/2026-04/services/discounts.d.mts +1 -1
- package/dist/2026-04/services/discounts.mjs +1 -1
- package/dist/2026-04/services/disputes.cjs +1 -1
- package/dist/2026-04/services/disputes.d.cts +1 -1
- package/dist/2026-04/services/disputes.d.mts +1 -1
- package/dist/2026-04/services/disputes.mjs +1 -1
- package/dist/2026-04/services/event_types.cjs +1 -1
- package/dist/2026-04/services/event_types.d.cts +1 -1
- package/dist/2026-04/services/event_types.d.mts +1 -1
- package/dist/2026-04/services/event_types.mjs +1 -1
- package/dist/2026-04/services/events.cjs +1 -1
- package/dist/2026-04/services/events.d.cts +1 -1
- package/dist/2026-04/services/events.d.mts +1 -1
- package/dist/2026-04/services/events.mjs +1 -1
- package/dist/2026-04/services/files.cjs +1 -1
- package/dist/2026-04/services/files.d.cts +1 -1
- package/dist/2026-04/services/files.d.mts +1 -1
- package/dist/2026-04/services/files.mjs +1 -1
- package/dist/2026-04/services/license_keys.cjs +9 -7
- package/dist/2026-04/services/license_keys.cjs.map +1 -1
- package/dist/2026-04/services/license_keys.d.cts +5 -5
- package/dist/2026-04/services/license_keys.d.cts.map +1 -1
- package/dist/2026-04/services/license_keys.d.mts +5 -5
- package/dist/2026-04/services/license_keys.d.mts.map +1 -1
- package/dist/2026-04/services/license_keys.mjs +9 -7
- package/dist/2026-04/services/license_keys.mjs.map +1 -1
- package/dist/2026-04/services/meters.cjs +1 -1
- package/dist/2026-04/services/meters.d.cts +1 -1
- package/dist/2026-04/services/meters.d.mts +1 -1
- package/dist/2026-04/services/meters.mjs +1 -1
- package/dist/2026-04/services/metrics.cjs +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/metrics.mjs +1 -1
- package/dist/2026-04/services/oauth2/clients/index.d.cts +1 -1
- package/dist/2026-04/services/oauth2/clients/index.d.mts +1 -1
- package/dist/2026-04/services/oauth2/clients/oauth2.cjs +1 -1
- package/dist/2026-04/services/oauth2/clients/oauth2.d.cts +1 -1
- package/dist/2026-04/services/oauth2/clients/oauth2.d.mts +1 -1
- package/dist/2026-04/services/oauth2/clients/oauth2.mjs +1 -1
- package/dist/2026-04/services/oauth2/index.d.cts +1 -1
- package/dist/2026-04/services/oauth2/index.d.mts +1 -1
- package/dist/2026-04/services/orders.cjs +1 -1
- package/dist/2026-04/services/orders.d.cts +1 -1
- package/dist/2026-04/services/orders.d.mts +1 -1
- package/dist/2026-04/services/orders.mjs +1 -1
- package/dist/2026-04/services/organizations.cjs +1 -1
- package/dist/2026-04/services/organizations.d.cts +1 -1
- package/dist/2026-04/services/organizations.d.mts +1 -1
- package/dist/2026-04/services/organizations.mjs +1 -1
- package/dist/2026-04/services/payments.cjs +1 -1
- package/dist/2026-04/services/payments.d.cts +1 -1
- package/dist/2026-04/services/payments.d.mts +1 -1
- package/dist/2026-04/services/payments.mjs +1 -1
- package/dist/2026-04/services/products.cjs +35 -1
- package/dist/2026-04/services/products.cjs.map +1 -1
- package/dist/2026-04/services/products.d.cts +4 -2
- package/dist/2026-04/services/products.d.cts.map +1 -1
- package/dist/2026-04/services/products.d.mts +4 -2
- package/dist/2026-04/services/products.d.mts.map +1 -1
- package/dist/2026-04/services/products.mjs +35 -2
- package/dist/2026-04/services/products.mjs.map +1 -1
- package/dist/2026-04/services/refunds.cjs +1 -1
- package/dist/2026-04/services/refunds.d.cts +1 -1
- package/dist/2026-04/services/refunds.d.mts +1 -1
- package/dist/2026-04/services/refunds.mjs +1 -1
- package/dist/2026-04/services/subscriptions.cjs +4 -4
- package/dist/2026-04/services/subscriptions.cjs.map +1 -1
- package/dist/2026-04/services/subscriptions.d.cts +1 -1
- package/dist/2026-04/services/subscriptions.d.mts +1 -1
- package/dist/2026-04/services/subscriptions.mjs +4 -4
- package/dist/2026-04/services/subscriptions.mjs.map +1 -1
- package/dist/2026-04/services/webhooks.cjs +1 -1
- package/dist/2026-04/services/webhooks.d.cts +1 -1
- package/dist/2026-04/services/webhooks.d.mts +1 -1
- package/dist/2026-04/services/webhooks.mjs +1 -1
- package/dist/2026-10/index.cjs +2 -1
- package/dist/2026-10/index.cjs.map +1 -1
- package/dist/2026-10/index.d.cts +2 -2
- package/dist/2026-10/index.d.mts +2 -2
- package/dist/2026-10/index.mjs +2 -1
- package/dist/2026-10/index.mjs.map +1 -1
- package/dist/2026-10/services/benefit_grants.cjs +1 -1
- package/dist/2026-10/services/benefit_grants.d.cts +1 -1
- package/dist/2026-10/services/benefit_grants.d.mts +1 -1
- package/dist/2026-10/services/benefit_grants.mjs +1 -1
- package/dist/2026-10/services/benefits.cjs +1 -1
- package/dist/2026-10/services/benefits.d.cts +1 -1
- package/dist/2026-10/services/benefits.d.mts +1 -1
- package/dist/2026-10/services/benefits.mjs +1 -1
- package/dist/2026-10/services/checkout_links.cjs +1 -1
- package/dist/2026-10/services/checkout_links.d.cts +1 -1
- package/dist/2026-10/services/checkout_links.d.mts +1 -1
- package/dist/2026-10/services/checkout_links.mjs +1 -1
- package/dist/2026-10/services/checkouts.cjs +7 -1
- package/dist/2026-10/services/checkouts.cjs.map +1 -1
- package/dist/2026-10/services/checkouts.d.cts +1 -1
- package/dist/2026-10/services/checkouts.d.cts.map +1 -1
- package/dist/2026-10/services/checkouts.d.mts +1 -1
- package/dist/2026-10/services/checkouts.d.mts.map +1 -1
- package/dist/2026-10/services/checkouts.mjs +7 -1
- package/dist/2026-10/services/checkouts.mjs.map +1 -1
- package/dist/2026-10/services/custom_fields.cjs +1 -1
- package/dist/2026-10/services/custom_fields.d.cts +1 -1
- package/dist/2026-10/services/custom_fields.d.mts +1 -1
- package/dist/2026-10/services/custom_fields.mjs +1 -1
- package/dist/2026-10/services/customer_meters.cjs +1 -1
- package/dist/2026-10/services/customer_meters.d.cts +1 -1
- package/dist/2026-10/services/customer_meters.d.mts +1 -1
- package/dist/2026-10/services/customer_meters.mjs +1 -1
- package/dist/2026-10/services/customer_portal/benefit_grants.cjs +1 -1
- package/dist/2026-10/services/customer_portal/benefit_grants.d.cts +1 -1
- package/dist/2026-10/services/customer_portal/benefit_grants.d.mts +1 -1
- package/dist/2026-10/services/customer_portal/benefit_grants.mjs +1 -1
- package/dist/2026-10/services/customer_portal/customer_meters.cjs +1 -1
- package/dist/2026-10/services/customer_portal/customer_meters.d.cts +1 -1
- package/dist/2026-10/services/customer_portal/customer_meters.d.mts +1 -1
- package/dist/2026-10/services/customer_portal/customer_meters.mjs +1 -1
- package/dist/2026-10/services/customer_portal/customer_session.d.cts +1 -1
- package/dist/2026-10/services/customer_portal/customer_session.d.mts +1 -1
- package/dist/2026-10/services/customer_portal/customers.cjs +1 -1
- package/dist/2026-10/services/customer_portal/customers.d.cts +1 -1
- package/dist/2026-10/services/customer_portal/customers.d.mts +1 -1
- package/dist/2026-10/services/customer_portal/customers.mjs +1 -1
- package/dist/2026-10/services/customer_portal/downloadables.cjs +1 -1
- package/dist/2026-10/services/customer_portal/downloadables.d.cts +1 -1
- package/dist/2026-10/services/customer_portal/downloadables.d.mts +1 -1
- package/dist/2026-10/services/customer_portal/downloadables.mjs +1 -1
- package/dist/2026-10/services/customer_portal/index.d.cts +3 -3
- package/dist/2026-10/services/customer_portal/index.d.cts.map +1 -1
- package/dist/2026-10/services/customer_portal/index.d.mts +3 -3
- package/dist/2026-10/services/customer_portal/index.d.mts.map +1 -1
- package/dist/2026-10/services/customer_portal/license_keys.cjs +8 -6
- package/dist/2026-10/services/customer_portal/license_keys.cjs.map +1 -1
- package/dist/2026-10/services/customer_portal/license_keys.d.cts +5 -5
- package/dist/2026-10/services/customer_portal/license_keys.d.cts.map +1 -1
- package/dist/2026-10/services/customer_portal/license_keys.d.mts +5 -5
- package/dist/2026-10/services/customer_portal/license_keys.d.mts.map +1 -1
- package/dist/2026-10/services/customer_portal/license_keys.mjs +8 -6
- package/dist/2026-10/services/customer_portal/license_keys.mjs.map +1 -1
- package/dist/2026-10/services/customer_portal/members.cjs +1 -1
- package/dist/2026-10/services/customer_portal/members.d.cts +1 -1
- package/dist/2026-10/services/customer_portal/members.d.mts +1 -1
- package/dist/2026-10/services/customer_portal/members.mjs +1 -1
- package/dist/2026-10/services/customer_portal/orders.cjs +1 -1
- package/dist/2026-10/services/customer_portal/orders.d.cts +1 -1
- package/dist/2026-10/services/customer_portal/orders.d.mts +1 -1
- package/dist/2026-10/services/customer_portal/orders.mjs +1 -1
- package/dist/2026-10/services/customer_portal/organizations.cjs +1 -1
- package/dist/2026-10/services/customer_portal/organizations.d.cts +1 -1
- package/dist/2026-10/services/customer_portal/organizations.d.mts +1 -1
- package/dist/2026-10/services/customer_portal/organizations.mjs +1 -1
- package/dist/2026-10/services/customer_portal/seats.cjs +1 -1
- package/dist/2026-10/services/customer_portal/seats.d.cts +1 -1
- package/dist/2026-10/services/customer_portal/seats.d.mts +1 -1
- package/dist/2026-10/services/customer_portal/seats.mjs +1 -1
- package/dist/2026-10/services/customer_portal/subscriptions.cjs +1 -1
- package/dist/2026-10/services/customer_portal/subscriptions.d.cts +1 -1
- package/dist/2026-10/services/customer_portal/subscriptions.d.mts +1 -1
- package/dist/2026-10/services/customer_portal/subscriptions.mjs +1 -1
- package/dist/2026-10/services/customer_portal/wallets.cjs +1 -1
- package/dist/2026-10/services/customer_portal/wallets.d.cts +1 -1
- package/dist/2026-10/services/customer_portal/wallets.d.mts +1 -1
- package/dist/2026-10/services/customer_portal/wallets.mjs +1 -1
- package/dist/2026-10/services/customer_seats.cjs +1 -1
- package/dist/2026-10/services/customer_seats.d.cts +1 -1
- package/dist/2026-10/services/customer_seats.d.mts +1 -1
- package/dist/2026-10/services/customer_seats.mjs +1 -1
- package/dist/2026-10/services/customer_sessions.cjs +1 -1
- package/dist/2026-10/services/customer_sessions.d.cts +1 -1
- package/dist/2026-10/services/customer_sessions.d.mts +1 -1
- package/dist/2026-10/services/customer_sessions.mjs +1 -1
- package/dist/2026-10/services/customers/index.cjs +1 -1
- package/dist/2026-10/services/customers/index.d.cts +1 -1
- package/dist/2026-10/services/customers/index.d.mts +1 -1
- package/dist/2026-10/services/customers/index.mjs +1 -1
- package/dist/2026-10/services/customers/members.cjs +1 -1
- package/dist/2026-10/services/customers/members.d.cts +1 -1
- package/dist/2026-10/services/customers/members.d.mts +1 -1
- package/dist/2026-10/services/customers/members.mjs +1 -1
- package/dist/2026-10/services/discounts.cjs +1 -1
- package/dist/2026-10/services/discounts.d.cts +1 -1
- package/dist/2026-10/services/discounts.d.mts +1 -1
- package/dist/2026-10/services/discounts.mjs +1 -1
- package/dist/2026-10/services/disputes.cjs +1 -1
- package/dist/2026-10/services/disputes.d.cts +1 -1
- package/dist/2026-10/services/disputes.d.mts +1 -1
- package/dist/2026-10/services/disputes.mjs +1 -1
- package/dist/2026-10/services/event_types.cjs +1 -1
- package/dist/2026-10/services/event_types.d.cts +1 -1
- package/dist/2026-10/services/event_types.d.mts +1 -1
- package/dist/2026-10/services/event_types.mjs +1 -1
- package/dist/2026-10/services/events.cjs +1 -1
- package/dist/2026-10/services/events.d.cts +1 -1
- package/dist/2026-10/services/events.d.mts +1 -1
- package/dist/2026-10/services/events.mjs +1 -1
- package/dist/2026-10/services/files.cjs +1 -1
- package/dist/2026-10/services/files.d.cts +1 -1
- package/dist/2026-10/services/files.d.mts +1 -1
- package/dist/2026-10/services/files.mjs +1 -1
- package/dist/2026-10/services/license_keys.cjs +9 -7
- package/dist/2026-10/services/license_keys.cjs.map +1 -1
- package/dist/2026-10/services/license_keys.d.cts +5 -5
- package/dist/2026-10/services/license_keys.d.cts.map +1 -1
- package/dist/2026-10/services/license_keys.d.mts +5 -5
- package/dist/2026-10/services/license_keys.d.mts.map +1 -1
- package/dist/2026-10/services/license_keys.mjs +9 -7
- package/dist/2026-10/services/license_keys.mjs.map +1 -1
- package/dist/2026-10/services/meters.cjs +1 -1
- package/dist/2026-10/services/meters.d.cts +1 -1
- package/dist/2026-10/services/meters.d.mts +1 -1
- package/dist/2026-10/services/meters.mjs +1 -1
- package/dist/2026-10/services/metrics.cjs +1 -1
- package/dist/2026-10/services/metrics.d.cts +1 -1
- package/dist/2026-10/services/metrics.d.mts +1 -1
- package/dist/2026-10/services/metrics.mjs +1 -1
- package/dist/2026-10/services/oauth2/clients/index.d.cts +1 -1
- package/dist/2026-10/services/oauth2/clients/index.d.mts +1 -1
- package/dist/2026-10/services/oauth2/clients/oauth2.cjs +1 -1
- package/dist/2026-10/services/oauth2/clients/oauth2.d.cts +1 -1
- package/dist/2026-10/services/oauth2/clients/oauth2.d.mts +1 -1
- package/dist/2026-10/services/oauth2/clients/oauth2.mjs +1 -1
- package/dist/2026-10/services/oauth2/index.d.cts +1 -1
- package/dist/2026-10/services/oauth2/index.d.mts +1 -1
- package/dist/2026-10/services/orders.cjs +1 -1
- package/dist/2026-10/services/orders.d.cts +1 -1
- package/dist/2026-10/services/orders.d.mts +1 -1
- package/dist/2026-10/services/orders.mjs +1 -1
- package/dist/2026-10/services/organizations.cjs +1 -1
- package/dist/2026-10/services/organizations.d.cts +1 -1
- package/dist/2026-10/services/organizations.d.mts +1 -1
- package/dist/2026-10/services/organizations.mjs +1 -1
- package/dist/2026-10/services/payments.cjs +1 -1
- package/dist/2026-10/services/payments.d.cts +1 -1
- package/dist/2026-10/services/payments.d.mts +1 -1
- package/dist/2026-10/services/payments.mjs +1 -1
- package/dist/2026-10/services/products.cjs +35 -1
- package/dist/2026-10/services/products.cjs.map +1 -1
- package/dist/2026-10/services/products.d.cts +4 -2
- package/dist/2026-10/services/products.d.cts.map +1 -1
- package/dist/2026-10/services/products.d.mts +4 -2
- package/dist/2026-10/services/products.d.mts.map +1 -1
- package/dist/2026-10/services/products.mjs +35 -2
- package/dist/2026-10/services/products.mjs.map +1 -1
- package/dist/2026-10/services/refunds.cjs +1 -1
- package/dist/2026-10/services/refunds.d.cts +1 -1
- package/dist/2026-10/services/refunds.d.mts +1 -1
- package/dist/2026-10/services/refunds.mjs +1 -1
- package/dist/2026-10/services/subscriptions.cjs +4 -4
- package/dist/2026-10/services/subscriptions.cjs.map +1 -1
- package/dist/2026-10/services/subscriptions.d.cts +1 -1
- package/dist/2026-10/services/subscriptions.d.mts +1 -1
- package/dist/2026-10/services/subscriptions.mjs +4 -4
- package/dist/2026-10/services/subscriptions.mjs.map +1 -1
- package/dist/2026-10/services/webhooks.cjs +1 -1
- package/dist/2026-10/services/webhooks.d.cts +1 -1
- package/dist/2026-10/services/webhooks.d.mts +1 -1
- package/dist/2026-10/services/webhooks.mjs +1 -1
- package/dist/2027-01/index.cjs +158 -0
- package/dist/2027-01/index.cjs.map +1 -0
- package/dist/2027-01/index.d.cts +4 -0
- package/dist/2027-01/index.d.mts +4 -0
- package/dist/2027-01/index.mjs +138 -0
- package/dist/2027-01/index.mjs.map +1 -0
- package/dist/2027-01/services/benefit_grants.cjs +76 -0
- package/dist/2027-01/services/benefit_grants.cjs.map +1 -0
- package/dist/2027-01/services/benefit_grants.d.cts +58 -0
- package/dist/2027-01/services/benefit_grants.d.cts.map +1 -0
- package/dist/2027-01/services/benefit_grants.d.mts +58 -0
- package/dist/2027-01/services/benefit_grants.d.mts.map +1 -0
- package/dist/2027-01/services/benefit_grants.mjs +73 -0
- package/dist/2027-01/services/benefit_grants.mjs.map +1 -0
- package/dist/2027-01/services/benefits.cjs +329 -0
- package/dist/2027-01/services/benefits.cjs.map +1 -0
- package/dist/2027-01/services/benefits.d.cts +150 -0
- package/dist/2027-01/services/benefits.d.cts.map +1 -0
- package/dist/2027-01/services/benefits.d.mts +150 -0
- package/dist/2027-01/services/benefits.d.mts.map +1 -0
- package/dist/2027-01/services/benefits.mjs +318 -0
- package/dist/2027-01/services/benefits.mjs.map +1 -0
- package/dist/2027-01/services/checkout_links.cjs +178 -0
- package/dist/2027-01/services/checkout_links.cjs.map +1 -0
- package/dist/2027-01/services/checkout_links.d.cts +58 -0
- package/dist/2027-01/services/checkout_links.d.cts.map +1 -0
- package/dist/2027-01/services/checkout_links.d.mts +58 -0
- package/dist/2027-01/services/checkout_links.d.mts.map +1 -0
- package/dist/2027-01/services/checkout_links.mjs +171 -0
- package/dist/2027-01/services/checkout_links.mjs.map +1 -0
- package/dist/2027-01/services/checkouts.cjs +254 -0
- package/dist/2027-01/services/checkouts.cjs.map +1 -0
- package/dist/2027-01/services/checkouts.d.cts +78 -0
- package/dist/2027-01/services/checkouts.d.cts.map +1 -0
- package/dist/2027-01/services/checkouts.d.mts +78 -0
- package/dist/2027-01/services/checkouts.d.mts.map +1 -0
- package/dist/2027-01/services/checkouts.mjs +245 -0
- package/dist/2027-01/services/checkouts.mjs.map +1 -0
- package/dist/2027-01/services/custom_fields.cjs +179 -0
- package/dist/2027-01/services/custom_fields.cjs.map +1 -0
- package/dist/2027-01/services/custom_fields.d.cts +62 -0
- package/dist/2027-01/services/custom_fields.d.cts.map +1 -0
- package/dist/2027-01/services/custom_fields.d.mts +62 -0
- package/dist/2027-01/services/custom_fields.d.mts.map +1 -0
- package/dist/2027-01/services/custom_fields.mjs +172 -0
- package/dist/2027-01/services/custom_fields.mjs.map +1 -0
- package/dist/2027-01/services/customer_meters.cjs +103 -0
- package/dist/2027-01/services/customer_meters.cjs.map +1 -0
- package/dist/2027-01/services/customer_meters.d.cts +60 -0
- package/dist/2027-01/services/customer_meters.d.cts.map +1 -0
- package/dist/2027-01/services/customer_meters.d.mts +60 -0
- package/dist/2027-01/services/customer_meters.d.mts.map +1 -0
- package/dist/2027-01/services/customer_meters.mjs +99 -0
- package/dist/2027-01/services/customer_meters.mjs.map +1 -0
- package/dist/2027-01/services/customer_portal/benefit_grants.cjs +136 -0
- package/dist/2027-01/services/customer_portal/benefit_grants.cjs.map +1 -0
- package/dist/2027-01/services/customer_portal/benefit_grants.d.cts +74 -0
- package/dist/2027-01/services/customer_portal/benefit_grants.d.cts.map +1 -0
- package/dist/2027-01/services/customer_portal/benefit_grants.d.mts +74 -0
- package/dist/2027-01/services/customer_portal/benefit_grants.d.mts.map +1 -0
- package/dist/2027-01/services/customer_portal/benefit_grants.mjs +131 -0
- package/dist/2027-01/services/customer_portal/benefit_grants.mjs.map +1 -0
- package/dist/2027-01/services/customer_portal/customer_meters.cjs +101 -0
- package/dist/2027-01/services/customer_portal/customer_meters.cjs.map +1 -0
- package/dist/2027-01/services/customer_portal/customer_meters.d.cts +52 -0
- package/dist/2027-01/services/customer_portal/customer_meters.d.cts.map +1 -0
- package/dist/2027-01/services/customer_portal/customer_meters.d.mts +52 -0
- package/dist/2027-01/services/customer_portal/customer_meters.d.mts.map +1 -0
- package/dist/2027-01/services/customer_portal/customer_meters.mjs +97 -0
- package/dist/2027-01/services/customer_portal/customer_meters.mjs.map +1 -0
- package/dist/2027-01/services/customer_portal/customer_session.cjs +50 -0
- package/dist/2027-01/services/customer_portal/customer_session.cjs.map +1 -0
- package/dist/2027-01/services/customer_portal/customer_session.d.cts +13 -0
- package/dist/2027-01/services/customer_portal/customer_session.d.cts.map +1 -0
- package/dist/2027-01/services/customer_portal/customer_session.d.mts +13 -0
- package/dist/2027-01/services/customer_portal/customer_session.d.mts.map +1 -0
- package/dist/2027-01/services/customer_portal/customer_session.mjs +47 -0
- package/dist/2027-01/services/customer_portal/customer_session.mjs.map +1 -0
- package/dist/2027-01/services/customer_portal/customers.cjs +252 -0
- package/dist/2027-01/services/customer_portal/customers.cjs.map +1 -0
- package/dist/2027-01/services/customer_portal/customers.d.cts +56 -0
- package/dist/2027-01/services/customer_portal/customers.d.cts.map +1 -0
- package/dist/2027-01/services/customer_portal/customers.d.mts +56 -0
- package/dist/2027-01/services/customer_portal/customers.d.mts.map +1 -0
- package/dist/2027-01/services/customer_portal/customers.mjs +241 -0
- package/dist/2027-01/services/customer_portal/customers.mjs.map +1 -0
- package/dist/2027-01/services/customer_portal/downloadables.cjs +68 -0
- package/dist/2027-01/services/customer_portal/downloadables.cjs.map +1 -0
- package/dist/2027-01/services/customer_portal/downloadables.d.cts +40 -0
- package/dist/2027-01/services/customer_portal/downloadables.d.cts.map +1 -0
- package/dist/2027-01/services/customer_portal/downloadables.d.mts +40 -0
- package/dist/2027-01/services/customer_portal/downloadables.d.mts.map +1 -0
- package/dist/2027-01/services/customer_portal/downloadables.mjs +65 -0
- package/dist/2027-01/services/customer_portal/downloadables.mjs.map +1 -0
- package/dist/2027-01/services/customer_portal/index.cjs +34 -0
- package/dist/2027-01/services/customer_portal/index.cjs.map +1 -0
- package/dist/2027-01/services/customer_portal/index.d.cts +201 -0
- package/dist/2027-01/services/customer_portal/index.d.cts.map +1 -0
- package/dist/2027-01/services/customer_portal/index.d.mts +201 -0
- package/dist/2027-01/services/customer_portal/index.d.mts.map +1 -0
- package/dist/2027-01/services/customer_portal/index.mjs +33 -0
- package/dist/2027-01/services/customer_portal/index.mjs.map +1 -0
- package/dist/2027-01/services/customer_portal/license_keys.cjs +229 -0
- package/dist/2027-01/services/customer_portal/license_keys.cjs.map +1 -0
- package/dist/2027-01/services/customer_portal/license_keys.d.cts +52 -0
- package/dist/2027-01/services/customer_portal/license_keys.d.cts.map +1 -0
- package/dist/2027-01/services/customer_portal/license_keys.d.mts +52 -0
- package/dist/2027-01/services/customer_portal/license_keys.d.mts.map +1 -0
- package/dist/2027-01/services/customer_portal/license_keys.mjs +221 -0
- package/dist/2027-01/services/customer_portal/license_keys.mjs.map +1 -0
- package/dist/2027-01/services/customer_portal/members.cjs +188 -0
- package/dist/2027-01/services/customer_portal/members.cjs.map +1 -0
- package/dist/2027-01/services/customer_portal/members.d.cts +46 -0
- package/dist/2027-01/services/customer_portal/members.d.cts.map +1 -0
- package/dist/2027-01/services/customer_portal/members.d.mts +46 -0
- package/dist/2027-01/services/customer_portal/members.d.mts.map +1 -0
- package/dist/2027-01/services/customer_portal/members.mjs +182 -0
- package/dist/2027-01/services/customer_portal/members.mjs.map +1 -0
- package/dist/2027-01/services/customer_portal/orders.cjs +255 -0
- package/dist/2027-01/services/customer_portal/orders.cjs.map +1 -0
- package/dist/2027-01/services/customer_portal/orders.d.cts +70 -0
- package/dist/2027-01/services/customer_portal/orders.d.cts.map +1 -0
- package/dist/2027-01/services/customer_portal/orders.d.mts +70 -0
- package/dist/2027-01/services/customer_portal/orders.d.mts.map +1 -0
- package/dist/2027-01/services/customer_portal/orders.mjs +245 -0
- package/dist/2027-01/services/customer_portal/orders.mjs.map +1 -0
- package/dist/2027-01/services/customer_portal/organizations.cjs +34 -0
- package/dist/2027-01/services/customer_portal/organizations.cjs.map +1 -0
- package/dist/2027-01/services/customer_portal/organizations.d.cts +11 -0
- package/dist/2027-01/services/customer_portal/organizations.d.cts.map +1 -0
- package/dist/2027-01/services/customer_portal/organizations.d.mts +11 -0
- package/dist/2027-01/services/customer_portal/organizations.d.mts.map +1 -0
- package/dist/2027-01/services/customer_portal/organizations.mjs +32 -0
- package/dist/2027-01/services/customer_portal/organizations.mjs.map +1 -0
- package/dist/2027-01/services/customer_portal/seats.cjs +196 -0
- package/dist/2027-01/services/customer_portal/seats.cjs.map +1 -0
- package/dist/2027-01/services/customer_portal/seats.d.cts +53 -0
- package/dist/2027-01/services/customer_portal/seats.d.cts.map +1 -0
- package/dist/2027-01/services/customer_portal/seats.d.mts +53 -0
- package/dist/2027-01/services/customer_portal/seats.d.mts.map +1 -0
- package/dist/2027-01/services/customer_portal/seats.mjs +189 -0
- package/dist/2027-01/services/customer_portal/seats.mjs.map +1 -0
- package/dist/2027-01/services/customer_portal/subscriptions.cjs +161 -0
- package/dist/2027-01/services/customer_portal/subscriptions.cjs.map +1 -0
- package/dist/2027-01/services/customer_portal/subscriptions.d.cts +60 -0
- package/dist/2027-01/services/customer_portal/subscriptions.d.cts.map +1 -0
- package/dist/2027-01/services/customer_portal/subscriptions.d.mts +60 -0
- package/dist/2027-01/services/customer_portal/subscriptions.d.mts.map +1 -0
- package/dist/2027-01/services/customer_portal/subscriptions.mjs +155 -0
- package/dist/2027-01/services/customer_portal/subscriptions.mjs.map +1 -0
- package/dist/2027-01/services/customer_portal/wallets.cjs +93 -0
- package/dist/2027-01/services/customer_portal/wallets.cjs.map +1 -0
- package/dist/2027-01/services/customer_portal/wallets.d.cts +42 -0
- package/dist/2027-01/services/customer_portal/wallets.d.cts.map +1 -0
- package/dist/2027-01/services/customer_portal/wallets.d.mts +42 -0
- package/dist/2027-01/services/customer_portal/wallets.d.mts.map +1 -0
- package/dist/2027-01/services/customer_portal/wallets.mjs +89 -0
- package/dist/2027-01/services/customer_portal/wallets.mjs.map +1 -0
- package/dist/2027-01/services/customer_seats.cjs +187 -0
- package/dist/2027-01/services/customer_seats.cjs.map +1 -0
- package/dist/2027-01/services/customer_seats.d.cts +27 -0
- package/dist/2027-01/services/customer_seats.d.cts.map +1 -0
- package/dist/2027-01/services/customer_seats.d.mts +27 -0
- package/dist/2027-01/services/customer_seats.d.mts.map +1 -0
- package/dist/2027-01/services/customer_seats.mjs +180 -0
- package/dist/2027-01/services/customer_seats.mjs.map +1 -0
- package/dist/2027-01/services/customer_sessions.cjs +38 -0
- package/dist/2027-01/services/customer_sessions.cjs.map +1 -0
- package/dist/2027-01/services/customer_sessions.d.cts +11 -0
- package/dist/2027-01/services/customer_sessions.d.cts.map +1 -0
- package/dist/2027-01/services/customer_sessions.d.mts +11 -0
- package/dist/2027-01/services/customer_sessions.d.mts.map +1 -0
- package/dist/2027-01/services/customer_sessions.mjs +36 -0
- package/dist/2027-01/services/customer_sessions.mjs.map +1 -0
- package/dist/2027-01/services/customers/index.cjs +511 -0
- package/dist/2027-01/services/customers/index.cjs.map +1 -0
- package/dist/2027-01/services/customers/index.d.cts +190 -0
- package/dist/2027-01/services/customers/index.d.cts.map +1 -0
- package/dist/2027-01/services/customers/index.d.mts +190 -0
- package/dist/2027-01/services/customers/index.d.mts.map +1 -0
- package/dist/2027-01/services/customers/index.mjs +494 -0
- package/dist/2027-01/services/customers/index.mjs.map +1 -0
- package/dist/2027-01/services/customers/members.cjs +413 -0
- package/dist/2027-01/services/customers/members.cjs.map +1 -0
- package/dist/2027-01/services/customers/members.d.cts +104 -0
- package/dist/2027-01/services/customers/members.d.cts.map +1 -0
- package/dist/2027-01/services/customers/members.d.mts +104 -0
- package/dist/2027-01/services/customers/members.d.mts.map +1 -0
- package/dist/2027-01/services/customers/members.mjs +400 -0
- package/dist/2027-01/services/customers/members.mjs.map +1 -0
- package/dist/2027-01/services/discounts.cjs +178 -0
- package/dist/2027-01/services/discounts.cjs.map +1 -0
- package/dist/2027-01/services/discounts.d.cts +58 -0
- package/dist/2027-01/services/discounts.d.cts.map +1 -0
- package/dist/2027-01/services/discounts.d.mts +58 -0
- package/dist/2027-01/services/discounts.d.mts.map +1 -0
- package/dist/2027-01/services/discounts.mjs +171 -0
- package/dist/2027-01/services/discounts.mjs.map +1 -0
- package/dist/2027-01/services/disputes.cjs +134 -0
- package/dist/2027-01/services/disputes.cjs.map +1 -0
- package/dist/2027-01/services/disputes.d.cts +58 -0
- package/dist/2027-01/services/disputes.d.cts.map +1 -0
- package/dist/2027-01/services/disputes.d.mts +58 -0
- package/dist/2027-01/services/disputes.d.mts.map +1 -0
- package/dist/2027-01/services/disputes.mjs +129 -0
- package/dist/2027-01/services/disputes.mjs.map +1 -0
- package/dist/2027-01/services/event_types.cjs +107 -0
- package/dist/2027-01/services/event_types.cjs.map +1 -0
- package/dist/2027-01/services/event_types.d.cts +72 -0
- package/dist/2027-01/services/event_types.d.cts.map +1 -0
- package/dist/2027-01/services/event_types.d.mts +72 -0
- package/dist/2027-01/services/event_types.d.mts.map +1 -0
- package/dist/2027-01/services/event_types.mjs +103 -0
- package/dist/2027-01/services/event_types.mjs.map +1 -0
- package/dist/2027-01/services/events.cjs +167 -0
- package/dist/2027-01/services/events.cjs.map +1 -0
- package/dist/2027-01/services/events.d.cts +102 -0
- package/dist/2027-01/services/events.d.cts.map +1 -0
- package/dist/2027-01/services/events.d.mts +102 -0
- package/dist/2027-01/services/events.d.mts.map +1 -0
- package/dist/2027-01/services/events.mjs +161 -0
- package/dist/2027-01/services/events.mjs.map +1 -0
- package/dist/2027-01/services/files.cjs +184 -0
- package/dist/2027-01/services/files.cjs.map +1 -0
- package/dist/2027-01/services/files.d.cts +54 -0
- package/dist/2027-01/services/files.d.cts.map +1 -0
- package/dist/2027-01/services/files.d.mts +54 -0
- package/dist/2027-01/services/files.d.mts.map +1 -0
- package/dist/2027-01/services/files.mjs +177 -0
- package/dist/2027-01/services/files.mjs.map +1 -0
- package/dist/2027-01/services/license_keys.cjs +291 -0
- package/dist/2027-01/services/license_keys.cjs.map +1 -0
- package/dist/2027-01/services/license_keys.d.cts +66 -0
- package/dist/2027-01/services/license_keys.d.cts.map +1 -0
- package/dist/2027-01/services/license_keys.d.mts +66 -0
- package/dist/2027-01/services/license_keys.d.mts.map +1 -0
- package/dist/2027-01/services/license_keys.mjs +281 -0
- package/dist/2027-01/services/license_keys.mjs.map +1 -0
- package/dist/2027-01/services/meters.cjs +191 -0
- package/dist/2027-01/services/meters.cjs.map +1 -0
- package/dist/2027-01/services/meters.d.cts +84 -0
- package/dist/2027-01/services/meters.d.cts.map +1 -0
- package/dist/2027-01/services/meters.d.mts +84 -0
- package/dist/2027-01/services/meters.d.mts.map +1 -0
- package/dist/2027-01/services/meters.mjs +184 -0
- package/dist/2027-01/services/meters.mjs.map +1 -0
- package/dist/2027-01/services/metrics.cjs +217 -0
- package/dist/2027-01/services/metrics.cjs.map +1 -0
- package/dist/2027-01/services/metrics.d.cts +69 -0
- package/dist/2027-01/services/metrics.d.cts.map +1 -0
- package/dist/2027-01/services/metrics.d.mts +69 -0
- package/dist/2027-01/services/metrics.d.mts.map +1 -0
- package/dist/2027-01/services/metrics.mjs +208 -0
- package/dist/2027-01/services/metrics.mjs.map +1 -0
- package/dist/2027-01/services/oauth2/clients/index.cjs +10 -0
- package/dist/2027-01/services/oauth2/clients/index.cjs.map +1 -0
- package/dist/2027-01/services/oauth2/clients/index.d.cts +15 -0
- package/dist/2027-01/services/oauth2/clients/index.d.cts.map +1 -0
- package/dist/2027-01/services/oauth2/clients/index.d.mts +15 -0
- package/dist/2027-01/services/oauth2/clients/index.d.mts.map +1 -0
- package/dist/2027-01/services/oauth2/clients/index.mjs +9 -0
- package/dist/2027-01/services/oauth2/clients/index.mjs.map +1 -0
- package/dist/2027-01/services/oauth2/clients/oauth2.cjs +95 -0
- package/dist/2027-01/services/oauth2/clients/oauth2.cjs.map +1 -0
- package/dist/2027-01/services/oauth2/clients/oauth2.d.cts +17 -0
- package/dist/2027-01/services/oauth2/clients/oauth2.d.cts.map +1 -0
- package/dist/2027-01/services/oauth2/clients/oauth2.d.mts +17 -0
- package/dist/2027-01/services/oauth2/clients/oauth2.d.mts.map +1 -0
- package/dist/2027-01/services/oauth2/clients/oauth2.mjs +90 -0
- package/dist/2027-01/services/oauth2/clients/oauth2.mjs.map +1 -0
- package/dist/2027-01/services/oauth2/index.cjs +101 -0
- package/dist/2027-01/services/oauth2/index.cjs.map +1 -0
- package/dist/2027-01/services/oauth2/index.d.cts +27 -0
- package/dist/2027-01/services/oauth2/index.d.cts.map +1 -0
- package/dist/2027-01/services/oauth2/index.d.mts +27 -0
- package/dist/2027-01/services/oauth2/index.d.mts.map +1 -0
- package/dist/2027-01/services/oauth2/index.mjs +95 -0
- package/dist/2027-01/services/oauth2/index.mjs.map +1 -0
- package/dist/2027-01/services/orders.cjs +320 -0
- package/dist/2027-01/services/orders.cjs.map +1 -0
- package/dist/2027-01/services/orders.d.cts +122 -0
- package/dist/2027-01/services/orders.d.cts.map +1 -0
- package/dist/2027-01/services/orders.d.mts +122 -0
- package/dist/2027-01/services/orders.d.mts.map +1 -0
- package/dist/2027-01/services/orders.mjs +309 -0
- package/dist/2027-01/services/orders.mjs.map +1 -0
- package/dist/2027-01/services/organizations.cjs +158 -0
- package/dist/2027-01/services/organizations.cjs.map +1 -0
- package/dist/2027-01/services/organizations.d.cts +52 -0
- package/dist/2027-01/services/organizations.d.cts.map +1 -0
- package/dist/2027-01/services/organizations.d.mts +52 -0
- package/dist/2027-01/services/organizations.d.mts.map +1 -0
- package/dist/2027-01/services/organizations.mjs +152 -0
- package/dist/2027-01/services/organizations.mjs.map +1 -0
- package/dist/2027-01/services/payments.cjs +106 -0
- package/dist/2027-01/services/payments.cjs.map +1 -0
- package/dist/2027-01/services/payments.d.cts +72 -0
- package/dist/2027-01/services/payments.d.cts.map +1 -0
- package/dist/2027-01/services/payments.d.mts +72 -0
- package/dist/2027-01/services/payments.d.mts.map +1 -0
- package/dist/2027-01/services/payments.mjs +102 -0
- package/dist/2027-01/services/payments.mjs.map +1 -0
- package/dist/2027-01/services/products.cjs +223 -0
- package/dist/2027-01/services/products.cjs.map +1 -0
- package/dist/2027-01/services/products.d.cts +84 -0
- package/dist/2027-01/services/products.d.cts.map +1 -0
- package/dist/2027-01/services/products.d.mts +84 -0
- package/dist/2027-01/services/products.d.mts.map +1 -0
- package/dist/2027-01/services/products.mjs +215 -0
- package/dist/2027-01/services/products.mjs.map +1 -0
- package/dist/2027-01/services/refunds.cjs +105 -0
- package/dist/2027-01/services/refunds.cjs.map +1 -0
- package/dist/2027-01/services/refunds.d.cts +72 -0
- package/dist/2027-01/services/refunds.d.cts.map +1 -0
- package/dist/2027-01/services/refunds.d.mts +72 -0
- package/dist/2027-01/services/refunds.d.mts.map +1 -0
- package/dist/2027-01/services/refunds.mjs +101 -0
- package/dist/2027-01/services/refunds.mjs.map +1 -0
- package/dist/2027-01/services/subscriptions.cjs +238 -0
- package/dist/2027-01/services/subscriptions.cjs.map +1 -0
- package/dist/2027-01/services/subscriptions.d.cts +126 -0
- package/dist/2027-01/services/subscriptions.d.cts.map +1 -0
- package/dist/2027-01/services/subscriptions.d.mts +126 -0
- package/dist/2027-01/services/subscriptions.d.mts.map +1 -0
- package/dist/2027-01/services/subscriptions.mjs +230 -0
- package/dist/2027-01/services/subscriptions.mjs.map +1 -0
- package/dist/2027-01/services/webhooks.cjs +301 -0
- package/dist/2027-01/services/webhooks.cjs.map +1 -0
- package/dist/2027-01/services/webhooks.d.cts +113 -0
- package/dist/2027-01/services/webhooks.d.cts.map +1 -0
- package/dist/2027-01/services/webhooks.d.mts +113 -0
- package/dist/2027-01/services/webhooks.d.mts.map +1 -0
- package/dist/2027-01/services/webhooks.mjs +290 -0
- package/dist/2027-01/services/webhooks.mjs.map +1 -0
- package/dist/errors-B1xadCgl.mjs +1255 -0
- package/dist/errors-B1xadCgl.mjs.map +1 -0
- package/dist/{errors-D1yM2ZQm.mjs → errors-B2qXHz99.mjs} +62 -6
- package/dist/errors-B2qXHz99.mjs.map +1 -0
- package/dist/{errors-BfEghQ77.cjs → errors-BG3e1vcX.cjs} +85 -5
- package/dist/errors-BG3e1vcX.cjs.map +1 -0
- package/dist/errors-DDydmY6t.cjs +1794 -0
- package/dist/errors-DDydmY6t.cjs.map +1 -0
- package/dist/{errors-hhbDe5ap.mjs → errors-D_tOnoPP.mjs} +62 -6
- package/dist/errors-D_tOnoPP.mjs.map +1 -0
- package/dist/{errors-CPJ329AT.cjs → errors-h8gRquR8.cjs} +85 -5
- package/dist/errors-h8gRquR8.cjs.map +1 -0
- package/dist/index-CASi3-c8.d.mts +2738 -0
- package/dist/index-CASi3-c8.d.mts.map +1 -0
- package/dist/{index-BkTZ8a-R.d.mts → index-CCkgYIo1.d.mts} +85 -17
- package/dist/index-CCkgYIo1.d.mts.map +1 -0
- package/dist/{index-BamOUZl1.d.cts → index-Cu_Exrh7.d.cts} +85 -17
- package/dist/index-Cu_Exrh7.d.cts.map +1 -0
- package/dist/{index-JEL0D7T4.d.mts → index-RFIyzWM8.d.mts} +85 -17
- package/dist/index-RFIyzWM8.d.mts.map +1 -0
- package/dist/index-Uq9Eca4W.d.cts +2738 -0
- package/dist/index-Uq9Eca4W.d.cts.map +1 -0
- package/dist/{index-BDWUg8uj.d.cts → index-YSnA4bj_.d.cts} +85 -17
- package/dist/index-YSnA4bj_.d.cts.map +1 -0
- package/dist/models-COhG3nD4.d.cts +22081 -0
- package/dist/models-COhG3nD4.d.cts.map +1 -0
- package/dist/models-COhG3nD4.d.mts +22081 -0
- package/dist/models-COhG3nD4.d.mts.map +1 -0
- package/dist/{models-D3N1jo2G.d.cts → models-CygFKqFa.d.cts} +331 -18
- package/dist/models-CygFKqFa.d.cts.map +1 -0
- package/dist/{models-D3N1jo2G.d.mts → models-CygFKqFa.d.mts} +331 -18
- package/dist/models-CygFKqFa.d.mts.map +1 -0
- package/dist/{models-f2_talp6.d.cts → models-DjSYF7EH.d.cts} +386 -16
- package/dist/models-DjSYF7EH.d.cts.map +1 -0
- package/dist/{models-f2_talp6.d.mts → models-DjSYF7EH.d.mts} +386 -16
- package/dist/models-DjSYF7EH.d.mts.map +1 -0
- package/package.json +51 -1
- package/dist/errors-BfEghQ77.cjs.map +0 -1
- package/dist/errors-CPJ329AT.cjs.map +0 -1
- package/dist/errors-D1yM2ZQm.mjs.map +0 -1
- package/dist/errors-hhbDe5ap.mjs.map +0 -1
- package/dist/index-BDWUg8uj.d.cts.map +0 -1
- package/dist/index-BamOUZl1.d.cts.map +0 -1
- package/dist/index-BkTZ8a-R.d.mts.map +0 -1
- package/dist/index-JEL0D7T4.d.mts.map +0 -1
- package/dist/models-D3N1jo2G.d.cts.map +0 -1
- package/dist/models-D3N1jo2G.d.mts.map +0 -1
- package/dist/models-f2_talp6.d.cts.map +0 -1
- package/dist/models-f2_talp6.d.mts.map +0 -1
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_errors = require("../../../errors-DDydmY6t.cjs");
|
|
3
|
+
const require_2027_01_services_customers_members = require("./members.cjs");
|
|
4
|
+
//#region src/2027-01/services/customers/index.ts
|
|
5
|
+
const listCustomers = (client) => {
|
|
6
|
+
/**
|
|
7
|
+
* List customers.
|
|
8
|
+
*
|
|
9
|
+
* **Scopes**: `customers:read` `customers:write`
|
|
10
|
+
*
|
|
11
|
+
* @param query - Query parameters
|
|
12
|
+
* @param requestOptions - Request options
|
|
13
|
+
* @returns {ListResourceCustomer}
|
|
14
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
15
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
16
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
17
|
+
* @throws {HTTPValidationError} Validation Error
|
|
18
|
+
*/
|
|
19
|
+
return async (query, requestOptions) => {
|
|
20
|
+
const pathParams = {};
|
|
21
|
+
const queryParams = {
|
|
22
|
+
organization_id: query?.organization_id,
|
|
23
|
+
email: query?.email,
|
|
24
|
+
query: query?.query,
|
|
25
|
+
active: query?.active,
|
|
26
|
+
page: query?.page ?? 1,
|
|
27
|
+
limit: query?.limit ?? 10,
|
|
28
|
+
sorting: query?.sorting ?? ["-created_at"],
|
|
29
|
+
metadata: query?.metadata
|
|
30
|
+
};
|
|
31
|
+
const request = client.buildRequest("GET", "/v1/customers/", pathParams, queryParams, void 0);
|
|
32
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
33
|
+
return client.parseResponse(response, "json", { 422: require_errors.HTTPValidationError });
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* List customers.
|
|
38
|
+
*
|
|
39
|
+
* **Scopes**: `customers:read` `customers:write`
|
|
40
|
+
*
|
|
41
|
+
* @param query - Query parameters
|
|
42
|
+
* @param requestOptions - Request options
|
|
43
|
+
* @returns {AsyncGenerator<Customer>} A generator that yields items of type Customer.
|
|
44
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
45
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
46
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
47
|
+
* @throws {HTTPValidationError} Validation Error
|
|
48
|
+
*/
|
|
49
|
+
const iterListCustomers = (client) => {
|
|
50
|
+
return async function* (query, requestOptions) {
|
|
51
|
+
let page;
|
|
52
|
+
page = query?.page ?? 1;
|
|
53
|
+
let limit;
|
|
54
|
+
limit = query?.limit;
|
|
55
|
+
while (true) {
|
|
56
|
+
const response = await listCustomers(client)({
|
|
57
|
+
...query,
|
|
58
|
+
page,
|
|
59
|
+
limit
|
|
60
|
+
}, requestOptions);
|
|
61
|
+
for (const item of response.items) yield item;
|
|
62
|
+
if (page >= response.pagination.max_page) break;
|
|
63
|
+
page++;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
const createCustomers = (client) => {
|
|
68
|
+
/**
|
|
69
|
+
* Create a customer.
|
|
70
|
+
*
|
|
71
|
+
* **Scopes**: `customers:write`
|
|
72
|
+
*
|
|
73
|
+
* @param body - Request body
|
|
74
|
+
* @param requestOptions - Request options
|
|
75
|
+
* @returns {Customer}
|
|
76
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
77
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
78
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
79
|
+
* @throws {HTTPValidationError} Validation Error
|
|
80
|
+
*/
|
|
81
|
+
return async (body, requestOptions) => {
|
|
82
|
+
const request = client.buildRequest("POST", "/v1/customers/", {}, {}, body);
|
|
83
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
84
|
+
return client.parseResponse(response, "json", { 422: require_errors.HTTPValidationError });
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
const exportCustomers = (client) => {
|
|
88
|
+
/**
|
|
89
|
+
* Export customers as a CSV file.
|
|
90
|
+
*
|
|
91
|
+
* **Scopes**: `customers:read` `customers:write`
|
|
92
|
+
*
|
|
93
|
+
* @param query - Query parameters
|
|
94
|
+
* @param requestOptions - Request options
|
|
95
|
+
* @returns {string}
|
|
96
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
97
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
98
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
99
|
+
* @throws {HTTPValidationError} Validation Error
|
|
100
|
+
*/
|
|
101
|
+
return async (query, requestOptions) => {
|
|
102
|
+
const pathParams = {};
|
|
103
|
+
const queryParams = { organization_id: query?.organization_id };
|
|
104
|
+
const request = client.buildRequest("GET", "/v1/customers/export", pathParams, queryParams, void 0);
|
|
105
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
106
|
+
return client.parseResponse(response, "text", { 422: require_errors.HTTPValidationError });
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
const getCustomers = (client) => {
|
|
110
|
+
/**
|
|
111
|
+
* Get a customer by ID.
|
|
112
|
+
*
|
|
113
|
+
* **Scopes**: `customers:read` `customers:write`
|
|
114
|
+
*
|
|
115
|
+
* @param id - The customer ID.
|
|
116
|
+
* @param requestOptions - Request options
|
|
117
|
+
* @returns {Customer}
|
|
118
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
119
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
120
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
121
|
+
* @throws {ResourceNotFound} Customer not found.
|
|
122
|
+
* @throws {HTTPValidationError} Validation Error
|
|
123
|
+
*/
|
|
124
|
+
return async (id, requestOptions) => {
|
|
125
|
+
const pathParams = { id };
|
|
126
|
+
const request = client.buildRequest("GET", "/v1/customers/{id}", pathParams, {}, void 0);
|
|
127
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
128
|
+
return client.parseResponse(response, "json", {
|
|
129
|
+
404: require_errors.ResourceNotFound,
|
|
130
|
+
422: require_errors.HTTPValidationError
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
const deleteCustomers = (client) => {
|
|
135
|
+
/**
|
|
136
|
+
* Delete a customer.
|
|
137
|
+
*
|
|
138
|
+
* This action cannot be undone and will immediately:
|
|
139
|
+
* - Cancel any active subscriptions for the customer
|
|
140
|
+
* - Revoke all their benefits
|
|
141
|
+
* - Clear any `external_id`
|
|
142
|
+
*
|
|
143
|
+
* Use it only in the context of deleting a user within your
|
|
144
|
+
* own service. Otherwise, use more granular API endpoints to cancel
|
|
145
|
+
* a specific subscription or revoke certain benefits.
|
|
146
|
+
*
|
|
147
|
+
* Note: The customers information will nonetheless be retained for historic
|
|
148
|
+
* orders and subscriptions.
|
|
149
|
+
*
|
|
150
|
+
* Set `anonymize=true` to also anonymize PII for GDPR compliance.
|
|
151
|
+
*
|
|
152
|
+
* **Scopes**: `customers:write`
|
|
153
|
+
*
|
|
154
|
+
* @param id - The customer ID.
|
|
155
|
+
* @param query - Query parameters
|
|
156
|
+
* @param requestOptions - Request options
|
|
157
|
+
* @returns {void}
|
|
158
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
159
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
160
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
161
|
+
* @throws {ResourceNotFound} Customer not found.
|
|
162
|
+
* @throws {HTTPValidationError} Validation Error
|
|
163
|
+
*/
|
|
164
|
+
return async (id, query, requestOptions) => {
|
|
165
|
+
const pathParams = { id };
|
|
166
|
+
const queryParams = { anonymize: query?.anonymize };
|
|
167
|
+
const request = client.buildRequest("DELETE", "/v1/customers/{id}", pathParams, queryParams, void 0);
|
|
168
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
169
|
+
return client.parseResponse(response, "none", {
|
|
170
|
+
404: require_errors.ResourceNotFound,
|
|
171
|
+
422: require_errors.HTTPValidationError
|
|
172
|
+
});
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
const updateCustomers = (client) => {
|
|
176
|
+
/**
|
|
177
|
+
* Update a customer.
|
|
178
|
+
*
|
|
179
|
+
* **Scopes**: `customers:write`
|
|
180
|
+
*
|
|
181
|
+
* @param id - The customer ID.
|
|
182
|
+
* @param body - Request body
|
|
183
|
+
* @param requestOptions - Request options
|
|
184
|
+
* @returns {Customer}
|
|
185
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
186
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
187
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
188
|
+
* @throws {ResourceNotFound} Customer not found.
|
|
189
|
+
* @throws {HTTPValidationError} Validation Error
|
|
190
|
+
*/
|
|
191
|
+
return async (id, body, requestOptions) => {
|
|
192
|
+
const pathParams = { id };
|
|
193
|
+
const request = client.buildRequest("PATCH", "/v1/customers/{id}", pathParams, {}, body);
|
|
194
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
195
|
+
return client.parseResponse(response, "json", {
|
|
196
|
+
404: require_errors.ResourceNotFound,
|
|
197
|
+
422: require_errors.HTTPValidationError
|
|
198
|
+
});
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
const getExternalCustomers = (client) => {
|
|
202
|
+
/**
|
|
203
|
+
* Get a customer by external ID.
|
|
204
|
+
*
|
|
205
|
+
* **Scopes**: `customers:read` `customers:write`
|
|
206
|
+
*
|
|
207
|
+
* @param external_id - The customer external ID.
|
|
208
|
+
* @param requestOptions - Request options
|
|
209
|
+
* @returns {Customer}
|
|
210
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
211
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
212
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
213
|
+
* @throws {ResourceNotFound} Customer not found.
|
|
214
|
+
* @throws {HTTPValidationError} Validation Error
|
|
215
|
+
*/
|
|
216
|
+
return async (external_id, requestOptions) => {
|
|
217
|
+
const pathParams = { external_id };
|
|
218
|
+
const request = client.buildRequest("GET", "/v1/customers/external/{external_id}", pathParams, {}, void 0);
|
|
219
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
220
|
+
return client.parseResponse(response, "json", {
|
|
221
|
+
404: require_errors.ResourceNotFound,
|
|
222
|
+
422: require_errors.HTTPValidationError
|
|
223
|
+
});
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
const deleteExternalCustomers = (client) => {
|
|
227
|
+
/**
|
|
228
|
+
* Delete a customer by external ID.
|
|
229
|
+
*
|
|
230
|
+
* Immediately cancels any active subscriptions and revokes any active benefits.
|
|
231
|
+
*
|
|
232
|
+
* Set `anonymize=true` to also anonymize PII for GDPR compliance.
|
|
233
|
+
*
|
|
234
|
+
* **Scopes**: `customers:write`
|
|
235
|
+
*
|
|
236
|
+
* @param external_id - The customer external ID.
|
|
237
|
+
* @param query - Query parameters
|
|
238
|
+
* @param requestOptions - Request options
|
|
239
|
+
* @returns {void}
|
|
240
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
241
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
242
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
243
|
+
* @throws {ResourceNotFound} Customer not found.
|
|
244
|
+
* @throws {HTTPValidationError} Validation Error
|
|
245
|
+
*/
|
|
246
|
+
return async (external_id, query, requestOptions) => {
|
|
247
|
+
const pathParams = { external_id };
|
|
248
|
+
const queryParams = { anonymize: query?.anonymize };
|
|
249
|
+
const request = client.buildRequest("DELETE", "/v1/customers/external/{external_id}", pathParams, queryParams, void 0);
|
|
250
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
251
|
+
return client.parseResponse(response, "none", {
|
|
252
|
+
404: require_errors.ResourceNotFound,
|
|
253
|
+
422: require_errors.HTTPValidationError
|
|
254
|
+
});
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
const updateExternalCustomers = (client) => {
|
|
258
|
+
/**
|
|
259
|
+
* Update a customer by external ID.
|
|
260
|
+
*
|
|
261
|
+
* **Scopes**: `customers:write`
|
|
262
|
+
*
|
|
263
|
+
* @param external_id - The customer external ID.
|
|
264
|
+
* @param body - Request body
|
|
265
|
+
* @param requestOptions - Request options
|
|
266
|
+
* @returns {Customer}
|
|
267
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
268
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
269
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
270
|
+
* @throws {ResourceNotFound} Customer not found.
|
|
271
|
+
* @throws {HTTPValidationError} Validation Error
|
|
272
|
+
*/
|
|
273
|
+
return async (external_id, body, requestOptions) => {
|
|
274
|
+
const pathParams = { external_id };
|
|
275
|
+
const request = client.buildRequest("PATCH", "/v1/customers/external/{external_id}", pathParams, {}, body);
|
|
276
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
277
|
+
return client.parseResponse(response, "json", {
|
|
278
|
+
404: require_errors.ResourceNotFound,
|
|
279
|
+
422: require_errors.HTTPValidationError
|
|
280
|
+
});
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
const getStateCustomers = (client) => {
|
|
284
|
+
/**
|
|
285
|
+
* Get a customer state by ID.
|
|
286
|
+
*
|
|
287
|
+
* The customer state includes information about
|
|
288
|
+
* the customer's active subscriptions and benefits.
|
|
289
|
+
*
|
|
290
|
+
* It's the ideal endpoint to use when you need to get a full overview
|
|
291
|
+
* of a customer's status.
|
|
292
|
+
*
|
|
293
|
+
* **Scopes**: `customers:read` `customers:write`
|
|
294
|
+
*
|
|
295
|
+
* @param id - The customer ID.
|
|
296
|
+
* @param requestOptions - Request options
|
|
297
|
+
* @returns {CustomerState}
|
|
298
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
299
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
300
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
301
|
+
* @throws {ResourceNotFound} Customer not found.
|
|
302
|
+
* @throws {HTTPValidationError} Validation Error
|
|
303
|
+
*/
|
|
304
|
+
return async (id, requestOptions) => {
|
|
305
|
+
const pathParams = { id };
|
|
306
|
+
const request = client.buildRequest("GET", "/v1/customers/{id}/state", pathParams, {}, void 0);
|
|
307
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
308
|
+
return client.parseResponse(response, "json", {
|
|
309
|
+
404: require_errors.ResourceNotFound,
|
|
310
|
+
422: require_errors.HTTPValidationError
|
|
311
|
+
});
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
const getStateExternalCustomers = (client) => {
|
|
315
|
+
/**
|
|
316
|
+
* Get a customer state by external ID.
|
|
317
|
+
*
|
|
318
|
+
* The customer state includes information about
|
|
319
|
+
* the customer's active subscriptions and benefits.
|
|
320
|
+
*
|
|
321
|
+
* It's the ideal endpoint to use when you need to get a full overview
|
|
322
|
+
* of a customer's status.
|
|
323
|
+
*
|
|
324
|
+
* **Scopes**: `customers:read` `customers:write`
|
|
325
|
+
*
|
|
326
|
+
* @param external_id - The customer external ID.
|
|
327
|
+
* @param requestOptions - Request options
|
|
328
|
+
* @returns {CustomerState}
|
|
329
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
330
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
331
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
332
|
+
* @throws {ResourceNotFound} Customer not found.
|
|
333
|
+
* @throws {HTTPValidationError} Validation Error
|
|
334
|
+
*/
|
|
335
|
+
return async (external_id, requestOptions) => {
|
|
336
|
+
const pathParams = { external_id };
|
|
337
|
+
const request = client.buildRequest("GET", "/v1/customers/external/{external_id}/state", pathParams, {}, void 0);
|
|
338
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
339
|
+
return client.parseResponse(response, "json", {
|
|
340
|
+
404: require_errors.ResourceNotFound,
|
|
341
|
+
422: require_errors.HTTPValidationError
|
|
342
|
+
});
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
const listPaymentMethodsCustomers = (client) => {
|
|
346
|
+
/**
|
|
347
|
+
* Get saved payment methods of a customer.
|
|
348
|
+
*
|
|
349
|
+
* **Scopes**: `customers:read` `customers:write`
|
|
350
|
+
*
|
|
351
|
+
* @param id - The customer ID.
|
|
352
|
+
* @param query - Query parameters
|
|
353
|
+
* @param requestOptions - Request options
|
|
354
|
+
* @returns {ListResourcePaymentMethod}
|
|
355
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
356
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
357
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
358
|
+
* @throws {ResourceNotFound} Customer not found.
|
|
359
|
+
* @throws {HTTPValidationError} Validation Error
|
|
360
|
+
*/
|
|
361
|
+
return async (id, query, requestOptions) => {
|
|
362
|
+
const pathParams = { id };
|
|
363
|
+
const queryParams = {
|
|
364
|
+
page: query?.page ?? 1,
|
|
365
|
+
limit: query?.limit ?? 10
|
|
366
|
+
};
|
|
367
|
+
const request = client.buildRequest("GET", "/v1/customers/{id}/payment-methods", pathParams, queryParams, void 0);
|
|
368
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
369
|
+
return client.parseResponse(response, "json", {
|
|
370
|
+
404: require_errors.ResourceNotFound,
|
|
371
|
+
422: require_errors.HTTPValidationError
|
|
372
|
+
});
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
/**
|
|
376
|
+
* Get saved payment methods of a customer.
|
|
377
|
+
*
|
|
378
|
+
* **Scopes**: `customers:read` `customers:write`
|
|
379
|
+
*
|
|
380
|
+
* @param id - The customer ID.
|
|
381
|
+
* @param query - Query parameters
|
|
382
|
+
* @param requestOptions - Request options
|
|
383
|
+
* @returns {AsyncGenerator<PaymentMethod>} A generator that yields items of type PaymentMethod.
|
|
384
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
385
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
386
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
387
|
+
* @throws {ResourceNotFound} Customer not found.
|
|
388
|
+
* @throws {HTTPValidationError} Validation Error
|
|
389
|
+
*/
|
|
390
|
+
const iterListPaymentMethodsCustomers = (client) => {
|
|
391
|
+
return async function* (id, query, requestOptions) {
|
|
392
|
+
let page;
|
|
393
|
+
page = query?.page ?? 1;
|
|
394
|
+
let limit;
|
|
395
|
+
limit = query?.limit;
|
|
396
|
+
while (true) {
|
|
397
|
+
const response = await listPaymentMethodsCustomers(client)(id, {
|
|
398
|
+
...query,
|
|
399
|
+
page,
|
|
400
|
+
limit
|
|
401
|
+
}, requestOptions);
|
|
402
|
+
for (const item of response.items) yield item;
|
|
403
|
+
if (page >= response.pagination.max_page) break;
|
|
404
|
+
page++;
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
const listPaymentMethodsExternalCustomers = (client) => {
|
|
409
|
+
/**
|
|
410
|
+
* Get saved payment methods of a customer by external ID.
|
|
411
|
+
*
|
|
412
|
+
* **Scopes**: `customers:read` `customers:write`
|
|
413
|
+
*
|
|
414
|
+
* @param external_id - The customer external ID.
|
|
415
|
+
* @param query - Query parameters
|
|
416
|
+
* @param requestOptions - Request options
|
|
417
|
+
* @returns {ListResourcePaymentMethod}
|
|
418
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
419
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
420
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
421
|
+
* @throws {ResourceNotFound} Customer not found.
|
|
422
|
+
* @throws {HTTPValidationError} Validation Error
|
|
423
|
+
*/
|
|
424
|
+
return async (external_id, query, requestOptions) => {
|
|
425
|
+
const pathParams = { external_id };
|
|
426
|
+
const queryParams = {
|
|
427
|
+
page: query?.page ?? 1,
|
|
428
|
+
limit: query?.limit ?? 10
|
|
429
|
+
};
|
|
430
|
+
const request = client.buildRequest("GET", "/v1/customers/external/{external_id}/payment-methods", pathParams, queryParams, void 0);
|
|
431
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
432
|
+
return client.parseResponse(response, "json", {
|
|
433
|
+
404: require_errors.ResourceNotFound,
|
|
434
|
+
422: require_errors.HTTPValidationError
|
|
435
|
+
});
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
/**
|
|
439
|
+
* Get saved payment methods of a customer by external ID.
|
|
440
|
+
*
|
|
441
|
+
* **Scopes**: `customers:read` `customers:write`
|
|
442
|
+
*
|
|
443
|
+
* @param external_id - The customer external ID.
|
|
444
|
+
* @param query - Query parameters
|
|
445
|
+
* @param requestOptions - Request options
|
|
446
|
+
* @returns {AsyncGenerator<PaymentMethod>} A generator that yields items of type PaymentMethod.
|
|
447
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
448
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
449
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
450
|
+
* @throws {ResourceNotFound} Customer not found.
|
|
451
|
+
* @throws {HTTPValidationError} Validation Error
|
|
452
|
+
*/
|
|
453
|
+
const iterListPaymentMethodsExternalCustomers = (client) => {
|
|
454
|
+
return async function* (external_id, query, requestOptions) {
|
|
455
|
+
let page;
|
|
456
|
+
page = query?.page ?? 1;
|
|
457
|
+
let limit;
|
|
458
|
+
limit = query?.limit;
|
|
459
|
+
while (true) {
|
|
460
|
+
const response = await listPaymentMethodsExternalCustomers(client)(external_id, {
|
|
461
|
+
...query,
|
|
462
|
+
page,
|
|
463
|
+
limit
|
|
464
|
+
}, requestOptions);
|
|
465
|
+
for (const item of response.items) yield item;
|
|
466
|
+
if (page >= response.pagination.max_page) break;
|
|
467
|
+
page++;
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
};
|
|
471
|
+
function createCustomersService(client) {
|
|
472
|
+
return {
|
|
473
|
+
list: listCustomers(client),
|
|
474
|
+
create: createCustomers(client),
|
|
475
|
+
export: exportCustomers(client),
|
|
476
|
+
get: getCustomers(client),
|
|
477
|
+
delete: deleteCustomers(client),
|
|
478
|
+
update: updateCustomers(client),
|
|
479
|
+
getExternal: getExternalCustomers(client),
|
|
480
|
+
deleteExternal: deleteExternalCustomers(client),
|
|
481
|
+
updateExternal: updateExternalCustomers(client),
|
|
482
|
+
getState: getStateCustomers(client),
|
|
483
|
+
getStateExternal: getStateExternalCustomers(client),
|
|
484
|
+
listPaymentMethods: listPaymentMethodsCustomers(client),
|
|
485
|
+
listPaymentMethodsExternal: listPaymentMethodsExternalCustomers(client),
|
|
486
|
+
iterList: iterListCustomers(client),
|
|
487
|
+
iterListPaymentMethods: iterListPaymentMethodsCustomers(client),
|
|
488
|
+
iterListPaymentMethodsExternal: iterListPaymentMethodsExternalCustomers(client),
|
|
489
|
+
members: require_2027_01_services_customers_members.createMembersService(client)
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
//#endregion
|
|
493
|
+
exports.createCustomers = createCustomers;
|
|
494
|
+
exports.createCustomersService = createCustomersService;
|
|
495
|
+
exports.deleteCustomers = deleteCustomers;
|
|
496
|
+
exports.deleteExternalCustomers = deleteExternalCustomers;
|
|
497
|
+
exports.exportCustomers = exportCustomers;
|
|
498
|
+
exports.getCustomers = getCustomers;
|
|
499
|
+
exports.getExternalCustomers = getExternalCustomers;
|
|
500
|
+
exports.getStateCustomers = getStateCustomers;
|
|
501
|
+
exports.getStateExternalCustomers = getStateExternalCustomers;
|
|
502
|
+
exports.iterListCustomers = iterListCustomers;
|
|
503
|
+
exports.iterListPaymentMethodsCustomers = iterListPaymentMethodsCustomers;
|
|
504
|
+
exports.iterListPaymentMethodsExternalCustomers = iterListPaymentMethodsExternalCustomers;
|
|
505
|
+
exports.listCustomers = listCustomers;
|
|
506
|
+
exports.listPaymentMethodsCustomers = listPaymentMethodsCustomers;
|
|
507
|
+
exports.listPaymentMethodsExternalCustomers = listPaymentMethodsExternalCustomers;
|
|
508
|
+
exports.updateCustomers = updateCustomers;
|
|
509
|
+
exports.updateExternalCustomers = updateExternalCustomers;
|
|
510
|
+
|
|
511
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["HTTPValidationError","ResourceNotFound","createMembersService"],"sources":["../../../../src/2027-01/services/customers/index.ts"],"sourcesContent":["import type { ClientBase, RequestOptions } from \"../../../base\";\nimport type {\n Customer,\n CustomerCreate,\n CustomerSortProperty,\n CustomerState,\n CustomerUpdate,\n CustomerUpdateExternalID,\n ListResourceCustomer,\n ListResourcePaymentMethod,\n MetadataQuery,\n PaymentMethod,\n} from \"../../models\";\n\nimport { HTTPValidationError, ResourceNotFound } from \"../../errors\";\nimport { createMembersService } from \"./members\";\n\nexport const listCustomers = (client: ClientBase) => {\n /**\n * List customers.\n *\n * **Scopes**: `customers:read` `customers:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {ListResourceCustomer}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n query?: {\n organization_id?: string | string[] | null;\n email?: string | null;\n query?: string | null;\n active?: boolean | null;\n page?: number;\n limit?: number;\n sorting?: CustomerSortProperty[] | null;\n metadata?: MetadataQuery;\n },\n requestOptions?: RequestOptions,\n ): Promise<ListResourceCustomer> => {\n const pathParams = {};\n const queryParams = {\n organization_id: query?.organization_id,\n email: query?.email,\n query: query?.query,\n active: query?.active,\n page: query?.page ?? 1,\n limit: query?.limit ?? 10,\n sorting: query?.sorting ?? [\"-created_at\"],\n metadata: query?.metadata,\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customers/\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<ListResourceCustomer>(response, \"json\", {\n 422: HTTPValidationError,\n });\n };\n};\n/**\n * List customers.\n *\n * **Scopes**: `customers:read` `customers:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {AsyncGenerator<Customer>} A generator that yields items of type Customer.\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {HTTPValidationError} Validation Error\n */\nexport const iterListCustomers = (client: ClientBase) => {\n return async function* (\n query?: {\n organization_id?: string | string[] | null;\n email?: string | null;\n query?: string | null;\n active?: boolean | null;\n page?: number;\n limit?: number;\n sorting?: CustomerSortProperty[] | null;\n metadata?: MetadataQuery;\n },\n requestOptions?: RequestOptions,\n ): AsyncGenerator<Customer> {\n let page: number;\n page = query?.page ?? 1;\n let limit: number | undefined;\n limit = query?.limit;\n\n while (true) {\n const response = await listCustomers(client)({ ...query, page, limit }, requestOptions);\n for (const item of response.items) {\n yield item;\n }\n if (page >= response.pagination.max_page) {\n break;\n }\n page++;\n }\n };\n};\nexport const createCustomers = (client: ClientBase) => {\n /**\n * Create a customer.\n *\n * **Scopes**: `customers:write`\n *\n * @param body - Request body\n * @param requestOptions - Request options\n * @returns {Customer}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {HTTPValidationError} Validation Error\n */\n return async (body: CustomerCreate, requestOptions?: RequestOptions): Promise<Customer> => {\n const pathParams = {};\n const queryParams = {};\n const request = client.buildRequest(\"POST\", \"/v1/customers/\", pathParams, queryParams, body);\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<Customer>(response, \"json\", {\n 422: HTTPValidationError,\n });\n };\n};\nexport const exportCustomers = (client: ClientBase) => {\n /**\n * Export customers as a CSV file.\n *\n * **Scopes**: `customers:read` `customers:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {string}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n query?: {\n organization_id?: string | string[] | null;\n },\n requestOptions?: RequestOptions,\n ): Promise<string> => {\n const pathParams = {};\n const queryParams = {\n organization_id: query?.organization_id,\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customers/export\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<string>(response, \"text\", {\n 422: HTTPValidationError,\n });\n };\n};\nexport const getCustomers = (client: ClientBase) => {\n /**\n * Get a customer by ID.\n *\n * **Scopes**: `customers:read` `customers:write`\n *\n * @param id - The customer ID.\n * @param requestOptions - Request options\n * @returns {Customer}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {ResourceNotFound} Customer not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (id: string, requestOptions?: RequestOptions): Promise<Customer> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customers/{id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<Customer>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const deleteCustomers = (client: ClientBase) => {\n /**\n * Delete a customer.\n *\n * This action cannot be undone and will immediately:\n * - Cancel any active subscriptions for the customer\n * - Revoke all their benefits\n * - Clear any `external_id`\n *\n * Use it only in the context of deleting a user within your\n * own service. Otherwise, use more granular API endpoints to cancel\n * a specific subscription or revoke certain benefits.\n *\n * Note: The customers information will nonetheless be retained for historic\n * orders and subscriptions.\n *\n * Set `anonymize=true` to also anonymize PII for GDPR compliance.\n *\n * **Scopes**: `customers:write`\n *\n * @param id - The customer ID.\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {void}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {ResourceNotFound} Customer not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n id: string,\n query?: {\n anonymize?: boolean;\n },\n requestOptions?: RequestOptions,\n ): Promise<void> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {\n anonymize: query?.anonymize,\n };\n const request = client.buildRequest(\n \"DELETE\",\n \"/v1/customers/{id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<void>(response, \"none\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const updateCustomers = (client: ClientBase) => {\n /**\n * Update a customer.\n *\n * **Scopes**: `customers:write`\n *\n * @param id - The customer ID.\n * @param body - Request body\n * @param requestOptions - Request options\n * @returns {Customer}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {ResourceNotFound} Customer not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n id: string,\n body: CustomerUpdate,\n requestOptions?: RequestOptions,\n ): Promise<Customer> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"PATCH\",\n \"/v1/customers/{id}\",\n pathParams,\n queryParams,\n body,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<Customer>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const getExternalCustomers = (client: ClientBase) => {\n /**\n * Get a customer by external ID.\n *\n * **Scopes**: `customers:read` `customers:write`\n *\n * @param external_id - The customer external ID.\n * @param requestOptions - Request options\n * @returns {Customer}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {ResourceNotFound} Customer not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (external_id: string, requestOptions?: RequestOptions): Promise<Customer> => {\n const pathParams = {\n external_id: external_id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customers/external/{external_id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<Customer>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const deleteExternalCustomers = (client: ClientBase) => {\n /**\n * Delete a customer by external ID.\n *\n * Immediately cancels any active subscriptions and revokes any active benefits.\n *\n * Set `anonymize=true` to also anonymize PII for GDPR compliance.\n *\n * **Scopes**: `customers:write`\n *\n * @param external_id - The customer external ID.\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {void}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {ResourceNotFound} Customer not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n external_id: string,\n query?: {\n anonymize?: boolean;\n },\n requestOptions?: RequestOptions,\n ): Promise<void> => {\n const pathParams = {\n external_id: external_id,\n };\n const queryParams = {\n anonymize: query?.anonymize,\n };\n const request = client.buildRequest(\n \"DELETE\",\n \"/v1/customers/external/{external_id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<void>(response, \"none\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const updateExternalCustomers = (client: ClientBase) => {\n /**\n * Update a customer by external ID.\n *\n * **Scopes**: `customers:write`\n *\n * @param external_id - The customer external ID.\n * @param body - Request body\n * @param requestOptions - Request options\n * @returns {Customer}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {ResourceNotFound} Customer not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n external_id: string,\n body: CustomerUpdateExternalID,\n requestOptions?: RequestOptions,\n ): Promise<Customer> => {\n const pathParams = {\n external_id: external_id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"PATCH\",\n \"/v1/customers/external/{external_id}\",\n pathParams,\n queryParams,\n body,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<Customer>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const getStateCustomers = (client: ClientBase) => {\n /**\n * Get a customer state by ID.\n *\n * The customer state includes information about\n * the customer's active subscriptions and benefits.\n *\n * It's the ideal endpoint to use when you need to get a full overview\n * of a customer's status.\n *\n * **Scopes**: `customers:read` `customers:write`\n *\n * @param id - The customer ID.\n * @param requestOptions - Request options\n * @returns {CustomerState}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {ResourceNotFound} Customer not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (id: string, requestOptions?: RequestOptions): Promise<CustomerState> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customers/{id}/state\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerState>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const getStateExternalCustomers = (client: ClientBase) => {\n /**\n * Get a customer state by external ID.\n *\n * The customer state includes information about\n * the customer's active subscriptions and benefits.\n *\n * It's the ideal endpoint to use when you need to get a full overview\n * of a customer's status.\n *\n * **Scopes**: `customers:read` `customers:write`\n *\n * @param external_id - The customer external ID.\n * @param requestOptions - Request options\n * @returns {CustomerState}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {ResourceNotFound} Customer not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (external_id: string, requestOptions?: RequestOptions): Promise<CustomerState> => {\n const pathParams = {\n external_id: external_id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customers/external/{external_id}/state\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerState>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const listPaymentMethodsCustomers = (client: ClientBase) => {\n /**\n * Get saved payment methods of a customer.\n *\n * **Scopes**: `customers:read` `customers:write`\n *\n * @param id - The customer ID.\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {ListResourcePaymentMethod}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {ResourceNotFound} Customer not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n id: string,\n query?: {\n page?: number;\n limit?: number;\n },\n requestOptions?: RequestOptions,\n ): Promise<ListResourcePaymentMethod> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {\n page: query?.page ?? 1,\n limit: query?.limit ?? 10,\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customers/{id}/payment-methods\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<ListResourcePaymentMethod>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\n/**\n * Get saved payment methods of a customer.\n *\n * **Scopes**: `customers:read` `customers:write`\n *\n * @param id - The customer ID.\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {AsyncGenerator<PaymentMethod>} A generator that yields items of type PaymentMethod.\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {ResourceNotFound} Customer not found.\n * @throws {HTTPValidationError} Validation Error\n */\nexport const iterListPaymentMethodsCustomers = (client: ClientBase) => {\n return async function* (\n id: string,\n query?: {\n page?: number;\n limit?: number;\n },\n requestOptions?: RequestOptions,\n ): AsyncGenerator<PaymentMethod> {\n let page: number;\n page = query?.page ?? 1;\n let limit: number | undefined;\n limit = query?.limit;\n\n while (true) {\n const response = await listPaymentMethodsCustomers(client)(\n id,\n { ...query, page, limit },\n requestOptions,\n );\n for (const item of response.items) {\n yield item;\n }\n if (page >= response.pagination.max_page) {\n break;\n }\n page++;\n }\n };\n};\nexport const listPaymentMethodsExternalCustomers = (client: ClientBase) => {\n /**\n * Get saved payment methods of a customer by external ID.\n *\n * **Scopes**: `customers:read` `customers:write`\n *\n * @param external_id - The customer external ID.\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {ListResourcePaymentMethod}\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {ResourceNotFound} Customer not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n external_id: string,\n query?: {\n page?: number;\n limit?: number;\n },\n requestOptions?: RequestOptions,\n ): Promise<ListResourcePaymentMethod> => {\n const pathParams = {\n external_id: external_id,\n };\n const queryParams = {\n page: query?.page ?? 1,\n limit: query?.limit ?? 10,\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customers/external/{external_id}/payment-methods\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<ListResourcePaymentMethod>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\n/**\n * Get saved payment methods of a customer by external ID.\n *\n * **Scopes**: `customers:read` `customers:write`\n *\n * @param external_id - The customer external ID.\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {AsyncGenerator<PaymentMethod>} A generator that yields items of type PaymentMethod.\n * @throws {PolarNetworkError} When a network error occurs\n * @throws {PolarRateLimitError} When the rate limit is exceeded\n * @throws {PolarServerError} When the server returns a 5xx error\n * @throws {ResourceNotFound} Customer not found.\n * @throws {HTTPValidationError} Validation Error\n */\nexport const iterListPaymentMethodsExternalCustomers = (client: ClientBase) => {\n return async function* (\n external_id: string,\n query?: {\n page?: number;\n limit?: number;\n },\n requestOptions?: RequestOptions,\n ): AsyncGenerator<PaymentMethod> {\n let page: number;\n page = query?.page ?? 1;\n let limit: number | undefined;\n limit = query?.limit;\n\n while (true) {\n const response = await listPaymentMethodsExternalCustomers(client)(\n external_id,\n { ...query, page, limit },\n requestOptions,\n );\n for (const item of response.items) {\n yield item;\n }\n if (page >= response.pagination.max_page) {\n break;\n }\n page++;\n }\n };\n};\n\nexport function createCustomersService(client: ClientBase) {\n return {\n list: listCustomers(client),\n create: createCustomers(client),\n export: exportCustomers(client),\n get: getCustomers(client),\n delete: deleteCustomers(client),\n update: updateCustomers(client),\n getExternal: getExternalCustomers(client),\n deleteExternal: deleteExternalCustomers(client),\n updateExternal: updateExternalCustomers(client),\n getState: getStateCustomers(client),\n getStateExternal: getStateExternalCustomers(client),\n listPaymentMethods: listPaymentMethodsCustomers(client),\n listPaymentMethodsExternal: listPaymentMethodsExternalCustomers(client),\n iterList: iterListCustomers(client),\n iterListPaymentMethods: iterListPaymentMethodsCustomers(client),\n iterListPaymentMethodsExternal: iterListPaymentMethodsExternalCustomers(client),\n members: createMembersService(client),\n };\n}\n\nexport type Customers = ReturnType<typeof createCustomersService>;\n"],"mappings":"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"}
|