tmc.js 0.3.14 → 0.3.16
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 +4 -4
- package/package.json +1 -1
- package/types/index.d.ts +12 -0
- package/types/message.in.d.ts +14 -2
- package/types/taobao.d.ts +36 -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>共计 83+ 类别,
|
|
137
|
+
<details><summary>共计 83+ 类别,448+ 消息数</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
|
-
| 平台消息 |
|
|
147
|
+
| 平台消息 | 8 |
|
|
148
148
|
| 交易全链路 | 3 |
|
|
149
149
|
| 淘宝机票 | 14 |
|
|
150
150
|
| 导购平台 | 21 |
|
|
@@ -162,11 +162,11 @@ new Tmc('your_app_key', 'your_app_secret', { autoReplyConfirmation: false })
|
|
|
162
162
|
| 电子发票 | 20 |
|
|
163
163
|
| 航旅度假交易 | 8 |
|
|
164
164
|
| YunOS YoC | 2 |
|
|
165
|
-
| 淘宝直播API |
|
|
165
|
+
| 淘宝直播API | 3 |
|
|
166
166
|
| 阿里物联 | 2 |
|
|
167
167
|
| 全球购跨境物流 | 1 |
|
|
168
168
|
| 零售plus | 8 |
|
|
169
|
-
| 客户运营平台API |
|
|
169
|
+
| 客户运营平台API | 13 |
|
|
170
170
|
| AE-交易 | 10 |
|
|
171
171
|
| 五道口配送 | 1 |
|
|
172
172
|
| 百川 | 2 |
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -588,6 +588,8 @@ declare interface TaoTopicsDescriptor {
|
|
|
588
588
|
taobao_jipiao_SellerOrderNotify(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoJipiaoSellerOrderNotify) => void): TaoMessageConsumer;
|
|
589
589
|
/** {@link IncomingMessage.TaobaoJipiaoSellerRefundOrderNotify 淘宝机票 > 【机票代理商】退票订单通知} */
|
|
590
590
|
taobao_jipiao_SellerRefundOrderNotify(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoJipiaoSellerRefundOrderNotify) => void): TaoMessageConsumer;
|
|
591
|
+
/** {@link IncomingMessage.TaobaoLiveAgencyItemChanged 淘宝直播API > 直播严选机构商品池变化通知} */
|
|
592
|
+
taobao_live_AgencyItemChanged(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoLiveAgencyItemChanged) => void): TaoMessageConsumer;
|
|
591
593
|
/** {@link IncomingMessage.TaobaoLiveFeedRelated 淘宝直播API > 淘宝直播上下播消息} */
|
|
592
594
|
taobao_live_FeedRelated(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoLiveFeedRelated) => void): TaoMessageConsumer;
|
|
593
595
|
/** {@link IncomingMessage.TaobaoLiveTcpOrder 淘宝直播API > 淘宝直播订单消息} */
|
|
@@ -614,6 +616,8 @@ declare interface TaoTopicsDescriptor {
|
|
|
614
616
|
taobao_opencrm_CrowdInstResult(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoOpencrmCrowdInstResult) => void): TaoMessageConsumer;
|
|
615
617
|
/** {@link IncomingMessage.TaobaoOpencrmCrowdInstSaveResult 客户运营平台API > 人群快照另存为人群结果} */
|
|
616
618
|
taobao_opencrm_CrowdInstSaveResult(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoOpencrmCrowdInstSaveResult) => void): TaoMessageConsumer;
|
|
619
|
+
/** {@link IncomingMessage.TaobaoOpencrmDigitalTplExamine 客户运营平台API > 数字短信模板审核消息} */
|
|
620
|
+
taobao_opencrm_DigitalTplExamine(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoOpencrmDigitalTplExamine) => void): TaoMessageConsumer;
|
|
617
621
|
/** {@link IncomingMessage.TaobaoOpencrmFeedback 客户运营平台API > 反馈tmc} */
|
|
618
622
|
taobao_opencrm_Feedback(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoOpencrmFeedback) => void): TaoMessageConsumer;
|
|
619
623
|
/** {@link IncomingMessage.TaobaoOpencrmMemberGradeChange 客户运营平台API > 会员等级变更} */
|
|
@@ -712,6 +716,8 @@ declare interface TaoTopicsDescriptor {
|
|
|
712
716
|
taobao_tae_ItemUpShelf(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoTaeItemUpShelf) => void): TaoMessageConsumer;
|
|
713
717
|
/** {@link IncomingMessage.TaobaoTopAuthCancel 平台消息 > 取消授权消息通知} */
|
|
714
718
|
taobao_top_AuthCancel(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoTopAuthCancel) => void): TaoMessageConsumer;
|
|
719
|
+
/** {@link IncomingMessage.TaobaoTopProcessCallback 平台消息 > 工作流执行回调消息} */
|
|
720
|
+
taobao_top_ProcessCallback(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoTopProcessCallback) => void): TaoMessageConsumer;
|
|
715
721
|
/** {@link IncomingMessage.TaobaoTopatsTaskComplete 平台消息 > 异步任务执行完成} */
|
|
716
722
|
taobao_topats_TaskComplete(fn: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoTopatsTaskComplete) => void): TaoMessageConsumer;
|
|
717
723
|
/** {@link IncomingMessage.TaobaoTradeAdvanceDisburse 淘宝交易 > 订单极速放款成功消息} */
|
|
@@ -1727,6 +1733,8 @@ declare interface TaoEventsListener {
|
|
|
1727
1733
|
on(topic: 'taobao_jipiao_SellerOrderNotify', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoJipiaoSellerOrderNotify) => void): TaoMessageConsumer;
|
|
1728
1734
|
/** {@link IncomingMessage.TaobaoJipiaoSellerRefundOrderNotify 淘宝机票 > 【机票代理商】退票订单通知} */
|
|
1729
1735
|
on(topic: 'taobao_jipiao_SellerRefundOrderNotify', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoJipiaoSellerRefundOrderNotify) => void): TaoMessageConsumer;
|
|
1736
|
+
/** {@link IncomingMessage.TaobaoLiveAgencyItemChanged 淘宝直播API > 直播严选机构商品池变化通知} */
|
|
1737
|
+
on(topic: 'taobao_live_AgencyItemChanged', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoLiveAgencyItemChanged) => void): TaoMessageConsumer;
|
|
1730
1738
|
/** {@link IncomingMessage.TaobaoLiveFeedRelated 淘宝直播API > 淘宝直播上下播消息} */
|
|
1731
1739
|
on(topic: 'taobao_live_FeedRelated', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoLiveFeedRelated) => void): TaoMessageConsumer;
|
|
1732
1740
|
/** {@link IncomingMessage.TaobaoLiveTcpOrder 淘宝直播API > 淘宝直播订单消息} */
|
|
@@ -1753,6 +1761,8 @@ declare interface TaoEventsListener {
|
|
|
1753
1761
|
on(topic: 'taobao_opencrm_CrowdInstResult', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoOpencrmCrowdInstResult) => void): TaoMessageConsumer;
|
|
1754
1762
|
/** {@link IncomingMessage.TaobaoOpencrmCrowdInstSaveResult 客户运营平台API > 人群快照另存为人群结果} */
|
|
1755
1763
|
on(topic: 'taobao_opencrm_CrowdInstSaveResult', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoOpencrmCrowdInstSaveResult) => void): TaoMessageConsumer;
|
|
1764
|
+
/** {@link IncomingMessage.TaobaoOpencrmDigitalTplExamine 客户运营平台API > 数字短信模板审核消息} */
|
|
1765
|
+
on(topic: 'taobao_opencrm_DigitalTplExamine', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoOpencrmDigitalTplExamine) => void): TaoMessageConsumer;
|
|
1756
1766
|
/** {@link IncomingMessage.TaobaoOpencrmFeedback 客户运营平台API > 反馈tmc} */
|
|
1757
1767
|
on(topic: 'taobao_opencrm_Feedback', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoOpencrmFeedback) => void): TaoMessageConsumer;
|
|
1758
1768
|
/** {@link IncomingMessage.TaobaoOpencrmMemberGradeChange 客户运营平台API > 会员等级变更} */
|
|
@@ -1851,6 +1861,8 @@ declare interface TaoEventsListener {
|
|
|
1851
1861
|
on(topic: 'taobao_tae_ItemUpShelf', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoTaeItemUpShelf) => void): TaoMessageConsumer;
|
|
1852
1862
|
/** {@link IncomingMessage.TaobaoTopAuthCancel 平台消息 > 取消授权消息通知} */
|
|
1853
1863
|
on(topic: 'taobao_top_AuthCancel', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoTopAuthCancel) => void): TaoMessageConsumer;
|
|
1864
|
+
/** {@link IncomingMessage.TaobaoTopProcessCallback 平台消息 > 工作流执行回调消息} */
|
|
1865
|
+
on(topic: 'taobao_top_ProcessCallback', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoTopProcessCallback) => void): TaoMessageConsumer;
|
|
1854
1866
|
/** {@link IncomingMessage.TaobaoTopatsTaskComplete 平台消息 > 异步任务执行完成} */
|
|
1855
1867
|
on(topic: 'taobao_topats_TaskComplete', listener: (this: TaoMessageConsumer, message: IncomingMessage.TaobaoTopatsTaskComplete) => void): TaoMessageConsumer;
|
|
1856
1868
|
/** {@link IncomingMessage.TaobaoTradeAdvanceDisburse 淘宝交易 > 订单极速放款成功消息} */
|
package/types/message.in.d.ts
CHANGED
|
@@ -547,6 +547,8 @@ declare namespace IncomingMessage {
|
|
|
547
547
|
type TaobaoJipiaoSellerOrderNotify = Message & { content?: MessageContent & { topic?: 'taobao_jipiao_SellerOrderNotify', content?: string | Taobao.Jipiao.SellerOrderNotify } };
|
|
548
548
|
/** {@link Taobao.Jipiao.SellerRefundOrderNotify 淘宝机票 > 【机票代理商】退票订单通知} */
|
|
549
549
|
type TaobaoJipiaoSellerRefundOrderNotify = Message & { content?: MessageContent & { topic?: 'taobao_jipiao_SellerRefundOrderNotify', content?: string | Taobao.Jipiao.SellerRefundOrderNotify } };
|
|
550
|
+
/** {@link Taobao.Live.AgencyItemChanged 淘宝直播API > 直播严选机构商品池变化通知} */
|
|
551
|
+
type TaobaoLiveAgencyItemChanged = Message & { content?: MessageContent & { topic?: 'taobao_live_AgencyItemChanged', content?: string | Taobao.Live.AgencyItemChanged } };
|
|
550
552
|
/** {@link Taobao.Live.FeedRelated 淘宝直播API > 淘宝直播上下播消息} */
|
|
551
553
|
type TaobaoLiveFeedRelated = Message & { content?: MessageContent & { topic?: 'taobao_live_FeedRelated', content?: string | Taobao.Live.FeedRelated } };
|
|
552
554
|
/** {@link Taobao.Live.TcpOrder 淘宝直播API > 淘宝直播订单消息} */
|
|
@@ -573,6 +575,8 @@ declare namespace IncomingMessage {
|
|
|
573
575
|
type TaobaoOpencrmCrowdInstResult = Message & { content?: MessageContent & { topic?: 'taobao_opencrm_CrowdInstResult', content?: string | Taobao.Opencrm.CrowdInstResult } };
|
|
574
576
|
/** {@link Taobao.Opencrm.CrowdInstSaveResult 客户运营平台API > 人群快照另存为人群结果} */
|
|
575
577
|
type TaobaoOpencrmCrowdInstSaveResult = Message & { content?: MessageContent & { topic?: 'taobao_opencrm_CrowdInstSaveResult', content?: string | Taobao.Opencrm.CrowdInstSaveResult } };
|
|
578
|
+
/** {@link Taobao.Opencrm.DigitalTplExamine 客户运营平台API > 数字短信模板审核消息} */
|
|
579
|
+
type TaobaoOpencrmDigitalTplExamine = Message & { content?: MessageContent & { topic?: 'taobao_opencrm_DigitalTplExamine', content?: string | Taobao.Opencrm.DigitalTplExamine } };
|
|
576
580
|
/** {@link Taobao.Opencrm.Feedback 客户运营平台API > 反馈tmc} */
|
|
577
581
|
type TaobaoOpencrmFeedback = Message & { content?: MessageContent & { topic?: 'taobao_opencrm_Feedback', content?: string | Taobao.Opencrm.Feedback } };
|
|
578
582
|
/** {@link Taobao.Opencrm.MemberGradeChange 客户运营平台API > 会员等级变更} */
|
|
@@ -671,6 +675,8 @@ declare namespace IncomingMessage {
|
|
|
671
675
|
type TaobaoTaeItemUpShelf = Message & { content?: MessageContent & { topic?: 'taobao_tae_ItemUpShelf', content?: string | Taobao.Tae.ItemUpShelf } };
|
|
672
676
|
/** {@link Taobao.Top.AuthCancel 平台消息 > 取消授权消息通知} */
|
|
673
677
|
type TaobaoTopAuthCancel = Message & { content?: MessageContent & { topic?: 'taobao_top_AuthCancel', content?: string | Taobao.Top.AuthCancel } };
|
|
678
|
+
/** {@link Taobao.Top.ProcessCallback 平台消息 > 工作流执行回调消息} */
|
|
679
|
+
type TaobaoTopProcessCallback = Message & { content?: MessageContent & { topic?: 'taobao_top_ProcessCallback', content?: string | Taobao.Top.ProcessCallback } };
|
|
674
680
|
/** {@link Taobao.Topats.TaskComplete 平台消息 > 异步任务执行完成} */
|
|
675
681
|
type TaobaoTopatsTaskComplete = Message & { content?: MessageContent & { topic?: 'taobao_topats_TaskComplete', content?: string | Taobao.Topats.TaskComplete } };
|
|
676
682
|
/** {@link Taobao.Trade.AdvanceDisburse 淘宝交易 > 订单极速放款成功消息} */
|
|
@@ -1548,10 +1554,12 @@ declare namespace IncomingMessage {
|
|
|
1548
1554
|
| TaobaoJipiaoSellerOrderNotify
|
|
1549
1555
|
| TaobaoJipiaoSellerRefundOrderNotify;
|
|
1550
1556
|
/**
|
|
1557
|
+
* - {@link TaobaoLiveAgencyItemChanged 淘宝直播API > 直播严选机构商品池变化通知}
|
|
1551
1558
|
* - {@link TaobaoLiveFeedRelated 淘宝直播API > 淘宝直播上下播消息}
|
|
1552
1559
|
* - {@link TaobaoLiveTcpOrder 淘宝直播API > 淘宝直播订单消息}
|
|
1553
1560
|
*/
|
|
1554
|
-
type TaobaoLive =
|
|
1561
|
+
type TaobaoLive = TaobaoLiveAgencyItemChanged
|
|
1562
|
+
| TaobaoLiveFeedRelated
|
|
1555
1563
|
| TaobaoLiveTcpOrder;
|
|
1556
1564
|
/**
|
|
1557
1565
|
* - {@link TaobaoLogisticsLogsticDetailTrace 淘宝物流 > 物流详情跟踪消息}
|
|
@@ -1583,6 +1591,7 @@ declare namespace IncomingMessage {
|
|
|
1583
1591
|
* - {@link TaobaoOpencrmCardTplExamine 客户运营平台API > 卡片短信模板审核消息}
|
|
1584
1592
|
* - {@link TaobaoOpencrmCrowdInstResult 客户运营平台API > 人群快照生成结果}
|
|
1585
1593
|
* - {@link TaobaoOpencrmCrowdInstSaveResult 客户运营平台API > 人群快照另存为人群结果}
|
|
1594
|
+
* - {@link TaobaoOpencrmDigitalTplExamine 客户运营平台API > 数字短信模板审核消息}
|
|
1586
1595
|
* - {@link TaobaoOpencrmFeedback 客户运营平台API > 反馈tmc}
|
|
1587
1596
|
* - {@link TaobaoOpencrmMemberGradeChange 客户运营平台API > 会员等级变更}
|
|
1588
1597
|
* - {@link TaobaoOpencrmNodeExecuteFinished 客户运营平台API > 节点执行完成消息}
|
|
@@ -1596,6 +1605,7 @@ declare namespace IncomingMessage {
|
|
|
1596
1605
|
| TaobaoOpencrmCardTplExamine
|
|
1597
1606
|
| TaobaoOpencrmCrowdInstResult
|
|
1598
1607
|
| TaobaoOpencrmCrowdInstSaveResult
|
|
1608
|
+
| TaobaoOpencrmDigitalTplExamine
|
|
1599
1609
|
| TaobaoOpencrmFeedback
|
|
1600
1610
|
| TaobaoOpencrmMemberGradeChange
|
|
1601
1611
|
| TaobaoOpencrmNodeExecuteFinished
|
|
@@ -1703,8 +1713,10 @@ declare namespace IncomingMessage {
|
|
|
1703
1713
|
| TaobaoTaeItemUpShelf;
|
|
1704
1714
|
/**
|
|
1705
1715
|
* - {@link TaobaoTopAuthCancel 平台消息 > 取消授权消息通知}
|
|
1716
|
+
* - {@link TaobaoTopProcessCallback 平台消息 > 工作流执行回调消息}
|
|
1706
1717
|
*/
|
|
1707
|
-
type TaobaoTop = TaobaoTopAuthCancel
|
|
1718
|
+
type TaobaoTop = TaobaoTopAuthCancel
|
|
1719
|
+
| TaobaoTopProcessCallback;
|
|
1708
1720
|
/**
|
|
1709
1721
|
* - {@link TaobaoTopatsTaskComplete 平台消息 > 异步任务执行完成}
|
|
1710
1722
|
*/
|
package/types/taobao.d.ts
CHANGED
|
@@ -1327,6 +1327,12 @@ declare namespace Taobao.Jipiao {
|
|
|
1327
1327
|
|
|
1328
1328
|
/** 淘宝直播API */
|
|
1329
1329
|
declare namespace Taobao.Live {
|
|
1330
|
+
/** 直播严选机构商品池变化通知 */
|
|
1331
|
+
interface AgencyItemChanged {
|
|
1332
|
+
/** 机构openUid */
|
|
1333
|
+
agency_open_uid: string;
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1330
1336
|
/** 淘宝直播上下播消息 */
|
|
1331
1337
|
interface FeedRelated {
|
|
1332
1338
|
/** 主播openId */
|
|
@@ -1540,6 +1546,18 @@ declare namespace Taobao.Opencrm {
|
|
|
1540
1546
|
result_msg?: string;
|
|
1541
1547
|
}
|
|
1542
1548
|
|
|
1549
|
+
/** 数字短信模板审核消息 */
|
|
1550
|
+
interface DigitalTplExamine {
|
|
1551
|
+
/** 不通过 */
|
|
1552
|
+
error_msg?: string;
|
|
1553
|
+
/** 运营商类型 */
|
|
1554
|
+
operator_code: string;
|
|
1555
|
+
/** 审批状态,1:审批通过;2:审批不通过 */
|
|
1556
|
+
status: string;
|
|
1557
|
+
/** 模板id */
|
|
1558
|
+
template_id: number;
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1543
1561
|
/** 反馈tmc */
|
|
1544
1562
|
interface Feedback {
|
|
1545
1563
|
/** 消息体 */
|
|
@@ -2316,6 +2334,24 @@ declare namespace Taobao.Top {
|
|
|
2316
2334
|
/** 用户id */
|
|
2317
2335
|
user_id?: string;
|
|
2318
2336
|
}
|
|
2337
|
+
|
|
2338
|
+
/** 工作流执行回调消息 */
|
|
2339
|
+
interface ProcessCallback {
|
|
2340
|
+
/** 节点名称 */
|
|
2341
|
+
node_name?: string;
|
|
2342
|
+
/** 工作流运行实例id */
|
|
2343
|
+
process_instance_id: string;
|
|
2344
|
+
/** 备注 */
|
|
2345
|
+
remark?: string;
|
|
2346
|
+
/** 错误码 */
|
|
2347
|
+
sys_error_code?: string;
|
|
2348
|
+
/** 错误信息 */
|
|
2349
|
+
sys_error_msg?: string;
|
|
2350
|
+
/** 是否成功 */
|
|
2351
|
+
sys_success: boolean;
|
|
2352
|
+
/** traceId */
|
|
2353
|
+
trace_id: string;
|
|
2354
|
+
}
|
|
2319
2355
|
}
|
|
2320
2356
|
|
|
2321
2357
|
/** 平台消息 */
|