node-easywechat 2.10.2 → 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -196
- package/README.md +129 -253
- 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/{Work/MiniProgram/Auth/AuthClient.js → Core/Contracts/RefreshableAccessTokenInterface.js} +8 -13
- package/dist/Core/Contracts/ServerInterface.d.ts +8 -0
- package/dist/Core/Contracts/ServerInterface.js +20 -0
- package/dist/Core/Encryptor.d.ts +30 -4
- package/dist/Core/Encryptor.js +41 -17
- 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 -26
- package/dist/Core/Http/Request.js +12 -174
- 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 +21 -0
- package/dist/Core/HttpClient/AccessTokenAwareClient.js +53 -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 +23 -0
- package/dist/Core/HttpClient/Contracts/HttpClientInterface.js +33 -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 +29 -0
- package/dist/Core/HttpClient/HttpClient.js +109 -0
- package/dist/Core/HttpClient/HttpClientResponse.d.ts +82 -0
- package/dist/Core/HttpClient/HttpClientResponse.js +204 -0
- package/dist/Core/HttpClient/Mixins/HttpClientMethodsMixin.d.ts +48 -0
- package/dist/Core/HttpClient/Mixins/HttpClientMethodsMixin.js +88 -0
- package/dist/Core/HttpClient/Mixins/PresetMixin.d.ts +79 -0
- package/dist/Core/HttpClient/Mixins/PresetMixin.js +155 -0
- package/dist/Core/Message.d.ts +155 -0
- package/dist/Core/Message.js +85 -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 +21 -0
- package/dist/Core/Mixins/ClientMixin.js +24 -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 +24 -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 +95 -0
- package/dist/Core/{Utils.js → Support/Utils.js} +93 -40
- package/dist/MiniApp/AccessToken.d.ts +9 -0
- package/dist/MiniApp/AccessToken.js +18 -0
- package/dist/MiniApp/Account.d.ts +4 -0
- package/dist/MiniApp/Account.js +8 -0
- package/dist/MiniApp/Application.d.ts +59 -0
- package/dist/MiniApp/Application.js +123 -0
- package/dist/MiniApp/Contracts/AccountInterface.d.ts +23 -0
- package/dist/MiniApp/Contracts/AccountInterface.js +25 -0
- package/dist/MiniApp/Contracts/ApplicationInterface.d.ts +68 -0
- package/dist/MiniApp/Contracts/ApplicationInterface.js +60 -0
- package/dist/MiniApp/Decryptor.d.ts +4 -0
- package/dist/MiniApp/Decryptor.js +20 -0
- package/dist/MiniApp/Server.d.ts +4 -0
- package/dist/MiniApp/Server.js +9 -0
- package/dist/MiniApp/Utils.d.ts +22 -0
- package/dist/MiniApp/Utils.js +56 -0
- package/dist/OfficialAccount/AccessToken.d.ts +26 -0
- package/dist/OfficialAccount/AccessToken.js +84 -0
- package/dist/OfficialAccount/Account.d.ts +13 -0
- package/dist/OfficialAccount/Account.js +25 -0
- package/dist/OfficialAccount/Application.d.ts +70 -66
- package/dist/OfficialAccount/Application.js +148 -195
- 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 +94 -0
- package/dist/OfficialAccount/Utils.d.ts +7 -0
- package/dist/OfficialAccount/{Server/Guard.js → Utils.js} +12 -6
- package/dist/Types/global.d.ts +322 -0
- package/dist/index.d.ts +4 -117
- package/dist/index.js +9 -85
- package/mini_app.access_token.mock-access_token-appid.cache +1 -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 +6 -6
- package/dist/BaseService/Application.d.ts +0 -17
- package/dist/BaseService/Application.js +0 -41
- 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 -96
- package/dist/Core/BaseAccessToken.js +0 -222
- 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 -50
- 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 -40
- 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 -99
- 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 -200
- 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 -65
- package/dist/MiniProgram/Express/ExpressClient.js +0 -113
- 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 -39
- package/dist/MiniProgram/Shop/OrderClient.js +0 -60
- 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 -18
- package/dist/OfficialAccount/Base/OfficialAccountBase.js +0 -47
- 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 -216
- package/dist/OpenPlatform/Auth/AccessToken.d.ts +0 -8
- package/dist/OpenPlatform/Auth/AccessToken.js +0 -58
- 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 -13
- package/dist/OpenPlatform/Authorizer/Auth/AccessToken.js +0 -69
- 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 -21
- package/dist/OpenPlatform/Authorizer/MiniProgram/Application.js +0 -48
- 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/Material/MaterialClient.d.ts +0 -8
- package/dist/OpenPlatform/Authorizer/MiniProgram/Material/MaterialClient.js +0 -45
- package/dist/OpenPlatform/Authorizer/MiniProgram/Privacy/PrivacyClient.d.ts +0 -22
- package/dist/OpenPlatform/Authorizer/MiniProgram/Privacy/PrivacyClient.js +0 -37
- package/dist/OpenPlatform/Authorizer/MiniProgram/Security/SecurityClient.d.ts +0 -14
- package/dist/OpenPlatform/Authorizer/MiniProgram/Security/SecurityClient.js +0 -24
- 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 -20
- 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 -119
- package/dist/OpenWork/Auth/ProviderAccessToken.d.ts +0 -9
- package/dist/OpenWork/Auth/ProviderAccessToken.js +0 -58
- package/dist/OpenWork/Auth/SuiteAccessToken.d.ts +0 -9
- package/dist/OpenWork/Auth/SuiteAccessToken.js +0 -59
- 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 -81
- package/dist/OpenWork/Corp/CorpClient.js +0 -165
- 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 -173
- 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 -184
- 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 -78
- 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 -84
- package/dist/Work/Application.js +0 -236
- 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 -223
- package/dist/Work/ExternalContact/Client.js +0 -366
- package/dist/Work/ExternalContact/ContactWayClient.d.ts +0 -44
- package/dist/Work/ExternalContact/ContactWayClient.js +0 -82
- package/dist/Work/ExternalContact/GroupChatWayClient.d.ts +0 -32
- package/dist/Work/ExternalContact/GroupChatWayClient.js +0 -54
- package/dist/Work/ExternalContact/InterceptClient.d.ts +0 -30
- package/dist/Work/ExternalContact/InterceptClient.js +0 -48
- 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/ProductClient.d.ts +0 -39
- package/dist/Work/ExternalContact/ProductClient.js +0 -62
- 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 -32
- 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 -22
- 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
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Article = void 0;
|
|
4
|
-
const Message_1 = require("./Message");
|
|
5
|
-
class Article extends Message_1.Message {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.type = 'mpnews';
|
|
9
|
-
this.properties = [
|
|
10
|
-
'thumb_media_id',
|
|
11
|
-
'author',
|
|
12
|
-
'title',
|
|
13
|
-
'content',
|
|
14
|
-
'digest',
|
|
15
|
-
'source_url',
|
|
16
|
-
'show_cover',
|
|
17
|
-
];
|
|
18
|
-
this.required = [
|
|
19
|
-
'thumb_media_id',
|
|
20
|
-
'title',
|
|
21
|
-
'content',
|
|
22
|
-
'show_cover',
|
|
23
|
-
];
|
|
24
|
-
this.jsonAliases = {
|
|
25
|
-
content_source_url: 'source_url',
|
|
26
|
-
show_cover_pic: 'show_cover',
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.Article = Article;
|
|
31
|
-
;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Card = void 0;
|
|
4
|
-
const Message_1 = require("./Message");
|
|
5
|
-
class Card extends Message_1.Message {
|
|
6
|
-
constructor(cardId) {
|
|
7
|
-
super({ card_id: cardId });
|
|
8
|
-
this.type = 'wxcard';
|
|
9
|
-
this.properties = [
|
|
10
|
-
'card_id',
|
|
11
|
-
];
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.Card = Card;
|
|
15
|
-
;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeviceEvent = void 0;
|
|
4
|
-
const Message_1 = require("./Message");
|
|
5
|
-
class DeviceEvent extends Message_1.Message {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.type = 'device_event';
|
|
9
|
-
this.properties = [
|
|
10
|
-
'device_type',
|
|
11
|
-
'device_id',
|
|
12
|
-
'content',
|
|
13
|
-
'session_id',
|
|
14
|
-
'open_id',
|
|
15
|
-
];
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.DeviceEvent = DeviceEvent;
|
|
19
|
-
;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeviceText = void 0;
|
|
4
|
-
const Message_1 = require("./Message");
|
|
5
|
-
class DeviceText extends Message_1.Message {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.type = 'device_text';
|
|
9
|
-
this.properties = [
|
|
10
|
-
'device_type',
|
|
11
|
-
'device_id',
|
|
12
|
-
'content',
|
|
13
|
-
'session_id',
|
|
14
|
-
'open_id',
|
|
15
|
-
];
|
|
16
|
-
}
|
|
17
|
-
toXmlArray() {
|
|
18
|
-
return {
|
|
19
|
-
DeviceType: this.get('device_type'),
|
|
20
|
-
DeviceID: this.get('device_id'),
|
|
21
|
-
SessionID: this.get('session_id'),
|
|
22
|
-
Content: Buffer.from(this.get('content')).toString('base64'),
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.DeviceText = DeviceText;
|
|
27
|
-
;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.File = void 0;
|
|
4
|
-
const Media_1 = require("./Media");
|
|
5
|
-
class File extends Media_1.Media {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.type = 'file';
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
exports.File = File;
|
|
12
|
-
;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Image = void 0;
|
|
4
|
-
const Media_1 = require("./Media");
|
|
5
|
-
class Image extends Media_1.Media {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.type = 'image';
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
exports.Image = Image;
|
|
12
|
-
;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InteractiveTaskCard = void 0;
|
|
4
|
-
const Message_1 = require("./Message");
|
|
5
|
-
/**
|
|
6
|
-
* 企业微信 interactive_taskcard 任务卡片消息类型
|
|
7
|
-
*/
|
|
8
|
-
class InteractiveTaskCard extends Message_1.Message {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.type = 'interactive_taskcard';
|
|
12
|
-
this.properties = [
|
|
13
|
-
'title',
|
|
14
|
-
'description',
|
|
15
|
-
'url',
|
|
16
|
-
'task_id',
|
|
17
|
-
'btn',
|
|
18
|
-
];
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.InteractiveTaskCard = InteractiveTaskCard;
|
|
22
|
-
;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Link = void 0;
|
|
4
|
-
const Message_1 = require("./Message");
|
|
5
|
-
class Link extends Message_1.Message {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.type = 'link';
|
|
9
|
-
this.properties = [
|
|
10
|
-
'title',
|
|
11
|
-
'description',
|
|
12
|
-
'url',
|
|
13
|
-
];
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.Link = Link;
|
|
17
|
-
;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Location = void 0;
|
|
4
|
-
const Message_1 = require("./Message");
|
|
5
|
-
class Location extends Message_1.Message {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.type = 'location';
|
|
9
|
-
this.properties = [
|
|
10
|
-
'latitude',
|
|
11
|
-
'longitude',
|
|
12
|
-
'scale',
|
|
13
|
-
'label',
|
|
14
|
-
'precision',
|
|
15
|
-
];
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.Location = Location;
|
|
19
|
-
;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Markdown = void 0;
|
|
4
|
-
const Message_1 = require("./Message");
|
|
5
|
-
class Markdown extends Message_1.Message {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.type = 'markdown';
|
|
9
|
-
this.properties = [
|
|
10
|
-
'content',
|
|
11
|
-
];
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.Markdown = Markdown;
|
|
15
|
-
;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Message } from './Message';
|
|
2
|
-
export declare class Media extends Message {
|
|
3
|
-
protected properties: Array<string>;
|
|
4
|
-
protected required: Array<string>;
|
|
5
|
-
constructor(mediaId: string, type?: string, attributes?: object);
|
|
6
|
-
getMediaId(): string;
|
|
7
|
-
toXmlArray(): object;
|
|
8
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Media = void 0;
|
|
4
|
-
const Message_1 = require("./Message");
|
|
5
|
-
const Utils_1 = require("../Utils");
|
|
6
|
-
class Media extends Message_1.Message {
|
|
7
|
-
constructor(mediaId, type = '', attributes = {}) {
|
|
8
|
-
super((0, Utils_1.merge)({ media_id: mediaId }, attributes));
|
|
9
|
-
this.properties = [
|
|
10
|
-
'media_id',
|
|
11
|
-
];
|
|
12
|
-
this.required = [
|
|
13
|
-
'media_id',
|
|
14
|
-
];
|
|
15
|
-
if (type)
|
|
16
|
-
this.setType(type);
|
|
17
|
-
}
|
|
18
|
-
getMediaId() {
|
|
19
|
-
this.checkRequiredAttributes();
|
|
20
|
-
return this.get('media_id');
|
|
21
|
-
}
|
|
22
|
-
toXmlArray() {
|
|
23
|
-
return {
|
|
24
|
-
[(0, Utils_1.strStudly)(this.getType())]: {
|
|
25
|
-
MediaId: this.get('media_id'),
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.Media = Media;
|
|
31
|
-
;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export declare class Message {
|
|
2
|
-
static TEXT: number;
|
|
3
|
-
static IMAGE: number;
|
|
4
|
-
static VOICE: number;
|
|
5
|
-
static VIDEO: number;
|
|
6
|
-
static SHORT_VIDEO: number;
|
|
7
|
-
static LOCATION: number;
|
|
8
|
-
static LINK: number;
|
|
9
|
-
static DEVICE_EVENT: number;
|
|
10
|
-
static DEVICE_TEXT: number;
|
|
11
|
-
static FILE: number;
|
|
12
|
-
static TEXT_CARD: number;
|
|
13
|
-
static TRANSFER: number;
|
|
14
|
-
static EVENT: number;
|
|
15
|
-
static MINIPROGRAM_PAGE: number;
|
|
16
|
-
static MINIPROGRAM_NOTICE: number;
|
|
17
|
-
static MARKDOWN: number;
|
|
18
|
-
static ALL: number;
|
|
19
|
-
protected type: string;
|
|
20
|
-
protected id: number;
|
|
21
|
-
protected to: string;
|
|
22
|
-
protected from: string;
|
|
23
|
-
protected properties: Array<string>;
|
|
24
|
-
protected jsonAliases: object;
|
|
25
|
-
constructor(attributes?: object);
|
|
26
|
-
getType(): string;
|
|
27
|
-
setType(type: string): void;
|
|
28
|
-
transformToXml(appends?: object, returnAsObject?: boolean): any;
|
|
29
|
-
toXmlArray(): void;
|
|
30
|
-
transformForJsonRequestWithoutType(appends?: object): object;
|
|
31
|
-
transformForJsonRequest(appends?: object, withType?: boolean): object;
|
|
32
|
-
propertiesToObject(data: object, aliases?: object): object;
|
|
33
|
-
protected attributes: object;
|
|
34
|
-
protected required: Array<string>;
|
|
35
|
-
setAttributes(attributes: object): this;
|
|
36
|
-
setAttribute(name: string, value: any): this;
|
|
37
|
-
set(name: string, value: any): this;
|
|
38
|
-
getAttribute(name: string, defaultValue?: any): any;
|
|
39
|
-
get(name: string, defaultValue?: any): any;
|
|
40
|
-
has(name: string): boolean;
|
|
41
|
-
merge(attributes: object): this;
|
|
42
|
-
only(keys: Array<string>): object;
|
|
43
|
-
all(): object;
|
|
44
|
-
getRequired(): Array<string>;
|
|
45
|
-
isRequired(attribute: any): boolean;
|
|
46
|
-
protected checkRequiredAttributes(): void;
|
|
47
|
-
}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Message = void 0;
|
|
4
|
-
const Utils_1 = require("../Utils");
|
|
5
|
-
class Message {
|
|
6
|
-
constructor(attributes = {}) {
|
|
7
|
-
this.properties = [];
|
|
8
|
-
this.jsonAliases = {};
|
|
9
|
-
this.attributes = {};
|
|
10
|
-
this.required = [];
|
|
11
|
-
this.setAttributes(attributes);
|
|
12
|
-
}
|
|
13
|
-
getType() {
|
|
14
|
-
return this.type;
|
|
15
|
-
}
|
|
16
|
-
setType(type) {
|
|
17
|
-
this.type = type;
|
|
18
|
-
}
|
|
19
|
-
transformToXml(appends = {}, returnAsObject = false) {
|
|
20
|
-
let data = (0, Utils_1.merge)((0, Utils_1.merge)({ MsgType: this.getType() }, this.toXmlArray()), appends);
|
|
21
|
-
if (returnAsObject) {
|
|
22
|
-
return data;
|
|
23
|
-
}
|
|
24
|
-
return (0, Utils_1.buildXml)(data);
|
|
25
|
-
}
|
|
26
|
-
toXmlArray() {
|
|
27
|
-
throw new Error(`Class "${this.constructor.name}" cannot support transform to XML message.`);
|
|
28
|
-
}
|
|
29
|
-
transformForJsonRequestWithoutType(appends = {}) {
|
|
30
|
-
return this.transformForJsonRequest(appends, false);
|
|
31
|
-
}
|
|
32
|
-
transformForJsonRequest(appends = {}, withType = true) {
|
|
33
|
-
if (!withType) {
|
|
34
|
-
return this.propertiesToObject({}, this.jsonAliases);
|
|
35
|
-
}
|
|
36
|
-
let messageType = this.getType();
|
|
37
|
-
let data = (0, Utils_1.merge)({
|
|
38
|
-
msgtype: messageType
|
|
39
|
-
}, appends);
|
|
40
|
-
data[messageType] = (0, Utils_1.merge)(data[messageType] || {}, this.propertiesToObject({}, this.jsonAliases));
|
|
41
|
-
return data;
|
|
42
|
-
}
|
|
43
|
-
propertiesToObject(data, aliases = null) {
|
|
44
|
-
this.checkRequiredAttributes();
|
|
45
|
-
for (let property in this.attributes) {
|
|
46
|
-
if (this.attributes[property] == null && !this.isRequired(property)) {
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
let alias = aliases && aliases[property] ? aliases[property] : null;
|
|
50
|
-
data[alias ? alias : property] = this.get(property);
|
|
51
|
-
}
|
|
52
|
-
return data;
|
|
53
|
-
}
|
|
54
|
-
setAttributes(attributes) {
|
|
55
|
-
this.attributes = attributes;
|
|
56
|
-
return this;
|
|
57
|
-
}
|
|
58
|
-
setAttribute(name, value) {
|
|
59
|
-
this.attributes[name] = value;
|
|
60
|
-
return this;
|
|
61
|
-
}
|
|
62
|
-
set(name, value) {
|
|
63
|
-
this.setAttribute(name, value);
|
|
64
|
-
return this;
|
|
65
|
-
}
|
|
66
|
-
getAttribute(name, defaultValue = null) {
|
|
67
|
-
return this.attributes[name] || defaultValue;
|
|
68
|
-
}
|
|
69
|
-
get(name, defaultValue = null) {
|
|
70
|
-
return this.getAttribute(name, defaultValue);
|
|
71
|
-
}
|
|
72
|
-
has(name) {
|
|
73
|
-
for (let k in this.attributes) {
|
|
74
|
-
if (k === name) {
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return false;
|
|
79
|
-
}
|
|
80
|
-
merge(attributes) {
|
|
81
|
-
this.attributes = (0, Utils_1.merge)((0, Utils_1.merge)({}, this.attributes), attributes);
|
|
82
|
-
return this;
|
|
83
|
-
}
|
|
84
|
-
only(keys) {
|
|
85
|
-
let attributes = {};
|
|
86
|
-
for (let k in this.attributes) {
|
|
87
|
-
keys.forEach(key => {
|
|
88
|
-
if (k === key) {
|
|
89
|
-
attributes[k] = this.attributes[k];
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
return attributes;
|
|
94
|
-
}
|
|
95
|
-
all() {
|
|
96
|
-
this.checkRequiredAttributes();
|
|
97
|
-
return this.attributes;
|
|
98
|
-
}
|
|
99
|
-
getRequired() {
|
|
100
|
-
return this.required && (0, Utils_1.isArray)(this.required) ? this.required : [];
|
|
101
|
-
}
|
|
102
|
-
isRequired(attribute) {
|
|
103
|
-
return (0, Utils_1.inArray)(attribute, this.getRequired(), true);
|
|
104
|
-
}
|
|
105
|
-
checkRequiredAttributes() {
|
|
106
|
-
this.getRequired().forEach(attribute => {
|
|
107
|
-
if (attribute == null) {
|
|
108
|
-
throw new Error(`"${attribute}" cannot be empty.`);
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
exports.Message = Message;
|
|
114
|
-
Message.TEXT = 2;
|
|
115
|
-
Message.IMAGE = 4;
|
|
116
|
-
Message.VOICE = 8;
|
|
117
|
-
Message.VIDEO = 16;
|
|
118
|
-
Message.SHORT_VIDEO = 32;
|
|
119
|
-
Message.LOCATION = 64;
|
|
120
|
-
Message.LINK = 128;
|
|
121
|
-
Message.DEVICE_EVENT = 256;
|
|
122
|
-
Message.DEVICE_TEXT = 512;
|
|
123
|
-
Message.FILE = 1024;
|
|
124
|
-
Message.TEXT_CARD = 2048;
|
|
125
|
-
Message.TRANSFER = 4096;
|
|
126
|
-
Message.EVENT = 1048576;
|
|
127
|
-
Message.MINIPROGRAM_PAGE = 2097152;
|
|
128
|
-
Message.MINIPROGRAM_NOTICE = 4194304;
|
|
129
|
-
Message.MARKDOWN = 8388608;
|
|
130
|
-
Message.ALL = Message.TEXT | Message.IMAGE | Message.VOICE | Message.VIDEO | Message.SHORT_VIDEO | Message.LOCATION | Message.LINK
|
|
131
|
-
| Message.DEVICE_EVENT | Message.DEVICE_TEXT | Message.FILE | Message.TEXT_CARD | Message.TRANSFER | Message.EVENT
|
|
132
|
-
| Message.MINIPROGRAM_PAGE | Message.MINIPROGRAM_NOTICE | Message.MARKDOWN;
|
|
133
|
-
;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MiniProgramNotice = void 0;
|
|
4
|
-
const Message_1 = require("./Message");
|
|
5
|
-
class MiniProgramNotice extends Message_1.Message {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.type = 'miniprogram_notice';
|
|
9
|
-
this.properties = [
|
|
10
|
-
'appid',
|
|
11
|
-
'title',
|
|
12
|
-
];
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.MiniProgramNotice = MiniProgramNotice;
|
|
16
|
-
;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MiniProgramPage = void 0;
|
|
4
|
-
const Message_1 = require("./Message");
|
|
5
|
-
class MiniProgramPage extends Message_1.Message {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.type = 'miniprogrampage';
|
|
9
|
-
this.properties = [
|
|
10
|
-
'title',
|
|
11
|
-
'appid',
|
|
12
|
-
'pagepath',
|
|
13
|
-
'thumb_media_id',
|
|
14
|
-
];
|
|
15
|
-
this.required = [
|
|
16
|
-
'thumb_media_id',
|
|
17
|
-
'appid',
|
|
18
|
-
'pagepath',
|
|
19
|
-
];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.MiniProgramPage = MiniProgramPage;
|
|
23
|
-
;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Music = void 0;
|
|
4
|
-
const Message_1 = require("./Message");
|
|
5
|
-
class Music extends Message_1.Message {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.type = 'music';
|
|
9
|
-
this.properties = [
|
|
10
|
-
'title',
|
|
11
|
-
'description',
|
|
12
|
-
'url',
|
|
13
|
-
'hq_url',
|
|
14
|
-
'thumb_media_id',
|
|
15
|
-
'format',
|
|
16
|
-
];
|
|
17
|
-
this.jsonAliases = {
|
|
18
|
-
musicurl: 'url',
|
|
19
|
-
hqmusicurl: 'hq_url',
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
toXmlArray() {
|
|
23
|
-
let music = {
|
|
24
|
-
Music: {
|
|
25
|
-
Title: this.get('title'),
|
|
26
|
-
Description: this.get('description'),
|
|
27
|
-
MusicUrl: this.get('url'),
|
|
28
|
-
HQMusicUrl: this.get('hq_url'),
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
let thumbMediaId = this.get('thumb_media_id');
|
|
32
|
-
if (thumbMediaId) {
|
|
33
|
-
music['Music']['ThumbMediaId'] = thumbMediaId;
|
|
34
|
-
}
|
|
35
|
-
return music;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.Music = Music;
|
|
39
|
-
;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Message } from './Message';
|
|
2
|
-
import { NewsItem } from './NewsItem';
|
|
3
|
-
export declare class News extends Message {
|
|
4
|
-
protected type: string;
|
|
5
|
-
protected properties: Array<string>;
|
|
6
|
-
constructor(items?: Array<NewsItem>);
|
|
7
|
-
propertiesToObject(data: any, aliases?: any[]): object;
|
|
8
|
-
toXmlArray(): object;
|
|
9
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.News = void 0;
|
|
4
|
-
const Message_1 = require("./Message");
|
|
5
|
-
const NewsItem_1 = require("./NewsItem");
|
|
6
|
-
class News extends Message_1.Message {
|
|
7
|
-
constructor(items = []) {
|
|
8
|
-
super({ items });
|
|
9
|
-
this.type = 'news';
|
|
10
|
-
this.properties = [
|
|
11
|
-
'items',
|
|
12
|
-
];
|
|
13
|
-
}
|
|
14
|
-
propertiesToObject(data, aliases = []) {
|
|
15
|
-
let newItems = [];
|
|
16
|
-
try {
|
|
17
|
-
this.get('items').forEach(item => {
|
|
18
|
-
if (item instanceof NewsItem_1.NewsItem) {
|
|
19
|
-
newItems.push(item.toJsonArray());
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
newItems.push(item);
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
catch (e) { }
|
|
27
|
-
return {
|
|
28
|
-
articles: newItems
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
toXmlArray() {
|
|
32
|
-
let newItems = [];
|
|
33
|
-
try {
|
|
34
|
-
this.get('items').forEach(item => {
|
|
35
|
-
if (item instanceof NewsItem_1.NewsItem) {
|
|
36
|
-
newItems.push(item.toXmlArray());
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
catch (e) { }
|
|
41
|
-
return {
|
|
42
|
-
ArticleCount: newItems.length,
|
|
43
|
-
Articles: {
|
|
44
|
-
item: newItems
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
exports.News = News;
|
|
50
|
-
;
|