Changed
- `carter.history` now consists of only interactions, ordered by default with the newst first in the array. This simplified the type and still enables easy sorting and filtering where necessary, as the timestamp is now included in the interaction object.
- Wherever possible, properties have moved to being `null` when not present. This is both more semantically correct and allows for less errors when trying to access undefined properties.
- All carter interactions now contain an error message property `interaction.errorMessage`, which will be populated where appropriate and possible for better debugging.
- carter.registerSkill now takes a skill object as its only parameter. This object contains the skill name, action and options. See docs for details.
Interactions
- Now contain:
- `type` property, which is a string of the interaction type ie. "say", "opener" or "personalise"
- `isoTimestamp` property, which is an ISO string of the timestamp of the interaction
- `characterName` property, which is a string of the character name
- `url` property, which is a string of the url the request was sent to
- `forcedBehaviours` property, which is an array of triggered forced behaviours from carter. Not to be confused with `triggeredSkills` and `executedSkills`, which are carter-js skills created as a result of forced behaviours.
- All interactions are now of the same type and structure, legacy properties have been left in the object while they are still present in the api response, but will be removed in a future release.