tmc.js 0.3.16 → 0.3.17

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/README.md CHANGED
@@ -134,7 +134,7 @@ new Tmc('your_app_key', 'your_app_secret', { autoReplyConfirmation: false })
134
134
 
135
135
  ## 支持的TOPICS
136
136
 
137
- <details><summary>共计 83+ 类别,448+ 消息数</summary>
137
+ <details><summary>共计 83+ 类别,449+ 消息数</summary>
138
138
 
139
139
  | 类别 | 消息数 |
140
140
  | --- | --- |
@@ -144,7 +144,7 @@ new Tmc('your_app_key', 'your_app_secret', { autoReplyConfirmation: false })
144
144
  | 淘宝分销 | 23 |
145
145
  | 淘宝点点 | 12 |
146
146
  | 淘宝火车票 | 5 |
147
- | 平台消息 | 8 |
147
+ | 平台消息 | 9 |
148
148
  | 交易全链路 | 3 |
149
149
  | 淘宝机票 | 14 |
150
150
  | 导购平台 | 21 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tmc.js",
3
- "version": "0.3.16",
3
+ "version": "0.3.17",
4
4
  "description": "Events driven and chained Taobao Message Channel(TMC) for NodeJS",
5
5
  "author": "James ZHANG",
6
6
  "license": "MIT",
package/types/index.d.ts CHANGED
@@ -678,6 +678,8 @@ declare interface TaoTopicsDescriptor {
678
678
  taobao_refund_TaobaoIntervened(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoRefundTaobaoIntervened) => void): TaoMessageConsumer;
679
679
  /** {@link IncomingMessage.TaobaoRhinoDeviceStatus 智能制造API > 智能制造-设备状态变更} */
680
680
  taobao_rhino_DeviceStatus(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoRhinoDeviceStatus) => void): TaoMessageConsumer;
681
+ /** {@link IncomingMessage.TaobaoSmartappAppSubChange 平台消息 > 用户订阅变更消息} */
682
+ taobao_smartapp_AppSubChange(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoSmartappAppSubChange) => void): TaoMessageConsumer;
681
683
  /** {@link IncomingMessage.TaobaoTaeBaichuanAuctionChange 导购平台 > 商品信息变更} */
682
684
  taobao_tae_BaichuanAuctionChange(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoTaeBaichuanAuctionChange) => void): TaoMessageConsumer;
683
685
  /** {@link IncomingMessage.TaobaoTaeBaichuanTradeClosed 导购平台 > 交易关闭} */
@@ -1100,6 +1102,8 @@ declare interface TaoTopicsDescriptor {
1100
1102
  taobao_refund(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoRefund) => void): TaoMessageConsumer;
1101
1103
  /** {@link IncomingMessage.TaobaoRhino} */
1102
1104
  taobao_rhino(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoRhino) => void): TaoMessageConsumer;
1105
+ /** {@link IncomingMessage.TaobaoSmartapp} */
1106
+ taobao_smartapp(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoSmartapp) => void): TaoMessageConsumer;
1103
1107
  /** {@link IncomingMessage.TaobaoTae} */
1104
1108
  taobao_tae(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoTae) => void): TaoMessageConsumer;
1105
1109
  /** {@link IncomingMessage.TaobaoTop} */
@@ -1823,6 +1827,8 @@ declare interface TaoEventsListener {
1823
1827
  on(topic: 'taobao_refund_TaobaoIntervened', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoRefundTaobaoIntervened) => void): TaoMessageConsumer;
1824
1828
  /** {@link IncomingMessage.TaobaoRhinoDeviceStatus 智能制造API > 智能制造-设备状态变更} */
1825
1829
  on(topic: 'taobao_rhino_DeviceStatus', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoRhinoDeviceStatus) => void): TaoMessageConsumer;
1830
+ /** {@link IncomingMessage.TaobaoSmartappAppSubChange 平台消息 > 用户订阅变更消息} */
1831
+ on(topic: 'taobao_smartapp_AppSubChange', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoSmartappAppSubChange) => void): TaoMessageConsumer;
1826
1832
  /** {@link IncomingMessage.TaobaoTaeBaichuanAuctionChange 导购平台 > 商品信息变更} */
1827
1833
  on(topic: 'taobao_tae_BaichuanAuctionChange', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoTaeBaichuanAuctionChange) => void): TaoMessageConsumer;
1828
1834
  /** {@link IncomingMessage.TaobaoTaeBaichuanTradeClosed 导购平台 > 交易关闭} */
@@ -2245,6 +2251,8 @@ declare interface TaoEventsListener {
2245
2251
  on(topic: 'taobao_refund', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoRefund) => void): TaoMessageConsumer;
