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

support for subscriber creation in trigger function #61

Open
wants to merge 22 commits into
base: alpha
Choose a base branch
from

Conversation

VeldaKiara
Copy link
Contributor

Updated:

  • the EventDto with RecipientsDto which contains "to": { "subscriberId": "string", "email": "string", "firstName": "string", "lastName": "string", "phone": "string", "avatar": "string", "locale": "string", "data": {} },
  • the Event API to get the transmissions.
  • test cases to accommodate the changes.

@VeldaKiara VeldaKiara changed the title support for subscriber creation in trigger function #41 support for subscriber creation in trigger function Sep 19, 2023
@VeldaKiara
Copy link
Contributor Author

I have an issue with this line:
novu/api/event.py:103: error: Argument 1 to "append" of "list" has incompatible type "Dict[str, Union[Dict[Any, Any], str,
RecipientDto, None]]"; expected "Dict[str, Union[str, List[str], Dict[Any, Any]]]" [arg-type]

Could I get some feedback on this? What might have I missed.

@ryshu ryshu changed the base branch from main to alpha October 4, 2023 20:53
@unicodeveloper
Copy link
Contributor

@ryshu can you please guide on the next steps here?

@ryshu
Copy link
Collaborator

ryshu commented Oct 6, 2023

@ryshu can you please guide on the next steps here?

Hi @unicodeveloper,

I'm sorry but here I don't know how we can proceed. You might need to do it by another meen because we are trying to put too much functionnality on the same prototype.

@nils-van-zuijlen @Cliftonz any Idea ?

@ryshu ryshu force-pushed the alpha branch 2 times, most recently from 54128b9 to 4be382a Compare October 16, 2023 11:37
Copy link
Collaborator

@nils-van-zuijlen nils-van-zuijlen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The typing error gets raised because the type of InputEventDto.recipients changed from Union[str, List[str]] to RecipientDto.

If the serialization works properly, you only need to change the types at novu/api/event.py:93 to have mypy be happy.

If serialization is buggy, you may need to tweak it, and change type annotations too.

novu/dto/event.py Outdated Show resolved Hide resolved
novu/dto/event.py Show resolved Hide resolved
@VeldaKiara
Copy link
Contributor Author

VeldaKiara commented Oct 27, 2023 via email

@ryshu
Copy link
Collaborator

ryshu commented Oct 27, 2023

Hi @VeldaKiara,

No, no worries. This is an error at the moment. It was github which automatically deleted it because the ALPHA branch was deleted.

I'm correcting that.

@ryshu ryshu reopened this Oct 27, 2023
@VeldaKiara
Copy link
Contributor Author

Okay, thanks @ryshu

@Cliftonz Cliftonz self-requested a review November 23, 2023 21:37
novu/api/event.py Outdated Show resolved Hide resolved
@VeldaKiara
Copy link
Contributor Author

I have updated the code as per the changes requested and made modifications to the tests too

@ryshu ryshu self-requested a review January 17, 2024 22:47
@unicodeveloper
Copy link
Contributor

@ryshu @VeldaKiara any reason why these tests are failing?

@VeldaKiara
Copy link
Contributor Author

@ryshu @VeldaKiara any reason why these tests are failing?

I completely missed this notification.
Let me check on this.

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.

5 participants