@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
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFirmSubjectDetail = getFirmSubjectDetail;
|
|
4
|
+
const core_1 = require("../core");
|
|
5
|
+
/**
|
|
6
|
+
* 获取 B 号主体资质信息
|
|
7
|
+
*
|
|
8
|
+
* - Path: `/api/firm/v1/query_firm_subject_detail/`
|
|
9
|
+
* - Capability: `dy.open.firm_subject.detail`
|
|
10
|
+
* - Scope: `firm.subject.detail`
|
|
11
|
+
* - 需要用户授权: 是
|
|
12
|
+
*
|
|
13
|
+
* @remarks AI 分身相关接口,用于查询 B 号主体资质详细信息。
|
|
14
|
+
* 参考:【B号】支持 AI 分身 OpenAPI 开放技术方案。
|
|
15
|
+
*/
|
|
16
|
+
async function getFirmSubjectDetail(params, options) {
|
|
17
|
+
return (0, core_1.callOpenAPI)({
|
|
18
|
+
path: '/api/firm/v1/query_firm_subject_detail/',
|
|
19
|
+
method: 'POST',
|
|
20
|
+
body: params,
|
|
21
|
+
domain: 'open.douyin.com',
|
|
22
|
+
}, options);
|
|
23
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
|
+
/**
|
|
3
|
+
* 主页数据查询的统计时间范围。
|
|
4
|
+
* 抖音开放平台约定:7=近 7 天,15=近 15 天,30=近 30 天。
|
|
5
|
+
*/
|
|
6
|
+
export type HomepageDateType = 7 | 15 | 30;
|
|
7
|
+
export interface HomepageDataParams {
|
|
8
|
+
/** 用户 open_id,通过 /oauth/access_token/ 获取,用户唯一标志 */
|
|
9
|
+
open_id: string;
|
|
10
|
+
/** 统计时间范围,单位天,支持 7 / 15 / 30 */
|
|
11
|
+
date_type: HomepageDateType;
|
|
12
|
+
}
|
|
13
|
+
export interface HomepageItemParams extends HomepageDataParams {
|
|
14
|
+
/** 视频/作品 ID */
|
|
15
|
+
item_id: string;
|
|
16
|
+
}
|
|
17
|
+
/** 单日统计结果项 */
|
|
18
|
+
export interface HomepageDailyResult {
|
|
19
|
+
/** 日期,格式 YYYY-MM-DD */
|
|
20
|
+
date?: string;
|
|
21
|
+
/** 当日数值 */
|
|
22
|
+
value?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface HomepageResultResponse {
|
|
25
|
+
/** 按日期聚合的统计列表 */
|
|
26
|
+
result_list?: HomepageDailyResult[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 获取用户视频情况(发布数等)
|
|
30
|
+
*
|
|
31
|
+
* - Path: `/api/apps/v1/user/get_item/`
|
|
32
|
+
* - Capability: `ma.openapi.data.external.user`
|
|
33
|
+
* - Scope: `ma.user.data`
|
|
34
|
+
* - 需要用户授权: 是
|
|
35
|
+
*/
|
|
36
|
+
export declare function getUserItemData(params: HomepageDataParams, options?: CallOptions): Promise<OpenAPIResponse<HomepageResultResponse>>;
|
|
37
|
+
/**
|
|
38
|
+
* 获取用户粉丝数
|
|
39
|
+
*
|
|
40
|
+
* - Path: `/api/apps/v1/user/get_fans/`
|
|
41
|
+
* - Capability: `ma.openapi.data.external.user`
|
|
42
|
+
* - Scope: `ma.user.data`
|
|
43
|
+
* - 需要用户授权: 是
|
|
44
|
+
*/
|
|
45
|
+
export declare function getUserFansData(params: HomepageDataParams, options?: CallOptions): Promise<OpenAPIResponse<HomepageResultResponse>>;
|
|
46
|
+
/**
|
|
47
|
+
* 获取用户点赞数
|
|
48
|
+
*
|
|
49
|
+
* - Path: `/api/apps/v1/user/get_like/`
|
|
50
|
+
* - Capability: `ma.openapi.data.external.user`
|
|
51
|
+
* - Scope: `ma.user.data`
|
|
52
|
+
* - 需要用户授权: 是
|
|
53
|
+
*
|
|
54
|
+
* @remarks 需传入 `item_id` 以查询指定作品的点赞数据。
|
|
55
|
+
*/
|
|
56
|
+
export declare function getUserLikeData(params: HomepageItemParams, options?: CallOptions): Promise<OpenAPIResponse<HomepageResultResponse>>;
|
|
57
|
+
/**
|
|
58
|
+
* 获取用户评论数
|
|
59
|
+
*
|
|
60
|
+
* - Path: `/api/apps/v1/user/get_comment/`
|
|
61
|
+
* - Capability: `ma.openapi.data.external.user`
|
|
62
|
+
* - Scope: `ma.user.data`
|
|
63
|
+
* - 需要用户授权: 是
|
|
64
|
+
*
|
|
65
|
+
* @remarks 需传入 `item_id` 以查询指定作品的评论数据。
|
|
66
|
+
*/
|
|
67
|
+
export declare function getUserCommentData(params: HomepageItemParams, options?: CallOptions): Promise<OpenAPIResponse<HomepageResultResponse>>;
|
|
68
|
+
/**
|
|
69
|
+
* 获取用户分享数
|
|
70
|
+
*
|
|
71
|
+
* - Path: `/api/apps/v1/user/get_share/`
|
|
72
|
+
* - Capability: `ma.openapi.data.external.user`
|
|
73
|
+
* - Scope: `ma.user.data`
|
|
74
|
+
* - 需要用户授权: 是
|
|
75
|
+
*/
|
|
76
|
+
export declare function getUserShareData(params: HomepageDataParams, options?: CallOptions): Promise<OpenAPIResponse<HomepageResultResponse>>;
|
|
77
|
+
/**
|
|
78
|
+
* 获取用户主页访问数
|
|
79
|
+
*
|
|
80
|
+
* - Path: `/api/apps/v1/user/get_profile/`
|
|
81
|
+
* - Capability: `ma.openapi.data.external.user`
|
|
82
|
+
* - Scope: `ma.user.data`
|
|
83
|
+
* - 需要用户授权: 是
|
|
84
|
+
*/
|
|
85
|
+
export declare function getUserProfileData(params: HomepageDataParams, options?: CallOptions): Promise<OpenAPIResponse<HomepageResultResponse>>;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUserItemData = getUserItemData;
|
|
4
|
+
exports.getUserFansData = getUserFansData;
|
|
5
|
+
exports.getUserLikeData = getUserLikeData;
|
|
6
|
+
exports.getUserCommentData = getUserCommentData;
|
|
7
|
+
exports.getUserShareData = getUserShareData;
|
|
8
|
+
exports.getUserProfileData = getUserProfileData;
|
|
9
|
+
const core_1 = require("../core");
|
|
10
|
+
/**
|
|
11
|
+
* 获取用户视频情况(发布数等)
|
|
12
|
+
*
|
|
13
|
+
* - Path: `/api/apps/v1/user/get_item/`
|
|
14
|
+
* - Capability: `ma.openapi.data.external.user`
|
|
15
|
+
* - Scope: `ma.user.data`
|
|
16
|
+
* - 需要用户授权: 是
|
|
17
|
+
*/
|
|
18
|
+
async function getUserItemData(params, options) {
|
|
19
|
+
return (0, core_1.callOpenAPI)({
|
|
20
|
+
path: '/api/apps/v1/user/get_item/',
|
|
21
|
+
method: 'GET',
|
|
22
|
+
queryParams: params,
|
|
23
|
+
domain: 'open.douyin.com',
|
|
24
|
+
}, options);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 获取用户粉丝数
|
|
28
|
+
*
|
|
29
|
+
* - Path: `/api/apps/v1/user/get_fans/`
|
|
30
|
+
* - Capability: `ma.openapi.data.external.user`
|
|
31
|
+
* - Scope: `ma.user.data`
|
|
32
|
+
* - 需要用户授权: 是
|
|
33
|
+
*/
|
|
34
|
+
async function getUserFansData(params, options) {
|
|
35
|
+
return (0, core_1.callOpenAPI)({
|
|
36
|
+
path: '/api/apps/v1/user/get_fans/',
|
|
37
|
+
method: 'GET',
|
|
38
|
+
queryParams: params,
|
|
39
|
+
domain: 'open.douyin.com',
|
|
40
|
+
}, options);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* 获取用户点赞数
|
|
44
|
+
*
|
|
45
|
+
* - Path: `/api/apps/v1/user/get_like/`
|
|
46
|
+
* - Capability: `ma.openapi.data.external.user`
|
|
47
|
+
* - Scope: `ma.user.data`
|
|
48
|
+
* - 需要用户授权: 是
|
|
49
|
+
*
|
|
50
|
+
* @remarks 需传入 `item_id` 以查询指定作品的点赞数据。
|
|
51
|
+
*/
|
|
52
|
+
async function getUserLikeData(params, options) {
|
|
53
|
+
return (0, core_1.callOpenAPI)({
|
|
54
|
+
path: '/api/apps/v1/user/get_like/',
|
|
55
|
+
method: 'GET',
|
|
56
|
+
queryParams: params,
|
|
57
|
+
domain: 'open.douyin.com',
|
|
58
|
+
}, options);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* 获取用户评论数
|
|
62
|
+
*
|
|
63
|
+
* - Path: `/api/apps/v1/user/get_comment/`
|
|
64
|
+
* - Capability: `ma.openapi.data.external.user`
|
|
65
|
+
* - Scope: `ma.user.data`
|
|
66
|
+
* - 需要用户授权: 是
|
|
67
|
+
*
|
|
68
|
+
* @remarks 需传入 `item_id` 以查询指定作品的评论数据。
|
|
69
|
+
*/
|
|
70
|
+
async function getUserCommentData(params, options) {
|
|
71
|
+
return (0, core_1.callOpenAPI)({
|
|
72
|
+
path: '/api/apps/v1/user/get_comment/',
|
|
73
|
+
method: 'GET',
|
|
74
|
+
queryParams: params,
|
|
75
|
+
domain: 'open.douyin.com',
|
|
76
|
+
}, options);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* 获取用户分享数
|
|
80
|
+
*
|
|
81
|
+
* - Path: `/api/apps/v1/user/get_share/`
|
|
82
|
+
* - Capability: `ma.openapi.data.external.user`
|
|
83
|
+
* - Scope: `ma.user.data`
|
|
84
|
+
* - 需要用户授权: 是
|
|
85
|
+
*/
|
|
86
|
+
async function getUserShareData(params, options) {
|
|
87
|
+
return (0, core_1.callOpenAPI)({
|
|
88
|
+
path: '/api/apps/v1/user/get_share/',
|
|
89
|
+
method: 'GET',
|
|
90
|
+
queryParams: params,
|
|
91
|
+
domain: 'open.douyin.com',
|
|
92
|
+
}, options);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* 获取用户主页访问数
|
|
96
|
+
*
|
|
97
|
+
* - Path: `/api/apps/v1/user/get_profile/`
|
|
98
|
+
* - Capability: `ma.openapi.data.external.user`
|
|
99
|
+
* - Scope: `ma.user.data`
|
|
100
|
+
* - 需要用户授权: 是
|
|
101
|
+
*/
|
|
102
|
+
async function getUserProfileData(params, options) {
|
|
103
|
+
return (0, core_1.callOpenAPI)({
|
|
104
|
+
path: '/api/apps/v1/user/get_profile/',
|
|
105
|
+
method: 'GET',
|
|
106
|
+
queryParams: params,
|
|
107
|
+
domain: 'open.douyin.com',
|
|
108
|
+
}, options);
|
|
109
|
+
}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
export { getUserConstellation } from './profile';
|
|
2
|
-
export type { ConstellationResponse } from './profile';
|
|
3
|
-
export { getRelatedId, getAffiliateId } from './identity';
|
|
4
|
-
export type { GetRelatedIdRequest, GetRelatedIdResponse } from './identity';
|
|
5
|
-
export { getAIUserProfile } from './ai_profile';
|
|
6
|
-
export type { AIUserProfileParams, AIUserInfo, AIUserProfileResponse } from './ai_profile';
|
|
7
1
|
export { getAIUserDataInfo } from './ai_data';
|
|
8
|
-
export type {
|
|
2
|
+
export type { AIUserBase, AIUserDataInfoParams, AIUserDataInfoResponse } from './ai_data';
|
|
9
3
|
export { getAIUserItemList } from './ai_items';
|
|
10
|
-
export type {
|
|
4
|
+
export type { AIUserItem, AIUserItemListParams, AIUserItemListResponse } from './ai_items';
|
|
5
|
+
export { getAIUserProfile } from './ai_profile';
|
|
6
|
+
export type { AIUserInfo, AIUserProfileParams, AIUserProfileResponse } from './ai_profile';
|
|
7
|
+
export { getFirmSubjectDetail } from './firm';
|
|
8
|
+
export type { FirmSubjectDetail, FirmSubjectDetailParams, FirmSubjectDetailResponse } from './firm';
|
|
9
|
+
export { getUserCommentData, getUserFansData, getUserItemData, getUserLikeData, getUserProfileData, getUserShareData } from './homepage-data';
|
|
10
|
+
export type { HomepageDailyResult, HomepageDataParams, HomepageDateType, HomepageItemParams, HomepageResultResponse } from './homepage-data';
|
|
11
|
+
export { getAffiliateId, getRelatedId } from './identity';
|
|
12
|
+
export type { GetRelatedIdRequest, GetRelatedIdResponse } from './identity';
|
|
13
|
+
export { getUserHashMobile } from './mobile-hash';
|
|
14
|
+
export type { UserHashMobileParams, UserHashMobileResponse } from './mobile-hash';
|
|
15
|
+
export { getUserConstellation } from './profile';
|
|
16
|
+
export type { ConstellationResponse } from './profile';
|
|
17
|
+
export { getUserPublicInfo } from './public-info';
|
|
18
|
+
export type { UserPublicInfo, UserPublicInfoParams, UserPublicInfoResponse } from './public-info';
|
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var profile_1 = require("./profile");
|
|
5
|
-
Object.defineProperty(exports, "getUserConstellation", { enumerable: true, get: function () { return profile_1.getUserConstellation; } });
|
|
6
|
-
var identity_1 = require("./identity");
|
|
7
|
-
Object.defineProperty(exports, "getRelatedId", { enumerable: true, get: function () { return identity_1.getRelatedId; } });
|
|
8
|
-
Object.defineProperty(exports, "getAffiliateId", { enumerable: true, get: function () { return identity_1.getAffiliateId; } });
|
|
9
|
-
var ai_profile_1 = require("./ai_profile");
|
|
10
|
-
Object.defineProperty(exports, "getAIUserProfile", { enumerable: true, get: function () { return ai_profile_1.getAIUserProfile; } });
|
|
3
|
+
exports.getUserPublicInfo = exports.getUserConstellation = exports.getUserHashMobile = exports.getRelatedId = exports.getAffiliateId = exports.getUserShareData = exports.getUserProfileData = exports.getUserLikeData = exports.getUserItemData = exports.getUserFansData = exports.getUserCommentData = exports.getFirmSubjectDetail = exports.getAIUserProfile = exports.getAIUserItemList = exports.getAIUserDataInfo = void 0;
|
|
11
4
|
var ai_data_1 = require("./ai_data");
|
|
12
5
|
Object.defineProperty(exports, "getAIUserDataInfo", { enumerable: true, get: function () { return ai_data_1.getAIUserDataInfo; } });
|
|
13
6
|
var ai_items_1 = require("./ai_items");
|
|
14
7
|
Object.defineProperty(exports, "getAIUserItemList", { enumerable: true, get: function () { return ai_items_1.getAIUserItemList; } });
|
|
8
|
+
var ai_profile_1 = require("./ai_profile");
|
|
9
|
+
Object.defineProperty(exports, "getAIUserProfile", { enumerable: true, get: function () { return ai_profile_1.getAIUserProfile; } });
|
|
10
|
+
var firm_1 = require("./firm");
|
|
11
|
+
Object.defineProperty(exports, "getFirmSubjectDetail", { enumerable: true, get: function () { return firm_1.getFirmSubjectDetail; } });
|
|
12
|
+
var homepage_data_1 = require("./homepage-data");
|
|
13
|
+
Object.defineProperty(exports, "getUserCommentData", { enumerable: true, get: function () { return homepage_data_1.getUserCommentData; } });
|
|
14
|
+
Object.defineProperty(exports, "getUserFansData", { enumerable: true, get: function () { return homepage_data_1.getUserFansData; } });
|
|
15
|
+
Object.defineProperty(exports, "getUserItemData", { enumerable: true, get: function () { return homepage_data_1.getUserItemData; } });
|
|
16
|
+
Object.defineProperty(exports, "getUserLikeData", { enumerable: true, get: function () { return homepage_data_1.getUserLikeData; } });
|
|
17
|
+
Object.defineProperty(exports, "getUserProfileData", { enumerable: true, get: function () { return homepage_data_1.getUserProfileData; } });
|
|
18
|
+
Object.defineProperty(exports, "getUserShareData", { enumerable: true, get: function () { return homepage_data_1.getUserShareData; } });
|
|
19
|
+
var identity_1 = require("./identity");
|
|
20
|
+
Object.defineProperty(exports, "getAffiliateId", { enumerable: true, get: function () { return identity_1.getAffiliateId; } });
|
|
21
|
+
Object.defineProperty(exports, "getRelatedId", { enumerable: true, get: function () { return identity_1.getRelatedId; } });
|
|
22
|
+
var mobile_hash_1 = require("./mobile-hash");
|
|
23
|
+
Object.defineProperty(exports, "getUserHashMobile", { enumerable: true, get: function () { return mobile_hash_1.getUserHashMobile; } });
|
|
24
|
+
var profile_1 = require("./profile");
|
|
25
|
+
Object.defineProperty(exports, "getUserConstellation", { enumerable: true, get: function () { return profile_1.getUserConstellation; } });
|
|
26
|
+
var public_info_1 = require("./public-info");
|
|
27
|
+
Object.defineProperty(exports, "getUserPublicInfo", { enumerable: true, get: function () { return public_info_1.getUserPublicInfo; } });
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
|
+
export interface UserHashMobileParams {
|
|
3
|
+
/** 用户 open_id,通过 /oauth/access_token/ 获取,用户唯一标志 */
|
|
4
|
+
open_id: string;
|
|
5
|
+
}
|
|
6
|
+
export interface UserHashMobileResponse {
|
|
7
|
+
/** 单向哈希加密后的手机号 */
|
|
8
|
+
mobile_hash?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 获取用户加密手机号(单向哈希)
|
|
12
|
+
*
|
|
13
|
+
* - Path: `/api/douyin/v1/user/get_user_hash_mobile/`
|
|
14
|
+
* - Capability: `dy.open.user.info.mobile_hash.parent`
|
|
15
|
+
* - Scope: `user.info.mobile_hash`
|
|
16
|
+
* - 需要用户授权: 是(调用前需用户授权 `user.info.mobile_hash` scope)
|
|
17
|
+
*
|
|
18
|
+
* @remarks 返回的是经过单向哈希处理的手机号,无法还原为明文。
|
|
19
|
+
*/
|
|
20
|
+
export declare function getUserHashMobile(params: UserHashMobileParams, options?: CallOptions): Promise<OpenAPIResponse<UserHashMobileResponse>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUserHashMobile = getUserHashMobile;
|
|
4
|
+
const core_1 = require("../core");
|
|
5
|
+
/**
|
|
6
|
+
* 获取用户加密手机号(单向哈希)
|
|
7
|
+
*
|
|
8
|
+
* - Path: `/api/douyin/v1/user/get_user_hash_mobile/`
|
|
9
|
+
* - Capability: `dy.open.user.info.mobile_hash.parent`
|
|
10
|
+
* - Scope: `user.info.mobile_hash`
|
|
11
|
+
* - 需要用户授权: 是(调用前需用户授权 `user.info.mobile_hash` scope)
|
|
12
|
+
*
|
|
13
|
+
* @remarks 返回的是经过单向哈希处理的手机号,无法还原为明文。
|
|
14
|
+
*/
|
|
15
|
+
async function getUserHashMobile(params, options) {
|
|
16
|
+
return (0, core_1.callOpenAPI)({
|
|
17
|
+
path: '/api/douyin/v1/user/get_user_hash_mobile/',
|
|
18
|
+
method: 'GET',
|
|
19
|
+
queryParams: params,
|
|
20
|
+
domain: 'open.douyin.com',
|
|
21
|
+
}, options);
|
|
22
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { CallOptions, OpenAPIResponse } from '../core';
|
|
2
|
+
export interface UserPublicInfoParams {
|
|
3
|
+
/** 目标用户 open_id,通过 /oauth/access_token/ 获取,用户唯一标志 */
|
|
4
|
+
open_id: string;
|
|
5
|
+
}
|
|
6
|
+
export interface UserPublicInfo {
|
|
7
|
+
/** 用户 open_id */
|
|
8
|
+
open_id?: string;
|
|
9
|
+
/** 用户在当前开发者账号下的唯一标志 union_id */
|
|
10
|
+
union_id?: string;
|
|
11
|
+
/** 用户昵称 */
|
|
12
|
+
nickname?: string;
|
|
13
|
+
/** 用户头像 */
|
|
14
|
+
avatar?: string;
|
|
15
|
+
/** 用户头像(大图) */
|
|
16
|
+
avatar_larger?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface UserPublicInfoResponse {
|
|
19
|
+
/** 用户公开资料 */
|
|
20
|
+
user?: UserPublicInfo;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 获取用户公开个人资料
|
|
24
|
+
*
|
|
25
|
+
* - Path: `/dy_open_api/v1/user/public_info/`
|
|
26
|
+
* - Capability: `dy.open.user_profile`
|
|
27
|
+
* - Scope: `user_profile`
|
|
28
|
+
* - 需要用户授权: 是(调用前需用户通过 OAuth 授权 `user_profile` scope)
|
|
29
|
+
*
|
|
30
|
+
* @remarks 用于「可颂」等场景获取用户公开个人资料(昵称、头像等)。
|
|
31
|
+
*/
|
|
32
|
+
export declare function getUserPublicInfo(params: UserPublicInfoParams, options?: CallOptions): Promise<OpenAPIResponse<UserPublicInfoResponse>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUserPublicInfo = getUserPublicInfo;
|
|
4
|
+
const core_1 = require("../core");
|
|
5
|
+
/**
|
|
6
|
+
* 获取用户公开个人资料
|
|
7
|
+
*
|
|
8
|
+
* - Path: `/dy_open_api/v1/user/public_info/`
|
|
9
|
+
* - Capability: `dy.open.user_profile`
|
|
10
|
+
* - Scope: `user_profile`
|
|
11
|
+
* - 需要用户授权: 是(调用前需用户通过 OAuth 授权 `user_profile` scope)
|
|
12
|
+
*
|
|
13
|
+
* @remarks 用于「可颂」等场景获取用户公开个人资料(昵称、头像等)。
|
|
14
|
+
*/
|
|
15
|
+
async function getUserPublicInfo(params, options) {
|
|
16
|
+
return (0, core_1.callOpenAPI)({
|
|
17
|
+
path: '/dy_open_api/v1/user/public_info/',
|
|
18
|
+
method: 'GET',
|
|
19
|
+
queryParams: params,
|
|
20
|
+
domain: 'open.douyin.com',
|
|
21
|
+
}, options);
|
|
22
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { createActivity, modifyActivity, queryActivityInfo, queryActivityUserCompletionStatus } from './task';
|
|
2
|
+
export type { ActivityTaskInfo, ActivityUserTaskStatus, CreateActivityRequest, CreateActivityResponse, ModifyActivityRequest, ModifyActivityResponse, QueryActivityInfoRequest, QueryActivityInfoResponse, QueryActivityUserCompletionStatusRequest, QueryActivityUserCompletionStatusResponse } from './task';
|
|
@@ -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; } });
|