hylid-bridge 4.0.7 → 4.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (459) hide show
  1. package/README.md +0 -66
  2. package/lib/bridges.d.ts +1 -378
  3. package/lib/bridges.js +0 -694
  4. package/lib/clients/mp/alipay/index.d.ts +2 -4
  5. package/lib/clients/mp/alipay/index.js +2 -4
  6. package/lib/clients/mp/alipayhk/index.d.ts +2 -4
  7. package/lib/clients/mp/alipayhk/index.js +2 -4
  8. package/lib/clients/mp/chope/index.d.ts +1 -1
  9. package/lib/clients/mp/dana/index.d.ts +2 -4
  10. package/lib/clients/mp/dana/index.js +2 -4
  11. package/lib/clients/mp/demo/index.d.ts +1 -1
  12. package/lib/clients/mp/gcash/index.d.ts +2 -4
  13. package/lib/clients/mp/gcash/index.js +2 -4
  14. package/lib/clients/mp/tngd/index.d.ts +2 -4
  15. package/lib/clients/mp/tngd/index.js +2 -4
  16. package/lib/clients/mp/truemoney/index.d.ts +2 -4
  17. package/lib/clients/mp/truemoney/index.js +2 -4
  18. package/lib/clients/mp_web/alipay/index.d.ts +2 -4
  19. package/lib/clients/mp_web/alipay/index.js +1 -3
  20. package/lib/clients/mp_web/alipayhk/index.d.ts +2 -56
  21. package/lib/clients/mp_web/alipayhk/index.js +2 -28
  22. package/lib/clients/mp_web/chope/index.d.ts +2 -4
  23. package/lib/clients/mp_web/chope/index.js +1 -3
  24. package/lib/clients/mp_web/dana/index.d.ts +2 -56
  25. package/lib/clients/mp_web/dana/index.js +2 -28
  26. package/lib/clients/mp_web/demo/index.d.ts +2 -4
  27. package/lib/clients/mp_web/demo/index.js +1 -3
  28. package/lib/clients/mp_web/gcash/index.d.ts +2 -56
  29. package/lib/clients/mp_web/gcash/index.js +2 -28
  30. package/lib/clients/mp_web/mpay/index.d.ts +2 -54
  31. package/lib/clients/mp_web/mpay/index.js +2 -26
  32. package/lib/clients/mp_web/tngd/index.d.ts +2 -56
  33. package/lib/clients/mp_web/tngd/index.js +2 -28
  34. package/lib/clients/mp_web/toss/index.d.ts +2 -54
  35. package/lib/clients/mp_web/toss/index.js +2 -26
  36. package/lib/clients/mp_web/truemoney/index.d.ts +2 -56
  37. package/lib/clients/mp_web/truemoney/index.js +2 -28
  38. package/lib/clients/web/alipay/index.d.ts +3 -131
  39. package/lib/clients/web/alipay/index.js +3 -47
  40. package/lib/clients/web/demo/index.d.ts +2 -4
  41. package/lib/clients/web/demo/index.js +2 -4
  42. package/lib/clients/web/h5/index.d.ts +2 -42
  43. package/lib/clients/web/h5/index.js +2 -14
  44. package/lib/clients/web/tngdh5ng/index.d.ts +1 -3
  45. package/lib/clients/web/tngdh5ng/index.js +2 -4
  46. package/lib/common/apis/custom/web/h5/request.d.ts +1 -1
  47. package/lib/common/apis/generated/mp/request.d.ts +2 -2
  48. package/lib/common/apis/generated/mp_web/request.d.ts +2 -2
  49. package/lib/dsl.d.ts +1 -10
  50. package/lib/dsl.js +1 -28
  51. package/lib/umd/index.js +1 -1
  52. package/lib/umd/mp_web_alipay.js +1 -1
  53. package/lib/umd/mp_web_alipayhk.js +1 -1
  54. package/lib/umd/mp_web_chope.js +1 -1
  55. package/lib/umd/mp_web_dana.js +1 -1
  56. package/lib/umd/mp_web_demo.js +1 -1
  57. package/lib/umd/mp_web_gcash.js +1 -1
  58. package/lib/umd/mp_web_mpay.js +1 -2
  59. package/lib/umd/mp_web_tngd.js +1 -1
  60. package/lib/umd/mp_web_toss.js +1 -2
  61. package/lib/umd/mp_web_truemoney.js +1 -1
  62. package/lib/umd/web_alipay.js +1 -2
  63. package/lib/umd/web_demo.js +1 -1
  64. package/lib/umd/web_h5.js +1 -1
  65. package/lib/umd/web_tngdh5ng.js +1 -1
  66. package/package.json +6 -6
  67. package/lib/clients/mp/alipay/defineRuntimeConfig.d.ts +0 -2
  68. package/lib/clients/mp/alipay/defineRuntimeConfig.js +0 -3
  69. package/lib/clients/mp/alipayhk/defineRuntimeConfig.d.ts +0 -2
  70. package/lib/clients/mp/alipayhk/defineRuntimeConfig.js +0 -3
  71. package/lib/clients/mp/dana/defineRuntimeConfig.d.ts +0 -2
  72. package/lib/clients/mp/dana/defineRuntimeConfig.js +0 -3
  73. package/lib/clients/mp/gcash/defineRuntimeConfig.d.ts +0 -2
  74. package/lib/clients/mp/gcash/defineRuntimeConfig.js +0 -3
  75. package/lib/clients/mp/tngd/defineRuntimeConfig.d.ts +0 -2
  76. package/lib/clients/mp/tngd/defineRuntimeConfig.js +0 -3
  77. package/lib/clients/mp/truemoney/defineRuntimeConfig.d.ts +0 -2
  78. package/lib/clients/mp/truemoney/defineRuntimeConfig.js +0 -3
  79. package/lib/clients/mp_web/alipay/getCurrentLanguage.d.ts +0 -2
  80. package/lib/clients/mp_web/alipay/getCurrentLanguage.js +0 -3
  81. package/lib/clients/mp_web/alipayhk/createWithoutAuthRpc.d.ts +0 -2
  82. package/lib/clients/mp_web/alipayhk/createWithoutAuthRpc.js +0 -3
  83. package/lib/clients/mp_web/alipayhk/defineRuntimeConfig.d.ts +0 -2
  84. package/lib/clients/mp_web/alipayhk/defineRuntimeConfig.js +0 -3
  85. package/lib/clients/mp_web/alipayhk/getCurrentLanguage.d.ts +0 -2
  86. package/lib/clients/mp_web/alipayhk/getCurrentLanguage.js +0 -3
  87. package/lib/clients/mp_web/alipayhk/openApPayCodePage.d.ts +0 -2
  88. package/lib/clients/mp_web/alipayhk/openApPayCodePage.js +0 -3
  89. package/lib/clients/mp_web/alipayhk/openInApp.d.ts +0 -2
  90. package/lib/clients/mp_web/alipayhk/openInApp.js +0 -3
  91. package/lib/clients/mp_web/alipayhk/openInBrowser.d.ts +0 -2
  92. package/lib/clients/mp_web/alipayhk/openInBrowser.js +0 -3
  93. package/lib/clients/mp_web/alipayhk/openOtherApp.d.ts +0 -2
  94. package/lib/clients/mp_web/alipayhk/openOtherApp.js +0 -3
  95. package/lib/clients/mp_web/alipayhk/openPayCodePage.d.ts +0 -2
  96. package/lib/clients/mp_web/alipayhk/openPayCodePage.js +0 -3
  97. package/lib/clients/mp_web/alipayhk/openScanPage.d.ts +0 -2
  98. package/lib/clients/mp_web/alipayhk/openScanPage.js +0 -3
  99. package/lib/clients/mp_web/alipayhk/openURL.d.ts +0 -2
  100. package/lib/clients/mp_web/alipayhk/openURL.js +0 -3
  101. package/lib/clients/mp_web/alipayhk/openWebURL.d.ts +0 -2
  102. package/lib/clients/mp_web/alipayhk/openWebURL.js +0 -3
  103. package/lib/clients/mp_web/alipayhk/popWindow.d.ts +0 -2
  104. package/lib/clients/mp_web/alipayhk/popWindow.js +0 -3
  105. package/lib/clients/mp_web/alipayhk/rpcWithAuth.d.ts +0 -2
  106. package/lib/clients/mp_web/alipayhk/rpcWithAuth.js +0 -3
  107. package/lib/clients/mp_web/chope/getCurrentLanguage.d.ts +0 -2
  108. package/lib/clients/mp_web/chope/getCurrentLanguage.js +0 -3
  109. package/lib/clients/mp_web/dana/createWithoutAuthRpc.d.ts +0 -2
  110. package/lib/clients/mp_web/dana/createWithoutAuthRpc.js +0 -3
  111. package/lib/clients/mp_web/dana/defineRuntimeConfig.d.ts +0 -2
  112. package/lib/clients/mp_web/dana/defineRuntimeConfig.js +0 -3
  113. package/lib/clients/mp_web/dana/getCurrentLanguage.d.ts +0 -2
  114. package/lib/clients/mp_web/dana/getCurrentLanguage.js +0 -3
  115. package/lib/clients/mp_web/dana/openApPayCodePage.d.ts +0 -2
  116. package/lib/clients/mp_web/dana/openApPayCodePage.js +0 -3
  117. package/lib/clients/mp_web/dana/openInApp.d.ts +0 -2
  118. package/lib/clients/mp_web/dana/openInApp.js +0 -3
  119. package/lib/clients/mp_web/dana/openInBrowser.d.ts +0 -2
  120. package/lib/clients/mp_web/dana/openInBrowser.js +0 -3
  121. package/lib/clients/mp_web/dana/openOtherApp.d.ts +0 -2
  122. package/lib/clients/mp_web/dana/openOtherApp.js +0 -3
  123. package/lib/clients/mp_web/dana/openPayCodePage.d.ts +0 -2
  124. package/lib/clients/mp_web/dana/openPayCodePage.js +0 -3
  125. package/lib/clients/mp_web/dana/openScanPage.d.ts +0 -2
  126. package/lib/clients/mp_web/dana/openScanPage.js +0 -3
  127. package/lib/clients/mp_web/dana/openURL.d.ts +0 -2
  128. package/lib/clients/mp_web/dana/openURL.js +0 -3
  129. package/lib/clients/mp_web/dana/openWebURL.d.ts +0 -2
  130. package/lib/clients/mp_web/dana/openWebURL.js +0 -3
  131. package/lib/clients/mp_web/dana/popWindow.d.ts +0 -2
  132. package/lib/clients/mp_web/dana/popWindow.js +0 -3
  133. package/lib/clients/mp_web/dana/rpcWithAuth.d.ts +0 -2
  134. package/lib/clients/mp_web/dana/rpcWithAuth.js +0 -3
  135. package/lib/clients/mp_web/demo/getCurrentLanguage.d.ts +0 -2
  136. package/lib/clients/mp_web/demo/getCurrentLanguage.js +0 -3
  137. package/lib/clients/mp_web/gcash/createWithoutAuthRpc.d.ts +0 -2
  138. package/lib/clients/mp_web/gcash/createWithoutAuthRpc.js +0 -3
  139. package/lib/clients/mp_web/gcash/defineRuntimeConfig.d.ts +0 -2
  140. package/lib/clients/mp_web/gcash/defineRuntimeConfig.js +0 -3
  141. package/lib/clients/mp_web/gcash/getCurrentLanguage.d.ts +0 -2
  142. package/lib/clients/mp_web/gcash/getCurrentLanguage.js +0 -3
  143. package/lib/clients/mp_web/gcash/openApPayCodePage.d.ts +0 -2
  144. package/lib/clients/mp_web/gcash/openApPayCodePage.js +0 -3
  145. package/lib/clients/mp_web/gcash/openInApp.d.ts +0 -2
  146. package/lib/clients/mp_web/gcash/openInApp.js +0 -3
  147. package/lib/clients/mp_web/gcash/openInBrowser.d.ts +0 -2
  148. package/lib/clients/mp_web/gcash/openInBrowser.js +0 -3
  149. package/lib/clients/mp_web/gcash/openOtherApp.d.ts +0 -2
  150. package/lib/clients/mp_web/gcash/openOtherApp.js +0 -3
  151. package/lib/clients/mp_web/gcash/openPayCodePage.d.ts +0 -2
  152. package/lib/clients/mp_web/gcash/openPayCodePage.js +0 -3
  153. package/lib/clients/mp_web/gcash/openScanPage.d.ts +0 -2
  154. package/lib/clients/mp_web/gcash/openScanPage.js +0 -3
  155. package/lib/clients/mp_web/gcash/openURL.d.ts +0 -2
  156. package/lib/clients/mp_web/gcash/openURL.js +0 -3
  157. package/lib/clients/mp_web/gcash/openWebURL.d.ts +0 -2
  158. package/lib/clients/mp_web/gcash/openWebURL.js +0 -3
  159. package/lib/clients/mp_web/gcash/popWindow.d.ts +0 -2
  160. package/lib/clients/mp_web/gcash/popWindow.js +0 -3
  161. package/lib/clients/mp_web/gcash/rpcWithAuth.d.ts +0 -2
  162. package/lib/clients/mp_web/gcash/rpcWithAuth.js +0 -3
  163. package/lib/clients/mp_web/mpay/createWithoutAuthRpc.d.ts +0 -2
  164. package/lib/clients/mp_web/mpay/createWithoutAuthRpc.js +0 -3
  165. package/lib/clients/mp_web/mpay/defineRuntimeConfig.d.ts +0 -2
  166. package/lib/clients/mp_web/mpay/defineRuntimeConfig.js +0 -3
  167. package/lib/clients/mp_web/mpay/openApPayCodePage.d.ts +0 -2
  168. package/lib/clients/mp_web/mpay/openApPayCodePage.js +0 -3
  169. package/lib/clients/mp_web/mpay/openInApp.d.ts +0 -2
  170. package/lib/clients/mp_web/mpay/openInApp.js +0 -3
  171. package/lib/clients/mp_web/mpay/openInBrowser.d.ts +0 -2
  172. package/lib/clients/mp_web/mpay/openInBrowser.js +0 -3
  173. package/lib/clients/mp_web/mpay/openOtherApp.d.ts +0 -2
  174. package/lib/clients/mp_web/mpay/openOtherApp.js +0 -3
  175. package/lib/clients/mp_web/mpay/openPayCodePage.d.ts +0 -2
  176. package/lib/clients/mp_web/mpay/openPayCodePage.js +0 -3
  177. package/lib/clients/mp_web/mpay/openScanPage.d.ts +0 -2
  178. package/lib/clients/mp_web/mpay/openScanPage.js +0 -3
  179. package/lib/clients/mp_web/mpay/openURL.d.ts +0 -2
  180. package/lib/clients/mp_web/mpay/openURL.js +0 -3
  181. package/lib/clients/mp_web/mpay/openWebURL.d.ts +0 -2
  182. package/lib/clients/mp_web/mpay/openWebURL.js +0 -3
  183. package/lib/clients/mp_web/mpay/popWindow.d.ts +0 -2
  184. package/lib/clients/mp_web/mpay/popWindow.js +0 -3
  185. package/lib/clients/mp_web/mpay/rpcWithAuth.d.ts +0 -2
  186. package/lib/clients/mp_web/mpay/rpcWithAuth.js +0 -3
  187. package/lib/clients/mp_web/tngd/createWithoutAuthRpc.d.ts +0 -2
  188. package/lib/clients/mp_web/tngd/createWithoutAuthRpc.js +0 -3
  189. package/lib/clients/mp_web/tngd/defineRuntimeConfig.d.ts +0 -2
  190. package/lib/clients/mp_web/tngd/defineRuntimeConfig.js +0 -3
  191. package/lib/clients/mp_web/tngd/getCurrentLanguage.d.ts +0 -2
  192. package/lib/clients/mp_web/tngd/getCurrentLanguage.js +0 -3
  193. package/lib/clients/mp_web/tngd/openApPayCodePage.d.ts +0 -2
  194. package/lib/clients/mp_web/tngd/openApPayCodePage.js +0 -3
  195. package/lib/clients/mp_web/tngd/openInApp.d.ts +0 -2
  196. package/lib/clients/mp_web/tngd/openInApp.js +0 -3
  197. package/lib/clients/mp_web/tngd/openInBrowser.d.ts +0 -2
  198. package/lib/clients/mp_web/tngd/openInBrowser.js +0 -3
  199. package/lib/clients/mp_web/tngd/openOtherApp.d.ts +0 -2
  200. package/lib/clients/mp_web/tngd/openOtherApp.js +0 -3
  201. package/lib/clients/mp_web/tngd/openPayCodePage.d.ts +0 -2
  202. package/lib/clients/mp_web/tngd/openPayCodePage.js +0 -3
  203. package/lib/clients/mp_web/tngd/openScanPage.d.ts +0 -2
  204. package/lib/clients/mp_web/tngd/openScanPage.js +0 -3
  205. package/lib/clients/mp_web/tngd/openURL.d.ts +0 -2
  206. package/lib/clients/mp_web/tngd/openURL.js +0 -3
  207. package/lib/clients/mp_web/tngd/openWebURL.d.ts +0 -2
  208. package/lib/clients/mp_web/tngd/openWebURL.js +0 -3
  209. package/lib/clients/mp_web/tngd/popWindow.d.ts +0 -2
  210. package/lib/clients/mp_web/tngd/popWindow.js +0 -3
  211. package/lib/clients/mp_web/tngd/rpcWithAuth.d.ts +0 -2
  212. package/lib/clients/mp_web/tngd/rpcWithAuth.js +0 -3
  213. package/lib/clients/mp_web/toss/createWithoutAuthRpc.d.ts +0 -2
  214. package/lib/clients/mp_web/toss/createWithoutAuthRpc.js +0 -3
  215. package/lib/clients/mp_web/toss/defineRuntimeConfig.d.ts +0 -2
  216. package/lib/clients/mp_web/toss/defineRuntimeConfig.js +0 -3
  217. package/lib/clients/mp_web/toss/openApPayCodePage.d.ts +0 -2
  218. package/lib/clients/mp_web/toss/openApPayCodePage.js +0 -3
  219. package/lib/clients/mp_web/toss/openInApp.d.ts +0 -2
  220. package/lib/clients/mp_web/toss/openInApp.js +0 -3
  221. package/lib/clients/mp_web/toss/openInBrowser.d.ts +0 -2
  222. package/lib/clients/mp_web/toss/openInBrowser.js +0 -3
  223. package/lib/clients/mp_web/toss/openOtherApp.d.ts +0 -2
  224. package/lib/clients/mp_web/toss/openOtherApp.js +0 -3
  225. package/lib/clients/mp_web/toss/openPayCodePage.d.ts +0 -2
  226. package/lib/clients/mp_web/toss/openPayCodePage.js +0 -3
  227. package/lib/clients/mp_web/toss/openScanPage.d.ts +0 -2
  228. package/lib/clients/mp_web/toss/openScanPage.js +0 -3
  229. package/lib/clients/mp_web/toss/openURL.d.ts +0 -2
  230. package/lib/clients/mp_web/toss/openURL.js +0 -3
  231. package/lib/clients/mp_web/toss/openWebURL.d.ts +0 -2
  232. package/lib/clients/mp_web/toss/openWebURL.js +0 -3
  233. package/lib/clients/mp_web/toss/popWindow.d.ts +0 -2
  234. package/lib/clients/mp_web/toss/popWindow.js +0 -3
  235. package/lib/clients/mp_web/toss/rpcWithAuth.d.ts +0 -2
  236. package/lib/clients/mp_web/toss/rpcWithAuth.js +0 -3
  237. package/lib/clients/mp_web/truemoney/createWithoutAuthRpc.d.ts +0 -2
  238. package/lib/clients/mp_web/truemoney/createWithoutAuthRpc.js +0 -3
  239. package/lib/clients/mp_web/truemoney/defineRuntimeConfig.d.ts +0 -2
  240. package/lib/clients/mp_web/truemoney/defineRuntimeConfig.js +0 -3
  241. package/lib/clients/mp_web/truemoney/getCurrentLanguage.d.ts +0 -2
  242. package/lib/clients/mp_web/truemoney/getCurrentLanguage.js +0 -3
  243. package/lib/clients/mp_web/truemoney/openApPayCodePage.d.ts +0 -2
  244. package/lib/clients/mp_web/truemoney/openApPayCodePage.js +0 -3
  245. package/lib/clients/mp_web/truemoney/openInApp.d.ts +0 -2
  246. package/lib/clients/mp_web/truemoney/openInApp.js +0 -3
  247. package/lib/clients/mp_web/truemoney/openInBrowser.d.ts +0 -2
  248. package/lib/clients/mp_web/truemoney/openInBrowser.js +0 -3
  249. package/lib/clients/mp_web/truemoney/openOtherApp.d.ts +0 -2
  250. package/lib/clients/mp_web/truemoney/openOtherApp.js +0 -3
  251. package/lib/clients/mp_web/truemoney/openPayCodePage.d.ts +0 -2
  252. package/lib/clients/mp_web/truemoney/openPayCodePage.js +0 -3
  253. package/lib/clients/mp_web/truemoney/openScanPage.d.ts +0 -2
  254. package/lib/clients/mp_web/truemoney/openScanPage.js +0 -3
  255. package/lib/clients/mp_web/truemoney/openURL.d.ts +0 -2
  256. package/lib/clients/mp_web/truemoney/openURL.js +0 -3
  257. package/lib/clients/mp_web/truemoney/openWebURL.d.ts +0 -2
  258. package/lib/clients/mp_web/truemoney/openWebURL.js +0 -3
  259. package/lib/clients/mp_web/truemoney/popWindow.d.ts +0 -2
  260. package/lib/clients/mp_web/truemoney/popWindow.js +0 -3
  261. package/lib/clients/mp_web/truemoney/rpcWithAuth.d.ts +0 -2
  262. package/lib/clients/mp_web/truemoney/rpcWithAuth.js +0 -3
  263. package/lib/clients/web/alipay/addNotifyListener.d.ts +0 -2
  264. package/lib/clients/web/alipay/addNotifyListener.js +0 -3
  265. package/lib/clients/web/alipay/chooseDistrict.d.ts +0 -2
  266. package/lib/clients/web/alipay/chooseDistrict.js +0 -3
  267. package/lib/clients/web/alipay/createWithoutAuthRpc.d.ts +0 -2
  268. package/lib/clients/web/alipay/createWithoutAuthRpc.js +0 -3
  269. package/lib/clients/web/alipay/defineRuntimeConfig.d.ts +0 -2
  270. package/lib/clients/web/alipay/defineRuntimeConfig.js +0 -3
  271. package/lib/clients/web/alipay/easyShare.d.ts +0 -2
  272. package/lib/clients/web/alipay/easyShare.js +0 -3
  273. package/lib/clients/web/alipay/getCurrentLanguage.d.ts +0 -2
  274. package/lib/clients/web/alipay/getCurrentLanguage.js +0 -3
  275. package/lib/clients/web/alipay/getMainSelectedCity.d.ts +0 -2
  276. package/lib/clients/web/alipay/getMainSelectedCity.js +0 -3
  277. package/lib/clients/web/alipay/homeAddAppToMyApps.d.ts +0 -2
  278. package/lib/clients/web/alipay/homeAddAppToMyApps.js +0 -3
  279. package/lib/clients/web/alipay/homeCanAddAppToMyApps.d.ts +0 -2
  280. package/lib/clients/web/alipay/homeCanAddAppToMyApps.js +0 -3
  281. package/lib/clients/web/alipay/openApPayCodePage.d.ts +0 -2
  282. package/lib/clients/web/alipay/openApPayCodePage.js +0 -3
  283. package/lib/clients/web/alipay/openInApp.d.ts +0 -2
  284. package/lib/clients/web/alipay/openInApp.js +0 -3
  285. package/lib/clients/web/alipay/openInBrowser.d.ts +0 -2
  286. package/lib/clients/web/alipay/openInBrowser.js +0 -3
  287. package/lib/clients/web/alipay/openOtherApp.d.ts +0 -2
  288. package/lib/clients/web/alipay/openOtherApp.js +0 -3
  289. package/lib/clients/web/alipay/openPayCodePage.d.ts +0 -2
  290. package/lib/clients/web/alipay/openPayCodePage.js +0 -3
  291. package/lib/clients/web/alipay/openScanPage.d.ts +0 -2
  292. package/lib/clients/web/alipay/openScanPage.js +0 -3
  293. package/lib/clients/web/alipay/openURL.d.ts +0 -2
  294. package/lib/clients/web/alipay/openURL.js +0 -3
  295. package/lib/clients/web/alipay/openWebURL.d.ts +0 -2
  296. package/lib/clients/web/alipay/openWebURL.js +0 -3
  297. package/lib/clients/web/alipay/popWindow.d.ts +0 -2
  298. package/lib/clients/web/alipay/popWindow.js +0 -3
  299. package/lib/clients/web/alipay/postNotification.d.ts +0 -2
  300. package/lib/clients/web/alipay/postNotification.js +0 -3
  301. package/lib/clients/web/alipay/removeNotifyListener.d.ts +0 -2
  302. package/lib/clients/web/alipay/removeNotifyListener.js +0 -3
  303. package/lib/clients/web/alipay/rpcWithAuth.d.ts +0 -2
  304. package/lib/clients/web/alipay/rpcWithAuth.js +0 -3
  305. package/lib/clients/web/alipay/rpcWithAuthAPlus.d.ts +0 -2
  306. package/lib/clients/web/alipay/rpcWithAuthAPlus.js +0 -3
  307. package/lib/clients/web/demo/getCurrentLanguage.d.ts +0 -2
  308. package/lib/clients/web/demo/getCurrentLanguage.js +0 -3
  309. package/lib/clients/web/h5/createWithoutAuthRpc.d.ts +0 -2
  310. package/lib/clients/web/h5/createWithoutAuthRpc.js +0 -3
  311. package/lib/clients/web/h5/defineRuntimeConfig.d.ts +0 -2
  312. package/lib/clients/web/h5/defineRuntimeConfig.js +0 -3
  313. package/lib/clients/web/h5/getCurrentLanguage.d.ts +0 -2
  314. package/lib/clients/web/h5/getCurrentLanguage.js +0 -3
  315. package/lib/clients/web/h5/openURL.d.ts +0 -2
  316. package/lib/clients/web/h5/openURL.js +0 -3
  317. package/lib/clients/web/h5/popWindow.d.ts +0 -2
  318. package/lib/clients/web/h5/popWindow.js +0 -3
  319. package/lib/clients/web/h5/rpcWithAuth.d.ts +0 -2
  320. package/lib/clients/web/h5/rpcWithAuth.js +0 -3
  321. package/lib/clients/web/tngdh5ng/getCurrentLanguage.d.ts +0 -2
  322. package/lib/clients/web/tngdh5ng/getCurrentLanguage.js +0 -3
  323. package/lib/common/apis/generated/mp_web/createWithoutAuthRpc.d.ts +0 -27
  324. package/lib/common/apis/generated/mp_web/createWithoutAuthRpc.js +0 -7
  325. package/lib/common/apis/generated/mp_web/defineRuntimeConfig.d.ts +0 -2
  326. package/lib/common/apis/generated/mp_web/defineRuntimeConfig.js +0 -7
  327. package/lib/common/apis/generated/web/chooseDistrict.d.ts +0 -41
  328. package/lib/common/apis/generated/web/chooseDistrict.js +0 -8
  329. package/lib/common/apis/generated/web/easyShare.d.ts +0 -32
  330. package/lib/common/apis/generated/web/easyShare.js +0 -8
  331. package/lib/common/apis/generated/web/getMainSelectedCity.d.ts +0 -27
  332. package/lib/common/apis/generated/web/getMainSelectedCity.js +0 -8
  333. package/lib/common/apis/generated/web/homeAddAppToMyApps.d.ts +0 -5
  334. package/lib/common/apis/generated/web/homeAddAppToMyApps.js +0 -8
  335. package/lib/common/apis/generated/web/homeCanAddAppToMyApps.d.ts +0 -13
  336. package/lib/common/apis/generated/web/homeCanAddAppToMyApps.js +0 -8
  337. package/lib/common/apis/generated/web/postNotification.d.ts +0 -9
  338. package/lib/common/apis/generated/web/postNotification.js +0 -8
  339. package/lib/internal/apis/custom/mp_web/alipayhk/openApPayCodePage.d.ts +0 -3
  340. package/lib/internal/apis/custom/mp_web/alipayhk/openApPayCodePage.js +0 -3
  341. package/lib/internal/apis/custom/mp_web/alipayhk/openInApp.d.ts +0 -3
  342. package/lib/internal/apis/custom/mp_web/alipayhk/openInApp.js +0 -3
  343. package/lib/internal/apis/custom/mp_web/alipayhk/openInBrowser.d.ts +0 -3
  344. package/lib/internal/apis/custom/mp_web/alipayhk/openInBrowser.js +0 -3
  345. package/lib/internal/apis/custom/mp_web/alipayhk/openOtherApp.d.ts +0 -3
  346. package/lib/internal/apis/custom/mp_web/alipayhk/openOtherApp.js +0 -3
  347. package/lib/internal/apis/custom/mp_web/alipayhk/openPayCodePage.d.ts +0 -3
  348. package/lib/internal/apis/custom/mp_web/alipayhk/openPayCodePage.js +0 -3
  349. package/lib/internal/apis/custom/mp_web/alipayhk/openScanPage.d.ts +0 -3
  350. package/lib/internal/apis/custom/mp_web/alipayhk/openScanPage.js +0 -3
  351. package/lib/internal/apis/custom/mp_web/alipayhk/openURL.d.ts +0 -2
  352. package/lib/internal/apis/custom/mp_web/alipayhk/openURL.js +0 -26
  353. package/lib/internal/apis/custom/mp_web/alipayhk/openWebURL.d.ts +0 -3
  354. package/lib/internal/apis/custom/mp_web/alipayhk/openWebURL.js +0 -3
  355. package/lib/internal/apis/custom/mp_web/alipayhk/popWindow.d.ts +0 -2
  356. package/lib/internal/apis/custom/mp_web/alipayhk/popWindow.js +0 -4
  357. package/lib/internal/apis/custom/mp_web/alipayhk/rpcWithAuth.d.ts +0 -3
  358. package/lib/internal/apis/custom/mp_web/alipayhk/rpcWithAuth.js +0 -32
  359. package/lib/internal/apis/custom/mp_web/mpay/openApPayCodePage.d.ts +0 -3
  360. package/lib/internal/apis/custom/mp_web/mpay/openApPayCodePage.js +0 -3
  361. package/lib/internal/apis/custom/mp_web/mpay/openInApp.d.ts +0 -3
  362. package/lib/internal/apis/custom/mp_web/mpay/openInApp.js +0 -3
  363. package/lib/internal/apis/custom/mp_web/mpay/openInBrowser.d.ts +0 -3
  364. package/lib/internal/apis/custom/mp_web/mpay/openInBrowser.js +0 -3
  365. package/lib/internal/apis/custom/mp_web/mpay/openOtherApp.d.ts +0 -3
  366. package/lib/internal/apis/custom/mp_web/mpay/openOtherApp.js +0 -3
  367. package/lib/internal/apis/custom/mp_web/mpay/openPayCodePage.d.ts +0 -3
  368. package/lib/internal/apis/custom/mp_web/mpay/openPayCodePage.js +0 -3
  369. package/lib/internal/apis/custom/mp_web/mpay/openScanPage.d.ts +0 -3
  370. package/lib/internal/apis/custom/mp_web/mpay/openScanPage.js +0 -3
  371. package/lib/internal/apis/custom/mp_web/mpay/openURL.d.ts +0 -2
  372. package/lib/internal/apis/custom/mp_web/mpay/openURL.js +0 -26
  373. package/lib/internal/apis/custom/mp_web/mpay/openWebURL.d.ts +0 -3
  374. package/lib/internal/apis/custom/mp_web/mpay/openWebURL.js +0 -3
  375. package/lib/internal/apis/custom/mp_web/mpay/rpcWithAuth.d.ts +0 -3
  376. package/lib/internal/apis/custom/mp_web/mpay/rpcWithAuth.js +0 -27
  377. package/lib/internal/apis/custom/mp_web/tngd/openApPayCodePage.d.ts +0 -3
  378. package/lib/internal/apis/custom/mp_web/tngd/openApPayCodePage.js +0 -3
  379. package/lib/internal/apis/custom/mp_web/tngd/openInApp.d.ts +0 -3
  380. package/lib/internal/apis/custom/mp_web/tngd/openInApp.js +0 -3
  381. package/lib/internal/apis/custom/mp_web/tngd/openInBrowser.d.ts +0 -3
  382. package/lib/internal/apis/custom/mp_web/tngd/openInBrowser.js +0 -3
  383. package/lib/internal/apis/custom/mp_web/tngd/openOtherApp.d.ts +0 -3
  384. package/lib/internal/apis/custom/mp_web/tngd/openOtherApp.js +0 -3
  385. package/lib/internal/apis/custom/mp_web/tngd/openPayCodePage.d.ts +0 -3
  386. package/lib/internal/apis/custom/mp_web/tngd/openPayCodePage.js +0 -3
  387. package/lib/internal/apis/custom/mp_web/tngd/openScanPage.d.ts +0 -3
  388. package/lib/internal/apis/custom/mp_web/tngd/openScanPage.js +0 -3
  389. package/lib/internal/apis/custom/mp_web/tngd/openURL.d.ts +0 -6
  390. package/lib/internal/apis/custom/mp_web/tngd/openURL.js +0 -30
  391. package/lib/internal/apis/custom/mp_web/tngd/openWebURL.d.ts +0 -3
  392. package/lib/internal/apis/custom/mp_web/tngd/openWebURL.js +0 -3
  393. package/lib/internal/apis/custom/mp_web/toss/rpcWithAuth.d.ts +0 -3
  394. package/lib/internal/apis/custom/mp_web/toss/rpcWithAuth.js +0 -27
  395. package/lib/internal/apis/custom/mp_web/truemoney/openApPayCodePage.d.ts +0 -3
  396. package/lib/internal/apis/custom/mp_web/truemoney/openApPayCodePage.js +0 -12
  397. package/lib/internal/apis/custom/mp_web/truemoney/openInApp.d.ts +0 -3
  398. package/lib/internal/apis/custom/mp_web/truemoney/openInApp.js +0 -3
  399. package/lib/internal/apis/custom/mp_web/truemoney/openInBrowser.d.ts +0 -3
  400. package/lib/internal/apis/custom/mp_web/truemoney/openInBrowser.js +0 -3
  401. package/lib/internal/apis/custom/mp_web/truemoney/openOtherApp.d.ts +0 -3
  402. package/lib/internal/apis/custom/mp_web/truemoney/openOtherApp.js +0 -3
  403. package/lib/internal/apis/custom/mp_web/truemoney/openPayCodePage.d.ts +0 -3
  404. package/lib/internal/apis/custom/mp_web/truemoney/openPayCodePage.js +0 -12
  405. package/lib/internal/apis/custom/mp_web/truemoney/openScanPage.d.ts +0 -3
  406. package/lib/internal/apis/custom/mp_web/truemoney/openScanPage.js +0 -12
  407. package/lib/internal/apis/custom/mp_web/truemoney/openURL.d.ts +0 -6
  408. package/lib/internal/apis/custom/mp_web/truemoney/openURL.js +0 -30
  409. package/lib/internal/apis/custom/mp_web/truemoney/openWebURL.d.ts +0 -3
  410. package/lib/internal/apis/custom/mp_web/truemoney/openWebURL.js +0 -3
  411. package/lib/internal/apis/custom/web/addNotifyListener.d.ts +0 -6
  412. package/lib/internal/apis/custom/web/addNotifyListener.js +0 -170
  413. package/lib/internal/apis/custom/web/alipay/openApPayCodePage.d.ts +0 -3
  414. package/lib/internal/apis/custom/web/alipay/openApPayCodePage.js +0 -3
  415. package/lib/internal/apis/custom/web/alipay/openInApp.d.ts +0 -3
  416. package/lib/internal/apis/custom/web/alipay/openInApp.js +0 -3
  417. package/lib/internal/apis/custom/web/alipay/openInBrowser.d.ts +0 -3
  418. package/lib/internal/apis/custom/web/alipay/openInBrowser.js +0 -3
  419. package/lib/internal/apis/custom/web/alipay/openOtherApp.d.ts +0 -3
  420. package/lib/internal/apis/custom/web/alipay/openOtherApp.js +0 -3
  421. package/lib/internal/apis/custom/web/alipay/openPayCodePage.d.ts +0 -3
  422. package/lib/internal/apis/custom/web/alipay/openPayCodePage.js +0 -3
  423. package/lib/internal/apis/custom/web/alipay/openScanPage.d.ts +0 -3
  424. package/lib/internal/apis/custom/web/alipay/openScanPage.js +0 -3
  425. package/lib/internal/apis/custom/web/alipay/openURL.d.ts +0 -2
  426. package/lib/internal/apis/custom/web/alipay/openURL.js +0 -26
  427. package/lib/internal/apis/custom/web/alipay/openWebURL.d.ts +0 -3
  428. package/lib/internal/apis/custom/web/alipay/openWebURL.js +0 -3
  429. package/lib/internal/apis/custom/web/alipay/popWindow.d.ts +0 -2
  430. package/lib/internal/apis/custom/web/alipay/popWindow.js +0 -4
  431. package/lib/internal/apis/custom/web/createWithoutAuthRpc.d.ts +0 -3
  432. package/lib/internal/apis/custom/web/createWithoutAuthRpc.js +0 -51
  433. package/lib/internal/apis/custom/web/defineRuntimeConfig.d.ts +0 -3
  434. package/lib/internal/apis/custom/web/defineRuntimeConfig.js +0 -7
  435. package/lib/internal/apis/custom/web/getCurrentLanguage.d.ts +0 -2
  436. package/lib/internal/apis/custom/web/getCurrentLanguage.js +0 -12
  437. package/lib/internal/apis/custom/web/h5/openURL.d.ts +0 -2
  438. package/lib/internal/apis/custom/web/h5/openURL.js +0 -15
  439. package/lib/internal/apis/custom/web/h5/popWindow.d.ts +0 -2
  440. package/lib/internal/apis/custom/web/h5/popWindow.js +0 -3
  441. package/lib/internal/apis/custom/web/removeNotifyListener.d.ts +0 -4
  442. package/lib/internal/apis/custom/web/removeNotifyListener.js +0 -27
  443. package/lib/internal/apis/custom/web/rpcWithAuthAPlus.d.ts +0 -3
  444. package/lib/internal/apis/custom/web/rpcWithAuthAPlus.js +0 -31
  445. package/lib/internal/utils/baseOpenUrl.d.ts +0 -15
  446. package/lib/internal/utils/baseOpenUrl.js +0 -125
  447. package/lib/internal/utils/index.d.ts +0 -9
  448. package/lib/internal/utils/index.js +0 -71
  449. package/lib/internal/utils/language.d.ts +0 -4
  450. package/lib/internal/utils/language.js +0 -46
  451. package/lib/internal/utils/network/authLogin.d.ts +0 -8
  452. package/lib/internal/utils/network/authLogin.js +0 -564
  453. package/lib/internal/utils/network/index.d.ts +0 -7
  454. package/lib/internal/utils/network/index.js +0 -246
  455. package/lib/internal/utils/router.d.ts +0 -35
  456. package/lib/internal/utils/router.js +0 -157
  457. package/lib/umd/mp_web_mpay.js.LICENSE.txt +0 -1
  458. package/lib/umd/mp_web_toss.js.LICENSE.txt +0 -1
  459. package/lib/umd/web_alipay.js.LICENSE.txt +0 -1
