-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix(interactions): align type names and use named params #12406
fix(interactions): align type names and use named params #12406
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
completion?: InteractionsResponse | ||
) => void; | ||
|
||
export type InteractionsResponse = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we still need this type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kept the V5 types as it is in Interactions.ts
. just added wrapper interfaces for these to avoid too much change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lexV1 / V2 provider classes still use these types
Description of changes
API, types change
send
,onComplete
APIs named params (lexV1 and V2)SendInput
,SendOutput
,OnCompleteInput
(naming format<ApiName>Input
/<ApiName>Output
) for lexV1 and V2Folder structure
input.ts
andoutput.ts
files for exposing above mentioned types for APIs (lexV1 and V2)Description of how you validated changes
Exported items
(Before)
![Screenshot 2023-10-24 at 9 10 06 AM](https://private-user-images.githubusercontent.com/22762119/277731020-921085fc-f8b2-4fa2-af62-686ca6ca15cf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE5MjY4MTQsIm5iZiI6MTcyMTkyNjUxNCwicGF0aCI6Ii8yMjc2MjExOS8yNzc3MzEwMjAtOTIxMDg1ZmMtZjhiMi00ZmEyLWFmNjItNjg2Y2E2Y2ExNWNmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI1VDE2NTUxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTViNWFmNDZjY2Y1MmIyYjljN2Y0NzExOTJjYThlMDE4MmQwM2Y1ZDlhMGM5YWJkMzJlYTgyNzJmMzMyMDE3YzUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.GPbeVigB2Her3IJX-Ki8cnoM0mmvwW7vHnHRwq189Y8)
(After)
![Screenshot 2023-10-23 at 5 52 27 PM](https://private-user-images.githubusercontent.com/22762119/277515466-0775ea8b-87ed-4380-84c3-c4ee5b86ae93.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE5MjY4MTQsIm5iZiI6MTcyMTkyNjUxNCwicGF0aCI6Ii8yMjc2MjExOS8yNzc1MTU0NjYtMDc3NWVhOGItODdlZC00MzgwLTg0YzMtYzRlZTViODZhZTkzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI1VDE2NTUxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc2YjY1ZmRhMGY0NTY2Zjc2NmFjNjBkZWM1ZGZiNTljNmRhY2Y3MmY3MzI1MDdiMWQyNmY4ODRhNTk1NTljMWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.R7pD512gJMKd6hHW3SfYhhS10hIPcu5FmxXmY_pzcwI)
DX
(Before: positional params)
![Screenshot 2023-10-24 at 9 01 51 AM](https://private-user-images.githubusercontent.com/22762119/277727390-780a8a4f-d6fe-4ece-a915-2b83c2e57ae6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE5MjY4MTQsIm5iZiI6MTcyMTkyNjUxNCwicGF0aCI6Ii8yMjc2MjExOS8yNzc3MjczOTAtNzgwYThhNGYtZDZmZS00ZWNlLWE5MTUtMmI4M2MyZTU3YWU2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI1VDE2NTUxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM2NDkwNmM2MDM3OWExNzJjYjU0OTcwYWUwMmFkMDcxODRiZDU2YWMzNWE2ZGI4NTU0ZjIyMTM0MTQ4OWQzZGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.K1xo4bpN71Bz6HBJ4-MPI3IDfH8_m3m-zTVDPfd_CT8)
(After: named params)
![Screenshot 2023-10-24 at 9 00 14 AM](https://private-user-images.githubusercontent.com/22762119/277726956-34f57937-dcb9-4532-b4fe-0dc4289a2dc6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE5MjY4MTQsIm5iZiI6MTcyMTkyNjUxNCwicGF0aCI6Ii8yMjc2MjExOS8yNzc3MjY5NTYtMzRmNTc5MzctZGNiOS00NTMyLWI0ZmUtMGRjNDI4OWEyZGM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI1VDE2NTUxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZiZTE2NjU1MDIzYzk1OWQ1YmVjOGU2YTczODk0NzFlMzY2YzE1MmFlNzkyZTdhM2JhMzZjNTEwM2I5MGNlODEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.--PFG9u8Wc-1gxzKUou9eZTC850xI8ZlStIEqTyTNoc)
Tested Unit test, Integ test
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.