node-easywechat 2.9.1 → 3.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +20 -283
- package/dist/Core/Cache/FileCache.d.ts +6 -5
- package/dist/Core/Cache/FileCache.js +5 -5
- package/dist/Core/Config.d.ts +66 -0
- package/dist/Core/Config.js +117 -0
- package/dist/Core/Contracts/AccessTokenInterface.d.ts +13 -0
- package/dist/Core/Contracts/AccessTokenInterface.js +28 -0
- package/dist/Core/Contracts/CacheInterface.d.ts +28 -5
- package/dist/Core/Contracts/CacheInterface.js +31 -18
- package/dist/Core/Contracts/ConfigInterface.d.ts +29 -0
- package/dist/Core/Contracts/ConfigInterface.js +34 -0
- package/dist/Core/Contracts/ObjectAccessInterface.d.ts +31 -0
- package/dist/Core/Contracts/ObjectAccessInterface.js +33 -0
- package/dist/Core/Contracts/RefreshableAccessTokenInterface.d.ts +9 -0
- package/dist/{OfficialAccount/Server/Guard.js → Core/Contracts/RefreshableAccessTokenInterface.js} +9 -8
- package/dist/Core/Contracts/ServerInterface.d.ts +8 -0
- package/dist/Core/Contracts/ServerInterface.js +20 -0
- package/dist/Core/Encryptor.d.ts +29 -3
- package/dist/Core/Encryptor.js +37 -12
- package/dist/Core/Http/Contracts/MessageInterface.d.ts +69 -0
- package/dist/Core/Http/Contracts/MessageInterface.js +70 -0
- package/dist/Core/Http/Contracts/RequestInterface.d.ts +37 -0
- package/dist/Core/Http/Contracts/RequestInterface.js +42 -0
- package/dist/Core/Http/Contracts/ResponseInterface.d.ts +21 -0
- package/dist/Core/Http/Contracts/ResponseInterface.js +26 -0
- package/dist/Core/Http/Contracts/ServerRequestInterface.d.ts +78 -0
- package/dist/Core/Http/Contracts/ServerRequestInterface.js +83 -0
- package/dist/Core/Http/Minxins/MessageMixin.d.ts +24 -0
- package/dist/Core/Http/Minxins/MessageMixin.js +93 -0
- package/dist/Core/Http/Minxins/RequestMixin.d.ts +12 -0
- package/dist/Core/Http/Minxins/RequestMixin.js +30 -0
- package/dist/Core/Http/Request.d.ts +8 -25
- package/dist/Core/Http/Request.js +12 -177
- package/dist/Core/Http/Response.d.ts +11 -12
- package/dist/Core/Http/Response.js +30 -26
- package/dist/Core/Http/ServerRequest.d.ts +47 -0
- package/dist/Core/Http/ServerRequest.js +136 -0
- package/dist/Core/HttpClient/AccessTokenAwareClient.d.ts +19 -0
- package/dist/Core/HttpClient/AccessTokenAwareClient.js +47 -0
- package/dist/Core/HttpClient/Contracts/AccessTokenAwareHttpClientInterface.d.ts +9 -0
- package/dist/Core/HttpClient/Contracts/AccessTokenAwareHttpClientInterface.js +13 -0
- package/dist/Core/HttpClient/Contracts/HttpClientInterface.d.ts +18 -0
- package/dist/Core/HttpClient/Contracts/HttpClientInterface.js +29 -0
- package/dist/Core/HttpClient/Contracts/HttpClientResponseInterface.d.ts +35 -0
- package/dist/Core/HttpClient/Contracts/HttpClientResponseInterface.js +37 -0
- package/dist/Core/HttpClient/HttpClient.d.ts +20 -0
- package/dist/Core/HttpClient/HttpClient.js +92 -0
- package/dist/Core/HttpClient/HttpClientResponse.d.ts +76 -0
- package/dist/Core/HttpClient/HttpClientResponse.js +171 -0
- package/dist/Core/HttpClient/Mixins/HttpClientMethodsMixin.d.ts +48 -0
- package/dist/Core/HttpClient/Mixins/HttpClientMethodsMixin.js +88 -0
- package/dist/Core/Message.d.ts +144 -0
- package/dist/Core/Message.js +74 -0
- package/dist/Core/Mixins/CacheMixin.d.ts +40 -0
- package/dist/Core/Mixins/CacheMixin.js +63 -0
- package/dist/Core/Mixins/ClientMixin.d.ts +16 -0
- package/dist/Core/Mixins/ClientMixin.js +21 -0
- package/dist/Core/Mixins/ConfigMixin.d.ts +16 -0
- package/dist/Core/Mixins/ConfigMixin.js +21 -0
- package/dist/Core/Mixins/DecryptXmlMessageMixin.d.ts +11 -0
- package/dist/Core/Mixins/DecryptXmlMessageMixin.js +38 -0
- package/dist/Core/Mixins/HandlersMixin.d.ts +79 -0
- package/dist/Core/Mixins/HandlersMixin.js +163 -0
- package/dist/Core/Mixins/HasAttributesMixin.d.ts +46 -0
- package/dist/Core/Mixins/HasAttributesMixin.js +75 -0
- package/dist/Core/Mixins/HttpClientMixin.d.ts +26 -0
- package/dist/Core/Mixins/HttpClientMixin.js +45 -0
- package/dist/Core/Mixins/ResponseXmlMessageMixin.d.ts +13 -0
- package/dist/Core/Mixins/ResponseXmlMessageMixin.js +63 -0
- package/dist/Core/Mixins/ServerRequestMixin.d.ts +16 -0
- package/dist/Core/Mixins/ServerRequestMixin.js +21 -0
- package/dist/Core/{AES.d.ts → Support/AES.d.ts} +0 -0
- package/dist/Core/{AES.js → Support/AES.js} +0 -0
- package/dist/Core/Support/Obj.d.ts +62 -0
- package/dist/Core/Support/Obj.js +136 -0
- package/dist/Core/{PKCS.d.ts → Support/PKCS.d.ts} +2 -1
- package/dist/Core/{PKCS.js → Support/PKCS.js} +1 -3
- package/dist/Core/{RSA.d.ts → Support/RSA.d.ts} +2 -1
- package/dist/Core/{RSA.js → Support/RSA.js} +1 -2
- package/dist/Core/Support/Utils.d.ts +89 -0
- package/dist/Core/{Utils.js → Support/Utils.js} +84 -40
- package/dist/OfficialAccount/AccessToken.d.ts +26 -0
- package/dist/OfficialAccount/AccessToken.js +83 -0
- package/dist/OfficialAccount/Account.d.ts +13 -0
- package/dist/OfficialAccount/Account.js +29 -0
- package/dist/OfficialAccount/Application.d.ts +70 -66
- package/dist/OfficialAccount/Application.js +146 -222
- package/dist/OfficialAccount/Config.d.ts +5 -0
- package/dist/OfficialAccount/Config.js +14 -0
- package/dist/OfficialAccount/Contracts/AccountInterface.d.ts +23 -0
- package/dist/OfficialAccount/Contracts/AccountInterface.js +25 -0
- package/dist/OfficialAccount/Contracts/ApplicationInterface.d.ts +87 -0
- package/dist/OfficialAccount/Contracts/ApplicationInterface.js +76 -0
- package/dist/OfficialAccount/JsApiTicket.d.ts +23 -0
- package/dist/OfficialAccount/JsApiTicket.js +76 -0
- package/dist/OfficialAccount/Message.d.ts +4 -0
- package/dist/OfficialAccount/Message.js +8 -0
- package/dist/OfficialAccount/Server.d.ts +43 -0
- package/dist/OfficialAccount/Server.js +96 -0
- package/dist/OfficialAccount/Utils.d.ts +7 -0
- package/dist/{Work/MiniProgram/Auth/AuthClient.js → OfficialAccount/Utils.js} +14 -13
- package/dist/Types/global.d.ts +343 -0
- package/official_account.access_token.mock-access_token-appid.cache +1 -0
- package/official_account.jsapi_ticket.mock-ticket-appid.cache +1 -0
- package/package.json +13 -13
- package/dist/BaseService/Application.d.ts +0 -17
- package/dist/BaseService/Application.js +0 -46
- package/dist/BaseService/ContentSecurity/ContentSecurityClient.d.ts +0 -16
- package/dist/BaseService/ContentSecurity/ContentSecurityClient.js +0 -47
- package/dist/BaseService/Jssdk/JssdkClient.d.ts +0 -52
- package/dist/BaseService/Jssdk/JssdkClient.js +0 -128
- package/dist/BaseService/Media/MediaClient.d.ts +0 -57
- package/dist/BaseService/Media/MediaClient.js +0 -151
- package/dist/BaseService/Qrcode/QrcodeClient.d.ts +0 -28
- package/dist/BaseService/Qrcode/QrcodeClient.js +0 -79
- package/dist/BaseService/Url/UrlClient.d.ts +0 -9
- package/dist/BaseService/Url/UrlClient.js +0 -24
- package/dist/Core/BaseAccessToken.d.ts +0 -89
- package/dist/Core/BaseAccessToken.js +0 -206
- package/dist/Core/BaseApplication.d.ts +0 -72
- package/dist/Core/BaseApplication.js +0 -138
- package/dist/Core/BaseClient.d.ts +0 -20
- package/dist/Core/BaseClient.js +0 -109
- package/dist/Core/Contracts/RequestInterface.d.ts +0 -10
- package/dist/Core/Contracts/RequestInterface.js +0 -30
- package/dist/Core/Decorators/FinallResult.d.ts +0 -4
- package/dist/Core/Decorators/FinallResult.js +0 -8
- package/dist/Core/Decorators/TerminateResult.d.ts +0 -4
- package/dist/Core/Decorators/TerminateResult.js +0 -8
- package/dist/Core/Http/StreamResponse.d.ts +0 -6
- package/dist/Core/Http/StreamResponse.js +0 -40
- package/dist/Core/Messages/Article.d.ts +0 -7
- package/dist/Core/Messages/Article.js +0 -31
- package/dist/Core/Messages/Card.d.ts +0 -6
- package/dist/Core/Messages/Card.js +0 -15
- package/dist/Core/Messages/DeviceEvent.d.ts +0 -5
- package/dist/Core/Messages/DeviceEvent.js +0 -19
- package/dist/Core/Messages/DeviceText.d.ts +0 -6
- package/dist/Core/Messages/DeviceText.js +0 -27
- package/dist/Core/Messages/File.d.ts +0 -4
- package/dist/Core/Messages/File.js +0 -12
- package/dist/Core/Messages/Image.d.ts +0 -4
- package/dist/Core/Messages/Image.js +0 -12
- package/dist/Core/Messages/InteractiveTaskCard.d.ts +0 -8
- package/dist/Core/Messages/InteractiveTaskCard.js +0 -22
- package/dist/Core/Messages/Link.d.ts +0 -5
- package/dist/Core/Messages/Link.js +0 -17
- package/dist/Core/Messages/Location.d.ts +0 -5
- package/dist/Core/Messages/Location.js +0 -19
- package/dist/Core/Messages/Markdown.d.ts +0 -5
- package/dist/Core/Messages/Markdown.js +0 -15
- package/dist/Core/Messages/Media.d.ts +0 -8
- package/dist/Core/Messages/Media.js +0 -31
- package/dist/Core/Messages/Message.d.ts +0 -47
- package/dist/Core/Messages/Message.js +0 -133
- package/dist/Core/Messages/MiniProgramNotice.d.ts +0 -5
- package/dist/Core/Messages/MiniProgramNotice.js +0 -16
- package/dist/Core/Messages/MiniProgramPage.d.ts +0 -6
- package/dist/Core/Messages/MiniProgramPage.js +0 -23
- package/dist/Core/Messages/Music.d.ts +0 -7
- package/dist/Core/Messages/Music.js +0 -39
- package/dist/Core/Messages/News.d.ts +0 -9
- package/dist/Core/Messages/News.js +0 -47
- package/dist/Core/Messages/NewsItem.d.ts +0 -7
- package/dist/Core/Messages/NewsItem.js +0 -34
- package/dist/Core/Messages/Raw.d.ts +0 -9
- package/dist/Core/Messages/Raw.js +0 -26
- package/dist/Core/Messages/ReplyInteractiveTaskCard.d.ts +0 -10
- package/dist/Core/Messages/ReplyInteractiveTaskCard.js +0 -25
- package/dist/Core/Messages/ShortVideo.d.ts +0 -4
- package/dist/Core/Messages/ShortVideo.js +0 -12
- package/dist/Core/Messages/TaskCard.d.ts +0 -5
- package/dist/Core/Messages/TaskCard.js +0 -19
- package/dist/Core/Messages/Text.d.ts +0 -7
- package/dist/Core/Messages/Text.js +0 -20
- package/dist/Core/Messages/TextCard.d.ts +0 -5
- package/dist/Core/Messages/TextCard.js +0 -17
- package/dist/Core/Messages/Transfer.d.ts +0 -7
- package/dist/Core/Messages/Transfer.js +0 -22
- package/dist/Core/Messages/Video.d.ts +0 -7
- package/dist/Core/Messages/Video.js +0 -33
- package/dist/Core/Messages/Voice.d.ts +0 -5
- package/dist/Core/Messages/Voice.js +0 -16
- package/dist/Core/Messages/index.d.ts +0 -24
- package/dist/Core/Messages/index.js +0 -36
- package/dist/Core/Mixins/HttpMixin.d.ts +0 -4
- package/dist/Core/Mixins/HttpMixin.js +0 -57
- package/dist/Core/ServerGuard.d.ts +0 -54
- package/dist/Core/ServerGuard.js +0 -288
- package/dist/Core/Types.d.ts +0 -237
- package/dist/Core/Types.js +0 -3
- package/dist/Core/Utils.d.ts +0 -31
- package/dist/MicroMerchant/Application.d.ts +0 -27
- package/dist/MicroMerchant/Application.js +0 -105
- package/dist/MicroMerchant/Base/MicroMerchantBase.d.ts +0 -7
- package/dist/MicroMerchant/Base/MicroMerchantBase.js +0 -52
- package/dist/MicroMerchant/Certficates/CertficatesClient.d.ts +0 -5
- package/dist/MicroMerchant/Certficates/CertficatesClient.js +0 -52
- package/dist/MicroMerchant/Core/BaseClient.d.ts +0 -9
- package/dist/MicroMerchant/Core/BaseClient.js +0 -106
- package/dist/MicroMerchant/Media/MediaClient.d.ts +0 -6
- package/dist/MicroMerchant/Media/MediaClient.js +0 -33
- package/dist/MicroMerchant/MerchantConfig/MerchantConfigClient.d.ts +0 -8
- package/dist/MicroMerchant/MerchantConfig/MerchantConfigClient.js +0 -49
- package/dist/MicroMerchant/Meterial/MeterialClient.d.ts +0 -5
- package/dist/MicroMerchant/Meterial/MeterialClient.js +0 -30
- package/dist/MicroMerchant/Withdraw/WithdrawClient.d.ts +0 -5
- package/dist/MicroMerchant/Withdraw/WithdrawClient.js +0 -28
- package/dist/MiniProgram/ActivityMessage/ActivityMessageClient.d.ts +0 -6
- package/dist/MiniProgram/ActivityMessage/ActivityMessageClient.js +0 -42
- package/dist/MiniProgram/AppCode/AppCodeClient.d.ts +0 -22
- package/dist/MiniProgram/AppCode/AppCodeClient.js +0 -79
- package/dist/MiniProgram/Application.d.ts +0 -83
- package/dist/MiniProgram/Application.js +0 -238
- package/dist/MiniProgram/Auth/AccessToken.d.ts +0 -5
- package/dist/MiniProgram/Auth/AccessToken.js +0 -31
- package/dist/MiniProgram/Auth/AuthClient.d.ts +0 -8
- package/dist/MiniProgram/Auth/AuthClient.js +0 -22
- package/dist/MiniProgram/Base/MiniProgramBase.d.ts +0 -9
- package/dist/MiniProgram/Base/MiniProgramBase.js +0 -21
- package/dist/MiniProgram/Broadcast/BroadcastClient.d.ts +0 -40
- package/dist/MiniProgram/Broadcast/BroadcastClient.js +0 -141
- package/dist/MiniProgram/DataCube/DataCubeClient.d.ts +0 -70
- package/dist/MiniProgram/DataCube/DataCubeClient.js +0 -116
- package/dist/MiniProgram/Encryptor.d.ts +0 -4
- package/dist/MiniProgram/Encryptor.js +0 -23
- package/dist/MiniProgram/Express/ExpressClient.d.ts +0 -47
- package/dist/MiniProgram/Express/ExpressClient.js +0 -80
- package/dist/MiniProgram/Live/LiveClient.d.ts +0 -5
- package/dist/MiniProgram/Live/LiveClient.js +0 -23
- package/dist/MiniProgram/NearbyPoi/NearbyPoiClient.d.ts +0 -31
- package/dist/MiniProgram/NearbyPoi/NearbyPoiClient.js +0 -67
- package/dist/MiniProgram/OpenData/OpenDataClient.d.ts +0 -7
- package/dist/MiniProgram/OpenData/OpenDataClient.js +0 -46
- package/dist/MiniProgram/PhoneNumber/PhoneNumberClient.d.ts +0 -10
- package/dist/MiniProgram/PhoneNumber/PhoneNumberClient.js +0 -20
- package/dist/MiniProgram/Plugin/PluginClient.d.ts +0 -17
- package/dist/MiniProgram/Plugin/PluginClient.js +0 -37
- package/dist/MiniProgram/Plugin/PluginDevClient.d.ts +0 -23
- package/dist/MiniProgram/Plugin/PluginDevClient.js +0 -49
- package/dist/MiniProgram/RealtimeLog/RealtimeLogClient.d.ts +0 -11
- package/dist/MiniProgram/RealtimeLog/RealtimeLogClient.js +0 -25
- package/dist/MiniProgram/RiskControl/RiskControlClient.d.ts +0 -4
- package/dist/MiniProgram/RiskControl/RiskControlClient.js +0 -12
- package/dist/MiniProgram/Search/SearchClient.d.ts +0 -4
- package/dist/MiniProgram/Search/SearchClient.js +0 -14
- package/dist/MiniProgram/Shop/AccoutClient.d.ts +0 -25
- package/dist/MiniProgram/Shop/AccoutClient.js +0 -42
- package/dist/MiniProgram/Shop/AftersaleClient.d.ts +0 -22
- package/dist/MiniProgram/Shop/AftersaleClient.js +0 -35
- package/dist/MiniProgram/Shop/BasicClient.d.ts +0 -39
- package/dist/MiniProgram/Shop/BasicClient.js +0 -69
- package/dist/MiniProgram/Shop/DeliveryClient.d.ts +0 -20
- package/dist/MiniProgram/Shop/DeliveryClient.js +0 -32
- package/dist/MiniProgram/Shop/OrderClient.d.ts +0 -32
- package/dist/MiniProgram/Shop/OrderClient.js +0 -51
- package/dist/MiniProgram/Shop/RegisterClient.d.ts +0 -25
- package/dist/MiniProgram/Shop/RegisterClient.js +0 -43
- package/dist/MiniProgram/Shop/SpuClient.d.ts +0 -67
- package/dist/MiniProgram/Shop/SpuClient.js +0 -92
- package/dist/MiniProgram/ShortLink/ShortLinkClient.d.ts +0 -11
- package/dist/MiniProgram/ShortLink/ShortLinkClient.js +0 -23
- package/dist/MiniProgram/Soter/SoterClient.d.ts +0 -10
- package/dist/MiniProgram/Soter/SoterClient.js +0 -22
- package/dist/MiniProgram/SubscribeMessage/SubscribeMessageClient.d.ts +0 -50
- package/dist/MiniProgram/SubscribeMessage/SubscribeMessageClient.js +0 -122
- package/dist/MiniProgram/TemplateMessage/TemplateMessageClient.d.ts +0 -18
- package/dist/MiniProgram/TemplateMessage/TemplateMessageClient.js +0 -50
- package/dist/MiniProgram/UniformMessage/UniformMessageClient.d.ts +0 -26
- package/dist/MiniProgram/UniformMessage/UniformMessageClient.js +0 -68
- package/dist/MiniProgram/Union/UnionClient.d.ts +0 -16
- package/dist/MiniProgram/Union/UnionClient.js +0 -69
- package/dist/MiniProgram/UrlLink/UrlLinkClient.d.ts +0 -9
- package/dist/MiniProgram/UrlLink/UrlLinkClient.js +0 -17
- package/dist/MiniProgram/UrlScheme/UrlSchemeClient.d.ts +0 -4
- package/dist/MiniProgram/UrlScheme/UrlSchemeClient.js +0 -12
- package/dist/OfficialAccount/Auth/AccessToken.d.ts +0 -5
- package/dist/OfficialAccount/Auth/AccessToken.js +0 -31
- package/dist/OfficialAccount/AutoReply/AutoReplyClient.d.ts +0 -7
- package/dist/OfficialAccount/AutoReply/AutoReplyClient.js +0 -15
- package/dist/OfficialAccount/Base/OfficialAccountBase.d.ts +0 -13
- package/dist/OfficialAccount/Base/OfficialAccountBase.js +0 -38
- package/dist/OfficialAccount/Broadcasting/BroadcastingClient.d.ts +0 -158
- package/dist/OfficialAccount/Broadcasting/BroadcastingClient.js +0 -233
- package/dist/OfficialAccount/Broadcasting/MessageBuilder.d.ts +0 -14
- package/dist/OfficialAccount/Broadcasting/MessageBuilder.js +0 -63
- package/dist/OfficialAccount/Card/BoardingPassClient.d.ts +0 -4
- package/dist/OfficialAccount/Card/BoardingPassClient.js +0 -12
- package/dist/OfficialAccount/Card/Card.d.ts +0 -17
- package/dist/OfficialAccount/Card/Card.js +0 -31
- package/dist/OfficialAccount/Card/Client.d.ts +0 -108
- package/dist/OfficialAccount/Card/Client.js +0 -218
- package/dist/OfficialAccount/Card/CodeClient.d.ts +0 -51
- package/dist/OfficialAccount/Card/CodeClient.js +0 -100
- package/dist/OfficialAccount/Card/CoinClient.d.ts +0 -10
- package/dist/OfficialAccount/Card/CoinClient.js +0 -41
- package/dist/OfficialAccount/Card/GeneralCardClient.d.ts +0 -19
- package/dist/OfficialAccount/Card/GeneralCardClient.js +0 -34
- package/dist/OfficialAccount/Card/JssdkClient.d.ts +0 -6
- package/dist/OfficialAccount/Card/JssdkClient.js +0 -67
- package/dist/OfficialAccount/Card/MeetingTicketClient.d.ts +0 -8
- package/dist/OfficialAccount/Card/MeetingTicketClient.js +0 -16
- package/dist/OfficialAccount/Card/MemberCardClient.d.ts +0 -35
- package/dist/OfficialAccount/Card/MemberCardClient.js +0 -62
- package/dist/OfficialAccount/Card/MovieTicketClient.d.ts +0 -8
- package/dist/OfficialAccount/Card/MovieTicketClient.js +0 -16
- package/dist/OfficialAccount/Card/SubMerchantClient.d.ts +0 -26
- package/dist/OfficialAccount/Card/SubMerchantClient.js +0 -73
- package/dist/OfficialAccount/Comment/CommentClient.d.ts +0 -60
- package/dist/OfficialAccount/Comment/CommentClient.js +0 -115
- package/dist/OfficialAccount/CustomerService/CustomerServiceClient.d.ts +0 -15
- package/dist/OfficialAccount/CustomerService/CustomerServiceClient.js +0 -78
- package/dist/OfficialAccount/CustomerService/CustomerServiceSession.d.ts +0 -8
- package/dist/OfficialAccount/CustomerService/CustomerServiceSession.js +0 -36
- package/dist/OfficialAccount/CustomerService/Messenger.d.ts +0 -18
- package/dist/OfficialAccount/CustomerService/Messenger.js +0 -62
- package/dist/OfficialAccount/DataCube/DataCubeClient.d.ts +0 -135
- package/dist/OfficialAccount/DataCube/DataCubeClient.js +0 -203
- package/dist/OfficialAccount/Device/DeviceClient.d.ts +0 -15
- package/dist/OfficialAccount/Device/DeviceClient.js +0 -70
- package/dist/OfficialAccount/Goods/GoodsClient.d.ts +0 -30
- package/dist/OfficialAccount/Goods/GoodsClient.js +0 -60
- package/dist/OfficialAccount/Material/MaterialClient.d.ts +0 -67
- package/dist/OfficialAccount/Material/MaterialClient.js +0 -193
- package/dist/OfficialAccount/Menu/MenuClient.d.ts +0 -27
- package/dist/OfficialAccount/Menu/MenuClient.js +0 -58
- package/dist/OfficialAccount/OCR/OCRClient.d.ts +0 -40
- package/dist/OfficialAccount/OCR/OCRClient.js +0 -85
- package/dist/OfficialAccount/POI/POIClient.d.ts +0 -39
- package/dist/OfficialAccount/POI/POIClient.js +0 -87
- package/dist/OfficialAccount/Semantic/SemanticClient.d.ts +0 -10
- package/dist/OfficialAccount/Semantic/SemanticClient.js +0 -24
- package/dist/OfficialAccount/Server/Guard.d.ts +0 -4
- package/dist/OfficialAccount/ShakeAround/Client.d.ts +0 -23
- package/dist/OfficialAccount/ShakeAround/Client.js +0 -43
- package/dist/OfficialAccount/ShakeAround/DeviceClient.d.ts +0 -51
- package/dist/OfficialAccount/ShakeAround/DeviceClient.js +0 -100
- package/dist/OfficialAccount/ShakeAround/GroupClient.d.ts +0 -44
- package/dist/OfficialAccount/ShakeAround/GroupClient.js +0 -84
- package/dist/OfficialAccount/ShakeAround/MaterialClient.d.ts +0 -9
- package/dist/OfficialAccount/ShakeAround/MaterialClient.js +0 -21
- package/dist/OfficialAccount/ShakeAround/PageClient.d.ts +0 -30
- package/dist/OfficialAccount/ShakeAround/PageClient.js +0 -56
- package/dist/OfficialAccount/ShakeAround/RelationClient.d.ts +0 -21
- package/dist/OfficialAccount/ShakeAround/RelationClient.js +0 -44
- package/dist/OfficialAccount/ShakeAround/ShakeAround.d.ts +0 -14
- package/dist/OfficialAccount/ShakeAround/ShakeAround.js +0 -25
- package/dist/OfficialAccount/ShakeAround/StatsClient.d.ts +0 -29
- package/dist/OfficialAccount/ShakeAround/StatsClient.js +0 -57
- package/dist/OfficialAccount/Store/StoreClient.d.ts +0 -63
- package/dist/OfficialAccount/Store/StoreClient.js +0 -104
- package/dist/OfficialAccount/SubscribeMessage/SubscribeMessageClient.d.ts +0 -39
- package/dist/OfficialAccount/SubscribeMessage/SubscribeMessageClient.js +0 -116
- package/dist/OfficialAccount/TemplateMessage/TemplateMessageClient.d.ts +0 -42
- package/dist/OfficialAccount/TemplateMessage/TemplateMessageClient.js +0 -114
- package/dist/OfficialAccount/User/TagClient.d.ts +0 -46
- package/dist/OfficialAccount/User/TagClient.js +0 -92
- package/dist/OfficialAccount/User/UserClient.d.ts +0 -47
- package/dist/OfficialAccount/User/UserClient.js +0 -95
- package/dist/OpenPlatform/Application.d.ts +0 -88
- package/dist/OpenPlatform/Application.js +0 -223
- package/dist/OpenPlatform/Auth/AccessToken.d.ts +0 -7
- package/dist/OpenPlatform/Auth/AccessToken.js +0 -33
- package/dist/OpenPlatform/Auth/VerifyTicket.d.ts +0 -8
- package/dist/OpenPlatform/Auth/VerifyTicket.js +0 -40
- package/dist/OpenPlatform/Authorizer/Aggregate/Account/Client.d.ts +0 -21
- package/dist/OpenPlatform/Authorizer/Aggregate/Account/Client.js +0 -45
- package/dist/OpenPlatform/Authorizer/Auth/AccessToken.d.ts +0 -12
- package/dist/OpenPlatform/Authorizer/Auth/AccessToken.js +0 -43
- package/dist/OpenPlatform/Authorizer/MiniProgram/Account/AccountClient.d.ts +0 -21
- package/dist/OpenPlatform/Authorizer/MiniProgram/Account/AccountClient.js +0 -42
- package/dist/OpenPlatform/Authorizer/MiniProgram/Application.d.ts +0 -15
- package/dist/OpenPlatform/Authorizer/MiniProgram/Application.js +0 -42
- package/dist/OpenPlatform/Authorizer/MiniProgram/Auth/Client.d.ts +0 -11
- package/dist/OpenPlatform/Authorizer/MiniProgram/Auth/Client.js +0 -39
- package/dist/OpenPlatform/Authorizer/MiniProgram/Code/CodeClient.d.ts +0 -85
- package/dist/OpenPlatform/Authorizer/MiniProgram/Code/CodeClient.js +0 -152
- package/dist/OpenPlatform/Authorizer/MiniProgram/Domain/DomainClient.d.ts +0 -14
- package/dist/OpenPlatform/Authorizer/MiniProgram/Domain/DomainClient.js +0 -27
- package/dist/OpenPlatform/Authorizer/MiniProgram/Setting/SettingClient.d.ts +0 -72
- package/dist/OpenPlatform/Authorizer/MiniProgram/Setting/SettingClient.js +0 -133
- package/dist/OpenPlatform/Authorizer/MiniProgram/Tester/TesterClient.d.ts +0 -17
- package/dist/OpenPlatform/Authorizer/MiniProgram/Tester/TesterClient.js +0 -35
- package/dist/OpenPlatform/Authorizer/OfficialAccount/Account/Client.d.ts +0 -18
- package/dist/OpenPlatform/Authorizer/OfficialAccount/Account/Client.js +0 -38
- package/dist/OpenPlatform/Authorizer/OfficialAccount/Application.d.ts +0 -7
- package/dist/OpenPlatform/Authorizer/OfficialAccount/Application.js +0 -22
- package/dist/OpenPlatform/Authorizer/OfficialAccount/MiniProgram/MiniProgramClient.d.ts +0 -19
- package/dist/OpenPlatform/Authorizer/OfficialAccount/MiniProgram/MiniProgramClient.js +0 -37
- package/dist/OpenPlatform/Authorizer/Server/Guard.d.ts +0 -4
- package/dist/OpenPlatform/Authorizer/Server/Guard.js +0 -13
- package/dist/OpenPlatform/Base/OpenPlatformBase.d.ts +0 -40
- package/dist/OpenPlatform/Base/OpenPlatformBase.js +0 -83
- package/dist/OpenPlatform/CodeTemplate/CodeTemplateClient.d.ts +0 -23
- package/dist/OpenPlatform/CodeTemplate/CodeTemplateClient.js +0 -48
- package/dist/OpenPlatform/Component/ComponentClient.d.ts +0 -15
- package/dist/OpenPlatform/Component/ComponentClient.js +0 -33
- package/dist/OpenPlatform/Server/OpenPlatformGuard.d.ts +0 -11
- package/dist/OpenPlatform/Server/OpenPlatformGuard.js +0 -54
- package/dist/OpenWork/Application.d.ts +0 -37
- package/dist/OpenWork/Application.js +0 -128
- package/dist/OpenWork/Auth/ProviderAccessToken.d.ts +0 -8
- package/dist/OpenWork/Auth/ProviderAccessToken.js +0 -33
- package/dist/OpenWork/Auth/SuiteAccessToken.d.ts +0 -8
- package/dist/OpenWork/Auth/SuiteAccessToken.js +0 -34
- package/dist/OpenWork/Auth/SuiteTicket.d.ts +0 -8
- package/dist/OpenWork/Auth/SuiteTicket.js +0 -40
- package/dist/OpenWork/Corp/CorpClient.d.ts +0 -72
- package/dist/OpenWork/Corp/CorpClient.js +0 -150
- package/dist/OpenWork/MiniProgram/MiniProgramClient.d.ts +0 -5
- package/dist/OpenWork/MiniProgram/MiniProgramClient.js +0 -18
- package/dist/OpenWork/Provider/ProviderClient.d.ts +0 -81
- package/dist/OpenWork/Provider/ProviderClient.js +0 -172
- package/dist/OpenWork/Server/OpenWorkGuard.d.ts +0 -13
- package/dist/OpenWork/Server/OpenWorkGuard.js +0 -51
- package/dist/OpenWork/Work/Application.d.ts +0 -5
- package/dist/OpenWork/Work/Application.js +0 -22
- package/dist/OpenWork/Work/Auth/AccessToken.d.ts +0 -12
- package/dist/OpenWork/Work/Auth/AccessToken.js +0 -44
- package/dist/Payment/Application.d.ts +0 -76
- package/dist/Payment/Application.js +0 -199
- package/dist/Payment/Base/PaymentBase.d.ts +0 -13
- package/dist/Payment/Base/PaymentBase.js +0 -40
- package/dist/Payment/Bill/BillClient.d.ts +0 -10
- package/dist/Payment/Bill/BillClient.js +0 -43
- package/dist/Payment/Core/BaseClient.d.ts +0 -17
- package/dist/Payment/Core/BaseClient.js +0 -116
- package/dist/Payment/Coupon/CouponClient.d.ts +0 -6
- package/dist/Payment/Coupon/CouponClient.js +0 -37
- package/dist/Payment/Jssdk/JssdkClient.d.ts +0 -38
- package/dist/Payment/Jssdk/JssdkClient.js +0 -122
- package/dist/Payment/Merchant/MerchantClient.d.ts +0 -7
- package/dist/Payment/Merchant/MerchantClient.js +0 -40
- package/dist/Payment/Notify/Handler.d.ts +0 -25
- package/dist/Payment/Notify/Handler.js +0 -96
- package/dist/Payment/Notify/Paid.d.ts +0 -6
- package/dist/Payment/Notify/Paid.js +0 -32
- package/dist/Payment/Notify/Refunded.d.ts +0 -7
- package/dist/Payment/Notify/Refunded.js +0 -39
- package/dist/Payment/Notify/Scanned.d.ts +0 -9
- package/dist/Payment/Notify/Scanned.js +0 -54
- package/dist/Payment/Order/OrderClient.d.ts +0 -25
- package/dist/Payment/Order/OrderClient.js +0 -76
- package/dist/Payment/ProfitSharing/ProfitSharingClient.d.ts +0 -10
- package/dist/Payment/ProfitSharing/ProfitSharingClient.js +0 -59
- package/dist/Payment/Redpack/RedpackClient.d.ts +0 -23
- package/dist/Payment/Redpack/RedpackClient.js +0 -73
- package/dist/Payment/Refund/RefundClient.d.ts +0 -43
- package/dist/Payment/Refund/RefundClient.js +0 -80
- package/dist/Payment/Reverse/ReverseClient.d.ts +0 -14
- package/dist/Payment/Reverse/ReverseClient.js +0 -30
- package/dist/Payment/Sandbox/SandboxClient.d.ts +0 -8
- package/dist/Payment/Sandbox/SandboxClient.js +0 -40
- package/dist/Payment/Security/SecurityClient.d.ts +0 -7
- package/dist/Payment/Security/SecurityClient.js +0 -18
- package/dist/Payment/Transfer/TransferClient.d.ts +0 -23
- package/dist/Payment/Transfer/TransferClient.js +0 -78
- package/dist/Work/Agent/AgentClient.d.ts +0 -6
- package/dist/Work/Agent/AgentClient.js +0 -25
- package/dist/Work/Agent/WorkbenchClient.d.ts +0 -24
- package/dist/Work/Agent/WorkbenchClient.js +0 -39
- package/dist/Work/Application.d.ts +0 -78
- package/dist/Work/Application.js +0 -258
- package/dist/Work/Auth/AccessToken.d.ts +0 -5
- package/dist/Work/Auth/AccessToken.js +0 -36
- package/dist/Work/Base/WorkBase.d.ts +0 -4
- package/dist/Work/Base/WorkBase.js +0 -12
- package/dist/Work/Calendar/CalendarClient.d.ts +0 -7
- package/dist/Work/Calendar/CalendarClient.js +0 -32
- package/dist/Work/Chat/ChatClient.d.ts +0 -7
- package/dist/Work/Chat/ChatClient.js +0 -27
- package/dist/Work/CorpGroup/CorpGroupClient.d.ts +0 -40
- package/dist/Work/CorpGroup/CorpGroupClient.js +0 -68
- package/dist/Work/Department/DepartmentClient.d.ts +0 -7
- package/dist/Work/Department/DepartmentClient.js +0 -29
- package/dist/Work/ExternalContact/Client.d.ts +0 -222
- package/dist/Work/ExternalContact/Client.js +0 -365
- package/dist/Work/ExternalContact/ContactWayClient.d.ts +0 -44
- package/dist/Work/ExternalContact/ContactWayClient.js +0 -82
- package/dist/Work/ExternalContact/MessageClient.d.ts +0 -58
- package/dist/Work/ExternalContact/MessageClient.js +0 -158
- package/dist/Work/ExternalContact/MessageTemplateClient.d.ts +0 -14
- package/dist/Work/ExternalContact/MessageTemplateClient.js +0 -78
- package/dist/Work/ExternalContact/MomentClient.d.ts +0 -61
- package/dist/Work/ExternalContact/MomentClient.js +0 -104
- package/dist/Work/ExternalContact/SchoolClient.d.ts +0 -28
- package/dist/Work/ExternalContact/SchoolClient.js +0 -177
- package/dist/Work/ExternalContact/StatisticsClient.d.ts +0 -28
- package/dist/Work/ExternalContact/StatisticsClient.js +0 -52
- package/dist/Work/GroupRobot/GroupRobotClient.d.ts +0 -7
- package/dist/Work/GroupRobot/GroupRobotClient.js +0 -18
- package/dist/Work/GroupRobot/Messages/Image.d.ts +0 -6
- package/dist/Work/GroupRobot/Messages/Image.js +0 -15
- package/dist/Work/GroupRobot/Messages/Markdown.d.ts +0 -6
- package/dist/Work/GroupRobot/Messages/Markdown.js +0 -14
- package/dist/Work/GroupRobot/Messages/Message.d.ts +0 -3
- package/dist/Work/GroupRobot/Messages/Message.js +0 -7
- package/dist/Work/GroupRobot/Messages/News.d.ts +0 -8
- package/dist/Work/GroupRobot/Messages/News.js +0 -29
- package/dist/Work/GroupRobot/Messages/NewsItem.d.ts +0 -6
- package/dist/Work/GroupRobot/Messages/NewsItem.js +0 -20
- package/dist/Work/GroupRobot/Messages/Text.d.ts +0 -8
- package/dist/Work/GroupRobot/Messages/Text.js +0 -24
- package/dist/Work/GroupRobot/Messages/index.d.ts +0 -6
- package/dist/Work/GroupRobot/Messages/index.js +0 -18
- package/dist/Work/GroupRobot/Messenger.d.ts +0 -11
- package/dist/Work/GroupRobot/Messenger.js +0 -39
- package/dist/Work/Invoice/InvoiceClient.d.ts +0 -7
- package/dist/Work/Invoice/InvoiceClient.js +0 -38
- package/dist/Work/Jssdk/JssdkClient.d.ts +0 -21
- package/dist/Work/Jssdk/JssdkClient.js +0 -106
- package/dist/Work/Kf/KfAccountClient.d.ts +0 -41
- package/dist/Work/Kf/KfAccountClient.js +0 -71
- package/dist/Work/Kf/KfMessageClient.d.ts +0 -44
- package/dist/Work/Kf/KfMessageClient.js +0 -73
- package/dist/Work/Kf/KfServicerClient.d.ts +0 -26
- package/dist/Work/Kf/KfServicerClient.js +0 -47
- package/dist/Work/Live/LiveClient.d.ts +0 -6
- package/dist/Work/Live/LiveClient.js +0 -32
- package/dist/Work/Media/MediaClient.d.ts +0 -52
- package/dist/Work/Media/MediaClient.js +0 -124
- package/dist/Work/Menu/MenuClient.d.ts +0 -6
- package/dist/Work/Menu/MenuClient.js +0 -24
- package/dist/Work/Message/MessageClient.d.ts +0 -7
- package/dist/Work/Message/MessageClient.js +0 -16
- package/dist/Work/Message/Messenger.d.ts +0 -18
- package/dist/Work/Message/Messenger.js +0 -69
- package/dist/Work/MiniProgram/Application.d.ts +0 -7
- package/dist/Work/MiniProgram/Application.js +0 -26
- package/dist/Work/MiniProgram/Auth/AuthClient.d.ts +0 -8
- package/dist/Work/MsgAudit/MsgAuditClient.d.ts +0 -7
- package/dist/Work/MsgAudit/MsgAuditClient.js +0 -32
- package/dist/Work/OA/OAClient.d.ts +0 -11
- package/dist/Work/OA/OAClient.js +0 -67
- package/dist/Work/Schedule/ScheduleClient.d.ts +0 -8
- package/dist/Work/Schedule/ScheduleClient.js +0 -39
- package/dist/Work/Server/Guard.d.ts +0 -6
- package/dist/Work/Server/Guard.js +0 -34
- package/dist/Work/User/TagClient.d.ts +0 -13
- package/dist/Work/User/TagClient.js +0 -53
- package/dist/Work/User/UserClient.d.ts +0 -16
- package/dist/Work/User/UserClient.js +0 -80
- package/dist/index.d.ts +0 -119
- package/dist/index.js +0 -86
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import BaseClient from '../../Core/BaseClient';
|
|
2
|
-
import { Message } from '../../Core/Messages';
|
|
3
|
-
export default class BroadcastingClient extends BaseClient {
|
|
4
|
-
PREVIEW_BY_OPENID: string;
|
|
5
|
-
PREVIEW_BY_NAME: string;
|
|
6
|
-
protected send(message?: object): Promise<any>;
|
|
7
|
-
protected preview(message?: object): Promise<any>;
|
|
8
|
-
/**
|
|
9
|
-
* 删除群发消息
|
|
10
|
-
* @param msgId 消息id
|
|
11
|
-
*/
|
|
12
|
-
delete(msgId: string): Promise<any>;
|
|
13
|
-
/**
|
|
14
|
-
* 查询群发消息发送状态
|
|
15
|
-
* @param msgId 消息id
|
|
16
|
-
*/
|
|
17
|
-
status(msgId: string): Promise<any>;
|
|
18
|
-
/**
|
|
19
|
-
* 发送消息
|
|
20
|
-
* @param {Message} message 消息实例
|
|
21
|
-
* @param {Number|Array<string>} reception 数字表示标签id,或openid列表,或null表示全部,默认:null
|
|
22
|
-
* @param {object} attributes 附加参数
|
|
23
|
-
*/
|
|
24
|
-
sendMessage(message: Message, reception?: any, attributes?: object): Promise<any>;
|
|
25
|
-
/**
|
|
26
|
-
* 发送文本消息
|
|
27
|
-
* @param {string} message 文本
|
|
28
|
-
* @param {Number|Array<string>} reception 数字表示标签id,或openid列表,或null表示全部,默认:null
|
|
29
|
-
* @param {object} attributes 附加参数
|
|
30
|
-
*/
|
|
31
|
-
sendText(message: string, reception?: any, attributes?: object): Promise<any>;
|
|
32
|
-
/**
|
|
33
|
-
* 发送图文消息
|
|
34
|
-
* @param {string} mediaId 素材id
|
|
35
|
-
* @param {Number|Array<string>} reception 数字表示标签id,或openid列表,或null表示全部,默认:null
|
|
36
|
-
* @param {object} attributes 附加参数
|
|
37
|
-
*/
|
|
38
|
-
sendNews(mediaId: string, reception?: any, attributes?: object): Promise<any>;
|
|
39
|
-
/**
|
|
40
|
-
* 发送语音消息
|
|
41
|
-
* @param {string} mediaId 素材id
|
|
42
|
-
* @param {Number|Array<string>} reception 数字表示标签id,或openid列表,或null表示全部,默认:null
|
|
43
|
-
* @param {object} attributes 附加参数
|
|
44
|
-
*/
|
|
45
|
-
sendVoice(mediaId: string, reception?: any, attributes?: object): Promise<any>;
|
|
46
|
-
/**
|
|
47
|
-
* 发送视频消息
|
|
48
|
-
* @param {string} mediaId 素材id
|
|
49
|
-
* @param {Number|Array<string>} reception 数字表示标签id,或openid列表,或null表示全部,默认:null
|
|
50
|
-
* @param {object} attributes 附加参数
|
|
51
|
-
*/
|
|
52
|
-
sendVideo(mediaId: string, reception?: any, attributes?: object): Promise<any>;
|
|
53
|
-
/**
|
|
54
|
-
* 发送图片消息
|
|
55
|
-
* @param {string} mediaId 素材id
|
|
56
|
-
* @param {Number|Array<string>} reception 数字表示标签id,或openid列表,或null表示全部,默认:null
|
|
57
|
-
* @param {object} attributes 附加参数
|
|
58
|
-
*/
|
|
59
|
-
sendImage(mediaId: string, reception?: any, attributes?: object): Promise<any>;
|
|
60
|
-
/**
|
|
61
|
-
* 发送卡券消息
|
|
62
|
-
* @param {string} cardId 卡券id
|
|
63
|
-
* @param {Number|Array<string>} reception 数字表示标签id,或openid列表,或null表示全部,默认:null
|
|
64
|
-
* @param {object} attributes 附加参数
|
|
65
|
-
*/
|
|
66
|
-
sendCard(cardId: string, reception?: any, attributes?: object): Promise<any>;
|
|
67
|
-
/**
|
|
68
|
-
* 发送卡券消息预览给指定openId
|
|
69
|
-
* @param {Message} message 消息实例
|
|
70
|
-
* @param {string} reception openid
|
|
71
|
-
* @param {object} attributes 附加参数
|
|
72
|
-
*/
|
|
73
|
-
previewMessage(message: Message, reception: string, method?: string): Promise<any>;
|
|
74
|
-
/**
|
|
75
|
-
* 发送文本消息预览给指定openId
|
|
76
|
-
* @param {string} message 文本
|
|
77
|
-
* @param {string} reception openid
|
|
78
|
-
* @param {object} attributes 附加参数
|
|
79
|
-
*/
|
|
80
|
-
previewText(message: string, reception: string, method?: string): Promise<any>;
|
|
81
|
-
/**
|
|
82
|
-
* 发送图文消息预览给指定openId
|
|
83
|
-
* @param {string} mediaId 素材id
|
|
84
|
-
* @param {string} reception openid
|
|
85
|
-
* @param {object} attributes 附加参数
|
|
86
|
-
*/
|
|
87
|
-
previewNews(mediaId: string, reception: string, method?: string): Promise<any>;
|
|
88
|
-
/**
|
|
89
|
-
* 发送语音消息预览给指定openId
|
|
90
|
-
* @param {string} mediaId 素材id
|
|
91
|
-
* @param {string} reception openid
|
|
92
|
-
* @param {object} attributes 附加参数
|
|
93
|
-
*/
|
|
94
|
-
previewVoice(mediaId: string, reception: string, method?: string): Promise<any>;
|
|
95
|
-
/**
|
|
96
|
-
* 发送视频消息预览给指定openId
|
|
97
|
-
* @param {string} mediaId 素材id
|
|
98
|
-
* @param {string} reception openid
|
|
99
|
-
* @param {object} attributes 附加参数
|
|
100
|
-
*/
|
|
101
|
-
previewVideo(mediaId: string, reception: string, method?: string): Promise<any>;
|
|
102
|
-
/**
|
|
103
|
-
* 发送图片消息预览给指定openId
|
|
104
|
-
* @param {string} mediaId 素材id
|
|
105
|
-
* @param {string} reception openid
|
|
106
|
-
* @param {object} attributes 附加参数
|
|
107
|
-
*/
|
|
108
|
-
previewImage(mediaId: string, reception: string, method?: string): Promise<any>;
|
|
109
|
-
/**
|
|
110
|
-
* 发送卡券消息预览给指定openId
|
|
111
|
-
* @param {string} cardId 卡券id
|
|
112
|
-
* @param {string} reception openid
|
|
113
|
-
* @param {object} attributes 附加参数
|
|
114
|
-
*/
|
|
115
|
-
previewCard(cardId: string, reception: string, method?: string): Promise<any>;
|
|
116
|
-
/**
|
|
117
|
-
* 发送文本消息预览给指定微信号
|
|
118
|
-
* @param {string} mediaId 文本
|
|
119
|
-
* @param {string} reception 微信号
|
|
120
|
-
* @param {object} attributes 附加参数
|
|
121
|
-
*/
|
|
122
|
-
previewTextByName(message: string, reception: string): Promise<any>;
|
|
123
|
-
/**
|
|
124
|
-
* 发送图文消息预览给指定微信号
|
|
125
|
-
* @param {string} mediaId 素材id
|
|
126
|
-
* @param {string} reception 微信号
|
|
127
|
-
* @param {object} attributes 附加参数
|
|
128
|
-
*/
|
|
129
|
-
previewNewsByName(mediaId: string, reception: string): Promise<any>;
|
|
130
|
-
/**
|
|
131
|
-
* 发送语音消息预览给指定微信号
|
|
132
|
-
* @param {string} mediaId 素材id
|
|
133
|
-
* @param {string} reception 微信号
|
|
134
|
-
* @param {object} attributes 附加参数
|
|
135
|
-
*/
|
|
136
|
-
previewVoiceByName(mediaId: string, reception: string): Promise<any>;
|
|
137
|
-
/**
|
|
138
|
-
* 发送视频消息预览给指定微信号
|
|
139
|
-
* @param {string} mediaId 素材id
|
|
140
|
-
* @param {string} reception 微信号
|
|
141
|
-
* @param {object} attributes 附加参数
|
|
142
|
-
*/
|
|
143
|
-
previewVideoByName(mediaId: string, reception: string): Promise<any>;
|
|
144
|
-
/**
|
|
145
|
-
* 发送图片消息预览给指定微信号
|
|
146
|
-
* @param {string} mediaId 素材id
|
|
147
|
-
* @param {string} reception 微信号
|
|
148
|
-
* @param {object} attributes 附加参数
|
|
149
|
-
*/
|
|
150
|
-
previewImageByName(mediaId: string, reception: string): Promise<any>;
|
|
151
|
-
/**
|
|
152
|
-
* 发送卡券消息预览给指定微信号
|
|
153
|
-
* @param {string} cardId 卡券id
|
|
154
|
-
* @param {string} reception 微信号
|
|
155
|
-
* @param {object} attributes 附加参数
|
|
156
|
-
*/
|
|
157
|
-
previewCardByName(cardId: string, reception: string): Promise<any>;
|
|
158
|
-
}
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const BaseClient_1 = __importDefault(require("../../Core/BaseClient"));
|
|
7
|
-
const Messages_1 = require("../../Core/Messages");
|
|
8
|
-
const MessageBuilder_1 = __importDefault(require("./MessageBuilder"));
|
|
9
|
-
const Utils_1 = require("../../Core/Utils");
|
|
10
|
-
class BroadcastingClient extends BaseClient_1.default {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
this.PREVIEW_BY_OPENID = 'touser';
|
|
14
|
-
this.PREVIEW_BY_NAME = 'towxname';
|
|
15
|
-
}
|
|
16
|
-
send(message = {}) {
|
|
17
|
-
if (!message['filter'] && !message['touser']) {
|
|
18
|
-
throw new Error('The message reception object is not specified.');
|
|
19
|
-
}
|
|
20
|
-
let api = message && message['touser'] ? 'cgi-bin/message/mass/send' : 'cgi-bin/message/mass/sendall';
|
|
21
|
-
return this.httpPostJson(api, message);
|
|
22
|
-
}
|
|
23
|
-
preview(message = {}) {
|
|
24
|
-
return this.httpPostJson('cgi-bin/message/mass/preview', message);
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* 删除群发消息
|
|
28
|
-
* @param msgId 消息id
|
|
29
|
-
*/
|
|
30
|
-
delete(msgId) {
|
|
31
|
-
return this.httpPostJson('cgi-bin/message/mass/delete', {
|
|
32
|
-
msg_id: msgId,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* 查询群发消息发送状态
|
|
37
|
-
* @param msgId 消息id
|
|
38
|
-
*/
|
|
39
|
-
status(msgId) {
|
|
40
|
-
return this.httpPostJson('cgi-bin/message/mass/get', {
|
|
41
|
-
msg_id: msgId,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* 发送消息
|
|
46
|
-
* @param {Message} message 消息实例
|
|
47
|
-
* @param {Number|Array<string>} reception 数字表示标签id,或openid列表,或null表示全部,默认:null
|
|
48
|
-
* @param {object} attributes 附加参数
|
|
49
|
-
*/
|
|
50
|
-
sendMessage(message, reception = null, attributes = {}) {
|
|
51
|
-
let msg = (new MessageBuilder_1.default).message(message).with(attributes).toAll();
|
|
52
|
-
if ((0, Utils_1.isNumber)(reception) && reception > 0) {
|
|
53
|
-
msg.toTag(reception);
|
|
54
|
-
}
|
|
55
|
-
else if ((0, Utils_1.isArray)(reception)) {
|
|
56
|
-
msg.toUsers(reception);
|
|
57
|
-
}
|
|
58
|
-
return this.send(msg.build());
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* 发送文本消息
|
|
62
|
-
* @param {string} message 文本
|
|
63
|
-
* @param {Number|Array<string>} reception 数字表示标签id,或openid列表,或null表示全部,默认:null
|
|
64
|
-
* @param {object} attributes 附加参数
|
|
65
|
-
*/
|
|
66
|
-
sendText(message, reception = null, attributes = {}) {
|
|
67
|
-
return this.sendMessage(new Messages_1.Text(message), reception, attributes);
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* 发送图文消息
|
|
71
|
-
* @param {string} mediaId 素材id
|
|
72
|
-
* @param {Number|Array<string>} reception 数字表示标签id,或openid列表,或null表示全部,默认:null
|
|
73
|
-
* @param {object} attributes 附加参数
|
|
74
|
-
*/
|
|
75
|
-
sendNews(mediaId, reception = null, attributes = {}) {
|
|
76
|
-
return this.sendMessage(new Messages_1.Media(mediaId, 'mpnews'), reception, attributes);
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* 发送语音消息
|
|
80
|
-
* @param {string} mediaId 素材id
|
|
81
|
-
* @param {Number|Array<string>} reception 数字表示标签id,或openid列表,或null表示全部,默认:null
|
|
82
|
-
* @param {object} attributes 附加参数
|
|
83
|
-
*/
|
|
84
|
-
sendVoice(mediaId, reception = null, attributes = {}) {
|
|
85
|
-
return this.sendMessage(new Messages_1.Media(mediaId, 'voice'), reception, attributes);
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* 发送视频消息
|
|
89
|
-
* @param {string} mediaId 素材id
|
|
90
|
-
* @param {Number|Array<string>} reception 数字表示标签id,或openid列表,或null表示全部,默认:null
|
|
91
|
-
* @param {object} attributes 附加参数
|
|
92
|
-
*/
|
|
93
|
-
sendVideo(mediaId, reception = null, attributes = {}) {
|
|
94
|
-
return this.sendMessage(new Messages_1.Media(mediaId, 'mpvideo'), reception, attributes);
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* 发送图片消息
|
|
98
|
-
* @param {string} mediaId 素材id
|
|
99
|
-
* @param {Number|Array<string>} reception 数字表示标签id,或openid列表,或null表示全部,默认:null
|
|
100
|
-
* @param {object} attributes 附加参数
|
|
101
|
-
*/
|
|
102
|
-
sendImage(mediaId, reception = null, attributes = {}) {
|
|
103
|
-
return this.sendMessage(new Messages_1.Image(mediaId), reception, attributes);
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* 发送卡券消息
|
|
107
|
-
* @param {string} cardId 卡券id
|
|
108
|
-
* @param {Number|Array<string>} reception 数字表示标签id,或openid列表,或null表示全部,默认:null
|
|
109
|
-
* @param {object} attributes 附加参数
|
|
110
|
-
*/
|
|
111
|
-
sendCard(cardId, reception = null, attributes = {}) {
|
|
112
|
-
return this.sendMessage(new Messages_1.Card(cardId), reception, attributes);
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* 发送卡券消息预览给指定openId
|
|
116
|
-
* @param {Message} message 消息实例
|
|
117
|
-
* @param {string} reception openid
|
|
118
|
-
* @param {object} attributes 附加参数
|
|
119
|
-
*/
|
|
120
|
-
previewMessage(message, reception, method = this.PREVIEW_BY_OPENID) {
|
|
121
|
-
let msg = (new MessageBuilder_1.default).message(message).buildForPreview(method, reception);
|
|
122
|
-
return this.preview(msg);
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* 发送文本消息预览给指定openId
|
|
126
|
-
* @param {string} message 文本
|
|
127
|
-
* @param {string} reception openid
|
|
128
|
-
* @param {object} attributes 附加参数
|
|
129
|
-
*/
|
|
130
|
-
previewText(message, reception, method = this.PREVIEW_BY_OPENID) {
|
|
131
|
-
return this.previewMessage(new Messages_1.Text(message), reception, method);
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* 发送图文消息预览给指定openId
|
|
135
|
-
* @param {string} mediaId 素材id
|
|
136
|
-
* @param {string} reception openid
|
|
137
|
-
* @param {object} attributes 附加参数
|
|
138
|
-
*/
|
|
139
|
-
previewNews(mediaId, reception, method = this.PREVIEW_BY_OPENID) {
|
|
140
|
-
return this.previewMessage(new Messages_1.Media(mediaId, 'mpnews'), reception, method);
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* 发送语音消息预览给指定openId
|
|
144
|
-
* @param {string} mediaId 素材id
|
|
145
|
-
* @param {string} reception openid
|
|
146
|
-
* @param {object} attributes 附加参数
|
|
147
|
-
*/
|
|
148
|
-
previewVoice(mediaId, reception, method = this.PREVIEW_BY_OPENID) {
|
|
149
|
-
return this.previewMessage(new Messages_1.Media(mediaId, 'voice'), reception, method);
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* 发送视频消息预览给指定openId
|
|
153
|
-
* @param {string} mediaId 素材id
|
|
154
|
-
* @param {string} reception openid
|
|
155
|
-
* @param {object} attributes 附加参数
|
|
156
|
-
*/
|
|
157
|
-
previewVideo(mediaId, reception, method = this.PREVIEW_BY_OPENID) {
|
|
158
|
-
return this.previewMessage(new Messages_1.Media(mediaId, 'mpvideo'), reception, method);
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* 发送图片消息预览给指定openId
|
|
162
|
-
* @param {string} mediaId 素材id
|
|
163
|
-
* @param {string} reception openid
|
|
164
|
-
* @param {object} attributes 附加参数
|
|
165
|
-
*/
|
|
166
|
-
previewImage(mediaId, reception, method = this.PREVIEW_BY_OPENID) {
|
|
167
|
-
return this.previewMessage(new Messages_1.Image(mediaId), reception, method);
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* 发送卡券消息预览给指定openId
|
|
171
|
-
* @param {string} cardId 卡券id
|
|
172
|
-
* @param {string} reception openid
|
|
173
|
-
* @param {object} attributes 附加参数
|
|
174
|
-
*/
|
|
175
|
-
previewCard(cardId, reception, method = this.PREVIEW_BY_OPENID) {
|
|
176
|
-
return this.previewMessage(new Messages_1.Card(cardId), reception, method);
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* 发送文本消息预览给指定微信号
|
|
180
|
-
* @param {string} mediaId 文本
|
|
181
|
-
* @param {string} reception 微信号
|
|
182
|
-
* @param {object} attributes 附加参数
|
|
183
|
-
*/
|
|
184
|
-
previewTextByName(message, reception) {
|
|
185
|
-
return this.previewMessage(new Messages_1.Text(message), reception, this.PREVIEW_BY_NAME);
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* 发送图文消息预览给指定微信号
|
|
189
|
-
* @param {string} mediaId 素材id
|
|
190
|
-
* @param {string} reception 微信号
|
|
191
|
-
* @param {object} attributes 附加参数
|
|
192
|
-
*/
|
|
193
|
-
previewNewsByName(mediaId, reception) {
|
|
194
|
-
return this.previewMessage(new Messages_1.Media(mediaId, 'mpnews'), reception, this.PREVIEW_BY_NAME);
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* 发送语音消息预览给指定微信号
|
|
198
|
-
* @param {string} mediaId 素材id
|
|
199
|
-
* @param {string} reception 微信号
|
|
200
|
-
* @param {object} attributes 附加参数
|
|
201
|
-
*/
|
|
202
|
-
previewVoiceByName(mediaId, reception) {
|
|
203
|
-
return this.previewMessage(new Messages_1.Media(mediaId, 'voice'), reception, this.PREVIEW_BY_NAME);
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* 发送视频消息预览给指定微信号
|
|
207
|
-
* @param {string} mediaId 素材id
|
|
208
|
-
* @param {string} reception 微信号
|
|
209
|
-
* @param {object} attributes 附加参数
|
|
210
|
-
*/
|
|
211
|
-
previewVideoByName(mediaId, reception) {
|
|
212
|
-
return this.previewMessage(new Messages_1.Media(mediaId, 'mpvideo'), reception, this.PREVIEW_BY_NAME);
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* 发送图片消息预览给指定微信号
|
|
216
|
-
* @param {string} mediaId 素材id
|
|
217
|
-
* @param {string} reception 微信号
|
|
218
|
-
* @param {object} attributes 附加参数
|
|
219
|
-
*/
|
|
220
|
-
previewImageByName(mediaId, reception) {
|
|
221
|
-
return this.previewMessage(new Messages_1.Image(mediaId), reception, this.PREVIEW_BY_NAME);
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* 发送卡券消息预览给指定微信号
|
|
225
|
-
* @param {string} cardId 卡券id
|
|
226
|
-
* @param {string} reception 微信号
|
|
227
|
-
* @param {object} attributes 附加参数
|
|
228
|
-
*/
|
|
229
|
-
previewCardByName(cardId, reception) {
|
|
230
|
-
return this.previewMessage(new Messages_1.Card(cardId), reception, this.PREVIEW_BY_NAME);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
exports.default = BroadcastingClient;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Message } from '../../Core/Messages';
|
|
2
|
-
export default class MessageBuilder {
|
|
3
|
-
protected _to: object;
|
|
4
|
-
protected _message: Message;
|
|
5
|
-
protected _attributes: object;
|
|
6
|
-
message(message: Message): this;
|
|
7
|
-
to(to: object): this;
|
|
8
|
-
toTag(tagId: number): this;
|
|
9
|
-
toUsers(openids: Array<string>): this;
|
|
10
|
-
toAll(): this;
|
|
11
|
-
with(attributes: object): this;
|
|
12
|
-
build(prepends?: object): object;
|
|
13
|
-
buildForPreview(by: string, user: string): object;
|
|
14
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const Utils_1 = require("../../Core/Utils");
|
|
4
|
-
class MessageBuilder {
|
|
5
|
-
constructor() {
|
|
6
|
-
this._to = {};
|
|
7
|
-
this._message = null;
|
|
8
|
-
this._attributes = {};
|
|
9
|
-
}
|
|
10
|
-
message(message) {
|
|
11
|
-
this._message = message;
|
|
12
|
-
return this;
|
|
13
|
-
}
|
|
14
|
-
to(to) {
|
|
15
|
-
this._to = to;
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
toTag(tagId) {
|
|
19
|
-
this.to({
|
|
20
|
-
filter: {
|
|
21
|
-
is_to_all: false,
|
|
22
|
-
tag_id: tagId,
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
return this;
|
|
26
|
-
}
|
|
27
|
-
toUsers(openids) {
|
|
28
|
-
this.to({
|
|
29
|
-
touser: openids
|
|
30
|
-
});
|
|
31
|
-
return this;
|
|
32
|
-
}
|
|
33
|
-
toAll() {
|
|
34
|
-
this.to({
|
|
35
|
-
filter: {
|
|
36
|
-
is_to_all: true,
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
return this;
|
|
40
|
-
}
|
|
41
|
-
with(attributes) {
|
|
42
|
-
this._attributes = attributes;
|
|
43
|
-
return this;
|
|
44
|
-
}
|
|
45
|
-
build(prepends = null) {
|
|
46
|
-
if (!this._message) {
|
|
47
|
-
throw new Error('No message content to send.');
|
|
48
|
-
}
|
|
49
|
-
let content = this._message.transformForJsonRequest();
|
|
50
|
-
if (!prepends) {
|
|
51
|
-
prepends = this._to;
|
|
52
|
-
}
|
|
53
|
-
let message = (0, Utils_1.merge)((0, Utils_1.merge)((0, Utils_1.merge)({}, prepends), content), this._attributes);
|
|
54
|
-
return message;
|
|
55
|
-
}
|
|
56
|
-
buildForPreview(by, user) {
|
|
57
|
-
let prepends = {};
|
|
58
|
-
prepends[by] = user;
|
|
59
|
-
return this.build(prepends);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
exports.default = MessageBuilder;
|
|
63
|
-
;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const Client_1 = __importDefault(require("./Client"));
|
|
7
|
-
class BoardingPassClient extends Client_1.default {
|
|
8
|
-
checkin(params) {
|
|
9
|
-
return this.httpPostJson('card/boardingpass/checkin', params);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.default = BoardingPassClient;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import BaseAccessToken from '../../Core/BaseAccessToken';
|
|
2
|
-
import BaseApplication from '../../Core/BaseApplication';
|
|
3
|
-
import BaseClient from "../../Core/BaseClient";
|
|
4
|
-
import Client from "./Client";
|
|
5
|
-
export default class Card extends Client {
|
|
6
|
-
client: BaseClient;
|
|
7
|
-
coin: BaseClient;
|
|
8
|
-
sub_merchant: BaseClient;
|
|
9
|
-
code: BaseClient;
|
|
10
|
-
movie_ticket: BaseClient;
|
|
11
|
-
member_card: BaseClient;
|
|
12
|
-
general_card: BaseClient;
|
|
13
|
-
boarding_pass: BaseClient;
|
|
14
|
-
meeting_ticket: BaseClient;
|
|
15
|
-
jssdk: BaseClient;
|
|
16
|
-
constructor(app: BaseApplication, accessToken?: BaseAccessToken);
|
|
17
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const Client_1 = __importDefault(require("./Client"));
|
|
7
|
-
const CoinClient_1 = __importDefault(require("./CoinClient"));
|
|
8
|
-
const SubMerchantClient_1 = __importDefault(require("./SubMerchantClient"));
|
|
9
|
-
const CodeClient_1 = __importDefault(require("./CodeClient"));
|
|
10
|
-
const MovieTicketClient_1 = __importDefault(require("./MovieTicketClient"));
|
|
11
|
-
const MemberCardClient_1 = __importDefault(require("./MemberCardClient"));
|
|
12
|
-
const GeneralCardClient_1 = __importDefault(require("./GeneralCardClient"));
|
|
13
|
-
const BoardingPassClient_1 = __importDefault(require("./BoardingPassClient"));
|
|
14
|
-
const MeetingTicketClient_1 = __importDefault(require("./MeetingTicketClient"));
|
|
15
|
-
const JssdkClient_1 = __importDefault(require("./JssdkClient"));
|
|
16
|
-
class Card extends Client_1.default {
|
|
17
|
-
constructor(app, accessToken = null) {
|
|
18
|
-
super(app, accessToken);
|
|
19
|
-
this.client = new Client_1.default(app, accessToken);
|
|
20
|
-
this.coin = new CoinClient_1.default(app, accessToken);
|
|
21
|
-
this.sub_merchant = new SubMerchantClient_1.default(app, accessToken);
|
|
22
|
-
this.code = new CodeClient_1.default(app, accessToken);
|
|
23
|
-
this.movie_ticket = new MovieTicketClient_1.default(app, accessToken);
|
|
24
|
-
this.member_card = new MemberCardClient_1.default(app, accessToken);
|
|
25
|
-
this.general_card = new GeneralCardClient_1.default(app, accessToken);
|
|
26
|
-
this.boarding_pass = new BoardingPassClient_1.default(app, accessToken);
|
|
27
|
-
this.meeting_ticket = new MeetingTicketClient_1.default(app, accessToken);
|
|
28
|
-
this.jssdk = new JssdkClient_1.default(app, accessToken);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.default = Card;
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import BaseClient from '../../Core/BaseClient';
|
|
2
|
-
export default class Client extends BaseClient {
|
|
3
|
-
protected url: string;
|
|
4
|
-
protected ticketCacheKey: string;
|
|
5
|
-
protected ticketCachePrefix: string;
|
|
6
|
-
/**
|
|
7
|
-
* 获取卡券颜色
|
|
8
|
-
*/
|
|
9
|
-
colors(): Promise<any>;
|
|
10
|
-
/**
|
|
11
|
-
* 卡券开放类目查询
|
|
12
|
-
*/
|
|
13
|
-
categories(): Promise<any>;
|
|
14
|
-
/**
|
|
15
|
-
* 创建卡券
|
|
16
|
-
* @param cardType 卡券类型
|
|
17
|
-
* @param attributes 卡券信息
|
|
18
|
-
*/
|
|
19
|
-
create(cardType: string, attributes: object): Promise<any>;
|
|
20
|
-
/**
|
|
21
|
-
* 获取卡券详情
|
|
22
|
-
* @param cardId 卡券id
|
|
23
|
-
*/
|
|
24
|
-
get(cardId?: string): Promise<any>;
|
|
25
|
-
/**
|
|
26
|
-
* 批量查询卡列表
|
|
27
|
-
* @param offset 查询卡列表的起始偏移量,从0开始
|
|
28
|
-
* @param count 需要查询的卡片的数量
|
|
29
|
-
* @param statusList 支持开发者拉出指定状态的卡券列表。可选值:CARD_STATUS_NOT_VERIFY, 待审核;CARD_STATUS_VERIFY_FAIL, 审核失败;CARD_STATUS_VERIFY_OK, 通过审核;CARD_STATUS_USER_DELETE,卡券被商户删除;CARD_STATUS_DISPATCH,在公众平台投放过的卡券;默认:CARD_STATUS_VERIFY_OK
|
|
30
|
-
*/
|
|
31
|
-
list(offset?: number, count?: number, statusList?: string): Promise<any>;
|
|
32
|
-
/**
|
|
33
|
-
* 更改卡券信息
|
|
34
|
-
* @param cardId 卡券id
|
|
35
|
-
* @param type 卡券类型
|
|
36
|
-
* @param attributes 卡券信息
|
|
37
|
-
*/
|
|
38
|
-
update(cardId: string, type: string, attributes?: object): Promise<any>;
|
|
39
|
-
/**
|
|
40
|
-
* 删除卡券
|
|
41
|
-
* @param cardId 卡券id
|
|
42
|
-
*/
|
|
43
|
-
delete(cardId: string): Promise<any>;
|
|
44
|
-
/**
|
|
45
|
-
* 生成卡券二维码
|
|
46
|
-
* @param info 卡券信息
|
|
47
|
-
*/
|
|
48
|
-
createQrCode(info: object): Promise<any>;
|
|
49
|
-
/**
|
|
50
|
-
* ticket 换取二维码图片
|
|
51
|
-
* @param ticket 通过createQrCode方法获得
|
|
52
|
-
*/
|
|
53
|
-
getQrCode(ticket: string): Promise<object>;
|
|
54
|
-
/**
|
|
55
|
-
* ticket 换取二维码链接
|
|
56
|
-
* @param ticket 通过createQrCode方法获得
|
|
57
|
-
*/
|
|
58
|
-
getQrCodeUrl(ticket: string): string;
|
|
59
|
-
/**
|
|
60
|
-
* 创建货架
|
|
61
|
-
* @param banner 页面的 banner 图
|
|
62
|
-
* @param pageTitle 页面的 title
|
|
63
|
-
* @param canShare 页面是不是可以分享,true 或 false
|
|
64
|
-
* @param scene 投放页面的场景值。可选值:SCENE_NEAR_BY,附近;SCENE_MENU,自定义菜单;SCENE_QRCODE,二维码;SCENE_ARTICLE,公众号文章;SCENE_H5,h5页面;SCENE_IVR,自动回复;SCENE_CARD_CUSTOM_CELL,卡券自定义cell;
|
|
65
|
-
* @param cardList 卡券列表,每个元素有card_id、thumb_url两个字段
|
|
66
|
-
*/
|
|
67
|
-
createLandingPage(banner: string, pageTitle: string, canShare: Boolean, scene: string, cardList: Array<object>): Promise<any>;
|
|
68
|
-
/**
|
|
69
|
-
* 图文消息群发卡券
|
|
70
|
-
* @param cardId 卡券id
|
|
71
|
-
*/
|
|
72
|
-
getHtml(cardId: string): Promise<any>;
|
|
73
|
-
/**
|
|
74
|
-
* 设置测试白名单
|
|
75
|
-
* @param openids 测试的openid列表
|
|
76
|
-
*/
|
|
77
|
-
setTestWhitelist(openids: Array<string>): Promise<any>;
|
|
78
|
-
/**
|
|
79
|
-
* 设置测试白名单
|
|
80
|
-
* @param openids 测试的微信号列表
|
|
81
|
-
*/
|
|
82
|
-
setTestWhitelistByName(usernames: Array<string>): Promise<any>;
|
|
83
|
-
/**
|
|
84
|
-
* 获取用户已领取卡券
|
|
85
|
-
* @param openid 用户openid
|
|
86
|
-
* @param cardId 卡券id
|
|
87
|
-
*/
|
|
88
|
-
getUserCards(openid: string, cardId?: string): Promise<any>;
|
|
89
|
-
/**
|
|
90
|
-
* 设置微信买单
|
|
91
|
-
* @param cardId 卡券id
|
|
92
|
-
* @param isOpen 是否开启买单功能,填 true/false,默认:true
|
|
93
|
-
*/
|
|
94
|
-
setPayCell(cardId: string, isOpen?: Boolean): Promise<any>;
|
|
95
|
-
/**
|
|
96
|
-
* 增加库存
|
|
97
|
-
* @param cardId 卡券id
|
|
98
|
-
* @param amount 修改数量
|
|
99
|
-
*/
|
|
100
|
-
increaseStock(cardId: string, amount: number): Promise<any>;
|
|
101
|
-
/**
|
|
102
|
-
* 减少库存
|
|
103
|
-
* @param cardId 卡券id
|
|
104
|
-
* @param amount 修改数量
|
|
105
|
-
*/
|
|
106
|
-
reduceStock(cardId: string, amount: number): Promise<any>;
|
|
107
|
-
protected updateStock(cardId: string, amount: number, action?: string): Promise<any>;
|
|
108
|
-
}
|