@@ -1,246 +0,0 @@
1
- var __assign = this && this.__assign || function () {
2
- __assign = Object.assign || function (t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
6
- }
7
- return t;
8
- };
9
- return __assign.apply(this, arguments);
10
- };
11
- var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
12
- function adopt(value) {
13
- return value instanceof P ? value : new P(function (resolve) {
14
- resolve(value);
15
- });
16
- }
17
- return new (P || (P = Promise))(function (resolve, reject) {
18
- function fulfilled(value) {
19
- try {
20
- step(generator.next(value));
21
- } catch (e) {
22
- reject(e);
23
- }
24
- }
25
- function rejected(value) {
26
- try {
27
- step(generator["throw"](value));
28
- } catch (e) {
29
- reject(e);
30
- }
31
- }
32
- function step(result) {
33
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
34
- }
35
- step((generator = generator.apply(thisArg, _arguments || [])).next());
36
- });
37
- };
38
- var __generator = this && this.__generator || function (thisArg, body) {
39
- var _ = {
40
- label: 0,
41
- sent: function sent() {
42
- if (t[0] & 1) throw t[1];
43
- return t[1];
44
- },
45
- trys: [],
46
- ops: []
47
- },
48
- f,
49
- y,
50
- t,
51
- g;
52
- return g = {
53
- next: verb(0),
54
- "throw": verb(1),
55
- "return": verb(2)
56
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
57
- return this;
58
- }), g;
59
- function verb(n) {
60
- return function (v) {
61
- return step([n, v]);
62
- };
63
- }
64
- function step(op) {
65
- if (f) throw new TypeError("Generator is already executing.");
66
- while (_) try {
67
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
68
- if (y = 0, t) op = [op[0] & 2, t.value];
69
- switch (op[0]) {
70
- case 0:
71
- case 1:
72
- t = op;
73
- break;
74
- case 4:
75
- _.label++;
76
- return {
77
- value: op[1],
78
- done: false
79
- };
80
- case 5:
81
- _.label++;
82
- y = op[1];
83
- op = [0];
84
- continue;
85
- case 7:
86
- op = _.ops.pop();
87
- _.trys.pop();
88
- continue;
89
- default:
90
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
91
- _ = 0;
92
- continue;
93
- }
94
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
95
- _.label = op[1];
96
- break;
97
- }
98
- if (op[0] === 6 && _.label < t[1]) {
99
- _.label = t[1];
100
- t = op;
101
- break;
102
- }
103
- if (t && _.label < t[2]) {
104
- _.label = t[2];
105
- _.ops.push(op);
106
- break;
107
- }
108
- if (t[2]) _.ops.pop();
109
- _.trys.pop();
110
- continue;
111
- }
112
- op = body.call(thisArg, _);
113
- } catch (e) {
114
- op = [6, e];
115
- y = 0;
116
- } finally {
117
- f = t = 0;
118
- }
119
- if (op[0] & 5) throw op[1];
120
- return {
121
- value: op[0] ? op[1] : void 0,
122
- done: true
123
- };
124
- }
125
- };
126
- var __rest = this && this.__rest || function (s, e) {
127
- var t = {};
128
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
129
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
130
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
131
- }
132
- return t;
133
- };
134
- import { implAsyncBridge } from '../index';
135
- import { checkIsLogin, httpSign } from './authLogin';
136
- export var implRpcWithAuth = function implRpcWithAuth(siteName, getStorage, setStorage, getAuthCode, getAppId, nonLoginRpc) {
137
- var authParamsKey = 'auth-login-storage';
138
- var authParamsCache = null;
139
- var getAuthParams = function getAuthParams() {
140
- if (authParamsCache) {
141
- return authParamsCache;
142
- }
143
- authParamsCache = getStorage({
144
- key: authParamsKey
145
- });
146
- return authParamsCache;
147
- };
148
- var saveAuthParams = function saveAuthParams(params) {
149
- authParamsCache = {
150
- data: params
151
- };
152
- return setStorage({
153
- key: authParamsKey,
154
- data: params
155
- });
156
- };
157
- var rpcWithAuthMiniRequest = implAsyncBridge(function (args, resolve, reject) {
158
- return __awaiter(void 0, void 0, void 0, function () {
159
- var oldHeader, otherArgs, httpRequest, error_1, signData, headers;
160
- return __generator(this, function (_a) {
161
- switch (_a.label) {
162
- case 0:
163
- oldHeader = args.headers, otherArgs = __rest(args, ["headers"]);
164
- // 强制把 requestData 设置为 string 类型,确保加签JSON序列化的格式一致
165
- if (typeof otherArgs.requestData !== 'string') {
166
- otherArgs.requestData = JSON.stringify(otherArgs.requestData);
167
- }
168
- httpRequest = function httpRequest(_a) {
169
- var httpRequestHeaders = _a.headers,
170
- operationType = _a.operationType,
171
- requestData = _a.requestData;
172
- return new Promise(function (httpRequestResolve, httpRequestReject) {
173
- nonLoginRpc(__assign(__assign({}, otherArgs), {
174
- requestData: requestData,
175
- headers: __assign(__assign(__assign({}, oldHeader), httpRequestHeaders), {
176
- 'Operation-Type': operationType
177
- }),
178
- operationType: operationType,
179
- success: function success(res) {
180
- httpRequestResolve(res === null || res === void 0 ? void 0 : res.resData);
181
- },
182
- fail: function fail(err) {
183
- httpRequestReject(err);
184
- }
185
- }));
186
- });
187
- };
188
- _a.label = 1;
189
- case 1:
190
- _a.trys.push([1, 3,, 4]);
191
- return [4 /*yield*/, checkIsLogin({
192
- httpRequest: httpRequest,
193
- isForceLogin: false,
194
- getAuthParams: getAuthParams,
195
- saveAuthParams: saveAuthParams,
196
- getAuthCode: getAuthCode,
197
- getAppId: getAppId,
198
- siteName: siteName
199
- })];
200
- case 2:
201
- _a.sent();
202
- return [3 /*break*/, 4];
203
- case 3:
204
- error_1 = _a.sent();
205
- reject(error_1);
206
- return [2 /*return*/];
207
- case 4:
208
- signData = httpSign(otherArgs, siteName);
209
- headers = __assign(__assign({}, oldHeader), signData);
210
- nonLoginRpc(__assign(__assign({}, otherArgs), {
211
- headers: headers,
212
- success: function success(response) {
213
- var _a, _b;
214
- var resultStatus = (_b = (_a = response.headers) === null || _a === void 0 ? void 0 : _a['result-status']) === null || _b === void 0 ? void 0 : _b.toString();
215
- if (resultStatus === '2000') {
216
- // 登陆失效
217
- checkIsLogin({
218
- httpRequest: httpRequest,
219
- isForceLogin: true,
220
- getAuthParams: getAuthParams,
221
- saveAuthParams: saveAuthParams,
222
- getAuthCode: getAuthCode,
223
- getAppId: getAppId,
224
- siteName: siteName
225
- }).then(function () {
226
- nonLoginRpc(__assign(__assign({}, otherArgs), {
227
- headers: headers,
228
- success: resolve,
229
- fail: reject
230
- }));
231
- }).catch(function (e) {
232
- reject(e);
233
- });
234
- } else {
235
- resolve(response);
236
- }
237
- },
238
- fail: reject
239
- }));
240
- return [2 /*return*/];
241
- }
242
- });
243
- });
244
- });
245
- return rpcWithAuthMiniRequest;
246
- };
@@ -1,35 +0,0 @@
1
- export declare type ErrorObject = {
2
- error: number;
3
- errorMessage?: string;
4
- [key: string]: any;
5
- };
6
- interface Callback {
7
- success?: () => void;
8
- fail?: (err: ErrorObject) => void;
9
- }
10
- export interface AlipaySchemeParams extends Callback {
11
- appId: string;
12
- path?: string;
13
- launchParams?: Record<string, any>;
14
- }
15
- export interface OpenURLParams extends Callback {
16
- url: string;
17
- path?: string;
18
- }
19
- export interface OpenBrowserFunc {
20
- (params: OpenURLParams): void;
21
- }
22
- export interface OpenPageFunc {
23
- (params: Callback): void;
24
- }
25
- interface InjectFunctions {
26
- openWebURL: OpenBrowserFunc;
27
- openInApp: OpenBrowserFunc;
28
- openInBrowser: OpenBrowserFunc;
29
- openPayCodePage: OpenPageFunc;
30
- openScanPage: OpenPageFunc;
31
- openApPayCodePage: OpenPageFunc;
32
- openOtherApp: (params: AlipaySchemeParams) => void;
33
- }
34
- export declare function implOpenURL(url: string, funcs: InjectFunctions, callback: Callback): void;
35
- export {};
@@ -1,157 +0,0 @@
1
- var __assign = this && this.__assign || function () {
2
- __assign = Object.assign || function (t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
6
- }
7
- return t;
8
- };
9
- return __assign.apply(this, arguments);
10
- };
11
- import { parse } from 'qs-es5';
12
- import URLParse from 'url-parse';
13
- var CustomSchemeRouteType;
14
- (function (CustomSchemeRouteType) {
15
- CustomSchemeRouteType["openInApp"] = "openinapp";
16
- CustomSchemeRouteType["openOtherApp"] = "openotherapp";
17
- CustomSchemeRouteType["openBizScene"] = "openbizscene";
18
- CustomSchemeRouteType["openPayCodePage"] = "openpaycodepage";
19
- CustomSchemeRouteType["openApPayCodePage"] = "openappaycodepage";
20
- CustomSchemeRouteType["openScanPage"] = "openscanpage";
21
- CustomSchemeRouteType["openInBrowser"] = "openinbrowser";
22
- })(CustomSchemeRouteType || (CustomSchemeRouteType = {}));
23
- var SceneCode;
24
- (function (SceneCode) {
25
- /** 扫一扫 */
26
- SceneCode["scan"] = "scan";
27
- /** 付款码 */
28
- SceneCode["payCode"] = "payCode";
29
- })(SceneCode || (SceneCode = {}));
30
- var ERROR_NOT_SUPPORT = function ERROR_NOT_SUPPORT(apiName) {
31
- return {
32
- error: -102,
33
- errorMessage: "[".concat(apiName, "]: Not Support")
34
- };
35
- };
36
- function openCustomScheme(url, funcs, callback) {
37
- var _a = new URLParse(url, true),
38
- host = _a.host,
39
- pathname = _a.pathname,
40
- query = _a.query;
41
- switch (host) {
42
- // 在应用内打开
43
- // 示例链接 aplus://openInApp/?url=https%3A%2F%2Fxx.xx.com%3Fa%3D1%26b%3D2
44
- case CustomSchemeRouteType.openInApp:
45
- // TODO: url 为空的监控?, 参数name不是 url 时怎么兼容
46
- funcs.openInApp(__assign({
47
- path: pathname,
48
- url: query.url || ''
49
- }, callback));
50
- break;
51
- // 打开其他应用
52
- // 示例链接 aplus://openOtherApp/?appId=2102000024800001&path=%2Fpages%2Findex%2Findex%3Furl%3Dhttps%253A%252F%252Fa.b.com%253Fa%253D1%2526b%253D2&launchParams=a%3D1%26b%3D2
53
- case CustomSchemeRouteType.openOtherApp:
54
- {
55
- console.log('### openCustomScheme', CustomSchemeRouteType.openOtherApp);
56
- var _b = query.appId,
57
- appId = _b === void 0 ? '' : _b,
58
- path = query.path,
59
- _c = query.launchParams,
60
- launchParamsStr = _c === void 0 ? '' : _c;
61
- // TODO: appId 为空的监控
62
- var launchParams = parse(launchParamsStr);
63
- funcs.openOtherApp(__assign({
64
- appId: appId,
65
- path: path,
66
- launchParams: launchParams
67
- }, callback));
68
- break;
69
- }
70
- // 跳转钱包功能 - 已弃用, 请直接调用 openScanPage / openPayCodePage / openApPayCodePage 方法
71
- // 示例链接 aplus://openBizScene/?sceneCode=scan
72
- case CustomSchemeRouteType.openBizScene:
73
- // 控制台提示. 部分链接由服务端返回, 暂无法直接下线
74
- console.warn('该 API 已弃用, 请使用 aplus://openApPayCodePage 等链接替代');
75
- if (query.sceneCode === SceneCode.scan) {
76
- funcs.openScanPage(callback);
77
- } else if (query.sceneCode === SceneCode.payCode) {
78
- // GOF 历史逻辑, 直接跳 A+ 支付码
79
- funcs.openApPayCodePage(callback);
80
- }
81
- // TODO: 其他场景,异常上报
82
- break;
83
- // 扫一扫
84
- // 示例链接 aplus://openScanPage
85
- case CustomSchemeRouteType.openScanPage:
86
- funcs.openScanPage(callback);
87
- break;
88
- // 跳支付码
89
- // 示例链接 aplus://openPayCodePage
90
- case CustomSchemeRouteType.openPayCodePage:
91
- funcs.openPayCodePage(callback);
92
- break;
93
- // 跳 A+ 支付码
94
- // 示例链接 aplus://openApPayCodePage
95
- case CustomSchemeRouteType.openApPayCodePage:
96
- funcs.openApPayCodePage(callback);
97
- break;
98
- case CustomSchemeRouteType.openInBrowser:
99
- // 在端外浏览器打开
100
- // 示例链接 aplus://openInBrowser/?url=https%3A%2F%2Fxx.xx.com%3Fa%3D1%26b%3D2
101
- // TODO: url 为空的监控?
102
- funcs.openInBrowser(__assign({
103
- url: query.url || ''
104
- }, callback));
105
- break;
106
- default:
107
- console.log('[openCustomScheme] 不支持的 routeType: ', host);
108
- if (callback.fail) {
109
- callback.fail(ERROR_NOT_SUPPORT("openCustomScheme ".concat(host)));
110
- }
111
- break;
112
- }
113
- }
114
- var CAPR_PARAM_STR = 'caprMode=sync';
115
- /**
116
- * 根据传入的相对路径,生成完整的页面URL。注意,只支持雨燕部署的 Smallfish 应用在线URL!
117
- * 示例:
118
- * 当前页面URL: https://render.alipay.com/p/yuyan/180020010000000209/www/index.html?caprMode=sync&a=1&b=2
119
- * 传入参数: /detail.html?c=3
120
- * 返回的URL: https://render.alipay.com/p/yuyan/180020010000000209/www/detail.html?c=3&caprMode=sync(保留夜鹰参数caprMode,其他参数不保留)
121
- * 文档: https://yuque.antfin.com/world-tour/fbip9a/scua9y7ph2cr2b2o#fIHjs
122
- */
123
- function getFullPageUrl(path) {
124
- // 移除最后的 /xx.html
125
- var pathname = location.pathname.replace(/\/[^/]+.html/, '');
126
- // 拼接新的URL
127
- var url = "".concat(location.protocol, "//").concat(location.host).concat(pathname).concat(path);
128
- // 若当前页面是夜鹰模式,则添加夜鹰参数
129
- var isCaprMode = location.search.includes(CAPR_PARAM_STR);
130
- if (isCaprMode) {
131
- var separator = url.includes('?') ? '&' : '?';
132
- return "".concat(url).concat(separator).concat(CAPR_PARAM_STR);
133
- }
134
- // 否则直接返回
135
- return url;
136
- }
137
- export function implOpenURL(url, funcs, callback) {
138
- if (!url) {
139
- // TODO: url 为空的监控?
140
- return;
141
- }
142
- if (url.startsWith('aplus://')) {
143
- // 自定义 scheme,解析后调用具体的跳转方法
144
- openCustomScheme(url, funcs, callback);
145
- } else if (url.startsWith('/')) {
146
- // 相对路径,在应用内打开
147
- var fullPageUrl = getFullPageUrl(url);
148
- funcs.openInApp(__assign({
149
- url: fullPageUrl
150
- }, callback));
151
- } else {
152
- // http[s]、deeplink 等
153
- funcs.openWebURL(__assign({
154
- url: url
155
- }, callback));
156
- }
157
- }
@@ -1 +0,0 @@
1
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
@@ -1 +0,0 @@
1
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
@@ -1 +0,0 @@
1
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */