@open-dy/ai_coding_sdk 1.0.12 → 1.0.14

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.
Files changed (53) hide show
  1. package/README.md +3 -9
  2. package/dist/ai_platform_llm/core.d.ts +1 -2
  3. package/dist/ai_platform_llm/core.js +0 -36
  4. package/dist/ai_platform_llm/index.d.ts +3 -4
  5. package/dist/ai_platform_llm/index.js +3 -7
  6. package/dist/ai_platform_llm/types.d.ts +0 -20
  7. package/dist/openapi/account/certification.d.ts +27 -1
  8. package/dist/openapi/account/certification.js +20 -0
  9. package/dist/openapi/account/firm.d.ts +31 -0
  10. package/dist/openapi/account/firm.js +23 -0
  11. package/dist/openapi/account/homepage-data.d.ts +85 -0
  12. package/dist/openapi/account/homepage-data.js +109 -0
  13. package/dist/openapi/account/index.d.ts +18 -8
  14. package/dist/openapi/account/index.js +23 -8
  15. package/dist/openapi/account/mobile-hash.d.ts +20 -0
  16. package/dist/openapi/account/mobile-hash.js +22 -0
  17. package/dist/openapi/account/public-info.d.ts +32 -0
  18. package/dist/openapi/account/public-info.js +22 -0
  19. package/dist/openapi/business/index.d.ts +2 -1
  20. package/dist/openapi/business/index.js +7 -0
  21. package/dist/openapi/business/task.d.ts +116 -0
  22. package/dist/openapi/business/task.js +71 -0
  23. package/dist/openapi/comment/index.d.ts +2 -0
  24. package/dist/openapi/comment/index.js +7 -1
  25. package/dist/openapi/comment/manage.d.ts +118 -0
  26. package/dist/openapi/comment/manage.js +88 -0
  27. package/dist/openapi/content/index.d.ts +2 -0
  28. package/dist/openapi/content/index.js +5 -1
  29. package/dist/openapi/content/video-data.d.ts +94 -0
  30. package/dist/openapi/content/video-data.js +56 -0
  31. package/dist/openapi/im/group.d.ts +119 -0
  32. package/dist/openapi/im/group.js +91 -0
  33. package/dist/openapi/im/index.d.ts +2 -1
  34. package/dist/openapi/im/index.js +8 -0
  35. package/dist/openapi/index.d.ts +21 -11
  36. package/dist/openapi/index.js +64 -22
  37. package/dist/openapi/live/index.d.ts +2 -1
  38. package/dist/openapi/live/index.js +5 -0
  39. package/dist/openapi/live/room.d.ts +60 -0
  40. package/dist/openapi/live/room.js +42 -0
  41. package/dist/openapi/music/collection.d.ts +42 -0
  42. package/dist/openapi/music/collection.js +20 -0
  43. package/dist/openapi/music/index.d.ts +2 -0
  44. package/dist/openapi/music/index.js +6 -0
  45. package/dist/openapi/relation/fans.d.ts +72 -0
  46. package/dist/openapi/relation/fans.js +71 -0
  47. package/dist/openapi/relation/index.d.ts +4 -1
  48. package/dist/openapi/relation/index.js +10 -0
  49. package/dist/openapi/relation/social.d.ts +56 -0
  50. package/dist/openapi/relation/social.js +40 -0
  51. package/package.json +42 -2
  52. package/dist/ai_platform_llm/permission.d.ts +0 -15
  53. package/dist/ai_platform_llm/permission.js +0 -44
