-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add methods about invitations in auth-server in Litmus (#29)
* feat: add invite Client (#7) Signed-off-by: 잉퓨 <[email protected]> * test: add invite Client Test (#7) Signed-off-by: 잉퓨 <[email protected]> * docs: add invite Client Docs (#7) Signed-off-by: 잉퓨 <[email protected]> * fix: remove Project (#4) Signed-off-by: 잉퓨 <[email protected]> * fix: update Builder pattern (#4) Signed-off-by: 잉퓨 <[email protected]> --------- Signed-off-by: 잉퓨 <[email protected]>
- Loading branch information
Showing
12 changed files
with
833 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
|
||
# Invitation Request | ||
|
||
```mermaid | ||
classDiagram | ||
class AcceptInvitationRequest { | ||
-String projectId | ||
-String userId | ||
+AcceptInvitationRequest(String projectId, String userId) | ||
} | ||
``` | ||
```mermaid | ||
classDiagram | ||
class DeclineInvitationRequest { | ||
-String projectId | ||
-String userId | ||
+DeclineInvitationRequest(String projectId, String userId) | ||
} | ||
``` | ||
```mermaid | ||
classDiagram | ||
class InviteUsersRequest { | ||
-String projectId | ||
-String userId | ||
+InviteUsersRequest(String projectId, String userId) | ||
} | ||
``` | ||
```mermaid | ||
classDiagram | ||
class ListInvitationRequest { | ||
-String projectId | ||
-String userId | ||
+ListInvitationRequest(String projectId, String userId) | ||
} | ||
``` | ||
```mermaid | ||
classDiagram | ||
class RemoveInvitationRequest { | ||
-String projectId | ||
-String userId | ||
+RemoveInvitationRequest(String projectId, String userId) | ||
} | ||
``` | ||
```mermaid | ||
classDiagram | ||
class SendInvitationRequest { | ||
-String projectId | ||
-String userId | ||
-String role | ||
+SendInvitationRequest(String projectId, String userId, String role) | ||
} | ||
``` | ||
|
||
# Invitation Response | ||
```mermaid | ||
classDiagram | ||
class InviteUsersResponse { | ||
-long updatedAt | ||
-long createdAt | ||
-UserInfo createdBy | ||
-UserInfo updatedBy | ||
-boolean isRemoved | ||
-String userID | ||
-String username | ||
-String salt | ||
-String email | ||
-String name | ||
-String role | ||
-boolean isInitialLogin | ||
+InviteUsersResponse(long updatedAt, long createdAt, UserInfo createdBy, UserInfo updatedBy, boolean isRemoved, String userID, String username, String salt, String email, String name, String role, boolean isInitialLogin) | ||
} | ||
class UserInfo { | ||
-String userID | ||
-String username | ||
-String email | ||
+UserInfo(String userID, String username, String email) | ||
} | ||
InviteUsersResponse --> UserInfo | ||
``` | ||
```mermaid | ||
classDiagram | ||
class ListInvitationResponse { | ||
-String projectID | ||
-String projectName | ||
-ProjectUser projectOwner | ||
-String invitationRole | ||
+ListInvitationResponse(String projectID, String projectName, ProjectUser projectOwner, String invitationRole) | ||
} | ||
class ProjectUser { | ||
-String userID | ||
-String username | ||
-String email | ||
-String name | ||
-String role | ||
-String invitation | ||
-long joinedAt | ||
+ProjectUser(String userID, String username, String email, String name, String role, String invitation, long joinedAt) | ||
} | ||
ListInvitationResponse --> ProjectUser | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/main/java/io/litmuschaos/request/AcceptInvitationRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package io.litmuschaos.request; | ||
|
||
import io.litmuschaos.util.Builder; | ||
|
||
public class AcceptInvitationRequest { | ||
|
||
private final String projectId; | ||
private final String userId; | ||
|
||
private AcceptInvitationRequest(AcceptInvitationRequestBuilder builder) { | ||
this.projectId = builder.projectId; | ||
this.userId = builder.userId; | ||
} | ||
|
||
public static AcceptInvitationRequestBuilder builder() { | ||
return new AcceptInvitationRequestBuilder(); | ||
} | ||
|
||
public static class AcceptInvitationRequestBuilder implements Builder<AcceptInvitationRequest> { | ||
private String projectId; | ||
private String userId; | ||
|
||
public AcceptInvitationRequestBuilder projectId(String projectId) { | ||
this.projectId = projectId; | ||
return this; | ||
} | ||
|
||
public AcceptInvitationRequestBuilder userId(String userId) { | ||
this.userId = userId; | ||
return this; | ||
} | ||
|
||
@Override | ||
public AcceptInvitationRequest build() { | ||
return new AcceptInvitationRequest(this); | ||
} | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
src/main/java/io/litmuschaos/request/DeclineInvitationRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package io.litmuschaos.request; | ||
|
||
import io.litmuschaos.util.Builder; | ||
|
||
public class DeclineInvitationRequest { | ||
|
||
private final String projectId; | ||
private final String userId; | ||
|
||
private DeclineInvitationRequest(DeclineInvitationRequestBuilder builder) { | ||
this.projectId = builder.projectId; | ||
this.userId = builder.userId; | ||
} | ||
|
||
public static DeclineInvitationRequestBuilder builder() { | ||
return new DeclineInvitationRequestBuilder(); | ||
} | ||
|
||
public static class DeclineInvitationRequestBuilder implements Builder<DeclineInvitationRequest> { | ||
private String projectId; | ||
private String userId; | ||
|
||
public DeclineInvitationRequestBuilder projectId(String projectId) { | ||
this.projectId = projectId; | ||
return this; | ||
} | ||
|
||
public DeclineInvitationRequestBuilder userId(String userId) { | ||
this.userId = userId; | ||
return this; | ||
} | ||
|
||
@Override | ||
public DeclineInvitationRequest build() { | ||
return new DeclineInvitationRequest(this); | ||
} | ||
} | ||
|
||
} |
47 changes: 47 additions & 0 deletions
47
src/main/java/io/litmuschaos/request/InviteUsersRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package io.litmuschaos.request; | ||
|
||
import io.litmuschaos.util.Builder; | ||
|
||
public class InviteUsersRequest { | ||
|
||
private final String projectId; | ||
private final String userId; | ||
|
||
private InviteUsersRequest(InviteUsersRequestBuilder builder) { | ||
this.projectId = builder.projectId; | ||
this.userId = builder.userId; | ||
} | ||
|
||
public String getProjectId() { | ||
return projectId; | ||
} | ||
|
||
public String getUserId() { | ||
return userId; | ||
} | ||
|
||
public static InviteUsersRequestBuilder builder() { | ||
return new InviteUsersRequestBuilder(); | ||
} | ||
|
||
public static class InviteUsersRequestBuilder implements Builder<InviteUsersRequest> { | ||
|
||
private String projectId; | ||
private String userId; | ||
|
||
public InviteUsersRequestBuilder projectId(String projectId) { | ||
this.projectId = projectId; | ||
return this; | ||
} | ||
|
||
public InviteUsersRequestBuilder userId(String userId) { | ||
this.userId = userId; | ||
return this; | ||
} | ||
|
||
@Override | ||
public InviteUsersRequest build() { | ||
return new InviteUsersRequest(this); | ||
} | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
src/main/java/io/litmuschaos/request/ListInvitationRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package io.litmuschaos.request; | ||
|
||
import io.litmuschaos.util.Builder; | ||
|
||
public class ListInvitationRequest { | ||
|
||
private final String projectId; | ||
private final String userId; | ||
|
||
private ListInvitationRequest(ListInvitationRequestBuilder builder) { | ||
this.projectId = builder.projectId; | ||
this.userId = builder.userId; | ||
} | ||
|
||
public String getProjectId() { | ||
return projectId; | ||
} | ||
|
||
public String getUserId() { | ||
return userId; | ||
} | ||
|
||
public static ListInvitationRequestBuilder builder() { | ||
return new ListInvitationRequestBuilder(); | ||
} | ||
|
||
public static class ListInvitationRequestBuilder implements Builder<ListInvitationRequest> { | ||
private String projectId; | ||
private String userId; | ||
|
||
public ListInvitationRequestBuilder projectId(String projectId) { | ||
this.projectId = projectId; | ||
return this; | ||
} | ||
|
||
public ListInvitationRequestBuilder userId(String userId) { | ||
this.userId = userId; | ||
return this; | ||
} | ||
|
||
@Override | ||
public ListInvitationRequest build() { | ||
return new ListInvitationRequest(this); | ||
} | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
src/main/java/io/litmuschaos/request/RemoveInvitationRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package io.litmuschaos.request; | ||
|
||
import io.litmuschaos.util.Builder; | ||
|
||
public class RemoveInvitationRequest { | ||
|
||
private final String projectId; | ||
private final String userId; | ||
|
||
private RemoveInvitationRequest(RemoveInvitationRequestBuilder builder) { | ||
this.projectId = builder.projectId; | ||
this.userId = builder.userId; | ||
} | ||
|
||
public String getProjectId() { | ||
return projectId; | ||
} | ||
|
||
public String getUserId() { | ||
return userId; | ||
} | ||
|
||
public static RemoveInvitationRequestBuilder builder() { | ||
return new RemoveInvitationRequestBuilder(); | ||
} | ||
|
||
public static class RemoveInvitationRequestBuilder implements Builder<RemoveInvitationRequest> { | ||
private String projectId; | ||
private String userId; | ||
|
||
public RemoveInvitationRequestBuilder projectId(String projectId) { | ||
this.projectId = projectId; | ||
return this; | ||
} | ||
|
||
public RemoveInvitationRequestBuilder userId(String userId) { | ||
this.userId = userId; | ||
return this; | ||
} | ||
|
||
@Override | ||
public RemoveInvitationRequest build() { | ||
return new RemoveInvitationRequest(this); | ||
} | ||
} | ||
} |
Oops, something went wrong.