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(mapping): endpoint api #360

Merged
merged 11 commits into from
Feb 16, 2022
Merged

feat(mapping): endpoint api #360

merged 11 commits into from
Feb 16, 2022

Conversation

samuelmasse
Copy link
Contributor

@samuelmasse samuelmasse commented Feb 14, 2022

Adds two new routes that make up the "endpoint" API. One route /endpoints/map to get a conversationId from an endpoint, and the route /endpoints/conversation/:conversationId to list the endpoints associated to a conversation (since a conversation can be present on more than one channel)

TODO: add documentation

Closes DEV-2339

@linear
Copy link

linear bot commented Feb 14, 2022

DEV-2339 Endpoint API

@samuelmasse samuelmasse marked this pull request as draft February 14, 2022 23:02
@samuelmasse samuelmasse marked this pull request as ready for review February 16, 2022 18:36
@samuelmasse samuelmasse changed the title feat(mapping): mapping api feat(mapping): endpoint api Feb 16, 2022
describe('Map', () => {
const endpoint = { channel: { name: 'telegram', version: '1.0.0' }, identity: '*', sender: 'yoyo', thread: 'ya' }
let convoId: string | undefined

Copy link
Contributor

Choose a reason for hiding this comment

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

Add those scenarios:

  • Calling listEndpoints when no mapping was created should return a 404 or empty array.
  • Try creating an endpoint mapping with an invalid channel.
  • Try creating an endpoint mapping with empty identity, sender, and thread.

@samuelmasse samuelmasse merged commit b94d3e5 into master Feb 16, 2022
@samuelmasse samuelmasse deleted the sm-endpoint-api branch February 16, 2022 20:12
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

2 participants