@@ -1,2 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.queryActivityUserCompletionStatus = exports.queryActivityInfo = exports.modifyActivity = exports.createActivity = void 0;
4
+ // ubusiness相关 OpenAPI
5
+ var task_1 = require("./task");
6
+ Object.defineProperty(exports, "createActivity", { enumerable: true, get: function () { return task_1.createActivity; } });
7
+ Object.defineProperty(exports, "modifyActivity", { enumerable: true, get: function () { return task_1.modifyActivity; } });
8
+ Object.defineProperty(exports, "queryActivityInfo", { enumerable: true, get: function () { return task_1.queryActivityInfo; } });
9
+ Object.defineProperty(exports, "queryActivityUserCompletionStatus", { enumerable: true, get: function () { return task_1.queryActivityUserCompletionStatus; } });
@@ -0,0 +1,116 @@
1
+ import type { CallOptions, OpenAPIResponse } from '../core';
2
+ export interface QueryActivityUserCompletionStatusRequest {
3
+ /** 目标用户 open_id */
4
+ target_open_id: string;
5
+ /** 联盟 ID(allied_id) */
6
+ allied_id?: string;
7
+ /** 任务 ID 列表 */
8
+ task_id_list: number[];
9
+ /** 活动 ID */
10
+ activity_id: number;
11
+ }
12
+ /** 单个任务的用户完成状态 */
13
+ export interface ActivityUserTaskStatus {
14
+ /** 任务 ID */
15
+ task_id?: number;
16
+ /** 是否完成 */
17
+ completed?: boolean;
18
+ /** 完成进度(如分阶段任务) */
19
+ progress?: number;
20
+ }
21
+ export interface QueryActivityUserCompletionStatusResponse {
22
+ /** 用户在各任务上的完成状态列表 */
23
+ task_status_list?: ActivityUserTaskStatus[];
24
+ }
25
+ /**
26
+ * 查询用户互动任务完成状态
27
+ *
28
+ * - Path: `/dy_open_api/apps/v3/activity/query_activity_user_completion_status/`
29
+ * - Capability: `dy.open.open.business.task_manage`
30
+ * - Scope: `open.business.task_verify`
31
+ * - 需要用户授权: 是(涉及指定用户的完成状态,需用户授权)
32
+ */
33
+ export declare function queryActivityUserCompletionStatus(body: QueryActivityUserCompletionStatusRequest, options?: CallOptions): Promise<OpenAPIResponse<QueryActivityUserCompletionStatusResponse>>;
34
+ export interface QueryActivityInfoRequest {
35
+ /** 任务 ID 列表 */
36
+ task_id_list: number[];
37
+ /** 活动 ID */
38
+ activity_id: number;
39
+ }
40
+ export interface ActivityTaskInfo {
41
+ /** 任务 ID */
42
+ task_id?: number;
43
+ /** 任务名称 */
44
+ task_name?: string;
45
+ /** 任务开始时间(时间戳) */
46
+ start_time?: number;
47
+ /** 任务结束时间(时间戳) */
48
+ end_time?: number;
49
+ }
50
+ export interface QueryActivityInfoResponse {
51
+ /** 活动下的任务信息列表 */
52
+ business_task_info_list?: ActivityTaskInfo[];
53
+ }
54
+ /**
55
+ * 查询任务活动信息
56
+ *
57
+ * - Path: `/dy_open_api/apps/v3/activity/query_info/`
58
+ * - Capability: `dy.open.open.business.task_manage`
59
+ * - Scope: `open.business.task_manage`
60
+ * - 需要用户授权: 否(应用级管理能力,无需用户授权)
61
+ */
62
+ export declare function queryActivityInfo(body: QueryActivityInfoRequest, options?: CallOptions): Promise<OpenAPIResponse<QueryActivityInfoResponse>>;
63
+ /**
64
+ * 创建任务活动的请求体。
65
+ *
66
+ * @remarks 任务事件信息(task_event_info)结构复杂且随任务类型而变,
67
+ * 此处用宽松对象承载,调用方按抖音开放平台「经营任务」文档构造。
68
+ */
69
+ export interface CreateActivityRequest {
70
+ /** 活动结束时间(时间戳) */
71
+ end_time: number;
72
+ /** 待创建的任务信息列表 */
73
+ create_business_task_info_list: Array<Record<string, unknown>>;
74
+ /** 其余字段按文档透传 */
75
+ [key: string]: unknown;
76
+ }
77
+ export interface CreateActivityResponse {
78
+ /** 创建生成的活动 ID */
79
+ activity_id?: number;
80
+ }
81
+ /**
82
+ * 创建任务活动
83
+ *
84
+ * - Path: `/dy_open_api/apps/v3/activity/create/`
85
+ * - Capability: `dy.open.open.business.task_manage`
86
+ * - Scope: `open.business.task_manage`
87
+ * - 需要用户授权: 否(应用级管理能力,无需用户授权)
88
+ */
89
+ export declare function createActivity(body: CreateActivityRequest, options?: CallOptions): Promise<OpenAPIResponse<CreateActivityResponse>>;
90
+ /**
91
+ * 修改任务活动的请求体。
92
+ *
93
+ * @remarks 任务事件信息结构复杂且随任务类型而变,此处用宽松对象承载,
94
+ * 调用方按抖音开放平台「经营任务」文档构造。
95
+ */
96
+ export interface ModifyActivityRequest {
97
+ /** 活动开始时间(时间戳) */
98
+ start_time?: number;
99
+ /** 新增的任务信息列表 */
100
+ add_business_task_info_list?: Array<Record<string, unknown>>;
101
+ /** 其余字段按文档透传 */
102
+ [key: string]: unknown;
103
+ }
104
+ export interface ModifyActivityResponse {
105
+ /** 被修改的活动 ID */
106
+ activity_id?: number;
107
+ }
108
+ /**
109
+ * 修改任务活动
110
+ *
111
+ * - Path: `/dy_open_api/apps/v3/activity/modify/`
112
+ * - Capability: `dy.open.open.business.task_manage`
113
+ * - Scope: `open.business.task_manage`
114
+ * - 需要用户授权: 否(应用级管理能力,无需用户授权)
115
+ */
116
+ export declare function modifyActivity(body: ModifyActivityRequest, options?: CallOptions): Promise<OpenAPIResponse<ModifyActivityResponse>>;
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.queryActivityUserCompletionStatus = queryActivityUserCompletionStatus;
4
+ exports.queryActivityInfo = queryActivityInfo;
5
+ exports.createActivity = createActivity;
6
+ exports.modifyActivity = modifyActivity;
7
+ const core_1 = require("../core");
8
+ /**
9
+ * 查询用户互动任务完成状态
10
+ *
11
+ * - Path: `/dy_open_api/apps/v3/activity/query_activity_user_completion_status/`
12
+ * - Capability: `dy.open.open.business.task_manage`
13
+ * - Scope: `open.business.task_verify`
14
+ * - 需要用户授权: 是(涉及指定用户的完成状态,需用户授权)
15
+ */
16
+ async function queryActivityUserCompletionStatus(body, options) {
17
+ return (0, core_1.callOpenAPI)({
18
+ path: '/dy_open_api/apps/v3/activity/query_activity_user_completion_status/',
19
+ method: 'POST',
20
+ body,
21
+ domain: 'open.douyin.com',
22
+ }, options);
23
+ }
24
+ /**
25
+ * 查询任务活动信息
26
+ *
27
+ * - Path: `/dy_open_api/apps/v3/activity/query_info/`
28
+ * - Capability: `dy.open.open.business.task_manage`
29
+ * - Scope: `open.business.task_manage`
30
+ * - 需要用户授权: 否(应用级管理能力,无需用户授权)
31
+ */
32
+ async function queryActivityInfo(body, options) {
33
+ return (0, core_1.callOpenAPI)({
34
+ path: '/dy_open_api/apps/v3/activity/query_info/',
35
+ method: 'POST',
36
+ body,
37
+ domain: 'open.douyin.com',
38
+ }, options);
39
+ }
40
+ /**
41
+ * 创建任务活动
42
+ *
43
+ * - Path: `/dy_open_api/apps/v3/activity/create/`
44
+ * - Capability: `dy.open.open.business.task_manage`
45
+ * - Scope: `open.business.task_manage`
46
+ * - 需要用户授权: 否(应用级管理能力,无需用户授权)
47
+ */
48
+ async function createActivity(body, options) {
49
+ return (0, core_1.callOpenAPI)({
50
+ path: '/dy_open_api/apps/v3/activity/create/',
51
+ method: 'POST',
52
+ body,
53
+ domain: 'open.douyin.com',
54
+ }, options);
55
+ }
56
+ /**
57
+ * 修改任务活动
58
+ *
59
+ * - Path: `/dy_open_api/apps/v3/activity/modify/`
60
+ * - Capability: `dy.open.open.business.task_manage`
61
+ * - Scope: `open.business.task_manage`
62
+ * - 需要用户授权: 否(应用级管理能力,无需用户授权)
63
+ */
64
+ async function modifyActivity(body, options) {
65
+ return (0, core_1.callOpenAPI)({
66
+ path: '/dy_open_api/apps/v3/activity/modify/',
67
+ method: 'POST',
68
+ body,
69
+ domain: 'open.douyin.com',
70
+ }, options);
71
+ }
@@ -1,2 +1,4 @@
1
1
  export { searchComment } from './comment';
