Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add parsing of objects and array values (CV3-000) #700

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

zhihil
Copy link
Contributor

@zhihil zhihil commented Feb 21, 2024

Fixes or implements CV3-000

Brief description. What is this change?

Adds rudimentary support for passing object and array data into a function step. It achieves this by stringifying the object and array values in the runtime state before resolving diagram variables with this stringified value.

At the time of writing, function variable types have not been implemented.

Implementation details. How do you make this change?

Added serializeVariables() to serialize runtime variable state.

Called serializeVariables() before utils.replaceVariables() to ensure that objects are serialized as JSON, rather than "[Object object]"

Setup information

N/A

Deployment Notes

N/A

Related PRs

N/A

Checklist

  • Breaking changes have been communicated, including:
    • New required environment variables
    • Renaming of interfaces (API routes, request/response interface, etc)
  • New environment variables have been deployed
  • Appropriate tests have been written
    • Bug fixes are accompanied by an updated or new test
    • New features are accompanied by a new test

edison-vflow and others added 10 commits March 8, 2024 16:40
<!-- You can erase any parts of this template not applicable to your Pull Request. -->

### Brief description. What is this change?

* Add Mattel and Redventures private clouds to KB allowed list

### Checklist

- [x] Similar changes tested on other private clouds
small change to test the build process

Co-authored-by: Tyler Han <tylerhan97@gmail.com>
Testing across the following areas.

Works for KB base preview 
![Screenshot 2024-03-07 at 5 24 57 PM](https://github.com/voiceflow/general-runtime/assets/5643574/744eba1b-81c2-4e6a-9568-701d0f668d08)

Works for KB preview in step
![Screenshot 2024-03-07 at 5 27 15 PM](https://github.com/voiceflow/general-runtime/assets/5643574/20c8fd34-bef2-4a84-a29a-6b17553ff371)

Works for prototype KB step
![Screenshot 2024-03-07 at 5 28 00 PM](https://github.com/voiceflow/general-runtime/assets/5643574/5676d6a0-0444-49b0-8e91-26b184c04e24)

Works for KB Query API
<img width="856" alt="Screenshot 2024-03-07 at 5 31 56 PM" src="https://github.com/voiceflow/general-runtime/assets/5643574/cb2f7aec-11d1-423c-a898-2068ffad3cc4">

KB No Match Fallback With KB
<img width="856" alt="Screenshot 2024-03-07 at 5 31 56 PM" src="https://github.com/voiceflow/general-runtime/assets/5643574/d4987677-9bf0-480b-a77f-0985a35a7c10">
KB No Match Fallback Without KB
![Screenshot 2024-03-07 at 5 54 17 PM](https://github.com/voiceflow/general-runtime/assets/5643574/25097d0a-6c1e-4722-89b1-0b7ad0776170)
![Screenshot 2024-03-07 at 5 54 26 PM](https://github.com/voiceflow/general-runtime/assets/5643574/e058af6b-5501-4edf-90aa-fe294e2fea76)

Fetching Version Publishing
![Screenshot 2024-03-07 at 5 55 58 PM](https://github.com/voiceflow/general-runtime/assets/5643574/5d3e0141-77fc-4655-ad8e-59f868da36d2)



Co-authored-by: Tyler Han <tylerhan97@gmail.com>
Co-authored-by: Tyler Stewart <tyler.stewart@voiceflow.com>
Co-authored-by: Tyler Stewart <git@tylerstewart.ca>
Co-authored-by: edison-voiceflow <edison.mukadah@voiceflow.com>
Carousel/card buttons created from a function can only open URLs, and should not send a request to the runtime. If a request is sent, we ensure it is of type `action`, so we do not execute the runtime.

See: #678

Co-authored-by: Tyler Stewart <git@tylerstewart.ca>
Copy link

sonarcloud bot commented Mar 8, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants