From 0fde62b1925d6365483ce23339ac5a5c687aaa55 Mon Sep 17 00:00:00 2001 From: Muntasir Mallik <73852736+muntaxir4@users.noreply.github.com> Date: Mon, 16 Dec 2024 13:01:53 +0530 Subject: [PATCH] feat(cli): Add functionality to operate on Workspace Membership (#589) Co-authored-by: Rajdip Bhattacharya --- .../emails/components/base-email-template.tsx | 12 ++-- .../src/mail/emails/workspace-invitation.tsx | 15 ++--- .../api/src/mail/emails/workspace-removal.tsx | 6 +- apps/cli/src/commands/workspace.command.ts | 4 +- .../workspace/membership.workspace.ts | 34 ++++++++++ .../accept-invitation.membership.ts | 49 ++++++++++++++ .../cancel-invitation.membership.ts | 55 ++++++++++++++++ .../decline-invitation.membership.ts | 49 ++++++++++++++ .../membership/get-all-members.membership.ts | 64 ++++++++++++++++++ .../workspace/membership/invite.membership.ts | 65 +++++++++++++++++++ .../workspace/membership/leave.membership.ts | 49 ++++++++++++++ .../workspace/membership/remove.membership.ts | 55 ++++++++++++++++ .../transfer-ownership.membership copy.ts | 55 ++++++++++++++++ .../membership/update-role.membership.ts | 61 +++++++++++++++++ .../commands/workspace/role/update.role.ts | 4 +- apps/cli/src/util/controller-instance.ts | 15 ++++- package.json | 2 +- 17 files changed, 571 insertions(+), 23 deletions(-) create mode 100644 apps/cli/src/commands/workspace/membership.workspace.ts create mode 100644 apps/cli/src/commands/workspace/membership/accept-invitation.membership.ts create mode 100644 apps/cli/src/commands/workspace/membership/cancel-invitation.membership.ts create mode 100644 apps/cli/src/commands/workspace/membership/decline-invitation.membership.ts create mode 100644 apps/cli/src/commands/workspace/membership/get-all-members.membership.ts create mode 100644 apps/cli/src/commands/workspace/membership/invite.membership.ts create mode 100644 apps/cli/src/commands/workspace/membership/leave.membership.ts create mode 100644 apps/cli/src/commands/workspace/membership/remove.membership.ts create mode 100644 apps/cli/src/commands/workspace/membership/transfer-ownership.membership copy.ts create mode 100644 apps/cli/src/commands/workspace/membership/update-role.membership.ts diff --git a/apps/api/src/mail/emails/components/base-email-template.tsx b/apps/api/src/mail/emails/components/base-email-template.tsx index 891ddfe0..07dcf422 100644 --- a/apps/api/src/mail/emails/components/base-email-template.tsx +++ b/apps/api/src/mail/emails/components/base-email-template.tsx @@ -42,13 +42,13 @@ export const BaseEmailTemplate: React.FC = ({ {heading} {children} - If you believe this action was taken in error or have any - questions regarding this change, please contact your project - administrator or our support team. + If you believe this action was taken in error or have any + questions regarding this change, please contact your project + administrator or our support team. - We appreciate your understanding and thank you for your - contributions to the project. + We appreciate your understanding and thank you for your + contributions to the project. Cheers, @@ -81,4 +81,4 @@ export const BaseEmailTemplate: React.FC = ({ ) } -export default BaseEmailTemplate \ No newline at end of file +export default BaseEmailTemplate diff --git a/apps/api/src/mail/emails/workspace-invitation.tsx b/apps/api/src/mail/emails/workspace-invitation.tsx index 37b4fc0f..5fab5df7 100644 --- a/apps/api/src/mail/emails/workspace-invitation.tsx +++ b/apps/api/src/mail/emails/workspace-invitation.tsx @@ -33,14 +33,11 @@ export const WorkspaceInvitationEmail = ({ : 'You are Invited to Join the Workspace' return ( - + Dear User, - We're excited to inform you that you've been invited to join a - workspace on Keyshade. Here are the details of your invitation: + We're excited to inform you that you've been invited to join a workspace + on Keyshade. Here are the details of your invitation:
@@ -54,8 +51,8 @@ export const WorkspaceInvitationEmail = ({
- Join the project by clicking the button below - we're excited to - have you! + Join the project by clicking the button below - we're excited to have + you!