Skip to content

Commit

Permalink
update user model
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisa18289 committed Sep 19, 2024
1 parent 3270671 commit 4e6cef0
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 19 deletions.
5 changes: 0 additions & 5 deletions packages/models/src/user/User/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
UserAuthenticateRequestData,
UserAuthenticateResponseData,
UserConfirmPasswordResetRequestData,
UserCreateAccessTokenRetrievalKeyResponseData,
UserData,
UserDeleteRequestData,
UserMfaStatusData,
Expand Down Expand Up @@ -174,10 +173,6 @@ export class User extends ReferenceModel {
): Promise<{ recoveryCodesList: string[] }> {
return await config.behaviors.user.resetRecoveryCodes(multiFactorCode);
}

public async createAccessTokenRetrievalKey(): Promise<UserCreateAccessTokenRetrievalKeyResponseData> {
return await config.behaviors.user.createAccessTokenRetrievalKey();
}
}

class UserCommon extends classes(DataModel<UserData>, User) {
Expand Down
8 changes: 0 additions & 8 deletions packages/models/src/user/User/behaviors/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,4 @@ export const apiUserBehaviors = (

return response.data;
},

createAccessTokenRetrievalKey: async () => {
const response = await client.user.createAccessTokenRetrievalKey();

assertStatus(response, 201);

return response.data;
},
});
3 changes: 0 additions & 3 deletions packages/models/src/user/User/behaviors/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
UserAuthenticateRequestData,
UserAuthenticateResponseData,
UserConfirmPasswordResetRequestData,
UserCreateAccessTokenRetrievalKeyResponseData,
UserData,
UserDeleteRequestData,
UserMfaStatusData,
Expand Down Expand Up @@ -80,6 +79,4 @@ export interface UserBehaviors {
resetRecoveryCodes: (
multiFactorCode: string,
) => Promise<{ recoveryCodesList: string[] }>;

createAccessTokenRetrievalKey: () => Promise<UserCreateAccessTokenRetrievalKeyResponseData>;
}
3 changes: 0 additions & 3 deletions packages/models/src/user/User/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,3 @@ export type UserAuthenticateMfaRequestData =

export type UserAuthenticateMfaResponseData =
MittwaldAPIV2.Paths.V2AuthenticateMfa.Post.Responses.$200.Content.ApplicationJson;

export type UserCreateAccessTokenRetrievalKeyResponseData =
MittwaldAPIV2.Paths.V2UsersSelfTokenRetrievalKey.Post.Responses.$201.Content.ApplicationJson;

0 comments on commit 4e6cef0

Please sign in to comment.