@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,155 @@
|
|
|
1
|
+
import { Ct as PaymentFailed, H as CustomerPortalSubscriptionsUpdate409Error, Ot as ResourceNotFound, V as CustomerPortalSubscriptionsUpdate403Error, dt as HTTPValidationError, t as AlreadyCanceledSubscription } from "../../../errors-B1xadCgl.mjs";
|
|
2
|
+
//#region src/2027-01/services/customer_portal/subscriptions.ts
|
|
3
|
+
const listSubscriptions = (client) => {
|
|
4
|
+
/**
|
|
5
|
+
* List subscriptions of the authenticated customer.
|
|
6
|
+
*
|
|
7
|
+
* **Scopes**: `customer_portal:read` `customer_portal:write`
|
|
8
|
+
*
|
|
9
|
+
* @param query - Query parameters
|
|
10
|
+
* @param requestOptions - Request options
|
|
11
|
+
* @returns {ListResourceCustomerSubscription}
|
|
12
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
13
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
14
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
15
|
+
* @throws {HTTPValidationError} Validation Error
|
|
16
|
+
*/
|
|
17
|
+
return async (query, requestOptions) => {
|
|
18
|
+
const pathParams = {};
|
|
19
|
+
const queryParams = {
|
|
20
|
+
product_id: query?.product_id,
|
|
21
|
+
active: query?.active,
|
|
22
|
+
query: query?.query,
|
|
23
|
+
page: query?.page ?? 1,
|
|
24
|
+
limit: query?.limit ?? 10,
|
|
25
|
+
sorting: query?.sorting ?? ["-started_at"]
|
|
26
|
+
};
|
|
27
|
+
const request = client.buildRequest("GET", "/v1/customer-portal/subscriptions/", pathParams, queryParams, void 0);
|
|
28
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
29
|
+
return client.parseResponse(response, "json", { 422: HTTPValidationError });
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* List subscriptions of the authenticated customer.
|
|
34
|
+
*
|
|
35
|
+
* **Scopes**: `customer_portal:read` `customer_portal:write`
|
|
36
|
+
*
|
|
37
|
+
* @param query - Query parameters
|
|
38
|
+
* @param requestOptions - Request options
|
|
39
|
+
* @returns {AsyncGenerator<CustomerSubscription>} A generator that yields items of type CustomerSubscription.
|
|
40
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
41
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
42
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
43
|
+
* @throws {HTTPValidationError} Validation Error
|
|
44
|
+
*/
|
|
45
|
+
const iterListSubscriptions = (client) => {
|
|
46
|
+
return async function* (query, requestOptions) {
|
|
47
|
+
let page;
|
|
48
|
+
page = query?.page ?? 1;
|
|
49
|
+
let limit;
|
|
50
|
+
limit = query?.limit;
|
|
51
|
+
while (true) {
|
|
52
|
+
const response = await listSubscriptions(client)({
|
|
53
|
+
...query,
|
|
54
|
+
page,
|
|
55
|
+
limit
|
|
56
|
+
}, requestOptions);
|
|
57
|
+
for (const item of response.items) yield item;
|
|
58
|
+
if (page >= response.pagination.max_page) break;
|
|
59
|
+
page++;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
const getSubscriptions = (client) => {
|
|
64
|
+
/**
|
|
65
|
+
* Get a subscription for the authenticated customer.
|
|
66
|
+
*
|
|
67
|
+
* **Scopes**: `customer_portal:read` `customer_portal:write`
|
|
68
|
+
*
|
|
69
|
+
* @param id - The subscription ID.
|
|
70
|
+
* @param requestOptions - Request options
|
|
71
|
+
* @returns {CustomerSubscription}
|
|
72
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
73
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
74
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
75
|
+
* @throws {ResourceNotFound} Customer subscription was not found.
|
|
76
|
+
* @throws {HTTPValidationError} Validation Error
|
|
77
|
+
*/
|
|
78
|
+
return async (id, requestOptions) => {
|
|
79
|
+
const pathParams = { id };
|
|
80
|
+
const request = client.buildRequest("GET", "/v1/customer-portal/subscriptions/{id}", pathParams, {}, void 0);
|
|
81
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
82
|
+
return client.parseResponse(response, "json", {
|
|
83
|
+
404: ResourceNotFound,
|
|
84
|
+
422: HTTPValidationError
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
const cancelSubscriptions = (client) => {
|
|
89
|
+
/**
|
|
90
|
+
* Cancel a subscription of the authenticated customer.
|
|
91
|
+
*
|
|
92
|
+
* @param id - The subscription ID.
|
|
93
|
+
* @param requestOptions - Request options
|
|
94
|
+
* @returns {CustomerSubscription}
|
|
95
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
96
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
97
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
98
|
+
* @throws {AlreadyCanceledSubscription} Customer subscription is already canceled or will be at the end of the period, or the user lacks billing permissions.
|
|
99
|
+
* @throws {ResourceNotFound} Customer subscription was not found.
|
|
100
|
+
* @throws {HTTPValidationError} Validation Error
|
|
101
|
+
*/
|
|
102
|
+
return async (id, requestOptions) => {
|
|
103
|
+
const pathParams = { id };
|
|
104
|
+
const request = client.buildRequest("DELETE", "/v1/customer-portal/subscriptions/{id}", pathParams, {}, void 0);
|
|
105
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
106
|
+
return client.parseResponse(response, "json", {
|
|
107
|
+
403: AlreadyCanceledSubscription,
|
|
108
|
+
404: ResourceNotFound,
|
|
109
|
+
422: HTTPValidationError
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
const updateSubscriptions = (client) => {
|
|
114
|
+
/**
|
|
115
|
+
* Update a subscription of the authenticated customer.
|
|
116
|
+
*
|
|
117
|
+
* @param id - The subscription ID.
|
|
118
|
+
* @param body - Request body
|
|
119
|
+
* @param requestOptions - Request options
|
|
120
|
+
* @returns {CustomerSubscription}
|
|
121
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
122
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
123
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
124
|
+
* @throws {PaymentFailed} Payment required to apply the subscription update.
|
|
125
|
+
* @throws {CustomerPortalSubscriptionsUpdate403Error} Customer subscription is already canceled or will be at the end of the period, the user lacks billing permissions, or pausing/resuming is not enabled for the organization.
|
|
126
|
+
* @throws {ResourceNotFound} Customer subscription was not found.
|
|
127
|
+
* @throws {CustomerPortalSubscriptionsUpdate409Error} The subscription has no payment method to charge, or is not scheduled to be canceled.
|
|
128
|
+
* @throws {HTTPValidationError} Validation Error
|
|
129
|
+
*/
|
|
130
|
+
return async (id, body, requestOptions) => {
|
|
131
|
+
const pathParams = { id };
|
|
132
|
+
const request = client.buildRequest("PATCH", "/v1/customer-portal/subscriptions/{id}", pathParams, {}, body);
|
|
133
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
134
|
+
return client.parseResponse(response, "json", {
|
|
135
|
+
402: PaymentFailed,
|
|
136
|
+
403: CustomerPortalSubscriptionsUpdate403Error,
|
|
137
|
+
404: ResourceNotFound,
|
|
138
|
+
409: CustomerPortalSubscriptionsUpdate409Error,
|
|
139
|
+
422: HTTPValidationError
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
function createSubscriptionsService(client) {
|
|
144
|
+
return {
|
|
145
|
+
list: listSubscriptions(client),
|
|
146
|
+
get: getSubscriptions(client),
|
|
147
|
+
cancel: cancelSubscriptions(client),
|
|
148
|
+
update: updateSubscriptions(client),
|
|
149
|
+
iterList: iterListSubscriptions(client)
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
export { cancelSubscriptions, createSubscriptionsService, getSubscriptions, iterListSubscriptions, listSubscriptions, updateSubscriptions };
|
|
154
|
+
|
|
155
|
+
//# sourceMappingURL=subscriptions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriptions.mjs","names":[],"sources":["../../../../src/2027-01/services/customer_portal/subscriptions.ts"],"sourcesContent":["import type { ClientBase, RequestOptions } from \"../../../base\";\nimport type {\n CustomerSubscription,\n CustomerSubscriptionSortProperty,\n CustomerSubscriptionUpdate,\n ListResourceCustomerSubscription,\n} from \"../../models\";\n\nimport {\n AlreadyCanceledSubscription,\n CustomerPortalSubscriptionsUpdate403Error,\n CustomerPortalSubscriptionsUpdate409Error,\n HTTPValidationError,\n PaymentFailed,\n ResourceNotFound,\n} from \"../../errors\";\n\nexport const listSubscriptions = (client: ClientBase) => {\n /**\n * List subscriptions of the authenticated customer.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {ListResourceCustomerSubscription}\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 product_id?: string | string[] | null;\n active?: boolean | null;\n query?: string | null;\n page?: number;\n limit?: number;\n sorting?: CustomerSubscriptionSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): Promise<ListResourceCustomerSubscription> => {\n const pathParams = {};\n const queryParams = {\n product_id: query?.product_id,\n active: query?.active,\n query: query?.query,\n page: query?.page ?? 1,\n limit: query?.limit ?? 10,\n sorting: query?.sorting ?? [\"-started_at\"],\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/subscriptions/\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<ListResourceCustomerSubscription>(response, \"json\", {\n 422: HTTPValidationError,\n });\n };\n};\n/**\n * List subscriptions of the authenticated customer.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {AsyncGenerator<CustomerSubscription>} A generator that yields items of type CustomerSubscription.\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 iterListSubscriptions = (client: ClientBase) => {\n return async function* (\n query?: {\n product_id?: string | string[] | null;\n active?: boolean | null;\n query?: string | null;\n page?: number;\n limit?: number;\n sorting?: CustomerSubscriptionSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): AsyncGenerator<CustomerSubscription> {\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 listSubscriptions(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 getSubscriptions = (client: ClientBase) => {\n /**\n * Get a subscription for the authenticated customer.\n *\n * **Scopes**: `customer_portal:read` `customer_portal:write`\n *\n * @param id - The subscription ID.\n * @param requestOptions - Request options\n * @returns {CustomerSubscription}\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 subscription was not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (id: string, requestOptions?: RequestOptions): Promise<CustomerSubscription> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/subscriptions/{id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSubscription>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const cancelSubscriptions = (client: ClientBase) => {\n /**\n * Cancel a subscription of the authenticated customer.\n *\n * @param id - The subscription ID.\n * @param requestOptions - Request options\n * @returns {CustomerSubscription}\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 {AlreadyCanceledSubscription} Customer subscription is already canceled or will be at the end of the period, or the user lacks billing permissions.\n * @throws {ResourceNotFound} Customer subscription was not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (id: string, requestOptions?: RequestOptions): Promise<CustomerSubscription> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"DELETE\",\n \"/v1/customer-portal/subscriptions/{id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSubscription>(response, \"json\", {\n 403: AlreadyCanceledSubscription,\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const updateSubscriptions = (client: ClientBase) => {\n /**\n * Update a subscription of the authenticated customer.\n *\n * @param id - The subscription ID.\n * @param body - Request body\n * @param requestOptions - Request options\n * @returns {CustomerSubscription}\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 {PaymentFailed} Payment required to apply the subscription update.\n * @throws {CustomerPortalSubscriptionsUpdate403Error} Customer subscription is already canceled or will be at the end of the period, the user lacks billing permissions, or pausing/resuming is not enabled for the organization.\n * @throws {ResourceNotFound} Customer subscription was not found.\n * @throws {CustomerPortalSubscriptionsUpdate409Error} The subscription has no payment method to charge, or is not scheduled to be canceled.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n id: string,\n body: CustomerSubscriptionUpdate,\n requestOptions?: RequestOptions,\n ): Promise<CustomerSubscription> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"PATCH\",\n \"/v1/customer-portal/subscriptions/{id}\",\n pathParams,\n queryParams,\n body,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerSubscription>(response, \"json\", {\n 402: PaymentFailed,\n 403: CustomerPortalSubscriptionsUpdate403Error,\n 404: ResourceNotFound,\n 409: CustomerPortalSubscriptionsUpdate409Error,\n 422: HTTPValidationError,\n });\n };\n};\n\nexport function createSubscriptionsService(client: ClientBase) {\n return {\n list: listSubscriptions(client),\n get: getSubscriptions(client),\n cancel: cancelSubscriptions(client),\n update: updateSubscriptions(client),\n iterList: iterListSubscriptions(client),\n };\n}\n\nexport type Subscriptions = ReturnType<typeof createSubscriptionsService>;\n"],"mappings":";;AAiBA,MAAa,qBAAqB,WAAuB;;;;;;;;;;;;;;CAcvD,OAAO,OACL,OAQA,mBAC8C;EAC9C,MAAM,aAAa,CAAC;EACpB,MAAM,cAAc;GAClB,YAAY,OAAO;GACnB,QAAQ,OAAO;GACf,OAAO,OAAO;GACd,MAAM,OAAO,QAAQ;GACrB,OAAO,OAAO,SAAS;GACvB,SAAS,OAAO,WAAW,CAAC,aAAa;EAC3C;EACA,MAAM,UAAU,OAAO,aACrB,OACA,sCACA,YACA,aACA,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAgD,UAAU,QAAQ,EAC9E,KAAK,oBACP,CAAC;CACH;AACF;;;;;;;;;;;;;;AAcA,MAAa,yBAAyB,WAAuB;CAC3D,OAAO,iBACL,OAQA,gBACsC;EACtC,IAAI;EACJ,OAAO,OAAO,QAAQ;EACtB,IAAI;EACJ,QAAQ,OAAO;EAEf,OAAO,MAAM;GACX,MAAM,WAAW,MAAM,kBAAkB,MAAM,CAAC,CAAC;IAAE,GAAG;IAAO;IAAM;GAAM,GAAG,cAAc;GAC1F,KAAK,MAAM,QAAQ,SAAS,OAC1B,MAAM;GAER,IAAI,QAAQ,SAAS,WAAW,UAC9B;GAEF;EACF;CACF;AACF;AACA,MAAa,oBAAoB,WAAuB;;;;;;;;;;;;;;;CAetD,OAAO,OAAO,IAAY,mBAAmE;EAC3F,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,OACA,0CACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAoC,UAAU,QAAQ;GAClE,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AACA,MAAa,uBAAuB,WAAuB;;;;;;;;;;;;;;CAczD,OAAO,OAAO,IAAY,mBAAmE;EAC3F,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,UACA,0CACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAoC,UAAU,QAAQ;GAClE,KAAK;GACL,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AACA,MAAa,uBAAuB,WAAuB;;;;;;;;;;;;;;;;;CAiBzD,OAAO,OACL,IACA,MACA,mBACkC;EAClC,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,SACA,0CACA,YACA,CAAU,GACV,IACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAoC,UAAU,QAAQ;GAClE,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AAEA,SAAgB,2BAA2B,QAAoB;CAC7D,OAAO;EACL,MAAM,kBAAkB,MAAM;EAC9B,KAAK,iBAAiB,MAAM;EAC5B,QAAQ,oBAAoB,MAAM;EAClC,QAAQ,oBAAoB,MAAM;EAClC,UAAU,sBAAsB,MAAM;CACxC;AACF"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_errors = require("../../../errors-DDydmY6t.cjs");
|
|
3
|
+
//#region src/2027-01/services/customer_portal/wallets.ts
|
|
4
|
+
const listWallets = (client) => {
|
|
5
|
+
/**
|
|
6
|
+
* List wallets of the authenticated customer.
|
|
7
|
+
*
|
|
8
|
+
* @param query - Query parameters
|
|
9
|
+
* @param requestOptions - Request options
|
|
10
|
+
* @returns {ListResourceCustomerWallet}
|
|
11
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
12
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
13
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
14
|
+
* @throws {HTTPValidationError} Validation Error
|
|
15
|
+
*/
|
|
16
|
+
return async (query, requestOptions) => {
|
|
17
|
+
const pathParams = {};
|
|
18
|
+
const queryParams = {
|
|
19
|
+
page: query?.page ?? 1,
|
|
20
|
+
limit: query?.limit ?? 10,
|
|
21
|
+
sorting: query?.sorting ?? ["-created_at"]
|
|
22
|
+
};
|
|
23
|
+
const request = client.buildRequest("GET", "/v1/customer-portal/wallets/", pathParams, queryParams, void 0);
|
|
24
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
25
|
+
return client.parseResponse(response, "json", { 422: require_errors.HTTPValidationError });
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* List wallets of the authenticated customer.
|
|
30
|
+
*
|
|
31
|
+
* @param query - Query parameters
|
|
32
|
+
* @param requestOptions - Request options
|
|
33
|
+
* @returns {AsyncGenerator<CustomerWallet>} A generator that yields items of type CustomerWallet.
|
|
34
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
35
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
36
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
37
|
+
* @throws {HTTPValidationError} Validation Error
|
|
38
|
+
*/
|
|
39
|
+
const iterListWallets = (client) => {
|
|
40
|
+
return async function* (query, requestOptions) {
|
|
41
|
+
let page;
|
|
42
|
+
page = query?.page ?? 1;
|
|
43
|
+
let limit;
|
|
44
|
+
limit = query?.limit;
|
|
45
|
+
while (true) {
|
|
46
|
+
const response = await listWallets(client)({
|
|
47
|
+
...query,
|
|
48
|
+
page,
|
|
49
|
+
limit
|
|
50
|
+
}, requestOptions);
|
|
51
|
+
for (const item of response.items) yield item;
|
|
52
|
+
if (page >= response.pagination.max_page) break;
|
|
53
|
+
page++;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
const getWallets = (client) => {
|
|
58
|
+
/**
|
|
59
|
+
* Get a wallet by ID for the authenticated customer.
|
|
60
|
+
*
|
|
61
|
+
* @param id - The wallet ID.
|
|
62
|
+
* @param requestOptions - Request options
|
|
63
|
+
* @returns {CustomerWallet}
|
|
64
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
65
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
66
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
67
|
+
* @throws {ResourceNotFound} Wallet not found.
|
|
68
|
+
* @throws {HTTPValidationError} Validation Error
|
|
69
|
+
*/
|
|
70
|
+
return async (id, requestOptions) => {
|
|
71
|
+
const pathParams = { id };
|
|
72
|
+
const request = client.buildRequest("GET", "/v1/customer-portal/wallets/{id}", pathParams, {}, void 0);
|
|
73
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
74
|
+
return client.parseResponse(response, "json", {
|
|
75
|
+
404: require_errors.ResourceNotFound,
|
|
76
|
+
422: require_errors.HTTPValidationError
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
function createWalletsService(client) {
|
|
81
|
+
return {
|
|
82
|
+
list: listWallets(client),
|
|
83
|
+
get: getWallets(client),
|
|
84
|
+
iterList: iterListWallets(client)
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
exports.createWalletsService = createWalletsService;
|
|
89
|
+
exports.getWallets = getWallets;
|
|
90
|
+
exports.iterListWallets = iterListWallets;
|
|
91
|
+
exports.listWallets = listWallets;
|
|
92
|
+
|
|
93
|
+
//# sourceMappingURL=wallets.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallets.cjs","names":["HTTPValidationError","ResourceNotFound"],"sources":["../../../../src/2027-01/services/customer_portal/wallets.ts"],"sourcesContent":["import type { ClientBase, RequestOptions } from \"../../../base\";\nimport type {\n CustomerWallet,\n CustomerWalletSortProperty,\n ListResourceCustomerWallet,\n} from \"../../models\";\n\nimport { HTTPValidationError, ResourceNotFound } from \"../../errors\";\n\nexport const listWallets = (client: ClientBase) => {\n /**\n * List wallets of the authenticated customer.\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {ListResourceCustomerWallet}\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 page?: number;\n limit?: number;\n sorting?: CustomerWalletSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): Promise<ListResourceCustomerWallet> => {\n const pathParams = {};\n const queryParams = {\n page: query?.page ?? 1,\n limit: query?.limit ?? 10,\n sorting: query?.sorting ?? [\"-created_at\"],\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/wallets/\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<ListResourceCustomerWallet>(response, \"json\", {\n 422: HTTPValidationError,\n });\n };\n};\n/**\n * List wallets of the authenticated customer.\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {AsyncGenerator<CustomerWallet>} A generator that yields items of type CustomerWallet.\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 iterListWallets = (client: ClientBase) => {\n return async function* (\n query?: {\n page?: number;\n limit?: number;\n sorting?: CustomerWalletSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): AsyncGenerator<CustomerWallet> {\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 listWallets(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 getWallets = (client: ClientBase) => {\n /**\n * Get a wallet by ID for the authenticated customer.\n *\n * @param id - The wallet ID.\n * @param requestOptions - Request options\n * @returns {CustomerWallet}\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} Wallet not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (id: string, requestOptions?: RequestOptions): Promise<CustomerWallet> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/wallets/{id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerWallet>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\n\nexport function createWalletsService(client: ClientBase) {\n return {\n list: listWallets(client),\n get: getWallets(client),\n iterList: iterListWallets(client),\n };\n}\n\nexport type Wallets = ReturnType<typeof createWalletsService>;\n"],"mappings":";;;AASA,MAAa,eAAe,WAAuB;;;;;;;;;;;;CAYjD,OAAO,OACL,OAKA,mBACwC;EACxC,MAAM,aAAa,CAAC;EACpB,MAAM,cAAc;GAClB,MAAM,OAAO,QAAQ;GACrB,OAAO,OAAO,SAAS;GACvB,SAAS,OAAO,WAAW,CAAC,aAAa;EAC3C;EACA,MAAM,UAAU,OAAO,aACrB,OACA,gCACA,YACA,aACA,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA0C,UAAU,QAAQ,EACxE,KAAKA,eAAAA,oBACP,CAAC;CACH;AACF;;;;;;;;;;;;AAYA,MAAa,mBAAmB,WAAuB;CACrD,OAAO,iBACL,OAKA,gBACgC;EAChC,IAAI;EACJ,OAAO,OAAO,QAAQ;EACtB,IAAI;EACJ,QAAQ,OAAO;EAEf,OAAO,MAAM;GACX,MAAM,WAAW,MAAM,YAAY,MAAM,CAAC,CAAC;IAAE,GAAG;IAAO;IAAM;GAAM,GAAG,cAAc;GACpF,KAAK,MAAM,QAAQ,SAAS,OAC1B,MAAM;GAER,IAAI,QAAQ,SAAS,WAAW,UAC9B;GAEF;EACF;CACF;AACF;AACA,MAAa,cAAc,WAAuB;;;;;;;;;;;;;CAahD,OAAO,OAAO,IAAY,mBAA6D;EACrF,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,OACA,oCACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA8B,UAAU,QAAQ;GAC5D,KAAKC,eAAAA;GACL,KAAKD,eAAAA;EACP,CAAC;CACH;AACF;AAEA,SAAgB,qBAAqB,QAAoB;CACvD,OAAO;EACL,MAAM,YAAY,MAAM;EACxB,KAAK,WAAW,MAAM;EACtB,UAAU,gBAAgB,MAAM;CAClC;AACF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { c as RequestOptions, t as ClientBase } from "../../../base-C5EE71lz.cjs";
|
|
2
|
+
import { It as CustomerWallet, Ln as ListResourceCustomerWallet, Lt as CustomerWalletSortProperty } from "../../../models-COhG3nD4.cjs";
|
|
3
|
+
//#region src/2027-01/services/customer_portal/wallets.d.ts
|
|
4
|
+
declare const listWallets: (client: ClientBase) => (query?: {
|
|
5
|
+
page?: number;
|
|
6
|
+
limit?: number;
|
|
7
|
+
sorting?: CustomerWalletSortProperty[] | null;
|
|
8
|
+
}, requestOptions?: RequestOptions) => Promise<ListResourceCustomerWallet>;
|
|
9
|
+
/**
|
|
10
|
+
* List wallets of the authenticated customer.
|
|
11
|
+
*
|
|
12
|
+
* @param query - Query parameters
|
|
13
|
+
* @param requestOptions - Request options
|
|
14
|
+
* @returns {AsyncGenerator<CustomerWallet>} A generator that yields items of type CustomerWallet.
|
|
15
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
16
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
17
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
18
|
+
* @throws {HTTPValidationError} Validation Error
|
|
19
|
+
*/
|
|
20
|
+
declare const iterListWallets: (client: ClientBase) => (query?: {
|
|
21
|
+
page?: number;
|
|
22
|
+
limit?: number;
|
|
23
|
+
sorting?: CustomerWalletSortProperty[] | null;
|
|
24
|
+
}, requestOptions?: RequestOptions) => AsyncGenerator<CustomerWallet>;
|
|
25
|
+
declare const getWallets: (client: ClientBase) => (id: string, requestOptions?: RequestOptions) => Promise<CustomerWallet>;
|
|
26
|
+
declare function createWalletsService(client: ClientBase): {
|
|
27
|
+
list: (query?: {
|
|
28
|
+
page?: number;
|
|
29
|
+
limit?: number;
|
|
30
|
+
sorting?: CustomerWalletSortProperty[] | null;
|
|
31
|
+
}, requestOptions?: RequestOptions) => Promise<ListResourceCustomerWallet>;
|
|
32
|
+
get: (id: string, requestOptions?: RequestOptions) => Promise<CustomerWallet>;
|
|
33
|
+
iterList: (query?: {
|
|
34
|
+
page?: number;
|
|
35
|
+
limit?: number;
|
|
36
|
+
sorting?: CustomerWalletSortProperty[] | null;
|
|
37
|
+
}, requestOptions?: RequestOptions) => AsyncGenerator<CustomerWallet>;
|
|
38
|
+
};
|
|
39
|
+
type Wallets = ReturnType<typeof createWalletsService>;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { Wallets, createWalletsService, getWallets, iterListWallets, listWallets };
|
|
42
|
+
//# sourceMappingURL=wallets.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallets.d.cts","names":[],"sources":["../../../../src/2027-01/services/customer_portal/wallets.ts"],"mappings":";;;cASa,cAAe,QAAQ,gBAahC;EACE;EACA;EACA,UAAU;GAEZ,iBAAiB,mBAChB,QAAQ;;;;;;;;;;;;cA+BA,kBAAmB,QAAQ,gBAEpC;EACE;EACA;EACA,UAAU;GAEZ,iBAAiB,mBAChB,eAAe;cAkBP,aAAc,QAAQ,gBAanB,YAAY,iBAAiB,mBAAiB,QAAQ;iBAoBtD,qBAAqB,QAAQ;EAhGjC,OAAA;IACN;IACA;IACA,UAAU;KACX,iBACgB,mBAChB,QAAQ;EAsEO,MAAA,YAAM,iBAAmB,mBAAiB,QAAQ;EArC1D,WAAA;IACN;IACA;IACA,UAAU;KACX,iBACgB,mBAChB,eAAe;;KA2DR,UAAU,kBAAkB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { c as RequestOptions, t as ClientBase } from "../../../base-C5EE71lz.mjs";
|
|
2
|
+
import { It as CustomerWallet, Ln as ListResourceCustomerWallet, Lt as CustomerWalletSortProperty } from "../../../models-COhG3nD4.mjs";
|
|
3
|
+
//#region src/2027-01/services/customer_portal/wallets.d.ts
|
|
4
|
+
declare const listWallets: (client: ClientBase) => (query?: {
|
|
5
|
+
page?: number;
|
|
6
|
+
limit?: number;
|
|
7
|
+
sorting?: CustomerWalletSortProperty[] | null;
|
|
8
|
+
}, requestOptions?: RequestOptions) => Promise<ListResourceCustomerWallet>;
|
|
9
|
+
/**
|
|
10
|
+
* List wallets of the authenticated customer.
|
|
11
|
+
*
|
|
12
|
+
* @param query - Query parameters
|
|
13
|
+
* @param requestOptions - Request options
|
|
14
|
+
* @returns {AsyncGenerator<CustomerWallet>} A generator that yields items of type CustomerWallet.
|
|
15
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
16
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
17
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
18
|
+
* @throws {HTTPValidationError} Validation Error
|
|
19
|
+
*/
|
|
20
|
+
declare const iterListWallets: (client: ClientBase) => (query?: {
|
|
21
|
+
page?: number;
|
|
22
|
+
limit?: number;
|
|
23
|
+
sorting?: CustomerWalletSortProperty[] | null;
|
|
24
|
+
}, requestOptions?: RequestOptions) => AsyncGenerator<CustomerWallet>;
|
|
25
|
+
declare const getWallets: (client: ClientBase) => (id: string, requestOptions?: RequestOptions) => Promise<CustomerWallet>;
|
|
26
|
+
declare function createWalletsService(client: ClientBase): {
|
|
27
|
+
list: (query?: {
|
|
28
|
+
page?: number;
|
|
29
|
+
limit?: number;
|
|
30
|
+
sorting?: CustomerWalletSortProperty[] | null;
|
|
31
|
+
}, requestOptions?: RequestOptions) => Promise<ListResourceCustomerWallet>;
|
|
32
|
+
get: (id: string, requestOptions?: RequestOptions) => Promise<CustomerWallet>;
|
|
33
|
+
iterList: (query?: {
|
|
34
|
+
page?: number;
|
|
35
|
+
limit?: number;
|
|
36
|
+
sorting?: CustomerWalletSortProperty[] | null;
|
|
37
|
+
}, requestOptions?: RequestOptions) => AsyncGenerator<CustomerWallet>;
|
|
38
|
+
};
|
|
39
|
+
type Wallets = ReturnType<typeof createWalletsService>;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { Wallets, createWalletsService, getWallets, iterListWallets, listWallets };
|
|
42
|
+
//# sourceMappingURL=wallets.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallets.d.mts","names":[],"sources":["../../../../src/2027-01/services/customer_portal/wallets.ts"],"mappings":";;;cASa,cAAe,QAAQ,gBAahC;EACE;EACA;EACA,UAAU;GAEZ,iBAAiB,mBAChB,QAAQ;;;;;;;;;;;;cA+BA,kBAAmB,QAAQ,gBAEpC;EACE;EACA;EACA,UAAU;GAEZ,iBAAiB,mBAChB,eAAe;cAkBP,aAAc,QAAQ,gBAanB,YAAY,iBAAiB,mBAAiB,QAAQ;iBAoBtD,qBAAqB,QAAQ;EAhGjC,OAAA;IACN;IACA;IACA,UAAU;KACX,iBACgB,mBAChB,QAAQ;EAsEO,MAAA,YAAM,iBAAmB,mBAAiB,QAAQ;EArC1D,WAAA;IACN;IACA;IACA,UAAU;KACX,iBACgB,mBAChB,eAAe;;KA2DR,UAAU,kBAAkB"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Ot as ResourceNotFound, dt as HTTPValidationError } from "../../../errors-B1xadCgl.mjs";
|
|
2
|
+
//#region src/2027-01/services/customer_portal/wallets.ts
|
|
3
|
+
const listWallets = (client) => {
|
|
4
|
+
/**
|
|
5
|
+
* List wallets of the authenticated customer.
|
|
6
|
+
*
|
|
7
|
+
* @param query - Query parameters
|
|
8
|
+
* @param requestOptions - Request options
|
|
9
|
+
* @returns {ListResourceCustomerWallet}
|
|
10
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
11
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
12
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
13
|
+
* @throws {HTTPValidationError} Validation Error
|
|
14
|
+
*/
|
|
15
|
+
return async (query, requestOptions) => {
|
|
16
|
+
const pathParams = {};
|
|
17
|
+
const queryParams = {
|
|
18
|
+
page: query?.page ?? 1,
|
|
19
|
+
limit: query?.limit ?? 10,
|
|
20
|
+
sorting: query?.sorting ?? ["-created_at"]
|
|
21
|
+
};
|
|
22
|
+
const request = client.buildRequest("GET", "/v1/customer-portal/wallets/", pathParams, queryParams, void 0);
|
|
23
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
24
|
+
return client.parseResponse(response, "json", { 422: HTTPValidationError });
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* List wallets of the authenticated customer.
|
|
29
|
+
*
|
|
30
|
+
* @param query - Query parameters
|
|
31
|
+
* @param requestOptions - Request options
|
|
32
|
+
* @returns {AsyncGenerator<CustomerWallet>} A generator that yields items of type CustomerWallet.
|
|
33
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
34
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
35
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
36
|
+
* @throws {HTTPValidationError} Validation Error
|
|
37
|
+
*/
|
|
38
|
+
const iterListWallets = (client) => {
|
|
39
|
+
return async function* (query, requestOptions) {
|
|
40
|
+
let page;
|
|
41
|
+
page = query?.page ?? 1;
|
|
42
|
+
let limit;
|
|
43
|
+
limit = query?.limit;
|
|
44
|
+
while (true) {
|
|
45
|
+
const response = await listWallets(client)({
|
|
46
|
+
...query,
|
|
47
|
+
page,
|
|
48
|
+
limit
|
|
49
|
+
}, requestOptions);
|
|
50
|
+
for (const item of response.items) yield item;
|
|
51
|
+
if (page >= response.pagination.max_page) break;
|
|
52
|
+
page++;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
const getWallets = (client) => {
|
|
57
|
+
/**
|
|
58
|
+
* Get a wallet by ID for the authenticated customer.
|
|
59
|
+
*
|
|
60
|
+
* @param id - The wallet ID.
|
|
61
|
+
* @param requestOptions - Request options
|
|
62
|
+
* @returns {CustomerWallet}
|
|
63
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
64
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
65
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
66
|
+
* @throws {ResourceNotFound} Wallet not found.
|
|
67
|
+
* @throws {HTTPValidationError} Validation Error
|
|
68
|
+
*/
|
|
69
|
+
return async (id, requestOptions) => {
|
|
70
|
+
const pathParams = { id };
|
|
71
|
+
const request = client.buildRequest("GET", "/v1/customer-portal/wallets/{id}", pathParams, {}, void 0);
|
|
72
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
73
|
+
return client.parseResponse(response, "json", {
|
|
74
|
+
404: ResourceNotFound,
|
|
75
|
+
422: HTTPValidationError
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
function createWalletsService(client) {
|
|
80
|
+
return {
|
|
81
|
+
list: listWallets(client),
|
|
82
|
+
get: getWallets(client),
|
|
83
|
+
iterList: iterListWallets(client)
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
export { createWalletsService, getWallets, iterListWallets, listWallets };
|
|
88
|
+
|
|
89
|
+
//# sourceMappingURL=wallets.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallets.mjs","names":[],"sources":["../../../../src/2027-01/services/customer_portal/wallets.ts"],"sourcesContent":["import type { ClientBase, RequestOptions } from \"../../../base\";\nimport type {\n CustomerWallet,\n CustomerWalletSortProperty,\n ListResourceCustomerWallet,\n} from \"../../models\";\n\nimport { HTTPValidationError, ResourceNotFound } from \"../../errors\";\n\nexport const listWallets = (client: ClientBase) => {\n /**\n * List wallets of the authenticated customer.\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {ListResourceCustomerWallet}\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 page?: number;\n limit?: number;\n sorting?: CustomerWalletSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): Promise<ListResourceCustomerWallet> => {\n const pathParams = {};\n const queryParams = {\n page: query?.page ?? 1,\n limit: query?.limit ?? 10,\n sorting: query?.sorting ?? [\"-created_at\"],\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/wallets/\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<ListResourceCustomerWallet>(response, \"json\", {\n 422: HTTPValidationError,\n });\n };\n};\n/**\n * List wallets of the authenticated customer.\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {AsyncGenerator<CustomerWallet>} A generator that yields items of type CustomerWallet.\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 iterListWallets = (client: ClientBase) => {\n return async function* (\n query?: {\n page?: number;\n limit?: number;\n sorting?: CustomerWalletSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): AsyncGenerator<CustomerWallet> {\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 listWallets(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 getWallets = (client: ClientBase) => {\n /**\n * Get a wallet by ID for the authenticated customer.\n *\n * @param id - The wallet ID.\n * @param requestOptions - Request options\n * @returns {CustomerWallet}\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} Wallet not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (id: string, requestOptions?: RequestOptions): Promise<CustomerWallet> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-portal/wallets/{id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerWallet>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\n\nexport function createWalletsService(client: ClientBase) {\n return {\n list: listWallets(client),\n get: getWallets(client),\n iterList: iterListWallets(client),\n };\n}\n\nexport type Wallets = ReturnType<typeof createWalletsService>;\n"],"mappings":";;AASA,MAAa,eAAe,WAAuB;;;;;;;;;;;;CAYjD,OAAO,OACL,OAKA,mBACwC;EACxC,MAAM,aAAa,CAAC;EACpB,MAAM,cAAc;GAClB,MAAM,OAAO,QAAQ;GACrB,OAAO,OAAO,SAAS;GACvB,SAAS,OAAO,WAAW,CAAC,aAAa;EAC3C;EACA,MAAM,UAAU,OAAO,aACrB,OACA,gCACA,YACA,aACA,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA0C,UAAU,QAAQ,EACxE,KAAK,oBACP,CAAC;CACH;AACF;;;;;;;;;;;;AAYA,MAAa,mBAAmB,WAAuB;CACrD,OAAO,iBACL,OAKA,gBACgC;EAChC,IAAI;EACJ,OAAO,OAAO,QAAQ;EACtB,IAAI;EACJ,QAAQ,OAAO;EAEf,OAAO,MAAM;GACX,MAAM,WAAW,MAAM,YAAY,MAAM,CAAC,CAAC;IAAE,GAAG;IAAO;IAAM;GAAM,GAAG,cAAc;GACpF,KAAK,MAAM,QAAQ,SAAS,OAC1B,MAAM;GAER,IAAI,QAAQ,SAAS,WAAW,UAC9B;GAEF;EACF;CACF;AACF;AACA,MAAa,cAAc,WAAuB;;;;;;;;;;;;;CAahD,OAAO,OAAO,IAAY,mBAA6D;EACrF,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,OACA,oCACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA8B,UAAU,QAAQ;GAC5D,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AAEA,SAAgB,qBAAqB,QAAoB;CACvD,OAAO;EACL,MAAM,YAAY,MAAM;EACxB,KAAK,WAAW,MAAM;EACtB,UAAU,gBAAgB,MAAM;CAClC;AACF"}
|