apify-client-js
apify-client-js copied to clipboard
fix: support tiered actor pricing types
Summary
- add typed tier entries for pay-per-event and per-dataset-item Actor pricing
- make flat price fields optional when the API returns tiered pricing instead
- align required event and unit fields with the current API shape
- cover a tiered-only pricing response with a focused regression test
Why
Tiered pricing responses do not include a flat price. The previous types required those absent fields and did not expose the tier maps, which made valid API responses difficult to model safely.
Closes #927
Validation
corepack pnpm build:nodecorepack pnpm vitest run test/pricing_types.test.tscorepack pnpm lintcorepack pnpm exec oxfmt --check src/resource_clients/actor.ts test/pricing_types.test.tsgit diff --check