{"_id":"@blueislandx/island-union-sdk","_rev":"2-7df668497a288963fca51d1e9a836f3a","name":"@blueislandx/island-union-sdk","dist-tags":{"latest":"1.1.2"},"versions":{"1.1.0":{"name":"@blueislandx/island-union-sdk","version":"1.1.0","description":"Island (小蓝岛) 购物平台联盟聚合 SDK (淘宝联盟、京东联盟、多多进宝、苏宁联盟、唯品会联盟、考拉联盟、有赞联盟)","main":"union/index.js","scripts":{"build":"tsc"},"repository":{"type":"git","url":"git+https://github.com/Blue-Island-X/Island-Union-SDK.git"},"keywords":["island","union","taobao","taobaoke","alimama","jd","jingdong","pinduoduo","duoduojinbao","suning","vip","vipshop","kaola","youzan"],"author":{"name":"开封小蓝岛科技有限公司"},"license":"MIT","bugs":{"url":"https://github.com/Blue-Island-X/Island-Union-SDK/issues"},"homepage":"https://github.com/Blue-Island-X/Island-Union-SDK#readme","dependencies":{"axios":"^1.3.3","crypto-js":"^4.1.1","form-data":"^4.0.0","moment":"^2.29.4"},"devDependencies":{"@types/crypto-js":"^4.1.1","@types/node":"^18.13.0","@types/qs":"^6.9.7","typescript":"^4.9.5","uuid":"^9.0.0"},"directories":{"test":"test"},"gitHead":"a518f75edcfbe36713fa817349abeb2c752abe5e","_id":"@blueislandx/island-union-sdk@1.1.0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-n2RtqSd1f1O2vg3g5Gh0r/CnaQWq8G1mXzLTRFd8NRBdw/bjMPhDxHKP/KNi8o0Mx4/BsVQ7a4+OfHk9o8HoeQ==","shasum":"d575e585beed2bbfb67d26bc917a509db3c64817","tarball":"https://registry.npmjs.org/@blueislandx/island-union-sdk/-/island-union-sdk-1.1.0.tgz","fileCount":54,"unpackedSize":336820,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDjozqLZ1el1lsg2kj+tt1l4uJLGl+rYR6tLrc/r0HXeAiEA2F3kRPGqcOvCgs4M+Ztbc6aPN6tkplBIstpNfEr+Vdc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj9aflACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp/3w/+JVvoNUCNAgIn8DtWyPX7O10lkgjZjFaYTN10Yf39qA+bLS/0\r\nvZersa9jBTQ6gZbhU1aYtmF/K8Jn2llVTlaIv6d54TrdPNrKWq07OQikQZ7Q\r\ngo7uGx+veiOTLBUV/9M9limpWsReYcJHtOSWD4iqcgVuNjWmWelpyy5p3En4\r\n7eX5hr6FOm3AP7nbTNSp4VZr1tvqHgfQtCPQQoTekWqqxuAva1D0M8vUoBi4\r\nzmMT0dJMfA4Rbdy+hDOfzXmKmIctCc7Np22h8QGH3+k5Jkmm9krwbMc+nwTn\r\nRRmq1k4JOX4TcGs8ozlT3t9bnPY0HXN+6v3vIgc70/xCwKU4yIbMJxCkUJNf\r\nAZuSthj+8SItaAdBqVk65ehKEm0kRmKiSo/nfV9Ct8ce7VPbfrNTsn0xBYk5\r\nhouInnfOKi6Mn2NQdi6O5Q5mVyCZ5uUzDsrCY8vm0r6eu08uhJhryUgO0yGS\r\n9bMP0d+3+D2QU3AQqSXfyuu5KjAtO+aCSCrqVfahpqJX86mQf0746K2dsZxS\r\nELLt0IZbzGPiIsN2WKxIlyDY/c2cmI3FrPeASgE0fX2M6H9aM7poa7Xr9dW6\r\ncVuNePwelNLXVlOOI9ly3Sv2sUQVcQh7mgQrSb6uAbvYteosICnZ1N0qt7RU\r\nXTt83uxzHBm8zKkE9Bc+9cvMWeau1z9SZjQ=\r\n=AUWq\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"blueislandx","email":"BlueIslandX@protonmail.com"},"maintainers":[{"name":"blueislandx","email":"BlueIslandX@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/island-union-sdk_1.1.0_1677043685175_0.2650615338437652"},"_hasShrinkwrap":false},"1.1.1":{"name":"@blueislandx/island-union-sdk","version":"1.1.1","description":"Island (小蓝岛) 购物平台联盟聚合 SDK (淘宝联盟、京东联盟、多多进宝、苏宁联盟、唯品会联盟、考拉联盟、有赞联盟)","main":"union/index.js","scripts":{"build":"tsc"},"repository":{"type":"git","url":"git+https://github.com/Blue-Island-X/Island-Union-SDK.git"},"keywords":["island","union","taobao","taobaoke","alibaba","alimama","jd","jingdong","pinduoduo","duoduojinbao","suning","vip","vipshop","kaola","youzan"],"author":{"name":"开封小蓝岛科技有限公司"},"license":"MIT","bugs":{"url":"https://github.com/Blue-Island-X/Island-Union-SDK/issues"},"homepage":"https://github.com/Blue-Island-X/Island-Union-SDK#readme","dependencies":{"axios":"^1.3.4","crypto-js":"^4.1.1","form-data":"^4.0.0","moment":"^2.29.4"},"devDependencies":{"@types/crypto-js":"^4.1.1","@types/node":"^18.13.0","@types/qs":"^6.9.7","typescript":"^4.9.5","uuid":"^9.0.0"},"directories":{"test":"test"},"types":"./union/index.d.ts","gitHead":"1288dd999f53d3e1aac79a61b63604c1cae98e73","_id":"@blueislandx/island-union-sdk@1.1.1","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-IiLWSssZuFT18w7J48JtwmEZ3wd9R9k9SLcqgh6HEHR8IFJGrCFWewUMlRed5abxeKRVRAKGBPQh0ALJBp6kqA==","shasum":"c9ee63584586d6e1bba55a3ea0f89b6293e18d57","tarball":"https://registry.npmjs.org/@blueislandx/island-union-sdk/-/island-union-sdk-1.1.1.tgz","fileCount":74,"unpackedSize":341261,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjhYCAz31LbZ/3WXzhvc0znfcDzVMv8BvTpfGf3scGaQIgVg3UViQb6MU2r90n6GKwbuiUu6j8zdgmUrQi2H9vWdE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj+drcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqtJA//Y2wEj6BuIWkGjyi8TCgEmQsILYIS3jCIXjhg0lnX9WJPGsI8\r\nlpDv2Ds6D+MOn50hlxeHDD/VttQ+YcHGeueB/wxEZaM98cNbDCB91V04BMmz\r\n/aL1elz1QK8ImAmc1s5gTVqKjCI3ySuuxWBZFpbUKu2F0qk4umE0hjfHeOzl\r\nNgHs4lIeOKK1Mnav4sLjWqIP+4qhYvpyXi6cYnch4DPcAYzsdJDjgNDdB1nh\r\nc8NgYQtuTxWPKrxxGQQu1fZofDDz1CsAT/Rl7M8n47nqUEMJClj6aT02Z8Kp\r\nFOYG9H6QOeTYa7GbTdWAkqTgQ3EYwHXa6KL6KoEYd/7GucvMsaJuPFWhXGZd\r\nd0zuYihvfIOAuxdhiijC1584Wwx16IFG2bS+4vbe6W1eOH62tfl/sH6mpxdN\r\nMgiixvFBoPvl/35+kNlN1AkGTFVQ2TZnJ3sES/RjiCwX5MwvePFY7MwkDNss\r\nAp2bHii1ruj73BqYjLyxS/iZ1DeNZNsIyz+nIfU6s0OASDPYsQzFS7JRvqMh\r\nPImC/CPDBxsxL23j8gRGrI5IaKZYeeOnWbSTwfKr7TVNbrwIXN5yKjeFQ+zZ\r\n3EQ89eVtd3CXy+zcUZaOi+BPkuse5hpJ7DeaM4BYwH5nNn4mRGz1FszKCAd5\r\nhJAhF5P2jIu8WWNQg5V4gTafmB/54ul1QjY=\r\n=nIIK\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"blueislandx","email":"BlueIslandX@protonmail.com"},"maintainers":[{"name":"blueislandx","email":"BlueIslandX@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/island-union-sdk_1.1.1_1677318876031_0.05360552580958333"},"_hasShrinkwrap":false},"1.1.2":{"name":"@blueislandx/island-union-sdk","version":"1.1.2","description":"Island (小蓝岛) 购物平台联盟聚合 SDK (淘宝联盟、京东联盟、多多进宝、苏宁联盟、唯品会联盟、考拉联盟、有赞联盟)","main":"union/index.js","scripts":{"build":"tsc"},"repository":{"type":"git","url":"git+https://github.com/Blue-Island-X/Island-Union-SDK.git"},"keywords":["island","union","taobao","taobaoke","alibaba","alimama","jd","jingdong","pinduoduo","duoduojinbao","suning","vip","vipshop","kaola","youzan"],"author":{"name":"开封小蓝岛科技有限公司"},"license":"MIT","bugs":{"url":"https://github.com/Blue-Island-X/Island-Union-SDK/issues"},"homepage":"https://github.com/Blue-Island-X/Island-Union-SDK#readme","dependencies":{"axios":"^1.3.4","crypto-js":"^4.1.1","form-data":"^4.0.0","moment":"^2.29.4"},"devDependencies":{"@types/crypto-js":"^4.1.1","@types/node":"^18.13.0","@types/qs":"^6.9.7","typescript":"^4.9.5","uuid":"^9.0.0"},"directories":{"test":"test"},"types":"./union/index.d.ts","gitHead":"7389443a4a3c0ecd9c0d67f73bd4d3cb1e160532","_id":"@blueislandx/island-union-sdk@1.1.2","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-eSpK8NCa83yYBFYR9wv8rUfQsg/rMyyeb2q2UcYF3YrDEHf8mFqB8Ur1Bi+BiutCRZavaakM+Sm2uPUfDYOTcg==","shasum":"cf6dd37805d2d9c2abb90637542f7761f4f726d4","tarball":"https://registry.npmjs.org/@blueislandx/island-union-sdk/-/island-union-sdk-1.1.2.tgz","fileCount":95,"unpackedSize":343680,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkuG6PF25Bk6KISWv/TD5syEycWNOZKB9SsXHTFO0ZIwIhAMAvXfaqv1P7kp8qGjLhl/qb9oe4V8nqwnJ7QyzX1ddF"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/sUxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqfExAAlaXNYZGGomknKUn/PZbK60sxT6UsB2NrI+wODAyFY5mhNJsF\r\neuubAsbCFRh/Txn0wEc0Nz+hrHykmvWSA5ZRAatKwA6jWbM4Yv/3DxUFCrok\r\ngvpyLsmziBZ2XjTpkY1ffc0xvQ193Am1b/3V49MQV+vIMZ9dwpEefMdJJ+uV\r\nme6myowY8yqx/aibWHh4fuUPaPUvUrglvQg4yKxKgNkjsNIdfaYZDl42g9c1\r\nKj1jPcZ/fVUwMAIDCCXfkeZppgO2je7v7ZYBsa0PanpV3KLm3m90EKEa63Hy\r\nLmyRDRehJGqS9TzYnkF7cSU4xLhUQzt0VMvvidMRfIo4Lqvzj67BBFmZMUWF\r\nvdZF5MyNeC3sz3iqI0MK6dtYVt600qXrrOfln9uBafJfGo9rHhBy1zlAwGR/\r\nY/3/3dP7HeqPMe1IRHOa0u/Tz6GgvtDiTA+F/506fEMw/nnrz9tEq+KdQJOH\r\npB+S262BdREahgKJSOrkI8XvAt+DgHhU9ySdffGJcTtowld5EFwOboxq2aFY\r\nEZbyx50oTDm2f+0vrUREIj+cBzaIwHMfo2dHY7YPNjaRkHEGvty1A6i5+2HK\r\nW8Pn0dLRG4EbCMJioXg7RdUQfBaYRE36yt0jMD4CydclWV4Z8e0SbYKGJdVF\r\nEjmUCdRhroEtIQrmZP9W9izC0vCVUgSDx0g=\r\n=qmA5\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"blueislandx","email":"BlueIslandX@protonmail.com"},"maintainers":[{"name":"blueislandx","email":"BlueIslandX@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/island-union-sdk_1.1.2_1677641009174_0.1700554797490217"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-22T05:28:05.098Z","1.1.0":"2023-02-22T05:28:05.367Z","modified":"2023-03-01T03:23:29.496Z","1.1.1":"2023-02-25T09:54:36.243Z","1.1.2":"2023-03-01T03:23:29.409Z"},"maintainers":[{"name":"blueislandx","email":"BlueIslandX@protonmail.com"}],"description":"Island (小蓝岛) 购物平台联盟聚合 SDK (淘宝联盟、京东联盟、多多进宝、苏宁联盟、唯品会联盟、考拉联盟、有赞联盟)","homepage":"https://github.com/Blue-Island-X/Island-Union-SDK#readme","keywords":["island","union","taobao","taobaoke","alibaba","alimama","jd","jingdong","pinduoduo","duoduojinbao","suning","vip","vipshop","kaola","youzan"],"repository":{"type":"git","url":"git+https://github.com/Blue-Island-X/Island-Union-SDK.git"},"author":{"name":"开封小蓝岛科技有限公司"},"bugs":{"url":"https://github.com/Blue-Island-X/Island-Union-SDK/issues"},"license":"MIT","readme":"<h1 align=\"center\">\r\n    <b>\r\n        <a href=\"https://github.com/Blue-Island-X\"><img style=\"width:128px;\" src=\"https://raw.githubusercontent.com/Blue-Island-X/Island-Union-SDK/main/resource/logo.png\" /></a><br>\r\n    </b>\r\n</h1>\r\n\r\n<p align=\"center\">小蓝岛购物平台联盟聚合 SDK</p>\r\n\r\n<div align=\"center\">\r\n\r\n[![npm version](https://img.shields.io/npm/v/@blueislandx/island-union-sdk.svg?style=flat-square)](https://www.npmjs.org/package/@blueislandx/island-union-sdk)\r\n[![install size](https://img.shields.io/badge/dynamic/json?url=https://packagephobia.com/v2/api.json?p=@blueislandx/island-union-sdk&query=$.install.pretty&label=install%20size&style=flat-square)](https://packagephobia.now.sh/result?p=@blueislandx/island-union-sdk)\r\n[![npm bundle size](https://img.shields.io/bundlephobia/minzip/@blueislandx/island-union-sdk?style=flat-square)](https://bundlephobia.com/package/@blueislandx/island-union-sdk@latest)\r\n[![npm downloads](https://img.shields.io/npm/dm/@blueislandx/island-union-sdk.svg?style=flat-square)](https://npm-stat.com/charts.html?package=@blueislandx/island-union-sdk)\r\n[![Known Vulnerabilities](https://snyk.io/test/npm/@blueislandx/island-union-sdk/badge.svg?style=flat-square)](https://snyk.io/test/npm/@blueislandx/island-union-sdk)\r\n\r\n</div>\r\n\r\n本 SDK 支持以下购物平台联盟:\r\n- [淘宝联盟](https://aff-open.taobao.com) [HMAC-SHA256]\r\n- [京东联盟](https://union.jd.com)\r\n- [多多进宝](https://jinbao.pinduoduo.com)\r\n- [苏宁联盟](https://sums.suning.com)\r\n- [唯品会联盟](https://union.vip.com) [HMAC-MD5]\r\n- [考拉联盟](https://pub.kaola.com)\r\n- [有赞联盟](https://www.youzan.com/intro/zanke) [N/A]\r\n\r\n> P.S: 若没有特别标注, 所有签名算法均使用 [MD5](https://en.wikipedia.org/wiki/MD5) 实现\r\n\r\n## 1.如何安装\r\n```\r\nnpm i @blueislandx/island-union-sdk --save\r\n```\r\n\r\n## 2.如何使用\r\n- 1.淘宝联盟 [文档](https://open.taobao.com/api.htm?docId=24518&docType=2)\r\n```TypeScript\r\nimport union from '@blueislandx/island-union-sdk';\r\n\r\nconst client = new union.taobao.Client({\r\n    appKey: '<你的 AppKey>',\r\n    secretKey: '<你的 SecretKey>'\r\n});\r\n\r\nconst result = await client.execute('<API 方法名称>', { <业务参数> });\r\n```\r\n\r\n> P.S: 淘宝联盟接口必须传入字符 id, 数字 id 已经下线无法使用\r\n\r\n- 2.京东联盟 [文档](https://union.jd.com/openplatform/api/v2)\r\n```TypeScript\r\nimport union from '@blueislandx/island-union-sdk';\r\n\r\nconst client = new union.jd.Client({\r\n    appKey: '<你的 AppKey>',\r\n    secretKey: '<你的 SecretKey>'\r\n});\r\n\r\nconst result = await client.execute('<API 方法名称>', { <业务参数> });\r\n```\r\n\r\n- 3.多多进宝 [文档](https://open.pinduoduo.com/application/document/api?id=pdd.ddk.goods.pid.generate)\r\n\r\n```TypeScript\r\nimport union from '@blueislandx/island-union-sdk';\r\n\r\nconst client = new union.pinduoduo.Client({\r\n    appKey: '<你的 ClientId>',\r\n    secretKey: '<你的 ClientSecret>'\r\n});\r\n\r\nconst result = await client.execute('<API 方法名称>', { <业务参数> });\r\n```\r\n\r\n> P.S: 多多进宝接口必须传入 goods_sign (字符 id), goods_id (数字 id) 已经下线无法使用\r\n\r\n- 4.苏宁联盟 [文档](https://open.suning.com/ospos/apipage/toApiMethodDetailMenuNew.do?bustypeId=3)\r\n\r\n```TypeScript\r\nimport union from '@blueislandx/island-union-sdk';\r\n\r\nconst client = new union.suning.Client({\r\n    appKey: '<你的 AppKey>',\r\n    secretKey: '<你的 AppSecret>'\r\n});\r\n\r\nconst result = await client.execute('<API 方法名称>', { <业务参数> });\r\n```\r\n\r\n- 5.唯品会联盟 [文档](https://vop.vip.com/home#/api/service/list/2)\r\n\r\n```TypeScript\r\nimport union from '@blueislandx/island-union-sdk';\r\n\r\nconst client = new union.vip.Client({\r\n    appKey: '<你的 AppKey>',\r\n    secretKey: '<你的 AppSecret>'\r\n});\r\n\r\nconst result = await client.execute('<API 服务名称>', '<API 服务版本>', '<API 方法名称>', { <业务参数> });\r\n```\r\n\r\n- 6.考拉联盟 [文档](https://kaola-haitao.oss.kaolacdn.com/a5b08dbc-e7ae-4464-9d5d-e55cdc78f121.docx?spm=a2v0d.b9947081.0.0.12fc2fbc2WT1tV&file=a5b08dbc-e7ae-4464-9d5d-e55cdc78f121.docx)\r\n```TypeScript\r\nimport union from '@blueislandx/island-union-sdk';\r\n\r\nconst client = new union.kaola.Client({\r\n    secretKey: '<你的 AppSecret>',\r\n    unionId: '<你的赚客 Id>'\r\n});\r\n\r\nconst result = await client.execute('<API 接口名称>', { <业务参数> });\r\n```\r\n\r\n- 7.有赞联盟 [文档](https://doc.youzanyun.com/list/API/1303) [指南](https://shimo.im/docs/tTwjdRYDcHvDdvQ9/read)\r\n```TypeScript\r\nimport union from '@blueislandx/island-union-sdk';\r\n\r\nconst client = new union.youzan.Client({\r\n    appKey: '<你的 AppKey>',\r\n    secretKey: '<你的 AppSecret>',\r\n    grantId: '<你的有赞客 Id>'\r\n});\r\n\r\nconst result = await client.execute('<API 接口名称>', '<API 接口版本>', { <业务参数> });\r\n```\r\n\r\n## 3.错误处理\r\n\r\n如果 SDK 请求错误会返回如下格式:\r\n```JSON\r\n{\r\n    \"code\": <错误代码>,\r\n    \"message\": \"<错误信息>\",\r\n    \"error\": true\r\n}\r\n```\r\n\r\n> P.S: 判断一个请求是否失败, 请使用 ``error`` 字段而不是使用 ``code`` 字段\r\n\r\n> P.S: 错误代码 **不一定** 是整数类型, 请不要 ``parseInt``, SDK 内部已经对字符串的数字进行了处理\r\n\r\n## 4.重大变更\r\n\r\n自 ``1.1.0`` 起, 导入名称由 ``island`` 改为 ``union``\r\n\r\n> P.S: 该改动是由于公司内部业务模块化, 全部使用 ``island`` 会导致混乱","readmeFilename":"README.md"}