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

[PB-2386] - Allow to edit phone and email in workspace #260

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/workspaces/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ describe('Workspaces service tests', () => {
avatar: null,
rootFolderId: 'asflaksfoau0su0fewnlsd',
phoneNumber: null,
email: null,
},
},
{
Expand Down Expand Up @@ -141,6 +142,7 @@ describe('Workspaces service tests', () => {
avatar: null,
rootFolderId: 'asflaksfoau0su0fewnlsd',
phoneNumber: null,
email: null,
},
},
],
Expand Down Expand Up @@ -477,6 +479,7 @@ describe('Workspaces service tests', () => {
avatar: null,
rootFolderId: 'asdf-123-asdf',
phoneNumber: null,
email: null,
},
},
];
Expand Down
8 changes: 7 additions & 1 deletion src/workspaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,13 @@ export class Workspaces {

public editWorkspace(
workspaceId: string,
details: { name?: string; description?: string; address?: string },
details: {
name?: string;
description?: string;
address?: string;
phoneNumber?: string | null;
email?: string | null
Copy link
Contributor

Choose a reason for hiding this comment

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

The email has its own process to be edited, have you checked this new way is correct?

},
): Promise<void> {
return this.client.patch<void>(`workspaces/${workspaceId}`, details, this.headers());
}
Expand Down
3 changes: 3 additions & 0 deletions src/workspaces/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export interface Workspace {
avatar: null | string;
rootFolderId: string;
phoneNumber: null | string;
email: null | string;
}

export interface WorkspaceData {
Expand Down Expand Up @@ -184,6 +185,8 @@ export type EditWorkspaceDetailsBody = {
workspaceId: string;
name?: string;
description?: string;
phoneNumber?: string;
email?: string;
};

export type GetMemberDetailsResponse = {
Expand Down
Loading