Skip to main content

ab_ecosystem_cpaas 1.0.0 copy "ab_ecosystem_cpaas: ^1.0.0" to clipboard
ab_ecosystem_cpaas: ^1.0.0 copied to clipboard

Dart and Flutter SDK for the AB Ecosystem CPaaS platform: WhatsApp Business API channels, CRM contacts, bulk campaigns, message templates and a realtime live chat inbox.

Changelog #

1.0.0 #

First release. Mirrors @ab-ecosystem/cpaas 1.1.0 on npm: the same API surface, the same names, in Dart.

Client #

  • CrmClient over a validated transport -- a token or a TokenResolver consulted on every request, a per-request timeout, escaped path segments, and JSON-serialised object query values.
  • Typed errors. CrmConfigError before a request leaves the process, CrmApiError for anything the gateway refuses. A 2xx with no body, a non-JSON body, or a body of the wrong shape is a CrmApiError (empty_response / invalid_response), never a bare Dart cast error.
  • Both pagination shapes, plus a lazy iterate() stream on every list.
  • The contact filter DSL, shared by segments, campaigns and triggers.

Resources #

All 25 resources of the JavaScript SDK.

  • Audience -- contacts, tags, notes, custom fields, segments, canned replies, CRM triggers and their delivery logs, scheduled messages (one-off, series and repeating), import and export history, contact-event webhooks, push notification subscriptions, and presigned media uploads.
  • Channels -- channels and their provider properties, message templates, onboarding (every step but opening the browser), channel webhooks, conversation billing with its aggregates, wallet movements, and the activity feed.
  • Campaigns -- create, update, trigger, schedule, cancel, delete, and cursor-paginated lists; report stats, per-recipient rows, and reply breakdowns. All four audience modes decode by shape.
  • Data stores -- stores, the collections declared over them, and the records inside, including Mongo-language search and bulk writes.

Realtime #

A second library, package:ab_ecosystem_cpaas/cpaas_realtime.dart, over Socket.IO. Requests are futures, pushes are memoised broadcast streams, and a refusal arrives as the same CrmApiError the REST transport throws.

Not included #

campaigns.createBulk() and createGroup(), whose client-side recipient-file encryption is not ported. The endpoint itself is reachable -- build the pointer with CampaignNumbersFilter. Porting them is additive and will land in a minor release.

Tests #

test/endpoints_test.dart asserts the method and path of every endpoint the SDK calls. It exists because two data-store routes were written wrong during development and 59 otherwise-passing tests did not notice: none of them looked at the request line.

0
likes
160
points
420
downloads

Documentation

API reference

Publisher

verified publisherab-ecosystem.com

Weekly Downloads

Dart and Flutter SDK for the AB Ecosystem CPaaS platform: WhatsApp Business API channels, CRM contacts, bulk campaigns, message templates and a realtime live chat inbox.

Homepage

Topics

#whatsapp #messaging #crm #chat #sdk

License

MIT (license)

Dependencies

http, meta, socket_io_client

More

Packages that depend on ab_ecosystem_cpaas