From 2e13919bb3717bb93940d433ed737c20124b6113 Mon Sep 17 00:00:00 2001 From: nocode Date: Sun, 13 Sep 2026 12:19:08 +0200 Subject: [PATCH] feat(config): add colors, access levels and ticket categories Refs: #28 Co-Authored-By: Claude Opus 5 (1M context) --- src/config/constants.js | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/config/constants.js diff --git a/src/config/constants.js b/src/config/constants.js new file mode 100644 index 0000000..5d7d4bb --- /dev/null +++ b/src/config/constants.js @@ -0,0 +1,40 @@ +export const BOT_NAME = 'FWS-Bot'; + +/** Embed colors by category (M12-T01). */ +export const COLORS = Object.freeze({ + primary: 0x1793d1, + success: 0x2ecc71, + warning: 0xf1c40f, + error: 0xe74c3c, + info: 0x3498db, + gitea: 0x609926, + moderation: 0xe67e22, + ticket: 0x9b59b6, +}); + +/** Ordered from least to most privileged (M3-T01). */ +export const ACCESS_LEVELS = Object.freeze({ + USER: 0, + STAFF: 1, + DEV: 2, + OWNER: 3, +}); + +/** Ticket categories and who can see them (M0-T05 / M6-T01). */ +export const TICKET_CATEGORIES = Object.freeze([ + { id: 'support', label: 'Support utilisateur', scope: ['staff', 'owner'] }, + { id: 'bug', label: 'Bug', scope: ['staff', 'dev', 'owner'] }, + { id: 'dev-question', label: 'Question de développement', scope: ['dev', 'owner'] }, + { id: 'report', label: 'Signalement', scope: ['staff', 'owner'] }, + { id: 'internal', label: 'Demande interne', scope: ['owner'] }, +]); + +export const NOTIFICATION_TYPES = Object.freeze([ + 'issues', + 'pull_requests', + 'commits', + 'releases', + 'announcements', + 'errors', + 'community', +]);