Skip to content

Commit

Permalink
Merge pull request #273 from internxt/chore/align_with_backend
Browse files Browse the repository at this point in the history
Chore/align with backend
  • Loading branch information
TamaraFinogina authored Jan 30, 2025
2 parents c6a42ff + f8c14df commit 7718932
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/drive/users/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,17 @@ export type UpdateProfilePayload = Partial<Pick<UserSettings, 'name' | 'lastname

export type PreCreateUserResponse = {
publicKey: string;
publicKyberKey?: string;
keys?:
{
ecc: string;
kyber: string;
};
user: { uuid: UUID; email: string };
};

export type FriendInvite = { guestEmail: string; host: number; accepted: boolean; id: number };

export type UserPublicKeyResponse = { publicKey: string; publicKyberKey?: string };
export type UserPublicKeyResponse = { publicKey: string; keys?: { ecc:string; kyber: string}; };

export type VerifyEmailChangeResponse = {
oldEmail: string;
Expand Down
10 changes: 8 additions & 2 deletions test/drive/users/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ describe('# users service tests', () => {
const email = '[email protected]';
const callStub = sinon.stub(httpClient, 'post').resolves({
publicKey: 'publicKey',
publicKyberKey: 'publicKeyberKey',
keys: {
kyber: 'publicKeyberKey',
ecc: 'publicKey',
},
user: { uuid: 'exampleUuid', email },
});

Expand All @@ -111,7 +114,10 @@ describe('# users service tests', () => {
expect(callStub.firstCall.args).toEqual(['/users/pre-create', { email }, headers]);
expect(body).toEqual({
publicKey: 'publicKey',
publicKyberKey: 'publicKeyberKey',
keys: {
kyber: 'publicKeyberKey',
ecc: 'publicKey',
},
user: { uuid: 'exampleUuid', email },
});
});
Expand Down

0 comments on commit 7718932

Please sign in to comment.