import { SafeNSoundError } from '#util/error.js'; import Joi from 'joi'; /** * Generic authentication DTO. */ export class WhoAmIDto { userId; deviceId; type; /** * @param data {WhoAmIDto} * @returns {Promise} */ static async create(data) { const obj = new WhoAmIDto(); for (const key of Object.keys(data)) { if (key in obj) { obj[key] = data[key]; } } return obj; } }