Repository navigation
v0.18.0
-
Added: optimistic-concurrency tokens for editing over an API that may also
be edited in Mailtea Studio or by another agent.templates.updateand
templates.publishacceptbase_revision(read from a template's
revision, now on every template reply); a stale value answers with
MailteaError(codestale_write, the response body also carrying
current_revision) and nothing is saved.automations.updateaccepts
base_versionthe same way for graph writes (steps), answeringcode
stale_version.posts.updateacceptsbase_updated_at(read from a
post'supdated_at, now also returned byposts.updateitself), answering
codestale_writewithcurrent_updated_at. All three are optional;
omit them for today's unconditional write. -
Changed:
posts.create/posts.updatekeep thefrom(keywordfrom_=)
andreply_toyou pass, andposts.getreturns them (Nonewhen the named
sender or the publication default decides).nameis only the post's
internal name and no longer overwrites the subject.posts.updatechanges
only the fields you pass;""clearsname,fromorreply_to. -
Note: a
fromthat is not on one of the publication's verified sending
domains is refused with a 422, andreply_tomust be a valid address. -
Docs:
automations.activatelists the two cloud-onlyno_verified_sender
reasons,CUSTOM_DOMAIN_REQUIREDand the newBUILT_IN_SENDER(a step sends
from the built-in{slug}.mailtea.emailaddress). No runtime change. -
Breaking:
posts.create()withtemplate_idnow HTML-escapes the
variablesyou pass, the same as every other send. HTML passed in a
{{key}}value now arrives as visible text, and a value you escaped
yourself arrives double-escaped. Put{{{key}}}in the template where a
value is meant to be raw HTML. Variables are now filled in both the
{{key}}and Visual Email Designer{key}forms. A declared variable you
do not pass stays in the post with itsfallback_value, so the broadcast
gives each recipient their own value or that fallback, and undeclared tokens
like{{contact.first_name}}are left for the broadcast too. The post keeps
the template's published page style, is wrapped in that page, and has its
show-if blocks decided per recipient when it is sent. Before, only the
variables you passed were replaced, raw, and only in{{key}}form. It uses
the template's published version; Mailtea Studio's "Use template" starts
from the latest saved design instead. -
Changed:
templates.update()andtemplates.restore_version()no longer
move a published template back to draft. The template keeps its published
status, and automations and the API keep sending its published version until
templates.publish()is called again. The template'sfromandreply_to
are part of the published version too, so a new sender or reply-to address
reaches sends only after the next publish.templates.unpublish()is now
the only way to stop a published template sending, short of deleting it, and
it drops the stored published version so the next publish starts from the
current content. -
Added:
has_unpublished_versionson every returned template. True only when
the template is published and its saved content (From, Reply-To and the
style profile included) differs from the published version. -
Added:
is_publishedon each template version entry: true for the one entry
automations and the API are sending now.is_currentis now described as
what it is: the entry that matches the working copy (the saved design being
edited), not necessarily what is sending.is_publishedis false on every
entry of a draft, and on a template published before the field existed until
it is published again. -
Changed: the
unpublishedfield on the update and restore replies is kept
for compatibility and is now alwaysFalse. Check
has_unpublished_versions(or the reply'smessage) instead. -
Changed (API behavior): a template variable's
fallback_valuecan no longer
contain{or}. Creating a template with one, or changing a fallback
to one on update, is a 400 ("Fallbacks can't contain { or }."). A value
the template already stores is accepted unchanged, so a template saved
before the rule keeps saving. Inline chip fallbacks such as
{first_name|Mom & Pop}now render as written instead of double-escaped. -
Changed (API behavior): saving an active automation is refused only when the
edit adds an error the live version does not already have. The 422
active_graph_invalidreply'sissueslists just those new problems.
Before, any error refused the save, even one the live version already had.
Starting refuses every error as before, except anunknown_step_refat a
config.*path or a triggermissing_branchthat the version the
automation last ran on already had, so pausing and starting an unchanged
automation keeps working. Issues the last live version already had come back
withpre_existing: true. -
Added (API behavior): issue objects carry
field, what a rule reads (the
rule'sfield, or the path in a{"var": ...}value, e.g.
steps.welcome.opened) when the issue is about one. -
Changed (API behavior): two issues are the same problem when their code and
step match, and theirfieldor, when there is none, theirpath. Moving
a rule, by removing a rule beside it or putting it in a group, no longer
makes a problem the live version already had look new. An error is
pre_existingonly if the live version had an error there, not a warning. -
Changed (API behavior):
validate_onlyon an active automation answers the
way the save would. A trigger change is a 422trigger_locked_while_active,
a change that adds a problem is a 422active_graph_invalidlisting only
the new problems, and otherwise issues come back withpre_existingmarked
against the version live now. Before, it returned every issue unmarked. -
Changed (API behavior): changing the trigger (its type or key) of an active
automation is now refused with 422trigger_locked_while_active. Pause it
first; draft and paused automations can still change their trigger. Before,
the change was accepted. -
Added (API behavior): new validation rules. A trigger with nothing after it
is amissing_brancherror atbranches.next. A rule or{"var": ...}
value that readssteps.<key>.*for a step that isn't in the automation is
anunknown_step_referror at thatconfig.*path, or a warning when the
{"var": ...}has adefault. A rule or value that reads
event.properties.*when the automation does not start from an app event is
the new warningevent_field_without_event_trigger. -
Changed (API, no client change needed):
emails.send(template=...)may
leave outsubject,from_andsender_id. The template's published
subject is used, and its sender is the publication's default sender, then
the template's own From. Thesenddocstring now says so. -
Behaviour (API): the template's variables fill the subject with the same
values and fallbacks as the body.
Released from mailtea-app/mailtea@acea165.