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: Add collaborators.all #399

Merged
merged 3 commits into from
Nov 28, 2024
Merged

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

Copy link

Copy link
Contributor

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 :)

src/models/regional/collaborators.ts Outdated Show resolved Hide resolved
src/models/regional/collaborators.ts Outdated Show resolved Hide resolved
@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.

3 participants