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.
- wechat_sdk/__init__.py +25 -0
- wechat_sdk/_transport.py +161 -0
- wechat_sdk/channels/__init__.py +6 -0
- wechat_sdk/channels/api/__init__.py +1 -0
- wechat_sdk/channels/api/_api.py +24 -0
- wechat_sdk/channels/api/basic.py +243 -0
- wechat_sdk/channels/api/compass.py +99 -0
- wechat_sdk/channels/api/leads.py +175 -0
- wechat_sdk/channels/api/leadslive.py +93 -0
- wechat_sdk/channels/api/live.py +50 -0
- wechat_sdk/channels/api/livedashboard.py +51 -0
- wechat_sdk/channels/api/locallife/__init__.py +23 -0
- wechat_sdk/channels/api/locallife/automatically.py +33 -0
- wechat_sdk/channels/api/locallife/cancel.py +52 -0
- wechat_sdk/channels/api/locallife/funds.py +92 -0
- wechat_sdk/channels/api/locallife/purchasing.py +29 -0
- wechat_sdk/channels/api/locallife/shop.py +338 -0
- wechat_sdk/channels/api/locallife/useing.py +138 -0
- wechat_sdk/channels/api/locallife/voucher.py +71 -0
- wechat_sdk/channels/api/windowproduct.py +152 -0
- wechat_sdk/channels/client.py +149 -0
- wechat_sdk/channels/exceptions/__init__.py +29 -0
- wechat_sdk/channels/models/__init__.py +0 -0
- wechat_sdk/channels/models/basic.py +20 -0
- wechat_sdk/channels/models/compass.py +138 -0
- wechat_sdk/channels/models/leads.py +154 -0
- wechat_sdk/channels/models/leadslive.py +79 -0
- wechat_sdk/channels/models/live.py +39 -0
- wechat_sdk/channels/models/livedashboard.py +280 -0
- wechat_sdk/channels/models/locallife/__init__.py +0 -0
- wechat_sdk/channels/models/locallife/_shared.py +40 -0
- wechat_sdk/channels/models/locallife/automatically.py +342 -0
- wechat_sdk/channels/models/locallife/cancel.py +33 -0
- wechat_sdk/channels/models/locallife/funds.py +85 -0
- wechat_sdk/channels/models/locallife/purchasing.py +864 -0
- wechat_sdk/channels/models/locallife/shop.py +313 -0
- wechat_sdk/channels/models/locallife/useing.py +108 -0
- wechat_sdk/channels/models/locallife/voucher.py +44 -0
- wechat_sdk/channels/models/windowproduct.py +213 -0
- wechat_sdk/channels/response_decoder.py +11 -0
- wechat_sdk/channels/result_processor.py +5 -0
- wechat_sdk/core/__init__.py +36 -0
- wechat_sdk/core/api.py +156 -0
- wechat_sdk/core/client.py +53 -0
- wechat_sdk/core/crypto.py +226 -0
- wechat_sdk/core/exceptions/__init__.py +111 -0
- wechat_sdk/core/models/__init__.py +152 -0
- wechat_sdk/core/models/account.py +161 -0
- wechat_sdk/core/request.py +69 -0
- wechat_sdk/core/response_decoder.py +61 -0
- wechat_sdk/core/responses.py +33 -0
- wechat_sdk/core/result_processor.py +54 -0
- wechat_sdk/core/session.py +100 -0
- wechat_sdk/miniapp/__init__.py +4 -0
- wechat_sdk/miniapp/api/__init__.py +1 -0
- wechat_sdk/miniapp/api/ad.py +294 -0
- wechat_sdk/miniapp/api/b2b/__init__.py +18 -0
- wechat_sdk/miniapp/api/b2b/bill.py +1174 -0
- wechat_sdk/miniapp/api/b2b/notify.py +86 -0
- wechat_sdk/miniapp/api/b2b/store_assistant.py +179 -0
- wechat_sdk/miniapp/api/charge.py +65 -0
- wechat_sdk/miniapp/api/cityservice/__init__.py +18 -0
- wechat_sdk/miniapp/api/cityservice/basic.py +215 -0
- wechat_sdk/miniapp/api/cityservice/elder_medical.py +226 -0
- wechat_sdk/miniapp/api/cityservice/medicalassistant.py +75 -0
- wechat_sdk/miniapp/api/cloudbase/__init__.py +20 -0
- wechat_sdk/miniapp/api/cloudbase/database.py +440 -0
- wechat_sdk/miniapp/api/cloudbase/functions.py +75 -0
- wechat_sdk/miniapp/api/cloudbase/others.py +339 -0
- wechat_sdk/miniapp/api/cloudbase/storage.py +109 -0
- wechat_sdk/miniapp/api/data_analysis/__init__.py +18 -0
- wechat_sdk/miniapp/api/data_analysis/others.py +179 -0
- wechat_sdk/miniapp/api/data_analysis/visit_retain.py +101 -0
- wechat_sdk/miniapp/api/data_analysis/visit_trend.py +106 -0
- wechat_sdk/miniapp/api/drama_others_api.py +296 -0
- wechat_sdk/miniapp/api/express/__init__.py +16 -0
- wechat_sdk/miniapp/api/express/express_by_business.py +540 -0
- wechat_sdk/miniapp/api/express/express_by_provider.py +420 -0
- wechat_sdk/miniapp/api/face.py +83 -0
- wechat_sdk/miniapp/api/hardware_device.py +323 -0
- wechat_sdk/miniapp/api/img_ocr/__init__.py +16 -0
- wechat_sdk/miniapp/api/img_ocr/img.py +115 -0
- wechat_sdk/miniapp/api/img_ocr/ocr.py +214 -0
- wechat_sdk/miniapp/api/immediate_delivery/__init__.py +16 -0
- wechat_sdk/miniapp/api/immediate_delivery/deliver_by_business.py +889 -0
- wechat_sdk/miniapp/api/immediate_delivery/deliver_by_provider.py +85 -0
- wechat_sdk/miniapp/api/kf_mgnt/__init__.py +16 -0
- wechat_sdk/miniapp/api/kf_mgnt/kf_management.py +150 -0
- wechat_sdk/miniapp/api/kf_mgnt/kf_message.py +437 -0
- wechat_sdk/miniapp/api/kf_work.py +77 -0
- wechat_sdk/miniapp/api/laboruse.py +68 -0
- wechat_sdk/miniapp/api/livebroadcast/__init__.py +20 -0
- wechat_sdk/miniapp/api/livebroadcast/commodity_management.py +215 -0
- wechat_sdk/miniapp/api/livebroadcast/role_management.py +101 -0
- wechat_sdk/miniapp/api/livebroadcast/studio_management.py +865 -0
- wechat_sdk/miniapp/api/livebroadcast/subscribe_management.py +70 -0
- wechat_sdk/miniapp/api/minidrama/__init__.py +26 -0
- wechat_sdk/miniapp/api/minidrama/auditdrama.py +426 -0
- wechat_sdk/miniapp/api/minidrama/authorizeapp.py +125 -0
- wechat_sdk/miniapp/api/minidrama/authorizecopyright.py +187 -0
- wechat_sdk/miniapp/api/minidrama/authorizedrama.py +167 -0
- wechat_sdk/miniapp/api/minidrama/usagedata.py +143 -0
- wechat_sdk/miniapp/api/minidrama/vod_fileupload.py +253 -0
- wechat_sdk/miniapp/api/minidrama/vod_media.py +194 -0
- wechat_sdk/miniapp/api/mp_access_token.py +74 -0
- wechat_sdk/miniapp/api/mp_message_management/__init__.py +16 -0
- wechat_sdk/miniapp/api/mp_message_management/subscribe_message.py +333 -0
- wechat_sdk/miniapp/api/mp_message_management/updatable_message.py +133 -0
- wechat_sdk/miniapp/api/nearby_poi.py +186 -0
- wechat_sdk/miniapp/api/novel/__init__.py +20 -0
- wechat_sdk/miniapp/api/novel/auth.py +213 -0
- wechat_sdk/miniapp/api/novel/business.py +611 -0
- wechat_sdk/miniapp/api/novel/other.py +40 -0
- wechat_sdk/miniapp/api/novel/preview.py +57 -0
- wechat_sdk/miniapp/api/open_api_mgnt.py +209 -0
- wechat_sdk/miniapp/api/operation.py +431 -0
- wechat_sdk/miniapp/api/order_shipping.py +488 -0
- wechat_sdk/miniapp/api/plugin_management.py +97 -0
- wechat_sdk/miniapp/api/qrcode_link/__init__.py +20 -0
- wechat_sdk/miniapp/api/qrcode_link/qr_code.py +156 -0
- wechat_sdk/miniapp/api/qrcode_link/short_link.py +46 -0
- wechat_sdk/miniapp/api/qrcode_link/url_link.py +105 -0
- wechat_sdk/miniapp/api/qrcode_link/url_scheme.py +135 -0
- wechat_sdk/miniapp/api/red_packet_cover.py +36 -0
- wechat_sdk/miniapp/api/sec_center/__init__.py +16 -0
- wechat_sdk/miniapp/api/sec_center/safety_control_capability.py +74 -0
- wechat_sdk/miniapp/api/sec_center/sec_check.py +107 -0
- wechat_sdk/miniapp/api/soter.py +40 -0
- wechat_sdk/miniapp/api/student.py +38 -0
- wechat_sdk/miniapp/api/transaction_guarantee/__init__.py +18 -0
- wechat_sdk/miniapp/api/transaction_guarantee/basic.py +57 -0
- wechat_sdk/miniapp/api/transaction_guarantee/comment.py +286 -0
- wechat_sdk/miniapp/api/transaction_guarantee/complaint.py +201 -0
- wechat_sdk/miniapp/api/user_info/__init__.py +18 -0
- wechat_sdk/miniapp/api/user_info/basic_info.py +108 -0
- wechat_sdk/miniapp/api/user_info/internet.py +55 -0
- wechat_sdk/miniapp/api/user_info/phone_number.py +42 -0
- wechat_sdk/miniapp/api/user_login.py +137 -0
- wechat_sdk/miniapp/api/virtual_payment.py +1661 -0
- wechat_sdk/miniapp/api/weixin_express/__init__.py +24 -0
- wechat_sdk/miniapp/api/weixin_express/express_msg.py +166 -0
- wechat_sdk/miniapp/api/weixin_express/express_return.py +147 -0
- wechat_sdk/miniapp/api/weixin_express/express_search.py +166 -0
- wechat_sdk/miniapp/api/weixin_express/freight.py +405 -0
- wechat_sdk/miniapp/api/weixin_express/msgpush.py +107 -0
- wechat_sdk/miniapp/api/weixin_express/same_city_distribution.py +698 -0
- wechat_sdk/miniapp/api/wx_service_market.py +82 -0
- wechat_sdk/miniapp/api/wxsearch.py +37 -0
- wechat_sdk/miniapp/base_api.py +94 -0
- wechat_sdk/miniapp/client.py +320 -0
- wechat_sdk/miniapp/events/__init__.py +191 -0
- wechat_sdk/miniapp/events/contracts.py +349 -0
- wechat_sdk/miniapp/exceptions/__init__.py +29 -0
- wechat_sdk/miniapp/models/__init__.py +0 -0
- wechat_sdk/miniapp/models/ad.py +57 -0
- wechat_sdk/miniapp/models/b2b/__init__.py +0 -0
- wechat_sdk/miniapp/models/b2b/bill.py +579 -0
- wechat_sdk/miniapp/models/b2b/notify.py +49 -0
- wechat_sdk/miniapp/models/b2b/store_assistant.py +109 -0
- wechat_sdk/miniapp/models/charge.py +72 -0
- wechat_sdk/miniapp/models/cityservice/__init__.py +0 -0
- wechat_sdk/miniapp/models/cityservice/basic.py +104 -0
- wechat_sdk/miniapp/models/cityservice/elder_medical.py +101 -0
- wechat_sdk/miniapp/models/cityservice/medicalassistant.py +18 -0
- wechat_sdk/miniapp/models/cloudbase/__init__.py +0 -0
- wechat_sdk/miniapp/models/cloudbase/database.py +163 -0
- wechat_sdk/miniapp/models/cloudbase/functions.py +27 -0
- wechat_sdk/miniapp/models/cloudbase/others.py +210 -0
- wechat_sdk/miniapp/models/cloudbase/storage.py +54 -0
- wechat_sdk/miniapp/models/data_analysis/__init__.py +0 -0
- wechat_sdk/miniapp/models/data_analysis/others.py +228 -0
- wechat_sdk/miniapp/models/data_analysis/visit_retain.py +81 -0
- wechat_sdk/miniapp/models/data_analysis/visit_trend.py +58 -0
- wechat_sdk/miniapp/models/drama_others_api.py +117 -0
- wechat_sdk/miniapp/models/express/__init__.py +0 -0
- wechat_sdk/miniapp/models/express/express_by_business.py +275 -0
- wechat_sdk/miniapp/models/express/express_by_provider.py +142 -0
- wechat_sdk/miniapp/models/face.py +42 -0
- wechat_sdk/miniapp/models/hardware_device.py +164 -0
- wechat_sdk/miniapp/models/img_ocr/__init__.py +0 -0
- wechat_sdk/miniapp/models/img_ocr/_shared.py +45 -0
- wechat_sdk/miniapp/models/img_ocr/img.py +40 -0
- wechat_sdk/miniapp/models/img_ocr/ocr.py +89 -0
- wechat_sdk/miniapp/models/immediate_delivery/__init__.py +0 -0
- wechat_sdk/miniapp/models/immediate_delivery/deliver_by_business.py +370 -0
- wechat_sdk/miniapp/models/immediate_delivery/deliver_by_provider.py +33 -0
- wechat_sdk/miniapp/models/kf_mgnt/__init__.py +0 -0
- wechat_sdk/miniapp/models/kf_mgnt/kf_management.py +89 -0
- wechat_sdk/miniapp/models/kf_mgnt/kf_message.py +162 -0
- wechat_sdk/miniapp/models/kf_work.py +24 -0
- wechat_sdk/miniapp/models/laboruse.py +17 -0
- wechat_sdk/miniapp/models/livebroadcast/__init__.py +0 -0
- wechat_sdk/miniapp/models/livebroadcast/commodity_management.py +138 -0
- wechat_sdk/miniapp/models/livebroadcast/role_management.py +48 -0
- wechat_sdk/miniapp/models/livebroadcast/studio_management.py +363 -0
- wechat_sdk/miniapp/models/livebroadcast/subscribe_management.py +41 -0
- wechat_sdk/miniapp/models/minidrama/__init__.py +0 -0
- wechat_sdk/miniapp/models/minidrama/_shared.py +25 -0
- wechat_sdk/miniapp/models/minidrama/auditdrama.py +352 -0
- wechat_sdk/miniapp/models/minidrama/authorizeapp.py +40 -0
- wechat_sdk/miniapp/models/minidrama/authorizecopyright.py +111 -0
- wechat_sdk/miniapp/models/minidrama/authorizedrama.py +75 -0
- wechat_sdk/miniapp/models/minidrama/usagedata.py +105 -0
- wechat_sdk/miniapp/models/minidrama/vod_fileupload.py +86 -0
- wechat_sdk/miniapp/models/minidrama/vod_media.py +126 -0
- wechat_sdk/miniapp/models/mp_access_token.py +6 -0
- wechat_sdk/miniapp/models/mp_message_management/__init__.py +0 -0
- wechat_sdk/miniapp/models/mp_message_management/subscribe_message.py +158 -0
- wechat_sdk/miniapp/models/mp_message_management/updatable_message.py +40 -0
- wechat_sdk/miniapp/models/nearby_poi.py +102 -0
- wechat_sdk/miniapp/models/novel/__init__.py +0 -0
- wechat_sdk/miniapp/models/novel/auth.py +122 -0
- wechat_sdk/miniapp/models/novel/business.py +314 -0
- wechat_sdk/miniapp/models/novel/other.py +13 -0
- wechat_sdk/miniapp/models/novel/preview.py +42 -0
- wechat_sdk/miniapp/models/open_api_mgnt.py +20 -0
- wechat_sdk/miniapp/models/operation.py +281 -0
- wechat_sdk/miniapp/models/order_shipping.py +270 -0
- wechat_sdk/miniapp/models/plugin_management.py +81 -0
- wechat_sdk/miniapp/models/qrcode_link/__init__.py +0 -0
- wechat_sdk/miniapp/models/qrcode_link/_shared.py +11 -0
- wechat_sdk/miniapp/models/qrcode_link/qr_code.py +63 -0
- wechat_sdk/miniapp/models/qrcode_link/short_link.py +22 -0
- wechat_sdk/miniapp/models/qrcode_link/url_link.py +72 -0
- wechat_sdk/miniapp/models/qrcode_link/url_scheme.py +73 -0
- wechat_sdk/miniapp/models/red_packet_cover.py +25 -0
- wechat_sdk/miniapp/models/sec_center/__init__.py +0 -0
- wechat_sdk/miniapp/models/sec_center/safety_control_capability.py +26 -0
- wechat_sdk/miniapp/models/sec_center/sec_check.py +66 -0
- wechat_sdk/miniapp/models/soter.py +20 -0
- wechat_sdk/miniapp/models/student.py +18 -0
- wechat_sdk/miniapp/models/transaction_guarantee/__init__.py +0 -0
- wechat_sdk/miniapp/models/transaction_guarantee/basic.py +49 -0
- wechat_sdk/miniapp/models/transaction_guarantee/comment.py +315 -0
- wechat_sdk/miniapp/models/transaction_guarantee/complaint.py +121 -0
- wechat_sdk/miniapp/models/user_info/__init__.py +0 -0
- wechat_sdk/miniapp/models/user_info/basic_info.py +42 -0
- wechat_sdk/miniapp/models/user_info/internet.py +23 -0
- wechat_sdk/miniapp/models/user_info/phone_number.py +36 -0
- wechat_sdk/miniapp/models/user_login.py +34 -0
- wechat_sdk/miniapp/models/virtual_payment.py +964 -0
- wechat_sdk/miniapp/models/weixin_express/__init__.py +0 -0
- wechat_sdk/miniapp/models/weixin_express/_shared.py +49 -0
- wechat_sdk/miniapp/models/weixin_express/express_msg.py +60 -0
- wechat_sdk/miniapp/models/weixin_express/express_return.py +45 -0
- wechat_sdk/miniapp/models/weixin_express/express_search.py +60 -0
- wechat_sdk/miniapp/models/weixin_express/freight.py +156 -0
- wechat_sdk/miniapp/models/weixin_express/msgpush.py +30 -0
- wechat_sdk/miniapp/models/weixin_express/same_city_distribution.py +411 -0
- wechat_sdk/miniapp/models/wx_service_market.py +36 -0
- wechat_sdk/miniapp/models/wxsearch.py +12 -0
- wechat_sdk/miniapp/response_decoder.py +15 -0
- wechat_sdk/miniapp/result_processor.py +23 -0
- wechat_sdk/miniapp/security.py +6 -0
- wechat_sdk/official_account/__init__.py +5 -0
- wechat_sdk/official_account/api/__init__.py +1 -0
- wechat_sdk/official_account/api/apimanage.py +145 -0
- wechat_sdk/official_account/api/base.py +154 -0
- wechat_sdk/official_account/api/customer/__init__.py +13 -0
- wechat_sdk/official_account/api/customer/message.py +227 -0
- wechat_sdk/official_account/api/customer/messctrl.py +143 -0
- wechat_sdk/official_account/api/customer/servicermanage.py +226 -0
- wechat_sdk/official_account/api/custommenu.py +207 -0
- wechat_sdk/official_account/api/draftbox/__init__.py +11 -0
- wechat_sdk/official_account/api/draftbox/draftmanage.py +238 -0
- wechat_sdk/official_account/api/draftbox/shop.py +44 -0
- wechat_sdk/official_account/api/invoice/__init__.py +18 -0
- wechat_sdk/official_account/api/invoice/auth.py +226 -0
- wechat_sdk/official_account/api/invoice/fiscal_receipt.py +142 -0
- wechat_sdk/official_account/api/invoice/name.py +127 -0
- wechat_sdk/official_account/api/invoice/platform.py +201 -0
- wechat_sdk/official_account/api/invoice/reimburser.py +149 -0
- wechat_sdk/official_account/api/leaving.py +318 -0
- wechat_sdk/official_account/api/material/__init__.py +11 -0
- wechat_sdk/official_account/api/material/permanent.py +203 -0
- wechat_sdk/official_account/api/material/temporary.py +107 -0
- wechat_sdk/official_account/api/medicalassistant.py +77 -0
- wechat_sdk/official_account/api/nontaxpay.py +527 -0
- wechat_sdk/official_account/api/notify/__init__.py +17 -0
- wechat_sdk/official_account/api/notify/autoreplies.py +34 -0
- wechat_sdk/official_account/api/notify/message.py +463 -0
- wechat_sdk/official_account/api/notify/notify.py +222 -0
- wechat_sdk/official_account/api/notify/subscribe.py +76 -0
- wechat_sdk/official_account/api/notify/template.py +221 -0
- wechat_sdk/official_account/api/onecode.py +248 -0
- wechat_sdk/official_account/api/openpoc/__init__.py +13 -0
- wechat_sdk/official_account/api/openpoc/ai.py +129 -0
- wechat_sdk/official_account/api/openpoc/image.py +82 -0
- wechat_sdk/official_account/api/openpoc/ocr.py +249 -0
- wechat_sdk/official_account/api/public.py +164 -0
- wechat_sdk/official_account/api/qrcode/__init__.py +13 -0
- wechat_sdk/official_account/api/qrcode/qrcodejump.py +169 -0
- wechat_sdk/official_account/api/qrcode/qrcodes.py +54 -0
- wechat_sdk/official_account/api/qrcode/shorten.py +64 -0
- wechat_sdk/official_account/api/stores/__init__.py +9 -0
- wechat_sdk/official_account/api/stores/miniapp.py +486 -0
- wechat_sdk/official_account/api/usermanage/__init__.py +13 -0
- wechat_sdk/official_account/api/usermanage/changeopenid.py +45 -0
- wechat_sdk/official_account/api/usermanage/tag.py +237 -0
- wechat_sdk/official_account/api/usermanage/userinfo.py +210 -0
- wechat_sdk/official_account/api/webdev/__init__.py +12 -0
- wechat_sdk/official_account/api/webdev/access.py +149 -0
- wechat_sdk/official_account/api/webdev/js.py +36 -0
- wechat_sdk/official_account/api/wedata/__init__.py +15 -0
- wechat_sdk/official_account/api/wedata/api.py +77 -0
- wechat_sdk/official_account/api/wedata/mess.py +239 -0
- wechat_sdk/official_account/api/wedata/news.py +333 -0
- wechat_sdk/official_account/api/wedata/user.py +74 -0
- wechat_sdk/official_account/base_api.py +108 -0
- wechat_sdk/official_account/client.py +189 -0
- wechat_sdk/official_account/exceptions/__init__.py +29 -0
- wechat_sdk/official_account/models/__init__.py +0 -0
- wechat_sdk/official_account/models/apimanage.py +31 -0
- wechat_sdk/official_account/models/base.py +11 -0
- wechat_sdk/official_account/models/customer/__init__.py +0 -0
- wechat_sdk/official_account/models/customer/message.py +84 -0
- wechat_sdk/official_account/models/customer/messctrl.py +53 -0
- wechat_sdk/official_account/models/customer/servicermanage.py +108 -0
- wechat_sdk/official_account/models/custommenu.py +243 -0
- wechat_sdk/official_account/models/draftbox/__init__.py +0 -0
- wechat_sdk/official_account/models/draftbox/draftmanage.py +180 -0
- wechat_sdk/official_account/models/draftbox/shop.py +25 -0
- wechat_sdk/official_account/models/invoice/__init__.py +0 -0
- wechat_sdk/official_account/models/invoice/auth.py +178 -0
- wechat_sdk/official_account/models/invoice/fiscal_receipt.py +67 -0
- wechat_sdk/official_account/models/invoice/name.py +53 -0
- wechat_sdk/official_account/models/invoice/platform.py +58 -0
- wechat_sdk/official_account/models/invoice/reimburser.py +104 -0
- wechat_sdk/official_account/models/leaving.py +112 -0
- wechat_sdk/official_account/models/material/__init__.py +0 -0
- wechat_sdk/official_account/models/material/permanent.py +127 -0
- wechat_sdk/official_account/models/material/temporary.py +18 -0
- wechat_sdk/official_account/models/medicalassistant.py +18 -0
- wechat_sdk/official_account/models/nontaxpay.py +318 -0
- wechat_sdk/official_account/models/notify/__init__.py +0 -0
- wechat_sdk/official_account/models/notify/autoreplies.py +108 -0
- wechat_sdk/official_account/models/notify/message.py +153 -0
- wechat_sdk/official_account/models/notify/notify.py +119 -0
- wechat_sdk/official_account/models/notify/subscribe.py +16 -0
- wechat_sdk/official_account/models/notify/template.py +102 -0
- wechat_sdk/official_account/models/onecode.py +143 -0
- wechat_sdk/official_account/models/openpoc/__init__.py +0 -0
- wechat_sdk/official_account/models/openpoc/_shared.py +45 -0
- wechat_sdk/official_account/models/openpoc/ai.py +37 -0
- wechat_sdk/official_account/models/openpoc/image.py +36 -0
- wechat_sdk/official_account/models/openpoc/ocr.py +113 -0
- wechat_sdk/official_account/models/public.py +124 -0
- wechat_sdk/official_account/models/qrcode/__init__.py +0 -0
- wechat_sdk/official_account/models/qrcode/qrcodejump.py +88 -0
- wechat_sdk/official_account/models/qrcode/qrcodes.py +29 -0
- wechat_sdk/official_account/models/qrcode/shorten.py +33 -0
- wechat_sdk/official_account/models/stores/__init__.py +0 -0
- wechat_sdk/official_account/models/stores/miniapp.py +349 -0
- wechat_sdk/official_account/models/usermanage/__init__.py +0 -0
- wechat_sdk/official_account/models/usermanage/_shared.py +9 -0
- wechat_sdk/official_account/models/usermanage/changeopenid.py +25 -0
- wechat_sdk/official_account/models/usermanage/tag.py +71 -0
- wechat_sdk/official_account/models/usermanage/userinfo.py +145 -0
- wechat_sdk/official_account/models/webdev/__init__.py +0 -0
- wechat_sdk/official_account/models/webdev/access.py +91 -0
- wechat_sdk/official_account/models/webdev/js.py +17 -0
- wechat_sdk/official_account/models/wedata/__init__.py +0 -0
- wechat_sdk/official_account/models/wedata/api.py +61 -0
- wechat_sdk/official_account/models/wedata/mess.py +145 -0
- wechat_sdk/official_account/models/wedata/news.py +404 -0
- wechat_sdk/official_account/models/wedata/user.py +50 -0
- wechat_sdk/official_account/response_decoder.py +19 -0
- wechat_sdk/official_account/result_processor.py +34 -0
- wechat_sdk/open_platform/__init__.py +5 -0
- wechat_sdk/open_platform/api/__init__.py +1 -0
- wechat_sdk/open_platform/api/menu.py +7 -0
- wechat_sdk/open_platform/api/message.py +7 -0
- wechat_sdk/open_platform/api/user.py +7 -0
- wechat_sdk/open_platform/client.py +118 -0
- wechat_sdk/open_platform/exceptions/__init__.py +29 -0
- wechat_sdk/open_platform/models/__init__.py +0 -0
- wechat_sdk/open_platform/models/menu.py +1 -0
- wechat_sdk/open_platform/models/message.py +1 -0
- wechat_sdk/open_platform/models/user.py +1 -0
- wechat_sdk/open_platform/parser.py +4 -0
- wechat_sdk/open_platform/response_decoder.py +5 -0
- wechat_sdk/open_platform/result_processor.py +5 -0
- wechat_sdk/pay/__init__.py +10 -0
- wechat_sdk/pay/_frontend.py +24 -0
- wechat_sdk/pay/_resource.py +74 -0
- wechat_sdk/pay/aipay/__init__.py +6 -0
- wechat_sdk/pay/aipay/exceptions/__init__.py +29 -0
- wechat_sdk/pay/aipay/models/__init__.py +0 -0
- wechat_sdk/pay/aipay/models/x402.py +11 -0
- wechat_sdk/pay/aipay/response_decoder.py +9 -0
- wechat_sdk/pay/aipay/result_processor.py +5 -0
- wechat_sdk/pay/aipay/x402.py +149 -0
- wechat_sdk/pay/api/__init__.py +43 -0
- wechat_sdk/pay/api/bill.py +112 -0
- wechat_sdk/pay/api/businesscircle/__init__.py +14 -0
- wechat_sdk/pay/api/businesscircle/parkings.py +55 -0
- wechat_sdk/pay/api/businesscircle/points.py +75 -0
- wechat_sdk/pay/api/businesscircle/user_authorizations.py +36 -0
- wechat_sdk/pay/api/businesscircle/users/__init__.py +8 -0
- wechat_sdk/pay/api/businesscircle/users/points.py +44 -0
- wechat_sdk/pay/api/certificates.py +23 -0
- wechat_sdk/pay/api/combine_transactions/__init__.py +74 -0
- wechat_sdk/pay/api/combine_transactions/app.py +69 -0
- wechat_sdk/pay/api/combine_transactions/h5.py +70 -0
- wechat_sdk/pay/api/combine_transactions/jsapi.py +77 -0
- wechat_sdk/pay/api/combine_transactions/native.py +69 -0
- wechat_sdk/pay/api/fund_app/__init__.py +8 -0
- wechat_sdk/pay/api/fund_app/mch_transfer/__init__.py +12 -0
- wechat_sdk/pay/api/fund_app/mch_transfer/elecsign.py +104 -0
- wechat_sdk/pay/api/fund_app/mch_transfer/transfer_bills.py +275 -0
- wechat_sdk/pay/api/fund_app/mch_transfer/user_confirm_authorization.py +119 -0
- wechat_sdk/pay/api/marketing/__init__.py +12 -0
- wechat_sdk/pay/api/marketing/favor/__init__.py +16 -0
- wechat_sdk/pay/api/marketing/favor/callbacks.py +65 -0
- wechat_sdk/pay/api/marketing/favor/coupon_stocks.py +110 -0
- wechat_sdk/pay/api/marketing/favor/media.py +28 -0
- wechat_sdk/pay/api/marketing/favor/stocks.py +278 -0
- wechat_sdk/pay/api/marketing/favor/users/__init__.py +8 -0
- wechat_sdk/pay/api/marketing/favor/users/coupons.py +147 -0
- wechat_sdk/pay/api/marketing/partnerships.py +101 -0
- wechat_sdk/pay/api/marketing/paygiftactivity/__init__.py +10 -0
- wechat_sdk/pay/api/marketing/paygiftactivity/activities.py +219 -0
- wechat_sdk/pay/api/marketing/paygiftactivity/unique_threshold_activity.py +73 -0
- wechat_sdk/pay/api/med_ins/__init__.py +10 -0
- wechat_sdk/pay/api/med_ins/orders.py +213 -0
- wechat_sdk/pay/api/med_ins/refunds.py +60 -0
- wechat_sdk/pay/api/merchant_service/__init__.py +12 -0
- wechat_sdk/pay/api/merchant_service/complaint_notifications.py +87 -0
- wechat_sdk/pay/api/merchant_service/complaints_v2.py +279 -0
- wechat_sdk/pay/api/merchant_service/images.py +48 -0
- wechat_sdk/pay/api/offlineface/__init__.py +16 -0
- wechat_sdk/pay/api/offlineface/authinfo.py +54 -0
- wechat_sdk/pay/api/offlineface/contracts.py +84 -0
- wechat_sdk/pay/api/offlineface/face_collections.py +68 -0
- wechat_sdk/pay/api/offlineface/repayment_url.py +35 -0
- wechat_sdk/pay/api/offlineface/transactions.py +119 -0
- wechat_sdk/pay/api/offlinefacemch/__init__.py +10 -0
- wechat_sdk/pay/api/offlinefacemch/organizations.py +146 -0
- wechat_sdk/pay/api/offlinefacemch/tokens.py +37 -0
- wechat_sdk/pay/api/order.py +5 -0
- wechat_sdk/pay/api/payscore/__init__.py +8 -0
- wechat_sdk/pay/api/payscore/serviceorder.py +393 -0
- wechat_sdk/pay/api/profitsharing/__init__.py +16 -0
- wechat_sdk/pay/api/profitsharing/bills.py +36 -0
- wechat_sdk/pay/api/profitsharing/orders.py +113 -0
- wechat_sdk/pay/api/profitsharing/receivers.py +83 -0
- wechat_sdk/pay/api/profitsharing/return_orders.py +83 -0
- wechat_sdk/pay/api/profitsharing/transactions.py +25 -0
- wechat_sdk/pay/api/refund/__init__.py +8 -0
- wechat_sdk/pay/api/refund/domestic/__init__.py +8 -0
- wechat_sdk/pay/api/refund/domestic/refunds.py +150 -0
- wechat_sdk/pay/api/security.py +43 -0
- wechat_sdk/pay/api/smartguide/__init__.py +8 -0
- wechat_sdk/pay/api/smartguide/guides.py +189 -0
- wechat_sdk/pay/api/transactions/__init__.py +86 -0
- wechat_sdk/pay/api/transactions/app.py +95 -0
- wechat_sdk/pay/api/transactions/h5.py +96 -0
- wechat_sdk/pay/api/transactions/jsapi.py +106 -0
- wechat_sdk/pay/api/transactions/native.py +98 -0
- wechat_sdk/pay/api/transactions/requests.py +11 -0
- wechat_sdk/pay/api/vehicle/__init__.py +10 -0
- wechat_sdk/pay/api/vehicle/parking/__init__.py +10 -0
- wechat_sdk/pay/api/vehicle/parking/parkings.py +59 -0
- wechat_sdk/pay/api/vehicle/parking/services.py +38 -0
- wechat_sdk/pay/api/vehicle/transactions/__init__.py +31 -0
- wechat_sdk/pay/api/vehicle/transactions/parking.py +84 -0
- wechat_sdk/pay/client.py +305 -0
- wechat_sdk/pay/exceptions/__init__.py +36 -0
- wechat_sdk/pay/frontend.py +229 -0
- wechat_sdk/pay/launch_types.py +99 -0
- wechat_sdk/pay/models/__init__.py +0 -0
- wechat_sdk/pay/models/bill.py +33 -0
- wechat_sdk/pay/models/businesscircle/__init__.py +0 -0
- wechat_sdk/pay/models/businesscircle/parkings.py +16 -0
- wechat_sdk/pay/models/businesscircle/points.py +21 -0
- wechat_sdk/pay/models/businesscircle/user_authorizations.py +18 -0
- wechat_sdk/pay/models/businesscircle/users/__init__.py +0 -0
- wechat_sdk/pay/models/businesscircle/users/points.py +15 -0
- wechat_sdk/pay/models/certificates.py +27 -0
- wechat_sdk/pay/models/combine_transactions/__init__.py +81 -0
- wechat_sdk/pay/models/combine_transactions/app.py +19 -0
- wechat_sdk/pay/models/combine_transactions/h5.py +19 -0
- wechat_sdk/pay/models/combine_transactions/jsapi.py +20 -0
- wechat_sdk/pay/models/combine_transactions/native.py +19 -0
- wechat_sdk/pay/models/fund_app/__init__.py +0 -0
- wechat_sdk/pay/models/fund_app/mch_transfer/__init__.py +0 -0
- wechat_sdk/pay/models/fund_app/mch_transfer/elecsign.py +28 -0
- wechat_sdk/pay/models/fund_app/mch_transfer/transfer_bills.py +112 -0
- wechat_sdk/pay/models/fund_app/mch_transfer/user_confirm_authorization.py +85 -0
- wechat_sdk/pay/models/marketing/__init__.py +0 -0
- wechat_sdk/pay/models/marketing/favor/__init__.py +0 -0
- wechat_sdk/pay/models/marketing/favor/callbacks.py +32 -0
- wechat_sdk/pay/models/marketing/favor/coupon_stocks.py +44 -0
- wechat_sdk/pay/models/marketing/favor/media.py +7 -0
- wechat_sdk/pay/models/marketing/favor/stocks.py +209 -0
- wechat_sdk/pay/models/marketing/favor/users/__init__.py +0 -0
- wechat_sdk/pay/models/marketing/favor/users/coupons.py +118 -0
- wechat_sdk/pay/models/marketing/partnerships.py +62 -0
- wechat_sdk/pay/models/marketing/paygiftactivity/__init__.py +0 -0
- wechat_sdk/pay/models/marketing/paygiftactivity/activities.py +218 -0
- wechat_sdk/pay/models/marketing/paygiftactivity/unique_threshold_activity.py +16 -0
- wechat_sdk/pay/models/med_ins/__init__.py +0 -0
- wechat_sdk/pay/models/med_ins/orders.py +201 -0
- wechat_sdk/pay/models/med_ins/refunds.py +19 -0
- wechat_sdk/pay/models/merchant_service/__init__.py +0 -0
- wechat_sdk/pay/models/merchant_service/complaint_notifications.py +27 -0
- wechat_sdk/pay/models/merchant_service/complaints_v2.py +368 -0
- wechat_sdk/pay/models/merchant_service/images.py +12 -0
- wechat_sdk/pay/models/notifications.py +27 -0
- wechat_sdk/pay/models/offlineface/__init__.py +0 -0
- wechat_sdk/pay/models/offlineface/authinfo.py +20 -0
- wechat_sdk/pay/models/offlineface/contracts.py +33 -0
- wechat_sdk/pay/models/offlineface/face_collections.py +39 -0
- wechat_sdk/pay/models/offlineface/repayment_url.py +13 -0
- wechat_sdk/pay/models/offlineface/transactions.py +93 -0
- wechat_sdk/pay/models/offlinefacemch/__init__.py +0 -0
- wechat_sdk/pay/models/offlinefacemch/organizations.py +60 -0
- wechat_sdk/pay/models/offlinefacemch/tokens.py +16 -0
- wechat_sdk/pay/models/order.py +5 -0
- wechat_sdk/pay/models/payscore/__init__.py +0 -0
- wechat_sdk/pay/models/payscore/serviceorder.py +379 -0
- wechat_sdk/pay/models/profitsharing/__init__.py +0 -0
- wechat_sdk/pay/models/profitsharing/bills.py +16 -0
- wechat_sdk/pay/models/profitsharing/orders.py +59 -0
- wechat_sdk/pay/models/profitsharing/receivers.py +35 -0
- wechat_sdk/pay/models/profitsharing/return_orders.py +50 -0
- wechat_sdk/pay/models/profitsharing/transactions.py +8 -0
- wechat_sdk/pay/models/refund/__init__.py +0 -0
- wechat_sdk/pay/models/refund/domestic/__init__.py +0 -0
- wechat_sdk/pay/models/refund/domestic/refunds.py +132 -0
- wechat_sdk/pay/models/security.py +20 -0
- wechat_sdk/pay/models/smartguide/__init__.py +0 -0
- wechat_sdk/pay/models/smartguide/guides.py +58 -0
- wechat_sdk/pay/models/transactions/__init__.py +76 -0
- wechat_sdk/pay/models/transactions/app.py +26 -0
- wechat_sdk/pay/models/transactions/h5.py +26 -0
- wechat_sdk/pay/models/transactions/jsapi.py +31 -0
- wechat_sdk/pay/models/transactions/native.py +26 -0
- wechat_sdk/pay/models/transactions/requests.py +56 -0
- wechat_sdk/pay/models/vehicle/__init__.py +0 -0
- wechat_sdk/pay/models/vehicle/parking/__init__.py +0 -0
- wechat_sdk/pay/models/vehicle/parking/parkings.py +29 -0
- wechat_sdk/pay/models/vehicle/parking/services.py +24 -0
- wechat_sdk/pay/models/vehicle/transactions/__init__.py +47 -0
- wechat_sdk/pay/models/vehicle/transactions/_shared.py +33 -0
- wechat_sdk/pay/models/vehicle/transactions/parking.py +60 -0
- wechat_sdk/pay/notifications.py +191 -0
- wechat_sdk/pay/response_decoder.py +63 -0
- wechat_sdk/pay/result_processor.py +46 -0
- wechat_sdk/pay/sign.py +157 -0
- wechat_sdk/pay/utils/__init__.py +1 -0
- wechat_sdk/pay/utils/_payment.py +22 -0
- wechat_sdk/pay/v2/__init__.py +3 -0
- wechat_sdk/pay/v2/_resource.py +33 -0
- wechat_sdk/pay/v2/api/__init__.py +31 -0
- wechat_sdk/pay/v2/api/downloadbill.py +69 -0
- wechat_sdk/pay/v2/api/downloadfundflow.py +75 -0
- wechat_sdk/pay/v2/api/face.py +103 -0
- wechat_sdk/pay/v2/api/mch/__init__.py +10 -0
- wechat_sdk/pay/v2/api/mch/customs.py +198 -0
- wechat_sdk/pay/v2/api/mch/newcustoms.py +105 -0
- wechat_sdk/pay/v2/api/micropay.py +109 -0
- wechat_sdk/pay/v2/api/mmpaymkttransfers.py +210 -0
- wechat_sdk/pay/v2/api/orderquery.py +85 -0
- wechat_sdk/pay/v2/api/payitil.py +90 -0
- wechat_sdk/pay/v2/api/refundquery.py +105 -0
- wechat_sdk/pay/v2/api/secapi/__init__.py +91 -0
- wechat_sdk/pay/v2/api/secapi/refund.py +113 -0
- wechat_sdk/pay/v2/api/tools/__init__.py +8 -0
- wechat_sdk/pay/v2/api/tools/authcodetoopenid.py +71 -0
- wechat_sdk/pay/v2/client.py +366 -0
- wechat_sdk/pay/v2/exceptions/__init__.py +34 -0
- wechat_sdk/pay/v2/frontend.py +127 -0
- wechat_sdk/pay/v2/models/__init__.py +0 -0
- wechat_sdk/pay/v2/models/client.py +22 -0
- wechat_sdk/pay/v2/models/downloadbill.py +1 -0
- wechat_sdk/pay/v2/models/downloadfundflow.py +1 -0
- wechat_sdk/pay/v2/models/face.py +20 -0
- wechat_sdk/pay/v2/models/mch/__init__.py +0 -0
- wechat_sdk/pay/v2/models/mch/customs.py +40 -0
- wechat_sdk/pay/v2/models/mch/newcustoms.py +23 -0
- wechat_sdk/pay/v2/models/micropay.py +33 -0
- wechat_sdk/pay/v2/models/mmpaymkttransfers.py +49 -0
- wechat_sdk/pay/v2/models/orderquery.py +35 -0
- wechat_sdk/pay/v2/models/payitil.py +9 -0
- wechat_sdk/pay/v2/models/refundquery.py +27 -0
- wechat_sdk/pay/v2/models/secapi/__init__.py +18 -0
- wechat_sdk/pay/v2/models/secapi/refund.py +31 -0
- wechat_sdk/pay/v2/models/tools/__init__.py +0 -0
- wechat_sdk/pay/v2/models/tools/authcodetoopenid.py +17 -0
- wechat_sdk/pay/v2/response_decoder.py +45 -0
- wechat_sdk/pay/v2/result_processor.py +41 -0
- wechat_sdk/py.typed +0 -0
- wechat_sdk/store/__init__.py +6 -0
- wechat_sdk/store/api/__init__.py +1 -0
- wechat_sdk/store/api/_account.py +248 -0
- wechat_sdk/store/api/_address.py +149 -0
- wechat_sdk/store/api/_api.py +88 -0
- wechat_sdk/store/api/_freight.py +143 -0
- wechat_sdk/store/api/_stock.py +173 -0
- wechat_sdk/store/api/leagueheadsupplier/__init__.py +25 -0
- wechat_sdk/store/api/leagueheadsupplier/balance.py +97 -0
- wechat_sdk/store/api/leagueheadsupplier/basic.py +9 -0
- wechat_sdk/store/api/leagueheadsupplier/category.py +27 -0
- wechat_sdk/store/api/leagueheadsupplier/headsupplier.py +125 -0
- wechat_sdk/store/api/leagueheadsupplier/opentalent/__init__.py +13 -0
- wechat_sdk/store/api/leagueheadsupplier/opentalent/getshop.py +411 -0
- wechat_sdk/store/api/leagueheadsupplier/opentalent/window.py +271 -0
- wechat_sdk/store/api/leagueheadsupplier/order.py +101 -0
- wechat_sdk/store/api/leagueheadsupplier/sharer/__init__.py +23 -0
- wechat_sdk/store/api/leagueheadsupplier/sharer/account.py +235 -0
- wechat_sdk/store/api/leagueheadsupplier/sharer/article.py +101 -0
- wechat_sdk/store/api/leagueheadsupplier/sharer/clue.py +81 -0
- wechat_sdk/store/api/leagueheadsupplier/sharer/coupon.py +283 -0
- wechat_sdk/store/api/leagueheadsupplier/sharer/getshop.py +375 -0
- wechat_sdk/store/api/leagueheadsupplier/sharer/live.py +575 -0
- wechat_sdk/store/api/leagueheadsupplier/sharer/video.py +189 -0
- wechat_sdk/store/api/leagueheadsupplier/shop.py +153 -0
- wechat_sdk/store/api/shop/__init__.py +61 -0
- wechat_sdk/store/api/shop/apimgnt/__init__.py +13 -0
- wechat_sdk/store/api/shop/apimgnt/common.py +29 -0
- wechat_sdk/store/api/shop/apimgnt/resource.py +304 -0
- wechat_sdk/store/api/shop/brand.py +234 -0
- wechat_sdk/store/api/shop/category_rule.py +92 -0
- wechat_sdk/store/api/shop/channels_shop_aftersale/__init__.py +15 -0
- wechat_sdk/store/api/shop/channels_shop_aftersale/aftersale.py +724 -0
- wechat_sdk/store/api/shop/channels_shop_aftersale/complaint.py +156 -0
- wechat_sdk/store/api/shop/channels_shop_aftersale/guarantee.py +242 -0
- wechat_sdk/store/api/shop/channels_shop_category.py +226 -0
- wechat_sdk/store/api/shop/channels_shop_delivery/__init__.py +17 -0
- wechat_sdk/store/api/shop/channels_shop_delivery/address.py +9 -0
- wechat_sdk/store/api/shop/channels_shop_delivery/delivery.py +108 -0
- wechat_sdk/store/api/shop/channels_shop_delivery/ewaybill.py +787 -0
- wechat_sdk/store/api/shop/channels_shop_delivery/merchant.py +9 -0
- wechat_sdk/store/api/shop/channels_shop_order.py +875 -0
- wechat_sdk/store/api/shop/channels_shop_product/__init__.py +19 -0
- wechat_sdk/store/api/shop/channels_shop_product/gift.py +308 -0
- wechat_sdk/store/api/shop/channels_shop_product/giftactivity.py +106 -0
- wechat_sdk/store/api/shop/channels_shop_product/limiteddiscounttask.py +192 -0
- wechat_sdk/store/api/shop/channels_shop_product/shop.py +1310 -0
- wechat_sdk/store/api/shop/channels_shop_product/stock.py +9 -0
- wechat_sdk/store/api/shop/compass.py +279 -0
- wechat_sdk/store/api/shop/coupon.py +324 -0
- wechat_sdk/store/api/shop/favorite/__init__.py +11 -0
- wechat_sdk/store/api/shop/favorite/shopfavorite.py +23 -0
- wechat_sdk/store/api/shop/funds/__init__.py +15 -0
- wechat_sdk/store/api/shop/funds/bank.py +145 -0
- wechat_sdk/store/api/shop/funds/funds.py +301 -0
- wechat_sdk/store/api/shop/funds/qrcode.py +51 -0
- wechat_sdk/store/api/shop/homepage/__init__.py +17 -0
- wechat_sdk/store/api/shop/homepage/background.py +86 -0
- wechat_sdk/store/api/shop/homepage/banner.py +91 -0
- wechat_sdk/store/api/shop/homepage/shoptype.py +55 -0
- wechat_sdk/store/api/shop/homepage/storewindow.py +119 -0
- wechat_sdk/store/api/shop/kf.py +119 -0
- wechat_sdk/store/api/shop/league/__init__.py +13 -0
- wechat_sdk/store/api/shop/league/item.py +330 -0
- wechat_sdk/store/api/shop/league/promoter.py +136 -0
- wechat_sdk/store/api/shop/miniandstore/__init__.py +13 -0
- wechat_sdk/store/api/shop/miniandstore/basic.py +87 -0
- wechat_sdk/store/api/shop/miniandstore/cooperation_gift.py +321 -0
- wechat_sdk/store/api/shop/platformkf.py +145 -0
- wechat_sdk/store/api/shop/qic.py +153 -0
- wechat_sdk/store/api/shop/storemanage.py +125 -0
- wechat_sdk/store/api/shop/subsidy/__init__.py +11 -0
- wechat_sdk/store/api/shop/subsidy/invoicing.py +137 -0
- wechat_sdk/store/api/shop/supplier/__init__.py +15 -0
- wechat_sdk/store/api/shop/supplier/auto.py +176 -0
- wechat_sdk/store/api/shop/supplier/order.py +213 -0
- wechat_sdk/store/api/shop/supplier/relation.py +69 -0
- wechat_sdk/store/api/shop/supply.py +138 -0
- wechat_sdk/store/api/shop/vip.py +107 -0
- wechat_sdk/store/api/shop/warehouse.py +381 -0
- wechat_sdk/store/api/shop/wecom.py +37 -0
- wechat_sdk/store/api/shop/wxamember/__init__.py +13 -0
- wechat_sdk/store/api/shop/wxamember/shop.py +23 -0
- wechat_sdk/store/api/shop/wxamember/wxa.py +157 -0
- wechat_sdk/store/api/supplier/__init__.py +19 -0
- wechat_sdk/store/api/supplier/account.py +23 -0
- wechat_sdk/store/api/supplier/basics.py +9 -0
- wechat_sdk/store/api/supplier/delivery/__init__.py +15 -0
- wechat_sdk/store/api/supplier/delivery/address.py +9 -0
- wechat_sdk/store/api/supplier/delivery/electronic.py +689 -0
- wechat_sdk/store/api/supplier/delivery/shipping.py +95 -0
- wechat_sdk/store/api/supplier/dropship/__init__.py +13 -0
- wechat_sdk/store/api/supplier/dropship/dropship_order.py +138 -0
- wechat_sdk/store/api/supplier/dropship/dropship_relation.py +113 -0
- wechat_sdk/store/api/supplier/supply/__init__.py +19 -0
- wechat_sdk/store/api/supplier/supply/freight_template.py +9 -0
- wechat_sdk/store/api/supplier/supply/supply_category.py +226 -0
- wechat_sdk/store/api/supplier/supply/supply_order.py +138 -0
- wechat_sdk/store/api/supplier/supply/supply_product.py +639 -0
- wechat_sdk/store/api/supplier/supply/supply_product_stock.py +9 -0
- wechat_sdk/store/api/talent/__init__.py +15 -0
- wechat_sdk/store/api/talent/basics.py +9 -0
- wechat_sdk/store/api/talent/order.py +95 -0
- wechat_sdk/store/api/talent/window.py +67 -0
- wechat_sdk/store/client.py +144 -0
- wechat_sdk/store/exceptions/__init__.py +29 -0
- wechat_sdk/store/models/__init__.py +0 -0
- wechat_sdk/store/models/_account.py +18 -0
- wechat_sdk/store/models/_address.py +70 -0
- wechat_sdk/store/models/_freight.py +158 -0
- wechat_sdk/store/models/_shared.py +49 -0
- wechat_sdk/store/models/_stock.py +164 -0
- wechat_sdk/store/models/leagueheadsupplier/__init__.py +0 -0
- wechat_sdk/store/models/leagueheadsupplier/balance.py +51 -0
- wechat_sdk/store/models/leagueheadsupplier/basic.py +7 -0
- wechat_sdk/store/models/leagueheadsupplier/category.py +146 -0
- wechat_sdk/store/models/leagueheadsupplier/headsupplier.py +117 -0
- wechat_sdk/store/models/leagueheadsupplier/opentalent/__init__.py +0 -0
- wechat_sdk/store/models/leagueheadsupplier/opentalent/getshop.py +280 -0
- wechat_sdk/store/models/leagueheadsupplier/opentalent/window.py +211 -0
- wechat_sdk/store/models/leagueheadsupplier/order.py +246 -0
- wechat_sdk/store/models/leagueheadsupplier/sharer/__init__.py +0 -0
- wechat_sdk/store/models/leagueheadsupplier/sharer/account.py +166 -0
- wechat_sdk/store/models/leagueheadsupplier/sharer/article.py +98 -0
- wechat_sdk/store/models/leagueheadsupplier/sharer/clue.py +114 -0
- wechat_sdk/store/models/leagueheadsupplier/sharer/coupon.py +246 -0
- wechat_sdk/store/models/leagueheadsupplier/sharer/getshop.py +343 -0
- wechat_sdk/store/models/leagueheadsupplier/sharer/live.py +261 -0
- wechat_sdk/store/models/leagueheadsupplier/sharer/video.py +119 -0
- wechat_sdk/store/models/leagueheadsupplier/shop.py +439 -0
- wechat_sdk/store/models/shop/__init__.py +0 -0
- wechat_sdk/store/models/shop/_shared.py +80 -0
- wechat_sdk/store/models/shop/apimgnt/__init__.py +0 -0
- wechat_sdk/store/models/shop/apimgnt/common.py +15 -0
- wechat_sdk/store/models/shop/apimgnt/resource.py +113 -0
- wechat_sdk/store/models/shop/brand.py +261 -0
- wechat_sdk/store/models/shop/category_rule.py +259 -0
- wechat_sdk/store/models/shop/channels_shop_aftersale/__init__.py +0 -0
- wechat_sdk/store/models/shop/channels_shop_aftersale/_shared.py +18 -0
- wechat_sdk/store/models/shop/channels_shop_aftersale/aftersale.py +654 -0
- wechat_sdk/store/models/shop/channels_shop_aftersale/complaint.py +94 -0
- wechat_sdk/store/models/shop/channels_shop_aftersale/guarantee.py +329 -0
- wechat_sdk/store/models/shop/channels_shop_category.py +491 -0
- wechat_sdk/store/models/shop/channels_shop_delivery/__init__.py +0 -0
- wechat_sdk/store/models/shop/channels_shop_delivery/address.py +6 -0
- wechat_sdk/store/models/shop/channels_shop_delivery/delivery.py +32 -0
- wechat_sdk/store/models/shop/channels_shop_delivery/ewaybill.py +648 -0
- wechat_sdk/store/models/shop/channels_shop_delivery/merchant.py +13 -0
- wechat_sdk/store/models/shop/channels_shop_order.py +1183 -0
- wechat_sdk/store/models/shop/channels_shop_product/__init__.py +0 -0
- wechat_sdk/store/models/shop/channels_shop_product/_shared.py +10 -0
- wechat_sdk/store/models/shop/channels_shop_product/gift.py +236 -0
- wechat_sdk/store/models/shop/channels_shop_product/giftactivity.py +42 -0
- wechat_sdk/store/models/shop/channels_shop_product/limiteddiscounttask.py +127 -0
- wechat_sdk/store/models/shop/channels_shop_product/shop.py +945 -0
- wechat_sdk/store/models/shop/channels_shop_product/stock.py +6 -0
- wechat_sdk/store/models/shop/compass.py +370 -0
- wechat_sdk/store/models/shop/coupon.py +228 -0
- wechat_sdk/store/models/shop/favorite/__init__.py +0 -0
- wechat_sdk/store/models/shop/favorite/shopfavorite.py +12 -0
- wechat_sdk/store/models/shop/funds/__init__.py +0 -0
- wechat_sdk/store/models/shop/funds/bank.py +98 -0
- wechat_sdk/store/models/shop/funds/funds.py +344 -0
- wechat_sdk/store/models/shop/funds/qrcode.py +27 -0
- wechat_sdk/store/models/shop/homepage/__init__.py +0 -0
- wechat_sdk/store/models/shop/homepage/background.py +32 -0
- wechat_sdk/store/models/shop/homepage/banner.py +88 -0
- wechat_sdk/store/models/shop/homepage/shoptype.py +47 -0
- wechat_sdk/store/models/shop/homepage/storewindow.py +44 -0
- wechat_sdk/store/models/shop/kf.py +40 -0
- wechat_sdk/store/models/shop/league/__init__.py +0 -0
- wechat_sdk/store/models/shop/league/_shared.py +11 -0
- wechat_sdk/store/models/shop/league/item.py +230 -0
- wechat_sdk/store/models/shop/league/promoter.py +112 -0
- wechat_sdk/store/models/shop/miniandstore/__init__.py +0 -0
- wechat_sdk/store/models/shop/miniandstore/basic.py +38 -0
- wechat_sdk/store/models/shop/miniandstore/cooperation_gift.py +225 -0
- wechat_sdk/store/models/shop/platformkf.py +176 -0
- wechat_sdk/store/models/shop/qic.py +171 -0
- wechat_sdk/store/models/shop/storemanage.py +68 -0
- wechat_sdk/store/models/shop/subsidy/__init__.py +0 -0
- wechat_sdk/store/models/shop/subsidy/invoicing.py +72 -0
- wechat_sdk/store/models/shop/supplier/__init__.py +0 -0
- wechat_sdk/store/models/shop/supplier/auto.py +78 -0
- wechat_sdk/store/models/shop/supplier/order.py +488 -0
- wechat_sdk/store/models/shop/supplier/relation.py +34 -0
- wechat_sdk/store/models/shop/supply.py +334 -0
- wechat_sdk/store/models/shop/vip.py +78 -0
- wechat_sdk/store/models/shop/warehouse.py +172 -0
- wechat_sdk/store/models/shop/wecom.py +23 -0
- wechat_sdk/store/models/shop/wxamember/__init__.py +0 -0
- wechat_sdk/store/models/shop/wxamember/shop.py +35 -0
- wechat_sdk/store/models/shop/wxamember/wxa.py +70 -0
- wechat_sdk/store/models/supplier/__init__.py +0 -0
- wechat_sdk/store/models/supplier/account.py +24 -0
- wechat_sdk/store/models/supplier/basics.py +7 -0
- wechat_sdk/store/models/supplier/delivery/__init__.py +0 -0
- wechat_sdk/store/models/supplier/delivery/address.py +6 -0
- wechat_sdk/store/models/supplier/delivery/electronic.py +560 -0
- wechat_sdk/store/models/supplier/delivery/shipping.py +22 -0
- wechat_sdk/store/models/supplier/dropship/__init__.py +0 -0
- wechat_sdk/store/models/supplier/dropship/dropship_order.py +298 -0
- wechat_sdk/store/models/supplier/dropship/dropship_relation.py +48 -0
- wechat_sdk/store/models/supplier/supply/__init__.py +0 -0
- wechat_sdk/store/models/supplier/supply/_shared.py +43 -0
- wechat_sdk/store/models/supplier/supply/freight_template.py +13 -0
- wechat_sdk/store/models/supplier/supply/supply_category.py +491 -0
- wechat_sdk/store/models/supplier/supply/supply_order.py +373 -0
- wechat_sdk/store/models/supplier/supply/supply_product.py +646 -0
- wechat_sdk/store/models/supplier/supply/supply_product_stock.py +6 -0
- wechat_sdk/store/models/talent/__init__.py +0 -0
- wechat_sdk/store/models/talent/basics.py +7 -0
- wechat_sdk/store/models/talent/order.py +122 -0
- wechat_sdk/store/models/talent/window.py +81 -0
- wechat_sdk/store/response_decoder.py +15 -0
- wechat_sdk/store/result_processor.py +5 -0
- wechat_sdk/work/__init__.py +1 -0
- wechat_sdk/work/api/__init__.py +7 -0
- wechat_sdk/work/api/contact.py +7 -0
- wechat_sdk/work/api/message.py +7 -0
- wechat_sdk/work/client.py +113 -0
- wechat_sdk/work/crypto.py +4 -0
- wechat_sdk/work/exceptions/__init__.py +29 -0
- wechat_sdk/work/models/__init__.py +0 -0
- wechat_sdk/work/models/contact.py +1 -0
- wechat_sdk/work/models/message.py +1 -0
- wechat_sdk/work/response_decoder.py +5 -0
- wechat_sdk/work/result_processor.py +5 -0
- wechat_sdk_python-0.1.0.dist-info/METADATA +250 -0
- wechat_sdk_python-0.1.0.dist-info/RECORD +826 -0
- {wechat_sdk_python-0.0.1.dist-info → wechat_sdk_python-0.1.0.dist-info}/WHEEL +2 -1
- wechat_sdk_python-0.1.0.dist-info/top_level.txt +1 -0
- wechat_py/__init__.py +0 -6
- wechat_py/client.py +0 -58
- wechat_py/exceptions.py +0 -18
- wechat_sdk_python-0.0.1.dist-info/METADATA +0 -91
- wechat_sdk_python-0.0.1.dist-info/RECORD +0 -7
- {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
|
+
]
|
wechat_sdk/_transport.py
ADDED
|
@@ -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 @@
|
|
|
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
|
+
)
|