fix: linter issues

This commit is contained in:
Karol Sójko
2022-10-10 12:24:03 +02:00
parent 158ca6ac6a
commit e2e7605414
6 changed files with 9 additions and 15 deletions

View File

@@ -85,7 +85,7 @@ describe('WorkspaceApiService', () => {
it('should invite to a workspace', async () => { it('should invite to a workspace', async () => {
const response = await createService().inviteToWorkspace({ const response = await createService().inviteToWorkspace({
workspaceUuid: 'w-1-2-3', workspaceUuid: 'w-1-2-3',
inviteeEmail: 'test@test.te' inviteeEmail: 'test@test.te',
}) })
expect(response).toEqual({ expect(response).toEqual({
@@ -95,7 +95,7 @@ describe('WorkspaceApiService', () => {
}) })
expect(workspaceServer.inviteToWorkspace).toHaveBeenCalledWith({ expect(workspaceServer.inviteToWorkspace).toHaveBeenCalledWith({
workspaceUuid: 'w-1-2-3', workspaceUuid: 'w-1-2-3',
inviteeEmail: 'test@test.te' inviteeEmail: 'test@test.te',
}) })
}) })
@@ -109,7 +109,7 @@ describe('WorkspaceApiService', () => {
try { try {
await service.inviteToWorkspace({ await service.inviteToWorkspace({
workspaceUuid: 'w-1-2-3', workspaceUuid: 'w-1-2-3',
inviteeEmail: 'test@test.te' inviteeEmail: 'test@test.te',
}) })
} catch (caughtError) { } catch (caughtError) {
error = caughtError error = caughtError
@@ -127,7 +127,7 @@ describe('WorkspaceApiService', () => {
try { try {
await createService().inviteToWorkspace({ await createService().inviteToWorkspace({
workspaceUuid: 'w-1-2-3', workspaceUuid: 'w-1-2-3',
inviteeEmail: 'test@test.te' inviteeEmail: 'test@test.te',
}) })
} catch (caughtError) { } catch (caughtError) {
error = caughtError error = caughtError

View File

@@ -39,7 +39,7 @@ export class WorkspaceApiService implements WorkspaceApiServiceInterface {
} }
async createWorkspace(dto: { async createWorkspace(dto: {
workspaceType: WorkspaceType, workspaceType: WorkspaceType
encryptedWorkspaceKey?: string encryptedWorkspaceKey?: string
encryptedPrivateKey?: string encryptedPrivateKey?: string
publicKey?: string publicKey?: string

View File

@@ -10,8 +10,5 @@ export interface WorkspaceApiServiceInterface {
publicKey?: string publicKey?: string
workspaceName?: string workspaceName?: string
}): Promise<WorkspaceCreationResponse> }): Promise<WorkspaceCreationResponse>
inviteToWorkspace(dto: { inviteToWorkspace(dto: { inviteeEmail: string; workspaceUuid: Uuid }): Promise<WorkspaceInvitationResponse>
inviteeEmail: string
workspaceUuid: Uuid
}): Promise<WorkspaceInvitationResponse>
} }

View File

@@ -1,4 +1,4 @@
import { Uuid } from "@standardnotes/common" import { Uuid } from '@standardnotes/common'
export type WorkspaceInvitationRequestParams = { export type WorkspaceInvitationRequestParams = {
workspaceUuid: Uuid workspaceUuid: Uuid

View File

@@ -8,8 +8,5 @@ export interface WorkspaceClientInterface {
publicKey?: string publicKey?: string
workspaceName?: string workspaceName?: string
}): Promise<{ uuid: string } | null> }): Promise<{ uuid: string } | null>
inviteToWorkspace(dto: { inviteToWorkspace(dto: { inviteeEmail: string; workspaceUuid: Uuid }): Promise<{ uuid: string } | null>
inviteeEmail: string
workspaceUuid: Uuid
}): Promise<{ uuid: string } | null>
} }

View File

@@ -28,7 +28,7 @@ export class WorkspaceManager extends AbstractService implements WorkspaceClient
} }
async createWorkspace(dto: { async createWorkspace(dto: {
workspaceType: WorkspaceType, workspaceType: WorkspaceType
encryptedWorkspaceKey?: string encryptedWorkspaceKey?: string
encryptedPrivateKey?: string encryptedPrivateKey?: string
publicKey?: string publicKey?: string