{"_id":"@afilimax/mercado-livre-provider","_rev":"5-404d3de0b50cdf127f860a598f9fb15d","name":"@afilimax/mercado-livre-provider","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@afilimax/mercado-livre-provider","version":"0.1.0","keywords":["afilimax","mercado livre","afiliados","mercado livre afiliado"],"author":{"name":"Marcuth"},"license":"MIT","_id":"@afilimax/mercado-livre-provider@0.1.0","maintainers":[{"name":"marcuth","email":"marcuth2006@gmail.com"}],"homepage":"https://github.com/Afilimax/mercado-livre-provider#readme","bugs":{"url":"https://github.com/Afilimax/mercado-livre-provider/issues"},"dist":{"shasum":"045a951b8ad7b33590f1ea3c72d48c6d4c0355d7","tarball":"https://registry.npmjs.org/@afilimax/mercado-livre-provider/-/mercado-livre-provider-0.1.0.tgz","fileCount":7,"integrity":"sha512-hQes2oP7s8iySBIDm+Un/TLdtkDwfrRUn7O3EpZPY7dSkf4kLeDO996AB7ktNQ5dVlN9bejUUuMjZOZXpTvQvg==","signatures":[{"sig":"MEQCICP0uByLtFFDQXLSWnz9kwyKIPw/W/5lVrvarYtkk1JoAiAohlFEeSWtHnsym+8HfLYBYjxI52e4/XpxSazHW1YzRw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8875},"main":"./dist/index.js","type":"commonjs","types":"./dist/index.d.ts","module":"./dist/index.js","gitHead":"f8103431e46ee3e2376fa1288d6a4a079805dbdd","scripts":{"dev":"ts-node ./src/index.ts","lint":"eslint \"src/**/*.ts\" --fix","test":"vitest run","build":"tsc","format":"prettier --write \"src/**/*.ts\""},"_npmUser":{"name":"marcuth","email":"marcuth2006@gmail.com"},"repository":{"url":"git+https://github.com/Afilimax/mercado-livre-provider.git","type":"git"},"_npmVersion":"11.8.0","description":"Provedor de links de afiliados para o Mercado Livre, integrado ao ecossistema Afilimax. Este pacote permite converter URLs de produtos do Mercado Livre em links de afiliados encurtados utilizando a API oficial (via headers de autenticação/cookies).","directories":{},"_nodeVersion":"24.13.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.0.3","vitest":"^4.1.0","ts-node":"^10.9.2","prettier":"^3.8.1","typescript":"^5.9.3","@types/node":"^25.5.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5","eslint-plugin-unused-imports":"^4.4.1","prettier-plugin-sort-imports":"^1.8.11"},"peerDependencies":{"@afilimax/core":"^0.4.1"},"_npmOperationalInternal":{"tmp":"tmp/mercado-livre-provider_0.1.0_1773549554733_0.7911392077721398","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@afilimax/mercado-livre-provider","version":"0.1.1","keywords":["afilimax","mercado livre","afiliados","mercado livre afiliado"],"author":{"name":"Marcuth"},"license":"MIT","_id":"@afilimax/mercado-livre-provider@0.1.1","maintainers":[{"name":"marcuth","email":"marcuth2006@gmail.com"}],"homepage":"https://github.com/Afilimax/mercado-livre-provider#readme","bugs":{"url":"https://github.com/Afilimax/mercado-livre-provider/issues"},"dist":{"shasum":"12964cdcfb4c4182a62115ff3deaefc01cb8177a","tarball":"https://registry.npmjs.org/@afilimax/mercado-livre-provider/-/mercado-livre-provider-0.1.1.tgz","fileCount":7,"integrity":"sha512-mdS7M59ht1s0pivh5kHF1+ILRgHtSJf8MoB0HbzoG25Iama054yHYMHsOwZCeGwhWc2PHwFIzFVFr5cKzIKfYQ==","signatures":[{"sig":"MEUCIFAW+99YQtg/l6FBWtaFv5Uavvya+Tn+X/7fyYrqUKd+AiEA7E/8jS8CfzepEGr5cRDZ1s/0JsM+4KisrIbLEdnDNzU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8933},"main":"./dist/index.js","type":"commonjs","types":"./dist/index.d.ts","module":"./dist/index.js","gitHead":"52cbdc38dd8dac733c8aaf5bc21d344ade5c850c","scripts":{"dev":"ts-node ./src/index.ts","lint":"eslint \"src/**/*.ts\" --fix","test":"vitest run","build":"tsc","format":"prettier --write \"src/**/*.ts\""},"_npmUser":{"name":"marcuth","email":"marcuth2006@gmail.com"},"repository":{"url":"git+https://github.com/Afilimax/mercado-livre-provider.git","type":"git"},"_npmVersion":"11.8.0","description":"Provedor de links de afiliados para o Mercado Livre, integrado ao ecossistema Afilimax. Este pacote permite converter URLs de produtos do Mercado Livre em links de afiliados encurtados utilizando a API oficial (via headers de autenticação/cookies).","directories":{},"_nodeVersion":"24.13.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.0.3","vitest":"^4.1.0","ts-node":"^10.9.2","prettier":"^3.8.1","typescript":"^5.9.3","@types/node":"^25.5.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5","eslint-plugin-unused-imports":"^4.4.1","prettier-plugin-sort-imports":"^1.8.11"},"peerDependencies":{"@afilimax/core":"^0.4.1"},"_npmOperationalInternal":{"tmp":"tmp/mercado-livre-provider_0.1.1_1788042852948_0.6245978873328315","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@afilimax/mercado-livre-provider","version":"0.1.2","keywords":["afilimax","mercado livre","afiliados","mercado livre afiliado"],"author":{"name":"Marcuth"},"license":"MIT","_id":"@afilimax/mercado-livre-provider@0.1.2","maintainers":[{"name":"marcuth","email":"marcuth2006@gmail.com"}],"homepage":"https://github.com/Afilimax/mercado-livre-provider#readme","bugs":{"url":"https://github.com/Afilimax/mercado-livre-provider/issues"},"dist":{"shasum":"707edee1199ce6c37210cde8c7289e4766dfa7d7","tarball":"https://registry.npmjs.org/@afilimax/mercado-livre-provider/-/mercado-livre-provider-0.1.2.tgz","fileCount":7,"integrity":"sha512-6GicwULquCK9x2HN5E2LJ/0XXy+I8n8CpDgPG1dq2+bz2uJknlQn8GxT0C3K/YWFKqNNAPBjwgu5Gcq4nMNagA==","signatures":[{"sig":"MEUCIQCo4cp8ENqH+dv6FLIokA0B23ztBpG0311Fg7Huw6CRqgIgLTDax/FLpiKqHoxfyJqJbs4LTkRDmAsotrhuiKZ1BWs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9672},"main":"./dist/index.js","type":"commonjs","types":"./dist/index.d.ts","module":"./dist/index.js","gitHead":"d1b4eec1f031d69327e3beffe2c9c524f472cd9e","scripts":{"dev":"ts-node ./src/index.ts","lint":"eslint \"src/**/*.ts\" --fix","test":"vitest run","build":"tsc","format":"prettier --write \"src/**/*.ts\""},"_npmUser":{"name":"marcuth","email":"marcuth2006@gmail.com"},"repository":{"url":"git+https://github.com/Afilimax/mercado-livre-provider.git","type":"git"},"_npmVersion":"11.8.0","description":"Provedor de links de afiliados para o Mercado Livre, integrado ao ecossistema Afilimax. Este pacote permite converter URLs de produtos do Mercado Livre em links de afiliados encurtados utilizando a API oficial (via headers de autenticação/cookies).","directories":{},"_nodeVersion":"24.13.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.0.3","vitest":"^4.1.0","ts-node":"^10.9.2","prettier":"^3.8.1","typescript":"^5.9.3","@types/node":"^25.5.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5","eslint-plugin-unused-imports":"^4.4.1","prettier-plugin-sort-imports":"^1.8.11"},"peerDependencies":{"@afilimax/core":"^0.4.1"},"_npmOperationalInternal":{"tmp":"tmp/mercado-livre-provider_0.1.2_1788046818319_0.2850558026451504","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@afilimax/mercado-livre-provider","version":"0.1.3","keywords":["afilimax","mercado livre","afiliados","mercado livre afiliado"],"author":{"name":"Marcuth"},"license":"MIT","_id":"@afilimax/mercado-livre-provider@0.1.3","maintainers":[{"name":"marcuth","email":"marcuth2006@gmail.com"}],"homepage":"https://github.com/Afilimax/mercado-livre-provider#readme","bugs":{"url":"https://github.com/Afilimax/mercado-livre-provider/issues"},"dist":{"shasum":"52fc6271a8f03c7708f5af01b25aadb7b5951cbe","tarball":"https://registry.npmjs.org/@afilimax/mercado-livre-provider/-/mercado-livre-provider-0.1.3.tgz","fileCount":7,"integrity":"sha512-zTVVKKztmAoNck/ltRmmKr7BDqGcQ6lryek54sMwnLD883HOBpPZlpnHcub8PiD/6PAsfrnJsqr5Zru7VtM02A==","signatures":[{"sig":"MEUCIQDBOEPeMWgqpPOO6Xwkv7SzPsCcVTnF8NBjT4hNWUbDvQIgLuUKOgvbi7Hy09Ux6wJLYLpBGrxEHVp2YbwttUGcLe8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10114},"main":"./dist/index.js","type":"commonjs","types":"./dist/index.d.ts","module":"./dist/index.js","gitHead":"c3dc82ddd1448d95d5189edca4669e77f70a1317","scripts":{"dev":"ts-node ./src/index.ts","lint":"eslint \"src/**/*.ts\" --fix","test":"vitest run","build":"tsc","format":"prettier --write \"src/**/*.ts\""},"_npmUser":{"name":"marcuth","email":"marcuth2006@gmail.com"},"repository":{"url":"git+https://github.com/Afilimax/mercado-livre-provider.git","type":"git"},"_npmVersion":"11.8.0","description":"Provedor de links de afiliados para o Mercado Livre, integrado ao ecossistema Afilimax. Este pacote permite converter URLs de produtos do Mercado Livre em links de afiliados encurtados utilizando a API oficial (via headers de autenticação/cookies).","directories":{},"_nodeVersion":"24.13.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.0.3","vitest":"^4.1.0","ts-node":"^10.9.2","prettier":"^3.8.1","typescript":"^5.9.3","@types/node":"^25.5.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5","eslint-plugin-unused-imports":"^4.4.1","prettier-plugin-sort-imports":"^1.8.11"},"peerDependencies":{"@afilimax/core":"^0.4.1"},"_npmOperationalInternal":{"tmp":"tmp/mercado-livre-provider_0.1.3_1788048160963_0.12126690840648835","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@afilimax/mercado-livre-provider","description":"Provedor de links de afiliados para o Mercado Livre, integrado ao ecossistema Afilimax. Este pacote permite converter URLs de produtos do Mercado Livre em links de afiliados encurtados utilizando a API oficial (via headers de autenticação/cookies).","version":"0.1.4","type":"commonjs","repository":{"type":"git","url":"git+https://github.com/Afilimax/mercado-livre-provider.git"},"homepage":"https://github.com/Afilimax/mercado-livre-provider#readme","bugs":{"url":"https://github.com/Afilimax/mercado-livre-provider/issues"},"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"tsc","dev":"ts-node ./src/index.ts","format":"prettier --write \"src/**/*.ts\"","lint":"eslint \"src/**/*.ts\" --fix","test":"vitest run"},"publishConfig":{"access":"public"},"keywords":["afilimax","mercado livre","afiliados","mercado livre afiliado"],"author":{"name":"Marcuth"},"license":"MIT","devDependencies":{"@types/node":"^25.5.0","eslint":"^10.0.3","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5","eslint-plugin-unused-imports":"^4.4.1","prettier":"^3.8.1","prettier-plugin-sort-imports":"^1.8.11","ts-node":"^10.9.2","typescript":"^5.9.3","vitest":"^4.1.0"},"peerDependencies":{"@afilimax/core":"^0.4.1"},"dependencies":{"@xcrap/core":"^0.2.3","@xcrap/extractor":"^0.3.2","@xcrap/got-scraping-client":"^0.1.1"},"gitHead":"f2594f9c1c52344d97679a10a096d90d31ad4a4a","_id":"@afilimax/mercado-livre-provider@0.1.4","_nodeVersion":"24.13.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-nDun5Fz/YtLsdaQw/p/S8gcIMS0WKxDIsmzuWeJc0ogOHI7qyqN6Twg2twc6ZA7YvxUGp8futJZf3L6YiGLjKA==","shasum":"6c99173a3df380e73dcca55fb359600f27096624","tarball":"https://registry.npmjs.org/@afilimax/mercado-livre-provider/-/mercado-livre-provider-0.1.4.tgz","fileCount":13,"unpackedSize":12940,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC3J/RDoIOpo5XlwSp66segWaPXBKbqi+vrr6w4e1efhwIgaXgdHfjmUnvcuFy8spuDJz0oReuxxqvOLTMWhKvYlTU="}]},"_npmUser":{"name":"marcuth","email":"marcuth2006@gmail.com"},"directories":{},"maintainers":[{"name":"marcuth","email":"marcuth2006@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mercado-livre-provider_0.1.4_1788294349645_0.6689316652069743"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-15T04:39:14.674Z","modified":"2026-09-01T20:25:50.028Z","0.1.0":"2026-03-15T04:39:14.888Z","0.1.1":"2026-08-29T22:34:13.084Z","0.1.2":"2026-08-29T23:40:18.460Z","0.1.3":"2026-08-30T00:02:41.095Z","0.1.4":"2026-09-01T20:25:49.862Z"},"bugs":{"url":"https://github.com/Afilimax/mercado-livre-provider/issues"},"author":{"name":"Marcuth"},"license":"MIT","homepage":"https://github.com/Afilimax/mercado-livre-provider#readme","keywords":["afilimax","mercado livre","afiliados","mercado livre afiliado"],"repository":{"type":"git","url":"git+https://github.com/Afilimax/mercado-livre-provider.git"},"description":"Provedor de links de afiliados para o Mercado Livre, integrado ao ecossistema Afilimax. Este pacote permite converter URLs de produtos do Mercado Livre em links de afiliados encurtados utilizando a API oficial (via headers de autenticação/cookies).","maintainers":[{"name":"marcuth","email":"marcuth2006@gmail.com"}],"readme":"# @afilimax/mercado-livre-provider\n\nProvedor de links de afiliados para o Mercado Livre, integrado ao ecossistema Afilimax. Este pacote permite converter URLs de produtos do Mercado Livre em links de afiliados encurtados utilizando a API oficial (via headers de autenticação/cookies).\n\n## Instalação\n\n```bash\nnpm install @afilimax/mercado-livre-provider\n```\n\n> [!IMPORTANT]\n> Este pacote requer `@afilimax/core` como dependência de par (peer dependency).\n\n## Como usar\n\nO `MercadoLivreProvider` utiliza autenticação baseada em cookies para interagir com a API de afiliados do Mercado Livre.\n\n```typescript\nimport { MercadoLivreProvider } from \"@afilimax/mercado-livre-provider\";\n\nconst provider = new MercadoLivreProvider({\n    tag: \"sua_tag_de_afiliado\",\n    cookies: [\n        { name: \"_csrf\", value: \"seu_token_csrf\" },\n        { name: \"_d2id\", value: \"...\" },\n        // outros cookies necessários para a sessão\n    ]\n});\n\nasync function run() {\n    const originalUrl = \"https://produto.mercadolivre.com.br/MLB-12345678-produto-exemplo-_JM\";\n    \n    try {\n        const affiliateUrl = await provider.createAffiliateUrl(originalUrl);\n        console.log(\"Link de Afiliado:\", affiliateUrl); // Retorna a short_url gerada\n    } catch (error) {\n        console.error(\"Erro ao gerar link:\", error.message);\n    }\n}\n\nrun();\n```\n\n## Configurações\n\nA interface `MercadoLivreProviderOptions` aceita as seguintes propriedades:\n\n| Propriedade | Tipo | Descrição |\n| :--- | :--- | :--- |\n| `tag` | `string` | Sua tag de identificação de afiliado (nickname/ID). |\n| `cookies` | `any[]` | Array de cookies de sessão para autenticação na API. |\n\n## Domínios Suportados\n\nO provedor identifica automaticamente URLs dos seguintes domínios:\n- `mercadolivre.com.br`\n- `meli.la`\n\n## Desenvolvimento\n\n### Scripts Disponíveis\n\n- `npm run build`: Compila o projeto para o diretório `dist`.\n- `npm run dev`: Executa o projeto em ambiente de desenvolvimento usando `ts-node`.\n- `npm run lint`: Verifica e corrige problemas de estilo de código.\n- `npm run format`: Formata o código fonte usando Prettier.\n\n---\n\nProduzido com ❤️ pela equipe **Afilimax**.","readmeFilename":"README.md"}