2
2
  export type { CommentSearchParams, CommentSearchItem, CommentSearchResponse } from './comment';
3
+ export { getCommentList, getCommentReplyList, publishComment, deleteComment, diggComment, } from './manage';
4
+ export type { CommentListRequest, CommentItem, CommentListResponse, CommentReplyListRequest, CommentPublishRequest, CommentPublishResponse, CommentDeleteRequest, CommentMutationResponse, CommentDiggRequest, } from './manage';
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.searchComment = void 0;
3
+ exports.diggComment = exports.deleteComment = exports.publishComment = exports.getCommentReplyList = exports.getCommentList = exports.searchComment = void 0;
4
4
  // 评论相关 OpenAPI
5
5
  var comment_1 = require("./comment");
6
6
  Object.defineProperty(exports, "searchComment", { enumerable: true, get: function () { return comment_1.searchComment; } });
7
+ var manage_1 = require("./manage");
8
+ Object.defineProperty(exports, "getCommentList", { enumerable: true, get: function () { return manage_1.getCommentList; } });
9
+ Object.defineProperty(exports, "getCommentReplyList", { enumerable: true, get: function () { return manage_1.getCommentReplyList; } });
10
+ Object.defineProperty(exports, "publishComment", { enumerable: true, get: function () { return manage_1.publishComment; } });
11
+ Object.defineProperty(exports, "deleteComment", { enumerable: true, get: function () { return manage_1.deleteComment; } });
12
+ Object.defineProperty(exports, "diggComment", { enumerable: true, get: function () { return manage_1.diggComment; } });
@@ -0,0 +1,118 @@
1
+ import type { CallOptions, OpenAPIResponse } from '../core';
2
+ export interface CommentListRequest {
3
+ /** 用户 open_id,通过 /oauth/access_token/ 获取 */
4
+ open_id: string;
5
+ /** 视频/作品 ID */
6
+ item_id: string;
7
+ /** 分页游标,第一页传 0 */
8
+ cursor?: number;
9
+ /** 每页数量 */
10
+ count?: number;
11
+ }
12
+ export interface CommentItem {
13
+ /** 评论 ID */
14
+ comment_id?: string;
15
+ /** 评论内容 */
16
+ text?: string;
17
+ /** 评论用户 open_id */
18
+ open_id?: string;
19
+ /** 创建时间(时间戳) */
20
+ create_time?: number;
21
+ /** 点赞数 */
22
+ digg_count?: number;
23
+ /** 回复数 */
24
+ reply_count?: number;
25
+ }
26
+ export interface CommentListResponse {
27
+ /** 评论列表 */
28
+ list?: CommentItem[];
29
+ /** 下一页游标 */
30
+ cursor?: number;
31
+ /** 是否还有更多 */
32
+ has_more?: boolean;
33
+ }
34
+ /**
35
+ * 获取视频评论列表
36
+ *
37
+ * - Path: `/dy_open_api/aweme/v1/comment/list/`
38
+ * - Capability: `dy.open.comment_read`
39
+ * - Scope: `douyin_comment_read`
40
+ * - 需要用户授权: 是
41
+ */
42
+ export declare function getCommentList(body: CommentListRequest, options?: CallOptions): Promise<OpenAPIResponse<CommentListResponse>>;
43
+ export interface CommentReplyListRequest extends CommentListRequest {
44
+ /** 父评论 ID */
45
+ comment_id: string;
46
+ }
47
+ /**
48
+ * 获取视频评论的回复列表
49
+ *
50
+ * - Path: `/dy_open_api/aweme/v1/comment/list/reply/`
51
+ * - Capability: `dy.open.comment_read`
52
+ * - Scope: `douyin_comment_read`
53
+ * - 需要用户授权: 是
54
+ */
55
+ export declare function getCommentReplyList(body: CommentReplyListRequest, options?: CallOptions): Promise<OpenAPIResponse<CommentListResponse>>;
56
+ export interface CommentPublishRequest {
57
+ /** 用户 open_id,通过 /oauth/access_token/ 获取 */
58
+ open_id: string;
59
+ /** 视频/作品 ID */
60
+ item_id: string;
61
+ /** 评论内容 */
62
+ content: string;
63
+ /** 父评论 ID(回复某条评论时传入) */
64
+ comment_id?: string;
65
+ }
66
+ export interface CommentPublishResponse {
67
+ /** 新发布的评论 ID */
68
+ comment_id?: string;
69
+ }
70
+ /**
71
+ * 发布视频评论
72
+ *
73
+ * - Path: `/dy_open_api/aweme/v1/comment/publish/`
74
+ * - Capability: `dy.open.comment_write`
75
+ * - Scope: `douyin_comment_write`
76
+ * - 需要用户授权: 是
77
+ */
78
+ export declare function publishComment(body: CommentPublishRequest, options?: CallOptions): Promise<OpenAPIResponse<CommentPublishResponse>>;
79
+ export interface CommentDeleteRequest {
80
+ /** 用户 open_id,通过 /oauth/access_token/ 获取 */
81
+ open_id: string;
82
+ /** 视频/作品 ID */
83
+ item_id: string;
84
+ /** 待删除的评论 ID */
85
+ comment_id: string;
86
+ }
87
+ export interface CommentMutationResponse {
88
+ /** 是否操作成功 */
89
+ success?: boolean;
90
+ }
91
+ /**
92
+ * 删除视频评论
93
+ *
94
+ * - Path: `/dy_open_api/aweme/v1/comment/delete/`
95
+ * - Capability: `dy.open.comment_write`
96
+ * - Scope: `douyin_comment_write`
97
+ * - 需要用户授权: 是
98
+ */
99
+ export declare function deleteComment(body: CommentDeleteRequest, options?: CallOptions): Promise<OpenAPIResponse<CommentMutationResponse>>;
100
+ export interface CommentDiggRequest {
101
+ /** 用户 open_id,通过 /oauth/access_token/ 获取 */
102
+ open_id: string;
103
+ /** 视频/作品 ID */
104
+ item_id: string;
105
+ /** 评论 ID */
106
+ comment_id: string;
107
+ /** 点赞操作:1=点赞,0=取消点赞(以文档为准) */
108
+ digg_type?: number;
109
+ }
110
+ /**
111
+ * 点赞 / 取消点赞视频评论
112
+ *
113
+ * - Path: `/dy_open_api/aweme/v1/comment/digg/`
114
+ * - Capability: `dy.open.comment_write`
115
+ * - Scope: `douyin_comment_write`
116
+ * - 需要用户授权: 是
117
+ */
118
+ export declare function diggComment(body: CommentDiggRequest, options?: CallOptions): Promise<OpenAPIResponse<CommentMutationResponse>>;
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCommentList = getCommentList;
4
+ exports.getCommentReplyList = getCommentReplyList;
5
+ exports.publishComment = publishComment;
6
+ exports.deleteComment = deleteComment;
7
+ exports.diggComment = diggComment;
8
+ const core_1 = require("../core");
9
+ /**
10
+ * 获取视频评论列表
11
+ *
12
+ * - Path: `/dy_open_api/aweme/v1/comment/list/`
13
+ * - Capability: `dy.open.comment_read`
14
+ * - Scope: `douyin_comment_read`
15
+ * - 需要用户授权: 是
16
+ */
17
+ async function getCommentList(body, options) {
18
+ return (0, core_1.callOpenAPI)({
19
+ path: '/dy_open_api/aweme/v1/comment/list/',
20
+ method: 'POST',
21
+ body,
22
+ domain: 'open.douyin.com',
23
+ }, options);
24
+ }
25
+ /**
26
+ * 获取视频评论的回复列表
27
+ *
28
+ * - Path: `/dy_open_api/aweme/v1/comment/list/reply/`
29
+ * - Capability: `dy.open.comment_read`
30
+ * - Scope: `douyin_comment_read`
31
+ * - 需要用户授权: 是
32
+ */
33
+ async function getCommentReplyList(body, options) {
34
+ return (0, core_1.callOpenAPI)({
35
+ path: '/dy_open_api/aweme/v1/comment/list/reply/',
36
+ method: 'POST',
37
+ body,
38
+ domain: 'open.douyin.com',
39
+ }, options);
40
+ }
41
+ /**
42
+ * 发布视频评论
43
+ *
44
+ * - Path: `/dy_open_api/aweme/v1/comment/publish/`
45
+ * - Capability: `dy.open.comment_write`
46
+ * - Scope: `douyin_comment_write`
47
+ * - 需要用户授权: 是
48
+ */
49
+ async function publishComment(body, options) {
50
+ return (0, core_1.callOpenAPI)({
51
+ path: '/dy_open_api/aweme/v1/comment/publish/',
52
+ method: 'POST',
53
+ body,
54
+ domain: 'open.douyin.com',
55
+ }, options);
56
+ }
57
+ /**
58
+ * 删除视频评论
59
+ *
60
+ * - Path: `/dy_open_api/aweme/v1/comment/delete/`
61
+ * - Capability: `dy.open.comment_write`
62
+ * - Scope: `douyin_comment_write`
63
+ * - 需要用户授权: 是
64
+ */
65
+ async function deleteComment(body, options) {
66
+ return (0, core_1.callOpenAPI)({
67
+ path: '/dy_open_api/aweme/v1/comment/delete/',
68
+ method: 'POST',
69
+ body,
70
+ domain: 'open.douyin.com',
71
+ }, options);
72
+ }
73
+ /**
74
+ * 点赞 / 取消点赞视频评论
75
+ *
76
+ * - Path: `/dy_open_api/aweme/v1/comment/digg/`
77
+ * - Capability: `dy.open.comment_write`
78
+ * - Scope: `douyin_comment_write`
79
+ * - 需要用户授权: 是
80
+ */
81
+ async function diggComment(body, options) {
82
+ return (0, core_1.callOpenAPI)({
83
+ path: '/dy_open_api/aweme/v1/comment/digg/',
84
+ method: 'POST',
85
+ body,
86
+ domain: 'open.douyin.com',
87
+ }, options);
88
+ }
@@ -4,3 +4,5 @@ export { getRecommend } from './recommend';
4
4
  export type { RecommendRequest, RecommendItem, RecommendResponse } from './recommend';
