wechat-sdk-python 0.0.1__py3-none-any.whl → 0.1.0__py3-none-any.whl

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 (831) hide show
  1. wechat_sdk/__init__.py +25 -0
  2. wechat_sdk/_transport.py +161 -0
  3. wechat_sdk/channels/__init__.py +6 -0
  4. wechat_sdk/channels/api/__init__.py +1 -0
  5. wechat_sdk/channels/api/_api.py +24 -0
  6. wechat_sdk/channels/api/basic.py +243 -0
  7. wechat_sdk/channels/api/compass.py +99 -0
  8. wechat_sdk/channels/api/leads.py +175 -0
  9. wechat_sdk/channels/api/leadslive.py +93 -0
  10. wechat_sdk/channels/api/live.py +50 -0
  11. wechat_sdk/channels/api/livedashboard.py +51 -0
  12. wechat_sdk/channels/api/locallife/__init__.py +23 -0
  13. wechat_sdk/channels/api/locallife/automatically.py +33 -0
  14. wechat_sdk/channels/api/locallife/cancel.py +52 -0
  15. wechat_sdk/channels/api/locallife/funds.py +92 -0
  16. wechat_sdk/channels/api/locallife/purchasing.py +29 -0
  17. wechat_sdk/channels/api/locallife/shop.py +338 -0
  18. wechat_sdk/channels/api/locallife/useing.py +138 -0
  19. wechat_sdk/channels/api/locallife/voucher.py +71 -0
  20. wechat_sdk/channels/api/windowproduct.py +152 -0
  21. wechat_sdk/channels/client.py +149 -0
  22. wechat_sdk/channels/exceptions/__init__.py +29 -0
  23. wechat_sdk/channels/models/__init__.py +0 -0
  24. wechat_sdk/channels/models/basic.py +20 -0
  25. wechat_sdk/channels/models/compass.py +138 -0
  26. wechat_sdk/channels/models/leads.py +154 -0
  27. wechat_sdk/channels/models/leadslive.py +79 -0
  28. wechat_sdk/channels/models/live.py +39 -0
  29. wechat_sdk/channels/models/livedashboard.py +280 -0
  30. wechat_sdk/channels/models/locallife/__init__.py +0 -0
  31. wechat_sdk/channels/models/locallife/_shared.py +40 -0
  32. wechat_sdk/channels/models/locallife/automatically.py +342 -0
  33. wechat_sdk/channels/models/locallife/cancel.py +33 -0
  34. wechat_sdk/channels/models/locallife/funds.py +85 -0
  35. wechat_sdk/channels/models/locallife/purchasing.py +864 -0
  36. wechat_sdk/channels/models/locallife/shop.py +313 -0
  37. wechat_sdk/channels/models/locallife/useing.py +108 -0
  38. wechat_sdk/channels/models/locallife/voucher.py +44 -0
  39. wechat_sdk/channels/models/windowproduct.py +213 -0
  40. wechat_sdk/channels/response_decoder.py +11 -0
  41. wechat_sdk/channels/result_processor.py +5 -0
  42. wechat_sdk/core/__init__.py +36 -0
  43. wechat_sdk/core/api.py +156 -0
  44. wechat_sdk/core/client.py +53 -0
  45. wechat_sdk/core/crypto.py +226 -0
  46. wechat_sdk/core/exceptions/__init__.py +111 -0
  47. wechat_sdk/core/models/__init__.py +152 -0
  48. wechat_sdk/core/models/account.py +161 -0
  49. wechat_sdk/core/request.py +69 -0
  50. wechat_sdk/core/response_decoder.py +61 -0
  51. wechat_sdk/core/responses.py +33 -0
  52. wechat_sdk/core/result_processor.py +54 -0
  53. wechat_sdk/core/session.py +100 -0
  54. wechat_sdk/miniapp/__init__.py +4 -0
  55. wechat_sdk/miniapp/api/__init__.py +1 -0
  56. wechat_sdk/miniapp/api/ad.py +294 -0
  57. wechat_sdk/miniapp/api/b2b/__init__.py +18 -0
  58. wechat_sdk/miniapp/api/b2b/bill.py +1174 -0
  59. wechat_sdk/miniapp/api/b2b/notify.py +86 -0
  60. wechat_sdk/miniapp/api/b2b/store_assistant.py +179 -0
  61. wechat_sdk/miniapp/api/charge.py +65 -0
  62. wechat_sdk/miniapp/api/cityservice/__init__.py +18 -0
  63. wechat_sdk/miniapp/api/cityservice/basic.py +215 -0
  64. wechat_sdk/miniapp/api/cityservice/elder_medical.py +226 -0
  65. wechat_sdk/miniapp/api/cityservice/medicalassistant.py +75 -0
  66. wechat_sdk/miniapp/api/cloudbase/__init__.py +20 -0
  67. wechat_sdk/miniapp/api/cloudbase/database.py +440 -0
  68. wechat_sdk/miniapp/api/cloudbase/functions.py +75 -0
  69. wechat_sdk/miniapp/api/cloudbase/others.py +339 -0
  70. wechat_sdk/miniapp/api/cloudbase/storage.py +109 -0
  71. wechat_sdk/miniapp/api/data_analysis/__init__.py +18 -0
  72. wechat_sdk/miniapp/api/data_analysis/others.py +179 -0
  73. wechat_sdk/miniapp/api/data_analysis/visit_retain.py +101 -0
  74. wechat_sdk/miniapp/api/data_analysis/visit_trend.py +106 -0
  75. wechat_sdk/miniapp/api/drama_others_api.py +296 -0
  76. wechat_sdk/miniapp/api/express/__init__.py +16 -0
  77. wechat_sdk/miniapp/api/express/express_by_business.py +540 -0
  78. wechat_sdk/miniapp/api/express/express_by_provider.py +420 -0
  79. wechat_sdk/miniapp/api/face.py +83 -0
  80. wechat_sdk/miniapp/api/hardware_device.py +323 -0
  81. wechat_sdk/miniapp/api/img_ocr/__init__.py +16 -0
  82. wechat_sdk/miniapp/api/img_ocr/img.py +115 -0
  83. wechat_sdk/miniapp/api/img_ocr/ocr.py +214 -0
  84. wechat_sdk/miniapp/api/immediate_delivery/__init__.py +16 -0
  85. wechat_sdk/miniapp/api/immediate_delivery/deliver_by_business.py +889 -0
  86. wechat_sdk/miniapp/api/immediate_delivery/deliver_by_provider.py +85 -0
  87. wechat_sdk/miniapp/api/kf_mgnt/__init__.py +16 -0
  88. wechat_sdk/miniapp/api/kf_mgnt/kf_management.py +150 -0
  89. wechat_sdk/miniapp/api/kf_mgnt/kf_message.py +437 -0
  90. wechat_sdk/miniapp/api/kf_work.py +77 -0
  91. wechat_sdk/miniapp/api/laboruse.py +68 -0
  92. wechat_sdk/miniapp/api/livebroadcast/__init__.py +20 -0
  93. wechat_sdk/miniapp/api/livebroadcast/commodity_management.py +215 -0
  94. wechat_sdk/miniapp/api/livebroadcast/role_management.py +101 -0
  95. wechat_sdk/miniapp/api/livebroadcast/studio_management.py +865 -0
  96. wechat_sdk/miniapp/api/livebroadcast/subscribe_management.py +70 -0
  97. wechat_sdk/miniapp/api/minidrama/__init__.py +26 -0
  98. wechat_sdk/miniapp/api/minidrama/auditdrama.py +426 -0
  99. wechat_sdk/miniapp/api/minidrama/authorizeapp.py +125 -0
  100. wechat_sdk/miniapp/api/minidrama/authorizecopyright.py +187 -0
  101. wechat_sdk/miniapp/api/minidrama/authorizedrama.py +167 -0
  102. wechat_sdk/miniapp/api/minidrama/usagedata.py +143 -0
  103. wechat_sdk/miniapp/api/minidrama/vod_fileupload.py +253 -0
  104. wechat_sdk/miniapp/api/minidrama/vod_media.py +194 -0
  105. wechat_sdk/miniapp/api/mp_access_token.py +74 -0
  106. wechat_sdk/miniapp/api/mp_message_management/__init__.py +16 -0
  107. wechat_sdk/miniapp/api/mp_message_management/subscribe_message.py +333 -0
  108. wechat_sdk/miniapp/api/mp_message_management/updatable_message.py +133 -0
  109. wechat_sdk/miniapp/api/nearby_poi.py +186 -0
  110. wechat_sdk/miniapp/api/novel/__init__.py +20 -0
  111. wechat_sdk/miniapp/api/novel/auth.py +213 -0
  112. wechat_sdk/miniapp/api/novel/business.py +611 -0
  113. wechat_sdk/miniapp/api/novel/other.py +40 -0
  114. wechat_sdk/miniapp/api/novel/preview.py +57 -0
  115. wechat_sdk/miniapp/api/open_api_mgnt.py +209 -0
  116. wechat_sdk/miniapp/api/operation.py +431 -0
  117. wechat_sdk/miniapp/api/order_shipping.py +488 -0
  118. wechat_sdk/miniapp/api/plugin_management.py +97 -0
  119. wechat_sdk/miniapp/api/qrcode_link/__init__.py +20 -0
  120. wechat_sdk/miniapp/api/qrcode_link/qr_code.py +156 -0
  121. wechat_sdk/miniapp/api/qrcode_link/short_link.py +46 -0
  122. wechat_sdk/miniapp/api/qrcode_link/url_link.py +105 -0
  123. wechat_sdk/miniapp/api/qrcode_link/url_scheme.py +135 -0
  124. wechat_sdk/miniapp/api/red_packet_cover.py +36 -0
  125. wechat_sdk/miniapp/api/sec_center/__init__.py +16 -0
  126. wechat_sdk/miniapp/api/sec_center/safety_control_capability.py +74 -0
  127. wechat_sdk/miniapp/api/sec_center/sec_check.py +107 -0
  128. wechat_sdk/miniapp/api/soter.py +40 -0
  129. wechat_sdk/miniapp/api/student.py +38 -0
  130. wechat_sdk/miniapp/api/transaction_guarantee/__init__.py +18 -0
  131. wechat_sdk/miniapp/api/transaction_guarantee/basic.py +57 -0
  132. wechat_sdk/miniapp/api/transaction_guarantee/comment.py +286 -0
  133. wechat_sdk/miniapp/api/transaction_guarantee/complaint.py +201 -0
  134. wechat_sdk/miniapp/api/user_info/__init__.py +18 -0
  135. wechat_sdk/miniapp/api/user_info/basic_info.py +108 -0
  136. wechat_sdk/miniapp/api/user_info/internet.py +55 -0
  137. wechat_sdk/miniapp/api/user_info/phone_number.py +42 -0
  138. wechat_sdk/miniapp/api/user_login.py +137 -0
  139. wechat_sdk/miniapp/api/virtual_payment.py +1661 -0
  140. wechat_sdk/miniapp/api/weixin_express/__init__.py +24 -0
  141. wechat_sdk/miniapp/api/weixin_express/express_msg.py +166 -0
  142. wechat_sdk/miniapp/api/weixin_express/express_return.py +147 -0
  143. wechat_sdk/miniapp/api/weixin_express/express_search.py +166 -0
  144. wechat_sdk/miniapp/api/weixin_express/freight.py +405 -0
  145. wechat_sdk/miniapp/api/weixin_express/msgpush.py +107 -0
  146. wechat_sdk/miniapp/api/weixin_express/same_city_distribution.py +698 -0
  147. wechat_sdk/miniapp/api/wx_service_market.py +82 -0
  148. wechat_sdk/miniapp/api/wxsearch.py +37 -0
  149. wechat_sdk/miniapp/base_api.py +94 -0
  150. wechat_sdk/miniapp/client.py +320 -0
  151. wechat_sdk/miniapp/events/__init__.py +191 -0
  152. wechat_sdk/miniapp/events/contracts.py +349 -0
  153. wechat_sdk/miniapp/exceptions/__init__.py +29 -0
  154. wechat_sdk/miniapp/models/__init__.py +0 -0
  155. wechat_sdk/miniapp/models/ad.py +57 -0
  156. wechat_sdk/miniapp/models/b2b/__init__.py +0 -0
  157. wechat_sdk/miniapp/models/b2b/bill.py +579 -0
  158. wechat_sdk/miniapp/models/b2b/notify.py +49 -0
  159. wechat_sdk/miniapp/models/b2b/store_assistant.py +109 -0
  160. wechat_sdk/miniapp/models/charge.py +72 -0
  161. wechat_sdk/miniapp/models/cityservice/__init__.py +0 -0
  162. wechat_sdk/miniapp/models/cityservice/basic.py +104 -0
  163. wechat_sdk/miniapp/models/cityservice/elder_medical.py +101 -0
  164. wechat_sdk/miniapp/models/cityservice/medicalassistant.py +18 -0
  165. wechat_sdk/miniapp/models/cloudbase/__init__.py +0 -0
  166. wechat_sdk/miniapp/models/cloudbase/database.py +163 -0
  167. wechat_sdk/miniapp/models/cloudbase/functions.py +27 -0
  168. wechat_sdk/miniapp/models/cloudbase/others.py +210 -0
  169. wechat_sdk/miniapp/models/cloudbase/storage.py +54 -0
  170. wechat_sdk/miniapp/models/data_analysis/__init__.py +0 -0
  171. wechat_sdk/miniapp/models/data_analysis/others.py +228 -0
  172. wechat_sdk/miniapp/models/data_analysis/visit_retain.py +81 -0
  173. wechat_sdk/miniapp/models/data_analysis/visit_trend.py +58 -0
  174. wechat_sdk/miniapp/models/drama_others_api.py +117 -0
  175. wechat_sdk/miniapp/models/express/__init__.py +0 -0
  176. wechat_sdk/miniapp/models/express/express_by_business.py +275 -0
  177. wechat_sdk/miniapp/models/express/express_by_provider.py +142 -0
  178. wechat_sdk/miniapp/models/face.py +42 -0
  179. wechat_sdk/miniapp/models/hardware_device.py +164 -0
  180. wechat_sdk/miniapp/models/img_ocr/__init__.py +0 -0
  181. wechat_sdk/miniapp/models/img_ocr/_shared.py +45 -0
  182. wechat_sdk/miniapp/models/img_ocr/img.py +40 -0
  183. wechat_sdk/miniapp/models/img_ocr/ocr.py +89 -0
  184. wechat_sdk/miniapp/models/immediate_delivery/__init__.py +0 -0
  185. wechat_sdk/miniapp/models/immediate_delivery/deliver_by_business.py +370 -0
  186. wechat_sdk/miniapp/models/immediate_delivery/deliver_by_provider.py +33 -0
  187. wechat_sdk/miniapp/models/kf_mgnt/__init__.py +0 -0
  188. wechat_sdk/miniapp/models/kf_mgnt/kf_management.py +89 -0
  189. wechat_sdk/miniapp/models/kf_mgnt/kf_message.py +162 -0
  190. wechat_sdk/miniapp/models/kf_work.py +24 -0
  191. wechat_sdk/miniapp/models/laboruse.py +17 -0
  192. wechat_sdk/miniapp/models/livebroadcast/__init__.py +0 -0
  193. wechat_sdk/miniapp/models/livebroadcast/commodity_management.py +138 -0
  194. wechat_sdk/miniapp/models/livebroadcast/role_management.py +48 -0
  195. wechat_sdk/miniapp/models/livebroadcast/studio_management.py +363 -0
  196. wechat_sdk/miniapp/models/livebroadcast/subscribe_management.py +41 -0
  197. wechat_sdk/miniapp/models/minidrama/__init__.py +0 -0
  198. wechat_sdk/miniapp/models/minidrama/_shared.py +25 -0
  199. wechat_sdk/miniapp/models/minidrama/auditdrama.py +352 -0
  200. wechat_sdk/miniapp/models/minidrama/authorizeapp.py +40 -0
  201. wechat_sdk/miniapp/models/minidrama/authorizecopyright.py +111 -0
  202. wechat_sdk/miniapp/models/minidrama/authorizedrama.py +75 -0
  203. wechat_sdk/miniapp/models/minidrama/usagedata.py +105 -0
  204. wechat_sdk/miniapp/models/minidrama/vod_fileupload.py +86 -0
  205. wechat_sdk/miniapp/models/minidrama/vod_media.py +126 -0
  206. wechat_sdk/miniapp/models/mp_access_token.py +6 -0
  207. wechat_sdk/miniapp/models/mp_message_management/__init__.py +0 -0
  208. wechat_sdk/miniapp/models/mp_message_management/subscribe_message.py +158 -0
  209. wechat_sdk/miniapp/models/mp_message_management/updatable_message.py +40 -0
  210. wechat_sdk/miniapp/models/nearby_poi.py +102 -0
  211. wechat_sdk/miniapp/models/novel/__init__.py +0 -0
  212. wechat_sdk/miniapp/models/novel/auth.py +122 -0
  213. wechat_sdk/miniapp/models/novel/business.py +314 -0
  214. wechat_sdk/miniapp/models/novel/other.py +13 -0
  215. wechat_sdk/miniapp/models/novel/preview.py +42 -0
  216. wechat_sdk/miniapp/models/open_api_mgnt.py +20 -0
  217. wechat_sdk/miniapp/models/operation.py +281 -0
  218. wechat_sdk/miniapp/models/order_shipping.py +270 -0
  219. wechat_sdk/miniapp/models/plugin_management.py +81 -0
  220. wechat_sdk/miniapp/models/qrcode_link/__init__.py +0 -0
  221. wechat_sdk/miniapp/models/qrcode_link/_shared.py +11 -0
  222. wechat_sdk/miniapp/models/qrcode_link/qr_code.py +63 -0
  223. wechat_sdk/miniapp/models/qrcode_link/short_link.py +22 -0
  224. wechat_sdk/miniapp/models/qrcode_link/url_link.py +72 -0
  225. wechat_sdk/miniapp/models/qrcode_link/url_scheme.py +73 -0
  226. wechat_sdk/miniapp/models/red_packet_cover.py +25 -0
  227. wechat_sdk/miniapp/models/sec_center/__init__.py +0 -0
  228. wechat_sdk/miniapp/models/sec_center/safety_control_capability.py +26 -0
  229. wechat_sdk/miniapp/models/sec_center/sec_check.py +66 -0
  230. wechat_sdk/miniapp/models/soter.py +20 -0
  231. wechat_sdk/miniapp/models/student.py +18 -0
  232. wechat_sdk/miniapp/models/transaction_guarantee/__init__.py +0 -0
  233. wechat_sdk/miniapp/models/transaction_guarantee/basic.py +49 -0
  234. wechat_sdk/miniapp/models/transaction_guarantee/comment.py +315 -0
  235. wechat_sdk/miniapp/models/transaction_guarantee/complaint.py +121 -0
  236. wechat_sdk/miniapp/models/user_info/__init__.py +0 -0
  237. wechat_sdk/miniapp/models/user_info/basic_info.py +42 -0
  238. wechat_sdk/miniapp/models/user_info/internet.py +23 -0
  239. wechat_sdk/miniapp/models/user_info/phone_number.py +36 -0
  240. wechat_sdk/miniapp/models/user_login.py +34 -0
  241. wechat_sdk/miniapp/models/virtual_payment.py +964 -0
  242. wechat_sdk/miniapp/models/weixin_express/__init__.py +0 -0
  243. wechat_sdk/miniapp/models/weixin_express/_shared.py +49 -0
  244. wechat_sdk/miniapp/models/weixin_express/express_msg.py +60 -0
  245. wechat_sdk/miniapp/models/weixin_express/express_return.py +45 -0
  246. wechat_sdk/miniapp/models/weixin_express/express_search.py +60 -0
  247. wechat_sdk/miniapp/models/weixin_express/freight.py +156 -0
  248. wechat_sdk/miniapp/models/weixin_express/msgpush.py +30 -0
  249. wechat_sdk/miniapp/models/weixin_express/same_city_distribution.py +411 -0
  250. wechat_sdk/miniapp/models/wx_service_market.py +36 -0
  251. wechat_sdk/miniapp/models/wxsearch.py +12 -0
  252. wechat_sdk/miniapp/response_decoder.py +15 -0
  253. wechat_sdk/miniapp/result_processor.py +23 -0
  254. wechat_sdk/miniapp/security.py +6 -0
  255. wechat_sdk/official_account/__init__.py +5 -0
  256. wechat_sdk/official_account/api/__init__.py +1 -0
  257. wechat_sdk/official_account/api/apimanage.py +145 -0
  258. wechat_sdk/official_account/api/base.py +154 -0
  259. wechat_sdk/official_account/api/customer/__init__.py +13 -0
  260. wechat_sdk/official_account/api/customer/message.py +227 -0
  261. wechat_sdk/official_account/api/customer/messctrl.py +143 -0
  262. wechat_sdk/official_account/api/customer/servicermanage.py +226 -0
  263. wechat_sdk/official_account/api/custommenu.py +207 -0
  264. wechat_sdk/official_account/api/draftbox/__init__.py +11 -0
  265. wechat_sdk/official_account/api/draftbox/draftmanage.py +238 -0
  266. wechat_sdk/official_account/api/draftbox/shop.py +44 -0
  267. wechat_sdk/official_account/api/invoice/__init__.py +18 -0
  268. wechat_sdk/official_account/api/invoice/auth.py +226 -0
  269. wechat_sdk/official_account/api/invoice/fiscal_receipt.py +142 -0
  270. wechat_sdk/official_account/api/invoice/name.py +127 -0
  271. wechat_sdk/official_account/api/invoice/platform.py +201 -0
  272. wechat_sdk/official_account/api/invoice/reimburser.py +149 -0
  273. wechat_sdk/official_account/api/leaving.py +318 -0
  274. wechat_sdk/official_account/api/material/__init__.py +11 -0
  275. wechat_sdk/official_account/api/material/permanent.py +203 -0
  276. wechat_sdk/official_account/api/material/temporary.py +107 -0
  277. wechat_sdk/official_account/api/medicalassistant.py +77 -0
  278. wechat_sdk/official_account/api/nontaxpay.py +527 -0
  279. wechat_sdk/official_account/api/notify/__init__.py +17 -0
  280. wechat_sdk/official_account/api/notify/autoreplies.py +34 -0
  281. wechat_sdk/official_account/api/notify/message.py +463 -0
  282. wechat_sdk/official_account/api/notify/notify.py +222 -0
  283. wechat_sdk/official_account/api/notify/subscribe.py +76 -0
  284. wechat_sdk/official_account/api/notify/template.py +221 -0
  285. wechat_sdk/official_account/api/onecode.py +248 -0
  286. wechat_sdk/official_account/api/openpoc/__init__.py +13 -0
  287. wechat_sdk/official_account/api/openpoc/ai.py +129 -0
  288. wechat_sdk/official_account/api/openpoc/image.py +82 -0
  289. wechat_sdk/official_account/api/openpoc/ocr.py +249 -0
  290. wechat_sdk/official_account/api/public.py +164 -0
  291. wechat_sdk/official_account/api/qrcode/__init__.py +13 -0
  292. wechat_sdk/official_account/api/qrcode/qrcodejump.py +169 -0
  293. wechat_sdk/official_account/api/qrcode/qrcodes.py +54 -0
  294. wechat_sdk/official_account/api/qrcode/shorten.py +64 -0
  295. wechat_sdk/official_account/api/stores/__init__.py +9 -0
  296. wechat_sdk/official_account/api/stores/miniapp.py +486 -0
  297. wechat_sdk/official_account/api/usermanage/__init__.py +13 -0
  298. wechat_sdk/official_account/api/usermanage/changeopenid.py +45 -0
  299. wechat_sdk/official_account/api/usermanage/tag.py +237 -0
  300. wechat_sdk/official_account/api/usermanage/userinfo.py +210 -0
  301. wechat_sdk/official_account/api/webdev/__init__.py +12 -0
  302. wechat_sdk/official_account/api/webdev/access.py +149 -0
  303. wechat_sdk/official_account/api/webdev/js.py +36 -0
  304. wechat_sdk/official_account/api/wedata/__init__.py +15 -0
  305. wechat_sdk/official_account/api/wedata/api.py +77 -0
  306. wechat_sdk/official_account/api/wedata/mess.py +239 -0
  307. wechat_sdk/official_account/api/wedata/news.py +333 -0
  308. wechat_sdk/official_account/api/wedata/user.py +74 -0
  309. wechat_sdk/official_account/base_api.py +108 -0
  310. wechat_sdk/official_account/client.py +189 -0
  311. wechat_sdk/official_account/exceptions/__init__.py +29 -0
  312. wechat_sdk/official_account/models/__init__.py +0 -0
  313. wechat_sdk/official_account/models/apimanage.py +31 -0
  314. wechat_sdk/official_account/models/base.py +11 -0
  315. wechat_sdk/official_account/models/customer/__init__.py +0 -0
  316. wechat_sdk/official_account/models/customer/message.py +84 -0
  317. wechat_sdk/official_account/models/customer/messctrl.py +53 -0
  318. wechat_sdk/official_account/models/customer/servicermanage.py +108 -0
  319. wechat_sdk/official_account/models/custommenu.py +243 -0
  320. wechat_sdk/official_account/models/draftbox/__init__.py +0 -0
  321. wechat_sdk/official_account/models/draftbox/draftmanage.py +180 -0
  322. wechat_sdk/official_account/models/draftbox/shop.py +25 -0
  323. wechat_sdk/official_account/models/invoice/__init__.py +0 -0
  324. wechat_sdk/official_account/models/invoice/auth.py +178 -0
  325. wechat_sdk/official_account/models/invoice/fiscal_receipt.py +67 -0
  326. wechat_sdk/official_account/models/invoice/name.py +53 -0
  327. wechat_sdk/official_account/models/invoice/platform.py +58 -0
  328. wechat_sdk/official_account/models/invoice/reimburser.py +104 -0
  329. wechat_sdk/official_account/models/leaving.py +112 -0
  330. wechat_sdk/official_account/models/material/__init__.py +0 -0
  331. wechat_sdk/official_account/models/material/permanent.py +127 -0
  332. wechat_sdk/official_account/models/material/temporary.py +18 -0
  333. wechat_sdk/official_account/models/medicalassistant.py +18 -0
  334. wechat_sdk/official_account/models/nontaxpay.py +318 -0
  335. wechat_sdk/official_account/models/notify/__init__.py +0 -0
  336. wechat_sdk/official_account/models/notify/autoreplies.py +108 -0
  337. wechat_sdk/official_account/models/notify/message.py +153 -0
  338. wechat_sdk/official_account/models/notify/notify.py +119 -0
  339. wechat_sdk/official_account/models/notify/subscribe.py +16 -0
  340. wechat_sdk/official_account/models/notify/template.py +102 -0
  341. wechat_sdk/official_account/models/onecode.py +143 -0
  342. wechat_sdk/official_account/models/openpoc/__init__.py +0 -0
  343. wechat_sdk/official_account/models/openpoc/_shared.py +45 -0
  344. wechat_sdk/official_account/models/openpoc/ai.py +37 -0
  345. wechat_sdk/official_account/models/openpoc/image.py +36 -0
  346. wechat_sdk/official_account/models/openpoc/ocr.py +113 -0
  347. wechat_sdk/official_account/models/public.py +124 -0
  348. wechat_sdk/official_account/models/qrcode/__init__.py +0 -0
  349. wechat_sdk/official_account/models/qrcode/qrcodejump.py +88 -0
  350. wechat_sdk/official_account/models/qrcode/qrcodes.py +29 -0
  351. wechat_sdk/official_account/models/qrcode/shorten.py +33 -0
  352. wechat_sdk/official_account/models/stores/__init__.py +0 -0
  353. wechat_sdk/official_account/models/stores/miniapp.py +349 -0
  354. wechat_sdk/official_account/models/usermanage/__init__.py +0 -0
  355. wechat_sdk/official_account/models/usermanage/_shared.py +9 -0
  356. wechat_sdk/official_account/models/usermanage/changeopenid.py +25 -0
  357. wechat_sdk/official_account/models/usermanage/tag.py +71 -0
  358. wechat_sdk/official_account/models/usermanage/userinfo.py +145 -0
  359. wechat_sdk/official_account/models/webdev/__init__.py +0 -0
  360. wechat_sdk/official_account/models/webdev/access.py +91 -0
  361. wechat_sdk/official_account/models/webdev/js.py +17 -0
  362. wechat_sdk/official_account/models/wedata/__init__.py +0 -0
  363. wechat_sdk/official_account/models/wedata/api.py +61 -0
  364. wechat_sdk/official_account/models/wedata/mess.py +145 -0
  365. wechat_sdk/official_account/models/wedata/news.py +404 -0
  366. wechat_sdk/official_account/models/wedata/user.py +50 -0
  367. wechat_sdk/official_account/response_decoder.py +19 -0
  368. wechat_sdk/official_account/result_processor.py +34 -0
  369. wechat_sdk/open_platform/__init__.py +5 -0
  370. wechat_sdk/open_platform/api/__init__.py +1 -0
  371. wechat_sdk/open_platform/api/menu.py +7 -0
  372. wechat_sdk/open_platform/api/message.py +7 -0
  373. wechat_sdk/open_platform/api/user.py +7 -0
  374. wechat_sdk/open_platform/client.py +118 -0
  375. wechat_sdk/open_platform/exceptions/__init__.py +29 -0
  376. wechat_sdk/open_platform/models/__init__.py +0 -0
  377. wechat_sdk/open_platform/models/menu.py +1 -0
  378. wechat_sdk/open_platform/models/message.py +1 -0
  379. wechat_sdk/open_platform/models/user.py +1 -0
  380. wechat_sdk/open_platform/parser.py +4 -0
  381. wechat_sdk/open_platform/response_decoder.py +5 -0
  382. wechat_sdk/open_platform/result_processor.py +5 -0
  383. wechat_sdk/pay/__init__.py +10 -0
  384. wechat_sdk/pay/_frontend.py +24 -0
  385. wechat_sdk/pay/_resource.py +74 -0
  386. wechat_sdk/pay/aipay/__init__.py +6 -0
  387. wechat_sdk/pay/aipay/exceptions/__init__.py +29 -0
  388. wechat_sdk/pay/aipay/models/__init__.py +0 -0
  389. wechat_sdk/pay/aipay/models/x402.py +11 -0
  390. wechat_sdk/pay/aipay/response_decoder.py +9 -0
  391. wechat_sdk/pay/aipay/result_processor.py +5 -0
  392. wechat_sdk/pay/aipay/x402.py +149 -0
  393. wechat_sdk/pay/api/__init__.py +43 -0
  394. wechat_sdk/pay/api/bill.py +112 -0
  395. wechat_sdk/pay/api/businesscircle/__init__.py +14 -0
  396. wechat_sdk/pay/api/businesscircle/parkings.py +55 -0
  397. wechat_sdk/pay/api/businesscircle/points.py +75 -0
  398. wechat_sdk/pay/api/businesscircle/user_authorizations.py +36 -0
  399. wechat_sdk/pay/api/businesscircle/users/__init__.py +8 -0
  400. wechat_sdk/pay/api/businesscircle/users/points.py +44 -0
  401. wechat_sdk/pay/api/certificates.py +23 -0
  402. wechat_sdk/pay/api/combine_transactions/__init__.py +74 -0
  403. wechat_sdk/pay/api/combine_transactions/app.py +69 -0
  404. wechat_sdk/pay/api/combine_transactions/h5.py +70 -0
  405. wechat_sdk/pay/api/combine_transactions/jsapi.py +77 -0
  406. wechat_sdk/pay/api/combine_transactions/native.py +69 -0
  407. wechat_sdk/pay/api/fund_app/__init__.py +8 -0
  408. wechat_sdk/pay/api/fund_app/mch_transfer/__init__.py +12 -0
  409. wechat_sdk/pay/api/fund_app/mch_transfer/elecsign.py +104 -0
  410. wechat_sdk/pay/api/fund_app/mch_transfer/transfer_bills.py +275 -0
  411. wechat_sdk/pay/api/fund_app/mch_transfer/user_confirm_authorization.py +119 -0
  412. wechat_sdk/pay/api/marketing/__init__.py +12 -0
  413. wechat_sdk/pay/api/marketing/favor/__init__.py +16 -0
  414. wechat_sdk/pay/api/marketing/favor/callbacks.py +65 -0
  415. wechat_sdk/pay/api/marketing/favor/coupon_stocks.py +110 -0
  416. wechat_sdk/pay/api/marketing/favor/media.py +28 -0
  417. wechat_sdk/pay/api/marketing/favor/stocks.py +278 -0
  418. wechat_sdk/pay/api/marketing/favor/users/__init__.py +8 -0
  419. wechat_sdk/pay/api/marketing/favor/users/coupons.py +147 -0
  420. wechat_sdk/pay/api/marketing/partnerships.py +101 -0
  421. wechat_sdk/pay/api/marketing/paygiftactivity/__init__.py +10 -0
  422. wechat_sdk/pay/api/marketing/paygiftactivity/activities.py +219 -0
  423. wechat_sdk/pay/api/marketing/paygiftactivity/unique_threshold_activity.py +73 -0
  424. wechat_sdk/pay/api/med_ins/__init__.py +10 -0
  425. wechat_sdk/pay/api/med_ins/orders.py +213 -0
  426. wechat_sdk/pay/api/med_ins/refunds.py +60 -0
  427. wechat_sdk/pay/api/merchant_service/__init__.py +12 -0
  428. wechat_sdk/pay/api/merchant_service/complaint_notifications.py +87 -0
  429. wechat_sdk/pay/api/merchant_service/complaints_v2.py +279 -0
  430. wechat_sdk/pay/api/merchant_service/images.py +48 -0
  431. wechat_sdk/pay/api/offlineface/__init__.py +16 -0
  432. wechat_sdk/pay/api/offlineface/authinfo.py +54 -0
  433. wechat_sdk/pay/api/offlineface/contracts.py +84 -0
  434. wechat_sdk/pay/api/offlineface/face_collections.py +68 -0
  435. wechat_sdk/pay/api/offlineface/repayment_url.py +35 -0
  436. wechat_sdk/pay/api/offlineface/transactions.py +119 -0
  437. wechat_sdk/pay/api/offlinefacemch/__init__.py +10 -0
  438. wechat_sdk/pay/api/offlinefacemch/organizations.py +146 -0
  439. wechat_sdk/pay/api/offlinefacemch/tokens.py +37 -0
  440. wechat_sdk/pay/api/order.py +5 -0
  441. wechat_sdk/pay/api/payscore/__init__.py +8 -0
  442. wechat_sdk/pay/api/payscore/serviceorder.py +393 -0
  443. wechat_sdk/pay/api/profitsharing/__init__.py +16 -0
  444. wechat_sdk/pay/api/profitsharing/bills.py +36 -0
  445. wechat_sdk/pay/api/profitsharing/orders.py +113 -0
  446. wechat_sdk/pay/api/profitsharing/receivers.py +83 -0
  447. wechat_sdk/pay/api/profitsharing/return_orders.py +83 -0
  448. wechat_sdk/pay/api/profitsharing/transactions.py +25 -0
  449. wechat_sdk/pay/api/refund/__init__.py +8 -0
  450. wechat_sdk/pay/api/refund/domestic/__init__.py +8 -0
  451. wechat_sdk/pay/api/refund/domestic/refunds.py +150 -0
  452. wechat_sdk/pay/api/security.py +43 -0
  453. wechat_sdk/pay/api/smartguide/__init__.py +8 -0
  454. wechat_sdk/pay/api/smartguide/guides.py +189 -0
  455. wechat_sdk/pay/api/transactions/__init__.py +86 -0
  456. wechat_sdk/pay/api/transactions/app.py +95 -0
  457. wechat_sdk/pay/api/transactions/h5.py +96 -0
  458. wechat_sdk/pay/api/transactions/jsapi.py +106 -0
  459. wechat_sdk/pay/api/transactions/native.py +98 -0
  460. wechat_sdk/pay/api/transactions/requests.py +11 -0
  461. wechat_sdk/pay/api/vehicle/__init__.py +10 -0
  462. wechat_sdk/pay/api/vehicle/parking/__init__.py +10 -0
  463. wechat_sdk/pay/api/vehicle/parking/parkings.py +59 -0
  464. wechat_sdk/pay/api/vehicle/parking/services.py +38 -0
  465. wechat_sdk/pay/api/vehicle/transactions/__init__.py +31 -0
  466. wechat_sdk/pay/api/vehicle/transactions/parking.py +84 -0
  467. wechat_sdk/pay/client.py +305 -0
  468. wechat_sdk/pay/exceptions/__init__.py +36 -0
  469. wechat_sdk/pay/frontend.py +229 -0
  470. wechat_sdk/pay/launch_types.py +99 -0
  471. wechat_sdk/pay/models/__init__.py +0 -0
  472. wechat_sdk/pay/models/bill.py +33 -0
  473. wechat_sdk/pay/models/businesscircle/__init__.py +0 -0
  474. wechat_sdk/pay/models/businesscircle/parkings.py +16 -0
  475. wechat_sdk/pay/models/businesscircle/points.py +21 -0
  476. wechat_sdk/pay/models/businesscircle/user_authorizations.py +18 -0
  477. wechat_sdk/pay/models/businesscircle/users/__init__.py +0 -0
  478. wechat_sdk/pay/models/businesscircle/users/points.py +15 -0
  479. wechat_sdk/pay/models/certificates.py +27 -0
  480. wechat_sdk/pay/models/combine_transactions/__init__.py +81 -0
  481. wechat_sdk/pay/models/combine_transactions/app.py +19 -0
  482. wechat_sdk/pay/models/combine_transactions/h5.py +19 -0
  483. wechat_sdk/pay/models/combine_transactions/jsapi.py +20 -0
  484. wechat_sdk/pay/models/combine_transactions/native.py +19 -0
  485. wechat_sdk/pay/models/fund_app/__init__.py +0 -0
  486. wechat_sdk/pay/models/fund_app/mch_transfer/__init__.py +0 -0
  487. wechat_sdk/pay/models/fund_app/mch_transfer/elecsign.py +28 -0
  488. wechat_sdk/pay/models/fund_app/mch_transfer/transfer_bills.py +112 -0
  489. wechat_sdk/pay/models/fund_app/mch_transfer/user_confirm_authorization.py +85 -0
  490. wechat_sdk/pay/models/marketing/__init__.py +0 -0
  491. wechat_sdk/pay/models/marketing/favor/__init__.py +0 -0
  492. wechat_sdk/pay/models/marketing/favor/callbacks.py +32 -0
  493. wechat_sdk/pay/models/marketing/favor/coupon_stocks.py +44 -0
  494. wechat_sdk/pay/models/marketing/favor/media.py +7 -0
  495. wechat_sdk/pay/models/marketing/favor/stocks.py +209 -0
  496. wechat_sdk/pay/models/marketing/favor/users/__init__.py +0 -0
  497. wechat_sdk/pay/models/marketing/favor/users/coupons.py +118 -0
  498. wechat_sdk/pay/models/marketing/partnerships.py +62 -0
  499. wechat_sdk/pay/models/marketing/paygiftactivity/__init__.py +0 -0
  500. wechat_sdk/pay/models/marketing/paygiftactivity/activities.py +218 -0
  501. wechat_sdk/pay/models/marketing/paygiftactivity/unique_threshold_activity.py +16 -0
  502. wechat_sdk/pay/models/med_ins/__init__.py +0 -0
  503. wechat_sdk/pay/models/med_ins/orders.py +201 -0
  504. wechat_sdk/pay/models/med_ins/refunds.py +19 -0
  505. wechat_sdk/pay/models/merchant_service/__init__.py +0 -0
  506. wechat_sdk/pay/models/merchant_service/complaint_notifications.py +27 -0
  507. wechat_sdk/pay/models/merchant_service/complaints_v2.py +368 -0
  508. wechat_sdk/pay/models/merchant_service/images.py +12 -0
  509. wechat_sdk/pay/models/notifications.py +27 -0
  510. wechat_sdk/pay/models/offlineface/__init__.py +0 -0
  511. wechat_sdk/pay/models/offlineface/authinfo.py +20 -0
  512. wechat_sdk/pay/models/offlineface/contracts.py +33 -0
  513. wechat_sdk/pay/models/offlineface/face_collections.py +39 -0
  514. wechat_sdk/pay/models/offlineface/repayment_url.py +13 -0
  515. wechat_sdk/pay/models/offlineface/transactions.py +93 -0
  516. wechat_sdk/pay/models/offlinefacemch/__init__.py +0 -0
  517. wechat_sdk/pay/models/offlinefacemch/organizations.py +60 -0
  518. wechat_sdk/pay/models/offlinefacemch/tokens.py +16 -0
  519. wechat_sdk/pay/models/order.py +5 -0
  520. wechat_sdk/pay/models/payscore/__init__.py +0 -0
  521. wechat_sdk/pay/models/payscore/serviceorder.py +379 -0
  522. wechat_sdk/pay/models/profitsharing/__init__.py +0 -0
  523. wechat_sdk/pay/models/profitsharing/bills.py +16 -0
  524. wechat_sdk/pay/models/profitsharing/orders.py +59 -0
  525. wechat_sdk/pay/models/profitsharing/receivers.py +35 -0
  526. wechat_sdk/pay/models/profitsharing/return_orders.py +50 -0
  527. wechat_sdk/pay/models/profitsharing/transactions.py +8 -0
  528. wechat_sdk/pay/models/refund/__init__.py +0 -0
  529. wechat_sdk/pay/models/refund/domestic/__init__.py +0 -0
  530. wechat_sdk/pay/models/refund/domestic/refunds.py +132 -0
  531. wechat_sdk/pay/models/security.py +20 -0
  532. wechat_sdk/pay/models/smartguide/__init__.py +0 -0
  533. wechat_sdk/pay/models/smartguide/guides.py +58 -0
  534. wechat_sdk/pay/models/transactions/__init__.py +76 -0
  535. wechat_sdk/pay/models/transactions/app.py +26 -0
  536. wechat_sdk/pay/models/transactions/h5.py +26 -0
  537. wechat_sdk/pay/models/transactions/jsapi.py +31 -0
  538. wechat_sdk/pay/models/transactions/native.py +26 -0
  539. wechat_sdk/pay/models/transactions/requests.py +56 -0
  540. wechat_sdk/pay/models/vehicle/__init__.py +0 -0
  541. wechat_sdk/pay/models/vehicle/parking/__init__.py +0 -0
  542. wechat_sdk/pay/models/vehicle/parking/parkings.py +29 -0
  543. wechat_sdk/pay/models/vehicle/parking/services.py +24 -0
  544. wechat_sdk/pay/models/vehicle/transactions/__init__.py +47 -0
  545. wechat_sdk/pay/models/vehicle/transactions/_shared.py +33 -0
  546. wechat_sdk/pay/models/vehicle/transactions/parking.py +60 -0
  547. wechat_sdk/pay/notifications.py +191 -0
  548. wechat_sdk/pay/response_decoder.py +63 -0
  549. wechat_sdk/pay/result_processor.py +46 -0
  550. wechat_sdk/pay/sign.py +157 -0
  551. wechat_sdk/pay/utils/__init__.py +1 -0
  552. wechat_sdk/pay/utils/_payment.py +22 -0
  553. wechat_sdk/pay/v2/__init__.py +3 -0
  554. wechat_sdk/pay/v2/_resource.py +33 -0
  555. wechat_sdk/pay/v2/api/__init__.py +31 -0
  556. wechat_sdk/pay/v2/api/downloadbill.py +69 -0
  557. wechat_sdk/pay/v2/api/downloadfundflow.py +75 -0
  558. wechat_sdk/pay/v2/api/face.py +103 -0
  559. wechat_sdk/pay/v2/api/mch/__init__.py +10 -0
  560. wechat_sdk/pay/v2/api/mch/customs.py +198 -0
  561. wechat_sdk/pay/v2/api/mch/newcustoms.py +105 -0
  562. wechat_sdk/pay/v2/api/micropay.py +109 -0
  563. wechat_sdk/pay/v2/api/mmpaymkttransfers.py +210 -0
  564. wechat_sdk/pay/v2/api/orderquery.py +85 -0
  565. wechat_sdk/pay/v2/api/payitil.py +90 -0
  566. wechat_sdk/pay/v2/api/refundquery.py +105 -0
  567. wechat_sdk/pay/v2/api/secapi/__init__.py +91 -0
  568. wechat_sdk/pay/v2/api/secapi/refund.py +113 -0
  569. wechat_sdk/pay/v2/api/tools/__init__.py +8 -0
  570. wechat_sdk/pay/v2/api/tools/authcodetoopenid.py +71 -0
  571. wechat_sdk/pay/v2/client.py +366 -0
  572. wechat_sdk/pay/v2/exceptions/__init__.py +34 -0
  573. wechat_sdk/pay/v2/frontend.py +127 -0
  574. wechat_sdk/pay/v2/models/__init__.py +0 -0
  575. wechat_sdk/pay/v2/models/client.py +22 -0
  576. wechat_sdk/pay/v2/models/downloadbill.py +1 -0
  577. wechat_sdk/pay/v2/models/downloadfundflow.py +1 -0
  578. wechat_sdk/pay/v2/models/face.py +20 -0
  579. wechat_sdk/pay/v2/models/mch/__init__.py +0 -0
  580. wechat_sdk/pay/v2/models/mch/customs.py +40 -0
  581. wechat_sdk/pay/v2/models/mch/newcustoms.py +23 -0
  582. wechat_sdk/pay/v2/models/micropay.py +33 -0
  583. wechat_sdk/pay/v2/models/mmpaymkttransfers.py +49 -0
  584. wechat_sdk/pay/v2/models/orderquery.py +35 -0
  585. wechat_sdk/pay/v2/models/payitil.py +9 -0
  586. wechat_sdk/pay/v2/models/refundquery.py +27 -0
  587. wechat_sdk/pay/v2/models/secapi/__init__.py +18 -0
  588. wechat_sdk/pay/v2/models/secapi/refund.py +31 -0
  589. wechat_sdk/pay/v2/models/tools/__init__.py +0 -0
  590. wechat_sdk/pay/v2/models/tools/authcodetoopenid.py +17 -0
  591. wechat_sdk/pay/v2/response_decoder.py +45 -0
  592. wechat_sdk/pay/v2/result_processor.py +41 -0
  593. wechat_sdk/py.typed +0 -0
  594. wechat_sdk/store/__init__.py +6 -0
  595. wechat_sdk/store/api/__init__.py +1 -0
  596. wechat_sdk/store/api/_account.py +248 -0
  597. wechat_sdk/store/api/_address.py +149 -0
  598. wechat_sdk/store/api/_api.py +88 -0
  599. wechat_sdk/store/api/_freight.py +143 -0
  600. wechat_sdk/store/api/_stock.py +173 -0
  601. wechat_sdk/store/api/leagueheadsupplier/__init__.py +25 -0
  602. wechat_sdk/store/api/leagueheadsupplier/balance.py +97 -0
  603. wechat_sdk/store/api/leagueheadsupplier/basic.py +9 -0
  604. wechat_sdk/store/api/leagueheadsupplier/category.py +27 -0
  605. wechat_sdk/store/api/leagueheadsupplier/headsupplier.py +125 -0
  606. wechat_sdk/store/api/leagueheadsupplier/opentalent/__init__.py +13 -0
  607. wechat_sdk/store/api/leagueheadsupplier/opentalent/getshop.py +411 -0
  608. wechat_sdk/store/api/leagueheadsupplier/opentalent/window.py +271 -0
  609. wechat_sdk/store/api/leagueheadsupplier/order.py +101 -0
  610. wechat_sdk/store/api/leagueheadsupplier/sharer/__init__.py +23 -0
  611. wechat_sdk/store/api/leagueheadsupplier/sharer/account.py +235 -0
  612. wechat_sdk/store/api/leagueheadsupplier/sharer/article.py +101 -0
  613. wechat_sdk/store/api/leagueheadsupplier/sharer/clue.py +81 -0
  614. wechat_sdk/store/api/leagueheadsupplier/sharer/coupon.py +283 -0
  615. wechat_sdk/store/api/leagueheadsupplier/sharer/getshop.py +375 -0
  616. wechat_sdk/store/api/leagueheadsupplier/sharer/live.py +575 -0
  617. wechat_sdk/store/api/leagueheadsupplier/sharer/video.py +189 -0
  618. wechat_sdk/store/api/leagueheadsupplier/shop.py +153 -0
  619. wechat_sdk/store/api/shop/__init__.py +61 -0
  620. wechat_sdk/store/api/shop/apimgnt/__init__.py +13 -0
  621. wechat_sdk/store/api/shop/apimgnt/common.py +29 -0
  622. wechat_sdk/store/api/shop/apimgnt/resource.py +304 -0
  623. wechat_sdk/store/api/shop/brand.py +234 -0
  624. wechat_sdk/store/api/shop/category_rule.py +92 -0
  625. wechat_sdk/store/api/shop/channels_shop_aftersale/__init__.py +15 -0
  626. wechat_sdk/store/api/shop/channels_shop_aftersale/aftersale.py +724 -0
  627. wechat_sdk/store/api/shop/channels_shop_aftersale/complaint.py +156 -0
  628. wechat_sdk/store/api/shop/channels_shop_aftersale/guarantee.py +242 -0
  629. wechat_sdk/store/api/shop/channels_shop_category.py +226 -0
  630. wechat_sdk/store/api/shop/channels_shop_delivery/__init__.py +17 -0
  631. wechat_sdk/store/api/shop/channels_shop_delivery/address.py +9 -0
  632. wechat_sdk/store/api/shop/channels_shop_delivery/delivery.py +108 -0
  633. wechat_sdk/store/api/shop/channels_shop_delivery/ewaybill.py +787 -0
  634. wechat_sdk/store/api/shop/channels_shop_delivery/merchant.py +9 -0
  635. wechat_sdk/store/api/shop/channels_shop_order.py +875 -0
  636. wechat_sdk/store/api/shop/channels_shop_product/__init__.py +19 -0
  637. wechat_sdk/store/api/shop/channels_shop_product/gift.py +308 -0
  638. wechat_sdk/store/api/shop/channels_shop_product/giftactivity.py +106 -0
  639. wechat_sdk/store/api/shop/channels_shop_product/limiteddiscounttask.py +192 -0
  640. wechat_sdk/store/api/shop/channels_shop_product/shop.py +1310 -0
  641. wechat_sdk/store/api/shop/channels_shop_product/stock.py +9 -0
  642. wechat_sdk/store/api/shop/compass.py +279 -0
  643. wechat_sdk/store/api/shop/coupon.py +324 -0
  644. wechat_sdk/store/api/shop/favorite/__init__.py +11 -0
  645. wechat_sdk/store/api/shop/favorite/shopfavorite.py +23 -0
  646. wechat_sdk/store/api/shop/funds/__init__.py +15 -0
  647. wechat_sdk/store/api/shop/funds/bank.py +145 -0
  648. wechat_sdk/store/api/shop/funds/funds.py +301 -0
  649. wechat_sdk/store/api/shop/funds/qrcode.py +51 -0
  650. wechat_sdk/store/api/shop/homepage/__init__.py +17 -0
  651. wechat_sdk/store/api/shop/homepage/background.py +86 -0
  652. wechat_sdk/store/api/shop/homepage/banner.py +91 -0
  653. wechat_sdk/store/api/shop/homepage/shoptype.py +55 -0
  654. wechat_sdk/store/api/shop/homepage/storewindow.py +119 -0
  655. wechat_sdk/store/api/shop/kf.py +119 -0
  656. wechat_sdk/store/api/shop/league/__init__.py +13 -0
  657. wechat_sdk/store/api/shop/league/item.py +330 -0
  658. wechat_sdk/store/api/shop/league/promoter.py +136 -0
  659. wechat_sdk/store/api/shop/miniandstore/__init__.py +13 -0
  660. wechat_sdk/store/api/shop/miniandstore/basic.py +87 -0
  661. wechat_sdk/store/api/shop/miniandstore/cooperation_gift.py +321 -0
  662. wechat_sdk/store/api/shop/platformkf.py +145 -0
  663. wechat_sdk/store/api/shop/qic.py +153 -0
  664. wechat_sdk/store/api/shop/storemanage.py +125 -0
  665. wechat_sdk/store/api/shop/subsidy/__init__.py +11 -0
  666. wechat_sdk/store/api/shop/subsidy/invoicing.py +137 -0
  667. wechat_sdk/store/api/shop/supplier/__init__.py +15 -0
  668. wechat_sdk/store/api/shop/supplier/auto.py +176 -0
  669. wechat_sdk/store/api/shop/supplier/order.py +213 -0
  670. wechat_sdk/store/api/shop/supplier/relation.py +69 -0
  671. wechat_sdk/store/api/shop/supply.py +138 -0
  672. wechat_sdk/store/api/shop/vip.py +107 -0
  673. wechat_sdk/store/api/shop/warehouse.py +381 -0
  674. wechat_sdk/store/api/shop/wecom.py +37 -0
  675. wechat_sdk/store/api/shop/wxamember/__init__.py +13 -0
  676. wechat_sdk/store/api/shop/wxamember/shop.py +23 -0
  677. wechat_sdk/store/api/shop/wxamember/wxa.py +157 -0
  678. wechat_sdk/store/api/supplier/__init__.py +19 -0
  679. wechat_sdk/store/api/supplier/account.py +23 -0
  680. wechat_sdk/store/api/supplier/basics.py +9 -0
  681. wechat_sdk/store/api/supplier/delivery/__init__.py +15 -0
  682. wechat_sdk/store/api/supplier/delivery/address.py +9 -0
  683. wechat_sdk/store/api/supplier/delivery/electronic.py +689 -0
  684. wechat_sdk/store/api/supplier/delivery/shipping.py +95 -0
  685. wechat_sdk/store/api/supplier/dropship/__init__.py +13 -0
  686. wechat_sdk/store/api/supplier/dropship/dropship_order.py +138 -0
  687. wechat_sdk/store/api/supplier/dropship/dropship_relation.py +113 -0
  688. wechat_sdk/store/api/supplier/supply/__init__.py +19 -0
  689. wechat_sdk/store/api/supplier/supply/freight_template.py +9 -0
  690. wechat_sdk/store/api/supplier/supply/supply_category.py +226 -0
  691. wechat_sdk/store/api/supplier/supply/supply_order.py +138 -0
  692. wechat_sdk/store/api/supplier/supply/supply_product.py +639 -0
  693. wechat_sdk/store/api/supplier/supply/supply_product_stock.py +9 -0
  694. wechat_sdk/store/api/talent/__init__.py +15 -0
  695. wechat_sdk/store/api/talent/basics.py +9 -0
  696. wechat_sdk/store/api/talent/order.py +95 -0
  697. wechat_sdk/store/api/talent/window.py +67 -0
  698. wechat_sdk/store/client.py +144 -0
  699. wechat_sdk/store/exceptions/__init__.py +29 -0
  700. wechat_sdk/store/models/__init__.py +0 -0
  701. wechat_sdk/store/models/_account.py +18 -0
  702. wechat_sdk/store/models/_address.py +70 -0
  703. wechat_sdk/store/models/_freight.py +158 -0
  704. wechat_sdk/store/models/_shared.py +49 -0
  705. wechat_sdk/store/models/_stock.py +164 -0
  706. wechat_sdk/store/models/leagueheadsupplier/__init__.py +0 -0
  707. wechat_sdk/store/models/leagueheadsupplier/balance.py +51 -0
  708. wechat_sdk/store/models/leagueheadsupplier/basic.py +7 -0
  709. wechat_sdk/store/models/leagueheadsupplier/category.py +146 -0
  710. wechat_sdk/store/models/leagueheadsupplier/headsupplier.py +117 -0
  711. wechat_sdk/store/models/leagueheadsupplier/opentalent/__init__.py +0 -0
  712. wechat_sdk/store/models/leagueheadsupplier/opentalent/getshop.py +280 -0
  713. wechat_sdk/store/models/leagueheadsupplier/opentalent/window.py +211 -0
  714. wechat_sdk/store/models/leagueheadsupplier/order.py +246 -0
  715. wechat_sdk/store/models/leagueheadsupplier/sharer/__init__.py +0 -0
  716. wechat_sdk/store/models/leagueheadsupplier/sharer/account.py +166 -0
  717. wechat_sdk/store/models/leagueheadsupplier/sharer/article.py +98 -0
  718. wechat_sdk/store/models/leagueheadsupplier/sharer/clue.py +114 -0
  719. wechat_sdk/store/models/leagueheadsupplier/sharer/coupon.py +246 -0
  720. wechat_sdk/store/models/leagueheadsupplier/sharer/getshop.py +343 -0
  721. wechat_sdk/store/models/leagueheadsupplier/sharer/live.py +261 -0
  722. wechat_sdk/store/models/leagueheadsupplier/sharer/video.py +119 -0
  723. wechat_sdk/store/models/leagueheadsupplier/shop.py +439 -0
  724. wechat_sdk/store/models/shop/__init__.py +0 -0
  725. wechat_sdk/store/models/shop/_shared.py +80 -0
  726. wechat_sdk/store/models/shop/apimgnt/__init__.py +0 -0
  727. wechat_sdk/store/models/shop/apimgnt/common.py +15 -0
  728. wechat_sdk/store/models/shop/apimgnt/resource.py +113 -0
  729. wechat_sdk/store/models/shop/brand.py +261 -0
  730. wechat_sdk/store/models/shop/category_rule.py +259 -0
  731. wechat_sdk/store/models/shop/channels_shop_aftersale/__init__.py +0 -0
  732. wechat_sdk/store/models/shop/channels_shop_aftersale/_shared.py +18 -0
  733. wechat_sdk/store/models/shop/channels_shop_aftersale/aftersale.py +654 -0
  734. wechat_sdk/store/models/shop/channels_shop_aftersale/complaint.py +94 -0
  735. wechat_sdk/store/models/shop/channels_shop_aftersale/guarantee.py +329 -0
  736. wechat_sdk/store/models/shop/channels_shop_category.py +491 -0
  737. wechat_sdk/store/models/shop/channels_shop_delivery/__init__.py +0 -0
  738. wechat_sdk/store/models/shop/channels_shop_delivery/address.py +6 -0
  739. wechat_sdk/store/models/shop/channels_shop_delivery/delivery.py +32 -0
  740. wechat_sdk/store/models/shop/channels_shop_delivery/ewaybill.py +648 -0
  741. wechat_sdk/store/models/shop/channels_shop_delivery/merchant.py +13 -0
  742. wechat_sdk/store/models/shop/channels_shop_order.py +1183 -0
  743. wechat_sdk/store/models/shop/channels_shop_product/__init__.py +0 -0
  744. wechat_sdk/store/models/shop/channels_shop_product/_shared.py +10 -0
  745. wechat_sdk/store/models/shop/channels_shop_product/gift.py +236 -0
  746. wechat_sdk/store/models/shop/channels_shop_product/giftactivity.py +42 -0
  747. wechat_sdk/store/models/shop/channels_shop_product/limiteddiscounttask.py +127 -0
  748. wechat_sdk/store/models/shop/channels_shop_product/shop.py +945 -0
  749. wechat_sdk/store/models/shop/channels_shop_product/stock.py +6 -0
  750. wechat_sdk/store/models/shop/compass.py +370 -0
  751. wechat_sdk/store/models/shop/coupon.py +228 -0
  752. wechat_sdk/store/models/shop/favorite/__init__.py +0 -0
  753. wechat_sdk/store/models/shop/favorite/shopfavorite.py +12 -0
  754. wechat_sdk/store/models/shop/funds/__init__.py +0 -0
  755. wechat_sdk/store/models/shop/funds/bank.py +98 -0
  756. wechat_sdk/store/models/shop/funds/funds.py +344 -0
  757. wechat_sdk/store/models/shop/funds/qrcode.py +27 -0
  758. wechat_sdk/store/models/shop/homepage/__init__.py +0 -0
  759. wechat_sdk/store/models/shop/homepage/background.py +32 -0
  760. wechat_sdk/store/models/shop/homepage/banner.py +88 -0
  761. wechat_sdk/store/models/shop/homepage/shoptype.py +47 -0
  762. wechat_sdk/store/models/shop/homepage/storewindow.py +44 -0
  763. wechat_sdk/store/models/shop/kf.py +40 -0
  764. wechat_sdk/store/models/shop/league/__init__.py +0 -0
  765. wechat_sdk/store/models/shop/league/_shared.py +11 -0
  766. wechat_sdk/store/models/shop/league/item.py +230 -0
  767. wechat_sdk/store/models/shop/league/promoter.py +112 -0
  768. wechat_sdk/store/models/shop/miniandstore/__init__.py +0 -0
  769. wechat_sdk/store/models/shop/miniandstore/basic.py +38 -0
  770. wechat_sdk/store/models/shop/miniandstore/cooperation_gift.py +225 -0
  771. wechat_sdk/store/models/shop/platformkf.py +176 -0
  772. wechat_sdk/store/models/shop/qic.py +171 -0
  773. wechat_sdk/store/models/shop/storemanage.py +68 -0
  774. wechat_sdk/store/models/shop/subsidy/__init__.py +0 -0
  775. wechat_sdk/store/models/shop/subsidy/invoicing.py +72 -0
  776. wechat_sdk/store/models/shop/supplier/__init__.py +0 -0
  777. wechat_sdk/store/models/shop/supplier/auto.py +78 -0
  778. wechat_sdk/store/models/shop/supplier/order.py +488 -0
  779. wechat_sdk/store/models/shop/supplier/relation.py +34 -0
  780. wechat_sdk/store/models/shop/supply.py +334 -0
  781. wechat_sdk/store/models/shop/vip.py +78 -0
  782. wechat_sdk/store/models/shop/warehouse.py +172 -0
  783. wechat_sdk/store/models/shop/wecom.py +23 -0
  784. wechat_sdk/store/models/shop/wxamember/__init__.py +0 -0
  785. wechat_sdk/store/models/shop/wxamember/shop.py +35 -0
  786. wechat_sdk/store/models/shop/wxamember/wxa.py +70 -0
  787. wechat_sdk/store/models/supplier/__init__.py +0 -0
  788. wechat_sdk/store/models/supplier/account.py +24 -0
  789. wechat_sdk/store/models/supplier/basics.py +7 -0
  790. wechat_sdk/store/models/supplier/delivery/__init__.py +0 -0
  791. wechat_sdk/store/models/supplier/delivery/address.py +6 -0
  792. wechat_sdk/store/models/supplier/delivery/electronic.py +560 -0
  793. wechat_sdk/store/models/supplier/delivery/shipping.py +22 -0
  794. wechat_sdk/store/models/supplier/dropship/__init__.py +0 -0
  795. wechat_sdk/store/models/supplier/dropship/dropship_order.py +298 -0
  796. wechat_sdk/store/models/supplier/dropship/dropship_relation.py +48 -0
  797. wechat_sdk/store/models/supplier/supply/__init__.py +0 -0
  798. wechat_sdk/store/models/supplier/supply/_shared.py +43 -0
  799. wechat_sdk/store/models/supplier/supply/freight_template.py +13 -0
  800. wechat_sdk/store/models/supplier/supply/supply_category.py +491 -0
  801. wechat_sdk/store/models/supplier/supply/supply_order.py +373 -0
  802. wechat_sdk/store/models/supplier/supply/supply_product.py +646 -0
  803. wechat_sdk/store/models/supplier/supply/supply_product_stock.py +6 -0
  804. wechat_sdk/store/models/talent/__init__.py +0 -0
  805. wechat_sdk/store/models/talent/basics.py +7 -0
  806. wechat_sdk/store/models/talent/order.py +122 -0
  807. wechat_sdk/store/models/talent/window.py +81 -0
  808. wechat_sdk/store/response_decoder.py +15 -0
  809. wechat_sdk/store/result_processor.py +5 -0
  810. wechat_sdk/work/__init__.py +1 -0
  811. wechat_sdk/work/api/__init__.py +7 -0
  812. wechat_sdk/work/api/contact.py +7 -0
  813. wechat_sdk/work/api/message.py +7 -0
  814. wechat_sdk/work/client.py +113 -0
  815. wechat_sdk/work/crypto.py +4 -0
  816. wechat_sdk/work/exceptions/__init__.py +29 -0
  817. wechat_sdk/work/models/__init__.py +0 -0
  818. wechat_sdk/work/models/contact.py +1 -0
  819. wechat_sdk/work/models/message.py +1 -0
  820. wechat_sdk/work/response_decoder.py +5 -0
  821. wechat_sdk/work/result_processor.py +5 -0
  822. wechat_sdk_python-0.1.0.dist-info/METADATA +250 -0
  823. wechat_sdk_python-0.1.0.dist-info/RECORD +826 -0
  824. {wechat_sdk_python-0.0.1.dist-info → wechat_sdk_python-0.1.0.dist-info}/WHEEL +2 -1
  825. wechat_sdk_python-0.1.0.dist-info/top_level.txt +1 -0
  826. wechat_py/__init__.py +0 -6
  827. wechat_py/client.py +0 -58
  828. wechat_py/exceptions.py +0 -18
  829. wechat_sdk_python-0.0.1.dist-info/METADATA +0 -91
  830. wechat_sdk_python-0.0.1.dist-info/RECORD +0 -7
  831. {wechat_sdk_python-0.0.1.dist-info → wechat_sdk_python-0.1.0.dist-info}/licenses/LICENSE +0 -0
