// ╔═══════╗╔═╗ ╔═╗╔══════╗ ╔═══════╗╔═══════╗╔═══════╗╔═══════╗ ╔═╗ ╔═╗╔═══════╗╔═╗ ╔═══════╗╔═══════╗╔═══════╗╔═══════╗╔═══════╗╔═══════╗ ╔═══════╗╔═══════╗ // ║ ╔═════╝║ ║ ║ ║║ ╔══╗ ║ ╚═══╗ ╔═╝║ ╔═════╝║ ╔═════╝╚══╗ ╔══╝ ║ ║ ║ ║║ ╔═══╗ ║║ ║ ╚══╗ ╔══╝╚╗ ╔══╗ ║║ ╔═══╗ ║╚══╗ ╔══╝║ ╔═══╗ ║║ ╔═══╗ ║ ╚══╗ ╔══╝║ ╔═════╝ // ║ ╚═════╗║ ║ ║ ║║ ╚══╝ ╚╗ ║ ║ ║ ╚═════╗║ ║ ║ ║ ╔═══════╗║ ╚╗ ╔╝ ║║ ╚═══╝ ║║ ║ ║ ║ ║ ║ ║ ║║ ╚═══╝ ║ ║ ║ ║ ║ ║ ║║ ╚═══╝ ║ ║ ║ ║ ╚═════╗ // ╚═════╗ ║║ ║ ║ ║║ ╔═══╗ ║ ║ ║ ║ ╔═════╝║ ║ ║ ║ ╚═══════╝╚╗ ║ ║ ╔╝║ ╔═══╗ ║║ ║ ║ ║ ║ ║ ║ ║║ ╔═══╗ ║ ║ ║ ║ ║ ║ ║║ ╔═╗ ╔═╝ ║ ║ ╚═════╗ ║ // ╔═════╝ ║║ ╚═══╝ ║║ ╚═══╝ ║╔═══╝ ║ ║ ╚═════╗║ ╚═════╗ ║ ║ ║ ╚═╝ ║ ║ ║ ║ ║║ ╚═════╗╔══╝ ╚══╗╔╝ ╚══╝ ║║ ║ ║ ║ ║ ║ ║ ╚═══╝ ║║ ║ ║ ╚═╗╔═╗ ║ ║ ╔═════╝ ║ // ╚═══════╝╚═══════╝╚═══════╝╚═════╝ ╚═══════╝╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═══════╝╚═══════╝╚═══════╝╚═╝ ╚═╝ ╚═╝ ╚═══════╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═══════╝ // ╔═══════╗╔═══════╗╔═══════╗╔═══════╗╔═══════╗╔═══════╗╔═══════╗ // ╚══╗ ╔══╝║ ╔╗ ╔╗ ║║ ╔═══╗ ║║ ╔═══╗ ║║ ╔═══╗ ║╚══╗ ╔══╝║ ╔═════╝ // ║ ║ ║ ║║ ║║ ║║ ╚═══╝ ║║ ║ ║ ║║ ╚═══╝ ║ ║ ║ ║ ╚═════╗ // ║ ║ ║ ║║ ║║ ║║ ╔═════╝║ ║ ║ ║║ ╔═╗ ╔═╝ ║ ║ ╚═════╗ ║ // ╔══╝ ╚══╗║ ║║ ║║ ║║ ║ ║ ╚═══╝ ║║ ║ ║ ╚═╗ ║ ║ ╔═════╝ ║ // ╚═══════╝╚═╝╚═╝╚═╝╚═╝ ╚═══════╝╚═╝ ╚═══╝ ╚═╝ ╚═══════╝ import * as messageErrors from '../../errors/message-errors.js'; import * as utilityEngine from '@xyz.warpmatter.com/utility-engine'; // ╔═══════╗╔═╗ ╔═╗╔══════╗ ╔═══════╗╔═══════╗╔═══════╗╔═══════╗ // ║ ╔═════╝║ ║ ║ ║║ ╔══╗ ║ ╚═══╗ ╔═╝║ ╔═════╝║ ╔═════╝╚══╗ ╔══╝ // ║ ╚═════╗║ ║ ║ ║║ ╚══╝ ╚╗ ║ ║ ║ ╚═════╗║ ║ ║ ║ // ╚═════╗ ║║ ║ ║ ║║ ╔═══╗ ║ ║ ║ ║ ╔═════╝║ ║ ║ ║ // ╔═════╝ ║║ ╚═══╝ ║║ ╚═══╝ ║╔═══╝ ║ ║ ╚═════╗║ ╚═════╗ ║ ║ // ╚═══════╝╚═══════╝╚═══════╝╚═════╝ ╚═══════╝╚═══════╝ ╚═╝ export function validateMessageSubject(value: any) { if (!isValidMessageSubject(value)) { messageErrors.throwInvalidMessageSubjectError(); } } export function isValidMessageSubject(value: any): value is string { return utilityEngine.isFilledString(value, 128); }