5
5
  export { getFollowHotWord, getFollowFeed, getFeed } from './follow';
6
6
  export type { HotWordUrl, HotWordItem, HotWordResponse, FollowFeedItem, FollowFeedResponse, FeedItem, FeedResponse } from './follow';
7
+ export { getVideoDetailList, getSingleVideoDetail, getVideoPack } from './video-data';
8
+ export type { VideoDetailListParams, VideoDetailItem, VideoDetailListResponse, SingleVideoDetailParams, SingleVideoDetailResponse, VideoPackParams, VideoPackItem, VideoPackResponse, } from './video-data';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFeed = exports.getFollowFeed = exports.getFollowHotWord = exports.getRecommend = exports.getHighQualityText = void 0;
3
+ exports.getVideoPack = exports.getSingleVideoDetail = exports.getVideoDetailList = exports.getFeed = exports.getFollowFeed = exports.getFollowHotWord = exports.getRecommend = exports.getHighQualityText = void 0;
4
4
  var video_1 = require("./video");
5
5
  Object.defineProperty(exports, "getHighQualityText", { enumerable: true, get: function () { return video_1.getHighQualityText; } });
6
6
  var recommend_1 = require("./recommend");
@@ -9,3 +9,7 @@ var follow_1 = require("./follow");
9
9
  Object.defineProperty(exports, "getFollowHotWord", { enumerable: true, get: function () { return follow_1.getFollowHotWord; } });
