@anker-in/campaign-ui 0.3.4 → 0.4.0-beta.1

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 (363) hide show
  1. package/dist/cjs/components/LiveChatWidget/LiveChatWidget.js +1 -1
  2. package/dist/cjs/components/LiveChatWidget/LiveChatWidget.js.map +3 -3
  3. package/dist/cjs/components/LiveChatWidget/components/MessageContent/PromotionList.js.map +2 -2
  4. package/dist/cjs/components/LiveChatWidget/components/MessageList.js +3 -3
  5. package/dist/cjs/components/LiveChatWidget/components/MessageList.js.map +3 -3
  6. package/dist/cjs/components/LiveChatWidget/hooks/useChatState.d.ts +2 -1
  7. package/dist/cjs/components/LiveChatWidget/hooks/useChatState.js +1 -1
  8. package/dist/cjs/components/LiveChatWidget/hooks/useChatState.js.map +2 -2
  9. package/dist/cjs/components/LiveChatWidget/types.d.ts +2 -1
  10. package/dist/cjs/components/LiveChatWidget/types.js.map +1 -1
  11. package/dist/cjs/components/credits/context/const.d.ts +10 -2
  12. package/dist/cjs/components/credits/context/const.js +1 -1
  13. package/dist/cjs/components/credits/context/const.js.map +2 -2
  14. package/dist/cjs/components/credits/context/hooks/useFunctionMemberPrice.d.ts +7 -0
  15. package/dist/cjs/components/credits/context/hooks/useFunctionMemberPrice.js +2 -0
  16. package/dist/cjs/components/credits/context/hooks/useFunctionMemberPrice.js.map +7 -0
  17. package/dist/cjs/components/credits/context/hooks/useMyRewards.js +1 -1
  18. package/dist/cjs/components/credits/context/hooks/useMyRewards.js.map +3 -3
  19. package/dist/cjs/components/credits/context/hooks/useRedeemGoGift.d.ts +17 -0
  20. package/dist/cjs/components/credits/context/hooks/useRedeemGoGift.js +2 -0
  21. package/dist/cjs/components/credits/context/hooks/useRedeemGoGift.js.map +7 -0
  22. package/dist/cjs/components/credits/context/hooks/useRedeemableList.d.ts +7 -2
  23. package/dist/cjs/components/credits/context/hooks/useRedeemableList.js +1 -1
  24. package/dist/cjs/components/credits/context/hooks/useRedeemableList.js.map +3 -3
  25. package/dist/cjs/components/credits/context/provider.d.ts +5 -1
  26. package/dist/cjs/components/credits/context/provider.js +1 -1
  27. package/dist/cjs/components/credits/context/provider.js.map +3 -3
  28. package/dist/cjs/components/credits/context/response.d.ts +1 -0
  29. package/dist/cjs/components/credits/context/response.js.map +1 -1
  30. package/dist/cjs/components/credits/context/utils/atobID.d.ts +1 -0
  31. package/dist/cjs/components/credits/context/utils/atobID.js +2 -0
  32. package/dist/cjs/components/credits/context/utils/atobID.js.map +7 -0
  33. package/dist/cjs/components/credits/context/utils/functionDiscountCalculate.d.ts +5 -0
  34. package/dist/cjs/components/credits/context/utils/functionDiscountCalculate.js +2 -0
  35. package/dist/cjs/components/credits/context/utils/functionDiscountCalculate.js.map +7 -0
  36. package/dist/cjs/components/credits/context/utils/getFunctionMemberPrice.d.ts +8 -0
  37. package/dist/cjs/components/credits/context/utils/getFunctionMemberPrice.js +2 -0
  38. package/dist/cjs/components/credits/context/utils/getFunctionMemberPrice.js.map +7 -0
  39. package/dist/cjs/components/credits/context/utils/getFunctionMemberPriceDiscountConfig.d.ts +9 -0
  40. package/dist/cjs/components/credits/context/utils/getFunctionMemberPriceDiscountConfig.js +2 -0
  41. package/dist/cjs/components/credits/context/utils/getFunctionMemberPriceDiscountConfig.js.map +7 -0
  42. package/dist/cjs/components/credits/context/utils/variantGetCoupon.d.ts +6 -0
  43. package/dist/cjs/components/credits/context/utils/variantGetCoupon.js +2 -0
  44. package/dist/cjs/components/credits/context/utils/variantGetCoupon.js.map +7 -0
  45. package/dist/cjs/components/credits/creditsAnkersolixTask/CreditsAnkersolixTask.js +1 -1
  46. package/dist/cjs/components/credits/creditsAnkersolixTask/CreditsAnkersolixTask.js.map +2 -2
  47. package/dist/cjs/components/credits/creditsBanner/index.js +2 -2
  48. package/dist/cjs/components/credits/creditsBanner/index.js.map +2 -2
  49. package/dist/cjs/components/credits/creditsCash/CreditsCash.js +1 -1
  50. package/dist/cjs/components/credits/creditsCash/CreditsCash.js.map +2 -2
  51. package/dist/cjs/components/credits/creditsGoGift/CreditsGoGift.d.ts +5 -0
  52. package/dist/cjs/components/credits/creditsGoGift/CreditsGoGift.js +2 -0
  53. package/dist/cjs/components/credits/creditsGoGift/CreditsGoGift.js.map +7 -0
  54. package/dist/cjs/components/credits/creditsGoGift/index.d.ts +2 -0
  55. package/dist/cjs/components/credits/creditsGoGift/index.js +2 -0
  56. package/dist/cjs/components/credits/creditsGoGift/index.js.map +7 -0
  57. package/dist/cjs/components/credits/creditsGoGift/type.d.ts +22 -0
  58. package/dist/cjs/components/credits/creditsGoGift/type.js +2 -0
  59. package/dist/cjs/components/credits/creditsGoGift/type.js.map +7 -0
  60. package/dist/cjs/components/credits/creditsGofit/CreditsGofit.d.ts +5 -0
  61. package/dist/cjs/components/credits/creditsGofit/CreditsGofit.js +2 -0
  62. package/dist/cjs/components/credits/creditsGofit/CreditsGofit.js.map +7 -0
  63. package/dist/cjs/components/credits/creditsGofit/index.d.ts +2 -0
  64. package/dist/cjs/components/credits/creditsGofit/index.js +2 -0
  65. package/dist/cjs/components/credits/creditsGofit/index.js.map +7 -0
  66. package/dist/cjs/components/credits/creditsGofit/type.d.ts +22 -0
  67. package/dist/cjs/components/credits/creditsGofit/type.js +2 -0
  68. package/dist/cjs/components/credits/creditsGofit/type.js.map +7 -0
  69. package/dist/cjs/components/credits/creditsInfoCard/index.js +1 -1
  70. package/dist/cjs/components/credits/creditsInfoCard/index.js.map +3 -3
  71. package/dist/cjs/components/credits/creditsMemberPrice/CreditsMemberPrice.js +1 -1
  72. package/dist/cjs/components/credits/creditsMemberPrice/CreditsMemberPrice.js.map +2 -2
  73. package/dist/cjs/components/credits/creditsRedeemList/CreditsRedeemList.js +1 -1
  74. package/dist/cjs/components/credits/creditsRedeemList/CreditsRedeemList.js.map +3 -3
  75. package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal/CouponInit.d.ts +10 -0
  76. package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal/CouponInit.js +2 -0
  77. package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal/CouponInit.js.map +7 -0
  78. package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal/CouponSuccess.d.ts +10 -0
  79. package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal/CouponSuccess.js +2 -0
  80. package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal/CouponSuccess.js.map +7 -0
  81. package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal.d.ts +4 -5
  82. package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal.js +1 -1
  83. package/dist/cjs/components/credits/creditsRedeemList/RedeemCouponModal.js.map +3 -3
  84. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Address.d.ts +2 -3
  85. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Address.js +1 -1
  86. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Address.js.map +2 -2
  87. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Init.d.ts +2 -3
  88. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Init.js +1 -1
  89. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Init.js.map +2 -2
  90. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.d.ts +1 -3
  91. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.js +1 -1
  92. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.js.map +3 -3
  93. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.d.ts +3 -4
  94. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.js +1 -1
  95. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.js.map +2 -2
  96. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Success.d.ts +2 -3
  97. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Success.js +1 -1
  98. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/Success.js.map +2 -2
  99. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/index.d.ts +4 -5
  100. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/index.js +1 -1
  101. package/dist/cjs/components/credits/creditsRedeemList/RedeemProductModal/index.js.map +3 -3
  102. package/dist/cjs/components/credits/creditsRedeemList/RedeemVirtualProductModal/VirtualProductInit.d.ts +10 -0
  103. package/dist/cjs/components/credits/creditsRedeemList/RedeemVirtualProductModal/VirtualProductInit.js +2 -0
  104. package/dist/cjs/components/credits/creditsRedeemList/RedeemVirtualProductModal/VirtualProductInit.js.map +7 -0
  105. package/dist/cjs/components/credits/creditsRedeemList/RedeemVirtualProductModal/VirtualProductSuccess.d.ts +9 -0
  106. package/dist/cjs/components/credits/creditsRedeemList/RedeemVirtualProductModal/VirtualProductSuccess.js +2 -0
  107. package/dist/cjs/components/credits/creditsRedeemList/RedeemVirtualProductModal/VirtualProductSuccess.js.map +7 -0
  108. package/dist/cjs/components/credits/creditsRedeemList/RedeemVirtualProductModal.d.ts +8 -0
  109. package/dist/cjs/components/credits/creditsRedeemList/RedeemVirtualProductModal.js +2 -0
  110. package/dist/cjs/components/credits/creditsRedeemList/RedeemVirtualProductModal.js.map +7 -0
  111. package/dist/cjs/components/credits/creditsRedeemList/RedeemableItem.js +1 -1
  112. package/dist/cjs/components/credits/creditsRedeemList/RedeemableItem.js.map +2 -2
  113. package/dist/cjs/components/credits/creditsRedeemList/type.d.ts +11 -0
  114. package/dist/cjs/components/credits/creditsRedeemList/type.js +1 -1
  115. package/dist/cjs/components/credits/creditsRedeemList/type.js.map +1 -1
  116. package/dist/cjs/components/credits/creditsWaysToGetCredits/CreditsWaysToGetCredits.js +1 -1
  117. package/dist/cjs/components/credits/creditsWaysToGetCredits/CreditsWaysToGetCredits.js.map +2 -2
  118. package/dist/cjs/components/credits/creditsWaysToGetCredits/type.d.ts +2 -2
  119. package/dist/cjs/components/credits/creditsWaysToGetCredits/type.js.map +1 -1
  120. package/dist/cjs/components/credits/index.d.ts +2 -1
  121. package/dist/cjs/components/credits/index.js +1 -1
  122. package/dist/cjs/components/credits/index.js.map +3 -3
  123. package/dist/cjs/components/credits/modal/MyRewardsModal.d.ts +16 -0
  124. package/dist/cjs/components/credits/modal/MyRewardsModal.js +1 -1
  125. package/dist/cjs/components/credits/modal/MyRewardsModal.js.map +3 -3
  126. package/dist/cjs/components/credits/modal/RewardsModal.d.ts +64 -0
  127. package/dist/cjs/components/credits/modal/RewardsModal.js +2 -0
  128. package/dist/cjs/components/credits/modal/RewardsModal.js.map +7 -0
  129. package/dist/cjs/components/credits/modal/activitiesModal.d.ts +1 -1
  130. package/dist/cjs/components/credits/modal/activitiesModal.js +2 -2
  131. package/dist/cjs/components/credits/modal/activitiesModal.js.map +3 -3
  132. package/dist/cjs/components/credits/modal/creditsUploadReceiptModal.js +2 -2
  133. package/dist/cjs/components/credits/modal/creditsUploadReceiptModal.js.map +3 -3
  134. package/dist/cjs/components/credits/modal/loadingDots.js +1 -1
  135. package/dist/cjs/components/credits/modal/loadingDots.js.map +2 -2
  136. package/dist/cjs/components/credits/modal/modalContainer.js +2 -2
  137. package/dist/cjs/components/credits/modal/modalContainer.js.map +4 -4
  138. package/dist/cjs/components/credits/modal/rulesModal.d.ts +1 -1
  139. package/dist/cjs/components/credits/modal/rulesModal.js +2 -2
  140. package/dist/cjs/components/credits/modal/rulesModal.js.map +3 -3
  141. package/dist/cjs/components/credits/modal/subscribeModal.d.ts +1 -1
  142. package/dist/cjs/components/credits/modal/subscribeModal.js +2 -2
  143. package/dist/cjs/components/credits/modal/subscribeModal.js.map +3 -3
  144. package/dist/cjs/components/credits/modal/tip.js +1 -1
  145. package/dist/cjs/components/credits/modal/tip.js.map +2 -2
  146. package/dist/cjs/components/credits/type.d.ts +67 -5
  147. package/dist/cjs/components/credits/type.js +1 -1
  148. package/dist/cjs/components/credits/type.js.map +1 -1
  149. package/dist/cjs/stories/LiveChatWidget.stories.js +2 -9
  150. package/dist/cjs/stories/LiveChatWidget.stories.js.map +2 -2
  151. package/dist/cjs/templates/Credits.d.ts +1 -87
  152. package/dist/cjs/templates/Credits.js +1 -1
  153. package/dist/cjs/templates/Credits.js.map +3 -3
  154. package/dist/cjs/templates/Credits.types.d.ts +96 -0
  155. package/dist/cjs/templates/Credits.types.js +2 -0
  156. package/dist/cjs/templates/Credits.types.js.map +7 -0
  157. package/dist/esm/components/LiveChatWidget/LiveChatWidget.js +1 -1
  158. package/dist/esm/components/LiveChatWidget/LiveChatWidget.js.map +3 -3
  159. package/dist/esm/components/LiveChatWidget/components/MessageContent/PromotionList.js.map +2 -2
  160. package/dist/esm/components/LiveChatWidget/components/MessageList.js +3 -3
  161. package/dist/esm/components/LiveChatWidget/components/MessageList.js.map +3 -3
  162. package/dist/esm/components/LiveChatWidget/hooks/useChatState.d.ts +2 -1
  163. package/dist/esm/components/LiveChatWidget/hooks/useChatState.js +1 -1
  164. package/dist/esm/components/LiveChatWidget/hooks/useChatState.js.map +2 -2
  165. package/dist/esm/components/LiveChatWidget/types.d.ts +2 -1
  166. package/dist/esm/components/credits/context/const.d.ts +10 -2
  167. package/dist/esm/components/credits/context/const.js +1 -1
  168. package/dist/esm/components/credits/context/const.js.map +2 -2
  169. package/dist/esm/components/credits/context/hooks/useFunctionMemberPrice.d.ts +7 -0
  170. package/dist/esm/components/credits/context/hooks/useFunctionMemberPrice.js +2 -0
  171. package/dist/esm/components/credits/context/hooks/useFunctionMemberPrice.js.map +7 -0
  172. package/dist/esm/components/credits/context/hooks/useMyRewards.js +1 -1
  173. package/dist/esm/components/credits/context/hooks/useMyRewards.js.map +3 -3
  174. package/dist/esm/components/credits/context/hooks/useRedeemGoGift.d.ts +17 -0
  175. package/dist/esm/components/credits/context/hooks/useRedeemGoGift.js +2 -0
  176. package/dist/esm/components/credits/context/hooks/useRedeemGoGift.js.map +7 -0
  177. package/dist/esm/components/credits/context/hooks/useRedeemableList.d.ts +7 -2
  178. package/dist/esm/components/credits/context/hooks/useRedeemableList.js +1 -1
  179. package/dist/esm/components/credits/context/hooks/useRedeemableList.js.map +3 -3
  180. package/dist/esm/components/credits/context/provider.d.ts +5 -1
  181. package/dist/esm/components/credits/context/provider.js +1 -1
  182. package/dist/esm/components/credits/context/provider.js.map +3 -3
  183. package/dist/esm/components/credits/context/response.d.ts +1 -0
  184. package/dist/esm/components/credits/context/utils/atobID.d.ts +1 -0
  185. package/dist/esm/components/credits/context/utils/atobID.js +2 -0
  186. package/dist/esm/components/credits/context/utils/atobID.js.map +7 -0
  187. package/dist/esm/components/credits/context/utils/functionDiscountCalculate.d.ts +5 -0
  188. package/dist/esm/components/credits/context/utils/functionDiscountCalculate.js +2 -0
  189. package/dist/esm/components/credits/context/utils/functionDiscountCalculate.js.map +7 -0
  190. package/dist/esm/components/credits/context/utils/getFunctionMemberPrice.d.ts +8 -0
  191. package/dist/esm/components/credits/context/utils/getFunctionMemberPrice.js +2 -0
  192. package/dist/esm/components/credits/context/utils/getFunctionMemberPrice.js.map +7 -0
  193. package/dist/esm/components/credits/context/utils/getFunctionMemberPriceDiscountConfig.d.ts +9 -0
  194. package/dist/esm/components/credits/context/utils/getFunctionMemberPriceDiscountConfig.js +2 -0
  195. package/dist/esm/components/credits/context/utils/getFunctionMemberPriceDiscountConfig.js.map +7 -0
  196. package/dist/esm/components/credits/context/utils/variantGetCoupon.d.ts +6 -0
  197. package/dist/esm/components/credits/context/utils/variantGetCoupon.js +2 -0
  198. package/dist/esm/components/credits/context/utils/variantGetCoupon.js.map +7 -0
  199. package/dist/esm/components/credits/creditsAnkersolixTask/CreditsAnkersolixTask.js +1 -1
  200. package/dist/esm/components/credits/creditsAnkersolixTask/CreditsAnkersolixTask.js.map +1 -1
  201. package/dist/esm/components/credits/creditsBanner/index.js +2 -2
  202. package/dist/esm/components/credits/creditsBanner/index.js.map +2 -2
  203. package/dist/esm/components/credits/creditsCash/CreditsCash.js +1 -1
  204. package/dist/esm/components/credits/creditsCash/CreditsCash.js.map +1 -1
  205. package/dist/esm/components/credits/creditsGoGift/CreditsGoGift.d.ts +5 -0
  206. package/dist/esm/components/credits/creditsGoGift/CreditsGoGift.js +2 -0
  207. package/dist/esm/components/credits/creditsGoGift/CreditsGoGift.js.map +7 -0
  208. package/dist/esm/components/credits/creditsGoGift/index.d.ts +2 -0
  209. package/dist/esm/components/credits/creditsGoGift/index.js +2 -0
  210. package/dist/esm/components/credits/creditsGoGift/index.js.map +7 -0
  211. package/dist/esm/components/credits/creditsGoGift/type.d.ts +22 -0
  212. package/dist/esm/components/credits/creditsGoGift/type.js +1 -0
  213. package/dist/esm/components/credits/creditsGoGift/type.js.map +7 -0
  214. package/dist/esm/components/credits/creditsGofit/CreditsGofit.d.ts +5 -0
  215. package/dist/esm/components/credits/creditsGofit/CreditsGofit.js +2 -0
  216. package/dist/esm/components/credits/creditsGofit/CreditsGofit.js.map +7 -0
  217. package/dist/esm/components/credits/creditsGofit/index.d.ts +2 -0
  218. package/dist/esm/components/credits/creditsGofit/index.js +2 -0
  219. package/dist/esm/components/credits/creditsGofit/index.js.map +7 -0
  220. package/dist/esm/components/credits/creditsGofit/type.d.ts +22 -0
  221. package/dist/esm/components/credits/creditsGofit/type.js +1 -0
  222. package/dist/esm/components/credits/creditsGofit/type.js.map +7 -0
  223. package/dist/esm/components/credits/creditsInfoCard/index.js +1 -1
  224. package/dist/esm/components/credits/creditsInfoCard/index.js.map +3 -3
  225. package/dist/esm/components/credits/creditsMemberPrice/CreditsMemberPrice.js +1 -1
  226. package/dist/esm/components/credits/creditsMemberPrice/CreditsMemberPrice.js.map +1 -1
  227. package/dist/esm/components/credits/creditsRedeemList/CreditsRedeemList.js +1 -1
  228. package/dist/esm/components/credits/creditsRedeemList/CreditsRedeemList.js.map +3 -3
  229. package/dist/esm/components/credits/creditsRedeemList/RedeemCouponModal/CouponInit.d.ts +10 -0
  230. package/dist/esm/components/credits/creditsRedeemList/RedeemCouponModal/CouponInit.js +2 -0
  231. package/dist/esm/components/credits/creditsRedeemList/RedeemCouponModal/CouponInit.js.map +7 -0
  232. package/dist/esm/components/credits/creditsRedeemList/RedeemCouponModal/CouponSuccess.d.ts +10 -0
  233. package/dist/esm/components/credits/creditsRedeemList/RedeemCouponModal/CouponSuccess.js +2 -0
  234. package/dist/esm/components/credits/creditsRedeemList/RedeemCouponModal/CouponSuccess.js.map +7 -0
  235. package/dist/esm/components/credits/creditsRedeemList/RedeemCouponModal.d.ts +4 -5
  236. package/dist/esm/components/credits/creditsRedeemList/RedeemCouponModal.js +1 -1
  237. package/dist/esm/components/credits/creditsRedeemList/RedeemCouponModal.js.map +3 -3
  238. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Address.d.ts +2 -3
  239. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Address.js +1 -1
  240. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Address.js.map +2 -2
  241. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Init.d.ts +2 -3
  242. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Init.js +1 -1
  243. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Init.js.map +2 -2
  244. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.d.ts +1 -3
  245. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.js +1 -1
  246. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.js.map +3 -3
  247. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.d.ts +3 -4
  248. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.js +1 -1
  249. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.js.map +2 -2
  250. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Success.d.ts +2 -3
  251. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Success.js +1 -1
  252. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/Success.js.map +2 -2
  253. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/index.d.ts +4 -5
  254. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/index.js +1 -1
  255. package/dist/esm/components/credits/creditsRedeemList/RedeemProductModal/index.js.map +3 -3
  256. package/dist/esm/components/credits/creditsRedeemList/RedeemVirtualProductModal/VirtualProductInit.d.ts +10 -0
  257. package/dist/esm/components/credits/creditsRedeemList/RedeemVirtualProductModal/VirtualProductInit.js +2 -0
  258. package/dist/esm/components/credits/creditsRedeemList/RedeemVirtualProductModal/VirtualProductInit.js.map +7 -0
  259. package/dist/esm/components/credits/creditsRedeemList/RedeemVirtualProductModal/VirtualProductSuccess.d.ts +9 -0
  260. package/dist/esm/components/credits/creditsRedeemList/RedeemVirtualProductModal/VirtualProductSuccess.js +2 -0
  261. package/dist/esm/components/credits/creditsRedeemList/RedeemVirtualProductModal/VirtualProductSuccess.js.map +7 -0
  262. package/dist/esm/components/credits/creditsRedeemList/RedeemVirtualProductModal.d.ts +8 -0
  263. package/dist/esm/components/credits/creditsRedeemList/RedeemVirtualProductModal.js +2 -0
  264. package/dist/esm/components/credits/creditsRedeemList/RedeemVirtualProductModal.js.map +7 -0
  265. package/dist/esm/components/credits/creditsRedeemList/RedeemableItem.js +1 -1
  266. package/dist/esm/components/credits/creditsRedeemList/RedeemableItem.js.map +2 -2
  267. package/dist/esm/components/credits/creditsRedeemList/type.d.ts +11 -0
  268. package/dist/esm/components/credits/creditsWaysToGetCredits/CreditsWaysToGetCredits.js +1 -1
  269. package/dist/esm/components/credits/creditsWaysToGetCredits/CreditsWaysToGetCredits.js.map +1 -1
  270. package/dist/esm/components/credits/creditsWaysToGetCredits/type.d.ts +2 -2
  271. package/dist/esm/components/credits/creditsWaysToGetCredits/type.js.map +1 -1
  272. package/dist/esm/components/credits/index.d.ts +2 -1
  273. package/dist/esm/components/credits/index.js +1 -1
  274. package/dist/esm/components/credits/index.js.map +3 -3
  275. package/dist/esm/components/credits/modal/MyRewardsModal.d.ts +16 -0
  276. package/dist/esm/components/credits/modal/MyRewardsModal.js +1 -1
  277. package/dist/esm/components/credits/modal/MyRewardsModal.js.map +3 -3
  278. package/dist/esm/components/credits/modal/RewardsModal.d.ts +64 -0
  279. package/dist/esm/components/credits/modal/RewardsModal.js +2 -0
  280. package/dist/esm/components/credits/modal/RewardsModal.js.map +7 -0
  281. package/dist/esm/components/credits/modal/activitiesModal.d.ts +1 -1
  282. package/dist/esm/components/credits/modal/activitiesModal.js +2 -2
  283. package/dist/esm/components/credits/modal/activitiesModal.js.map +3 -3
  284. package/dist/esm/components/credits/modal/creditsUploadReceiptModal.js +2 -2
  285. package/dist/esm/components/credits/modal/creditsUploadReceiptModal.js.map +2 -2
  286. package/dist/esm/components/credits/modal/loadingDots.js +1 -1
  287. package/dist/esm/components/credits/modal/loadingDots.js.map +2 -2
  288. package/dist/esm/components/credits/modal/modalContainer.js +2 -2
  289. package/dist/esm/components/credits/modal/modalContainer.js.map +3 -3
  290. package/dist/esm/components/credits/modal/rulesModal.d.ts +1 -1
  291. package/dist/esm/components/credits/modal/rulesModal.js +2 -2
  292. package/dist/esm/components/credits/modal/rulesModal.js.map +3 -3
  293. package/dist/esm/components/credits/modal/subscribeModal.d.ts +1 -1
  294. package/dist/esm/components/credits/modal/subscribeModal.js +2 -2
  295. package/dist/esm/components/credits/modal/subscribeModal.js.map +2 -2
  296. package/dist/esm/components/credits/modal/tip.js +1 -1
  297. package/dist/esm/components/credits/modal/tip.js.map +2 -2
  298. package/dist/esm/components/credits/type.d.ts +67 -5
  299. package/dist/esm/stories/LiveChatWidget.stories.js +1 -8
  300. package/dist/esm/stories/LiveChatWidget.stories.js.map +2 -2
  301. package/dist/esm/templates/Credits.d.ts +1 -87
  302. package/dist/esm/templates/Credits.js +1 -1
  303. package/dist/esm/templates/Credits.js.map +3 -3
  304. package/dist/esm/templates/Credits.types.d.ts +96 -0
  305. package/dist/esm/templates/Credits.types.js +2 -0
  306. package/dist/esm/templates/Credits.types.js.map +7 -0
  307. package/package.json +2 -2
  308. package/src/components/LiveChatWidget/LiveChatWidget.tsx +20 -0
  309. package/src/components/LiveChatWidget/components/MessageContent/PromotionList.tsx +1 -1
  310. package/src/components/LiveChatWidget/components/MessageList.tsx +39 -44
  311. package/src/components/LiveChatWidget/hooks/useChatState.ts +4 -3
  312. package/src/components/LiveChatWidget/types.ts +2 -1
  313. package/src/components/credits/context/const.ts +8 -0
  314. package/src/components/credits/context/hooks/useMyRewards.ts +7 -31
  315. package/src/components/credits/context/hooks/useRedeemGoGift.ts +36 -0
  316. package/src/components/credits/context/hooks/useRedeemableList.ts +13 -19
  317. package/src/components/credits/context/provider.tsx +17 -2
  318. package/src/components/credits/context/response.ts +1 -0
  319. package/src/components/credits/creditsAnkersolixTask/CreditsAnkersolixTask.tsx +2 -2
  320. package/src/components/credits/creditsBanner/index.tsx +5 -5
  321. package/src/components/credits/creditsCash/CreditsCash.tsx +1 -1
  322. package/src/components/credits/creditsGoGift/CreditsGoGift.tsx +210 -0
  323. package/src/components/credits/creditsGoGift/index.ts +2 -0
  324. package/src/components/credits/creditsGoGift/type.ts +23 -0
  325. package/src/components/credits/creditsInfoCard/index.tsx +5 -28
  326. package/src/components/credits/creditsMemberPrice/CreditsMemberPrice.tsx +1 -1
  327. package/src/components/credits/creditsRedeemList/CreditsRedeemList.tsx +39 -17
  328. package/src/components/credits/creditsRedeemList/RedeemCouponModal/CouponInit.tsx +77 -0
  329. package/src/components/credits/creditsRedeemList/RedeemCouponModal/CouponSuccess.tsx +86 -0
  330. package/src/components/credits/creditsRedeemList/RedeemCouponModal.tsx +29 -138
  331. package/src/components/credits/creditsRedeemList/RedeemProductModal/Address.tsx +5 -6
  332. package/src/components/credits/creditsRedeemList/RedeemProductModal/Init.tsx +11 -12
  333. package/src/components/credits/creditsRedeemList/RedeemProductModal/NonProductValue.tsx +23 -14
  334. package/src/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.tsx +11 -9
  335. package/src/components/credits/creditsRedeemList/RedeemProductModal/Success.tsx +4 -5
  336. package/src/components/credits/creditsRedeemList/RedeemProductModal/index.tsx +29 -28
  337. package/src/components/credits/creditsRedeemList/RedeemVirtualProductModal/VirtualProductInit.tsx +101 -0
  338. package/src/components/credits/creditsRedeemList/RedeemVirtualProductModal/VirtualProductSuccess.tsx +65 -0
  339. package/src/components/credits/creditsRedeemList/RedeemVirtualProductModal.tsx +156 -0
  340. package/src/components/credits/creditsRedeemList/RedeemableItem.tsx +1 -1
  341. package/src/components/credits/creditsRedeemList/type.ts +11 -0
  342. package/src/components/credits/creditsWaysToGetCredits/CreditsWaysToGetCredits.tsx +2 -2
  343. package/src/components/credits/creditsWaysToGetCredits/type.ts +2 -2
  344. package/src/components/credits/index.ts +2 -1
  345. package/src/components/credits/modal/{activitiesModal.tsx → ActivitiesModal.tsx} +2 -2
  346. package/src/components/credits/modal/{creditsUploadReceiptModal.tsx → CreditsUploadReceiptModal.tsx} +1 -1
  347. package/src/components/credits/modal/{modalContainer.tsx → ModalContainer.tsx} +1 -1
  348. package/src/components/credits/modal/{MyRewardsModal.tsx → RewardsModal.tsx} +145 -103
  349. package/src/components/credits/modal/{rulesModal.tsx → RulesModal.tsx} +1 -1
  350. package/src/components/credits/modal/{subscribeModal.tsx → SubscribeModal.tsx} +1 -1
  351. package/src/components/credits/type.ts +68 -5
  352. package/src/stories/LiveChatWidget.stories.tsx +7 -12
  353. package/src/styles/livechat.css +29 -0
  354. package/src/templates/Credits.tsx +110 -142
  355. package/src/templates/Credits.types.ts +110 -0
  356. package/dist/index.d.mts +0 -1305
  357. package/dist/index.d.ts +0 -1305
  358. package/dist/index.js +0 -26656
  359. package/dist/index.js.map +0 -1
  360. package/dist/index.mjs +0 -26641
  361. package/dist/index.mjs.map +0 -1
  362. /package/src/components/credits/modal/{loadingDots.tsx → LoadingDots.tsx} +0 -0
  363. /package/src/components/credits/modal/{tip.tsx → Tip.tsx} +0 -0
