tmc.js 0.3.31 → 0.3.33
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 +3 -3
- package/package.json +1 -1
- package/types/alibaba.d.ts +31 -0
- package/types/index.d.ts +16 -0
- package/types/message.in.d.ts +17 -1
- package/types/taobao.d.ts +12 -0
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>共计 84+ 类别,
|
|
137
|
+
<details><summary>共计 84+ 类别,491+ 消息数</summary>
|
|
138
138
|
|
|
139
139
|
| 类别 | 消息数 |
|
|
140
140
|
| --- | --- |
|
|
@@ -146,7 +146,7 @@ new Tmc('your_app_key', 'your_app_secret', { autoReplyConfirmation: false })
|
|
|
146
146
|
| 淘宝火车票 | 6 |
|
|
147
147
|
| 平台消息 | 9 |
|
|
148
148
|
| 交易全链路 | 3 |
|
|
149
|
-
| 淘宝机票 |
|
|
149
|
+
| 淘宝机票 | 15 |
|
|
150
150
|
| 导购平台 | 21 |
|
|
151
151
|
| 淘宝汽车票 | 4 |
|
|
152
152
|
| 服务市场 | 9 |
|
|
@@ -178,7 +178,7 @@ new Tmc('your_app_key', 'your_app_secret', { autoReplyConfirmation: false })
|
|
|
178
178
|
| 智慧门店下行消息 | 2 |
|
|
179
179
|
| 渠道中心API | 4 |
|
|
180
180
|
| 五道口订单 | 22 |
|
|
181
|
-
| 信息平台-采购 |
|
|
181
|
+
| 信息平台-采购 | 3 |
|
|
182
182
|
| 1688服务市场 | 1 |
|
|
183
183
|
| 酒店商品消息api | 9 |
|
|
184
184
|
| 新零售终端下行消息 | 1 |
|
package/package.json
CHANGED
package/types/alibaba.d.ts
CHANGED
|
@@ -1382,6 +1382,37 @@ declare namespace Alibaba.Nlife {
|
|
|
1382
1382
|
}
|
|
1383
1383
|
}
|
|
1384
1384
|
|
|
1385
|
+
/** 信息平台-采购 */
|
|
1386
|
+
declare namespace Alibaba.Pur {
|
|
1387
|
+
/** 取消订单结果通知 */
|
|
1388
|
+
interface ResourceOrderCancelNotify {
|
|
1389
|
+
/** 失败原因 */
|
|
1390
|
+
failedMsg?: string;
|
|
1391
|
+
/** 平台子订单号 */
|
|
1392
|
+
orderItemNo: string;
|
|
1393
|
+
/** 平台订单号 */
|
|
1394
|
+
orderNo: string;
|
|
1395
|
+
/** 三方子订单号 */
|
|
1396
|
+
outOrderItemNo: string;
|
|
1397
|
+
/** 三方订单号 */
|
|
1398
|
+
outOrderNo: string;
|
|
1399
|
+
/** 逆向单号 */
|
|
1400
|
+
returnNo: string;
|
|
1401
|
+
/** 取消订单是否成功 */
|
|
1402
|
+
success: boolean;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
/** 发货提醒 */
|
|
1406
|
+
interface ResourceOrderShipNotify {
|
|
1407
|
+
/** 子订单 */
|
|
1408
|
+
orderItems: string;
|
|
1409
|
+
/** 平台订单号 */
|
|
1410
|
+
orderNo: string;
|
|
1411
|
+
/** 三方订单号 */
|
|
1412
|
+
outOrderNo: string;
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1385
1416
|
/** 天猫服务 */
|
|
1386
1417
|
declare namespace Alibaba.Serviceplatform {
|
|
1387
1418
|
/** 服务供应链核销单消息 */
|
package/types/index.d.ts
CHANGED
|
@@ -234,6 +234,10 @@ declare interface TaoTopicsDescriptor {
|
|
|
234
234
|
alibaba_nlife_InstorageDiffAuditNotify(fn: (this: TaoMessageConsumer, message: IncomingMessage.AlibabaNlifeInstorageDiffAuditNotify) => void): TaoMessageConsumer;
|
|
235
235
|
/** {@link IncomingMessage.AlibabaNlifeItemUpdate 零售plus > 零售+商品变动消息} */
|
|
236
236
|
alibaba_nlife_ItemUpdate(fn: (this: TaoMessageConsumer, message: IncomingMessage.AlibabaNlifeItemUpdate) => void): TaoMessageConsumer;
|
|
237
|
+
/** {@link IncomingMessage.AlibabaPurResourceOrderCancelNotify 信息平台-采购 > 取消订单结果通知} */
|
|
238
|
+
alibaba_pur_ResourceOrderCancelNotify(fn: (this: TaoMessageConsumer, message: IncomingMessage.AlibabaPurResourceOrderCancelNotify) => void): TaoMessageConsumer;
|
|
239
|
+
/** {@link IncomingMessage.AlibabaPurResourceOrderShipNotify 信息平台-采购 > 发货提醒} */
|
|
240
|
+
alibaba_pur_ResourceOrderShipNotify(fn: (this: TaoMessageConsumer, message: IncomingMessage.AlibabaPurResourceOrderShipNotify) => void): TaoMessageConsumer;
|
|
237
241
|
/** {@link IncomingMessage.AlibabaServiceplatformFulfilTask 天猫服务 > 服务供应链核销单消息} */
|
|
238
242
|
alibaba_serviceplatform_FulfilTask(fn: (this: TaoMessageConsumer, message: IncomingMessage.AlibabaServiceplatformFulfilTask) => void): TaoMessageConsumer;
|
|
239
243
|
/** {@link IncomingMessage.AlibabaServiceplatformServiceOrder 天猫服务 > 服务供应链服务单消息} */
|
|
@@ -632,6 +636,8 @@ declare interface TaoTopicsDescriptor {
|
|
|
632
636
|
taobao_jipiao_SellerOrderNotify(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoJipiaoSellerOrderNotify) => void): TaoMessageConsumer;
|
|
633
637
|
/** {@link IncomingMessage.TaobaoJipiaoSellerRefundOrderNotify 淘宝机票 > 【机票代理商】退票订单通知} */
|
|
634
638
|
taobao_jipiao_SellerRefundOrderNotify(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoJipiaoSellerRefundOrderNotify) => void): TaoMessageConsumer;
|
|
639
|
+
/** {@link IncomingMessage.TaobaoJipiaoUrgeIssueTicket 淘宝机票 > 催出票/拦截出票消息} */
|
|
640
|
+
taobao_jipiao_UrgeIssueTicket(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoJipiaoUrgeIssueTicket) => void): TaoMessageConsumer;
|
|
635
641
|
/** {@link IncomingMessage.TaobaoJzfxPurchaseOrderCreate 淘宝分销 > 家装分销_采购单创建} */
|
|
636
642
|
taobao_jzfx_PurchaseOrderCreate(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoJzfxPurchaseOrderCreate) => void): TaoMessageConsumer;
|
|
637
643
|
/** {@link IncomingMessage.TaobaoJzfxPurchaseOrderStatusModify 淘宝分销 > 家装分销_采购单状态修改} */
|
|
@@ -1024,6 +1030,8 @@ declare interface TaoTopicsDescriptor {
|
|
|
1024
1030
|
alibaba_nazca(fn: (this: TaoMessageConsumer, message: IncomingMessage.AlibabaNazca) => void): TaoMessageConsumer;
|
|
1025
1031
|
/** {@link IncomingMessage.AlibabaNlife} */
|
|
1026
1032
|
alibaba_nlife(fn: (this: TaoMessageConsumer, message: IncomingMessage.AlibabaNlife) => void): TaoMessageConsumer;
|
|
1033
|
+
/** {@link IncomingMessage.AlibabaPur} */
|
|
1034
|
+
alibaba_pur(fn: (this: TaoMessageConsumer, message: IncomingMessage.AlibabaPur) => void): TaoMessageConsumer;
|
|
1027
1035
|
/** {@link IncomingMessage.AlibabaServiceplatform} */
|
|
1028
1036
|
alibaba_serviceplatform(fn: (this: TaoMessageConsumer, message: IncomingMessage.AlibabaServiceplatform) => void): TaoMessageConsumer;
|
|
1029
1037
|
/** {@link IncomingMessage.AlibabaSp} */
|
|
@@ -1487,6 +1495,10 @@ declare interface TaoEventsListener {
|
|
|
1487
1495
|
on(topic: 'alibaba_nlife_InstorageDiffAuditNotify', listener: (this: TaoMessageConsumer, message: IncomingMessage.AlibabaNlifeInstorageDiffAuditNotify) => void): TaoMessageConsumer;
|
|
1488
1496
|
/** {@link IncomingMessage.AlibabaNlifeItemUpdate 零售plus > 零售+商品变动消息} */
|
|
1489
1497
|
on(topic: 'alibaba_nlife_ItemUpdate', listener: (this: TaoMessageConsumer, message: IncomingMessage.AlibabaNlifeItemUpdate) => void): TaoMessageConsumer;
|
|
1498
|
+
/** {@link IncomingMessage.AlibabaPurResourceOrderCancelNotify 信息平台-采购 > 取消订单结果通知} */
|
|
1499
|
+
on(topic: 'alibaba_pur_ResourceOrderCancelNotify', listener: (this: TaoMessageConsumer, message: IncomingMessage.AlibabaPurResourceOrderCancelNotify) => void): TaoMessageConsumer;
|
|
1500
|
+
/** {@link IncomingMessage.AlibabaPurResourceOrderShipNotify 信息平台-采购 > 发货提醒} */
|
|
1501
|
+
on(topic: 'alibaba_pur_ResourceOrderShipNotify', listener: (this: TaoMessageConsumer, message: IncomingMessage.AlibabaPurResourceOrderShipNotify) => void): TaoMessageConsumer;
|
|
1490
1502
|
/** {@link IncomingMessage.AlibabaServiceplatformFulfilTask 天猫服务 > 服务供应链核销单消息} */
|
|
1491
1503
|
on(topic: 'alibaba_serviceplatform_FulfilTask', listener: (this: TaoMessageConsumer, message: IncomingMessage.AlibabaServiceplatformFulfilTask) => void): TaoMessageConsumer;
|
|
1492
1504
|
/** {@link IncomingMessage.AlibabaServiceplatformServiceOrder 天猫服务 > 服务供应链服务单消息} */
|
|
@@ -1885,6 +1897,8 @@ declare interface TaoEventsListener {
|
|
|
1885
1897
|
on(topic: 'taobao_jipiao_SellerOrderNotify', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoJipiaoSellerOrderNotify) => void): TaoMessageConsumer;
|
|
1886
1898
|
/** {@link IncomingMessage.TaobaoJipiaoSellerRefundOrderNotify 淘宝机票 > 【机票代理商】退票订单通知} */
|
|
1887
1899
|
on(topic: 'taobao_jipiao_SellerRefundOrderNotify', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoJipiaoSellerRefundOrderNotify) => void): TaoMessageConsumer;
|
|
1900
|
+
/** {@link IncomingMessage.TaobaoJipiaoUrgeIssueTicket 淘宝机票 > 催出票/拦截出票消息} */
|
|
1901
|
+
on(topic: 'taobao_jipiao_UrgeIssueTicket', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoJipiaoUrgeIssueTicket) => void): TaoMessageConsumer;
|
|
1888
1902
|
/** {@link IncomingMessage.TaobaoJzfxPurchaseOrderCreate 淘宝分销 > 家装分销_采购单创建} */
|
|
1889
1903
|
on(topic: 'taobao_jzfx_PurchaseOrderCreate', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoJzfxPurchaseOrderCreate) => void): TaoMessageConsumer;
|
|
1890
1904
|
/** {@link IncomingMessage.TaobaoJzfxPurchaseOrderStatusModify 淘宝分销 > 家装分销_采购单状态修改} */
|
|
@@ -2277,6 +2291,8 @@ declare interface TaoEventsListener {
|
|
|
2277
2291
|
on(topic: 'alibaba_nazca', listener: (this: TaoMessageConsumer, message: IncomingMessage.AlibabaNazca) => void): TaoMessageConsumer;
|
|
2278
2292
|
/** {@link IncomingMessage.AlibabaNlife} */
|
|
2279
2293
|
on(topic: 'alibaba_nlife', listener: (this: TaoMessageConsumer, message: IncomingMessage.AlibabaNlife) => void): TaoMessageConsumer;
|
|
2294
|
+
/** {@link IncomingMessage.AlibabaPur} */
|
|
2295
|
+
on(topic: 'alibaba_pur', listener: (this: TaoMessageConsumer, message: IncomingMessage.AlibabaPur) => void): TaoMessageConsumer;
|
|
2280
2296
|
/** {@link IncomingMessage.AlibabaServiceplatform} */
|
|
2281
2297
|
on(topic: 'alibaba_serviceplatform', listener: (this: TaoMessageConsumer, message: IncomingMessage.AlibabaServiceplatform) => void): TaoMessageConsumer;
|
|
2282
2298
|
/** {@link IncomingMessage.AlibabaSp} */
|
package/types/message.in.d.ts
CHANGED
|
@@ -195,6 +195,10 @@ declare namespace IncomingMessage {
|
|
|
195
195
|
type AlibabaNlifeInstorageDiffAuditNotify = Message & { content?: MessageContent & { topic?: 'alibaba_nlife_InstorageDiffAuditNotify', content?: string | Alibaba.Nlife.InstorageDiffAuditNotify } };
|
|
196
196
|
/** {@link Alibaba.Nlife.ItemUpdate 零售plus > 零售+商品变动消息} */
|
|
197
197
|
type AlibabaNlifeItemUpdate = Message & { content?: MessageContent & { topic?: 'alibaba_nlife_ItemUpdate', content?: string | Alibaba.Nlife.ItemUpdate } };
|
|
198
|
+
/** {@link Alibaba.Pur.ResourceOrderCancelNotify 信息平台-采购 > 取消订单结果通知} */
|
|
199
|
+
type AlibabaPurResourceOrderCancelNotify = Message & { content?: MessageContent & { topic?: 'alibaba_pur_ResourceOrderCancelNotify', content?: string | Alibaba.Pur.ResourceOrderCancelNotify } };
|
|
200
|
+
/** {@link Alibaba.Pur.ResourceOrderShipNotify 信息平台-采购 > 发货提醒} */
|
|
201
|
+
type AlibabaPurResourceOrderShipNotify = Message & { content?: MessageContent & { topic?: 'alibaba_pur_ResourceOrderShipNotify', content?: string | Alibaba.Pur.ResourceOrderShipNotify } };
|
|
198
202
|
/** {@link Alibaba.Serviceplatform.FulfilTask 天猫服务 > 服务供应链核销单消息} */
|
|
199
203
|
type AlibabaServiceplatformFulfilTask = Message & { content?: MessageContent & { topic?: 'alibaba_serviceplatform_FulfilTask', content?: string | Alibaba.Serviceplatform.FulfilTask } };
|
|
200
204
|
/** {@link Alibaba.Serviceplatform.ServiceOrder 天猫服务 > 服务供应链服务单消息} */
|
|
@@ -593,6 +597,8 @@ declare namespace IncomingMessage {
|
|
|
593
597
|
type TaobaoJipiaoSellerOrderNotify = Message & { content?: MessageContent & { topic?: 'taobao_jipiao_SellerOrderNotify', content?: string | Taobao.Jipiao.SellerOrderNotify } };
|
|
594
598
|
/** {@link Taobao.Jipiao.SellerRefundOrderNotify 淘宝机票 > 【机票代理商】退票订单通知} */
|
|
595
599
|
type TaobaoJipiaoSellerRefundOrderNotify = Message & { content?: MessageContent & { topic?: 'taobao_jipiao_SellerRefundOrderNotify', content?: string | Taobao.Jipiao.SellerRefundOrderNotify } };
|
|
600
|
+
/** {@link Taobao.Jipiao.UrgeIssueTicket 淘宝机票 > 催出票/拦截出票消息} */
|
|
601
|
+
type TaobaoJipiaoUrgeIssueTicket = Message & { content?: MessageContent & { topic?: 'taobao_jipiao_UrgeIssueTicket', content?: string | Taobao.Jipiao.UrgeIssueTicket } };
|
|
596
602
|
/** {@link Taobao.Jzfx.PurchaseOrderCreate 淘宝分销 > 家装分销_采购单创建} */
|
|
597
603
|
type TaobaoJzfxPurchaseOrderCreate = Message & { content?: MessageContent & { topic?: 'taobao_jzfx_PurchaseOrderCreate', content?: string | Taobao.Jzfx.PurchaseOrderCreate } };
|
|
598
604
|
/** {@link Taobao.Jzfx.PurchaseOrderStatusModify 淘宝分销 > 家装分销_采购单状态修改} */
|
|
@@ -1155,6 +1161,12 @@ declare namespace IncomingMessage {
|
|
|
1155
1161
|
| AlibabaNlifeBtobTradeRefundNotify
|
|
1156
1162
|
| AlibabaNlifeInstorageDiffAuditNotify
|
|
1157
1163
|
| AlibabaNlifeItemUpdate;
|
|
1164
|
+
/**
|
|
1165
|
+
* - {@link AlibabaPurResourceOrderCancelNotify 信息平台-采购 > 取消订单结果通知}
|
|
1166
|
+
* - {@link AlibabaPurResourceOrderShipNotify 信息平台-采购 > 发货提醒}
|
|
1167
|
+
*/
|
|
1168
|
+
type AlibabaPur = AlibabaPurResourceOrderCancelNotify
|
|
1169
|
+
| AlibabaPurResourceOrderShipNotify;
|
|
1158
1170
|
/**
|
|
1159
1171
|
* - {@link AlibabaServiceplatformFulfilTask 天猫服务 > 服务供应链核销单消息}
|
|
1160
1172
|
* - {@link AlibabaServiceplatformServiceOrder 天猫服务 > 服务供应链服务单消息}
|
|
@@ -1690,13 +1702,15 @@ declare namespace IncomingMessage {
|
|
|
1690
1702
|
* - {@link TaobaoJipiaoJipiaoRefundOrderNotify 淘宝机票 > 机票退票订单状态推送}
|
|
1691
1703
|
* - {@link TaobaoJipiaoSellerOrderNotify 淘宝机票 > 【机票代理商】订单通知}
|
|
1692
1704
|
* - {@link TaobaoJipiaoSellerRefundOrderNotify 淘宝机票 > 【机票代理商】退票订单通知}
|
|
1705
|
+
* - {@link TaobaoJipiaoUrgeIssueTicket 淘宝机票 > 催出票/拦截出票消息}
|
|
1693
1706
|
*/
|
|
1694
1707
|
type TaobaoJipiao = TaobaoJipiaoAncillaryOrderPaid
|
|
1695
1708
|
| TaobaoJipiaoJipiaoModifyOrderNotify
|
|
1696
1709
|
| TaobaoJipiaoJipiaoOrderStatusNotify
|
|
1697
1710
|
| TaobaoJipiaoJipiaoRefundOrderNotify
|
|
1698
1711
|
| TaobaoJipiaoSellerOrderNotify
|
|
1699
|
-
| TaobaoJipiaoSellerRefundOrderNotify
|
|
1712
|
+
| TaobaoJipiaoSellerRefundOrderNotify
|
|
1713
|
+
| TaobaoJipiaoUrgeIssueTicket;
|
|
1700
1714
|
/**
|
|
1701
1715
|
* - {@link TaobaoJzfxPurchaseOrderCreate 淘宝分销 > 家装分销_采购单创建}
|
|
1702
1716
|
* - {@link TaobaoJzfxPurchaseOrderStatusModify 淘宝分销 > 家装分销_采购单状态修改}
|
|
@@ -2170,6 +2184,7 @@ declare namespace IncomingMessage {
|
|
|
2170
2184
|
* - {@link AlibabaMsfservice}
|
|
2171
2185
|
* - {@link AlibabaNazca}
|
|
2172
2186
|
* - {@link AlibabaNlife}
|
|
2187
|
+
* - {@link AlibabaPur}
|
|
2173
2188
|
* - {@link AlibabaServiceplatform}
|
|
2174
2189
|
* - {@link AlibabaSp}
|
|
2175
2190
|
* - {@link AlibabaTax}
|
|
@@ -2200,6 +2215,7 @@ declare namespace IncomingMessage {
|
|
|
2200
2215
|
| AlibabaMsfservice
|
|
2201
2216
|
| AlibabaNazca
|
|
2202
2217
|
| AlibabaNlife
|
|
2218
|
+
| AlibabaPur
|
|
2203
2219
|
| AlibabaServiceplatform
|
|
2204
2220
|
| AlibabaSp
|
|
2205
2221
|
| AlibabaTax
|
package/types/taobao.d.ts
CHANGED
|
@@ -406,6 +406,8 @@ declare namespace Taobao.Dpaas {
|
|
|
406
406
|
declare namespace Taobao.Dv {
|
|
407
407
|
/** 淘宝数字虚拟外放 */
|
|
408
408
|
interface External {
|
|
409
|
+
/** json形式,里面包括bizType和业务信息 */
|
|
410
|
+
ext?: string;
|
|
409
411
|
/** 外部订单号 */
|
|
410
412
|
out_order_id: string;
|
|
411
413
|
/** 0:进行中,1:成功,2:失败,9:不存在 */
|
|
@@ -1406,6 +1408,16 @@ declare namespace Taobao.Jipiao {
|
|
|
1406
1408
|
/** 机票订单id */
|
|
1407
1409
|
order_id: number;
|
|
1408
1410
|
}
|
|
1411
|
+
|
|
1412
|
+
/** 催出票/拦截出票消息 */
|
|
1413
|
+
interface UrgeIssueTicket {
|
|
1414
|
+
/** 代理商id */
|
|
1415
|
+
agent_id: number;
|
|
1416
|
+
/** 订单号 */
|
|
1417
|
+
order_id: number;
|
|
1418
|
+
/** 消息类型:0-催出票,1-拦截出票 */
|
|
1419
|
+
send_type: number;
|
|
1420
|
+
}
|
|
1409
1421
|
}
|
|
1410
1422
|
|
|
1411
1423
|
/** 淘宝分销 */
|