/** Handle a public content API request (for headless consumption by AI agents or frontends). */
export async function handleContentApiRequest(_request, _db) {
    // TODO: implement read-only content API with field selection and depth control
    throw new Error('Not implemented');
}
/** Transform a document for public API output, stripping internal fields. */
export function sanitizeForPublicApi(doc, allowedFields) {
    const internal = new Set([
        'createdById',
        'updatedById',
        'passwordHash',
        'totpSecret',
        'deletedAt',
    ]);
    const result = {};
    for (const [key, value] of Object.entries(doc)) {
        if (internal.has(key))
            continue;
        if (allowedFields && !allowedFields.includes(key))
            continue;
        result[key] = value;
    }
    return result;
}
//# sourceMappingURL=ai-api.js.map