-
-
Notifications
You must be signed in to change notification settings - Fork 392
Adiciona endpoints de usuário, histórico, mídia e chamadas ao Postman #262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary of ChangesHello @cleitonme, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! Este pull request enriquece significativamente a coleção Postman da API Wuzapi, incorporando uma ampla variedade de novos endpoints em diversas categorias. O objetivo principal é fornecer ferramentas mais abrangentes para a interação com a administração de usuários, histórico de sessão, funcionalidades de chat, manipulação de mídia, atualizações de status e gerenciamento de chamadas. Esta atualização visa otimizar os processos de desenvolvimento e teste, oferecendo requisições prontas para uso para recursos de API recém-implementados ou aprimorados. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
Este pull request adiciona uma quantidade significativa de novas funcionalidades e melhorias à coleção Postman e à API. As adições incluem novos endpoints para gerenciamento de usuários, sincronização de histórico, integração S3 para mídia, HMAC para webhooks e tratamento expandido de eventos. As alterações melhoram a robustez da conexão, a capacidade de gerenciamento de webhooks e a consistência dos dados do histórico. No entanto, algumas melhorias podem ser feitas na reutilização da coleção Postman e na lógica de tratamento de erros.
| "raw": "{{baseUrl}}/admin/users/1", | ||
| "host": ["{{baseUrl}}"], | ||
| "path": ["admin", "users", "1"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Para melhorar a reutilização da coleção Postman, considere usar uma variável (por exemplo, {{userId}}) em vez de um ID de usuário fixo (1) na URL. Isso permitiria testar diferentes usuários sem modificar a solicitação diretamente.
| "raw": "{{baseUrl}}/admin/users/1", | |
| "host": ["{{baseUrl}}"], | |
| "path": ["admin", "users", "1"] | |
| "raw": "{{baseUrl}}/admin/users/{{userId}}", | |
| "host": ["{{baseUrl}}"], | |
| "path": ["admin", "users", "{{userId}}"] |
| "raw": "{{baseUrl}}/admin/users/1", | ||
| "host": ["{{baseUrl}}"], | ||
| "path": ["admin", "users", "1"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar ao endpoint 'Get User', usar uma variável para o ID do usuário na URL ({{userId}}) tornaria este endpoint mais flexível e reutilizável para editar diferentes usuários.
| "raw": "{{baseUrl}}/admin/users/1", | |
| "host": ["{{baseUrl}}"], | |
| "path": ["admin", "users", "1"] | |
| "raw": "{{baseUrl}}/admin/users/{{userId}}", | |
| "host": ["{{baseUrl}}"], | |
| "path": ["admin", "users", "{{userId}}"] |
| "raw": "{{baseUrl}}/admin/users/1/full", | ||
| "host": ["{{baseUrl}}"], | ||
| "path": ["admin", "users", "1", "full"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Para consistência e reutilização, é recomendável usar uma variável ({{userId}}) para o ID do usuário na URL, em vez de um valor fixo (1).
| "raw": "{{baseUrl}}/admin/users/1/full", | |
| "host": ["{{baseUrl}}"], | |
| "path": ["admin", "users", "1", "full"] | |
| "raw": "{{baseUrl}}/admin/users/{{userId}}/full", | |
| "host": ["{{baseUrl}}"], | |
| "path": ["admin", "users", "{{userId}}", "full"] |
| "raw": "{{baseUrl}}/session/history?count=50", | ||
| "host": ["{{baseUrl}}"], | ||
| "path": ["session", "history"], | ||
| "query": [ | ||
| { | ||
| "key": "count", | ||
| "value": "50" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O parâmetro count na URL e na seção query está fixo em 50. Embora a descrição mencione que é opcional, seria mais flexível usar uma variável (por exemplo, {{historyCount}}) para permitir testes com diferentes limites de contagem.
| "raw": "{{baseUrl}}/session/history?count=50", | |
| "host": ["{{baseUrl}}"], | |
| "path": ["session", "history"], | |
| "query": [ | |
| { | |
| "key": "count", | |
| "value": "50" | |
| } | |
| "raw": "{{baseUrl}}/session/history?count={{historyCount}}", | |
| "host": ["{{baseUrl}}"], | |
| "path": ["session", "history"], | |
| "query": [ | |
| { | |
| "key": "count", | |
| "value": "{{historyCount}}" | |
| } | |
| ] |
| ], | ||
| "body": { | ||
| "mode": "raw", | ||
| "raw": "{\n \"history\": 50\n}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ], | ||
| "body": { | ||
| "mode": "raw", | ||
| "raw": "{\n \"Url\": \"https://mmg.whatsapp.net/d/f/abc\",\n \"DirectPath\": \"/v/t62.7118-24/abc\",\n \"MediaKey\": \"BASE64_MEDIA_KEY==\",\n \"Mimetype\": \"video/mp4\",\n \"FileEncSHA256\": \"BASE64_FILE_ENC_SHA256==\",\n \"FileSHA256\": \"BASE64_FILE_SHA256==\",\n \"FileLength\": 12345\n}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Os campos Url, DirectPath, MediaKey, Mimetype, FileEncSHA256, FileSHA256 e FileLength estão fixos com valores de exemplo. Para um endpoint de API reutilizável, é melhor usar variáveis (por exemplo, {{mediaUrl}}, {{mediaKey}}, etc.) para esses campos.
"raw": "{\n \"Url\": \"{{mediaUrl}}\",\n \"DirectPath\": \"{{directPath}}\",\n \"MediaKey\": \"{{mediaKey}}\",\n \"Mimetype\": \"video/mp4\",\n \"FileEncSHA256\": \"{{fileEncSha256}}\",\n \"FileSHA256\": \"{{fileSha256}}\",\n \"FileLength\": {{fileLength}}\n}"| ], | ||
| "body": { | ||
| "mode": "raw", | ||
| "raw": "{\n \"Url\": \"https://mmg.whatsapp.net/d/f/abc\",\n \"DirectPath\": \"/v/t62.7118-24/abc\",\n \"MediaKey\": \"BASE64_MEDIA_KEY==\",\n \"Mimetype\": \"image/webp\",\n \"FileEncSHA256\": \"BASE64_FILE_ENC_SHA256==\",\n \"FileSHA256\": \"BASE64_FILE_SHA256==\",\n \"FileLength\": 12345\n}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Os campos Url, DirectPath, MediaKey, Mimetype, FileEncSHA256, FileSHA256 e FileLength estão fixos com valores de exemplo. Para um endpoint de API reutilizável, é melhor usar variáveis (por exemplo, {{mediaUrl}}, {{mediaKey}}, etc.) para esses campos.
"raw": "{\n \"Url\": \"{{mediaUrl}}\",\n \"DirectPath\": \"{{directPath}}\",\n \"MediaKey\": \"{{mediaKey}}\",\n \"Mimetype\": \"image/webp\",\n \"FileEncSHA256\": \"{{fileEncSha256}}\",\n \"FileSHA256\": \"{{fileSha256}}\",\n \"FileLength\": {{fileLength}}\n}"| ], | ||
| "body": { | ||
| "mode": "raw", | ||
| "raw": "{\n \"call_from\": \"5511999999999\",\n \"call_id\": \"CALL_ID_EXAMPLE\"\n}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "raw": "{{baseUrl}}/user/lid/5511999999999", | ||
| "host": ["{{baseUrl}}"], | ||
| "path": ["user", "lid", "5511999999999"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| { "key": "Content-Type", "value": "application/json" } | ||
| ], | ||
| "body": { | ||
| "mode": "raw", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adiciona endpoints de usuário, histórico, mídia e chamadas ao Postman
No description provided.