@open-dy/ai_coding_sdk 1.0.11 → 1.0.13
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 +31 -0
- package/dist/ai_platform_llm/client.d.ts +29 -0
- package/dist/ai_platform_llm/client.js +107 -0
- package/dist/ai_platform_llm/core.d.ts +21 -0
- package/dist/ai_platform_llm/core.js +193 -0
- package/dist/ai_platform_llm/index.d.ts +3 -0
- package/dist/ai_platform_llm/index.js +21 -0
- package/dist/ai_platform_llm/types.d.ts +292 -0
- package/dist/ai_platform_llm/types.js +2 -0
- package/dist/auth/access-token.d.ts +139 -0
- package/dist/auth/access-token.js +99 -0
- package/dist/auth/core.d.ts +15 -0
- package/dist/auth/core.js +76 -0
- package/dist/auth/index.d.ts +4 -0
- package/dist/auth/index.js +9 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/openapi/account/firm.d.ts +31 -0
- package/dist/openapi/account/firm.js +23 -0
- package/dist/openapi/account/homepage-data.d.ts +85 -0
- package/dist/openapi/account/homepage-data.js +109 -0
- package/dist/openapi/account/index.d.ts +16 -8
- package/dist/openapi/account/index.js +21 -8
- package/dist/openapi/account/mobile-hash.d.ts +20 -0
- package/dist/openapi/account/mobile-hash.js +22 -0
- package/dist/openapi/account/public-info.d.ts +32 -0
- package/dist/openapi/account/public-info.js +22 -0
- package/dist/openapi/business/index.d.ts +2 -1
- package/dist/openapi/business/index.js +7 -0
- package/dist/openapi/business/task.d.ts +116 -0
- package/dist/openapi/business/task.js +71 -0
- package/dist/openapi/comment/index.d.ts +2 -0
- package/dist/openapi/comment/index.js +7 -1
- package/dist/openapi/comment/manage.d.ts +118 -0
- package/dist/openapi/comment/manage.js +88 -0
- package/dist/openapi/content/index.d.ts +2 -0
- package/dist/openapi/content/index.js +5 -1
- package/dist/openapi/content/video-data.d.ts +94 -0
- package/dist/openapi/content/video-data.js +56 -0
- package/dist/openapi/im/group.d.ts +119 -0
- package/dist/openapi/im/group.js +91 -0
- package/dist/openapi/im/index.d.ts +2 -1
- package/dist/openapi/im/index.js +8 -0
- package/dist/openapi/index.d.ts +21 -11
- package/dist/openapi/index.js +64 -23
- package/dist/openapi/live/index.d.ts +2 -1
- package/dist/openapi/live/index.js +5 -0
- package/dist/openapi/live/room.d.ts +60 -0
- package/dist/openapi/live/room.js +42 -0
- package/dist/openapi/music/collection.d.ts +42 -0
- package/dist/openapi/music/collection.js +20 -0
- package/dist/openapi/music/index.d.ts +2 -0
- package/dist/openapi/music/index.js +6 -0
- package/dist/openapi/relation/fans.d.ts +72 -0
- package/dist/openapi/relation/fans.js +71 -0
- package/dist/openapi/relation/index.d.ts +4 -1
- package/dist/openapi/relation/index.js +10 -0
- package/dist/openapi/relation/social.d.ts +56 -0
- package/dist/openapi/relation/social.js +40 -0
- package/package.json +58 -2
package/dist/openapi/index.js
CHANGED
|
@@ -1,35 +1,76 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "callOpenAPI", { enumerable: true, get: function () { return core_1.callOpenAPI; } });
|
|
3
|
+
exports.getFansSource = exports.getFansProfile = exports.getFansFavourite = exports.checkFans = exports.topicSearch = exports.getUserFollowing = exports.getUserBasicData = exports.getMusicCollectionList = exports.queryRoomData = exports.getRoomRealTimeData = exports.setGroupSetting = exports.setGroupEnterAudit = exports.getGroupQuota = exports.getFansGroupList = exports.createFansGroup = exports.getHotList = exports.callOpenAPI = exports.getVideoPack = exports.getVideoDetailList = exports.getSingleVideoDetail = exports.getRecommend = exports.getHighQualityText = exports.getFollowHotWord = exports.getFollowFeed = exports.getFeed = exports.searchComment = exports.publishComment = exports.getCommentReplyList = exports.getCommentList = exports.diggComment = exports.deleteComment = exports.queryActivityUserCompletionStatus = exports.queryActivityInfo = exports.modifyActivity = exports.createActivity = exports.getUserShareData = exports.getUserPublicInfo = exports.getUserProfileData = exports.getUserLikeData = exports.getUserItemData = exports.getUserHashMobile = exports.getUserFansData = exports.getUserConstellation = exports.getUserCommentData = exports.getRelatedId = exports.getFirmSubjectDetail = exports.getAffiliateId = exports.getAIUserProfile = exports.getAIUserItemList = exports.getAIUserDataInfo = void 0;
|
|
4
|
+
exports.searchVision = exports.searchVideo = exports.searchUser = exports.searchPoi = exports.searchMusic = exports.searchLive = exports.searchGeneral = exports.searchExperience = exports.getUserFansProfile = exports.getFriendList = void 0;
|
|
6
5
|
var account_1 = require("./account");
|
|
7
|
-
Object.defineProperty(exports, "getUserConstellation", { enumerable: true, get: function () { return account_1.getUserConstellation; } });
|
|
8
|
-
Object.defineProperty(exports, "getRelatedId", { enumerable: true, get: function () { return account_1.getRelatedId; } });
|
|
9
|
-
Object.defineProperty(exports, "getAffiliateId", { enumerable: true, get: function () { return account_1.getAffiliateId; } });
|
|
10
|
-
Object.defineProperty(exports, "getAIUserProfile", { enumerable: true, get: function () { return account_1.getAIUserProfile; } });
|
|
11
6
|
Object.defineProperty(exports, "getAIUserDataInfo", { enumerable: true, get: function () { return account_1.getAIUserDataInfo; } });
|
|
12
7
|
Object.defineProperty(exports, "getAIUserItemList", { enumerable: true, get: function () { return account_1.getAIUserItemList; } });
|
|
8
|
+
Object.defineProperty(exports, "getAIUserProfile", { enumerable: true, get: function () { return account_1.getAIUserProfile; } });
|
|
9
|
+
Object.defineProperty(exports, "getAffiliateId", { enumerable: true, get: function () { return account_1.getAffiliateId; } });
|
|
10
|
+
Object.defineProperty(exports, "getFirmSubjectDetail", { enumerable: true, get: function () { return account_1.getFirmSubjectDetail; } });
|
|
11
|
+
Object.defineProperty(exports, "getRelatedId", { enumerable: true, get: function () { return account_1.getRelatedId; } });
|
|
12
|
+
Object.defineProperty(exports, "getUserCommentData", { enumerable: true, get: function () { return account_1.getUserCommentData; } });
|
|
13
|
+
Object.defineProperty(exports, "getUserConstellation", { enumerable: true, get: function () { return account_1.getUserConstellation; } });
|
|
14
|
+
Object.defineProperty(exports, "getUserFansData", { enumerable: true, get: function () { return account_1.getUserFansData; } });
|
|
15
|
+
Object.defineProperty(exports, "getUserHashMobile", { enumerable: true, get: function () { return account_1.getUserHashMobile; } });
|
|
16
|
+
Object.defineProperty(exports, "getUserItemData", { enumerable: true, get: function () { return account_1.getUserItemData; } });
|
|
17
|
+
Object.defineProperty(exports, "getUserLikeData", { enumerable: true, get: function () { return account_1.getUserLikeData; } });
|
|
18
|
+
Object.defineProperty(exports, "getUserProfileData", { enumerable: true, get: function () { return account_1.getUserProfileData; } });
|
|
19
|
+
Object.defineProperty(exports, "getUserPublicInfo", { enumerable: true, get: function () { return account_1.getUserPublicInfo; } });
|
|
20
|
+
Object.defineProperty(exports, "getUserShareData", { enumerable: true, get: function () { return account_1.getUserShareData; } });
|
|
21
|
+
var business_1 = require("./business");
|
|
22
|
+
Object.defineProperty(exports, "createActivity", { enumerable: true, get: function () { return business_1.createActivity; } });
|
|
23
|
+
Object.defineProperty(exports, "modifyActivity", { enumerable: true, get: function () { return business_1.modifyActivity; } });
|
|
24
|
+
Object.defineProperty(exports, "queryActivityInfo", { enumerable: true, get: function () { return business_1.queryActivityInfo; } });
|
|
25
|
+
Object.defineProperty(exports, "queryActivityUserCompletionStatus", { enumerable: true, get: function () { return business_1.queryActivityUserCompletionStatus; } });
|
|
26
|
+
var comment_1 = require("./comment");
|
|
27
|
+
Object.defineProperty(exports, "deleteComment", { enumerable: true, get: function () { return comment_1.deleteComment; } });
|
|
28
|
+
Object.defineProperty(exports, "diggComment", { enumerable: true, get: function () { return comment_1.diggComment; } });
|
|
29
|
+
Object.defineProperty(exports, "getCommentList", { enumerable: true, get: function () { return comment_1.getCommentList; } });
|
|
30
|
+
Object.defineProperty(exports, "getCommentReplyList", { enumerable: true, get: function () { return comment_1.getCommentReplyList; } });
|
|
31
|
+
Object.defineProperty(exports, "publishComment", { enumerable: true, get: function () { return comment_1.publishComment; } });
|
|
32
|
+
Object.defineProperty(exports, "searchComment", { enumerable: true, get: function () { return comment_1.searchComment; } });
|
|
13
33
|
var content_1 = require("./content");
|
|
34
|
+
Object.defineProperty(exports, "getFeed", { enumerable: true, get: function () { return content_1.getFeed; } });
|
|
35
|
+
Object.defineProperty(exports, "getFollowFeed", { enumerable: true, get: function () { return content_1.getFollowFeed; } });
|
|
36
|
+
Object.defineProperty(exports, "getFollowHotWord", { enumerable: true, get: function () { return content_1.getFollowHotWord; } });
|
|
14
37
|
Object.defineProperty(exports, "getHighQualityText", { enumerable: true, get: function () { return content_1.getHighQualityText; } });
|
|
15
38
|
Object.defineProperty(exports, "getRecommend", { enumerable: true, get: function () { return content_1.getRecommend; } });
|
|
16
|
-
Object.defineProperty(exports, "
|
|
17
|
-
Object.defineProperty(exports, "
|
|
18
|
-
Object.defineProperty(exports, "
|
|
39
|
+
Object.defineProperty(exports, "getSingleVideoDetail", { enumerable: true, get: function () { return content_1.getSingleVideoDetail; } });
|
|
40
|
+
Object.defineProperty(exports, "getVideoDetailList", { enumerable: true, get: function () { return content_1.getVideoDetailList; } });
|
|
41
|
+
Object.defineProperty(exports, "getVideoPack", { enumerable: true, get: function () { return content_1.getVideoPack; } });
|
|
42
|
+
var core_1 = require("./core");
|
|
43
|
+
Object.defineProperty(exports, "callOpenAPI", { enumerable: true, get: function () { return core_1.callOpenAPI; } });
|
|
44
|
+
var hot_1 = require("./hot");
|
|
45
|
+
Object.defineProperty(exports, "getHotList", { enumerable: true, get: function () { return hot_1.getHotList; } });
|
|
46
|
+
var im_1 = require("./im");
|
|
47
|
+
Object.defineProperty(exports, "createFansGroup", { enumerable: true, get: function () { return im_1.createFansGroup; } });
|
|
48
|
+
Object.defineProperty(exports, "getFansGroupList", { enumerable: true, get: function () { return im_1.getFansGroupList; } });
|
|
49
|
+
Object.defineProperty(exports, "getGroupQuota", { enumerable: true, get: function () { return im_1.getGroupQuota; } });
|
|
50
|
+
Object.defineProperty(exports, "setGroupEnterAudit", { enumerable: true, get: function () { return im_1.setGroupEnterAudit; } });
|
|
51
|
+
Object.defineProperty(exports, "setGroupSetting", { enumerable: true, get: function () { return im_1.setGroupSetting; } });
|
|
52
|
+
var live_1 = require("./live");
|
|
53
|
+
Object.defineProperty(exports, "getRoomRealTimeData", { enumerable: true, get: function () { return live_1.getRoomRealTimeData; } });
|
|
54
|
+
Object.defineProperty(exports, "queryRoomData", { enumerable: true, get: function () { return live_1.queryRoomData; } });
|
|
55
|
+
var music_1 = require("./music");
|
|
56
|
+
Object.defineProperty(exports, "getMusicCollectionList", { enumerable: true, get: function () { return music_1.getMusicCollectionList; } });
|
|
57
|
+
var platform_1 = require("./platform");
|
|
58
|
+
Object.defineProperty(exports, "getUserBasicData", { enumerable: true, get: function () { return platform_1.getUserBasicData; } });
|
|
59
|
+
Object.defineProperty(exports, "getUserFollowing", { enumerable: true, get: function () { return platform_1.getUserFollowing; } });
|
|
60
|
+
Object.defineProperty(exports, "topicSearch", { enumerable: true, get: function () { return platform_1.topicSearch; } });
|
|
61
|
+
var relation_1 = require("./relation");
|
|
62
|
+
Object.defineProperty(exports, "checkFans", { enumerable: true, get: function () { return relation_1.checkFans; } });
|
|
63
|
+
Object.defineProperty(exports, "getFansFavourite", { enumerable: true, get: function () { return relation_1.getFansFavourite; } });
|
|
64
|
+
Object.defineProperty(exports, "getFansProfile", { enumerable: true, get: function () { return relation_1.getFansProfile; } });
|
|
65
|
+
Object.defineProperty(exports, "getFansSource", { enumerable: true, get: function () { return relation_1.getFansSource; } });
|
|
66
|
+
Object.defineProperty(exports, "getFriendList", { enumerable: true, get: function () { return relation_1.getFriendList; } });
|
|
67
|
+
Object.defineProperty(exports, "getUserFansProfile", { enumerable: true, get: function () { return relation_1.getUserFansProfile; } });
|
|
19
68
|
var search_1 = require("./search");
|
|
20
|
-
Object.defineProperty(exports, "searchVideo", { enumerable: true, get: function () { return search_1.searchVideo; } });
|
|
21
|
-
Object.defineProperty(exports, "searchUser", { enumerable: true, get: function () { return search_1.searchUser; } });
|
|
22
|
-
Object.defineProperty(exports, "searchLive", { enumerable: true, get: function () { return search_1.searchLive; } });
|
|
23
69
|
Object.defineProperty(exports, "searchExperience", { enumerable: true, get: function () { return search_1.searchExperience; } });
|
|
24
|
-
Object.defineProperty(exports, "searchMusic", { enumerable: true, get: function () { return search_1.searchMusic; } });
|
|
25
70
|
Object.defineProperty(exports, "searchGeneral", { enumerable: true, get: function () { return search_1.searchGeneral; } });
|
|
26
|
-
Object.defineProperty(exports, "
|
|
71
|
+
Object.defineProperty(exports, "searchLive", { enumerable: true, get: function () { return search_1.searchLive; } });
|
|
72
|
+
Object.defineProperty(exports, "searchMusic", { enumerable: true, get: function () { return search_1.searchMusic; } });
|
|
27
73
|
Object.defineProperty(exports, "searchPoi", { enumerable: true, get: function () { return search_1.searchPoi; } });
|
|
28
|
-
|
|
29
|
-
Object.defineProperty(exports, "
|
|
30
|
-
|
|
31
|
-
Object.defineProperty(exports, "topicSearch", { enumerable: true, get: function () { return platform_1.topicSearch; } });
|
|
32
|
-
Object.defineProperty(exports, "getUserFollowing", { enumerable: true, get: function () { return platform_1.getUserFollowing; } });
|
|
33
|
-
Object.defineProperty(exports, "getUserBasicData", { enumerable: true, get: function () { return platform_1.getUserBasicData; } });
|
|
34
|
-
var hot_1 = require("./hot");
|
|
35
|
-
Object.defineProperty(exports, "getHotList", { enumerable: true, get: function () { return hot_1.getHotList; } });
|
|
74
|
+
Object.defineProperty(exports, "searchUser", { enumerable: true, get: function () { return search_1.searchUser; } });
|
|
75
|
+
Object.defineProperty(exports, "searchVideo", { enumerable: true, get: function () { return search_1.searchVideo; } });
|
|
76
|
+
Object.defineProperty(exports, "searchVision", { enumerable: true, get: function () { return search_1.searchVision; } });
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { getRoomRealTimeData, queryRoomData } from './room';
|
|
2
|
+
export type { RoomRealTimeQueryParams, RoomRealTimeRequest, RoomRealTimeResponse, RoomDataQueryParams, RoomDataQueryRequest, RoomDataQueryResponse, } from './room';
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.queryRoomData = exports.getRoomRealTimeData = void 0;
|
|
4
|
+
// ulive相关 OpenAPI
|
|
5
|
+
var room_1 = require("./room");
|
|
6
|
+
Object.defineProperty(exports, "getRoomRealTimeData", { enumerable: true, get: function () { return room_1.getRoomRealTimeData; } });
|
|
7
|
+
Object.defineProperty(exports, "queryRoomData", { enumerable: true, get: function () { return room_1.queryRoomData; } });
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
|
+
export interface RoomRealTimeQueryParams {
|
|
3
|
+
/** 调用方用户 open_id,通过 /oauth/access_token/ 获取 */
|
|
4
|
+
open_id: string;
|
|
5
|
+
/** 被查询的目标用户 open_id */
|
|
6
|
+
query_user_open_id: string;
|
|
7
|
+
/** 直播间 ID */
|
|
8
|
+
room_id: string;
|
|
9
|
+
}
|
|
10
|
+
export interface RoomRealTimeRequest {
|
|
11
|
+
/** 推广短视频排序字段 */
|
|
12
|
+
PromotionShortVideoOrderField?: string;
|
|
13
|
+
/** 数据分组列表 */
|
|
14
|
+
DataGroupList?: string[];
|
|
15
|
+
/** 趋势粒度 */
|
|
16
|
+
TrendUnit?: string;
|
|
17
|
+
/** 转化数据粒度 */
|
|
18
|
+
ConvertDataUnit?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface RoomRealTimeResponse {
|
|
21
|
+
/** 直播间实时流量数据,字段以实际接口返回为准 */
|
|
22
|
+
room_data?: Record<string, unknown>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 获取直播间实时流量数据
|
|
26
|
+
*
|
|
27
|
+
* - Path: `/api/douyin/v1/data/room_real_time/`
|
|
28
|
+
* - Capability: `dy.open.live_room_data`
|
|
29
|
+
* - Scope: `live.room.base.realtime`
|
|
30
|
+
* - 需要用户授权: 是
|
|
31
|
+
*
|
|
32
|
+
* @remarks `open_id`、`query_user_open_id`、`room_id` 通过 query 传递,
|
|
33
|
+
* 数据维度筛选条件通过 body 传递。
|
|
34
|
+
*/
|
|
35
|
+
export declare function getRoomRealTimeData(params: RoomRealTimeQueryParams, body?: RoomRealTimeRequest, options?: CallOptions): Promise<OpenAPIResponse<RoomRealTimeResponse>>;
|
|
36
|
+
export interface RoomDataQueryParams {
|
|
37
|
+
/** 调用方用户 open_id,通过 /oauth/access_token/ 获取 */
|
|
38
|
+
open_id: string;
|
|
39
|
+
}
|
|
40
|
+
export interface RoomDataQueryRequest {
|
|
41
|
+
/** 直播业务 ID */
|
|
42
|
+
live_id?: number;
|
|
43
|
+
/** 直播 webcast app id */
|
|
44
|
+
webcast_app_id?: number;
|
|
45
|
+
/** 直播间 ID 列表 */
|
|
46
|
+
room_ids: string[];
|
|
47
|
+
}
|
|
48
|
+
export interface RoomDataQueryResponse {
|
|
49
|
+
/** 直播间信息列表,字段以实际接口返回为准 */
|
|
50
|
+
room_list?: Array<Record<string, unknown>>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 通过 roomID 列表获取对应直播间的相关信息(v2)
|
|
54
|
+
*
|
|
55
|
+
* - Path: `/api/douyin/v2/room/room_data_query/`
|
|
56
|
+
* - Capability: `dy.open.live_room_data`
|
|
57
|
+
* - Scope: `live.room.base.realtime`
|
|
58
|
+
* - 需要用户授权: 是
|
|
59
|
+
*/
|
|
60
|
+
export declare function queryRoomData(params: RoomDataQueryParams, body: RoomDataQueryRequest, options?: CallOptions): Promise<OpenAPIResponse<RoomDataQueryResponse>>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRoomRealTimeData = getRoomRealTimeData;
|
|
4
|
+
exports.queryRoomData = queryRoomData;
|
|
5
|
+
const core_1 = require("../core");
|
|
6
|
+
/**
|
|
7
|
+
* 获取直播间实时流量数据
|
|
8
|
+
*
|
|
9
|
+
* - Path: `/api/douyin/v1/data/room_real_time/`
|
|
10
|
+
* - Capability: `dy.open.live_room_data`
|
|
11
|
+
* - Scope: `live.room.base.realtime`
|
|
12
|
+
* - 需要用户授权: 是
|
|
13
|
+
*
|
|
14
|
+
* @remarks `open_id`、`query_user_open_id`、`room_id` 通过 query 传递,
|
|
15
|
+
* 数据维度筛选条件通过 body 传递。
|
|
16
|
+
*/
|
|
17
|
+
async function getRoomRealTimeData(params, body, options) {
|
|
18
|
+
return (0, core_1.callOpenAPI)({
|
|
19
|
+
path: '/api/douyin/v1/data/room_real_time/',
|
|
20
|
+
method: 'POST',
|
|
21
|
+
queryParams: params,
|
|
22
|
+
body: body ?? {},
|
|
23
|
+
domain: 'open.douyin.com',
|
|
24
|
+
}, options);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 通过 roomID 列表获取对应直播间的相关信息(v2)
|
|
28
|
+
*
|
|
29
|
+
* - Path: `/api/douyin/v2/room/room_data_query/`
|
|
30
|
+
* - Capability: `dy.open.live_room_data`
|
|
31
|
+
* - Scope: `live.room.base.realtime`
|
|
32
|
+
* - 需要用户授权: 是
|
|
33
|
+
*/
|
|
34
|
+
async function queryRoomData(params, body, options) {
|
|
35
|
+
return (0, core_1.callOpenAPI)({
|
|
36
|
+
path: '/api/douyin/v2/room/room_data_query/',
|
|
37
|
+
method: 'POST',
|
|
38
|
+
queryParams: params,
|
|
39
|
+
body,
|
|
40
|
+
domain: 'open.douyin.com',
|
|
41
|
+
}, options);
|
|
42
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
|
+
export interface MusicCollectionListParams {
|
|
3
|
+
/** 用户 open_id,通过 /oauth/access_token/ 获取 */
|
|
4
|
+
open_id: string;
|
|
5
|
+
/** 分页游标,第一页传 0 */
|
|
6
|
+
cursor?: number;
|
|
7
|
+
/** 每页数量 */
|
|
8
|
+
count?: number;
|
|
9
|
+
/** 音乐场景,默认 default */
|
|
10
|
+
music_scene?: string;
|
|
11
|
+
/** 时间戳是否使用微秒,默认 false */
|
|
12
|
+
use_microsecond?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface MusicCollectionItem {
|
|
15
|
+
/** 音乐 ID */
|
|
16
|
+
music_id?: string;
|
|
17
|
+
/** 音乐标题 */
|
|
18
|
+
title?: string;
|
|
19
|
+
/** 作者 */
|
|
20
|
+
author?: string;
|
|
21
|
+
/** 时长(秒) */
|
|
22
|
+
duration?: number;
|
|
23
|
+
/** 封面地址 */
|
|
24
|
+
cover?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface MusicCollectionListResponse {
|
|
27
|
+
/** 收藏音乐列表 */
|
|
28
|
+
list?: MusicCollectionItem[];
|
|
29
|
+
/** 下一页游标 */
|
|
30
|
+
cursor?: number;
|
|
31
|
+
/** 是否还有更多 */
|
|
32
|
+
has_more?: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 获取用户收藏音乐列表
|
|
36
|
+
*
|
|
37
|
+
* - Path: `/music/collection/list/`
|
|
38
|
+
* - Capability: `dy.open.music.collection.list`
|
|
39
|
+
* - Scope: `music.collection.list`
|
|
40
|
+
* - 需要用户授权: 是(按表格 F 列配置,调用前需用户授权 `music.collection.list` scope)
|
|
41
|
+
*/
|
|
42
|
+
export declare function getMusicCollectionList(params: MusicCollectionListParams, options?: CallOptions): Promise<OpenAPIResponse<MusicCollectionListResponse>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMusicCollectionList = getMusicCollectionList;
|
|
4
|
+
const core_1 = require("../core");
|
|
5
|
+
/**
|
|
6
|
+
* 获取用户收藏音乐列表
|
|
7
|
+
*
|
|
8
|
+
* - Path: `/music/collection/list/`
|
|
9
|
+
* - Capability: `dy.open.music.collection.list`
|
|
10
|
+
* - Scope: `music.collection.list`
|
|
11
|
+
* - 需要用户授权: 是(按表格 F 列配置,调用前需用户授权 `music.collection.list` scope)
|
|
12
|
+
*/
|
|
13
|
+
async function getMusicCollectionList(params, options) {
|
|
14
|
+
return (0, core_1.callOpenAPI)({
|
|
15
|
+
path: '/music/collection/list/',
|
|
16
|
+
method: 'GET',
|
|
17
|
+
queryParams: params,
|
|
18
|
+
domain: 'open.douyin.com',
|
|
19
|
+
}, options);
|
|
20
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMusicCollectionList = void 0;
|
|
4
|
+
// 音乐相关 OpenAPI
|
|
5
|
+
var collection_1 = require("./collection");
|
|
6
|
+
Object.defineProperty(exports, "getMusicCollectionList", { enumerable: true, get: function () { return collection_1.getMusicCollectionList; } });
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
|
+
export interface FansDataParams {
|
|
3
|
+
/** 用户 open_id,通过 /oauth/access_token/ 获取 */
|
|
4
|
+
open_id: string;
|
|
5
|
+
}
|
|
6
|
+
/** 分布项:维度取值与占比 */
|
|
7
|
+
export interface DistributionItem {
|
|
8
|
+
/** 维度取值(如性别、年龄段、地域名称) */
|
|
9
|
+
item?: string;
|
|
10
|
+
/** 占比,0~1 */
|
|
11
|
+
value?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface FansSourceResponse {
|
|
14
|
+
/** 粉丝来源分布,字段以实际接口返回为准 */
|
|
15
|
+
fans_source?: DistributionItem[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* 获取粉丝来源数据
|
|
19
|
+
*
|
|
20
|
+
* - Path: `/data/extern/fans/source/`
|
|
21
|
+
* - Capability: `dy.open.fans_statistics`
|
|
22
|
+
* - Scope: `data.external.fans_source`
|
|
23
|
+
* - 需要用户授权: 是
|
|
24
|
+
*/
|
|
25
|
+
export declare function getFansSource(params: FansDataParams, options?: CallOptions): Promise<OpenAPIResponse<FansSourceResponse>>;
|
|
26
|
+
export interface FansProfileResponse {
|
|
27
|
+
/** 性别分布 */
|
|
28
|
+
gender_distributions?: DistributionItem[];
|
|
29
|
+
/** 年龄分布 */
|
|
30
|
+
age_distributions?: DistributionItem[];
|
|
31
|
+
/** 地域分布 */
|
|
32
|
+
geographical_distributions?: DistributionItem[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 获取粉丝画像数据
|
|
36
|
+
*
|
|
37
|
+
* - Path: `/fans/data/`
|
|
38
|
+
* - Capability: `dy.open.fans_statistics`
|
|
39
|
+
* - Scope: `fans.data`
|
|
40
|
+
* - 需要用户授权: 是
|
|
41
|
+
*/
|
|
42
|
+
export declare function getFansProfile(params: FansDataParams, options?: CallOptions): Promise<OpenAPIResponse<FansProfileResponse>>;
|
|
43
|
+
/**
|
|
44
|
+
* 查询用户的粉丝数据(性别 / 年龄 / 地域分布)
|
|
45
|
+
*
|
|
46
|
+
* - Path: `/api/douyin/v1/user/fans_data/`
|
|
47
|
+
* - Capability: `dy.open.fans_statistics`
|
|
48
|
+
* - Scope: `fans.data.bind`
|
|
49
|
+
* - 需要用户授权: 是
|
|
50
|
+
*/
|
|
51
|
+
export declare function getUserFansProfile(params: FansDataParams, options?: CallOptions): Promise<OpenAPIResponse<FansProfileResponse>>;
|
|
52
|
+
export interface FansFavouriteItem {
|
|
53
|
+
/** 评论 ID */
|
|
54
|
+
comment_id?: string;
|
|
55
|
+
/** 评论内容 */
|
|
56
|
+
text?: string;
|
|
57
|
+
/** 点赞数 */
|
|
58
|
+
digg_count?: number;
|
|
59
|
+
}
|
|
60
|
+
export interface FansFavouriteResponse {
|
|
61
|
+
/** 粉丝热评列表 */
|
|
62
|
+
list?: FansFavouriteItem[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* 获取用户粉丝热评
|
|
66
|
+
*
|
|
67
|
+
* - Path: `/data/extern/fans/comment/`
|
|
68
|
+
* - Capability: `dy.open.fans_statistics`
|
|
69
|
+
* - Scope: `data.external.fans_favourite`
|
|
70
|
+
* - 需要用户授权: 是
|
|
71
|
+
*/
|
|
72
|
+
export declare function getFansFavourite(params: FansDataParams, options?: CallOptions): Promise<OpenAPIResponse<FansFavouriteResponse>>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFansSource = getFansSource;
|
|
4
|
+
exports.getFansProfile = getFansProfile;
|
|
5
|
+
exports.getUserFansProfile = getUserFansProfile;
|
|
6
|
+
exports.getFansFavourite = getFansFavourite;
|
|
7
|
+
const core_1 = require("../core");
|
|
8
|
+
/**
|
|
9
|
+
* 获取粉丝来源数据
|
|
10
|
+
*
|
|
11
|
+
* - Path: `/data/extern/fans/source/`
|
|
12
|
+
* - Capability: `dy.open.fans_statistics`
|
|
13
|
+
* - Scope: `data.external.fans_source`
|
|
14
|
+
* - 需要用户授权: 是
|
|
15
|
+
*/
|
|
16
|
+
async function getFansSource(params, options) {
|
|
17
|
+
return (0, core_1.callOpenAPI)({
|
|
18
|
+
path: '/data/extern/fans/source/',
|
|
19
|
+
method: 'GET',
|
|
20
|
+
queryParams: params,
|
|
21
|
+
domain: 'open.douyin.com',
|
|
22
|
+
}, options);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 获取粉丝画像数据
|
|
26
|
+
*
|
|
27
|
+
* - Path: `/fans/data/`
|
|
28
|
+
* - Capability: `dy.open.fans_statistics`
|
|
29
|
+
* - Scope: `fans.data`
|
|
30
|
+
* - 需要用户授权: 是
|
|
31
|
+
*/
|
|
32
|
+
async function getFansProfile(params, options) {
|
|
33
|
+
return (0, core_1.callOpenAPI)({
|
|
34
|
+
path: '/fans/data/',
|
|
35
|
+
method: 'GET',
|
|
36
|
+
queryParams: params,
|
|
37
|
+
domain: 'open.douyin.com',
|
|
38
|
+
}, options);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* 查询用户的粉丝数据(性别 / 年龄 / 地域分布)
|
|
42
|
+
*
|
|
43
|
+
* - Path: `/api/douyin/v1/user/fans_data/`
|
|
44
|
+
* - Capability: `dy.open.fans_statistics`
|
|
45
|
+
* - Scope: `fans.data.bind`
|
|
46
|
+
* - 需要用户授权: 是
|
|
47
|
+
*/
|
|
48
|
+
async function getUserFansProfile(params, options) {
|
|
49
|
+
return (0, core_1.callOpenAPI)({
|
|
50
|
+
path: '/api/douyin/v1/user/fans_data/',
|
|
51
|
+
method: 'GET',
|
|
52
|
+
queryParams: params,
|
|
53
|
+
domain: 'open.douyin.com',
|
|
54
|
+
}, options);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* 获取用户粉丝热评
|
|
58
|
+
*
|
|
59
|
+
* - Path: `/data/extern/fans/comment/`
|
|
60
|
+
* - Capability: `dy.open.fans_statistics`
|
|
61
|
+
* - Scope: `data.external.fans_favourite`
|
|
62
|
+
* - 需要用户授权: 是
|
|
63
|
+
*/
|
|
64
|
+
async function getFansFavourite(params, options) {
|
|
65
|
+
return (0, core_1.callOpenAPI)({
|
|
66
|
+
path: '/data/extern/fans/comment/',
|
|
67
|
+
method: 'GET',
|
|
68
|
+
queryParams: params,
|
|
69
|
+
domain: 'open.douyin.com',
|
|
70
|
+
}, options);
|
|
71
|
+
}
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { checkFans, getFriendList } from './social';
|
|
2
|
+
export type { FansCheckParams, FansCheckResponse, FriendListParams, FriendUser, FriendListResponse, } from './social';
|
|
3
|
+
export { getFansSource, getFansProfile, getUserFansProfile, getFansFavourite, } from './fans';
|
|
4
|
+
export type { FansDataParams, DistributionItem, FansSourceResponse, FansProfileResponse, FansFavouriteItem, FansFavouriteResponse, } from './fans';
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFansFavourite = exports.getUserFansProfile = exports.getFansProfile = exports.getFansSource = exports.getFriendList = exports.checkFans = void 0;
|
|
4
|
+
// urelation相关 OpenAPI
|
|
5
|
+
var social_1 = require("./social");
|
|
6
|
+
Object.defineProperty(exports, "checkFans", { enumerable: true, get: function () { return social_1.checkFans; } });
|
|
7
|
+
Object.defineProperty(exports, "getFriendList", { enumerable: true, get: function () { return social_1.getFriendList; } });
|
|
8
|
+
var fans_1 = require("./fans");
|
|
9
|
+
Object.defineProperty(exports, "getFansSource", { enumerable: true, get: function () { return fans_1.getFansSource; } });
|
|
10
|
+
Object.defineProperty(exports, "getFansProfile", { enumerable: true, get: function () { return fans_1.getFansProfile; } });
|
|
11
|
+
Object.defineProperty(exports, "getUserFansProfile", { enumerable: true, get: function () { return fans_1.getUserFansProfile; } });
|
|
12
|
+
Object.defineProperty(exports, "getFansFavourite", { enumerable: true, get: function () { return fans_1.getFansFavourite; } });
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
|
+
export interface FansCheckParams {
|
|
3
|
+
/** 被关注用户 A 的 open_id */
|
|
4
|
+
open_id: string;
|
|
5
|
+
/** 关注者用户 B 的 open_id */
|
|
6
|
+
follower_open_id: string;
|
|
7
|
+
}
|
|
8
|
+
export interface FansCheckResponse {
|
|
9
|
+
/** 用户 B 是否关注了用户 A */
|
|
10
|
+
is_follow?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 判断用户是否关注了某用户
|
|
14
|
+
*
|
|
15
|
+
* - Path: `/fans/check/`
|
|
16
|
+
* - Capability: `dy.open.fans_statistics`
|
|
17
|
+
* - Scope: `fans.check`
|
|
18
|
+
* - 需要用户授权: 是
|
|
19
|
+
*
|
|
20
|
+
* @remarks 通过用户 B 的 open_id(follower_open_id)与用户 A 的 open_id 的关系,
|
|
21
|
+
* 判断用户 B 是否关注了用户 A。
|
|
22
|
+
*/
|
|
23
|
+
export declare function checkFans(params: FansCheckParams, options?: CallOptions): Promise<OpenAPIResponse<FansCheckResponse>>;
|
|
24
|
+
export interface FriendListParams {
|
|
25
|
+
/** 用户 open_id,通过 /oauth/access_token/ 获取 */
|
|
26
|
+
open_id: string;
|
|
27
|
+
/** 分页偏移量 */
|
|
28
|
+
offset?: number;
|
|
29
|
+
/** 每页数量 */
|
|
30
|
+
count?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface FriendUser {
|
|
33
|
+
/** 好友 open_id */
|
|
34
|
+
open_id?: string;
|
|
35
|
+
/** 好友昵称 */
|
|
36
|
+
nickname?: string;
|
|
37
|
+
/** 好友头像 */
|
|
38
|
+
avatar?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface FriendListResponse {
|
|
41
|
+
/** 互关好友列表 */
|
|
42
|
+
list?: FriendUser[];
|
|
43
|
+
/** 下一页偏移量 */
|
|
44
|
+
offset?: number;
|
|
45
|
+
/** 是否还有更多 */
|
|
46
|
+
has_more?: boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 获取用户互相关注(互关)列表
|
|
50
|
+
*
|
|
51
|
+
* - Path: `/friend/list/`
|
|
52
|
+
* - Capability: `dy.open.friend.list`
|
|
53
|
+
* - Scope: `friend.list`
|
|
54
|
+
* - 需要用户授权: 是
|
|
55
|
+
*/
|
|
56
|
+
export declare function getFriendList(params: FriendListParams, options?: CallOptions): Promise<OpenAPIResponse<FriendListResponse>>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkFans = checkFans;
|
|
4
|
+
exports.getFriendList = getFriendList;
|
|
5
|
+
const core_1 = require("../core");
|
|
6
|
+
/**
|
|
7
|
+
* 判断用户是否关注了某用户
|
|
8
|
+
*
|
|
9
|
+
* - Path: `/fans/check/`
|
|
10
|
+
* - Capability: `dy.open.fans_statistics`
|
|
11
|
+
* - Scope: `fans.check`
|
|
12
|
+
* - 需要用户授权: 是
|
|
13
|
+
*
|
|
14
|
+
* @remarks 通过用户 B 的 open_id(follower_open_id)与用户 A 的 open_id 的关系,
|
|
15
|
+
* 判断用户 B 是否关注了用户 A。
|
|
16
|
+
*/
|
|
17
|
+
async function checkFans(params, options) {
|
|
18
|
+
return (0, core_1.callOpenAPI)({
|
|
19
|
+
path: '/fans/check/',
|
|
20
|
+
method: 'GET',
|
|
21
|
+
queryParams: params,
|
|
22
|
+
domain: 'open.douyin.com',
|
|
23
|
+
}, options);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 获取用户互相关注(互关)列表
|
|
27
|
+
*
|
|
28
|
+
* - Path: `/friend/list/`
|
|
29
|
+
* - Capability: `dy.open.friend.list`
|
|
30
|
+
* - Scope: `friend.list`
|
|
31
|
+
* - 需要用户授权: 是
|
|
32
|
+
*/
|
|
33
|
+
async function getFriendList(params, options) {
|
|
34
|
+
return (0, core_1.callOpenAPI)({
|
|
35
|
+
path: '/friend/list/',
|
|
36
|
+
method: 'GET',
|
|
37
|
+
queryParams: params,
|
|
38
|
+
domain: 'open.douyin.com',
|
|
39
|
+
}, options);
|
|
40
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-dy/ai_coding_sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "AI Coding SDK — 抖音开放平台 OpenAPI 客户端与工具集",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -85,6 +85,62 @@
|
|
|
85
85
|
"./openapi/platform/*": {
|
|
86
86
|
"types": "./dist/openapi/platform/*.d.ts",
|
|
87
87
|
"default": "./dist/openapi/platform/*.js"
|
|
88
|
+
},
|
|
89
|
+
"./openapi/live": {
|
|
90
|
+
"types": "./dist/openapi/live/index.d.ts",
|
|
91
|
+
"default": "./dist/openapi/live/index.js"
|
|
92
|
+
},
|
|
93
|
+
"./openapi/live/*": {
|
|
94
|
+
"types": "./dist/openapi/live/*.d.ts",
|
|
95
|
+
"default": "./dist/openapi/live/*.js"
|
|
96
|
+
},
|
|
97
|
+
"./openapi/relation": {
|
|
98
|
+
"types": "./dist/openapi/relation/index.d.ts",
|
|
99
|
+
"default": "./dist/openapi/relation/index.js"
|
|
100
|
+
},
|
|
101
|
+
"./openapi/relation/*": {
|
|
102
|
+
"types": "./dist/openapi/relation/*.d.ts",
|
|
103
|
+
"default": "./dist/openapi/relation/*.js"
|
|
104
|
+
},
|
|
105
|
+
"./openapi/im": {
|
|
106
|
+
"types": "./dist/openapi/im/index.d.ts",
|
|
107
|
+
"default": "./dist/openapi/im/index.js"
|
|
108
|
+
},
|
|
109
|
+
"./openapi/im/*": {
|
|
110
|
+
"types": "./dist/openapi/im/*.d.ts",
|
|
111
|
+
"default": "./dist/openapi/im/*.js"
|
|
112
|
+
},
|
|
113
|
+
"./openapi/business": {
|
|
114
|
+
"types": "./dist/openapi/business/index.d.ts",
|
|
115
|
+
"default": "./dist/openapi/business/index.js"
|
|
116
|
+
},
|
|
117
|
+
"./openapi/business/*": {
|
|
118
|
+
"types": "./dist/openapi/business/*.d.ts",
|
|
119
|
+
"default": "./dist/openapi/business/*.js"
|
|
120
|
+
},
|
|
121
|
+
"./openapi/music": {
|
|
122
|
+
"types": "./dist/openapi/music/index.d.ts",
|
|
123
|
+
"default": "./dist/openapi/music/index.js"
|
|
124
|
+
},
|
|
125
|
+
"./openapi/music/*": {
|
|
126
|
+
"types": "./dist/openapi/music/*.d.ts",
|
|
127
|
+
"default": "./dist/openapi/music/*.js"
|
|
128
|
+
},
|
|
129
|
+
"./auth": {
|
|
130
|
+
"types": "./dist/auth/index.d.ts",
|
|
131
|
+
"default": "./dist/auth/index.js"
|
|
132
|
+
},
|
|
133
|
+
"./auth/*": {
|
|
134
|
+
"types": "./dist/auth/*.d.ts",
|
|
135
|
+
"default": "./dist/auth/*.js"
|
|
136
|
+
},
|
|
137
|
+
"./ai_platform_llm": {
|
|
138
|
+
"types": "./dist/ai_platform_llm/index.d.ts",
|
|
139
|
+
"default": "./dist/ai_platform_llm/index.js"
|
|
140
|
+
},
|
|
141
|
+
"./ai_platform_llm/*": {
|
|
142
|
+
"types": "./dist/ai_platform_llm/*.d.ts",
|
|
143
|
+
"default": "./dist/ai_platform_llm/*.js"
|
|
88
144
|
}
|
|
89
145
|
}
|
|
90
|
-
}
|
|
146
|
+
}
|