@hatang/sdk 0.4.0: production by default, templates, global contacts, automations
@hatang/sdk 0.4.0 calls https://api.hatang.dev by default. Before, a client created without baseUrl or HATANG_BASE_URL called http://localhost:3001; local development now passes baseUrl (or sets HATANG_BASE_URL) instead.
New calls:
- Templates:
templates.create/get/list/update/remove/publish/duplicate, andemails.send({ to, template: { id, variables } }). - Global contacts:
contacts.*withoutaudience_id, by id or email, withproperties,segmentsandtopics; newsegments,topicsandcontactPropertiesnamespaces.audience_idstill uses the older audience routes. - Automations:
events.*,automations.*andautomations.runs.*. - Insights:
emails.metrics(),logs.list/getandusage.get.
The blog namespace is removed. See the Node.js guide.