tmc.js 0.3.16 → 0.3.18

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,17 +134,17 @@ 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+ 类别,450+ 消息数</summary>
138
138
 
139
139
  | 类别 | 消息数 |
140
140
  | --- | --- |
141
- | 淘宝交易 | 21 |
141
+ | 淘宝交易 | 22 |
142
142
  | 淘宝退款 | 13 |
143
143
  | 淘宝商品 | 13 |
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.18",
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
@@ -442,6 +442,8 @@ declare interface TaoTopicsDescriptor {
442
442
  taobao_bus_TradePayStatus(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoBusTradePayStatus) => void): TaoMessageConsumer;
443
443
  /** {@link IncomingMessage.TaobaoCarleaseFreeDpOrderMsgSend 天猫服务 > 天猫汽车直租免首付订单消息} */
444
444
  taobao_carlease_FreeDpOrderMsgSend(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoCarleaseFreeDpOrderMsgSend) => void): TaoMessageConsumer;
445
+ /** {@link IncomingMessage.TaobaoContentOrderPaid 淘宝交易 > 内容开放短视频模板支付消息} */
446
+ taobao_content_OrderPaid(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoContentOrderPaid) => void): TaoMessageConsumer;
445
447
  /** {@link IncomingMessage.TaobaoDaifaDistributorOrderStatusChange 代发管理 > 代发管理_分销商侧订单状态变更消息} */
446
448
  taobao_daifa_DistributorOrderStatusChange(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoDaifaDistributorOrderStatusChange) => void): TaoMessageConsumer;
447
449
  /** {@link IncomingMessage.TaobaoDaifaSupplierOrderStatusChange 代发管理 > 代发管理_供货商侧订单状态变更消息} */
@@ -678,6 +680,8 @@ declare interface TaoTopicsDescriptor {
678
680
  taobao_refund_TaobaoIntervened(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoRefundTaobaoIntervened) => void): TaoMessageConsumer;
679
681
  /** {@link IncomingMessage.TaobaoRhinoDeviceStatus 智能制造API > 智能制造-设备状态变更} */
680
682
  taobao_rhino_DeviceStatus(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoRhinoDeviceStatus) => void): TaoMessageConsumer;
683
+ /** {@link IncomingMessage.TaobaoSmartappAppSubChange 平台消息 > 用户订阅变更消息} */
684
+ taobao_smartapp_AppSubChange(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoSmartappAppSubChange) => void): TaoMessageConsumer;
681
685
  /** {@link IncomingMessage.TaobaoTaeBaichuanAuctionChange 导购平台 > 商品信息变更} */
682
686
  taobao_tae_BaichuanAuctionChange(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoTaeBaichuanAuctionChange) => void): TaoMessageConsumer;
683
687
  /** {@link IncomingMessage.TaobaoTaeBaichuanTradeClosed 导购平台 > 交易关闭} */
@@ -1042,6 +1046,8 @@ declare interface TaoTopicsDescriptor {
1042
1046
  taobao_bus(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoBus) => void): TaoMessageConsumer;
1043
1047
  /** {@link IncomingMessage.TaobaoCarlease} */
1044
1048
  taobao_carlease(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoCarlease) => void): TaoMessageConsumer;
1049
+ /** {@link IncomingMessage.TaobaoContent} */
1050
+ taobao_content(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoContent) => void): TaoMessageConsumer;
1045
1051
  /** {@link IncomingMessage.TaobaoDaifa} */
1046
1052
  taobao_daifa(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoDaifa) => void): TaoMessageConsumer;
1047
1053
  /** {@link IncomingMessage.TaobaoDd} */
@@ -1100,6 +1106,8 @@ declare interface TaoTopicsDescriptor {
1100
1106
  taobao_refund(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoRefund) => void): TaoMessageConsumer;
1101
1107
  /** {@link IncomingMessage.TaobaoRhino} */
1102
1108
  taobao_rhino(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoRhino) => void): TaoMessageConsumer;
1109
+ /** {@link IncomingMessage.TaobaoSmartapp} */
1110
+ taobao_smartapp(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoSmartapp) => void): TaoMessageConsumer;
1103
1111
  /** {@link IncomingMessage.TaobaoTae} */
