{"_id":"juno-api-wrapper","_rev":"36-07709538c45b0aff15cbffc40abd040c","time":{"0.1.1":"2021-09-07T23:01:07.947Z","0.1.2":"2021-09-07T23:01:07.947Z","0.1.3":"2021-09-07T23:01:07.947Z","0.1.4":"2021-09-07T23:01:07.947Z","0.1.5":"2021-09-07T23:01:07.947Z","0.1.6":"2021-09-07T23:01:07.947Z","0.1.7":"2021-09-07T23:01:07.947Z","0.1.8":"2021-09-07T23:01:07.947Z","0.1.9":"2021-09-07T23:01:07.947Z","0.2.0":"2021-09-07T23:01:07.947Z","0.2.1":"2021-09-07T23:01:07.947Z","0.2.2":"2021-09-07T23:01:07.947Z","0.2.3":"2021-09-07T23:01:07.947Z","0.2.4":"2021-09-07T23:01:07.947Z","0.2.5":"2021-09-07T23:01:07.947Z","0.2.6":"2021-09-07T23:01:07.947Z","0.2.7":"2021-09-07T23:01:07.947Z","0.2.8":"2021-09-07T23:01:07.947Z","0.2.9":"2021-09-07T23:01:07.947Z","0.3.0":"2021-09-07T23:01:07.947Z","0.3.1":"2021-09-07T23:01:07.947Z","0.3.2":"2021-09-07T23:01:07.947Z","0.3.3":"2021-09-07T23:01:07.947Z","0.3.4":"2021-09-07T23:01:07.947Z","0.3.5":"2021-09-07T23:01:07.947Z","0.3.6":"2021-09-07T23:01:07.947Z","0.3.7":"2021-09-07T23:01:07.947Z","0.3.8":"2021-09-07T23:01:07.947Z","0.3.9":"2021-09-07T23:01:07.947Z","0.4.0":"2021-09-07T23:01:07.947Z","0.4.1":"2021-09-07T23:01:07.947Z","created":"2021-10-25T17:42:11.811Z","1.0.0":"2021-10-25T17:42:11.972Z","modified":"2022-05-07T01:05:50.619Z"},"name":"juno-api-wrapper","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"juno-api-wrapper","version":"1.0.0","description":"A wrapper for Juno API","main":"./build/src/index.js","typings":"./juno.d.ts","scripts":{"build":"tsc","prepare":"npm build"},"keywords":["API","api","juno","payments"],"repository":{"type":"git","url":"git+https://github.com/Mdsp9070/juno-api-wrapper.git"},"author":{"name":"Matheus de Souza Pessanha","email":"matheus_pessanha2001@outlook.com"},"license":"MIT","devDependencies":{"@types/node":"^14.6.3","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","eslint":"^7.8.1","typescript":"^4.0.2"},"dependencies":{"axios":"^0.20.0"},"gitHead":"eaeb0ad4b0915497363122d4fc9a52370afda131","bugs":{"url":"https://github.com/Mdsp9070/juno-api-wrapper/issues"},"homepage":"https://github.com/Mdsp9070/juno-api-wrapper#readme","_id":"juno-api-wrapper@1.0.0","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-RTlZZftuitVYj9WnviJzZgtPfP3ZRLfVVyVYgY0cWk+pDNvTFTpyHHAbXgwlPc6/OSVQNfxh/xzrFUZ1CQjXgw==","shasum":"c710469a6c519314e57c61f1772068b6c9639261","tarball":"https://registry.npmjs.org/juno-api-wrapper/-/juno-api-wrapper-1.0.0.tgz","fileCount":11,"unpackedSize":10695,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2w2ICRA9TVsSAnZWagAAV38P/RbAqXdDGZj3/RzlXaa2\nrNmdj+8rD19qfnFtvsrgTI4EKRK6ZQzrD8hQoe6okZO/40CbaPeJ1BbJI/Pk\nH/9CvxOgDk15xaAz0hzAOSfrGnwF4t4WUb94hvTLvasa5vP+DMT7elI6EnYN\nyWMHKKxjVksU0RSvsB0G1xRxh9Mh9bSqabxfU1E5DLp7xgA9GiewyhCzcFGD\nn65kw+r/fH9pltUgIjxk0R0U7H/t799b5IARzbzQmxCTLTCd4S/djhA2pxIM\nc6zPpk/AJfodGA/iTbowiQ8DMTFI2iHdZ8FbJHN01FNgMPCwBcoyWmGkosP4\nw3pxyq8cxEnOEUQ2PNsUHhc68J43OG+QlZ+J8Rm69vZGpwKOWOGfgHpj0L/s\nusUZFCzc052S/WvtIbYBHNcHr0UqTyniMPzscU3WYHEz5igzaMWqK8dvs0Ot\n1ojFcc79tMOOxxuQOevoMs/J2GFRyNbiINV2UAxnvIxnAHlqW7Uqi8NwzLLG\n6Yv2nZz/cEs2qPqn58GJnKTsXOpu7rEBBkGbloEzG2XLibc5wCl5EcDdbXn8\nJagsXKuWs9/G72aOfzjr6ZikYi7secickwrsLFyu4LrWesjQDMWxT4QvEvZq\nhi6ThudO80jx576Z7tX9ZMenG4qRYmJG+1S19mfCr4xOTjzZ+xWqXZCz/P6l\nXxqP\r\n=qVUn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHI1dth2A/LqqxS0PoBnoX1+vsu54QQbqS58xdK+r4caAiA35rCgb3eTjWyxBuVb5Ok6DfsGu0tREWcUSiuihkh0Zw=="}]},"_npmUser":{"name":"guilhermedev","email":"guilhermedev@hotmail.com"},"directories":{},"maintainers":[{"name":"guilhermedev","email":"guilhermedev@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/juno-api-wrapper_1.0.0_1635183731811_0.978666095855774"},"_hasShrinkwrap":false}},"maintainers":[{"name":"guilhermedev","email":"guilhermedev@hotmail.com"}],"description":"A wrapper for Juno API","homepage":"https://github.com/Mdsp9070/juno-api-wrapper#readme","keywords":["API","api","juno","payments"],"repository":{"type":"git","url":"git+https://github.com/Mdsp9070/juno-api-wrapper.git"},"author":{"name":"Matheus de Souza Pessanha","email":"matheus_pessanha2001@outlook.com"},"bugs":{"url":"https://github.com/Mdsp9070/juno-api-wrapper/issues"},"license":"MIT","readme":"# Juno API Wrapper\r\n\r\nA Wrapper for [Juno API](https://dev.juno.com.br/api/v2)\r\n\r\n## Installation\r\n\r\n```shell\r\n$ npm install --save juno-api-wrapper\r\n\r\n$ yarn add juno-api-wrapper\r\n```\r\n\r\n## API\r\n\r\n### getAccessToken\r\n\r\nReturns the oauth token to be used on `Juno` constructor.\r\n\r\n#### Example\r\n```typescript\r\n  import { getAccessToken } from 'juno-api-wrapper'\r\n\r\n  const token = await getAccessToken(clientId: string, clientSecret: string, isSandbox: boolean)\r\n```\r\n\r\n### Juno\r\n\r\nCreates a new `Juno` instance.\r\n\r\n#### Arguments\r\n\r\n```shell\r\n<options> - JavaScript Object with configuration options\r\n```\r\n\r\n##### Options\r\n\r\n```shell\r\naccessToken: string - oauth token, got with getAccessToken method\r\n\r\nresourceToken: string - private token, generated on Juno platform\r\n\r\nisSandbox: boolean - if you only want to test your API, set to true; default === false\r\n```\r\n\r\n#### Example\r\n\r\n```typescript\r\n  import { getAccesToken, Juno } from 'juno-api-wrapper'\r\n\r\n  const token = await getAccesToken(clientId, clientSecret);\r\n\r\n  const options = {\r\n    accessToken: token,\r\n    resourceToken: process.env.TOKEN,\r\n  };\r\n\r\n  const juno = new Juno(options);\r\n\r\n  // returns a balance object\r\n  // {\r\n  //   balance: number;\r\n  //   withheldBalance: number;\r\n  //   transferableBalance: number;\r\n  // }\r\n  juno.getBalance(): Promise\r\n\r\n  // returns a list of available banks\r\n  // { name: string; number: string }[]\r\n  juno.listBanks(): Promise\r\n\r\n  // creates a charge\r\n  // receiveis 2 arguments:\r\n  //\r\n  // newCharge = {\r\n  //   description: string;\r\n  //   amount: string;\r\n  //   installments: number;\r\n  //   paymentType: 'BOLETO' | 'CREDIT_CARD';\r\n  // }\r\n  //\r\n  // billing = {\r\n  //   name: string;\r\n  //   document: string; CPF | CNPJ\r\n  //   email: string;\r\n  //   phone: string;\r\n  // }\r\n  //\r\n  // return an array of Charges\r\n  juno.createCharge(newCharge, billing): Promise\r\n\r\n  // returns the charges status\r\n  //\r\n  // response = {\r\n  //   amount: number;\r\n  //   payments: {\r\n  //     id: string;\r\n  //     code: number;\r\n  //     status: string;\r\n  //     date: string;\r\n  //     amount: number;\r\n  //     transactionId: string;\r\n  //     failReason: string;\r\n  //   }[];\r\n  // }\r\n  juno.checkChargeStatus(chargeId: string): Promise\r\n```\r\n","readmeFilename":"README.md"}