{"id":19741895,"url":"https://github.com/rafa-kozand/ignite_node.js_challenge_08","last_synced_at":"2025-05-09T01:26:04.558Z","repository":{"id":117404578,"uuid":"604350123","full_name":"Rafa-KozAnd/Ignite_Node.js_Challenge_08","owner":"Rafa-KozAnd","description":"Node JS challenge done with 'Rocketseat' Ignite course. (\"Desafio 09 - Transferências com a FinAPI\")","archived":false,"fork":false,"pushed_at":"2023-04-20T19:05:54.000Z","size":98,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T20:24:38.270Z","etag":null,"topics":["ignite","ignite-nodejs","ignite-rocketseat","javascript","nodejs","rocketseat","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rafa-KozAnd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-20T21:51:07.000Z","updated_at":"2023-04-20T19:06:01.000Z","dependencies_parsed_at":"2024-06-12T00:05:29.686Z","dependency_job_id":null,"html_url":"https://github.com/Rafa-KozAnd/Ignite_Node.js_Challenge_08","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafa-KozAnd%2FIgnite_Node.js_Challenge_08","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafa-KozAnd%2FIgnite_Node.js_Challenge_08/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafa-KozAnd%2FIgnite_Node.js_Challenge_08/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafa-KozAnd%2FIgnite_Node.js_Challenge_08/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rafa-KozAnd","download_url":"https://codeload.github.com/Rafa-KozAnd/Ignite_Node.js_Challenge_08/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253173020,"owners_count":21865611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ignite","ignite-nodejs","ignite-rocketseat","javascript","nodejs","rocketseat","typescript"],"created_at":"2024-11-12T01:28:20.757Z","updated_at":"2025-05-09T01:26:04.508Z","avatar_url":"https://github.com/Rafa-KozAnd.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"http://img.shields.io/static/v1?label=STATUS\u0026message=Concluded\u0026color=blue\u0026style=flat\"/\u003e\n  \u003cimg alt=\"GitHub language count\" src=\"https://img.shields.io/github/languages/count/Rafa-KozAnd/Ignite_Node.js_Challenge_08\"\u003e\n  \u003cimg alt=\"GitHub language count\" src=\"https://img.shields.io/github/languages/top/Rafa-KozAnd/Ignite_Node.js_Challenge_08\"\u003e\n  \u003cimg alt=\"GitHub repo file count\" src=\"https://img.shields.io/github/directory-file-count/Rafa-KozAnd/Ignite_Node.js_Challenge_08\"\u003e\n  \u003cimg alt=\"GitHub repo size\" src=\"https://img.shields.io/github/repo-size/Rafa-KozAnd/Ignite_Node.js_Challenge_08\"\u003e\n  \u003cimg alt=\"GitHub language count\" src=\"https://img.shields.io/github/license/Rafa-KozAnd/Ignite_Node.js_Challenge_08\"\u003e\n\u003c/p\u003e\n\n# Ignite_Node.js_Challenge_08\n\nNode JS challenge done with 'Rocketseat' Ignite course. (\"Desafio 08 - Transferências com a FinAPI\")\n\n# 💻 Sobre o desafio\n\nNesse desafio você irá implementar uma nova funcionalidade na FinAPI, a aplicação que foi testada durante o desafio **[Testes unitários](https://www.notion.so/Desafio-01-Testes-unit-rios-0321db2af07e4b48a85a1e4e360fcd11)**.\n\nA nova funcionalidade deverá permitir a transferência de valores entre contas. Para isso, você pode pensar na melhor forma de construir essa solução mas alguns requisitos deverão ser cumpridos:\n\n- Não deve ser possível transferir valores superiores ao disponível no saldo de uma conta;\n- O balance (obtido através da rota `/api/v1/statements/balance`) deverá considerar também todos os valores transferidos ou recebidos através de transferências ao exibir o saldo de um usuário;\n- As informações para realizar uma transferência serão:\n\n{\n\t\"amount\": 100,\n\t\"description\": \"Descrição da transferência\"\n}\n\nVocê pode passar o `id` do usuário destinatário via parâmetro na rota (exemplo: `/api/v1/statements/transfers/:user_id`) e o id do usuário remetente poderá ser obtido através do token JWT enviado no header da requisição;\n\n- Ao mostrar o balance de um usuário, operações do tipo `transfer` deverão possuir os seguintes campos:\n\n{\n  \"id\": \"4d04b6ec-2280-4dc2-9432-8a00f64e7930\",\n\t\"sender_id\": \"cfd06865-11b9-412a-aa78-f47cc3e52905\"\n  \"amount\": 100,\n  \"description\": \"Transferência de valor\",\n  \"type\": \"transfer\",\n  \"created_at\": \"2021-03-26T21:33:11.370Z\",\n  \"updated_at\": \"2021-03-26T21:33:11.370Z\"\n}\n\nObserve o campo sender_id. Esse deverá ser o id do usuário que enviou a transferência.\nO campo type também deverá exibir o tipo da operação, que nesse caso é transfer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafa-kozand%2Fignite_node.js_challenge_08","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafa-kozand%2Fignite_node.js_challenge_08","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafa-kozand%2Fignite_node.js_challenge_08/lists"}