1104
1112
  taobao_tae(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoTae) => void): TaoMessageConsumer;
1105
1113
  /** {@link IncomingMessage.TaobaoTop} */
@@ -1587,6 +1595,8 @@ declare interface TaoEventsListener {
1587
1595
  on(topic: 'taobao_bus_TradePayStatus', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoBusTradePayStatus) => void): TaoMessageConsumer;
1588
1596
  /** {@link IncomingMessage.TaobaoCarleaseFreeDpOrderMsgSend 天猫服务 > 天猫汽车直租免首付订单消息} */
1589
1597
  on(topic: 'taobao_carlease_FreeDpOrderMsgSend', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoCarleaseFreeDpOrderMsgSend) => void): TaoMessageConsumer;
1598
+ /** {@link IncomingMessage.TaobaoContentOrderPaid 淘宝交易 > 内容开放短视频模板支付消息} */
1599
+ on(topic: 'taobao_content_OrderPaid', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoContentOrderPaid) => void): TaoMessageConsumer;
1590
1600
  /** {@link IncomingMessage.TaobaoDaifaDistributorOrderStatusChange 代发管理 > 代发管理_分销商侧订单状态变更消息} */
1591
1601
  on(topic: 'taobao_daifa_DistributorOrderStatusChange', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoDaifaDistributorOrderStatusChange) => void): TaoMessageConsumer;
1592
1602
  /** {@link IncomingMessage.TaobaoDaifaSupplierOrderStatusChange 代发管理 > 代发管理_供货商侧订单状态变更消息} */
@@ -1823,6 +1833,8 @@ declare interface TaoEventsListener {
1823
1833
  on(topic: 'taobao_refund_TaobaoIntervened', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoRefundTaobaoIntervened) => void): TaoMessageConsumer;
1824
1834
  /** {@link IncomingMessage.TaobaoRhinoDeviceStatus 智能制造API > 智能制造-设备状态变更} */
1825
1835
  on(topic: 'taobao_rhino_DeviceStatus', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoRhinoDeviceStatus) => void): TaoMessageConsumer;
1836
+ /** {@link IncomingMessage.TaobaoSmartappAppSubChange 平台消息 > 用户订阅变更消息} */
1837
+ on(topic: 'taobao_smartapp_AppSubChange', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoSmartappAppSubChange) => void): TaoMessageConsumer;
1826
1838
  /** {@link IncomingMessage.TaobaoTaeBaichuanAuctionChange 导购平台 > 商品信息变更} */
1827
1839
  on(topic: 'taobao_tae_BaichuanAuctionChange', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoTaeBaichuanAuctionChange) => void): TaoMessageConsumer;
1828
1840
  /** {@link IncomingMessage.TaobaoTaeBaichuanTradeClosed 导购平台 > 交易关闭} */
@@ -2187,6 +2199,8 @@ declare interface TaoEventsListener {
2187
2199
  on(topic: 'taobao_bus', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoBus) => void): TaoMessageConsumer;
2188
2200
  /** {@link IncomingMessage.TaobaoCarlease} */
2189
2201
  on(topic: 'taobao_carlease', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoCarlease) => void): TaoMessageConsumer;
2202
+ /** {@link IncomingMessage.TaobaoContent} */
2203
+ on(topic: 'taobao_content', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoContent) => void): TaoMessageConsumer;
2190
2204
  /** {@link IncomingMessage.TaobaoDaifa} */
2191
2205
  on(topic: 'taobao_daifa', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoDaifa) => void): TaoMessageConsumer;
2192
2206
  /** {@link IncomingMessage.TaobaoDd} */
@@ -2245,6 +2259,8 @@ declare interface TaoEventsListener {
2245
2259
  on(topic: 'taobao_refund', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoRefund) => void): TaoMessageConsumer;
2246
2260
  /** {@link IncomingMessage.TaobaoRhino} */
2247
2261
  on(topic: 'taobao_rhino', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoRhino) => void): TaoMessageConsumer;
2262
+ /** {@link IncomingMessage.TaobaoSmartapp} */
2263
+ on(topic: 'taobao_smartapp', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoSmartapp) => void): TaoMessageConsumer;
2248
2264
  /** {@link IncomingMessage.TaobaoTae} */
