apify-client-js icon indicating copy to clipboard operation
apify-client-js copied to clipboard

fix: support tiered actor pricing types

Open AkhilTrivediX opened this issue 4 months ago • 0 comments

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:node
  • corepack pnpm vitest run test/pricing_types.test.ts
  • corepack pnpm lint
  • corepack pnpm exec oxfmt --check src/resource_clients/actor.ts test/pricing_types.test.ts
  • git diff --check

AkhilTrivediX avatar Jul 16 '26 11:07 AkhilTrivediX