typings: Add DTOs for authentication and security preferences

This commit is contained in:
juancarmore 2025-03-28 18:55:21 +01:00
parent 9fe3ac579b
commit 166389b606
2 changed files with 19 additions and 1 deletions

View File

@ -82,3 +82,13 @@ export interface SingleUserCredentials {
// GOOGLE = 'google',
// GITHUB = 'github'
// }
// DTOs
export interface AuthenticationPreferencesDTO {
authMode: AuthMode;
method: ValidAuthMethodDTO;
}
export type ValidAuthMethodDTO = SingleUserAuthDTO;
export type SingleUserAuthDTO = Omit<SingleUserAuth, 'credentials'>;

View File

@ -1,4 +1,4 @@
import { AuthenticationPreferences } from './auth-preferences.js';
import { AuthenticationPreferences, AuthenticationPreferencesDTO } from './auth-preferences.js';
/**
* Represents global preferences for OpenVidu Meet.
@ -26,3 +26,11 @@ export interface RoomCreationPolicy {
allowRoomCreation: boolean;
requireAuthentication: boolean;
}
// DTOs
export interface SecurityPreferencesDTO {
authentication: AuthenticationPreferencesDTO;
roomCreationPolicy: RoomCreationPolicy;
}
export type UpdateSecurityPreferencesDTO = Partial<SecurityPreferencesDTO>;