wechat_sdk/__init__.py ADDED
@@ -0,0 +1,25 @@
1
+ """WeChat SDK foundational components."""
2
+
3
+ from .core import (
4
+ BaseWeChatAPI,
5
+ BaseWeChatClient,
6
+ ClientException,
7
+ WeChatAPIError,
8
+ WeChatBusinessError,
9
+ WeChatError,
10
+ WeChatNetworkError,
11
+ WeChatSystemError,
12
+ WeChatTransportError,
13
+ )
14
+
15
+ __all__ = [
16
+ "BaseWeChatAPI",
17
+ "BaseWeChatClient",
18
+ "ClientException",
19
+ "WeChatAPIError",
20
+ "WeChatBusinessError",
21
+ "WeChatError",
22
+ "WeChatNetworkError",
23
+ "WeChatSystemError",
24
+ "WeChatTransportError",
25
+ ]
@@ -0,0 +1,161 @@
1
+ """HTTP session lifetime and failure handling shared by module clients."""
2
+
3
+ from typing import Callable, NoReturn, TypeVar
4
+
5
+ import httpx
6
+
7
+ from .core.client import BaseWeChatClient
8
+ from .core.exceptions import (
9
+ ClientException,
10
+ WeChatNetworkError,
11
+ WeChatSystemError,
12
+ _original_request,
13
+ )
14
+
15
+ ClientT = TypeVar("ClientT", bound="ClientSession")
16
+ GATEWAY_STATUSES = (502, 503, 504)
17
+
18
+
19
+ class ClientSession(BaseWeChatClient):
20
+ """Manage the module client's connection pool and response context."""
21
+
22
+ system_error: type[WeChatSystemError]
23
+
24
+ def __init__(self, **options):
25
+ super().__init__(**options)
26
+ self._owns_client = self.http_client is None
27
+ self._client = (
28
+ self.http_client
29
+ if self.http_client is not None
30
+ else httpx.Client(timeout=self.timeout)
31
+ )
32
+
33
+ def _require_credential(self, name: str) -> str:
34
+ value = getattr(self, name)
35
+ if not value:
36
+ raise ValueError(f"Configure {name} on the client")
37
+ return value
38
+
39
+ def _handle_result(
40
+ self, res, method=None, url=None, result_processor=None, **kwargs
41
+ ):
42
+ """处理 HTTP 响应,在协议校验成功后将解码结果交给可选的单参数回调。"""
43
+ if url is None:
44
+ try:
45
+ url = res.url
46
+ except RuntimeError:
47
+ # Standalone HTTPX responses may have no associated request.
48
+ pass
49
+ path = httpx.URL(url).path if url is not None else ""
50
+ try:
51
+ data = self._parse_response(res, path, **kwargs)
52
+ if isinstance(data, bytes):
53
+ self.result_processor.check_file_error(data, res.status_code)
54
+ processor = (
55
+ self.result_processor.identity
56
+ if result_processor is None
57
+ else result_processor
58
+ )
59
+ return processor(data)
60
+ except ClientException as exc:
61
+ if exc.client is None:
62
+ exc._set_context(self, None, res)
63
+ raise
64
+
65
+ def close(self) -> None:
66
+ if self._owns_client:
67
+ self._client.close()
68
+
69
+ def __enter__(self: ClientT) -> ClientT:
70
+ return self
71
+
72
+ def __exit__(self, *args: object) -> None:
73
+ self.close()
74
+
75
+
76
+ def send_http(
77
+ client, send: Callable[..., httpx.Response], *args, **kwargs
78
+ ) -> httpx.Response:
79
+ try:
80
+ return send(*args, **kwargs)
81
+ except (
82
+ httpx.NetworkError,
83
+ httpx.TimeoutException,
84
+ httpx.RemoteProtocolError,
85
+ httpx.ProxyError,
86
+ ) as exc:
87
+ error = client.network_error(
88
+ f"WeChat request failed ({type(exc).__name__})",
89
+ client=client,
90
+ request=_original_request(exc),
91
+ )
92
+ except (httpx.HTTPError, ValueError) as exc:
93
+ error = client.system_error(
94
+ f"WeChat request failed ({type(exc).__name__})",
95
+ client=client,
96
+ request=_original_request(exc)
97
+ if isinstance(exc, httpx.HTTPError)
98
+ else None,
99
+ response=exc.response if isinstance(exc, httpx.HTTPStatusError) else None,
100
+ )
101
+ # The original HTTPX error can contain credentials in its request URL.
102
+ raise error
103
+
104
+
105
+ def send_with_retries(client, method, url, handle_response, *, allow_retry, **kwargs):
106
+ """Retry safe HTTP exchanges when sending or handling a gateway response fails."""
107
+ retries = (
108
+ client.max_retries if allow_retry and method.upper() in {"GET", "HEAD"} else 0
109
+ )
110
+ if retries:
111
+ # These GETs delete menus or consume a single-use OAuth code.
112
+ if url.path.rstrip("/").endswith(
113
+ (
114
+ "/cgi-bin/menu/delete",
115
+ "/sns/oauth2/access_token",
116
+ "/sns/jscode2session",
117
+ )
118
+ ):
119
+ retries = 0
120
+ for attempt in range(retries + 1):
121
+ response = None
122
+ try:
123
+ response = send_http(
124
+ client,
125
+ client._client.request,
126
+ method,
127
+ url,
128
+ follow_redirects=False,
129
+ **kwargs,
130
+ )
131
+ return handle_response(response)
132
+ except WeChatNetworkError:
133
+ # A processor handling a successful reply can raise its own error.
134
+ # Only a send failure or a gateway response can replay this request.
135
+ if attempt == retries or (
136
+ response is not None and response.status_code not in GATEWAY_STATUSES
137
+ ):
138
+ raise
139
+
140
+
141
+ def raise_http_error(client, status: int) -> NoReturn:
142
+ error = client.network_error if status in GATEWAY_STATUSES else client.system_error
143
+ raise error(f"WeChat request failed (HTTP {status})", status_code=status)
144
+
145
+
146
+ def check_unsigned_gateway(
147
+ client, response: httpx.Response, header_prefix: str
148
+ ) -> None:
149
+ # A gateway may return its own unsigned page. Trust only the HTTP status;
150
+ # any reply carrying platform signature headers still requires verification.
151
+ if response.status_code in GATEWAY_STATUSES and not any(
152
+ name.startswith(header_prefix) for name in response.headers
153
+ ):
154
+ raise_http_error(client, response.status_code)
155
+
156
+
157
+ def raise_api_error(client, code, message, status: int) -> NoReturn:
158
+ if not isinstance(code, (int, str)) or isinstance(code, bool):
159
+ raise client.system_error("Invalid WeChat error code", status_code=status)
160
+ error = client.system_error if code in client.system_codes else client.api_error
161
+ raise error(code=code, message=str(message), status_code=status)
@@ -0,0 +1,6 @@
1
+ """WeChat Channels integration."""
2
+
3
+ from ..core.crypto import APIEncryption
4
+ from .client import ChannelsClient
5
+
6
+ __all__ = ["APIEncryption", "ChannelsClient"]
@@ -0,0 +1 @@
1
+ """微信视频号接口分组。"""
@@ -0,0 +1,24 @@
1
+ """Shared transport for WeChat Channels resources."""
2
+
3
+ from typing import TYPE_CHECKING, Any, Callable
4
+
5
+ from wechat_sdk.core.responses import ResultT
6
+
7
+ from ...core import BaseWeChatAPI
8
+
9
+ if TYPE_CHECKING:
10
+ from ..client import ChannelsClient as ChannelsClient
11
+
12
+
13
+ class ChannelsAPI(BaseWeChatAPI["ChannelsClient"]):
14
+ def _encryptable_request(
15
+ self,
16
+ method: str,
17
+ path: str,
18
+ *,
19
+ result_processor: Callable[[Any], ResultT],
20
+ **options: Any,
21
+ ) -> ResultT:
22
+ return self.client._encryptable_request(
23
+ method, type(self), path, result_processor=result_processor, **options
24
+ )
@@ -0,0 +1,243 @@
1
+ from typing import Optional
2
+
3
+ from wechat_sdk.channels.api._api import ChannelsAPI
4
+ from wechat_sdk.channels.models.basic import (
5
+ AccessTokenParams,
6
+ AccessTokenResponse,
7
+ ApiQuotaResponse,
8
+ CallbackCheckRequest,
9
+ CallbackCheckResponse,
10
+ ClearApiQuotaRequest,
11
+ ClearQuotaByAppSecretRequest,
12
+ ClearQuotaRequest,
13
+ GetApiQuotaRequest,
14
+ GetRidInfoRequest,
15
+ RidInfoResponse,
16
+ ServerIPResponse,
17
+ StableAccessTokenBody,
18
+ StatusResponse,
19
+ )
20
+ from wechat_sdk.core.request import (
21
+ parse_query,
22
+ validate_request,
23
+ )
24
+ from wechat_sdk.core.responses import response_parser
25
+
26
+
27
+ class BasicAPI(ChannelsAPI):
28
+ @validate_request
29
+ def getaccesstoken(self) -> AccessTokenResponse:
30
+ """接口英文名:getAccessToken
31
+
32
+ 该接口用于获取当前视频号账号的接口调用凭据。
33
+
34
+ :returns: AccessTokenResponse 对象,包含调用凭据 access_token 和剩余有效期 expires_in(秒)。
35
+ :rtype: AccessTokenResponse
36
+
37
+ https://developers.weixin.qq.com/doc/channels/api/basic/api_getaccesstoken.md
38
+ """
39
+ return self._request(
40
+ "GET",
41
+ "/cgi-bin/token",
42
+ params=parse_query(
43
+ AccessTokenParams,
44
+ {
45
+ "appid": self.client._require_credential("app_id"),
46
+ "secret": self.client._require_credential("secret_id"),
47
+ "grant_type": "client_credential",
48
+ },
49
+ ),
50
+ inject_access_token=False,
51
+ allow_retry=False,
52
+ result_processor=response_parser(AccessTokenResponse),
53
+ )
54
+
55
+ @validate_request
56
+ def getstableaccesstoken(
57
+ self, *, force_refresh: Optional[bool] = False
58
+ ) -> AccessTokenResponse:
59
+ """接口英文名:getStableAccessToken
60
+
61
+ 该接口用于获取当前账号的稳定版接口调用凭据。
62
+
63
+ :param force_refresh: 默认使用 false。
64
+ :type force_refresh: Optional[bool]
65
+ :returns: AccessTokenResponse 对象,包含调用凭据 access_token 和剩余有效期 expires_in(秒)。
66
+ :rtype: AccessTokenResponse
67
+
68
+ https://developers.weixin.qq.com/doc/channels/api/basic/api_getstableaccesstoken.md
69
+ """
70
+ return self._request(
71
+ "POST",
72
+ "/cgi-bin/stable_token",
73
+ json=StableAccessTokenBody(
74
+ grant_type="client_credential",
75
+ appid=self.client._require_credential("app_id"),
76
+ secret=self.client._require_credential("secret_id"),
77
+ force_refresh=force_refresh,
78
+ ).to_payload(),
79
+ inject_access_token=False,
80
+ result_processor=response_parser(AccessTokenResponse),
81
+ )
82
+
83
+ @validate_request
84
+ def getapiquota(self, *, cgi_path: str) -> ApiQuotaResponse:
85
+ """接口英文名:getApiQuota
86
+
87
+ 该接口用于查询指定接口的调用额度。
88
+
89
+ :param cgi_path: api的请求地址,例如"/cgi-bin/message/custom/send";不要前缀“。
90
+ :type cgi_path: str
91
+ :returns: ApiQuotaResponse 对象,包含 quota、rate_limit、component_rate_limit。
92
+ :rtype: ApiQuotaResponse
93
+
94
+ https://developers.weixin.qq.com/doc/channels/api/basic/api_getapiquota.md
95
+ """
96
+ return self._encryptable_request(
97
+ "POST",
98
+ "/cgi-bin/openapi/quota/get",
99
+ json=GetApiQuotaRequest(cgi_path=cgi_path).to_payload(),
100
+ result_processor=response_parser(ApiQuotaResponse),
101
+ )
102
+
103
+ @validate_request
104
+ def clearapiquota(self, *, cgi_path: str) -> StatusResponse:
105
+ """接口英文名:clearApiQuota
106
+
107
+ 该接口用于重置指定接口的调用次数。
108
+
109
+ :param cgi_path: api的请求地址,cgi_path 必须以"/channels/ec/"开头,不要前缀"。
110
+ :type cgi_path: str
111
+ :returns: StatusResponse 对象,记录微信返回的操作状态。errcode 为非零值时,客户端抛出接口异常。
112
+ :rtype: StatusResponse
113
+
114
+ https://developers.weixin.qq.com/doc/channels/api/basic/api_clearapiquota.md
115
+ """
116
+ return self._request(
117
+ "POST",
118
+ "/cgi-bin/openapi/quota/clear",
119
+ json=ClearApiQuotaRequest(cgi_path=cgi_path).to_payload(),
120
+ result_processor=response_parser(StatusResponse),
121
+ )
122
+
123
+ @validate_request
124
+ def clearquota(self) -> StatusResponse:
125
+ """接口英文名:clearQuota
126
+
127
+ 该接口用于重置当前账号的接口调用次数。
128
+
129
+ :returns: StatusResponse 对象,记录微信返回的操作状态。errcode 为非零值时,客户端抛出接口异常。
130
+ :rtype: StatusResponse
131
+
132
+ https://developers.weixin.qq.com/doc/channels/api/basic/api_clearquota.md
133
+ """
134
+ return self._encryptable_request(
135
+ "POST",
136
+ "/cgi-bin/clear_quota",
137
+ json=ClearQuotaRequest(
138
+ appid=self.client._require_credential("app_id")
139
+ ).to_payload(),
140
+ result_processor=response_parser(StatusResponse),
141
+ )
142
+
143
+ @validate_request
144
+ def clearquotabyappsecret(self) -> StatusResponse:
145
+ """接口英文名:clearQuotaByAppSecret
146
+
147
+ 该接口用于使用当前账号的 AppSecret 重置接口调用次数。
148
+
149
+ :returns: StatusResponse 对象,记录微信返回的操作状态。errcode 为非零值时,客户端抛出接口异常。
150
+ :rtype: StatusResponse
151
+
152
+ https://developers.weixin.qq.com/doc/channels/api/basic/api_clearquotabyappsecret.md
153
+ """
154
+ return self._request(
155
+ "POST",
156
+ "/cgi-bin/clear_quota/v2",
157
+ json=ClearQuotaByAppSecretRequest(
158
+ appid=self.client._require_credential("app_id"),
159
+ appsecret=self.client._require_credential("secret_id"),
160
+ ).to_payload(),
161
+ inject_access_token=False,
162
+ result_processor=response_parser(StatusResponse),
163
+ )
164
+
165
+ @validate_request
166
+ def getridinfo(self, *, rid: str) -> RidInfoResponse:
167
+ """接口英文名:getRidInfo
168
+
169
+ 该接口用于查询请求标识 rid 对应的调用信息。
170
+
171
+ :param rid: 调用接口报错返回的rid。
172
+ :type rid: str
173
+ :returns: RidInfoResponse 对象中的 request 表示该rid对应的请求详情。
174
+ :rtype: RidInfoResponse
175
+
176
+ https://developers.weixin.qq.com/doc/channels/api/basic/api_getridinfo.md
177
+ """
178
+ return self._encryptable_request(
179
+ "POST",
180
+ "/cgi-bin/openapi/rid/get",
181
+ json=GetRidInfoRequest(rid=rid).to_payload(),
182
+ result_processor=response_parser(RidInfoResponse),
183
+ )
184
+
185
+ @validate_request
186
+ def callbackcheck(
187
+ self, *, action: str, check_operator: str
188
+ ) -> CallbackCheckResponse:
189
+ """接口英文名:callbackCheck
190
+
191
+ 该接口用于检测微信与开发者服务器之间的网络连通性。
192
+
193
+ :param action: 检测动作:dns(域名解析)/ping(ping检测)/all(全部)。
194
+ :type action: str
195
+ :param check_operator: 检测运营商:CHINANET(电信)/UNICOM(联通)/CAP(腾讯)/DEFAULT(自动)。
196
+ :type check_operator: str
197
+ :returns: CallbackCheckResponse 对象,包含 dns、ping。
198
+ :rtype: CallbackCheckResponse
199
+
200
+ https://developers.weixin.qq.com/doc/channels/api/basic/api_callbackcheck.md
201
+ """
202
+ return self._request(
203
+ "POST",
204
+ "/cgi-bin/callback/check",
205
+ json=CallbackCheckRequest(
206
+ action=action, check_operator=check_operator
207
+ ).to_payload(),
208
+ result_processor=response_parser(CallbackCheckResponse),
209
+ )
210
+
211
+ @validate_request
212
+ def getapidomainip(self) -> ServerIPResponse:
213
+ """接口英文名:getApiDomainIp
214
+
215
+ 该接口用于获取微信API服务器IP。
216
+
217
+ :returns: ServerIPResponse 对象中的 ip_list 表示微信服务器 IP 地址列表。
218
+ :rtype: ServerIPResponse
219
+
220
+ https://developers.weixin.qq.com/doc/channels/api/basic/api_getapidomainip.md
221
+ """
222
+ return self._request(
223
+ "GET",
224
+ "/cgi-bin/get_api_domain_ip",
225
+ result_processor=response_parser(ServerIPResponse),
226
+ )
227
+
228
+ @validate_request
229
+ def getcallbackip(self) -> ServerIPResponse:
230
+ """接口英文名:getCallbackIp
231
+
232
+ 该接口用于获取微信推送服务器IP。
233
+
234
+ :returns: ServerIPResponse 对象中的 ip_list 表示微信服务器 IP 地址列表。
235
+ :rtype: ServerIPResponse
236
+
237
+ https://developers.weixin.qq.com/doc/channels/api/basic/api_getcallbackip.md
238
+ """
239
+ return self._request(
240
+ "GET",
241
+ "/cgi-bin/getcallbackip",
242
+ result_processor=response_parser(ServerIPResponse),
243
+ )
@@ -0,0 +1,99 @@
1
+ from wechat_sdk.channels.api._api import ChannelsAPI
2
+ from wechat_sdk.channels.models.compass import (
3
+ GetFinderOverallRequest,
4
+ GetFinderOverallResponse,
5
+ GetFinderProductDataRequest,
6
+ GetFinderProductDataResponse,
7
+ GetFinderProductListRequest,
8
+ GetFinderProductListResponse,
9
+ GetFinderSaleProfileDataRequest,
10
+ GetFinderSaleProfileDataResponse,
11
+ )
12
+ from wechat_sdk.core.request import validate_request
13
+ from wechat_sdk.core.responses import response_parser
14
+
15
+
16
+ class CompassAPI(ChannelsAPI):
17
+ @validate_request
18
+ def getfinderoverall(self, *, ds: str) -> GetFinderOverallResponse:
19
+ """接口英文名:getfinderoverall
20
+
21
+ 该接口用于获取电商概览数据。
22
+
23
+ :param ds: 日期,格式YYYYMMDD。
24
+ :type ds: str
25
+ :returns: GetFinderOverallResponse 对象,业务结果位于 data,其中的字段有 pay_gmv、live_pay_gmv、feed_pay_gmv。
26
+ :rtype: GetFinderOverallResponse
27
+
28
+ https://developers.weixin.qq.com/doc/channels/api/channels/compass/api_getfinderoverall.md
29
+ """
30
+ return self._request(
31
+ "POST",
32
+ "/channels/ec/compass/finder/overall/get",
33
+ json=GetFinderOverallRequest(ds=ds).to_payload(),
34
+ result_processor=response_parser(GetFinderOverallResponse),
35
+ )
36
+
37
+ @validate_request
38
+ def getfinderproductdata(self, *, ds: str) -> GetFinderProductDataResponse:
39
+ """接口英文名:getfinderproductdata
40
+
41
+ 该接口用于获取带货商品数据。
42
+
43
+ :param ds: 日期,格式YYYYMMDD。
44
+ :type ds: str
45
+ :returns: 包含 product_info 的 GetFinderProductDataResponse 对象。
46
+ :rtype: GetFinderProductDataResponse
47
+
48
+ https://developers.weixin.qq.com/doc/channels/api/channels/compass/api_getfinderproductdata.md
49
+ """
50
+ return self._request(
51
+ "POST",
52
+ "/channels/ec/compass/finder/product/data/get",
53
+ json=GetFinderProductDataRequest(ds=ds).to_payload(),
54
+ result_processor=response_parser(GetFinderProductDataResponse),
55
+ )
56
+
57
+ @validate_request
58
+ def getfinderproductlist(self, *, ds: str) -> GetFinderProductListResponse:
59
+ """接口英文名:getfinderproductlist
60
+
61
+ 该接口用于获取带货商品列表。
62
+
63
+ :param ds: 日期,格式YYYYMMDD。
64
+ :type ds: str
65
+ :returns: 包含 product_list 的 GetFinderProductListResponse 对象。
66
+ :rtype: GetFinderProductListResponse
67
+
68
+ https://developers.weixin.qq.com/doc/channels/api/channels/compass/api_getfinderproductlist.md
69
+ """
70
+ return self._request(
71
+ "POST",
72
+ "/channels/ec/compass/finder/product/list/get",
73
+ json=GetFinderProductListRequest(ds=ds).to_payload(),
74
+ result_processor=response_parser(GetFinderProductListResponse),
75
+ )
76
+
77
+ @validate_request
78
+ def getfindersaleprofiledata(
79
+ self, *, ds: str, type: int
80
+ ) -> GetFinderSaleProfileDataResponse:
81
+ """接口英文名:getfindersaleprofiledata
82
+
83
+ 该接口用于获取带货人群数据。
84
+
85
+ :param ds: 日期,格式YYYYMMDD。
86
+ :type ds: str
87
+ :param type: 用户类型,详情请参考下文。
88
+ :type type: int
89
+ :returns: GetFinderSaleProfileDataResponse 对象,业务结果位于 data,其中的字段有 field_list。
90
+ :rtype: GetFinderSaleProfileDataResponse
91
+
92
+ https://developers.weixin.qq.com/doc/channels/api/channels/compass/api_getfindersaleprofiledata.md
93
+ """
94
+ return self._request(
95
+ "POST",
96
+ "/channels/ec/compass/finder/sale/profile/data/get",
97
+ json=GetFinderSaleProfileDataRequest(ds=ds, type=type).to_payload(),
98
+ result_processor=response_parser(GetFinderSaleProfileDataResponse),
99
+ )