package/dist/index.d.mts DELETED
@@ -1,1305 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as React$1 from 'react';
3
- import React__default, { PropsWithChildren, Dispatch, SetStateAction } from 'react';
4
- export { useCopilotAction, useCopilotChat, useCopilotReadable } from '@copilotkit/react-core';
5
- export { ActionExecutionMessage, Role, TextMessage } from '@copilotkit/runtime-client-gql';
6
- import * as swr_dist_mutation from 'swr/dist/mutation';
7
- import { HeadlessConfig } from '@anker-in/lib';
8
-
9
- interface ChatProps {
10
- title: string;
11
- runtimeUrl: string;
12
- shopifyDomain: string;
13
- /** GA 的 client id
14
- */
15
- userId: string;
16
- /** 是否登陆用户 0 or 1
17
- */
18
- account?: string;
19
- /** 用户浏览器语言
20
- */
21
- locale?: string;
22
- /** 开场白
23
- */
24
- prologue?: string;
25
- /** ?a=1&b=2
26
- */
27
- query?: string;
28
- /** 'follow' or 'unfollow' | true or false
29
- * follow: ResponseButton 会跟随在 messages 的后边
30
- * unfollow: ResponseButton 在聊天框底部
31
- */
32
- showResponseButton?: string | boolean;
33
- /** messages 的回调事件
34
- * 每次生成/接受新的messages,会将 整个 messages list 传递给外部
35
- */
36
- messagesCallback?: (_messages: any) => void;
37
- /** 通用 action 的触发事件
38
- */
39
- commonRender?: string | ((_props: any) => React__default.ReactElement);
40
- /** shulex的 action 的触发事件
41
- */
42
- shulexRender?: string | ((_props: any) => React__default.ReactElement);
43
- /** 通用 积分 换 Coupon 的触发事件
44
- */
45
- pointsExchangeCouponRender?: string | ((_props: any) => React__default.ReactElement);
46
- /** 跳转 checkout action 卡片,接受参数: {"status":"complete","args":[{"sku":["A3936031"],"handle":"space-a40-a3936031"}],"result":""}
47
- * 后端接口文档:https://anker-in.feishu.cn/wiki/DOYJwE9oxipWmYk072ncnJNznBb
48
- */
49
- gotocheckoutRender?: string | ((_props: any) => React__default.ReactElement);
50
- /** 打开购物车 action 卡片,接受参数: {"status":"complete","args":[{"sku":["A3936031"],"handle":"space-a40-a3936031"}],"result":""}
51
- * 后端接口文档:https://anker-in.feishu.cn/wiki/DOYJwE9oxipWmYk072ncnJNznBb
52
- */
53
- gotocartRender?: string | ((_props: any) => React__default.ReactElement);
54
- /** 打开购物车 action 的触发事件
55
- */
56
- addtocartHandler?: (_args: any) => Promise<any>;
57
- /** 加购卡片,接受参数: {"status":"complete","args":[{"sku":["A3936031"],"handle":"space-a40-a3936031"}],"result":""}
58
- * 后端接口文档:https://anker-in.feishu.cn/wiki/DOYJwE9oxipWmYk072ncnJNznBb
59
- */
60
- addtocartRender?: string | ((_props: any) => React__default.ReactElement);
61
- /** 订阅卡片,接受参数: {"status":"complete","args":[{"sku":["A3936031"],"handle":"space-a40-a3936031"}],"result":""}
62
- * 后端接口文档:https://anker-in.feishu.cn/wiki/DOYJwE9oxipWmYk072ncnJNznBb
63
- */
64
- signupRender?: string | ((_props: any) => React__default.ReactElement);
65
- /** 产品卡片,接受参数: {"status":"complete","args":[{"sku":["A3936031"],"handle":"space-a40-a3936031"}],"result":""}
66
- * 后端接口文档:https://anker-in.feishu.cn/wiki/DOYJwE9oxipWmYk072ncnJNznBb
67
- */
68
- productRender?: string | ((_props: any) => React__default.ReactElement);
69
- /** CopilotPopup 自定义参数,参考:https://docs.copilotkit.ai/reference/components/CopilotPopup */
70
- popup?: any;
71
- /** 文案,{"productRenderTipMessage": "","popupTip": "Hi ! Welcome to soundcore Innovations live chat!", "popupTipTimeout": [3000, 6000]} */
72
- lang?: any;
73
- /** 参考此文档:https://docs.copilotkit.ai/concepts/customize-look-and-feel */
74
- style?: any;
75
- className?: string;
76
- }
77
- declare const Chat: (props: ChatProps) => react_jsx_runtime.JSX.Element;
78
-
79
- declare enum ConsumeType {
80
- Coupon = "coupon",
81
- GiftCard = "giftCard",
82
- GoGift = "goGift",
83
- Product = "product",
84
- ShippingCoupon = "shippingCoupon"
85
- }
86
- declare enum DTC_TASK_TYPE {
87
- FirstPurchase = "firstPurchase",
88
- UploadReceipt = "uploadReceipt",
89
- Shopping = "shopping"
90
- }
91
-
92
- interface BaseResponse {
93
- brand: string;
94
- }
95
- interface CreditInfoResponse extends BaseResponse {
96
- total_credit: number;
97
- available_credit: number;
98
- pending_credit: number;
99
- expired_credit: number;
100
- cancel_credit: number;
101
- consumed_credit: number;
102
- }
103
-
104
- interface MyActivitiesMetafields {
105
- title: string;
106
- tips: string;
107
- allTab: string;
108
- earnedTab: string;
109
- deductedTab: string;
110
- expiredTab: string;
111
- activationTask: string;
112
- updateNameTask: string;
113
- updatePhoneTask: string;
114
- updateBirthdayTask: string;
115
- updateAppNameTask: string;
116
- subscriptionTask: string;
117
- refundTask: string;
118
- productUnApprovedTask: string;
119
- pendingTips?: string;
120
- pendingTips2?: string;
121
- firstPurchaseTask: string;
122
- uploadReceiptTask: string;
123
- shoppingTask: string;
124
- emptyListImage: {
125
- url: string;
126
- alt?: string;
127
- };
128
- emptyListLabel: string;
129
- }
130
-
131
- interface MyRewardsMetafields {
132
- title: string;
133
- orderNumberLabel: string;
134
- valueLabel: string;
135
- receivedLabel: string;
136
- failedLabel: string;
137
- approveSuccessLabel: string;
138
- couponTab: string;
139
- productTab: string;
140
- pendingLabel: string;
141
- unfulfilledLabel: string;
142
- fulfilledLabel: string;
143
- confirmedTip: string;
144
- pendingTip: string;
145
- processingTip: string;
146
- ShippedTip: string;
147
- emptyListLabel: string;
148
- pointUnit: string;
149
- code: string;
150
- copied: string;
151
- copy: string;
152
- emptyListImage: {
153
- url: string;
154
- alt?: string;
155
- };
156
- }
157
-
158
- type CreditsPageCommon = {
159
- pointUnit?: string;
160
- infoIcon?: string;
161
- ruleLabel?: string;
162
- soldOut?: string;
163
- copied?: string;
164
- off?: string;
165
- copy?: string;
166
- giftCardLabel?: string;
167
- imageMapping?: {
168
- [key in ConsumeType]: {
169
- url: string;
170
- };
171
- };
172
- activitiesModal?: MyActivitiesMetafields;
173
- rewardsModal?: MyRewardsMetafields;
174
- insufficientCredits?: string;
175
- validatorInfo?: {
176
- addressInfo: {
177
- name: string;
178
- country: string;
179
- province: string;
180
- city: string;
181
- address: string;
182
- };
183
- };
184
- };
185
-
186
- declare enum FunctionDiscountType {
187
- Percentage = 1,
188
- FixedAmount = 2,
189
- FixedPrice = 3
190
- }
191
-
192
- type DiscountConfig = {
193
- discount_type: FunctionDiscountType;
194
- discount_value: number;
195
- };
196
- type FunctionMemberPriceConfig = {
197
- rule_id: string;
198
- result_detail: {
199
- member_discounts?: {
200
- user_identity: number;
201
- main_products: {
202
- all_store_variant: boolean;
203
- variants: {
204
- variant_id: string;
205
- sku: string;
206
- handle: string;
207
- }[];
208
- };
209
- discount_conf: DiscountConfig;
210
- }[];
211
- };
212
- discount_combinations: {
213
- other_product_discounts: boolean;
214
- };
215
- };
216
-
217
- type Context = {
218
- profile: any;
219
- isLoadingProfile: boolean;
220
- removeProfile: () => void;
221
- taskIdToTypeMapping: Record<string, DTC_TASK_TYPE>;
222
- openSignInPopup: () => void;
223
- openSignUpPopup: () => void;
224
- creditInfo?: CreditInfoResponse;
225
- customer?: any;
226
- customerLoading: boolean;
227
- fetchCreditInfo: (user_id: string) => void;
228
- gtm: {
229
- pageGroup: string;
230
- pageHandle?: string;
231
- };
232
- pageCommon: CreditsPageCommon;
233
- memberPriceDiscount?: FunctionMemberPriceConfig[];
234
- alpcBrand?: string;
235
- cartConfig?: {
236
- addToCart: (params: {
237
- variantList: Array<{
238
- variant: any;
239
- quantity: number;
240
- attributes?: Array<{
241
- key: string;
242
- value: string;
243
- }>;
244
- }>;
245
- cartAttributes?: Record<string, string>;
246
- discountCodes?: string[];
247
- }) => void | Promise<any>;
248
- };
249
- };
250
- declare function CreditsProvider({ children, profile, removeProfile, isLoadingProfile, openSignInPopup, openSignUpPopup, taskIdToTypeMapping, creditInfo, customer, customerLoading, fetchCreditInfo, gtm, pageCommon, memberPriceDiscount, alpcBrand, cartConfig, }: PropsWithChildren<Context>): react_jsx_runtime.JSX.Element;
251
- declare function useCreditsContext(): Context;
252
-
253
- declare const useUploadReceipt: () => swr_dist_mutation.SWRMutationResponse<{
254
- ok: boolean;
255
- code: number;
256
- }, any, "/api/multipass/mktsrv/v1/credit/upload_third_party_order", {
257
- orderName: string;
258
- }>;
259
-
260
- type ReceiptCopy = {
261
- title: string;
262
- description: string;
263
- placeholder: string;
264
- note: string;
265
- submit: string;
266
- successTitle: string;
267
- successDescription: string;
268
- gotIt: string;
269
- failedTitle: string;
270
- successIcon: string;
271
- failedIcon: string;
272
- failedReasons: {
273
- code: string;
274
- id: string;
275
- description: string;
276
- }[];
277
- };
278
- declare function CreditsUploadReceiptModal({ isOpen, onClose, copy, onSuccess, }: {
279
- isOpen: boolean;
280
- onClose: () => void;
281
- copy: ReceiptCopy;
282
- onSuccess: () => void;
283
- }): react_jsx_runtime.JSX.Element;
284
-
285
- type Img = {
286
- url: string;
287
- alt: string;
288
- width?: number;
289
- height?: number;
290
- };
291
- type CreditsBannerCopy = {
292
- pcImg: Img;
293
- laptopImg: Img;
294
- mobileImg: Img;
295
- joinNow: string;
296
- loginIn: string;
297
- login: {
298
- title: string;
299
- description: string;
300
- };
301
- unLogin: {
302
- title: string;
303
- description: string;
304
- };
305
- };
306
- declare function CreditsBanner({ copy, id }: {
307
- copy: CreditsBannerCopy;
308
- id?: string;
309
- }): react_jsx_runtime.JSX.Element;
310
-
311
- interface BenefitItemCopy {
312
- icon: {
313
- alt: string;
314
- url: string;
315
- };
316
- text: string;
317
- note?: string;
318
- tag?: string;
319
- }
320
-
321
- type CreditsBenefitsCopy = {
322
- title: string;
323
- benefits: BenefitItemCopy[];
324
- bigIcon?: boolean;
325
- cardBgColor?: string;
326
- cardBorderColor?: string;
327
- };
328
- declare const CreditsBenefits: ({ copy, id }: {
329
- copy: CreditsBenefitsCopy;
330
- id?: string;
331
- }) => react_jsx_runtime.JSX.Element;
332
-
333
- type ButtonConfig = {
334
- text: string;
335
- type: 'activities' | 'rewards';
336
- };
337
- type CreditsInfoCardCopy = {
338
- balanceLabel: string;
339
- comingSoonLabel: string;
340
- comingSoonTips: string;
341
- buttons: ButtonConfig[];
342
- };
343
- declare function CreditsInfoCard({ copy, id }: {
344
- copy: CreditsInfoCardCopy;
345
- id?: string;
346
- }): react_jsx_runtime.JSX.Element;
347
-
348
- type CreditsSubscribeModalCopy = {
349
- title: string;
350
- desc?: string;
351
- placeholder: string;
352
- policy?: string;
353
- successTips?: string;
354
- dealsType?: string;
355
- };
356
-
357
- type BenefitItem = {
358
- title: string;
359
- credits: string;
360
- id: string;
361
- };
362
- type CreditsWaysToGetCreditsCopy = {
363
- title: string;
364
- subtitle: string;
365
- equalCredits: string;
366
- musicIcon: string;
367
- list: BenefitItem[];
368
- mainImage: {
369
- url: string;
370
- alt: string;
371
- };
372
- joinNow: string;
373
- activate: string;
374
- completed: string;
375
- completeProfile: string;
376
- makeFirstPurchase: string;
377
- goShopLink: string;
378
- uploadReceipt: string;
379
- shopNow: string;
380
- subscribeLabel: string;
381
- sendEmailSuccess: string;
382
- creditsIcon: {
383
- url: string;
384
- alt: string;
385
- };
386
- receipt: ReceiptCopy;
387
- subscribe: CreditsSubscribeModalCopy;
388
- };
389
- type CreditsWaysToGetCreditsProps = {
390
- copy: CreditsWaysToGetCreditsCopy;
391
- classNames?: {
392
- equalCreditsText?: string;
393
- subtitle?: string;
394
- };
395
- };
396
-
397
- declare const CreditsWaysToGetCredits: ({ copy, classNames, id }: CreditsWaysToGetCreditsProps & {
398
- id?: string;
399
- }) => react_jsx_runtime.JSX.Element;
400
-
401
- type CreditsFaqCopy = {
402
- title: string;
403
- subTitle: string;
404
- learnMore: {
405
- link: string;
406
- label: string;
407
- };
408
- items: {
409
- category_name: string;
410
- question: string;
411
- answer: string;
412
- }[];
413
- };
414
- declare const CreditsFaq: ({ copy, id }: {
415
- copy: CreditsFaqCopy;
416
- id?: string;
417
- }) => react_jsx_runtime.JSX.Element;
418
-
419
- type RedeemableItemConfig$1 = {
420
- title: string;
421
- desc: string;
422
- price: number;
423
- credit: string;
424
- rules: string;
425
- image: {
426
- url: string;
427
- };
428
- mobileImage: {
429
- url: string;
430
- };
431
- redeemId: number;
432
- };
433
- type CreditsCashCopy = {
434
- title: string;
435
- list: (RedeemableItemConfig$1 & {
436
- products: {
437
- handle: string;
438
- sku: string;
439
- }[];
440
- })[];
441
- soldOut: string;
442
- unlockRewards: string;
443
- btnRedeem: string;
444
- off: string;
445
- badgeLabel?: string;
446
- };
447
-
448
- declare const CreditsCash: ({ copy, id }: {
449
- copy: CreditsCashCopy;
450
- id?: string;
451
- }) => react_jsx_runtime.JSX.Element;
452
-
453
- type CreditsRedeemListCopy = {
454
- title: string;
455
- availableCredits: string;
456
- unlockRewards: string;
457
- btnRedeem: string;
458
- list: {
459
- label: string;
460
- list: {
461
- id: string;
462
- type: string;
463
- value: string;
464
- rules: string[];
465
- }[];
466
- }[];
467
- redeemModal: {
468
- confirmTitle: string;
469
- confirmButton: string;
470
- commonError: string;
471
- redeemLimitError: string;
472
- inventoryNotEnough: string;
473
- creditsNotEnough: string;
474
- crossSiteError: string;
475
- errorImageUrl: string;
476
- coupon: {
477
- successDesc: string;
478
- successTitle: string;
479
- successButton: string;
480
- successButtonUrl: string;
481
- };
482
- product: {
483
- required: string;
484
- invalidEmail: string;
485
- shippingAddress: string;
486
- shippingProduct: string;
487
- addressForm: {
488
- key: string;
489
- type: string;
490
- label: string;
491
- isSelect: boolean;
492
- required: boolean;
493
- placeholder: string;
494
- }[][];
495
- form: {
496
- key: string;
497
- type: string;
498
- isSelect: boolean;
499
- required: boolean;
500
- placeholder: string;
501
- }[][];
502
- successDesc: string[];
503
- rules: string[];
504
- steps: {
505
- imageUrl: string;
506
- title: string;
507
- }[];
508
- quantityLabel: string;
509
- totalPriceLabel: string;
510
- variantLabel: string;
511
- shippingFeeLabel: string;
512
- paymentButton: string;
513
- stepTitle: string;
514
- };
515
- };
516
- };
517
-
518
- declare const CreditsRedeemList: ({ copy, id }: {
519
- copy: CreditsRedeemListCopy;
520
- id?: string;
521
- }) => react_jsx_runtime.JSX.Element;
522
-
523
- type AuthCodeActivateCopy = {
524
- authCodeTitle?: string;
525
- authCodeDesc?: string;
526
- enterActiveCodeText?: string;
527
- authCodeContent?: string;
528
- authCodeReceiveText?: string;
529
- sendAgainText?: string;
530
- buttonText?: string;
531
- note?: string;
532
- codeEmptyError?: string;
533
- incorrectCodeError?: string;
534
- retrieveText?: string;
535
- authSuccessMessage?: string;
536
- sendEmailSuccessMessage?: string;
537
- sendEmailErrorMessage?: string;
538
- beenActivatedMessage?: string;
539
- invalidCodeMessage?: string;
540
- expiredCodeMessage?: string;
541
- };
542
- type AuthCodeActivateProps = {
543
- copy: AuthCodeActivateCopy;
544
- };
545
-
546
- declare const AuthCodeActivate: React__default.FC<AuthCodeActivateProps>;
547
-
548
- interface RegistrationContextType {
549
- email?: string;
550
- copy?: any;
551
- authCodeActivate: {
552
- isOpen: boolean;
553
- open: () => void;
554
- close: () => void;
555
- isActivateSuccess: boolean;
556
- activeToken?: string;
557
- onAuthSuccess: (() => void) | undefined;
558
- isSendingActivateEmail: boolean;
559
- setIsSendingActivateEmail: Dispatch<SetStateAction<boolean>>;
560
- setActiveToken: Dispatch<SetStateAction<string | undefined>>;
561
- setIsActivateSuccess: Dispatch<SetStateAction<boolean>>;
562
- setOnAuthSuccess: Dispatch<SetStateAction<(() => void) | undefined>>;
563
- autoSendEmail: boolean;
564
- setAutoSendEmail: Dispatch<SetStateAction<boolean>>;
565
- };
566
- }
567
- declare const RegistrationContext: React$1.Context<RegistrationContextType>;
568
- declare const useRegistration: () => RegistrationContextType;
569
- declare const RegistrationProvider: ({ children, email, copy }: PropsWithChildren<{
570
- email?: string;
571
- copy?: any;
572
- }>) => react_jsx_runtime.JSX.Element;
573
-
574
- type MessageRole = 'user' | 'assistant' | 'system' | 'tool';
575
- interface MessageMetadata {
576
- tokenUsage?: {
577
- inputTokens: number;
578
- outputTokens: number;
579
- };
580
- toolCalls?: Array<{
581
- id: string;
582
- type: string;
583
- name: string;
584
- }>;
585
- }
586
- interface Message {
587
- id: string;
588
- sessionId?: string;
589
- role: MessageRole;
590
- content: MessageContent[];
591
- timestamp: number;
592
- metadata?: MessageMetadata;
593
- }
594
- type MessageContentType = 'text' | 'product_card' | 'product_list' | 'product_comparison' | 'policy' | 'quick_replies' | 'thinking' | 'error' | 'faq_list' | 'cart';
595
- type MessageContent = TextContent | ProductCardContent | ProductListContent | ProductComparisonContent | PolicyContent | QuickRepliesContent | ThinkingContent | ErrorContent | FAQListContent | PromotionListContent | CartContent;
596
- interface TextContent {
597
- type: 'text';
598
- text: string;
599
- }
600
- interface ProductCardContent {
601
- type: 'product_card';
602
- data: {
603
- product: Product;
604
- };
605
- }
606
- interface ProductListContent {
607
- type: 'product_list';
608
- data: {
609
- products: Product[];
610
- title?: string;
611
- onAddToCart?: (product: Product) => void;
612
- commonText?: CommonText;
613
- };
614
- }
615
- interface ProductComparisonContent {
616
- type: 'product_comparison';
617
- data: {
618
- products: Product[];
619
- dimensions: {
620
- price?: {
621
- label: string;
622
- values: Array<{
623
- product_id: string;
624
- min: number;
625
- max: number;
626
- currency: string;
627
- has_discount: boolean;
628
- }>;
629
- };
630
- variants?: {
631
- label: string;
632
- values: Array<{
633
- product_id: string;
634
- count: number;
635
- }>;
636
- };
637
- member_price?: {
638
- label: string;
639
- values: Array<{
640
- product_id: string;
641
- available: boolean;
642
- min: number;
643
- max: number;
644
- currency: string;
645
- }>;
646
- };
647
- discount?: {
648
- label: string;
649
- values: Array<{
650
- product_id: string;
651
- has_discount: boolean;
652
- }>;
653
- };
654
- [key: string]: any;
655
- };
656
- onAddToCart?: (product: Product) => void;
657
- commonText?: CommonText;
658
- };
659
- }
660
- interface PolicyContent {
661
- type: 'policy';
662
- data: {
663
- title: string;
664
- content: string;
665
- };
666
- }
667
- interface QuickRepliesContent {
668
- type: 'quick_replies';
669
- data: {
670
- replies: QuickReply[];
671
- };
672
- }
673
- interface ThinkingContent {
674
- type: 'thinking';
675
- data: {
676
- status: string;
677
- };
678
- }
679
- interface ErrorContent {
680
- type: 'error';
681
- data: {
682
- message: string;
683
- code?: string;
684
- };
685
- }
686
- interface FAQListContent {
687
- type: 'faq_list';
688
- data: {
689
- found: boolean;
690
- count: number;
691
- total?: number;
692
- results: FAQItem[];
693
- };
694
- }
695
- interface PromotionListContent {
696
- type: 'promotion_list';
697
- data: {
698
- found: boolean;
699
- count: number;
700
- total?: number;
701
- results: PromotionItem[];
702
- commonText?: CommonText;
703
- };
704
- }
705
- type FAQCategory = 'shipping' | 'return' | 'product' | 'payment' | 'general';
706
- interface FAQItem {
707
- id: string;
708
- question: string;
709
- answer: string;
710
- category: FAQCategory;
711
- keywords?: string[];
712
- relatedQuestions?: string[];
713
- metadata?: {
714
- language?: string;
715
- priority?: number;
716
- lastUpdated?: string;
717
- };
718
- }
719
- interface PromotionItem {
720
- id: string;
721
- title: string;
722
- subtitle?: string;
723
- description?: string;
724
- banner_url?: string;
725
- url?: string;
726
- time_range: {
727
- start: string;
728
- end?: string | null;
729
- is_active: boolean;
730
- };
731
- priority?: number;
732
- product_count?: number;
733
- metadata?: {
734
- display_order?: number;
735
- target_audience?: string;
736
- };
737
- }
738
- type StockStatus = 'in_stock' | 'low_stock' | 'out_of_stock';
739
- interface Price {
740
- amount: number;
741
- currency: string;
742
- }
743
- interface PriceRange {
744
- min: number;
745
- max: number;
746
- currency: string;
747
- }
748
- interface VariantDiscount {
749
- has_discount: boolean;
750
- discount_price?: number;
751
- discount_code?: string;
752
- discount_percentage?: number;
753
- /** 折扣类型:fixed_amount 固定金额折扣,percentage 百分比折扣 */
754
- discount_type?: 'fixed_amount' | 'percentage';
755
- /** 折扣数值(可能是字符串或数字) */
756
- discount_value?: string | number;
757
- }
758
- interface VariantMemberPrice {
759
- has_member_price: boolean;
760
- price?: number;
761
- }
762
- interface ProductFeatures {
763
- is_new?: boolean;
764
- has_rental?: boolean;
765
- has_presale?: boolean;
766
- has_member_price?: boolean;
767
- has_discount?: boolean;
768
- }
769
- interface Variant {
770
- id: string;
771
- title: string;
772
- sku?: string;
773
- price?: Price;
774
- availableForSale: boolean;
775
- color?: string;
776
- discount?: VariantDiscount;
777
- memberPrice?: VariantMemberPrice;
778
- inventoryQuantity?: number;
779
- option1?: string;
780
- option2?: string;
781
- option3?: string;
782
- }
783
- interface Product {
784
- shopifyId: string;
785
- sku?: string;
786
- handle: string;
787
- title: string;
788
- description?: string;
789
- vendor?: string;
790
- price: Price;
791
- priceRange?: PriceRange;
792
- memberPriceRange?: PriceRange;
793
- imageUrl: string;
794
- productUrl: string;
795
- stockStatus: StockStatus;
796
- hotScore?: number;
797
- averageRating?: number;
798
- reviewCount?: number;
799
- variants?: Variant[];
800
- variantCount?: number;
801
- availableCount?: number;
802
- features?: ProductFeatures;
803
- tags?: string[];
804
- }
805
- interface QuickReply {
806
- id: string;
807
- label: string;
808
- value: string;
809
- icon?: string;
810
- }
811
- /**
812
- * 购物车金额信息
813
- */
814
- interface CartAmount {
815
- /** 金额字符串(如 "99.99") */
816
- amount: string;
817
- /** 货币代码(如 "USD") */
818
- currencyCode: string;
819
- }
820
- /**
821
- * 购物车价格汇总
822
- */
823
- interface CartCost {
824
- /** 应付总价(已应用折扣) */
825
- totalAmount: CartAmount;
826
- /** 原价小计(未应用折扣) */
827
- subtotalAmount: CartAmount;
828
- }
829
- /**
830
- * 购物车商品变体信息
831
- */
832
- interface CartMerchandise {
833
- /** 变体 ID (Shopify ProductVariant GID) */
834
- id: string;
835
- /** 变体标题(如 "Black", "Large" 等) */
836
- title: string;
837
- /** 单价 */
838
- price: CartAmount;
839
- /** 商品图片 URL */
840
- image?: {
841
- url: string;
842
- altText?: string;
843
- };
844
- /** 关联的商品信息 */
845
- product: {
846
- /** 商品 ID */
847
- id: string;
848
- /** 商品标题 */
849
- title: string;
850
- /** 商品 handle */
851
- handle: string;
852
- };
853
- }
854
- /**
855
- * 购物车商品行
856
- */
857
- interface CartLine {
858
- /** 购物车行 ID (用于更新/删除操作) */
859
- id: string;
860
- /** 商品数量 */
861
- quantity: number;
862
- /** 价格信息 */
863
- cost: {
864
- /** 行总价(单价 × 数量,已应用折扣) */
865
- totalAmount: CartAmount;
866
- /** 单价 */
867
- amountPerQuantity: CartAmount;
868
- /** 行小计(单价 × 数量,未应用折扣) */
869
- subtotalAmount: CartAmount;
870
- };
871
- /** 商品变体信息 */
872
- merchandise: CartMerchandise;
873
- /** 自定义属性(可选) */
874
- attributes?: Array<{
875
- key: string;
876
- value: string;
877
- }>;
878
- }
879
- /**
880
- * 购物车折扣码
881
- */
882
- interface CartDiscountCode {
883
- /** 折扣码 */
884
- code: string;
885
- /** 是否有效/适用 */
886
- applicable: boolean;
887
- }
888
- /**
889
- * 购物车数据
890
- */
891
- interface CartData {
892
- /** 购物车是否为空 */
893
- isEmpty: boolean;
894
- /** 购物车 ID (Shopify Cart GID) */
895
- cartId: string;
896
- /** 商品总数量 */
897
- totalQuantity: number;
898
- /** 商品列表 */
899
- lines: CartLine[];
900
- /** 价格汇总 */
901
- cost: CartCost;
902
- /** 折扣码列表 */
903
- discountCodes?: CartDiscountCode[];
904
- /** 结账页面 URL */
905
- checkoutUrl?: string;
906
- /** 购物车按钮回调函数 */
907
- onCart?: (cartId: string, checkoutUrl?: string) => void;
908
- /** 通用文案配置 */
909
- commonText?: CommonText;
910
- }
911
- /**
912
- * 购物车内容块
913
- */
914
- interface CartContent {
915
- type: 'cart';
916
- data: CartData;
917
- }
918
- type SSEEventType = 'message_start' | 'content_delta' | 'content_block' | 'message_end' | 'tool_start' | 'tool_end' | 'status' | 'error' | 'done';
919
- interface SSEEvent<T = any> {
920
- event: SSEEventType | null;
921
- data: T;
922
- }
923
- /**
924
- * 流式对话请求参数
925
- */
926
- interface ChatStreamRequest {
927
- /** 用户的消息文本 */
928
- message: string;
929
- /** 用户标识符 */
930
- user_id: string;
931
- /** 来自 new-session 端点的会话 ID */
932
- session_id: string;
933
- /** 可选的上下文信息 */
934
- context?: {
935
- /** 用于购物车操作的 Shopify 购物车 ID */
936
- cartId?: string;
937
- /** Storefront API 访问令牌 */
938
- accessToken?: string;
939
- /** 已登录用户的 ID */
940
- real_user_id?: string;
941
- };
942
- }
943
- /**
944
- * 通用文案配置
945
- * 用于自定义组件中的按钮文案
946
- */
947
- interface CommonText {
948
- /**
949
- * 产品列表展开按钮文案
950
- * @default "Learn More"
951
- */
952
- learnMore?: string;
953
- /**
954
- * 产品列表收起按钮文案
955
- * @default "Show Less"
956
- */
957
- showLess?: string;
958
- /**
959
- * 添加到购物车按钮文案
960
- * @default "Add to Cart"
961
- */
962
- addToCart?: string;
963
- /**
964
- * 查看购物车/更多按钮文案
965
- * @default "View More"
966
- */
967
- viewMore?: string;
968
- /**
969
- * 折扣标签后缀文案(如 "20% OFF" 中的 "OFF")
970
- * @default "OFF"
971
- */
972
- off?: string;
973
- }
974
- interface LiveChatWidgetProps {
975
- /**
976
- * API 基础 URL
977
- * @example "https://beta-api-livechat.anker.com"
978
- */
979
- apiBaseUrl: string;
980
- /**
981
- * 自定义请求头
982
- * 将在所有 API 请求中添加这些请求头
983
- * @example { "Authorization": "Bearer token", "X-Custom-Header": "value" }
984
- */
985
- headers?: Record<string, string>;
986
- /**
987
- * 是否启用 reCAPTCHA 验证
988
- * @default false
989
- */
990
- needRecaptcha?: boolean;
991
- /**
992
- * reCAPTCHA site key
993
- * 当 needRecaptcha=true 时必填
994
- * @example "6LfS4J4pAAAAACX1e_WrxutmxxzCK7FU4WzVqL14"
995
- */
996
- recaptchaSitekey?: string;
997
- /**
998
- * reCAPTCHA action 前缀
999
- * 实际使用时会根据不同接口添加后缀(如 chat_stream, new_session)
1000
- * @default "livechat"
1001
- */
1002
- recaptchaAction?: string;
1003
- /**
1004
- * Shopify 店铺域名
1005
- * @example "www.eufy.com"
1006
- */
1007
- site?: string;
1008
- /**
1009
- * 已登录用户的 ID(可选)
1010
- * 如果提供,将在 API 请求中传递
1011
- */
1012
- loginUserId?: string;
1013
- /**
1014
- * Shopify 购物车 ID(可选)
1015
- * 用于购物车操作,将在 stream 接口的 context 中传递
1016
- * @example "gid://shopify/Cart/Z2NwLXVzLWVhc3QxOjAxSkZH..."
1017
- */
1018
- cartId?: string;
1019
- /**
1020
- * Storefront API 访问令牌(可选)
1021
- * 用于购物车操作,将在 stream 接口的 context 中传递
1022
- */
1023
- accessToken?: string;
1024
- /**
1025
- * 气泡按钮位置
1026
- * 自定义位置对象:{ top?: string, bottom?: string, left?: string, right?: string }
1027
- * @default { bottom: "1.5rem", right: "1.5rem" }
1028
- * @example
1029
- * // 自定义位置
1030
- * position={{ bottom: "20px", right: "30px" }}
1031
- * position={{ top: "100px", left: "50px" }}
1032
- */
1033
- position?: BubblePosition;
1034
- /**
1035
- * 欢迎消息
1036
- * @default "你好!我是 AI 助手,有什么可以帮助你的吗?"
1037
- */
1038
- welcomeMessage?: string;
1039
- /**
1040
- * 初始快捷回复按钮
1041
- */
1042
- quickReplies?: QuickReply[];
1043
- /**
1044
- * 自定义消息渲染器
1045
- */
1046
- customRenderers?: Record<string, MessageRenderer>;
1047
- /**
1048
- * Logo URL
1049
- */
1050
- logoUrl?: string;
1051
- /**
1052
- * 聊天窗口标题
1053
- * @default "AI 助手"
1054
- */
1055
- title?: string;
1056
- /**
1057
- * 聊天气泡按钮图标(图片 URL)
1058
- * 如果提供,将使用图片替代默认的 SVG 图标
1059
- */
1060
- chatBubbleIcon?: string;
1061
- /**
1062
- * 事件回调
1063
- */
1064
- onOpen?: () => void;
1065
- onClose?: () => void;
1066
- onMessageSend?: (message: string) => void;
1067
- onError?: (error: Error) => void;
1068
- /**
1069
- * AI 消息回调
1070
- */
1071
- /**
1072
- * AI 回复文本消息时触发
1073
- */
1074
- onTextMessage?: () => void;
1075
- /**
1076
- * AI 回复商品列表卡片时触发
1077
- */
1078
- onProductList?: () => void;
1079
- /**
1080
- * AI 回复促销卡片时触发
1081
- */
1082
- onPromotionList?: () => void;
1083
- /**
1084
- * 商品操作回调
1085
- */
1086
- onAddToCart?: (product: Product) => void;
1087
- /**
1088
- * 购物车按钮点击回调
1089
- */
1090
- onCart?: (cartId: string, checkoutUrl?: string) => void;
1091
- /**
1092
- * 是否显示新会话按钮
1093
- * @default true
1094
- */
1095
- showNewSessionButton?: boolean;
1096
- /**
1097
- * 通用文案配置
1098
- * 用于自定义按钮文案
1099
- */
1100
- commonText?: CommonText;
1101
- }
1102
- interface MessageRenderer {
1103
- render: (content: MessageContent, isUser: boolean, isSystem: boolean) => React.ReactNode;
1104
- }
1105
- interface PositionStyles {
1106
- bottom?: string;
1107
- top?: string;
1108
- left?: string;
1109
- right?: string;
1110
- }
1111
- type BubblePosition = PositionStyles;
1112
-
1113
- /**
1114
- * LiveChat 主组件
1115
- * 集成所有子组件,提供完整的聊天功能
1116
- * 基于 specs/livechat-widget/plan.md 的三层架构设计
1117
- */
1118
-
1119
- /**
1120
- * LiveChat 聊天组件
1121
- *
1122
- * 功能:
1123
- * - 气泡弹窗聊天界面
1124
- * - SSE 流式消息接收
1125
- * - 会话管理(userId, sessionId)
1126
- * - 历史消息加载
1127
- * - 多种消息类型渲染
1128
- * - 自定义扩展机制
1129
- * - reCAPTCHA v3 安全防护
1130
- *
1131
- * 架构:
1132
- * - UI Layer: ChatBubble, ChatWindow, MessageList, etc.
1133
- * - Logic Layer: useChatState, useChatAPI, useSession
1134
- * - Core Layer: MessageRendererRegistry, 自定义渲染器
1135
- *
1136
- * @example
1137
- * ```tsx
1138
- * // 基础使用(使用默认位置)
1139
- * <LiveChatWidget
1140
- * apiBaseUrl="https://beta-api-livechat.anker.com"
1141
- * site="www.eufy.com"
1142
- * welcomeMessage="你好!我是 AI 助手"
1143
- * onMessageSend={(msg) => console.log('Sent:', msg)}
1144
- * />
1145
- *
1146
- * // 使用自定义位置
1147
- * <LiveChatWidget
1148
- * apiBaseUrl="https://beta-api-livechat.anker.com"
1149
- * site="www.eufy.com"
1150
- * position={{ bottom: "20px", right: "30px" }}
1151
- * onMessageSend={(msg) => console.log('Sent:', msg)}
1152
- * />
1153
- *
1154
- * // 启用 reCAPTCHA v3 安全防护
1155
- * <LiveChatWidget
1156
- * apiBaseUrl="https://beta-api-livechat.anker.com"
1157
- * site="www.eufy.com"
1158
- * needRecaptcha={true}
1159
- * recaptchaSitekey="6LfS4J4pAAAAACX1e_WrxutmxxzCK7FU4WzVqL14"
1160
- * recaptchaAction="livechat"
1161
- * />
1162
- *
1163
- * // 使用自定义 headers 和 reCAPTCHA
1164
- * <LiveChatWidget
1165
- * apiBaseUrl="https://beta-api-livechat.anker.com"
1166
- * site="www.eufy.com"
1167
- * headers={{
1168
- * "Authorization": "Bearer your-token",
1169
- * "X-Custom-Header": "value"
1170
- * }}
1171
- * needRecaptcha={true}
1172
- * recaptchaSitekey="your-site-key"
1173
- * />
1174
- * ```
1175
- */
1176
- declare const LiveChatWidget: React__default.FC<LiveChatWidgetProps>;
1177
-
1178
- type RedeemableItemConfig = {
1179
- title: string;
1180
- desc: string;
1181
- price: number;
1182
- credit: string;
1183
- rules: string;
1184
- image: {
1185
- url: string;
1186
- };
1187
- mobileImage: {
1188
- url: string;
1189
- };
1190
- redeemId: number;
1191
- };
1192
- type TabConfig = {
1193
- label: string;
1194
- type: 'memberPrice' | 'redeem';
1195
- };
1196
- type CreditsMemberPriceCopy = {
1197
- title: string;
1198
- tabs: TabConfig[];
1199
- memberPriceTab: {
1200
- memberPriceRuleId: string;
1201
- addToCart: string;
1202
- shopNowText: string;
1203
- memberPriceLabel: string;
1204
- badgeLabel?: string;
1205
- };
1206
- redeemTab: {
1207
- list: (RedeemableItemConfig & {
1208
- products: {
1209
- handle: string;
1210
- sku: string;
1211
- }[];
1212
- })[];
1213
- soldOut: string;
1214
- unlockRewards: string;
1215
- btnRedeem: string;
1216
- off: string;
1217
- badgeLabel?: string;
1218
- };
1219
- };
1220
-
1221
- type NavigationItem = {
1222
- label: string;
1223
- targetId: string;
1224
- };
1225
- type CreditsNavigationCopy = {
1226
- items: NavigationItem[];
1227
- };
1228
-
1229
- declare enum ComponentKey {
1230
- Navigation = "creditsNavigation",
1231
- Banner = "creditsBanner",
1232
- InfoCard = "creditsInfoCard",
1233
- Benefits = "creditsBenefits",
1234
- WaysToGetCredits = "creditsWaysToGetCredits",
1235
- AnkersolixTask = "creditsAnkersolixTask",
1236
- RedeemList = "creditsRedeemList",
1237
- SpendCreditsLikeCash = "creditsCash",
1238
- MemberPrice = "creditsMemberPrice",
1239
- Faqs = "creditsFaq"
1240
- }
1241
- type CreditsTemplateProps = {
1242
- headlessConfig: HeadlessConfig;
1243
- siteConfig: {
1244
- registrationsSettings: {
1245
- authCodeActivate: AuthCodeActivateCopy;
1246
- };
1247
- taskIdToTypeMapping: Record<string, DTC_TASK_TYPE>;
1248
- memberPriceDiscount?: FunctionMemberPriceConfig[];
1249
- };
1250
- creditsConfig?: {
1251
- alpcBrand?: string;
1252
- };
1253
- pageConfig: {
1254
- order: ComponentKey[];
1255
- common: CreditsPageCommon;
1256
- components: {
1257
- [ComponentKey.Navigation]?: CreditsNavigationCopy;
1258
- [ComponentKey.Banner]?: CreditsBannerCopy;
1259
- [ComponentKey.InfoCard]?: CreditsInfoCardCopy;
1260
- [ComponentKey.Benefits]?: CreditsBenefitsCopy;
1261
- [ComponentKey.WaysToGetCredits]?: CreditsWaysToGetCreditsCopy;
1262
- [ComponentKey.AnkersolixTask]?: CreditsWaysToGetCreditsCopy;
1263
- [ComponentKey.RedeemList]?: CreditsRedeemListCopy;
1264
- [ComponentKey.SpendCreditsLikeCash]?: CreditsCashCopy;
1265
- [ComponentKey.MemberPrice]?: CreditsMemberPriceCopy;
1266
- [ComponentKey.Faqs]?: CreditsFaqCopy;
1267
- };
1268
- };
1269
- userContext: {
1270
- profile: any;
1271
- removeProfile: () => void;
1272
- isLoadingProfile: boolean;
1273
- creditInfo: any;
1274
- customer: any;
1275
- customerLoading: boolean;
1276
- fetchCreditInfo: () => void;
1277
- };
1278
- registrationContext: {
1279
- openSignUpPopup: () => void;
1280
- openSignInPopup: () => void;
1281
- };
1282
- gtm: {
1283
- pageGroup: string;
1284
- pageHandle?: string;
1285
- };
1286
- cartConfig?: {
1287
- addToCart: (params: {
1288
- variantList: Array<{
1289
- variant: any;
1290
- quantity: number;
1291
- attributes?: Array<{
1292
- key: string;
1293
- value: string;
1294
- }>;
1295
- }>;
1296
- cartAttributes?: Record<string, string>;
1297
- discountCodes?: string[];
1298
- }) => void | Promise<any>;
1299
- };
1300
- };
1301
- declare const CreditsTemplate: ({ headlessConfig, siteConfig, creditsConfig, userContext, pageConfig, registrationContext, gtm, cartConfig, }: CreditsTemplateProps) => react_jsx_runtime.JSX.Element;
1302
-
1303
- declare const ROUNDED_BRANDS: string[];
1304
-
1305
- export { AuthCodeActivate, Chat, type ChatStreamRequest, ComponentKey, CreditsBanner, CreditsBenefits, CreditsCash, CreditsFaq, CreditsInfoCard, CreditsProvider, CreditsRedeemList, CreditsTemplate, type CreditsTemplateProps, CreditsUploadReceiptModal, CreditsWaysToGetCredits, type ErrorContent, LiveChatWidget, type LiveChatWidgetProps, type Message, type MessageContent, type MessageContentType, type MessageMetadata, type MessageRenderer, type MessageRole, type PolicyContent, type ProductCardContent, type ProductListContent, type QuickRepliesContent, type QuickReply, ROUNDED_BRANDS, RegistrationContext, RegistrationProvider, type SSEEvent, type ThinkingContent, useCreditsContext, useUploadReceipt as useCreditsUploadReceipt, useRegistration };