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

fix(interactions): align type names and use named params #12406

Merged

Conversation

ashwinkumar6
Copy link
Contributor

@ashwinkumar6 ashwinkumar6 commented Oct 24, 2023

Description of changes

API, types change

  • Make send, onComplete APIs named params (lexV1 and V2)
    • update unit tests for same
  • Expose types SendInput, SendOutput, OnCompleteInput (naming format <ApiName>Input / <ApiName>Output) for lexV1 and V2

Folder structure

  • Add input.ts and output.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

  • (After)
    Screenshot 2023-10-23 at 5 52 27 PM

DX

  • (Before: positional params)
    Screenshot 2023-10-24 at 9 01 51 AM

  • (After: named params)
    Screenshot 2023-10-24 at 9 00 14 AM

  • Tested Unit test, Integ test

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ashwinkumar6 ashwinkumar6 requested a review from a team as a code owner October 24, 2023 00:50
jimblanc
jimblanc previously approved these changes Oct 25, 2023
Copy link
Contributor

@jimblanc jimblanc left a 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 = {
Copy link
Member

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?

Copy link
Contributor Author

@ashwinkumar6 ashwinkumar6 Oct 25, 2023

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

Copy link
Contributor Author

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

5d
5d previously approved these changes Oct 25, 2023
@israx israx dismissed stale reviews from 5d and jimblanc via 60fbffc October 25, 2023 17:42
@ashwinkumar6 ashwinkumar6 merged commit dc4b91f into aws-amplify:next/main Oct 26, 2023
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants