enerthya.dev-web-common 1.5.5 → 1.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -86,6 +86,41 @@ const API_ROUTES = {
86
86
  BETA_REMOVE: (id) => `/owner/beta/${id}`,
87
87
  },
88
88
 
89
+ // ─── Ada — Assistente IA ─────────────────────────────────────────────────
90
+ ADA: {
91
+ /** GET — Modelos disponíveis e configuração pública (sem chave API) */
92
+ CONFIG: "/ada/config",
93
+ /** GET — Lista todas as conversas do usuário */
94
+ CHATS: "/ada/chats",
95
+ /** POST — Cria uma nova conversa */
96
+ CREATE_CHAT: "/ada/chats",
97
+ /**
98
+ * GET — Carrega mensagens de uma conversa
99
+ * @param {string} chatId - ID da conversa
100
+ */
101
+ CHAT: (chatId) => `/ada/chats/${chatId}`,
102
+ /**
103
+ * POST — Envia mensagem em uma conversa
104
+ * @param {string} chatId - ID da conversa
105
+ */
106
+ SEND_MESSAGE: (chatId) => `/ada/chats/${chatId}/message`,
107
+ /**
108
+ * POST — Limpa todas as mensagens de uma conversa
109
+ * @param {string} chatId - ID da conversa
110
+ */
111
+ CLEAR_CHAT: (chatId) => `/ada/chats/${chatId}/clear`,
112
+ /**
113
+ * DELETE — Deleta uma conversa
114
+ * @param {string} chatId - ID da conversa
115
+ */
116
+ DELETE_CHAT: (chatId) => `/ada/chats/${chatId}`,
117
+ /**
118
+ * PUT — Renomeia uma conversa
119
+ * @param {string} chatId - ID da conversa
120
+ */
121
+ RENAME_CHAT: (chatId) => `/ada/chats/${chatId}/rename`,
122
+ },
123
+
89
124
  // ─── Meta ─────────────────────────────────────────────────────────────────
90
125
  /** GET — Bot + shard status */
91
126
  STATUS: "/status",
@@ -95,7 +130,11 @@ const API_ROUTES = {
95
130
  DEV: "/dev",
96
131
  /** GET — Owner + helpers da documentação pública com username e avatar */
97
132
  DOCS_CONTRIBUTORS: "/docs-contributors",
133
+ /**
134
+ * GET — Dados públicos de um usuário Discord (username + avatar)
135
+ * @param {string} id - Discord user ID
136
+ */
98
137
  DISCORD_USER: (id) => `/user/${id}`,
99
138
  };
100
139
 
101
- export { API_ROUTES };
140
+ module.exports = { API_ROUTES };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enerthya.dev-web-common",
3
- "version": "1.5.5",
3
+ "version": "1.5.8",
4
4
  "description": "Shared web layer for the Enerthya ecosystem: API routes, response envelopes, URL helpers and validators. Inspired by Loritta's web-common and dashboard-common modules.",
5
5
  "main": "src/index.js",
6
6
  "module": "esm/index.js",
@@ -86,6 +86,41 @@ const API_ROUTES = {
86
86
  BETA_REMOVE: (id) => `/owner/beta/${id}`,
87
87
  },
88
88
 
89
+ // ─── Ada — Assistente IA ─────────────────────────────────────────────────
90
+ ADA: {
91
+ /** GET — Modelos disponíveis e configuração pública (sem chave API) */
92
+ CONFIG: "/ada/config",
93
+ /** GET — Lista todas as conversas do usuário */
94
+ CHATS: "/ada/chats",
95
+ /** POST — Cria uma nova conversa */
96
+ CREATE_CHAT: "/ada/chats",
97
+ /**
98
+ * GET — Carrega mensagens de uma conversa
99
+ * @param {string} chatId - ID da conversa
100
+ */
101
+ CHAT: (chatId) => `/ada/chats/${chatId}`,
102
+ /**
103
+ * POST — Envia mensagem em uma conversa
104
+ * @param {string} chatId - ID da conversa
105
+ */
106
+ SEND_MESSAGE: (chatId) => `/ada/chats/${chatId}/message`,
107
+ /**
108
+ * POST — Limpa todas as mensagens de uma conversa
109
+ * @param {string} chatId - ID da conversa
110
+ */
111
+ CLEAR_CHAT: (chatId) => `/ada/chats/${chatId}/clear`,
112
+ /**
113
+ * DELETE — Deleta uma conversa
114
+ * @param {string} chatId - ID da conversa
115
+ */
116
+ DELETE_CHAT: (chatId) => `/ada/chats/${chatId}`,
117
+ /**
118
+ * PUT — Renomeia uma conversa
119
+ * @param {string} chatId - ID da conversa
120
+ */
121
+ RENAME_CHAT: (chatId) => `/ada/chats/${chatId}/rename`,
122
+ },
123
+
89
124
  // ─── Meta ─────────────────────────────────────────────────────────────────
90
125
  /** GET — Bot + shard status */
91
126
  STATUS: "/status",