Commit 217abbb
Add translations field to conversation_part and ticket_part (Preview) (#621)
* feat(preview): add translations field to conversation_part and ticket_part
Model the new `translations` object on the Preview conversation_part and
ticket_part schemas. It is a map keyed by locale code: the special `original`
key holds the source locale code of the reply, and every other key is a locale
code whose value is the reply text translated into that locale, e.g.
{ "original": "en", "en": "Hello", "fr": "Bonjour" }.
This backs the new `conversation.admin.replied.translated` and
`ticket.admin.replied.translated` webhook topics. The existing `body` field is
unchanged and stays in the original source language. The field is Preview-only
(descriptions/0), so it is gated by the Preview API version.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(preview): require original key and add translations to reply examples
Declares `original` as required on the conversation_part and ticket_part
translations schemas, since it is always present in the payload. Also
adds translations to the existing admin-authored comment/reply examples
(retrieveConversation, updateConversationPart) so the new field is
demonstrated in inline responses.
* fix(preview): add admin comment reply example with translations to replyTicket
replyTicket only had note and quick_reply examples, neither a legitimate
carrier of translations (note is internal-only, quick_reply here has no
reply body text). Adds a customer-facing admin comment reply example,
matching the ticket_reply schema's documented comment support.
* fix(preview): translations values are HTML like body, not plain text
Corrects every translations example (retrieveConversation,
updateConversationPart, the new replyTicket comment example) and both
schema-level example blocks to wrap translated text in the same HTML as
body, per production payload shape. Also clarifies the schema
description to state values are HTML matching body's format.
* fix(preview): add translations to the ticket_reply response schema
replyTicket's 200 response uses ticket_reply, not ticket_part, so the
Admin reply example's translations field had no schema definition backing
it. Adds the same translations property (required original, HTML values,
ticket.admin.replied.translated topic) already present on conversation_part
and ticket_part.
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 624f317 commit 217abbb
1 file changed
Lines changed: 96 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12188 | 12188 | | |
12189 | 12189 | | |
12190 | 12190 | | |
| 12191 | + | |
| 12192 | + | |
| 12193 | + | |
| 12194 | + | |
12191 | 12195 | | |
12192 | 12196 | | |
12193 | 12197 | | |
| |||
12393 | 12397 | | |
12394 | 12398 | | |
12395 | 12399 | | |
| 12400 | + | |
| 12401 | + | |
| 12402 | + | |
| 12403 | + | |
12396 | 12404 | | |
12397 | 12405 | | |
12398 | 12406 | | |
| |||
14157 | 14165 | | |
14158 | 14166 | | |
14159 | 14167 | | |
| 14168 | + | |
| 14169 | + | |
| 14170 | + | |
| 14171 | + | |
14160 | 14172 | | |
14161 | 14173 | | |
14162 | 14174 | | |
| |||
14176 | 14188 | | |
14177 | 14189 | | |
14178 | 14190 | | |
| 14191 | + | |
| 14192 | + | |
| 14193 | + | |
| 14194 | + | |
14179 | 14195 | | |
14180 | 14196 | | |
14181 | 14197 | | |
| |||
22415 | 22431 | | |
22416 | 22432 | | |
22417 | 22433 | | |
| 22434 | + | |
| 22435 | + | |
| 22436 | + | |
| 22437 | + | |
| 22438 | + | |
| 22439 | + | |
| 22440 | + | |
| 22441 | + | |
| 22442 | + | |
| 22443 | + | |
| 22444 | + | |
| 22445 | + | |
| 22446 | + | |
| 22447 | + | |
| 22448 | + | |
| 22449 | + | |
| 22450 | + | |
| 22451 | + | |
| 22452 | + | |
| 22453 | + | |
22418 | 22454 | | |
22419 | 22455 | | |
22420 | 22456 | | |
| |||
32093 | 32129 | | |
32094 | 32130 | | |
32095 | 32131 | | |
| 32132 | + | |
| 32133 | + | |
| 32134 | + | |
| 32135 | + | |
| 32136 | + | |
| 32137 | + | |
| 32138 | + | |
| 32139 | + | |
| 32140 | + | |
| 32141 | + | |
| 32142 | + | |
| 32143 | + | |
| 32144 | + | |
| 32145 | + | |
| 32146 | + | |
| 32147 | + | |
| 32148 | + | |
| 32149 | + | |
| 32150 | + | |
| 32151 | + | |
32096 | 32152 | | |
32097 | 32153 | | |
32098 | 32154 | | |
| |||
39718 | 39774 | | |
39719 | 39775 | | |
39720 | 39776 | | |
| 39777 | + | |
| 39778 | + | |
| 39779 | + | |
| 39780 | + | |
| 39781 | + | |
| 39782 | + | |
| 39783 | + | |
| 39784 | + | |
| 39785 | + | |
| 39786 | + | |
| 39787 | + | |
| 39788 | + | |
| 39789 | + | |
| 39790 | + | |
| 39791 | + | |
| 39792 | + | |
| 39793 | + | |
| 39794 | + | |
| 39795 | + | |
| 39796 | + | |
39721 | 39797 | | |
39722 | 39798 | | |
39723 | 39799 | | |
| |||
39887 | 39963 | | |
39888 | 39964 | | |
39889 | 39965 | | |
| 39966 | + | |
| 39967 | + | |
| 39968 | + | |
| 39969 | + | |
| 39970 | + | |
| 39971 | + | |
| 39972 | + | |
| 39973 | + | |
| 39974 | + | |
| 39975 | + | |
| 39976 | + | |
| 39977 | + | |
| 39978 | + | |
| 39979 | + | |
| 39980 | + | |
| 39981 | + | |
| 39982 | + | |
| 39983 | + | |
| 39984 | + | |
| 39985 | + | |
39890 | 39986 | | |
39891 | 39987 | | |
39892 | 39988 | | |
| |||
0 commit comments