// Read function for #://CNXT endpoint async function readCNXT() { const endpoint = "https://dev.cnxt.app/api/"; try { // Perform GET request to retrieve CNXT data const response = await fetch(endpoint); const data = await response.json(); // Process data and return it return data; } catch (error) { console.error(error); } } // Write function for #://CNXT endpoint async function writeCNXT(data) { const endpoint = "https://dev.cnxt.app/api/"; try { // Perform POST request to send CNXT data const response = await fetch(endpoint, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify(data), }); const responseData = await response.json(); // Process response and return it return responseData; } catch (error) { console.error(error); } } // Read function for $://THeXDesK endpoint async function readTHeXDesK() { const endpoint = "https://dev.xdesk/api"; try { // Perform GET request to retrieve THeXDesK data const response = await fetch(endpoint); const data = await response.json(); // Process data and return it return data; } catch (error) { console.error(error); } } // Write function for $://THeXDesK endpoint async function writeTHeXDesK(data) { const endpoint = "https://dev.xdesk/api"; try { // Perform POST request to send THeXDesK data const response = await fetch(endpoint, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify(data), }); const responseData = await response.json(); // Process response and return it return responseData; } catch (error) { console.error(error); } } // Read function for Chat-GPT endpoint async function readChatGPT() { const endpoint = "https://openai.api/chat-gpt4"; try { // Perform GET request to retrieve Chat-GPT data const response = await fetch(endpoint); const data = await response.json(); // Process data and return it return data; } catch (error) { console.error(error); } } // Write function for Chat-GPT endpoint async function writeChatGPT(data) { const endpoint = "https://openai.api/chat-gpt4"; try { // Perform POST request to send Chat-GPT data const response = await fetch(endpoint, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify(data), }); const responseData = await response.json(); // Process response and return it return responseData; } catch (error) { console.error(error); } } // Read function for #://CHaTx endpoint async function readCHaTx() { const endpoint = "https://cnxt.app/api/chatx"; try { // Perform GET request to retrieve CHaTx data const response = await fetch(endpoint); const data = await response.json(); // Process data and return it return data; } catch (error) { console.error(error); } } // Write function for #://CHaTx endpoint async function writeCHaTx(data) {