- Enable to send airtime to WhatsApp URNs
- Remove old body field on ticket modifier
- On second thoughts, better to just bundle the note with the open ticket event
- Replace ticket body with initial note
- Update to latest gocommon
- Add validation of attachment values in flow definitions
- Don't use template variables as attachments unless they're valid
- Update to latest gocommon which changes contact ql conversion to ES
- Change flos.NewMsgOut to take flows.MsgContent
- Move code to generate templating into flows.Template
- Remove namespace on template translations as it's not needed by engine and can be added by mailroom when queueing
- Move functionality to generate preview content for template message from send_msg action to TemplateTranslation
- Rework broadcast translation selection to merge across text, attachments and quick replies
- Drop db support on flows.BroadcastTranslations
- Revert adding support for sending airtime to WhatsApp
- Use empty value for airtime failure result
- Save airtime transfer transaction id as result and on event as external_id
- Remove support for old template component types
- Add transfer UUID field to airtime transfer
- Support sending for WhatsApp URNs
- Update DT One requests
- Support template component types like header/* and body/*
- Support template header components of type image, video or document and use as attachments on preview message
- Update goreleaser config to v2
- Make date parsing stricter
- Ensure QueryError always has a code and use
syntax
as code for all parser errors
- Tweak type of extra on query errors
- Use std library errors
- Move elastic utils to gocommon
- Rewrite contactql query conversion to ES to use simple maps instead of unmaintained library
- Merge pull request #1255 from nyaruka/migration_fix
- Fix migrating directly from 13.2 to 13.5
- Tweak releaser config
- Switch to use goreleaser and update actions to latest versions
- Normalize contactql queries with type prefixes
- Add support for contactql conditions with properties prefixed by their type
- Update to latest ANTLR4
- Update gocommom
- Update to latest gocommon
- Update to latest gocommon
- Remove old urn modifier which was replaced by the urns modifier
- Add new 13.5 flow spec which changes send_msg to use single list of variables
- Remove deprecated params in templating
- Re-include legacy .params field on components temporarily
- Rework the format of MsgTemplating
- Update to latest decimal library that fixes .Pow
- Rework template assets to use variables instead of component specific param lists
- Remove no longer used templating.params
- Include component name on templating
- Drop support for variables in display parts of template components
- Rework template components... again
- Add type and display fields to temmplate components
- Truncate quick replies for template preview messages
- Update to go 1.22
- Mark @child.run.status as deprecated in context
- Reorg of expression refactoring code into its own package
- Remove no longer used uuid property from msg.templating
- Instead of supporting both variables and components in send_msg actions, add 13.4 migration
- Support excluding deprecated object properties from marshalling
- Deprecate undocumented multi-match result fields
- Update autocompletion docs for results extra
- Update docs for @webhook
- Make @webhook an object with headers and json properties
- Rework semd_msg templating to have a simpler structure in flow definitions and fix enumerating templates and localizable strings
- Limit use of reflect nil checking
- Add warnings from template eval functions and recorded as events
- Add excellent.Evaluator and move top level evaluation functions to methods on that
- Rework xvalues to be passed by pointer and have a base struct
- Rework router reading to be like action reading (and allow for enumeration of types)
- Replace template translation content and params by the components fields
- Support more WA templates components
- Rework template assets to use params instead of variables
- Replace flows.MsgTemplating variables by params
- Update deps
- Remove ticketers
- Merge pull request #1198 from nyaruka/trim_attachments
- Trim whitespace from evaluated message attachments
- Update to latest gocommon
- Rework template translation finding
- Update deps
- Tweak Arabic Variants collation
- Update depedencies
- Update to latest gocommon
- Less panics, more validation errors for invalid flow defs
- Update deps
- Drop support for contact less sessions
- Add devcontainer config
- Don't treat ژ and ږ as equivalent in arabic variants collation
- Remove deprecated collation alias
- Update to go 1.21
- Add more mappings to arabic collation
- Fix inspectng optin refs
- Rename send_optin to request_optin and optin_created to optin_requested
- Add mores tests for arabic-farsi collation
- Rename optin_sent to optin_created for consistency with msg_created and add channel/URN properties
- Fix optin triggers marshaling with type ticket
- Add send_optin action and optin_sent event
- Add features to channel assets and define optins as a feature
- Add trigger type for optins
- Add OptIn as new asset type
- Update to latest gocommon
- Remove support for delegate channels
- Update to latest gocommon
- Simplify naming in po package to avoid stuttering
- Switch to i18n package from gocommon
- Update to latest gocommon
- Replace interface{} with any
- Replace input cleaning with input collation
- Add input cleaners
- Merge pull request #1176 from nyaruka/split_env_types
- Split flows.Environment into AssetsEnvironment and SessionEnvironment
- Replace max_value_length on env with new engine options for max field and result chars
- Simplify how we create a merged environment with properties from the contact
- Add filter expression function
- Update go to 1.20
- Make numerical router tests work with Eastern Arabic digits
- Update deps
- Fix has_ward argument ordering
- Add contains function
- Support hyphen in locations name as one word
- Fix matching location name with diacritics
- Contacts only have one (open) ticket
- Bump golang.org/x/net from 0.5.0 to 0.7.0
- Sort should return error (instead of panic) if array has mixed types
- Re-add matching by group name in start_session actions
- Remove matching legacy vars against group names for start_session and send_broadcast actions
- Tweak BroadcastTranslations.ForContact to also return language
- Truncate quick replies that are too long
- Add support for resolving broadcast translations for different contacts
- Ignore importing split arguments translations
- Convert StringSet functions to be generic
- Reorganize ANTLR generated code as per recommendations in ANTLR README
- Upgrade to latest ANTLR and rebuild grammars
- Add support for contact queries in broadcasts
- Update to validator v10
- Update to nyaruka/null v2
- Make envs.Language, envs.Country and envs.Locale play nice with NULLs when persisting
- Fix docstring on ivr_created event
- Fix wording in spec migration comments
- Add migration versions to auto-generated docs
- Add 13.2.0 flow migration to replace "base" as flow language with "und"
- Fix and improve mobile bindings to work without wait objects on sessions
- Tweak envs.NewLocale(..) to allow passing NilCountry
- Replace TemplateTranslation.language and country fields with single locale field and also don't duplicate locale on MsgTemplating since it's now on the message itself
- Derive contact country from tel urns if no preferred channel
- Change msg_out.language to locale
- Reduce msg/ivr_created localization blobs to a single language
- Add localization outcome object to msg/ivr_created events to replace msg_out.text_language field
- Simplify getting text translations in flow actions
- Add a new issue type for use of legacy vars in start_session actions
- Update deps
- Update to latest gocommon
- Add support for parsing attachments with unavailable: prefixes
- Update to latest gocommon
- Add optional revision number to flow refs, use on run.flow
- Also fix case where translation just has different number of args
- Ignore empty string translations in flow localization sections
- Remove merging translation text arrays as it never makes sense
- Fix bubbling failing runs in case of missing flow
- Fix parsing of geo type attachments
- Make utils.Attachment smarter about parsing raw URLs
- Update dependencies
- Dial wait expiry should be based on the maximum time the forwarded call might take
- Set defaults for dial wait time limits
- Add time limits to dial waits
- Rename connection to call in IVR context
- Add unsendable reason to MsgOut and set when contact status is not active
- Update to latest gocommon
- Add keys function to get object properties
- Use go 1.19
- Update to latest gocommon
- Update to latest gocommon
- Use HTTP log functionality from gocommon
- Update parsed docstrings to use codeblock formating (tab) for examples
- Update to latest gocommon
- Add contact status to variable context
- Update to latest gocommon which adds teams URNs
- Another tweak to SessionBuilder so that it doesn't override assets
- More tweaks to SessionBuilder
- Allow passing of a flows.SessionAssets to test.SessionBuilder
- Updated translations from Transifex
- Add modifier to open a ticket
- Modifer.Apply should return if it made a modification and caller responsible for calling ReevaluateGroups if so
- Add Services param to Modifier.Apply
- Pass session assets to service factories
- Remove flow sessions from service factories
- Rework services to not require sessions
- Always truncate URLs in HTTP logs to 2048 chars
- Support simplifying of queries than can't be parsed but can be constructed
- Provide API for building contact queries programatically
- Update ANTLR
- Update to better maintained fork of go-mail
- Ensure that failing a session doesn't leave runs in active/waiting state
- Update to latest gocommon and phonenumbers
- Add option to exclude contacts in a flow on start session action
- Trim URLs in call_webhook actions
- Fix not equals conditions in contact queries on fields that aren't set
- Improve simplifying of contactql queries
- Update direct dependencies except ANTLR4
- Go 1.18
- send_msg action should fallback to template trans in env default language if no trans found for contact language
- Add status as a contact query attribute, disallowed for smart groups
- Update to latest gocommon
- Allow querying on whether group is set or not for consistency with other fields
- Support contact queries on flow history
- SessionAssets implementation of contactql.Resolver methods should return pure assets
- Give flows.Flow a reference to their asset if they have one
- Switch from flow to flow_id and groups to group_ids for ES queries
- Give errors returned from Session.Resume codes
- Add concat excellent function
- Updated translations from Transifex
- start_session actions should generate error event if flow asset missing
- Add flow as contactql query attribute
- Export events.BaseEvent so that callers can create their own events
- Fix bug when we remove a contact from all static groups
- If caller tries to resume with wrong resume type, don't fail session but error instead
- Update to gocommon 1.17.1
- Remove no longer used Run.expires_on
- Add expiresOn to dial waits so all wait types have it
- Add @trigger.campaign for campaign triggers
- Only treat start_session legacy vars as tel URNs if they are parseable phone numbers
- Update to latest gocommon
- Rename FlowRun to Run
- Update to latest gocommon
- Add expires_on to msg_wait events
- Remove activated wait objects on sessions, callers should use the wait events
- Tweak validation error message for min and max tags when field isn't a slice
- Fix tests broken by new scheme addition
- Update to latest gocommon to get Instagram scheme type
- Update to latest gocommon
- Add extraction field to webhook_called events
- Use WebhookCall.ResponseJSON for @webhook and @result.*.extra
- Updated translations from Transifex
- Add more options for customizing contact used by test.SessionBuilder
- Add test.SessionBuilder to make it easier to build sessions for testing
- Include node on segments, revert change to add segments without destinations
- For random router results, input should be raw random number, value is the bucket
- Include segments with no destination
- Add operand and time to flows.Segment
- Put back engine.NewSprint which mailroom uses for surveyor submissions
- Add Segments() to Sprint which returns all complete segments in that sprint
- Simplify error message that users see if they have label action with no input
- Rework Context into Scope, expose functions via a root scope, and support shadowing
- Cleanup function exposure in contexts and add more tests
- Drop unused child.run.* and parent.run.* parts of the context except .status as used subflow splits
- Add support for anonymous functions in excellent
- Fix function equality/inequality for consistency
- Use syntax tree for refactoring operations
- Excellent evaluation should parse to syntax tree as first step
- Let Excellent functions know their own name to make better error messages
- Only msg resumes should set input, all other resumes clear it
- Update locale files (adds empty cs and mn translations)
- Add reverse excellent function
- Limit webhook URLs to 2048 chars
- Add sort() excellent function
- Add engine property for maximum resumes per session
- Simplify contactql queries after parsing
- Update to latest gocommon
- Update locale files
- Improve validator error message with startswith tag
- Tweak validation to work when struct doesn't use json tags
- Fix trigger docs
- Add Session.FindStep
- Rework WebhookCall and HTTPLog to overlap as much as possible
- Get rid of ticket subjects
- Add number of retries to webhook_called events
- Fix word_slice when passing custom delimiters
- Re-evaluate dynamic groups after opening tickets
- Add support for variable user references to open ticket actions
- Update to latest gocommon/phonenumbers
- If open ticket action doesn't specify a topic, default to General
- Expose topic instead of subject in context for ticket objects
- Update to latest gocommon and add webchat URN schemes
- Require either a subject or a topic to open a ticket but not both
- Add assignee as optional field to open ticket actions
- Add topics to tickets
- Move slot param for LUIS classifiers to last
- Add util cmd for testing classifier services
- Update to LUIS API v3.0
- Add support for tickets queries in elastic
- Also simplify converting queries to elastic
- Simplify parsing contact queries
- Add support for query property tickets
- Rework contactql to separate query parsing, validation and evaluation
- Add unique excellent function to get unique elements in an array
- Update to latest gocommon
- Updated translations from Transifex
- Replace usages of soon to be deprecated ioutil
- Allow Msg type triggers to have connections
- Update locale files
- Use latest gocommon, replace all nulls and escaped nulls when parsing bodies as JSON
- Add assignee (optional) to ticket_opened events
- Cleanup from linter suggestions
- Strip out invalid UTF-8 from webhook responses before trying to convert to JSON
- Update to latest gocommon
- Make users more like contacts in expressions by giving them an always non-empty default and a first_name property
- Fix inspecting user dependencies in flows
- Change default property of user objects in expressions to be the name to match contacts
- Fix remove_first_word when input contains non-ASCII
- Add User assets and use for Ticket.Assignee and Trigger.user
- Add SUM() excellent function
- Remove default_language from envs and usa first item of allowed_languages as the default
- Allow build failing on codecov uploads again
- Get rid of ticket references
- Don't generate separate completion/functions doc files
- Tweak test.AssertEqualJSON to take msgAndArgs param like asserts library
- Add ticket as property to @trigger in context
- Add new ticket type trigger with a closed event
- Remove legacy_extra issue type
- Add @ticket to the root context as the last opened ticket
- Add way to create new ticket reference instances and add contact tickets to editor autocompletion
- Add contact tickets to expression context
- Add WA template translations namespace
- Use standard hypenated BCP47 locale codes consistently
- Test on go 1.16.x
- Update to latest gocommon datefmt and pass locale to all date formatting calls
- Fix dtone API endpoint URL and use external IDs
- Fix sometimes retrying successful SMTP sends
- Add support for retrying SMTP sends
- Fully implement airtime service using new DT One API
- Fix resuming a parent run when flow is missing
- Add last missing translations for es and pt-BR
- Update Spanish locale and gocommon dependency
- Don't blow up building context if node is null
- Add contact language to resthook payload
- Add accessor for URN on ActivatedDialWait
- Log error event and skip when attachment is longer than 2048 limit
- Include resume and node in migration expression parsing
- Add dial types of waits and resumes
- Move to ElasticSearch v7 clients (backwards incompatible change)
- Remove forward_ivr action and ivr_forwarded event
- Spanish translations from transifex
- Combine the completion.json and functions.json editor support files into a single editor.json file
- Remove generated docs from repo
- Fix release workflow
- Fix release workflow
- Don't use fuzzy entries in po files
- Add forward_ivr action and ivr_forwarded event
- Add @node.(uuid|visit_count) to context
- Rename messaging_passive to messaging_background
- Disallow labeling actions in passive flows
- Add float64 workaround for exponent expressions with non-integer exponents
- Add new flow type for passive messaging flows
- Update to gocommon v1.7.1 to get fix for phone number parsing
- Engine evaluator for contact sql should support != x for number and datetime values
- Update to latest gocommon
- URN and channel modifiers should error with invalid URNs and channels
- Getting channel for URN should always consider the role on the channels
- Update to latest gocommon which adds rocketchat scheme
- SetPreferredChannel only when the channel has the send role
- Support sorting contacts by last seen on attribute
- Add support for Bengali numerals in number tests
- Add support for Eastern Arabic numerals in number tests
- Clear a run's expiration when it exits
- Unwind accumulated run expirations as child runs complete
- Include country in msg templating on msg_created events
- Update to latest gocommon v1.5.3
- Bump some deps, test on go 1.15 and fix bug found by 1.15 compiler
- Update to gocommon v1.5.1
- Use dummy value to avoid sending empty emails
- Rework smtpx package for sending emails in places besides flows
- Don't parse numbers in scientific notation
- Update to latest gocommon v1.5.0
- Run environment's DefaultLanguage and DefaultLocale methods should use contact language
- Update to latest gocommon
- Update terminology around groups with queries
- Add archived contact status
- Update to latest gocommon
- Add empty localizations for all the languages used in RapidPro
- Fix test
- Use language codes (e.g. en-us) rather than locale names (en_US) for docs directories
- Add completed pt_BR translation
- Add last_seen_on to contacts and expose in expressions and queries
- Rework elastic query generation so that all errors are caught at parsing stage
- Allow URN inequality in elastic searches
- Rework error handling in contactql so more errors are caught during parsing and have associated codes
- Re-add classifier_called events for backward compatibility
- Groups modifier should generate error if asked to operate on blocked or stopped contact
- Move modifiers package out of actions package
- ContactQL parser errors should contain more info
- Reorganize validation code so utils doesn't have to know about tags defined higher up
- Clone the test session during doc generation so actions always start with the same session
- Add action to change contact status
- Add historical information to triggers about the session that triggered them and use to prevent looping
- Improve documentation of call_webhook action
- Use latest wit.ai API version
- Allow searching with values containing single quotes
- Add user and origin fields to manual triggers
- Add builder for triggers
- Pass language to bothub API calls
- Use jsonx.Marshal consistently
- Add IsQueryError util
- Move all location stuff from utils to envs
- Simplify resolving locations from environments
- Refactor field modifiers to take raw values and location parsing to not require a session
- Fix clearing all URNs
- Add urns modifier to replace all the URNs on a contact
- Move elastic functionality from mailroom
- Fix clearing of fields
- Move generic PO stuff into utils/i18n
- Allow querying contacts by UUID
- Move i18n package under flows to avoid confusion with locales package
- Add completion to localized documentation
- Tweak change language functionality to allow missing translations
- Add country to template translations and use when resolving templates
- Add support for localized documentation
- Disallow opening tickets, starting sessions and sending broadcasts when doing batch start
- Add ability to change the language of a flow
- Update our format_datetime docs to properly show range of 01-24
- Fix evaluation of legacy vars in other-contacts actions
- Fix spelling of Readact
- Do redaction of access keys from HTTP logs
- Add open_ticket actions and ticket_opened events
- Add new service_called event to be used for classifiers and ticketers etc
- Replace contact blocked and stopped fields with status field
- Rename blocked and stopped modifiers to contact status modifier
- Fix anywhere we truncate strings to do it by rune
- Add blocked and stopped modifiers and events
- Add blocked and stopped fields to contact
- Fix default to understand objects with defaults
- Rework httpx to replace NewTrace with NewRequest+DoTrace
- Separate out the header part of response traces from the body which won't always be valid UTF-8
- ivr_created events should include language of translated text
- Include 3-char language code as extra header in PO files
- Add custom Source-Flows header to exported PO files
- Make router categories inspectable
- Importing of translations into flows
- Add decode_html Excellent function
- Start of i18n work
- Prevent XText.Slice from panicking
- Add support for extracting the "base" translation of a flow
- Allow queries on URNs to check if they are set or not
- Add Language.ToISO639_2()
- Make flowrunner easier to use by defaulting to first flow in the assets
- Default to current version in flowmigrate cmd
- Rework group asset loading so that parsing is not deferred
- Override environment country if contact has preferred channel with country
- Fix loading flow assets that are new spec but also have metadata section
- Update README
- Update README
- Fix not passing access config correctly to webhook services
- Allow http services to be configured with a list of disallowed hosts
- fix @legacy_extra issue on routers
- update gomobile instructions
- Add trim, trim_left and trim_right excellent functions
- Sort issues by node order
- Add issues to report on invalid regex and usage of @legacy_extra
- Validate language codes in contact queries
- Disallow group queries against group names that don't exist
- Remove contacts from broken groups
- Handle missing groups on contact creation
- Fix != with multiple values and add support for group attribute in contact queries
- Improve docs for operators
- Use jsonx functions for all JSON marshal/unmarshal
- Add support for removing a URN to the urns modifier
- Groups modifier should log errors for dynamic groups
- Rename snapshot flag to -update
- Include translation language with missing dependency issues
- Allow flow inspection without assets
- Quote telephone numbers in contact queries
- Tweak parsing of phone numbers in contact queries
- Rename "problems" to "issues"
- Implement missing_dependency as a type of problem
- Add framework for checking for problems during flow inspection
- Rework dependency and template extraction to include actions and routers
- Channels with no country are implicitly international
- Add field to channel assets which determines whether they should try to send internationally
- Make cloning a flow definition more deterministic
- Update actions to log error events when dependencies are missing
- Interpret contact queries which are formatted phone numbers as tel = queries
- Move JSON utils into their own package
- Track node UUIDs of dependencies
- Convert dependency inspection output to list of things with type attribute
- Replace Flow.CheckDepedencies and CheckDependenciesRecursive with passing assets to Inspect
- Update to gocommon v1.2.0
- Rename Flow.Validate to Flow.CheckDependencies for clarity
- Create error event when webhook response too big
- Rework webhook calls to use same calling code as other HTTP services
- Allow globals with empty values
- Add mobile binding for IsVersionSupported
- Re-add version check to ReadFlow
- Match evaluation of contact queries in ES
- Fix problems with contact searching and add support for URN as attribute
- Ignore content-type headers and try to parse all webhook responses as JSON
- Update ContactQL to interpret implicit conditions which are URNs as scheme=path
- Limit the size of evaluated templates and truncate anything bigger
- Stringify contactql like the queries they came from
- Trim webhook_called request traces to 10K same as response traces
- Only set extra on webhook result if less than 10000 bytes
- Allow getting current context even for ended sessions
- Fix another panic during context walking
- Fix panic in context walking
- Add support for marshaling XObjects with their defaults, and tool for walking the context to find objects
- Fix creation of no-nil interface to nil structs in context
- Make it easier to get current expression context of a waiting session
- Allow webhook calls with GET method to have bodies
- Include parent result references in flow inspection
- Add support for jitter in webhook retries
- Make http retrying available to all services which use HTTP
- Fix parsing out relative date value during migration of date tests
- Perform URL validation in call_webhook and skip action appropriately
- Loosen email regex used by has_email test
- Allow cloning of JSON flow definitions not tied to any spec version
- Render email_sent events in flowrunner
- Allow flowmigrate to take a target version argument
- Implement 13.1 migration as adding UUID to semd_msg.templating
- Implement email as a service
- Fix re-evaluating dynamic groups when query references non-existent field
- Add @globals to completion
- Add topic to send_msg actions
- Validate run summary JSON passed to flow action triggers
- Expose keyword match on trigger in context
- Give services their own HTTP clients
- Allow webhook service to take a map of deafult header values
- Add globals to evaluation context as @globals
- Add global as new asset type
- DTOne client should record http log for timeouts
- Fix migrating save actions with URN fields
- Tweak criteria for deciding whether to try reading a flow as legacy
- Fix docstring for UPPER()
- Rework ReadFlow to accept legacy flows too
- Move legacy package inside flows/definition
- Update start_session action to use escaping when evaluating the contact query
- Add support for escaping expressions in templates
- Relax requirement for field assets to have UUID set since engine doesn't use this
- Fix naming in mobile bindings
- Fix docstring for UPPER()
- NewEnvironmentBuilder() -> envs.NewBuilder() to match engine.NewBuilder()
- Include classifiers in flow dependency inspection
- Add classification service for Bothub
- Record arrays of http logs on classifier_called and airtime_transferred events
- Modify grammar to allow result names that start with underscores
- All service factory methods should return an error if service can't be returned
- Rework airtime transfer nodes to function more like NLU nodes
- Add classification service implementation for LUIS
- Add NLU support: a classify action, a classification service and various router tests
- Revert change to operands for media waits
- Fix migrating operands on rulesets waiting for media
- Change autocompletion type of related_run.results to any since we can't autocomplete it
- Fix migration of localization when flow has unused base translations
- Have a single HTTPClient on the engine instead of every service having its own
- Fix formatting runsummary with missing flow
- Add contact_query field to start_session actions
- Rework services so they take a session and resolve to a provider that does the work
- Rework webhook calling code as a service and fix not saving result when connection errors
- Include sender and recipient in airtime events
- Add .Source() to SessionAssets interface
- Unexport things that no longer need to be exported now that we've ditched extensions, clean up names of typed things
- Remove transferto extension functionality and instead have standard transfer_airtime action which defers to an airtime service
- completions.json should include section for session-less contexts
- Add FlowReference to FlowRun interface and add some more tests
- Renamed errored statuses to failed, replace fatal error events with failure events
- Allow loading of runs with missing flows
- A terminal enter_flow action should leave existing runs as completed instead of interrupted
- Make documented item titles into actual links so it's easier to get the link of a particular item in the docs
- Add UUID to assets.Field
- Fix parsing context references like foo.0
- ContactSQL query parsing should error if URN schenme used when URN redaction is enabled, and validate fields
- urn_parts should error for non-URNs and so Wrap migrated urn_parts expressions with default to catch errors
- Migrate non-tel URN types using urn_parts(..).path
- Redacted URNs should still have scheme, and format_urn should work for redacted URNs
- Set redaction policy in visitor constructor for contactql
- Fix parsing of implicit conditions in contactql
- Add UUID() to Session interface
- Make trigger.params null for trigger types that don't use it, non-null for those that do
- Add UUID field to sessions
- Rework trigger.params to be an XObject and always non-null in expressions
- Implement a week_number function which matches Excel's WEEKNUM
- rename voice trigger to be more consistent
- add ivr flow trigger constructor
- Allow array lookups like foo.0
- More re-organization of utils code into smaller packages
- Move Environment type and environment based date parsing to new envs package
- Move Date and TimeOfDay types to new dates package
- Do template and dependency enumeration by reflection
- Drop current template rewriting functionality which isn't used and can't be used with migrations
- Generate context map from docstrings
- Add SetURN function to Msg
- Fix localization UUID in test action holder flow
- Update send_email action to allow localization of subject and body
- Reorganize docgen code to make it easier to add new doc outputs
- Allow setting channel on a non-tel URN if it doesn't have a channel
- Deprecate parent.run and child.run in the context and move those fields up one level
- Tweak to goflow interfaces to allow introspection into contactql
- Include external ID of msg on input expression context
- Fix start_session when create_contact is true
- Fix index out of bounds panic when transation for item exists but has less strings than original
- Fix format excellent function when passed a nil
- Fix parsing of 12AM and 12PM times
- parse_json should error for invalid JSON
- Switch to faster json.Valid for checking JSON validity
- Add foreach_value function to allow us to keep legacy webhook payloads the same
- Make @results and @run.results the same
- NOOP if there are no rceipients for start_session and send_broadcast
- Update send_broadcast and start_session to accept a URN in legacy_vars
- Use std lib function to check HTTP headers
- Remapping UUIDs during cloning must include UUIDs which are values in arrays
- has_group can take optional second parameter which is group name.. used only in dependency inspection
- Fix cloning of UI sections
- Check that numbers are actually valid in our has_phone test
- Handle missing ruleset types in legacy flows
- handle no media type in our migration
- Include node UUIDs in result infos returned from flow inspection
- Legacy flow migration should just ignore invalid actionset/rule destinations
- Drop includeUI as an option for flow migration and just always include it
- Re-organize test utils so they're all in the test package
- Add FixedUUID4Generator for testing
- Make recursion optional again during flow validation
- Add temporary Flow.MarshalWithInfo to aid with moving mailroom to new endpoint
- Split up flow inspection and dependency validation and don't embed inspection results in the flow definition
- Add support for cloning flows using generic JSON representations
- Handle malformed single message campaign event flows
- Fix IsLegacyDefinition
- (Re)allow inspecting without session assets
- Allow igoring of missing flow assets like any other asset type
- Simplify the expression used to emulate legacy webhook payloads
- Do structural validation in ReadFlow so flow returned from that is always valid
- Switch to new library for UUID generation
- Expose current flow spec version in mobile bindings
- Fix send_broadcast and start_session actions so telephone numbers are normalized
- properly return template dependencies for flows
- Rework creating and starting sessions so sessions no longer exist in limbo state between the two
- Add @webhook as shortcut to .extra of last webhook result
- Make URLJoin honor absolute urls
- Omit empty variables in message templates
- Router failing to pick category should be fatal error event - not hard error
- Match number like .5 and 1OO (o's) as 1)
- Don't include quick replies and attachments whih both error and evaluate to empty
- fix text_slice for unicode strings
- @fields defaults to table like @results
- Add default values to @run, @parent, @parent.run, @child, @child.run
- Add TemplateIncluder to ease inclusion of templates as strings, slices or maps
- Remove left() and right(), replace with text_slice()
- Re-add defaults for several context objects
- Validate that switch case tests are registered XTESTs
- Allow passing count of replacements to replace()
- Allow empty results, fix empty category caltulations
- accept text/javascript as a content type in webhooks
- better error message for not being able to resume
- Bump current flow spec version to 13
- Migrate date_ tests to set delta value in UI config
- is_text_eq -> has_only_text
- @child and @parent should mirror root of context, not @run
- Add format_results and migrate @flow to @(format_results(results))
- Add type-aware format() function
- dict/keys -> object/properties
- Split length() into count() and text_length()
- Support != operator in contact queries
- Extract operators into their own functions which can then be documented and have live examples
- Ingore broken recording dicts on legacy say actions
- Add is_error as a regular function and has_error as a router case test
- Fix JSONing time values
- Expressions refactor
- Ignore errors migrating legacy expressions
- Regexes for migrating context references
- Ignore empty webhook headers during flow migration and validate that header namews are valid during validation
- ReadFlow should maintain UI.. but as raw JSON
- Flowrunner improvements
- Fix routing after a timeout
- Ensure an error from a resume is logged to the run
- Fix auditing context refs like foo.0
- Add NewActivatedMsgWait
- Simplify resuming sessions so we only look at the wait on the actual node
- Use relative timeout value in activated wait and msg_wait event
- Add category_uuid to timeouts on waits, migrate legacy timeout rules to that
- Operand of group split should be @contact.groups
- Migrate a ruleset of type contact_field that splits on @contact.groups to an expression split
- Add hint to msg_wait event, move waits into router package
- Update engine to look for wait on router instead of node
- Convert almost all complex types to be represented in expressions as simple XDicts
- Add functional programming basics
- Add template assets to goflow
- Add check to call_resthook that payload is valid JSON
- CallResthookAction should error if it can't evaluiate the payload template
- Resthook payload should still be valid when contact URN can't be formatted
- Generate better error message when resthook payload is not valid JSON
- Better error message when marshalling a run
- Use dict() function to simplify default webhook payload
- Convert @contact.groups to be only excellent primitives
- Add extract and dict as excellent functions
- Add @fields as top-level shortcut to contact fields as map
- Add @urns as dict of highest-priority URN by scheme
- Make location parsing more forgiving
- Bug fix: switch router should use category from first matching rule
- Stringify maps with {...} and arrays with [...]
- Record exit UUIDs coming from waits in validated flow definition
- Match characters intended to be combined with another character to support Thai, Bengali and Burmese properly
- Extract and save result categories during validation
- Add validation that node has > 0 exits, routers have > 0 categories, and categories have an exit
- Don't try to validate a subflow which is missing
- Fix HasDate tests to compare dates in env timezone
- Return missing assets from SessionAssets.Validate
- Replace runtime loop detection with an engine limit on steps per sprint (default 100)
- Don't trim whitespace on input to has_pattern test
- Fix migration of the @step.attacthments array in legacy expressions
- Merge result infos by key so caller doesn't have to know how to do that
- Fix migration of datetime + time in legacy expressions
- Fix migration of legacy flows that don't have entry set
- Change random router to return raw random value as result value
- Return results as list of name/key objects during flow validation
- Order nodes by y during flow migration
- Convert attachment URLs to absolute during flow migration
- Migrate name only legacy label and group references
- Add more tests for has_pattern
- Fix tests
- Flow name shouldn't be required (matches any other asset type)
- Use presence of flow_type to determine if flow is in legacy format and handle legacy flows with missing metadata section
- Allow flow validation without assets
- Store a map of result keys to result names in a validated flow definition
- call_resthook action should generate result even if there are no subscribers
- If a resthook call returns a success and a 410, use the success as the result
- Validating flow should add dependencies and result_names to definition
- Rework flow validation so dependency checking happens centrally and not in each action
- Add util methods for enumerating and rewriting templats in group and label references
- Allow conversion of numbers to times
- Migrate datetime+time to a minutes addition expression
- Add tools.RefactorTemplate and tools.FindContextRefsInTemplate
- Fix title to work with text which is uppercase
- Change implementation of remove_first_word so that punctuation is preserved
- Anything + TIME should migrate to replace_time(..)
- Fix migration of datevalue+time
- length(nil) == 0
- Arrays should stringify as CSV
- Maps should stringify as new line separated key: value pairs
- Wrap results of date arithmetic in format_date
- Fix calling length on a complex object that needs to be reduced
- Fix migration of DAYS()
- add accessor for msg in MsgResume
- DATEVALUE should migrate to date() so it returns a date rather than a datetime
- Add date() conversion function
- Change datetime_from_parts to date_from_parts
- fix resolving @parent or @child when they are nil
- Add utils.Date and types.XDate
- Don't localize fields not localized in legacy engine
- Rework time parsing to accept hour only and more ISO8601 formats
- allow single tls renegotiation
- Allow looping back into a flow that wasn't started in this sprint
- Rename from_epoch to datetime_from_epoch
- Add time functions and has_time router test
- Remove support for .0 indexing in excellent
- Remove gomobile dependency
- Don't treat identifiers as special case, parse them like all other expressions
- When migrating expressions like flow.2factor, wrap non-name keys in ["..."]
- Add better flow spec version handling and ability to peek at definitions to determin if they are legacy
- Don't fake an ignored response body but record it in the event as ignored
- If a webhook call doesn't return a content-type header, try to detect type
- Verify parsed numbers in has_phone are valid
- update contact PreferredChannel and PreferredURN to resolve first sendable destination
- add country to mobile.NewEnvironment
- move NewSession and ReadSession into Engine
- engine.EngineBuilder -> engine.Builder because gofmt doesn't like stuttering
- remove webhook mocking and reading engine coonfig from JSON
- Fix migration of weekday() to add 1
- Add resthook_called event
- simplify reading environments from JSON
- rename .Environment() to .Build()
- Add max_value_length to environment and apply in name and field change modifiers
- Add type to sessions (the type of the flow it was triggered with)
- Update modifier loading so missing assets are reported
- Remove logrus logging
- Rework all session objects to record missing assets
- Ensure error events are logged to sprint as well as run
- Include status code in webhook events
- Fix renderEventDoc to properly render JSON in markdown
- Add full constructor for sprint
- Remove flow server components which are no longer used
- Simpler trigger constructors
- Fix unmarshalling legacy say actions
- New IVR events
- Fix time-filling bug
- Convert to go module to be used as library
- Migrate api actions so that URL expressions are wrapped in url_encode()
- Don't url encode msg attachment expressions automatically
- Fix not being to read contact_field_changed events where value is null
- Add default country to environment and use for has_phone tests
- Fix add_contact_urn so that URN is normalized and trimmed before being added
- Fix legacy_extra so it can handle root-level arrays
- Replace contact_urn_added event with contact_urns_changed and fix tracking of channel affinity on URNs
- Fix not supporting dymnamic groups based on name
- Change send_msg to always send a message even if it can't resolve channel/URN
- Fix 410 resthook response becoming result with no category
- Switch to codecov
- Validate all flows which are referenced in the current flow
- Use new status of subscriber_gone when resthook call returns 410
- Require exit UUIds to be unique across the entire flow
- Improve number parsing
- Move input from run to session
- Make contact.name .language .timezone omitted in JSON when empty
- Make contact.created_on required
- Simplify un/marshaling of typed objects
- Allow waits to skip themselves, and have the msg wait skip itself if it's the first thing after a msg trigger
- Improve flowrunner cmd to display more event types
- Add new terminal option to start_flow actions
- Ensure arguments to date router tests are migrated
- Create new static asset source type for simpler testing
- Add channel event trigger type
- Rework transferto action to generate result like a webhook call
- Add results from run summary on flow_action triggers to @legacy_extra
- Fix migration of @flow by itself
- Fix migration of calls to HOUR(...)
- Support formatting/parsing of decimal values with configurable digit separators
- Re-evaluate and correct contact groups at the start/resume of a session
- Add run.modified_on
- Change sigature of ReevaluateDynamicGroups to not require a session
- Fix language selection for flow localization
- Fix run expirations
- Rename webhook_called.time_taken -> elapsed_ms
- Replace caller events with resumes
- Record time taken in webhook_called events
- Only generate a contact_field_changed event if a value has actually changed
- Fix blowing up when contact doesn't have a value for a contact field
- Add missing regex_match func and migration of string literals in legacy flows
- Allow contacts to be loaded in a mode that ignores missing groups or fields
- Disallow creating contacts with empty field values
- Generate a JSON listing of functions
- Cleanup field value code so that we no longer need empty values
- Fix group reevaluation when contact has no value for a text field
- Cleanup function docstrings and fix from_epoch
- Use default value for router on migrated webhook ruleset in case resthook didn't have any subscribers
- Add resthook slug to webhook_called events if it exists
- Generate a groups changed event when dynamic groups are re-evaluated
- Contact field changed events should have the entire value objects
- Non-caller events should only ever be added to runs and not applied
- Merged contact_groups_add/removed into contact_groups_changed
- Only generate events when state has actually changed
- Move event functiionality into the actions that generate them
- Use result name when populating @legacy_extra instead of just .webhook
- Remove Connection Error as a separate exit for webhook routers
- call_webhook and call_resthook now save a result and run.Webhook is removed
- @input and @results as shortcuts to @run.input and @run.results
- Router tests can now return extra to be added to the result
- Remove "Connection Error" as a separate exit for webhook routers
- call_webhook and call_resthook now save a result and run.Webhook is removed
- @input and @results as shortcuts to @run.input and @run.results
- Router tests can now return extra to be added to the result
- Adds @legacy_extra to context to mimic @extra in legacy flows
- Fix determining whether asset serversource supports a particular type
- Fix parsing of numbers when string contains uppercase letters
- Fill in current time when parsing dates during tests
- Add ui config options for composed split migrations
- Great assets refactor
- Replicate channel matching logic from RP
- Don't strip URN params when parsing
- Migrate legacy webhook calls to POST if they don't have a method set
- Simplify string tokenization and add more tests
- Fix message attachment expressions not being URL encoded
- Fix parsing of locations
- Small refactor of how we migrate rules to cases/exits that fixes an ordering bug and add option to not collapse exits
- Fix sentry integration
- Fix FIELD() blowing up when using space as separator
- Documentation improvements and make language required in flow definition
- Add flow type and validate that actions only occur in supported flow types
- Fix scanner treating parentheses inside string literals as expression boundaries
- Fix not correctly scanning excellent identifiers followed by periods
- Add migrate tab to flowserver index page for easy flow migration testing
- Refactor assets functionality
- to_epoch() becomes epoch() and returns fractional seconds
- Improved docuentation
- Add Heroku deployment support
- Wrap multiple asset responses in a results object
- Update UI node type names
- Add all trigger types to docs so that we test parsing of the examples
- Add campaign as a trigger type
- Improve error messages when trigger can't be read due to asset load failure
- Migrate flows individually
- Rework assets so whether or not they are managed as sets is configured at the type level
- LocationHiearchy assets should be managed like a set like other asset types
- Migrate empty flows
- TransferTo airtime transfer action
- Simplify server handler methods and improve validation errors involving fields on composed types
- Dynamic type for actions, events, routers etc
- Make func names more consistent and implement same typing system for waits
- Tweak resthook_called events so the event itself has status=success for HTTP 410 responses
- Migrate ruleset_types to editor types in _ui
- Use a sequential time source for flow tests instead of replacing time values with placeholders
- Add call_resthook action type and migrate from legacy resthook rulesets
- Improve error message when switch router test function returns error
- Add support for making expressions evaluate to themselves on error
- Migrate "" escape sequences in string literals in legacy expressions to "
- Add support for \n " sequences in Excellent string literals
- Add format_date function which only takes date (non-time) formatting chars
- Fix encoding of contact name in webhook payloads
- Fix logging of panics to sentry
- Encode spaces as %20 in URL expressions
- Match legacy behavior for @contact
- Add proper migrations for when word_* functions have final by_spaces param, and also collapse decremented values if they are literals (e.g. 2- 1)
- Update word(), word_slice() and word_count() to take a final optional param called delimiters
- Don't throw validation error if add_input_labels or add_contact_groups has zero groups/labels
- Don't log 400 responses to sentry
- Migrate expressions in webhook header values
- Allow dynamic searches to query language and created_on
- Expose contact.created_on in expressions
- Migrate rulesets where there is an explicit Other category
- Fix @contact.id not being migrated in legacy flows
- Migrate @contact. expressions to @(format_urn(contact.urns.)) so there's no error if such a URN doesn't exist
- Fix not saving a result when router takes default exit
- Merge pull request #308 from nyaruka/mock_webhooks
- Add webhook mocks to engine config and check when making webhook calls if there is a matching mock
- Fix migration of @extra.flow in legacy expressions
- Fix mapping of @flow.contact in legacy expressions
- Don't log errors twice
- Add all_groups flag to remove_contact_groups action
- Add sentry for reporting errors
- Fix migrating legacy @flow.foo.text/time expressions
- Handle legacy flows where things which are supposed to be translation dicts aren't
- Expose flow.revision in context and webhook payloads
- Fix panic when field value is nil
- Implement redacting URNs
- Add numeric ID to contacts
- run.input.text should be optional
- Allow webhook calls to be mocked and add tests
- Don't blow up if legacy stickies have floating point positions
- Update CLEAN() to match legacy behaviour
- More fixes when evaluating migrated legacy template tests
- Drop requirement for input.uuid to be a valid UUIDv4 since it comes from msg.uuid which isn't always valid UUID4
- Improve parser error messages and add tests for error messages
- Update to latest gocommon which fixes tel URN which are shortcodes failing validation
- Empty/blank values should clear name/fields/language/timezone
- Split SetContactAProperty into new actions for name, language and timezone
- Improve error messages from struct validation
- Result input should be nullable if there is no input
- Timeout rule should use timeout as value
- Result input should be nullable if there is no input
- Fix HasWaitTimedOut test
- Waits should retain their timeout value
- Use fuzzy number parsing for tests, stricter for type conversion
- Migrate endpoint of flowserver can take include_ui param
- Add migration of notes
- Include contact name on migration of contact references
- Fix goreleasing from travis
- Migrate contact.groups to be a CSV list
- Support channels with UUIDs which aren't UUID4
- Migrate templates in legacy HasState and HasWard tests
- Fix migration of has_email tests
- Add JSON util functions for marshalling without HTML escaping
- Add support for searching for locations by path
- Router test docstring examples should always include use of .match
- Use left,top instead of x,y