Skip to content

Conversation

@baptmaury
Copy link
Contributor

@baptmaury baptmaury commented Nov 27, 2024

Add get /collaborators endpoint with Collaborators.all
Introduce ExtendedCollaborator interface

Done in pair with @TheoPouletSouchard

Used in https://github.com/Scalingo/dashboard-next/pull/1748

@notion-workspace
Copy link

Copy link
Contributor

@aurelien-reeves-scalingo aurelien-reeves-scalingo Nov 27, 2024

Choose a reason for hiding this comment

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

Would it be possible to use optional properties?

Also, could we craft the API endpoint for it to return the actual username and email of the registered user when the user has accepted the invite?

Thus, we would not need a new "extended" interface

export interface Collaborator {
  /** Id of the collaborator */
  id: string;
  /** Email of the collaborator to invite */
  email: string;
  /** Unique User ID of the user who accepted the collaboration */
  user_id: string;
  /** ID of the application owning the collaborator */
  app_id: string;
  /** Username of the person to invite */
  username: string;
  /** Status of the invitation */
  status: string;
  /** Name of the app */
  app_name?: string;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I already implemented it locally :)

@baptmaury baptmaury merged commit 1d9610a into master Nov 28, 2024
5 checks passed
@baptmaury baptmaury deleted the feat/iam/add-collaborators-all branch November 28, 2024 10:20
@baptmaury baptmaury changed the title [STORY-994] feat(iam): Add collaborators.all feat: Add collaborators.all Nov 28, 2024
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.

4 participants