2249
2265
  on(topic: 'taobao_tae', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoTae) => void): TaoMessageConsumer;
2250
2266
  /** {@link IncomingMessage.TaobaoTop} */
@@ -401,6 +401,8 @@ declare namespace IncomingMessage {
401
401
  type TaobaoBusTradePayStatus = Message & { content?: MessageContent & { topic?: 'taobao_bus_TradePayStatus', content?: string | Taobao.Bus.TradePayStatus } };
402
402
  /** {@link Taobao.Carlease.FreeDpOrderMsgSend 天猫服务 > 天猫汽车直租免首付订单消息} */
403
403
  type TaobaoCarleaseFreeDpOrderMsgSend = Message & { content?: MessageContent & { topic?: 'taobao_carlease_FreeDpOrderMsgSend', content?: string | Taobao.Carlease.FreeDpOrderMsgSend } };
404
+ /** {@link Taobao.Content.OrderPaid 淘宝交易 > 内容开放短视频模板支付消息} */
405
+ type TaobaoContentOrderPaid = Message & { content?: MessageContent & { topic?: 'taobao_content_OrderPaid', content?: string | Taobao.Content.OrderPaid } };
404
406
  /** {@link Taobao.Daifa.DistributorOrderStatusChange 代发管理 > 代发管理_分销商侧订单状态变更消息} */
405
407
  type TaobaoDaifaDistributorOrderStatusChange = Message & { content?: MessageContent & { topic?: 'taobao_daifa_DistributorOrderStatusChange', content?: string | Taobao.Daifa.DistributorOrderStatusChange } };
406
408
  /** {@link Taobao.Daifa.SupplierOrderStatusChange 代发管理 > 代发管理_供货商侧订单状态变更消息} */
@@ -637,6 +639,8 @@ declare namespace IncomingMessage {
637
639
  type TaobaoRefundTaobaoIntervened = Message & { content?: MessageContent & { topic?: 'taobao_refund_TaobaoIntervened', content?: string | Taobao.Refund.TaobaoIntervened } };
638
640
  /** {@link Taobao.Rhino.DeviceStatus 智能制造API > 智能制造-设备状态变更} */
639
641
  type TaobaoRhinoDeviceStatus = Message & { content?: MessageContent & { topic?: 'taobao_rhino_DeviceStatus', content?: string | Taobao.Rhino.DeviceStatus } };
642
+ /** {@link Taobao.Smartapp.AppSubChange 平台消息 > 用户订阅变更消息} */
643
+ type TaobaoSmartappAppSubChange = Message & { content?: MessageContent & { topic?: 'taobao_smartapp_AppSubChange', content?: string | Taobao.Smartapp.AppSubChange } };
640
644
  /** {@link Taobao.Tae.BaichuanAuctionChange 导购平台 > 商品信息变更} */
641
645
  type TaobaoTaeBaichuanAuctionChange = Message & { content?: MessageContent & { topic?: 'taobao_tae_BaichuanAuctionChange', content?: string | Taobao.Tae.BaichuanAuctionChange } };
642
646
  /** {@link Taobao.Tae.BaichuanTradeClosed 导购平台 > 交易关闭} */
@@ -1379,6 +1383,10 @@ declare namespace IncomingMessage {
1379
1383
  * - {@link TaobaoCarleaseFreeDpOrderMsgSend 天猫服务 > 天猫汽车直租免首付订单消息}
1380
1384
  */
1381
1385
  type TaobaoCarlease = TaobaoCarleaseFreeDpOrderMsgSend;
1386
+ /**
1387
+ * - {@link TaobaoContentOrderPaid 淘宝交易 > 内容开放短视频模板支付消息}
1388
+ */
1389
+ type TaobaoContent = TaobaoContentOrderPaid;
1382
1390
  /**
1383
1391
  * - {@link TaobaoDaifaDistributorOrderStatusChange 代发管理 > 代发管理_分销商侧订单状态变更消息}
1384
1392
  * - {@link TaobaoDaifaSupplierOrderStatusChange 代发管理 > 代发管理_供货商侧订单状态变更消息}
@@ -1673,6 +1681,10 @@ declare namespace IncomingMessage {
1673
1681
  * - {@link TaobaoRhinoDeviceStatus 智能制造API > 智能制造-设备状态变更}
1674
1682
  */
1675
1683
  type TaobaoRhino = TaobaoRhinoDeviceStatus;
1684
+ /**
1685
+ * - {@link TaobaoSmartappAppSubChange 平台消息 > 用户订阅变更消息}
1686
+ */
1687
+ type TaobaoSmartapp = TaobaoSmartappAppSubChange;
1676
1688
  /**
1677
1689
  * - {@link TaobaoTaeBaichuanAuctionChange 导购平台 > 商品信息变更}
1678
1690
  * - {@link TaobaoTaeBaichuanTradeClosed 导购平台 > 交易关闭}
@@ -2123,6 +2135,7 @@ declare namespace IncomingMessage {
2123
2135
  * - {@link TaobaoBmc}
2124
2136
  * - {@link TaobaoBus}
2125
2137
  * - {@link TaobaoCarlease}
2138
+ * - {@link TaobaoContent}
2126
2139
  * - {@link TaobaoDaifa}
2127
2140
  * - {@link TaobaoDd}
2128
2141
  * - {@link TaobaoDiandian}
@@ -2152,6 +2165,7 @@ declare namespace IncomingMessage {
2152
2165
  * - {@link TaobaoRecycle}
2153
2166
  * - {@link TaobaoRefund}
2154
2167
  * - {@link TaobaoRhino}
2168
+ * - {@link TaobaoSmartapp}
2155
2169
  * - {@link TaobaoTae}
2156
2170
  * - {@link TaobaoTop}
2157
2171
  * - {@link TaobaoTopats}
@@ -2170,6 +2184,7 @@ declare namespace IncomingMessage {
2170
2184
  | TaobaoBmc
2171
2185
  | TaobaoBus
2172
2186
  | TaobaoCarlease
2187
+ | TaobaoContent
2173
2188
  | TaobaoDaifa
2174
2189
  | TaobaoDd
2175
2190
  | TaobaoDiandian
@@ -2199,6 +2214,7 @@ declare namespace IncomingMessage {
2199
2214
  | TaobaoRecycle
2200
2215
  | TaobaoRefund
2201
2216
  | TaobaoRhino
2217
+ | TaobaoSmartapp
2202
2218
  | TaobaoTae
2203
2219
  | TaobaoTop
2204
2220
  | TaobaoTopats
package/types/taobao.d.ts CHANGED
@@ -219,6 +219,23 @@ declare namespace Taobao.Carlease {
219
219
  }
220
220
  }
221
221
 
222
+ /** 淘宝交易 */
223
+ declare namespace Taobao.Content {
224
+ /** 内容开放短视频模板支付消息 */
225
+ interface OrderPaid {
226
+ /** 外部产品ID */
227
+ out_product_id: string;
228
+ /** 服务市场的产品子订单号 */
229
+ sub_order_id: string;
230
+ /** 用户openUid */
231
+ user_open_uid: string;
232
+ /** 短视频模板ID */
233
+ video_service_id: string;
234
+ /** 短视频模板订单ID */
235
+ video_service_order_id: string;
236
+ }
237
+ }
238
+
222
239
  /** 代发管理 */
223
240
  declare namespace Taobao.Daifa {
224
241
  /** 代发管理_分销商侧订单状态变更消息 */
@@ -2062,6 +2079,23 @@ declare namespace Taobao.Rhino {
2062
2079
  }
2063
2080
  }
2064
2081
 
2082
+ /** 平台消息 */
2083
+ declare namespace Taobao.Smartapp {
2084
+ /** 用户订阅变更消息 */
2085
+ interface AppSubChange {
2086
+ /** 应用id */
2087
+ app_id: string;
2088
+ /** 对接应用名称列表 */
2089
+ cooperation_list: string[];
2090
+ /** open_uid */
2091
+ open_uid: string;
2092
+ /** 场景code */
2093
+ screen_code: string;
2094
+ /** 订阅状态,ON:开启 ,OFF:关闭 */
2095
+ status: string;
2096
+ }
2097
+ }
2098
+
2065
2099
  /** 导购平台 */
2066
2100
  declare namespace Taobao.Tae {
2067
2101
  /** 商品信息变更 */