{"_id":"@polyv/request-plugin-polyv-business","_rev":"32-12b1c81a2d277cfe867a99999f4f63d6","name":"@polyv/request-plugin-polyv-business","dist-tags":{"temp":"2.8.1","latest":"2.8.1","v2-latest":"2.8.1"},"versions":{"2.0.0":{"name":"@polyv/request-plugin-polyv-business","version":"2.0.0","_id":"@polyv/request-plugin-polyv-business@2.0.0","maintainers":[{"name":"easefun","email":"polyv@qq.com"},{"name":"heeroluo","email":"heeroluo@126.com"},{"name":"easefun-ci","email":"polyv@163.com"}],"dist":{"shasum":"4cede6f87f048d666d931dce74fdb0895083b9fc","tarball":"https://registry.npmjs.org/@polyv/request-plugin-polyv-business/-/request-plugin-polyv-business-2.0.0.tgz","fileCount":12,"integrity":"sha512-HxV2vVcOkfpueNgVRa+dbjGFyQa6oLABYmuvcBCKzo8hKi/85a+Ni40zYJ6b2CWYDXov/Y4GD6Q30wNwa9rb7A==","signatures":[{"sig":"MEQCICN9cA3UMp2RG6tIvXb4S375uG0cbd68Adikvm9m3pIbAiBfcQVBop0J5bLTkKrJzZi8ZI+eLPetmsTO5QKtHMMQwA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11252},"main":"./index.js","types":"./index.d.ts","_npmUser":{"name":"easefun-ci","actor":{"name":"easefun-ci","type":"user","email":"polyv@163.com"},"email":"polyv@163.com"},"_npmVersion":"8.5.0","description":"用途：保利威业务数据插件，用于在请求中自动插入业务相关的参数。","directories":{},"_nodeVersion":"16.14.2","dependencies":{"@polyv/request-core":"2.0.0","@polyv/request-plugin-global-params":"2.0.0","@polyv/request-plugin-authorize-token":"2.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/request-plugin-polyv-business_2.0.0_1751449747569_0.7736238262050348","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@polyv/request-plugin-polyv-business","version":"2.1.0","_id":"@polyv/request-plugin-polyv-business@2.1.0","maintainers":[{"name":"easefun","email":"polyv@qq.com"},{"name":"heeroluo","email":"heeroluo@126.com"},{"name":"easefun-ci","email":"polyv@163.com"}],"dist":{"shasum":"c0e20f8ae45f4449d24c312af61ac29508e3958b","tarball":"https://registry.npmjs.org/@polyv/request-plugin-polyv-business/-/request-plugin-polyv-business-2.1.0.tgz","fileCount":12,"integrity":"sha512-/yKdVACi/UBKmYmUkee3o9nGQxTdi/wFBi8LKGitEIlJr1G1LuVzsrfaq3t7ZSez0XpghOQuS6W/Rtg/IDb3tg==","signatures":[{"sig":"MEQCIF1WvJ5pCwyd5uvqYnkc6mdF1N9gy0F4lKR7KetCAQ0QAiAmGrIR4VHwy+8ZCDh/tAUl2xxQO4KFeRfiBXxkl/AUyg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12018},"main":"./index.js","types":"./index.d.ts","_npmUser":{"name":"easefun-ci","email":"polyv@163.com"},"_npmVersion":"8.5.0","description":"用途：保利威业务数据插件，用于在请求中自动插入业务相关的参数。","directories":{},"_nodeVersion":"16.14.2","dependencies":{"@polyv/request-core":"2.1.0","@polyv/request-plugin-global-params":"2.1.0","@polyv/request-plugin-authorize-token":"2.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/request-plugin-polyv-business_2.1.0_1755136247651_0.47469492409477576","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"@polyv/request-plugin-polyv-business","version":"2.2.0","_id":"@polyv/request-plugin-polyv-business@2.2.0","maintainers":[{"name":"easefun","email":"polyv@qq.com"},{"name":"heeroluo","email":"heeroluo@126.com"},{"name":"easefun-ci","email":"polyv@163.com"}],"dist":{"shasum":"867eede4eaa68beb6209d6d606e496c7d56f2a3f","tarball":"https://registry.npmjs.org/@polyv/request-plugin-polyv-business/-/request-plugin-polyv-business-2.2.0.tgz","fileCount":14,"integrity":"sha512-e8krLqSC7ZCjcNdKd2pUQ21Vm5dbVmxU1c3SXQboFEwP4h9ZeOplwNH6uHp4E8EaqRQKONR/XtHgJSTtrIqKTQ==","signatures":[{"sig":"MEUCIQCNmrn4jmS0qigYipAy3hRtxZ5VW7nsbwYnZ6Jahj4FdgIgDhdThuhhYwOmnXdoW99dZHsOCXzbqFZQX+E8S1G238w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18973},"main":"./index.js","types":"./index.d.ts","_npmUser":{"name":"easefun-ci","email":"polyv@163.com"},"_npmVersion":"8.5.0","description":"用途：保利威业务数据插件，用于在请求中自动插入业务相关的参数。","directories":{},"_nodeVersion":"16.14.2","dependencies":{"@polyv/request-core":"2.2.0","@polyv/request-plugin-global-params":"2.2.0","@polyv/request-plugin-authorize-token":"2.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/request-plugin-polyv-business_2.2.0_1756948072439_0.20128931233423275","host":"s3://npm-registry-packages-npm-production"}},"2.3.0":{"name":"@polyv/request-plugin-polyv-business","version":"2.3.0","_id":"@polyv/request-plugin-polyv-business@2.3.0","maintainers":[{"name":"easefun","email":"polyv@qq.com"},{"name":"heeroluo","email":"heeroluo@126.com"},{"name":"easefun-ci","email":"polyv@163.com"}],"dist":{"shasum":"03f38afcf8bd4f2d49ef878494d73be05e223786","tarball":"https://registry.npmjs.org/@polyv/request-plugin-polyv-business/-/request-plugin-polyv-business-2.3.0.tgz","fileCount":14,"integrity":"sha512-q0+NJNDfe43s8WsPdOwkxaSoiO6bEJt/ozVSMz8f404DTcsrAKyTL656xwYyFua1hy90ldOefEzv1iIR4dAkLg==","signatures":[{"sig":"MEUCIQCPb498ks6jiVX4/wEaoOK3FpSQVSlI2D7DhsKAtnWFwAIgYwp4gsE0k8nuAchdCNbJez+EQvLsAMMgDnBk83ulOAY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19007},"main":"./index.js","types":"./index.d.ts","_npmUser":{"name":"easefun-ci","email":"polyv@163.com"},"_npmVersion":"8.5.0","description":"用途：保利威业务数据插件，用于在请求中自动插入业务相关的参数。","directories":{},"_nodeVersion":"16.14.2","dependencies":{"@polyv/request-core":"2.3.0","@polyv/request-plugin-global-params":"2.3.0","@polyv/request-plugin-authorize-token":"2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/request-plugin-polyv-business_2.3.0_1761040190924_0.43440737569107246","host":"s3://npm-registry-packages-npm-production"}},"2.4.0":{"name":"@polyv/request-plugin-polyv-business","version":"2.4.0","_id":"@polyv/request-plugin-polyv-business@2.4.0","maintainers":[{"name":"easefun","email":"polyv@qq.com"},{"name":"heeroluo","email":"heeroluo@126.com"},{"name":"easefun-ci","email":"polyv@163.com"}],"dist":{"shasum":"07efcf14bf4376d959b6167f11f37c35148784c7","tarball":"https://registry.npmjs.org/@polyv/request-plugin-polyv-business/-/request-plugin-polyv-business-2.4.0.tgz","fileCount":14,"integrity":"sha512-b1tpr0S56XZJCXScdIejVjwIVGIRtLWyRijn635NFhh+LAp6GPuGfO426N3+q/Lc5ikJLfrvmI5rJFJVCI+Wsg==","signatures":[{"sig":"MEUCIGO64XNhbKJfA6hsyNOKUcTLk7FTTixxNiAFGkKybfrZAiEAsrTJg8NfXOvJLW69lLbfnNkDdIhm9WlG0b7IBjO2SkI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19007},"main":"./index.js","types":"./index.d.ts","_npmUser":{"name":"easefun-ci","email":"polyv@163.com"},"_npmVersion":"8.5.0","description":"用途：保利威业务数据插件，用于在请求中自动插入业务相关的参数。","directories":{},"_nodeVersion":"16.14.2","dependencies":{"@polyv/request-core":"2.4.0","@polyv/request-plugin-global-params":"2.4.0","@polyv/request-plugin-authorize-token":"2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/request-plugin-polyv-business_2.4.0_1773197387384_0.5771723809657663","host":"s3://npm-registry-packages-npm-production"}},"2.5.0":{"name":"@polyv/request-plugin-polyv-business","version":"2.5.0","_id":"@polyv/request-plugin-polyv-business@2.5.0","maintainers":[{"name":"easefun","email":"polyv@qq.com"},{"name":"easefun-ci","email":"polyv@163.com"},{"name":"junyu8893","email":"852711368@qq.com"}],"dist":{"shasum":"cbd010790ce939079334866023ecc534d18c3c6a","tarball":"https://registry.npmjs.org/@polyv/request-plugin-polyv-business/-/request-plugin-polyv-business-2.5.0.tgz","fileCount":14,"integrity":"sha512-2L8KmfTnRHH+C1uztHtZUuVZnENnR4mZ1QF9PiepUZpH8Ajmf/DfTxQtpSDSe2ejXsqbfjY8lyg0yAEMJM3A2A==","signatures":[{"sig":"MEYCIQDcwYv0GPVc4sHCPtgywPhXX+eYYIWCjaoxgzU/O7CQaAIhAP/1NTRQy+FcfgC817rdsnfXse/pS5vyCgbb8M6ec4H8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19007},"main":"./index.js","types":"./index.d.ts","_npmUser":{"name":"easefun-ci","email":"polyv@163.com"},"_npmVersion":"8.5.0","description":"用途：保利威业务数据插件，用于在请求中自动插入业务相关的参数。","directories":{},"_nodeVersion":"16.14.2","dependencies":{"@polyv/request-core":"2.5.0","@polyv/request-plugin-global-params":"2.5.0","@polyv/request-plugin-authorize-token":"2.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/request-plugin-polyv-business_2.5.0_1778721460460_0.8775756849401442","host":"s3://npm-registry-packages-npm-production"}},"2.6.0":{"name":"@polyv/request-plugin-polyv-business","version":"2.6.0","_id":"@polyv/request-plugin-polyv-business@2.6.0","maintainers":[{"name":"easefun","email":"polyv@qq.com"},{"name":"easefun-ci","email":"polyv@163.com"},{"name":"junyu8893","email":"852711368@qq.com"}],"dist":{"shasum":"0620372dad717aac7ebbcd3f4ea05634295b787e","tarball":"https://registry.npmjs.org/@polyv/request-plugin-polyv-business/-/request-plugin-polyv-business-2.6.0.tgz","fileCount":14,"integrity":"sha512-Vcrx6Ukez+NYrmgxvn7U2H47xE3A68A4K+bWSMhjdfpykF9ec+86msoB2LGxEvBnXL07JD8HPsQar/IfNCX5Kg==","signatures":[{"sig":"MEYCIQDJkiNPxqhE1pMWn4maQTrhwpOt4MgjaGiiRuB7VOJ+6QIhAIOWXyeUc4KaJ8cAobnQQdwR0VjVO51p2yMa2VcvTHIj","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19007},"main":"./index.js","types":"./index.d.ts","_npmUser":{"name":"easefun-ci","email":"polyv@163.com"},"_npmVersion":"8.5.0","description":"用途：保利威业务数据插件，用于在请求中自动插入业务相关的参数。","directories":{},"_nodeVersion":"16.14.2","dependencies":{"@polyv/request-core":"2.6.0","@polyv/request-plugin-global-params":"2.6.0","@polyv/request-plugin-authorize-token":"2.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/request-plugin-polyv-business_2.6.0_1780554131426_0.473244418494273","host":"s3://npm-registry-packages-npm-production"}},"2.7.0":{"name":"@polyv/request-plugin-polyv-business","version":"2.7.0","_id":"@polyv/request-plugin-polyv-business@2.7.0","maintainers":[{"name":"easefun","email":"polyv@qq.com"},{"name":"easefun-ci","email":"polyv@163.com"},{"name":"junyu8893","email":"852711368@qq.com"}],"dist":{"shasum":"c44a08beada078c818ccf6413a910c789fb7c67d","tarball":"https://registry.npmjs.org/@polyv/request-plugin-polyv-business/-/request-plugin-polyv-business-2.7.0.tgz","fileCount":14,"integrity":"sha512-i7HGXE1y/sKhUHw8I2mjg1YZmfm96wUDoUfZh0eRl+Uw42EOGXXTIfQ3aenNs3c8QOLYn0htimcnpgrnxb7xnA==","signatures":[{"sig":"MEYCIQDl/RkQTBVC+ezQPTZFJhhGEkZO7m/qtwA5xWODJSxNQgIhANfE5lGL1GMJj6sdyao2ONb/ZgrdWXi72ezUZecqKxg1","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19016},"main":"./index.js","types":"./index.d.ts","_npmUser":{"name":"easefun-ci","email":"polyv@163.com"},"_npmVersion":"8.5.0","description":"用途：保利威业务数据插件，用于在请求中自动插入业务相关的参数。","directories":{},"_nodeVersion":"16.14.2","dependencies":{"@polyv/request-core":"2.7.0","@polyv/request-plugin-global-params":"2.7.0","@polyv/request-plugin-authorize-token":"2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/request-plugin-polyv-business_2.7.0_1780997170474_0.8526014237057873","host":"s3://npm-registry-packages-npm-production"}},"2.7.1":{"name":"@polyv/request-plugin-polyv-business","version":"2.7.1","_id":"@polyv/request-plugin-polyv-business@2.7.1","maintainers":[{"name":"easefun","email":"polyv@qq.com"},{"name":"easefun-ci","email":"polyv@163.com"},{"name":"junyu8893","email":"852711368@qq.com"}],"dist":{"shasum":"a3c423baf4ea8824a859fc589d96217f0fbcea03","tarball":"https://registry.npmjs.org/@polyv/request-plugin-polyv-business/-/request-plugin-polyv-business-2.7.1.tgz","fileCount":14,"integrity":"sha512-1v3Bp9Y2OrTpF8t8XlRmBoGu2UqREeJTh8ulojOZUr+wyU+HSdzbfQTARqV39VzIGw1hjDpq90UwCIAyaOX+yw==","signatures":[{"sig":"MEUCIQDp/sgaARO3eI7Jqf6j/fjNzpOZf7IkliUsPTIrPCV90gIgLKm1Q5GGM3Dsaz1fSIbYNLuAMGzXXZLHVyhi2zy+wbY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19016},"main":"./index.js","types":"./index.d.ts","_npmUser":{"name":"easefun-ci","email":"polyv@163.com"},"_npmVersion":"8.5.0","description":"用途：保利威业务数据插件，用于在请求中自动插入业务相关的参数。","directories":{},"_nodeVersion":"16.14.2","dependencies":{"@polyv/request-core":"2.7.1","@polyv/request-plugin-global-params":"2.7.1","@polyv/request-plugin-authorize-token":"2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/request-plugin-polyv-business_2.7.1_1781000667418_0.2761983982388989","host":"s3://npm-registry-packages-npm-production"}},"2.8.0":{"name":"@polyv/request-plugin-polyv-business","version":"2.8.0","_id":"@polyv/request-plugin-polyv-business@2.8.0","maintainers":[{"name":"easefun","email":"polyv@qq.com"},{"name":"easefun-ci","email":"polyv@163.com"},{"name":"junyu8893","email":"852711368@qq.com"}],"dist":{"shasum":"97a01899e373f0d6e5017e6e97eb717cdbda15d4","tarball":"https://registry.npmjs.org/@polyv/request-plugin-polyv-business/-/request-plugin-polyv-business-2.8.0.tgz","fileCount":14,"integrity":"sha512-J6lC3aNxhcdbSqP9cmDCqXxngNv1AeYdAZlEmvk6W5mUavq8MCtRTLgBDW9Y2rNHvi10swSTmsxWdV+D7AMIzg==","signatures":[{"sig":"MEYCIQCCn4LWdimFstF6s8qg7p+yFyJ3a+ChJQoKmF4CftT46AIhAIBbwjul8z7UL3Ei7/yu+DPBmFIkPUsyJZmQMbdfq1nR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19459},"main":"./index.js","type":"module","types":"./index.d.ts","gitHead":"13b8b598b2d8ecb151f2f6c7cf4ecab6671c1965","_npmUser":{"name":"easefun-ci","email":"polyv@163.com"},"_npmVersion":"10.8.2","description":"用途：保利威业务数据插件，用于在请求中自动插入业务相关的参数。","directories":{},"miniprogram":"./","_nodeVersion":"20.20.2","dependencies":{"@polyv/request-core":"2.8.0","@polyv/request-plugin-global-params":"2.8.0","@polyv/request-plugin-authorize-token":"2.8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/request-plugin-polyv-business_2.8.0_1783071948907_0.4032328260762321","host":"s3://npm-registry-packages-npm-production"}},"2.8.1":{"_id":"@polyv/request-plugin-polyv-business@2.8.1","dist":{"shasum":"fb281e7a752f16e9ba4d29b714b2b2e17fa191d3","tarball":"https://registry.npmjs.org/@polyv/request-plugin-polyv-business/-/request-plugin-polyv-business-2.8.1.tgz","fileCount":14,"integrity":"sha512-lMkDCpeNzSvlaSrXUTPimpMyO2QNDgMU6ZRQQ5OfcEQ5v34Nze3ochBg8oS8LT3mivH/AT7ZYut3ujQo4OGNOQ==","signatures":[{"sig":"MEQCIDUXVIHNwA1i7/cCN9cyb8kfdE+eDONa4XQuCg4mjX/VAiBMjpYC4vKQeJEJfp4kPmz56cGBLvBR7GaaAjKAgDtIEw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEwS71FzOeeVGQakI6OJm77p+BfDpjFtI2Y0pOJ7GgliAiEAl6tf45nqSlOyntt3Agnquq5T9oEDeu2+BgRiooiTrEQ="}],"unpackedSize":19459},"main":"./index.js","name":"@polyv/request-plugin-polyv-business","type":"module","types":"./index.d.ts","gitHead":"7d3597a4b7101140a3061be5129d97ede5f055d4","version":"2.8.1","_npmUser":{"name":"easefun-ci","email":"polyv@163.com"},"_npmVersion":"10.8.2","description":"用途：保利威业务数据插件，用于在请求中自动插入业务相关的参数。","directories":{},"maintainers":[{"name":"easefun","email":"polyv@qq.com"},{"name":"easefun-ci","email":"polyv@163.com"},{"name":"junyu8893","email":"852711368@qq.com"}],"miniprogram":"./","_nodeVersion":"20.20.2","dependencies":{"@polyv/request-core":"2.8.1","@polyv/request-plugin-global-params":"2.8.1","@polyv/request-plugin-authorize-token":"2.8.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/request-plugin-polyv-business_2.8.1_1789717095822_0.24720495043339907"}}},"time":{"created":"2025-07-02T09:49:07.482Z","modified":"2026-09-18T07:38:16.149Z","2.0.0":"2025-07-02T09:49:07.739Z","2.1.0":"2025-08-14T01:50:47.812Z","2.2.0":"2025-09-04T01:07:52.628Z","2.3.0":"2025-10-21T09:49:51.106Z","2.4.0":"2026-03-11T02:49:47.531Z","2.5.0":"2026-05-14T01:17:40.661Z","2.6.0":"2026-06-04T06:22:11.568Z","2.7.0":"2026-06-09T09:26:10.608Z","2.7.1":"2026-06-09T10:24:27.550Z","2.8.0":"2026-07-03T09:45:49.028Z","2.8.1":"2026-09-18T07:38:15.906Z"},"description":"用途：保利威业务数据插件，用于在请求中自动插入业务相关的参数。","maintainers":[{"name":"easefun","email":"polyv@qq.com"},{"name":"easefun-ci","email":"polyv@163.com"},{"name":"junyu8893","email":"852711368@qq.com"}],"readme":"# PolyvBusinessRequestPlugin\n\n用途：保利威业务数据插件，用于在请求中自动插入业务相关的参数。\n\n> PS：该插件仅适用于 <span style=\"color: red\">**api.polyv.net**</span> 下的接口\n\n## 实例化参数\n\n| 参数名             | 用途               | 类型       | 默认值 |\n| ------------------ | ------------------ | ---------- | ------ |\n| `usePolyvBusiness` | 是否使用业务数据   | `boolean`  | `true` |\n| `getBusinessData`  | 获取业务数据的方法 | `function` | -      |\n\n## 请求选项\n\n| 参数名             | 用途             | 类型                | 默认值 |\n| ------------------ | ---------------- | ------------------- | ------ |\n| `usePolyvBusiness` | 是否使用业务数据 | `boolean`           | `true` |\n| `businessData`     | 业务数据         | `PolyvBusinessData` | -      |\n\n## 业务数据类型\n\n`PolyvBusinessData` 类型如下：\n\n| 参数名       | 用途            | 类型     | 默认值 |\n| ------------ | --------------- | -------- | ------ |\n| `sourceType` | 来源类型        | `string` | -      |\n| `sourceId`   | 来源 id         | `string` | -      |\n| `channelId`  | 频道号          | `string` | -      |\n| `viewerId`   | 用户 id         | `string` | -      |\n| `unionId`    | 用户系统唯一 id | `string` | -      |\n\n## 使用方式\n\n```js\nimport { PolyvRequest } from '@polyv/request-core';\nimport { PolyvBusinessRequestPlugin } from '@polyv/request-plugin-polyv-business';\n\n// 自定义获取业务数据的方法\nconst requester = new PolyvRequest({\n  requestPlugins: [\n    new PolyvBusinessRequestPlugin({\n      getBusinessData: async options => {\n        // 可以在这里实现自定义的业务数据获取逻辑\n        return {\n          sourceType: 'yourSourceType',\n          sourceId: 'yourSourceId',\n          channelId: 'yourChannelId',\n          viewerId: 'yourViewerId',\n          unionId: 'yourUnionId',\n        };\n      },\n    }),\n  ],\n});\n\n// 在某个请求中禁用业务数据\nrequester.get(\n  '/api/data',\n  {},\n  {\n    usePolyvBusiness: false,\n  },\n);\n\n// 在某个请求中使用特定的业务数据\nrequester.get(\n  '/api/data',\n  {},\n  {\n    businessData: {\n      sourceType: 'specificSourceType',\n      sourceId: 'specificSourceId',\n    },\n  },\n);\n```\n\n## 保利威域名配置\n\n提供 `PickDomainInfo` 范型生成域名配置类型，`formatDomainInfo` 格式化域名配置，如果没有传入相关的配置则使用内部默认值。\n\n```ts\nimport { type PickDomainInfo } from '@polyv/request-plugin-polyv-business';\n\ntype MyDomainInfo = PickDomainInfo<'chatWsDomain' | 'chatApiDomain' | 'polyvApiDomain'>;\n\nconst myDomainInfo: MyDomainInfo = { ... };\n\nformatDomainInfo(myDomainInfo).chatApiDomain;\n```\n\n## 插件处理逻辑\n\n1. 插件会在请求中自动插入业务相关的参数，如 `sourceType`、`sourceId`、`channelId`、`viewerId`、`unionId` 等\n2. 插件会根据请求的 URL 判断需要插入哪些参数：\n   - 对于 `/live/v4/watch/common` 接口，插入 `sourceType` 和 `sourceId`\n   - 对于 `/live/v4/watch/viewer` 接口，插入 `sourceType`、`sourceId`、`viewerId` 和 `userId`\n   - 对于 `/live/v4/channel` 接口，插入 `channelId`\n   - 对于其他接口，插入 `channelId` 和 `viewerId`\n3. 如果你使用了 `@polyv/request-plugin-authorize-token` 令牌插件，本插件会根据 URL 判断是否使用 token 和 tokenField：\n   - 对于 `/live/v4/watch/common` 接口，会自动插入 `useToken` 为 false 禁用 token 插入\n   - 对于 `/live/v3` 接口，会将 `tokenField` 设置为 `token`，其他接口设置为 `viewerToken`\n\n```js\nimport { PolyvRequest } from '@polyv/request-core';\nimport { AuthorizeTokenRequestPlugin } from '@polyv/request-plugin-authorize-token';\nimport { PolyvBusinessRequestPlugin } from '@polyv/request-plugin-polyv-business';\n\nconst requester = new PolyvRequest({\n  baseUrl: 'https://api.polyv.net',\n  requestPlugins: [\n    new AuthorizeTokenRequestPlugin({\n      getTokenInfo: () => {\n        return {\n          // 只需要传入 token 即可\n          token: 'yourToken',\n        };\n      },\n    }),\n    new PolyvBusinessRequestPlugin({\n      getBusinessData: async options => {\n        // 可以在这里实现自定义的业务数据获取逻辑\n        return {\n          channelId: 'yourChannelId',\n          viewerId: 'yourViewerId',\n        };\n      },\n    }),\n  ],\n});\n\n// 不会插入 token\nrequester.get('/live/v4/watch/common/xxx/xx/x', {});\n\n// 会插入 token，token 字段为 'token'\nrequester.get('/live/v3/xxx/xx/x', {});\n\n// 会插入 token，token 字段为 'viewerToken'\nrequester.get('/live/v4/xxx/xx/x', {});\n```\n","readmeFilename":"README.md"}