From 96163616d6d6c130359c37624b1c9ba9b86b5b03 Mon Sep 17 00:00:00 2001 From: Matheus Almeida Date: Mon, 11 Mar 2024 12:33:22 -0300 Subject: [PATCH] [Add] better update component for faster updates on docs --- docs/01-Get Started/Release notes.md | 119 +------------------- docs/01-Get Started/_updates.js | 124 +++++++++++++++++++++ src/components/UpdatesComponent.js | 47 ++++++++ src/components/UpdatesComponent.module.css | 25 +++++ 4 files changed, 199 insertions(+), 116 deletions(-) create mode 100644 docs/01-Get Started/_updates.js create mode 100644 src/components/UpdatesComponent.js create mode 100644 src/components/UpdatesComponent.module.css diff --git a/docs/01-Get Started/Release notes.md b/docs/01-Get Started/Release notes.md index 63eeff4..2a02d45 100644 --- a/docs/01-Get Started/Release notes.md +++ b/docs/01-Get Started/Release notes.md @@ -65,119 +65,6 @@ This is the `latest` version, the most stable as of right now. We recommend uses ::: -## 1.6.1 - -> This is a minor fix update. Version 1.6.1 introduces fixes for message handling, Typebot integration, media sharing, text formatting in Chatwoot, and instance management. It also adds customization options and resolves reconnection issues with MongoDB. - -
- See full changelog -
-
- Fixes -
- - Fixed Lid Messages
- - Fixed the pairing code
- - Adjusts in typebot
- - Fixed sending variables to typebot
- - Fixed sending variables from typebot
- - Options to disable docs and manager
- - Correction sending s3/minio media to chatwoot and typebot
- - Fixed chatwoot Bold, Italic and Underline formatting using Regex
- - Include instance Id field in the instance configuration
- - Fix the problem when disconnecting the instance and connecting again using mongodb
- - Fixed the problem with typebot closing at the end of the flow, now this is optional with the TYPEBOT_KEEP_OPEN variable
- - Added the sign_delimiter property to the Chatwoot configuration, allowing you to set a different delimiter for the signature. Default when not defined \n
-
-
-
- Supported integrations -
- - Chatwoot: v3.3.1
- - Typebot: v2.20.0
-
-
-
-
- -View the [commits](https://github.com/EvolutionAPI/evolution-api/compare/1.5.4...1.6.0) for this version. - -Release date: 2023-12-15 - -## 1.6.0 - -> New Instance manager available on endpoint `/manager` and support for reply messages in Chatwoot. - -
- See full changelog -
-
- Features -
- - Added AWS SQS Integration
- - Added support for new typebot API
- - Added endpoint sendPresence
- - New Instance Manager
- - Added auto_create to the chatwoot set to create the inbox automatically or not
- - Added reply, delete and message reaction in chatwoot v3.3.1
-
-
-
- Fixes -
- - Adjusts in proxy
- - Adjusts in start session for Typebot
- - Added mimetype field when sending media
- - Ajusts in validations to messages.upsert
- - Fixed messages not received: error handling when updating contact in chatwoot
- - Fix workaround to manage param data as an array in mongodb
- - Removed await from webhook when sending a message
- - Update typebot.service.ts - element.underline change ~ for *
- - Adjusts in proxy
- - Removed api restart on receiving an error
- - Fixes in mongodb and chatwoot
- - Adjusted return from queries in mongodb
- - Added restart instance when update profile picture
- - Correction of chatwoot functioning with admin flows
- - Fixed problem that did not generate qrcode with the chatwoot_conversation_pending option enabled
- - Fixed issue where CSAT opened a new ticket when reopen_conversation was disabled
- - Fixed issue sending contact to Chatwoot via iOS
-
-
-
- Supported integrations -
- - Chatwoot: v3.3.1
- - Typebot: v2.20.0
-
-
-
- Changes -
- - -> Adjusting function cleaningStoreFiles to remove itens from missing… by @jaison-x in #186
- - fix: size of group participants by @w3nder in #190
- - Handle optional chaining for 'settings.msg_call', this change prevent… by @vitorogen in #197
- - Handle erros in Typebot by @gabrielpastori1 in #198
- - Deleting instances by @jaison-x in #187
- - fix: Removed await from webhook when sending a message by @craines in #216
- - fix messages not received: error handling when updating contact by @raimartinsb in #228
- - fix: workaround to manage param data as an array in mongodb by @jaison-x in #224
- - Update typebot.service.ts - element.underline change ~ for * by @suissa in #215
- - Add session creation for typebot service by @gabrielpastori1 in #233
- - Add sendPresence by @gabrielpastori1 in #237
- - Fix chatwoot find by @gabrielpastori1 in #248
- - Add Manager by @gabrielpastori1 in #250
- - fix: only create if is paused by @gabrielpastori1 in #249
-
-
-
-
- -View the [commits](https://github.com/EvolutionAPI/evolution-api/compare/1.5.4...1.6.0) for this version. - -Release date: 2023-12-15 - -## 1.5.4 - -> Baileys logger typing issue resolved and resolved duplicated messages problems in Chatwoot. - -View the [commits](https://github.com/EvolutionAPI/evolution-api/compare/1.5.3...1.5.4) for this version. +import UpdatesComponent from '@site/src/components/UpdatesComponent'; + + diff --git a/docs/01-Get Started/_updates.js b/docs/01-Get Started/_updates.js new file mode 100644 index 0000000..63e5aef --- /dev/null +++ b/docs/01-Get Started/_updates.js @@ -0,0 +1,124 @@ +export const updates = [ + { + version: "1.7.0", + description: "Added support to oficial WhatsApp integration, new update message endpoint, labels and more.", + releaseDate: "2024-03-11", + features: [ + "Added update message endpoint", + "Add translate capabilities to QRMessages in CW", + "Join in Group by Invite Code", + "Read messages from whatsapp in chatwoot", + "Add support to use use redis in cacheservice", + "Add support for labels", + "Command to clearcache from chatwoot inbox", + "Whatsapp Cloud API Oficial support", + ], + fixes: [ + "Proxy configuration improvements", + "Correction in sending lists", + "Adjust in webhook_base64", + "Correction in typebot text formatting", + "Correction in chatwoot text formatting and render list message", + "Only use a axios request to get file mimetype if necessary", + "When possible use the original file extension", + "When receiving a file from whatsapp, use the original filename in chatwoot if possible", + "Remove message ids cache in chatwoot to use chatwoot's api itself", + "Adjusts the quoted message, now has contextInfo in the message Raw", + "Collecting responses with text or numbers in Typebot", + "Added sendList endpoint to swagger documentation", + "Implemented a function to synchronize message deletions on WhatsApp, automatically reflecting in Chatwoot.", + "Improvement on numbers validation", + "Fix polls in message sending", + "Sending status message", + "Message 'connection successfully' spamming", + "Invalidate the conversation cache if reopen_conversation is false and the conversation was resolved", + "Fix looping when deleting a message in chatwoot", + "When receiving a file from whatsapp, use the original filename in chatwoot if possible", + "Correction in the sendList Function", + "Implement contact upsert in messaging-history.set", + "Improve proxy error handling", + "Refactor fetching participants for group in WhatsApp service", + "Fixed problem where the typebot final keyword did not work", + "Typebot's wait now pauses the flow and composing is defined by the delay_message parameter in set typebot", + "Composing over 20s now loops until finished" + ], + integrations: [ + "Chatwoot: v3.3.1", + "Typebot: v2.20.0" + ], + commits: "", + }, + { + version: "1.6.1", + description: "This is a minor fix update. Version 1.6.1 introduces fixes for message handling, Typebot integration, media sharing, text formatting in Chatwoot, and instance management. It also adds customization options and resolves reconnection issues with MongoDB.", + releaseDate: "2023-12-15", + features: [ + "Added AWS SQS Integration", + "Added support for new typebot API", + "Added endpoint sendPresence", + "New Instance Manager", + "Added auto_create to the chatwoot set to create the inbox automatically or not", + "Added reply, delete and message reaction in chatwoot v3.3.1" + ], + fixes: [ + "Fixed Lid Messages", + "Fixed the pairing code", + "Adjusts in typebot", + "Fixed sending variables to typebot", + "Fixed sending variables from typebot", + "Options to disable docs and manager", + "Correction sending s3/minio media to chatwoot and typebot", + "Fixed chatwoot Bold, Italic and Underline formatting using Regex", + "Include instance Id field in the instance configuration", + "Fix the problem when disconnecting the instance and connecting again using mongodb", + "Fixed the problem with typebot closing at the end of the flow, now this is optional with the TYPEBOT_KEEP_OPEN variable", + "Added the sign_delimiter property to the Chatwoot configuration, allowing you to set a different delimiter for the signature. Default when not defined \n", + ], + integrations: [ + "Chatwoot: v3.3.1", + "Typebot: v2.20.0" + ], + commits: "", + }, { + version: "1.6.0", + description: "New Instance manager available on endpoint /manager and support for reply messages in Chatwoot, better error handling and more...", + releaseDate: "2023-10-12", + features: [ + "Adjusting function cleaningStoreFiles to remove itens from missing…", + "Handle optional chaining for 'settings.msg_call', this change prevent…", + "Handle erros in Typebot", + "Add session creation for typebot service", + "Add sendPresence", + "Add Manager", + ], + fixes: [ + "Removed await from webhook when sending a message", + "messages not received: error handling when updating contact", + "workaround to manage param data as an array in mongodb", + "chatwoot find", + "only create if is paused", + "size of group participants", + ], + integrations: [ + "Chatwoot: v3.3.1", + "Typebot: v2.19.0" + ], + commits: "", + }, + { + version: "1.5.4", + description: "Baileys logger typing issue resolved and resolved duplicated messages problems in Chatwoot", + releaseDate: "2023-10-12", + features: [ + + ], + fixes: [ + + ], + integrations: [ + + ], + commits: "", + } +] + diff --git a/src/components/UpdatesComponent.js b/src/components/UpdatesComponent.js new file mode 100644 index 0000000..8f3fcf0 --- /dev/null +++ b/src/components/UpdatesComponent.js @@ -0,0 +1,47 @@ +// src/components/UpdatesComponent.js +import React from 'react'; +import { updates } from '../../docs/01-Get Started/_updates'; +import styles from './UpdatesComponent.module.css'; // Importando o CSS Module + +export default function UpdatesComponent() { + return ( +
+ {updates.map((update, index) => ( +
+

Version: {update.version} { index === 0 ? "(latest)" : ""}

+

Release date: {update.releaseDate}

+
{update.description}
+
+ See full changelog of v{update.version} +
+
+ Features +
    + {update.features.map((feature, featureIndex) => ( +
  • {feature}
  • + ))} +
+
+
+ Fixes +
    + {update.fixes.map((fix, fixIndex) => ( +
  • {fix}
  • + ))} +
+
+
+ Integrations +
    + {update.integrations.map((integration, integrationIndex) => ( +
  • {integration}
  • + ))} +
+
+
+
+
+ ))} +
+ ); +} diff --git a/src/components/UpdatesComponent.module.css b/src/components/UpdatesComponent.module.css new file mode 100644 index 0000000..fa53c67 --- /dev/null +++ b/src/components/UpdatesComponent.module.css @@ -0,0 +1,25 @@ +.versions { + margin-top: 20px; +} + +.details { + border: 1px solid #aaa; + border-radius: 4px; + padding: 0.8em; +} + +.summary { + font-weight: bold; + padding: 0.5em; +} + +.detailsOpen { + padding: 1em; +} + +.detailsOpenSummary { + border: 1px solid #aaa; + margin-bottom: 0.5em; + border-radius: 4px; + padding: 0.8em; +}