namespace GB5Shared.DirectAction { public interface IDirectActionTokenService { /// /// Generates a signed, time-limited token embedding actionCode, contextId, tenantId, assigneeUserId, and databaseName. /// URL-safe Base64 — safe to embed in email href or WhatsApp button payload. /// string Generate(string actionCode, int contextId, int tenantId, int assigneeUserId, string databaseName, TimeSpan expiry); /// /// Validates signature and expiry. /// Returns true and populated out-params on success; false on any failure. /// expiresAt is the token's original expiry time — use it for TDIRECTACTIONTOKEN.EXPIRESAT. /// bool TryValidate(string token, out string actionCode, out int contextId, out int tenantId, out int assigneeUserId, out string databaseName, out DateTime expiresAt); } }