Hoppa till innehållet

Reference

Changelog

What each release of the SDKs changed, newest first. A major version can break code written for the one before it, and its entry says what to change.

TypeScript SDK

The package is @sendora/sdk on npm.

4.0.0

Two changes break code written for 3.x:

  • Values that said tenant now say account. The error codes tenant_paused and tenant_not_active are now account_paused and account_not_active. A limit’s scope is account where it was tenant. That holds on rate_limited and monthly_cap_reached, in the limits that sendora.server.get() returns, and on the cap_warning and cap_reached events.
  • verifyWebhook and webhooks.receive no longer throw unexpected_response for an event the SDK does not know. They return an UnknownEvent: its event is unknown, name holds the event’s name, and data holds the payload as it came. A signed body that is no event at all still throws unexpected_response. Verify the signature shows the verifier.

Upgrade from 3.x

  1. Install the new version with npm install @sendora/sdk@4.
  2. Where you compare error.code with tenant_paused or tenant_not_active, compare it with account_paused or account_not_active instead.
  3. Where you compare a scope with tenant, compare it with account.
  4. If your code checks that a switch over event.event handles every event, add a case for unknown.

Python SDK

The package is sendora on PyPI.

1.0.0

The first stable release. From 1.0.0 on, only a new major version can break your code: a renamed or removed method, argument or field, or a changed error code. A minor version adds methods, fields, codes or events, and a patch fixes a bug.

Upgrade from 0.x

  1. Install the new version with pip install "sendora~=1.0".
  2. If you wrote for a version before 0.9.0, compare error.code with account_paused or account_not_active where you compared it with tenant_paused or tenant_not_active.
  3. If you wrote for a version before 0.9.0, compare a scope with account where you compared it with tenant.