@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,172 @@
|
|
|
1
|
+
import { Ot as ResourceNotFound, dt as HTTPValidationError } from "../../errors-B1xadCgl.mjs";
|
|
2
|
+
//#region src/2027-01/services/custom_fields.ts
|
|
3
|
+
const listCustomFields = (client) => {
|
|
4
|
+
/**
|
|
5
|
+
* List custom fields.
|
|
6
|
+
*
|
|
7
|
+
* **Scopes**: `custom_fields:read` `custom_fields:write`
|
|
8
|
+
*
|
|
9
|
+
* @param query - Query parameters
|
|
10
|
+
* @param requestOptions - Request options
|
|
11
|
+
* @returns {ListResourceCustomField}
|
|
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
|
+
organization_id: query?.organization_id,
|
|
21
|
+
query: query?.query,
|
|
22
|
+
type: query?.type,
|
|
23
|
+
page: query?.page ?? 1,
|
|
24
|
+
limit: query?.limit ?? 10,
|
|
25
|
+
sorting: query?.sorting ?? ["slug"]
|
|
26
|
+
};
|
|
27
|
+
const request = client.buildRequest("GET", "/v1/custom-fields/", 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 custom fields.
|
|
34
|
+
*
|
|
35
|
+
* **Scopes**: `custom_fields:read` `custom_fields:write`
|
|
36
|
+
*
|
|
37
|
+
* @param query - Query parameters
|
|
38
|
+
* @param requestOptions - Request options
|
|
39
|
+
* @returns {AsyncGenerator<CustomField>} A generator that yields items of type CustomField.
|
|
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 iterListCustomFields = (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 listCustomFields(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 createCustomFields = (client) => {
|
|
64
|
+
/**
|
|
65
|
+
* Create a custom field.
|
|
66
|
+
*
|
|
67
|
+
* **Scopes**: `custom_fields:write`
|
|
68
|
+
*
|
|
69
|
+
* @param body - Request body
|
|
70
|
+
* @param requestOptions - Request options
|
|
71
|
+
* @returns {CustomField}
|
|
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 {HTTPValidationError} Validation Error
|
|
76
|
+
*/
|
|
77
|
+
return async (body, requestOptions) => {
|
|
78
|
+
const request = client.buildRequest("POST", "/v1/custom-fields/", {}, {}, body);
|
|
79
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
80
|
+
return client.parseResponse(response, "json", { 422: HTTPValidationError });
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
const getCustomFields = (client) => {
|
|
84
|
+
/**
|
|
85
|
+
* Get a custom field by ID.
|
|
86
|
+
*
|
|
87
|
+
* **Scopes**: `custom_fields:read` `custom_fields:write`
|
|
88
|
+
*
|
|
89
|
+
* @param id - The custom field ID.
|
|
90
|
+
* @param requestOptions - Request options
|
|
91
|
+
* @returns {CustomField}
|
|
92
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
93
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
94
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
95
|
+
* @throws {ResourceNotFound} Custom field not found.
|
|
96
|
+
* @throws {HTTPValidationError} Validation Error
|
|
97
|
+
*/
|
|
98
|
+
return async (id, requestOptions) => {
|
|
99
|
+
const pathParams = { id };
|
|
100
|
+
const request = client.buildRequest("GET", "/v1/custom-fields/{id}", pathParams, {}, void 0);
|
|
101
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
102
|
+
return client.parseResponse(response, "json", {
|
|
103
|
+
404: ResourceNotFound,
|
|
104
|
+
422: HTTPValidationError
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
const deleteCustomFields = (client) => {
|
|
109
|
+
/**
|
|
110
|
+
* Delete a custom field.
|
|
111
|
+
*
|
|
112
|
+
* **Scopes**: `custom_fields:write`
|
|
113
|
+
*
|
|
114
|
+
* @param id - The custom field ID.
|
|
115
|
+
* @param requestOptions - Request options
|
|
116
|
+
* @returns {void}
|
|
117
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
118
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
119
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
120
|
+
* @throws {ResourceNotFound} Custom field not found.
|
|
121
|
+
* @throws {HTTPValidationError} Validation Error
|
|
122
|
+
*/
|
|
123
|
+
return async (id, requestOptions) => {
|
|
124
|
+
const pathParams = { id };
|
|
125
|
+
const request = client.buildRequest("DELETE", "/v1/custom-fields/{id}", pathParams, {}, void 0);
|
|
126
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
127
|
+
return client.parseResponse(response, "none", {
|
|
128
|
+
404: ResourceNotFound,
|
|
129
|
+
422: HTTPValidationError
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
const updateCustomFields = (client) => {
|
|
134
|
+
/**
|
|
135
|
+
* Update a custom field.
|
|
136
|
+
*
|
|
137
|
+
* **Scopes**: `custom_fields:write`
|
|
138
|
+
*
|
|
139
|
+
* @param id - The custom field ID.
|
|
140
|
+
* @param body - Request body
|
|
141
|
+
* @param requestOptions - Request options
|
|
142
|
+
* @returns {CustomField}
|
|
143
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
144
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
145
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
146
|
+
* @throws {ResourceNotFound} Custom field not found.
|
|
147
|
+
* @throws {HTTPValidationError} Validation Error
|
|
148
|
+
*/
|
|
149
|
+
return async (id, body, requestOptions) => {
|
|
150
|
+
const pathParams = { id };
|
|
151
|
+
const request = client.buildRequest("PATCH", "/v1/custom-fields/{id}", pathParams, {}, body);
|
|
152
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
153
|
+
return client.parseResponse(response, "json", {
|
|
154
|
+
404: ResourceNotFound,
|
|
155
|
+
422: HTTPValidationError
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
function createCustomFieldsService(client) {
|
|
160
|
+
return {
|
|
161
|
+
list: listCustomFields(client),
|
|
162
|
+
create: createCustomFields(client),
|
|
163
|
+
get: getCustomFields(client),
|
|
164
|
+
delete: deleteCustomFields(client),
|
|
165
|
+
update: updateCustomFields(client),
|
|
166
|
+
iterList: iterListCustomFields(client)
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
//#endregion
|
|
170
|
+
export { createCustomFields, createCustomFieldsService, deleteCustomFields, getCustomFields, iterListCustomFields, listCustomFields, updateCustomFields };
|
|
171
|
+
|
|
172
|
+
//# sourceMappingURL=custom_fields.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom_fields.mjs","names":[],"sources":["../../../src/2027-01/services/custom_fields.ts"],"sourcesContent":["import type { ClientBase, RequestOptions } from \"../../base\";\nimport type {\n CustomField,\n CustomFieldCreate,\n CustomFieldSortProperty,\n CustomFieldType,\n CustomFieldUpdate,\n ListResourceCustomField,\n} from \"../models\";\n\nimport { HTTPValidationError, ResourceNotFound } from \"../errors\";\n\nexport const listCustomFields = (client: ClientBase) => {\n /**\n * List custom fields.\n *\n * **Scopes**: `custom_fields:read` `custom_fields:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {ListResourceCustomField}\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 query?: string | null;\n type?: CustomFieldType | CustomFieldType[] | null;\n page?: number;\n limit?: number;\n sorting?: CustomFieldSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): Promise<ListResourceCustomField> => {\n const pathParams = {};\n const queryParams = {\n organization_id: query?.organization_id,\n query: query?.query,\n type: query?.type,\n page: query?.page ?? 1,\n limit: query?.limit ?? 10,\n sorting: query?.sorting ?? [\"slug\"],\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/custom-fields/\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<ListResourceCustomField>(response, \"json\", {\n 422: HTTPValidationError,\n });\n };\n};\n/**\n * List custom fields.\n *\n * **Scopes**: `custom_fields:read` `custom_fields:write`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {AsyncGenerator<CustomField>} A generator that yields items of type CustomField.\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 iterListCustomFields = (client: ClientBase) => {\n return async function* (\n query?: {\n organization_id?: string | string[] | null;\n query?: string | null;\n type?: CustomFieldType | CustomFieldType[] | null;\n page?: number;\n limit?: number;\n sorting?: CustomFieldSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): AsyncGenerator<CustomField> {\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 listCustomFields(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 createCustomFields = (client: ClientBase) => {\n /**\n * Create a custom field.\n *\n * **Scopes**: `custom_fields:write`\n *\n * @param body - Request body\n * @param requestOptions - Request options\n * @returns {CustomField}\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: CustomFieldCreate, requestOptions?: RequestOptions): Promise<CustomField> => {\n const pathParams = {};\n const queryParams = {};\n const request = client.buildRequest(\n \"POST\",\n \"/v1/custom-fields/\",\n pathParams,\n queryParams,\n body,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomField>(response, \"json\", {\n 422: HTTPValidationError,\n });\n };\n};\nexport const getCustomFields = (client: ClientBase) => {\n /**\n * Get a custom field by ID.\n *\n * **Scopes**: `custom_fields:read` `custom_fields:write`\n *\n * @param id - The custom field ID.\n * @param requestOptions - Request options\n * @returns {CustomField}\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} Custom field not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (id: string, requestOptions?: RequestOptions): Promise<CustomField> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"GET\",\n \"/v1/custom-fields/{id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomField>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\nexport const deleteCustomFields = (client: ClientBase) => {\n /**\n * Delete a custom field.\n *\n * **Scopes**: `custom_fields:write`\n *\n * @param id - The custom field ID.\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} Custom field not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (id: string, requestOptions?: RequestOptions): Promise<void> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"DELETE\",\n \"/v1/custom-fields/{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 updateCustomFields = (client: ClientBase) => {\n /**\n * Update a custom field.\n *\n * **Scopes**: `custom_fields:write`\n *\n * @param id - The custom field ID.\n * @param body - Request body\n * @param requestOptions - Request options\n * @returns {CustomField}\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} Custom field not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (\n id: string,\n body: CustomFieldUpdate,\n requestOptions?: RequestOptions,\n ): Promise<CustomField> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"PATCH\",\n \"/v1/custom-fields/{id}\",\n pathParams,\n queryParams,\n body,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomField>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\n\nexport function createCustomFieldsService(client: ClientBase) {\n return {\n list: listCustomFields(client),\n create: createCustomFields(client),\n get: getCustomFields(client),\n delete: deleteCustomFields(client),\n update: updateCustomFields(client),\n iterList: iterListCustomFields(client),\n };\n}\n\nexport type CustomFields = ReturnType<typeof createCustomFieldsService>;\n"],"mappings":";;AAYA,MAAa,oBAAoB,WAAuB;;;;;;;;;;;;;;CActD,OAAO,OACL,OAQA,mBACqC;EACrC,MAAM,aAAa,CAAC;EACpB,MAAM,cAAc;GAClB,iBAAiB,OAAO;GACxB,OAAO,OAAO;GACd,MAAM,OAAO;GACb,MAAM,OAAO,QAAQ;GACrB,OAAO,OAAO,SAAS;GACvB,SAAS,OAAO,WAAW,CAAC,MAAM;EACpC;EACA,MAAM,UAAU,OAAO,aACrB,OACA,sBACA,YACA,aACA,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAuC,UAAU,QAAQ,EACrE,KAAK,oBACP,CAAC;CACH;AACF;;;;;;;;;;;;;;AAcA,MAAa,wBAAwB,WAAuB;CAC1D,OAAO,iBACL,OAQA,gBAC6B;EAC7B,IAAI;EACJ,OAAO,OAAO,QAAQ;EACtB,IAAI;EACJ,QAAQ,OAAO;EAEf,OAAO,MAAM;GACX,MAAM,WAAW,MAAM,iBAAiB,MAAM,CAAC,CAAC;IAAE,GAAG;IAAO;IAAM;GAAM,GAAG,cAAc;GACzF,KAAK,MAAM,QAAQ,SAAS,OAC1B,MAAM;GAER,IAAI,QAAQ,SAAS,WAAW,UAC9B;GAEF;EACF;CACF;AACF;AACA,MAAa,sBAAsB,WAAuB;;;;;;;;;;;;;;CAcxD,OAAO,OAAO,MAAyB,mBAA0D;EAG/F,MAAM,UAAU,OAAO,aACrB,QACA,sBACA,CAAS,GACT,CAAU,GACV,IACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA2B,UAAU,QAAQ,EACzD,KAAK,oBACP,CAAC;CACH;AACF;AACA,MAAa,mBAAmB,WAAuB;;;;;;;;;;;;;;;CAerD,OAAO,OAAO,IAAY,mBAA0D;EAClF,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,OACA,0BACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA2B,UAAU,QAAQ;GACzD,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AACA,MAAa,sBAAsB,WAAuB;;;;;;;;;;;;;;;CAexD,OAAO,OAAO,IAAY,mBAAmD;EAC3E,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,UACA,0BACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAoB,UAAU,QAAQ;GAClD,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AACA,MAAa,sBAAsB,WAAuB;;;;;;;;;;;;;;;;CAgBxD,OAAO,OACL,IACA,MACA,mBACyB;EACzB,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,SACA,0BACA,YACA,CAAU,GACV,IACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA2B,UAAU,QAAQ;GACzD,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AAEA,SAAgB,0BAA0B,QAAoB;CAC5D,OAAO;EACL,MAAM,iBAAiB,MAAM;EAC7B,QAAQ,mBAAmB,MAAM;EACjC,KAAK,gBAAgB,MAAM;EAC3B,QAAQ,mBAAmB,MAAM;EACjC,QAAQ,mBAAmB,MAAM;EACjC,UAAU,qBAAqB,MAAM;CACvC;AACF"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_errors = require("../../errors-DDydmY6t.cjs");
|
|
3
|
+
//#region src/2027-01/services/customer_meters.ts
|
|
4
|
+
const listCustomerMeters = (client) => {
|
|
5
|
+
/**
|
|
6
|
+
* List customer meters.
|
|
7
|
+
*
|
|
8
|
+
* **Scopes**: `customer_meters:read`
|
|
9
|
+
*
|
|
10
|
+
* @param query - Query parameters
|
|
11
|
+
* @param requestOptions - Request options
|
|
12
|
+
* @returns {ListResourceCustomerMeter}
|
|
13
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
14
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
15
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
16
|
+
* @throws {HTTPValidationError} Validation Error
|
|
17
|
+
*/
|
|
18
|
+
return async (query, requestOptions) => {
|
|
19
|
+
const pathParams = {};
|
|
20
|
+
const queryParams = {
|
|
21
|
+
organization_id: query?.organization_id,
|
|
22
|
+
customer_id: query?.customer_id,
|
|
23
|
+
external_customer_id: query?.external_customer_id,
|
|
24
|
+
meter_id: query?.meter_id,
|
|
25
|
+
page: query?.page ?? 1,
|
|
26
|
+
limit: query?.limit ?? 10,
|
|
27
|
+
sorting: query?.sorting ?? ["-modified_at"]
|
|
28
|
+
};
|
|
29
|
+
const request = client.buildRequest("GET", "/v1/customer-meters/", pathParams, queryParams, void 0);
|
|
30
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
31
|
+
return client.parseResponse(response, "json", { 422: require_errors.HTTPValidationError });
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* List customer meters.
|
|
36
|
+
*
|
|
37
|
+
* **Scopes**: `customer_meters:read`
|
|
38
|
+
*
|
|
39
|
+
* @param query - Query parameters
|
|
40
|
+
* @param requestOptions - Request options
|
|
41
|
+
* @returns {AsyncGenerator<CustomerMeter>} A generator that yields items of type CustomerMeter.
|
|
42
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
43
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
44
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
45
|
+
* @throws {HTTPValidationError} Validation Error
|
|
46
|
+
*/
|
|
47
|
+
const iterListCustomerMeters = (client) => {
|
|
48
|
+
return async function* (query, requestOptions) {
|
|
49
|
+
let page;
|
|
50
|
+
page = query?.page ?? 1;
|
|
51
|
+
let limit;
|
|
52
|
+
limit = query?.limit;
|
|
53
|
+
while (true) {
|
|
54
|
+
const response = await listCustomerMeters(client)({
|
|
55
|
+
...query,
|
|
56
|
+
page,
|
|
57
|
+
limit
|
|
58
|
+
}, requestOptions);
|
|
59
|
+
for (const item of response.items) yield item;
|
|
60
|
+
if (page >= response.pagination.max_page) break;
|
|
61
|
+
page++;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
const getCustomerMeters = (client) => {
|
|
66
|
+
/**
|
|
67
|
+
* Get a customer meter by ID.
|
|
68
|
+
*
|
|
69
|
+
* **Scopes**: `customer_meters:read`
|
|
70
|
+
*
|
|
71
|
+
* @param id - The customer meter ID.
|
|
72
|
+
* @param requestOptions - Request options
|
|
73
|
+
* @returns {CustomerMeter}
|
|
74
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
75
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
76
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
77
|
+
* @throws {ResourceNotFound} Customer meter not found.
|
|
78
|
+
* @throws {HTTPValidationError} Validation Error
|
|
79
|
+
*/
|
|
80
|
+
return async (id, requestOptions) => {
|
|
81
|
+
const pathParams = { id };
|
|
82
|
+
const request = client.buildRequest("GET", "/v1/customer-meters/{id}", pathParams, {}, void 0);
|
|
83
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
84
|
+
return client.parseResponse(response, "json", {
|
|
85
|
+
404: require_errors.ResourceNotFound,
|
|
86
|
+
422: require_errors.HTTPValidationError
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
function createCustomerMetersService(client) {
|
|
91
|
+
return {
|
|
92
|
+
list: listCustomerMeters(client),
|
|
93
|
+
get: getCustomerMeters(client),
|
|
94
|
+
iterList: iterListCustomerMeters(client)
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
exports.createCustomerMetersService = createCustomerMetersService;
|
|
99
|
+
exports.getCustomerMeters = getCustomerMeters;
|
|
100
|
+
exports.iterListCustomerMeters = iterListCustomerMeters;
|
|
101
|
+
exports.listCustomerMeters = listCustomerMeters;
|
|
102
|
+
|
|
103
|
+
//# sourceMappingURL=customer_meters.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer_meters.cjs","names":["HTTPValidationError","ResourceNotFound"],"sources":["../../../src/2027-01/services/customer_meters.ts"],"sourcesContent":["import type { ClientBase, RequestOptions } from \"../../base\";\nimport type {\n CustomerMeter,\n CustomerMeterSortProperty,\n ListResourceCustomerMeter,\n} from \"../models\";\n\nimport { HTTPValidationError, ResourceNotFound } from \"../errors\";\n\nexport const listCustomerMeters = (client: ClientBase) => {\n /**\n * List customer meters.\n *\n * **Scopes**: `customer_meters:read`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {ListResourceCustomerMeter}\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 customer_id?: string | string[] | null;\n external_customer_id?: string | string[] | null;\n meter_id?: string | string[] | null;\n page?: number;\n limit?: number;\n sorting?: CustomerMeterSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): Promise<ListResourceCustomerMeter> => {\n const pathParams = {};\n const queryParams = {\n organization_id: query?.organization_id,\n customer_id: query?.customer_id,\n external_customer_id: query?.external_customer_id,\n meter_id: query?.meter_id,\n page: query?.page ?? 1,\n limit: query?.limit ?? 10,\n sorting: query?.sorting ?? [\"-modified_at\"],\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-meters/\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<ListResourceCustomerMeter>(response, \"json\", {\n 422: HTTPValidationError,\n });\n };\n};\n/**\n * List customer meters.\n *\n * **Scopes**: `customer_meters:read`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {AsyncGenerator<CustomerMeter>} A generator that yields items of type CustomerMeter.\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 iterListCustomerMeters = (client: ClientBase) => {\n return async function* (\n query?: {\n organization_id?: string | string[] | null;\n customer_id?: string | string[] | null;\n external_customer_id?: string | string[] | null;\n meter_id?: string | string[] | null;\n page?: number;\n limit?: number;\n sorting?: CustomerMeterSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): AsyncGenerator<CustomerMeter> {\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 listCustomerMeters(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 getCustomerMeters = (client: ClientBase) => {\n /**\n * Get a customer meter by ID.\n *\n * **Scopes**: `customer_meters:read`\n *\n * @param id - The customer meter ID.\n * @param requestOptions - Request options\n * @returns {CustomerMeter}\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 meter not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (id: string, requestOptions?: RequestOptions): Promise<CustomerMeter> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-meters/{id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerMeter>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\n\nexport function createCustomerMetersService(client: ClientBase) {\n return {\n list: listCustomerMeters(client),\n get: getCustomerMeters(client),\n iterList: iterListCustomerMeters(client),\n };\n}\n\nexport type CustomerMeters = ReturnType<typeof createCustomerMetersService>;\n"],"mappings":";;;AASA,MAAa,sBAAsB,WAAuB;;;;;;;;;;;;;;CAcxD,OAAO,OACL,OASA,mBACuC;EACvC,MAAM,aAAa,CAAC;EACpB,MAAM,cAAc;GAClB,iBAAiB,OAAO;GACxB,aAAa,OAAO;GACpB,sBAAsB,OAAO;GAC7B,UAAU,OAAO;GACjB,MAAM,OAAO,QAAQ;GACrB,OAAO,OAAO,SAAS;GACvB,SAAS,OAAO,WAAW,CAAC,cAAc;EAC5C;EACA,MAAM,UAAU,OAAO,aACrB,OACA,wBACA,YACA,aACA,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAyC,UAAU,QAAQ,EACvE,KAAKA,eAAAA,oBACP,CAAC;CACH;AACF;;;;;;;;;;;;;;AAcA,MAAa,0BAA0B,WAAuB;CAC5D,OAAO,iBACL,OASA,gBAC+B;EAC/B,IAAI;EACJ,OAAO,OAAO,QAAQ;EACtB,IAAI;EACJ,QAAQ,OAAO;EAEf,OAAO,MAAM;GACX,MAAM,WAAW,MAAM,mBAAmB,MAAM,CAAC,CAAC;IAAE,GAAG;IAAO;IAAM;GAAM,GAAG,cAAc;GAC3F,KAAK,MAAM,QAAQ,SAAS,OAC1B,MAAM;GAER,IAAI,QAAQ,SAAS,WAAW,UAC9B;GAEF;EACF;CACF;AACF;AACA,MAAa,qBAAqB,WAAuB;;;;;;;;;;;;;;;CAevD,OAAO,OAAO,IAAY,mBAA4D;EACpF,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,OACA,4BACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA6B,UAAU,QAAQ;GAC3D,KAAKC,eAAAA;GACL,KAAKD,eAAAA;EACP,CAAC;CACH;AACF;AAEA,SAAgB,4BAA4B,QAAoB;CAC9D,OAAO;EACL,MAAM,mBAAmB,MAAM;EAC/B,KAAK,kBAAkB,MAAM;EAC7B,UAAU,uBAAuB,MAAM;CACzC;AACF"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { c as RequestOptions, t as ClientBase } from "../../base-C5EE71lz.cjs";
|
|
2
|
+
import { Mn as ListResourceCustomerMeter, nt as CustomerMeter, rt as CustomerMeterSortProperty } from "../../models-COhG3nD4.cjs";
|
|
3
|
+
//#region src/2027-01/services/customer_meters.d.ts
|
|
4
|
+
declare const listCustomerMeters: (client: ClientBase) => (query?: {
|
|
5
|
+
organization_id?: string | string[] | null;
|
|
6
|
+
customer_id?: string | string[] | null;
|
|
7
|
+
external_customer_id?: string | string[] | null;
|
|
8
|
+
meter_id?: string | string[] | null;
|
|
9
|
+
page?: number;
|
|
10
|
+
limit?: number;
|
|
11
|
+
sorting?: CustomerMeterSortProperty[] | null;
|
|
12
|
+
}, requestOptions?: RequestOptions) => Promise<ListResourceCustomerMeter>;
|
|
13
|
+
/**
|
|
14
|
+
* List customer meters.
|
|
15
|
+
*
|
|
16
|
+
* **Scopes**: `customer_meters:read`
|
|
17
|
+
*
|
|
18
|
+
* @param query - Query parameters
|
|
19
|
+
* @param requestOptions - Request options
|
|
20
|
+
* @returns {AsyncGenerator<CustomerMeter>} A generator that yields items of type CustomerMeter.
|
|
21
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
22
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
23
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
24
|
+
* @throws {HTTPValidationError} Validation Error
|
|
25
|
+
*/
|
|
26
|
+
declare const iterListCustomerMeters: (client: ClientBase) => (query?: {
|
|
27
|
+
organization_id?: string | string[] | null;
|
|
28
|
+
customer_id?: string | string[] | null;
|
|
29
|
+
external_customer_id?: string | string[] | null;
|
|
30
|
+
meter_id?: string | string[] | null;
|
|
31
|
+
page?: number;
|
|
32
|
+
limit?: number;
|
|
33
|
+
sorting?: CustomerMeterSortProperty[] | null;
|
|
34
|
+
}, requestOptions?: RequestOptions) => AsyncGenerator<CustomerMeter>;
|
|
35
|
+
declare const getCustomerMeters: (client: ClientBase) => (id: string, requestOptions?: RequestOptions) => Promise<CustomerMeter>;
|
|
36
|
+
declare function createCustomerMetersService(client: ClientBase): {
|
|
37
|
+
list: (query?: {
|
|
38
|
+
organization_id?: string | string[] | null;
|
|
39
|
+
customer_id?: string | string[] | null;
|
|
40
|
+
external_customer_id?: string | string[] | null;
|
|
41
|
+
meter_id?: string | string[] | null;
|
|
42
|
+
page?: number;
|
|
43
|
+
limit?: number;
|
|
44
|
+
sorting?: CustomerMeterSortProperty[] | null;
|
|
45
|
+
}, requestOptions?: RequestOptions) => Promise<ListResourceCustomerMeter>;
|
|
46
|
+
get: (id: string, requestOptions?: RequestOptions) => Promise<CustomerMeter>;
|
|
47
|
+
iterList: (query?: {
|
|
48
|
+
organization_id?: string | string[] | null;
|
|
49
|
+
customer_id?: string | string[] | null;
|
|
50
|
+
external_customer_id?: string | string[] | null;
|
|
51
|
+
meter_id?: string | string[] | null;
|
|
52
|
+
page?: number;
|
|
53
|
+
limit?: number;
|
|
54
|
+
sorting?: CustomerMeterSortProperty[] | null;
|
|
55
|
+
}, requestOptions?: RequestOptions) => AsyncGenerator<CustomerMeter>;
|
|
56
|
+
};
|
|
57
|
+
type CustomerMeters = ReturnType<typeof createCustomerMetersService>;
|
|
58
|
+
//#endregion
|
|
59
|
+
export { CustomerMeters, createCustomerMetersService, getCustomerMeters, iterListCustomerMeters, listCustomerMeters };
|
|
60
|
+
//# sourceMappingURL=customer_meters.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer_meters.d.cts","names":[],"sources":["../../../src/2027-01/services/customer_meters.ts"],"mappings":";;;cASa,qBAAsB,QAAQ,gBAevC;EACE;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;GAEZ,iBAAiB,mBAChB,QAAQ;;;;;;;;;;;;;;cAqCA,yBAA0B,QAAQ,gBAE3C;EACE;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;GAEZ,iBAAiB,mBAChB,eAAe;cAkBP,oBAAqB,QAAQ,gBAe1B,YAAY,iBAAiB,mBAAiB,QAAQ;iBAoBtD,4BAA4B,QAAQ;EAhHxC,OAAA;IACN;IACA;IACA;IACA;IACA;IACA;IACA,UAAU;KACX,iBACgB,mBAChB,QAAQ;EAkFO,MAAA,YAAM,iBAAmB,mBAAiB,QAAQ;EA3C1D,WAAA;IACN;IACA;IACA;IACA;IACA;IACA;IACA,UAAU;KACX,iBACgB,mBAChB,eAAe;;KA6DR,iBAAiB,kBAAkB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { c as RequestOptions, t as ClientBase } from "../../base-C5EE71lz.mjs";
|
|
2
|
+
import { Mn as ListResourceCustomerMeter, nt as CustomerMeter, rt as CustomerMeterSortProperty } from "../../models-COhG3nD4.mjs";
|
|
3
|
+
//#region src/2027-01/services/customer_meters.d.ts
|
|
4
|
+
declare const listCustomerMeters: (client: ClientBase) => (query?: {
|
|
5
|
+
organization_id?: string | string[] | null;
|
|
6
|
+
customer_id?: string | string[] | null;
|
|
7
|
+
external_customer_id?: string | string[] | null;
|
|
8
|
+
meter_id?: string | string[] | null;
|
|
9
|
+
page?: number;
|
|
10
|
+
limit?: number;
|
|
11
|
+
sorting?: CustomerMeterSortProperty[] | null;
|
|
12
|
+
}, requestOptions?: RequestOptions) => Promise<ListResourceCustomerMeter>;
|
|
13
|
+
/**
|
|
14
|
+
* List customer meters.
|
|
15
|
+
*
|
|
16
|
+
* **Scopes**: `customer_meters:read`
|
|
17
|
+
*
|
|
18
|
+
* @param query - Query parameters
|
|
19
|
+
* @param requestOptions - Request options
|
|
20
|
+
* @returns {AsyncGenerator<CustomerMeter>} A generator that yields items of type CustomerMeter.
|
|
21
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
22
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
23
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
24
|
+
* @throws {HTTPValidationError} Validation Error
|
|
25
|
+
*/
|
|
26
|
+
declare const iterListCustomerMeters: (client: ClientBase) => (query?: {
|
|
27
|
+
organization_id?: string | string[] | null;
|
|
28
|
+
customer_id?: string | string[] | null;
|
|
29
|
+
external_customer_id?: string | string[] | null;
|
|
30
|
+
meter_id?: string | string[] | null;
|
|
31
|
+
page?: number;
|
|
32
|
+
limit?: number;
|
|
33
|
+
sorting?: CustomerMeterSortProperty[] | null;
|
|
34
|
+
}, requestOptions?: RequestOptions) => AsyncGenerator<CustomerMeter>;
|
|
35
|
+
declare const getCustomerMeters: (client: ClientBase) => (id: string, requestOptions?: RequestOptions) => Promise<CustomerMeter>;
|
|
36
|
+
declare function createCustomerMetersService(client: ClientBase): {
|
|
37
|
+
list: (query?: {
|
|
38
|
+
organization_id?: string | string[] | null;
|
|
39
|
+
customer_id?: string | string[] | null;
|
|
40
|
+
external_customer_id?: string | string[] | null;
|
|
41
|
+
meter_id?: string | string[] | null;
|
|
42
|
+
page?: number;
|
|
43
|
+
limit?: number;
|
|
44
|
+
sorting?: CustomerMeterSortProperty[] | null;
|
|
45
|
+
}, requestOptions?: RequestOptions) => Promise<ListResourceCustomerMeter>;
|
|
46
|
+
get: (id: string, requestOptions?: RequestOptions) => Promise<CustomerMeter>;
|
|
47
|
+
iterList: (query?: {
|
|
48
|
+
organization_id?: string | string[] | null;
|
|
49
|
+
customer_id?: string | string[] | null;
|
|
50
|
+
external_customer_id?: string | string[] | null;
|
|
51
|
+
meter_id?: string | string[] | null;
|
|
52
|
+
page?: number;
|
|
53
|
+
limit?: number;
|
|
54
|
+
sorting?: CustomerMeterSortProperty[] | null;
|
|
55
|
+
}, requestOptions?: RequestOptions) => AsyncGenerator<CustomerMeter>;
|
|
56
|
+
};
|
|
57
|
+
type CustomerMeters = ReturnType<typeof createCustomerMetersService>;
|
|
58
|
+
//#endregion
|
|
59
|
+
export { CustomerMeters, createCustomerMetersService, getCustomerMeters, iterListCustomerMeters, listCustomerMeters };
|
|
60
|
+
//# sourceMappingURL=customer_meters.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer_meters.d.mts","names":[],"sources":["../../../src/2027-01/services/customer_meters.ts"],"mappings":";;;cASa,qBAAsB,QAAQ,gBAevC;EACE;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;GAEZ,iBAAiB,mBAChB,QAAQ;;;;;;;;;;;;;;cAqCA,yBAA0B,QAAQ,gBAE3C;EACE;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;GAEZ,iBAAiB,mBAChB,eAAe;cAkBP,oBAAqB,QAAQ,gBAe1B,YAAY,iBAAiB,mBAAiB,QAAQ;iBAoBtD,4BAA4B,QAAQ;EAhHxC,OAAA;IACN;IACA;IACA;IACA;IACA;IACA;IACA,UAAU;KACX,iBACgB,mBAChB,QAAQ;EAkFO,MAAA,YAAM,iBAAmB,mBAAiB,QAAQ;EA3C1D,WAAA;IACN;IACA;IACA;IACA;IACA;IACA;IACA,UAAU;KACX,iBACgB,mBAChB,eAAe;;KA6DR,iBAAiB,kBAAkB"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Ot as ResourceNotFound, dt as HTTPValidationError } from "../../errors-B1xadCgl.mjs";
|
|
2
|
+
//#region src/2027-01/services/customer_meters.ts
|
|
3
|
+
const listCustomerMeters = (client) => {
|
|
4
|
+
/**
|
|
5
|
+
* List customer meters.
|
|
6
|
+
*
|
|
7
|
+
* **Scopes**: `customer_meters:read`
|
|
8
|
+
*
|
|
9
|
+
* @param query - Query parameters
|
|
10
|
+
* @param requestOptions - Request options
|
|
11
|
+
* @returns {ListResourceCustomerMeter}
|
|
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
|
+
organization_id: query?.organization_id,
|
|
21
|
+
customer_id: query?.customer_id,
|
|
22
|
+
external_customer_id: query?.external_customer_id,
|
|
23
|
+
meter_id: query?.meter_id,
|
|
24
|
+
page: query?.page ?? 1,
|
|
25
|
+
limit: query?.limit ?? 10,
|
|
26
|
+
sorting: query?.sorting ?? ["-modified_at"]
|
|
27
|
+
};
|
|
28
|
+
const request = client.buildRequest("GET", "/v1/customer-meters/", pathParams, queryParams, void 0);
|
|
29
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
30
|
+
return client.parseResponse(response, "json", { 422: HTTPValidationError });
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* List customer meters.
|
|
35
|
+
*
|
|
36
|
+
* **Scopes**: `customer_meters:read`
|
|
37
|
+
*
|
|
38
|
+
* @param query - Query parameters
|
|
39
|
+
* @param requestOptions - Request options
|
|
40
|
+
* @returns {AsyncGenerator<CustomerMeter>} A generator that yields items of type CustomerMeter.
|
|
41
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
42
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
43
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
44
|
+
* @throws {HTTPValidationError} Validation Error
|
|
45
|
+
*/
|
|
46
|
+
const iterListCustomerMeters = (client) => {
|
|
47
|
+
return async function* (query, requestOptions) {
|
|
48
|
+
let page;
|
|
49
|
+
page = query?.page ?? 1;
|
|
50
|
+
let limit;
|
|
51
|
+
limit = query?.limit;
|
|
52
|
+
while (true) {
|
|
53
|
+
const response = await listCustomerMeters(client)({
|
|
54
|
+
...query,
|
|
55
|
+
page,
|
|
56
|
+
limit
|
|
57
|
+
}, requestOptions);
|
|
58
|
+
for (const item of response.items) yield item;
|
|
59
|
+
if (page >= response.pagination.max_page) break;
|
|
60
|
+
page++;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
const getCustomerMeters = (client) => {
|
|
65
|
+
/**
|
|
66
|
+
* Get a customer meter by ID.
|
|
67
|
+
*
|
|
68
|
+
* **Scopes**: `customer_meters:read`
|
|
69
|
+
*
|
|
70
|
+
* @param id - The customer meter ID.
|
|
71
|
+
* @param requestOptions - Request options
|
|
72
|
+
* @returns {CustomerMeter}
|
|
73
|
+
* @throws {PolarNetworkError} When a network error occurs
|
|
74
|
+
* @throws {PolarRateLimitError} When the rate limit is exceeded
|
|
75
|
+
* @throws {PolarServerError} When the server returns a 5xx error
|
|
76
|
+
* @throws {ResourceNotFound} Customer meter not found.
|
|
77
|
+
* @throws {HTTPValidationError} Validation Error
|
|
78
|
+
*/
|
|
79
|
+
return async (id, requestOptions) => {
|
|
80
|
+
const pathParams = { id };
|
|
81
|
+
const request = client.buildRequest("GET", "/v1/customer-meters/{id}", pathParams, {}, void 0);
|
|
82
|
+
const response = await client.sendRequest(request, requestOptions);
|
|
83
|
+
return client.parseResponse(response, "json", {
|
|
84
|
+
404: ResourceNotFound,
|
|
85
|
+
422: HTTPValidationError
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
function createCustomerMetersService(client) {
|
|
90
|
+
return {
|
|
91
|
+
list: listCustomerMeters(client),
|
|
92
|
+
get: getCustomerMeters(client),
|
|
93
|
+
iterList: iterListCustomerMeters(client)
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
//#endregion
|
|
97
|
+
export { createCustomerMetersService, getCustomerMeters, iterListCustomerMeters, listCustomerMeters };
|
|
98
|
+
|
|
99
|
+
//# sourceMappingURL=customer_meters.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer_meters.mjs","names":[],"sources":["../../../src/2027-01/services/customer_meters.ts"],"sourcesContent":["import type { ClientBase, RequestOptions } from \"../../base\";\nimport type {\n CustomerMeter,\n CustomerMeterSortProperty,\n ListResourceCustomerMeter,\n} from \"../models\";\n\nimport { HTTPValidationError, ResourceNotFound } from \"../errors\";\n\nexport const listCustomerMeters = (client: ClientBase) => {\n /**\n * List customer meters.\n *\n * **Scopes**: `customer_meters:read`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {ListResourceCustomerMeter}\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 customer_id?: string | string[] | null;\n external_customer_id?: string | string[] | null;\n meter_id?: string | string[] | null;\n page?: number;\n limit?: number;\n sorting?: CustomerMeterSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): Promise<ListResourceCustomerMeter> => {\n const pathParams = {};\n const queryParams = {\n organization_id: query?.organization_id,\n customer_id: query?.customer_id,\n external_customer_id: query?.external_customer_id,\n meter_id: query?.meter_id,\n page: query?.page ?? 1,\n limit: query?.limit ?? 10,\n sorting: query?.sorting ?? [\"-modified_at\"],\n };\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-meters/\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<ListResourceCustomerMeter>(response, \"json\", {\n 422: HTTPValidationError,\n });\n };\n};\n/**\n * List customer meters.\n *\n * **Scopes**: `customer_meters:read`\n *\n * @param query - Query parameters\n * @param requestOptions - Request options\n * @returns {AsyncGenerator<CustomerMeter>} A generator that yields items of type CustomerMeter.\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 iterListCustomerMeters = (client: ClientBase) => {\n return async function* (\n query?: {\n organization_id?: string | string[] | null;\n customer_id?: string | string[] | null;\n external_customer_id?: string | string[] | null;\n meter_id?: string | string[] | null;\n page?: number;\n limit?: number;\n sorting?: CustomerMeterSortProperty[] | null;\n },\n requestOptions?: RequestOptions,\n ): AsyncGenerator<CustomerMeter> {\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 listCustomerMeters(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 getCustomerMeters = (client: ClientBase) => {\n /**\n * Get a customer meter by ID.\n *\n * **Scopes**: `customer_meters:read`\n *\n * @param id - The customer meter ID.\n * @param requestOptions - Request options\n * @returns {CustomerMeter}\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 meter not found.\n * @throws {HTTPValidationError} Validation Error\n */\n return async (id: string, requestOptions?: RequestOptions): Promise<CustomerMeter> => {\n const pathParams = {\n id: id,\n };\n const queryParams = {};\n const request = client.buildRequest(\n \"GET\",\n \"/v1/customer-meters/{id}\",\n pathParams,\n queryParams,\n undefined,\n );\n const response = await client.sendRequest(request, requestOptions);\n return client.parseResponse<CustomerMeter>(response, \"json\", {\n 404: ResourceNotFound,\n 422: HTTPValidationError,\n });\n };\n};\n\nexport function createCustomerMetersService(client: ClientBase) {\n return {\n list: listCustomerMeters(client),\n get: getCustomerMeters(client),\n iterList: iterListCustomerMeters(client),\n };\n}\n\nexport type CustomerMeters = ReturnType<typeof createCustomerMetersService>;\n"],"mappings":";;AASA,MAAa,sBAAsB,WAAuB;;;;;;;;;;;;;;CAcxD,OAAO,OACL,OASA,mBACuC;EACvC,MAAM,aAAa,CAAC;EACpB,MAAM,cAAc;GAClB,iBAAiB,OAAO;GACxB,aAAa,OAAO;GACpB,sBAAsB,OAAO;GAC7B,UAAU,OAAO;GACjB,MAAM,OAAO,QAAQ;GACrB,OAAO,OAAO,SAAS;GACvB,SAAS,OAAO,WAAW,CAAC,cAAc;EAC5C;EACA,MAAM,UAAU,OAAO,aACrB,OACA,wBACA,YACA,aACA,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAAyC,UAAU,QAAQ,EACvE,KAAK,oBACP,CAAC;CACH;AACF;;;;;;;;;;;;;;AAcA,MAAa,0BAA0B,WAAuB;CAC5D,OAAO,iBACL,OASA,gBAC+B;EAC/B,IAAI;EACJ,OAAO,OAAO,QAAQ;EACtB,IAAI;EACJ,QAAQ,OAAO;EAEf,OAAO,MAAM;GACX,MAAM,WAAW,MAAM,mBAAmB,MAAM,CAAC,CAAC;IAAE,GAAG;IAAO;IAAM;GAAM,GAAG,cAAc;GAC3F,KAAK,MAAM,QAAQ,SAAS,OAC1B,MAAM;GAER,IAAI,QAAQ,SAAS,WAAW,UAC9B;GAEF;EACF;CACF;AACF;AACA,MAAa,qBAAqB,WAAuB;;;;;;;;;;;;;;;CAevD,OAAO,OAAO,IAAY,mBAA4D;EACpF,MAAM,aAAa,EACb,GACN;EAEA,MAAM,UAAU,OAAO,aACrB,OACA,4BACA,YACA,CAAU,GACV,KAAA,CACF;EACA,MAAM,WAAW,MAAM,OAAO,YAAY,SAAS,cAAc;EACjE,OAAO,OAAO,cAA6B,UAAU,QAAQ;GAC3D,KAAK;GACL,KAAK;EACP,CAAC;CACH;AACF;AAEA,SAAgB,4BAA4B,QAAoB;CAC9D,OAAO;EACL,MAAM,mBAAmB,MAAM;EAC/B,KAAK,kBAAkB,MAAM;EAC7B,UAAU,uBAAuB,MAAM;CACzC;AACF"}
|