2246
2252
  /** {@link IncomingMessage.TaobaoRhino} */
2247
2253
  on(topic: 'taobao_rhino', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoRhino) => void): TaoMessageConsumer;
2254
+ /** {@link IncomingMessage.TaobaoSmartapp} */
2255
+ on(topic: 'taobao_smartapp', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoSmartapp) => void): TaoMessageConsumer;
2248
2256
  /** {@link IncomingMessage.TaobaoTae} */
2249
2257
  on(topic: 'taobao_tae', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoTae) => void): TaoMessageConsumer;
2250
2258
  /** {@link IncomingMessage.TaobaoTop} */
@@ -637,6 +637,8 @@ declare namespace IncomingMessage {
637
637
  type TaobaoRefundTaobaoIntervened = Message & { content?: MessageContent & { topic?: 'taobao_refund_TaobaoIntervened', content?: string | Taobao.Refund.TaobaoIntervened } };
638
638
  /** {@link Taobao.Rhino.DeviceStatus 智能制造API > 智能制造-设备状态变更} */
639
639
  type TaobaoRhinoDeviceStatus = Message & { content?: MessageContent & { topic?: 'taobao_rhino_DeviceStatus', content?: string | Taobao.Rhino.DeviceStatus } };
640
+ /** {@link Taobao.Smartapp.AppSubChange 平台消息 > 用户订阅变更消息} */
641
+ type TaobaoSmartappAppSubChange = Message & { content?: MessageContent & { topic?: 'taobao_smartapp_AppSubChange', content?: string | Taobao.Smartapp.AppSubChange } };
640
642
  /** {@link Taobao.Tae.BaichuanAuctionChange 导购平台 > 商品信息变更} */
641
643
  type TaobaoTaeBaichuanAuctionChange = Message & { content?: MessageContent & { topic?: 'taobao_tae_BaichuanAuctionChange', content?: string | Taobao.Tae.BaichuanAuctionChange } };
642
644
  /** {@link Taobao.Tae.BaichuanTradeClosed 导购平台 > 交易关闭} */
@@ -1673,6 +1675,10 @@ declare namespace IncomingMessage {
1673
1675
  * - {@link TaobaoRhinoDeviceStatus 智能制造API > 智能制造-设备状态变更}
1674
1676
  */
1675
1677
  type TaobaoRhino = TaobaoRhinoDeviceStatus;
1678
+ /**
1679
+ * - {@link TaobaoSmartappAppSubChange 平台消息 > 用户订阅变更消息}
1680
+ */
1681
+ type TaobaoSmartapp = TaobaoSmartappAppSubChange;
1676
1682
  /**
1677
1683
  * - {@link TaobaoTaeBaichuanAuctionChange 导购平台 > 商品信息变更}
1678
1684
  * - {@link TaobaoTaeBaichuanTradeClosed 导购平台 > 交易关闭}
@@ -2152,6 +2158,7 @@ declare namespace IncomingMessage {
2152
2158
  * - {@link TaobaoRecycle}
2153
2159
  * - {@link TaobaoRefund}
2154
2160
  * - {@link TaobaoRhino}
2161
+ * - {@link TaobaoSmartapp}
2155
2162
  * - {@link TaobaoTae}
2156
2163
  * - {@link TaobaoTop}
2157
2164
  * - {@link TaobaoTopats}
@@ -2199,6 +2206,7 @@ declare namespace IncomingMessage {
2199
2206
  | TaobaoRecycle
2200
2207
  | TaobaoRefund
2201
2208
  | TaobaoRhino
2209
+ | TaobaoSmartapp
2202
2210
  | TaobaoTae
2203
2211
  | TaobaoTop
2204
2212
  | TaobaoTopats
package/types/taobao.d.ts CHANGED
@@ -2062,6 +2062,23 @@ declare namespace Taobao.Rhino {
2062
2062
  }
2063
2063
  }
2064
2064
 
2065
+ /** 平台消息 */
2066
+ declare namespace Taobao.Smartapp {
2067
+ /** 用户订阅变更消息 */
2068
+ interface AppSubChange {
2069
+ /** 应用id */
2070
+ app_id: string;
2071
+ /** 对接应用名称列表 */
2072
+ cooperation_list: string[];
2073
+ /** open_uid */
2074
+ open_uid: string;
2075
+ /** 场景code */
2076
+ screen_code: string;
2077
+ /** 订阅状态,ON:开启 ,OFF:关闭 */
2078
+ status: string;
2079
+ }
2080
+ }
2081
+
2065
2082
  /** 导购平台 */
2066
2083
  declare namespace Taobao.Tae {
2067
2084
  /** 商品信息变更 */