10
10
  Object.defineProperty(exports, "getFollowFeed", { enumerable: true, get: function () { return follow_1.getFollowFeed; } });
11
11
  Object.defineProperty(exports, "getFeed", { enumerable: true, get: function () { return follow_1.getFeed; } });
12
+ var video_data_1 = require("./video-data");
13
+ Object.defineProperty(exports, "getVideoDetailList", { enumerable: true, get: function () { return video_data_1.getVideoDetailList; } });
14
+ Object.defineProperty(exports, "getSingleVideoDetail", { enumerable: true, get: function () { return video_data_1.getSingleVideoDetail; } });
15
+ Object.defineProperty(exports, "getVideoPack", { enumerable: true, get: function () { return video_data_1.getVideoPack; } });
@@ -0,0 +1,94 @@
1
+ import type { CallOptions, OpenAPIResponse } from '../core';
2
+ export interface VideoDetailListParams {
3
+ /** 用户 open_id,通过 /oauth/access_token/ 获取 */
4
+ open_id: string;
5
+ /** 分页游标,第一页传 0,后续传上一页返回的 cursor */
6
+ cursor?: number;
7
+ /** 每页数量 */
8
+ count?: number;
9
+ }
10
+ export interface VideoDetailItem {
11
+ /** 视频/作品 ID */
12
+ item_id?: string;
13
+ /** 作品标题 */
14
+ title?: string;
15
+ /** 作品类型:视频 / 图文 / slide */
16
+ media_type?: number;
17
+ /** 封面地址 */
18
+ cover?: string;
19
+ /** 作品分享链接 */
20
+ share_url?: string;
21
+ /** 创建时间(时间戳) */
22
+ create_time?: number;
23
+ }
24
+ export interface VideoDetailListResponse {
25
+ /** 作品列表 */
26
+ list?: VideoDetailItem[];
27
+ /** 下一页游标 */
28
+ cursor?: number;
29
+ /** 是否还有更多 */
30
+ has_more?: boolean;
31
+ }
32
+ /**
33
+ * 获取用户公开作品列表(slide / 视频 / 图文)
34
+ *
35
+ * - Path: `/api/douyin/v1/video/video_detail_list/`
36
+ * - Capability: `dy.open.video.detail`
37
+ * - Scope: `video.data.detail`
38
+ * - 需要用户授权: 是
39
+ */
40
+ export declare function getVideoDetailList(params: VideoDetailListParams, options?: CallOptions): Promise<OpenAPIResponse<VideoDetailListResponse>>;
41
+ export interface SingleVideoDetailParams {
42
+ /** 用户 open_id,通过 /oauth/access_token/ 获取 */
43
+ open_id: string;
44
+ /** 指定的视频/作品 ID */
45
+ item_id: string;
46
+ }
47
+ export interface SingleVideoDetailResponse {
48
+ /** 作品详情 */
49
+ item?: VideoDetailItem;
50
+ }
51
+ /**
52
+ * 获取指定作品详情
53
+ *
54
+ * - Path: `/api/douyin/v1/video/single_video_detail/`
55
+ * - Capability: `dy.open.video.detail`
56
+ * - Scope: `video.data.detail`
57
+ * - 需要用户授权: 是
58
+ */
59
+ export declare function getSingleVideoDetail(params: SingleVideoDetailParams, options?: CallOptions): Promise<OpenAPIResponse<SingleVideoDetailResponse>>;
60
+ export interface VideoPackParams {
61
+ /** 作品 ID 列表,JSON 数组形式,如 [1774790056399461524] */
62
+ item_ids: number[] | string[];
63
+ /** 来源用户 open_id */
64
+ from_uid?: string;
65
+ /** 设备 ID */
66
+ device_id?: string | number;
67
+ }
68
+ export interface VideoPackItem {
69
+ /** 视频/作品 ID */
70
+ item_id?: string;
71
+ /** 作品标题 */
72
+ title?: string;
73
+ /** 作者信息 */
74
+ author?: Record<string, unknown>;
75
+ /** 锚点信息 */
76
+ anchor?: Record<string, unknown>;
77
+ /** 互动统计(点赞、评论、分享等) */
78
+ statistics?: Record<string, unknown>;
79
+ }
80
+ export interface VideoPackResponse {
81
+ /** 合规打包后的作品列表(不合规作品会被过滤) */
82
+ list?: VideoPackItem[];
83
+ }
84
+ /**
85
+ * 抖音视频合规打包(获取视频互动数据)
86
+ *
87
+ * - Path: `/dy_open_api/v1/video/pack/`
88
+ * - Capability: `dy.open.aweme.video.pack`
89
+ * - Scope: `aweme.video.pack`
90
+ * - 需要用户授权: 是
91
+ *
92
+ * @remarks 获取视频的基本信息摘要、作者信息、锚点信息等字段,不合规视频会被过滤。
93
+ */
94
+ export declare function getVideoPack(params: VideoPackParams, options?: CallOptions): Promise<OpenAPIResponse<VideoPackResponse>>;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getVideoDetailList = getVideoDetailList;
4
+ exports.getSingleVideoDetail = getSingleVideoDetail;
5
+ exports.getVideoPack = getVideoPack;
6
+ const core_1 = require("../core");
7
+ /**
8
+ * 获取用户公开作品列表(slide / 视频 / 图文)
9
+ *
10
+ * - Path: `/api/douyin/v1/video/video_detail_list/`
11
+ * - Capability: `dy.open.video.detail`
12
+ * - Scope: `video.data.detail`
13
+ * - 需要用户授权: 是
14
+ */
15
+ async function getVideoDetailList(params, options) {
16
+ return (0, core_1.callOpenAPI)({
17
+ path: '/api/douyin/v1/video/video_detail_list/',
18
+ method: 'GET',
19
+ queryParams: params,
20
+ domain: 'open.douyin.com',
21
+ }, options);
22
+ }
23
+ /**
24
+ * 获取指定作品详情
25
+ *
26
+ * - Path: `/api/douyin/v1/video/single_video_detail/`
27
+ * - Capability: `dy.open.video.detail`
28
+ * - Scope: `video.data.detail`
29
+ * - 需要用户授权: 是
30
+ */
31
+ async function getSingleVideoDetail(params, options) {
32
+ return (0, core_1.callOpenAPI)({
33
+ path: '/api/douyin/v1/video/single_video_detail/',
34
+ method: 'GET',
35
+ queryParams: params,
36
+ domain: 'open.douyin.com',
37
+ }, options);
38
+ }
39
+ /**
40
+ * 抖音视频合规打包(获取视频互动数据)
41
+ *
42
+ * - Path: `/dy_open_api/v1/video/pack/`
43
+ * - Capability: `dy.open.aweme.video.pack`
44
+ * - Scope: `aweme.video.pack`
45
+ * - 需要用户授权: 是
46
+ *
47
+ * @remarks 获取视频的基本信息摘要、作者信息、锚点信息等字段,不合规视频会被过滤。
48
+ */
49
+ async function getVideoPack(params, options) {
50
+ return (0, core_1.callOpenAPI)({
51
+ path: '/dy_open_api/v1/video/pack/',
52
+ method: 'GET',
53
+ queryParams: params,
54
+ domain: 'open.douyin.com',
55
+ }, options);
56
+ }