polyv-live-api-sdk 1.0.0
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/dist/auth/index.d.ts +9 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/signature.d.ts +67 -0
- package/dist/auth/signature.d.ts.map +1 -0
- package/dist/client.d.ts +209 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/constants/error-codes.d.ts +134 -0
- package/dist/constants/error-codes.d.ts.map +1 -0
- package/dist/constants/index.d.ts +8 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/errors/index.d.ts +11 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/polyv-api-error.d.ts +71 -0
- package/dist/errors/polyv-api-error.d.ts.map +1 -0
- package/dist/errors/polyv-error.d.ts +31 -0
- package/dist/errors/polyv-error.d.ts.map +1 -0
- package/dist/errors/polyv-validation-error.d.ts +72 -0
- package/dist/errors/polyv-validation-error.d.ts.map +1 -0
- package/dist/errors/type-guards.d.ts +19 -0
- package/dist/errors/type-guards.d.ts.map +1 -0
- package/dist/errors/types.d.ts +13 -0
- package/dist/errors/types.d.ts.map +1 -0
- package/dist/index.cjs +15295 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +19501 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15258 -0
- package/dist/index.js.map +1 -0
- package/dist/services/account.service.d.ts +402 -0
- package/dist/services/account.service.d.ts.map +1 -0
- package/dist/services/channel.service.d.ts +2033 -0
- package/dist/services/channel.service.d.ts.map +1 -0
- package/dist/services/chat.service.d.ts +592 -0
- package/dist/services/chat.service.d.ts.map +1 -0
- package/dist/services/finance.service.d.ts +160 -0
- package/dist/services/finance.service.d.ts.map +1 -0
- package/dist/services/group.service.d.ts +191 -0
- package/dist/services/group.service.d.ts.map +1 -0
- package/dist/services/index.d.ts +27 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/live-interaction.service.d.ts +474 -0
- package/dist/services/live-interaction.service.d.ts.map +1 -0
- package/dist/services/other.service.d.ts +687 -0
- package/dist/services/other.service.d.ts.map +1 -0
- package/dist/services/platform.service.d.ts +190 -0
- package/dist/services/platform.service.d.ts.map +1 -0
- package/dist/services/player.service.d.ts +195 -0
- package/dist/services/player.service.d.ts.map +1 -0
- package/dist/services/v4/ai.service.d.ts +205 -0
- package/dist/services/v4/ai.service.d.ts.map +1 -0
- package/dist/services/v4/channel.service.d.ts +854 -0
- package/dist/services/v4/channel.service.d.ts.map +1 -0
- package/dist/services/v4/chat.service.d.ts +199 -0
- package/dist/services/v4/chat.service.d.ts.map +1 -0
- package/dist/services/v4/global.service.d.ts +86 -0
- package/dist/services/v4/global.service.d.ts.map +1 -0
- package/dist/services/v4/group.service.d.ts +132 -0
- package/dist/services/v4/group.service.d.ts.map +1 -0
- package/dist/services/v4/material.service.d.ts +85 -0
- package/dist/services/v4/material.service.d.ts.map +1 -0
- package/dist/services/v4/platform.service.d.ts +148 -0
- package/dist/services/v4/platform.service.d.ts.map +1 -0
- package/dist/services/v4/robot.service.d.ts +144 -0
- package/dist/services/v4/robot.service.d.ts.map +1 -0
- package/dist/services/v4/statistics.service.d.ts +61 -0
- package/dist/services/v4/statistics.service.d.ts.map +1 -0
- package/dist/services/v4/user.service.d.ts +1014 -0
- package/dist/services/v4/user.service.d.ts.map +1 -0
- package/dist/services/v4/webapp.service.d.ts +131 -0
- package/dist/services/v4/webapp.service.d.ts.map +1 -0
- package/dist/services/web.service.d.ts +758 -0
- package/dist/services/web.service.d.ts.map +1 -0
- package/dist/types/account.d.ts +287 -0
- package/dist/types/account.d.ts.map +1 -0
- package/dist/types/auth.d.ts +31 -0
- package/dist/types/auth.d.ts.map +1 -0
- package/dist/types/callback.d.ts +156 -0
- package/dist/types/callback.d.ts.map +1 -0
- package/dist/types/channel.d.ts +2263 -0
- package/dist/types/channel.d.ts.map +1 -0
- package/dist/types/chat-banned.d.ts +366 -0
- package/dist/types/chat-banned.d.ts.map +1 -0
- package/dist/types/chat-censor-role.d.ts +190 -0
- package/dist/types/chat-censor-role.d.ts.map +1 -0
- package/dist/types/chat.d.ts +142 -0
- package/dist/types/chat.d.ts.map +1 -0
- package/dist/types/client.d.ts +43 -0
- package/dist/types/client.d.ts.map +1 -0
- package/dist/types/common.d.ts +52 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/finance.d.ts +252 -0
- package/dist/types/finance.d.ts.map +1 -0
- package/dist/types/group.d.ts +129 -0
- package/dist/types/group.d.ts.map +1 -0
- package/dist/types/index.d.ts +50 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/live-interaction.d.ts +301 -0
- package/dist/types/live-interaction.d.ts.map +1 -0
- package/dist/types/pagination.d.ts +37 -0
- package/dist/types/pagination.d.ts.map +1 -0
- package/dist/types/platform.d.ts +178 -0
- package/dist/types/platform.d.ts.map +1 -0
- package/dist/types/player.d.ts +177 -0
- package/dist/types/player.d.ts.map +1 -0
- package/dist/types/request.d.ts +45 -0
- package/dist/types/request.d.ts.map +1 -0
- package/dist/types/response.d.ts +58 -0
- package/dist/types/response.d.ts.map +1 -0
- package/dist/types/signature.d.ts +50 -0
- package/dist/types/signature.d.ts.map +1 -0
- package/dist/types/upload.d.ts +32 -0
- package/dist/types/upload.d.ts.map +1 -0
- package/dist/types/v4-ai.d.ts +379 -0
- package/dist/types/v4-ai.d.ts.map +1 -0
- package/dist/types/v4-channel.d.ts +2400 -0
- package/dist/types/v4-channel.d.ts.map +1 -0
- package/dist/types/v4-chat.d.ts +190 -0
- package/dist/types/v4-chat.d.ts.map +1 -0
- package/dist/types/v4-global.d.ts +150 -0
- package/dist/types/v4-global.d.ts.map +1 -0
- package/dist/types/v4-group.d.ts +212 -0
- package/dist/types/v4-group.d.ts.map +1 -0
- package/dist/types/v4-material.d.ts +141 -0
- package/dist/types/v4-material.d.ts.map +1 -0
- package/dist/types/v4-platform.d.ts +223 -0
- package/dist/types/v4-platform.d.ts.map +1 -0
- package/dist/types/v4-robot.d.ts +149 -0
- package/dist/types/v4-robot.d.ts.map +1 -0
- package/dist/types/v4-statistics.d.ts +87 -0
- package/dist/types/v4-statistics.d.ts.map +1 -0
- package/dist/types/v4-user.d.ts +1021 -0
- package/dist/types/v4-user.d.ts.map +1 -0
- package/dist/types/v4-webapp.d.ts +161 -0
- package/dist/types/v4-webapp.d.ts.map +1 -0
- package/dist/types/version.d.ts +21 -0
- package/dist/types/version.d.ts.map +1 -0
- package/dist/types/web.d.ts +868 -0
- package/dist/types/web.d.ts.map +1 -0
- package/dist/utils/env.d.ts +54 -0
- package/dist/utils/env.d.ts.map +1 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/pagination.d.ts +62 -0
- package/dist/utils/pagination.d.ts.map +1 -0
- package/dist/utils/signature.d.ts +67 -0
- package/dist/utils/signature.d.ts.map +1 -0
- package/package.json +76 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat Service Types
|
|
3
|
+
*
|
|
4
|
+
* Types for the ChatService message APIs (Epic 3, Story 3.1)
|
|
5
|
+
*/
|
|
6
|
+
export interface getHistoryPageParams {
|
|
7
|
+
channelId: string;
|
|
8
|
+
startDay?: string;
|
|
9
|
+
endDay?: string;
|
|
10
|
+
page?: number;
|
|
11
|
+
pageSize?: number;
|
|
12
|
+
userType?: string;
|
|
13
|
+
status?: string;
|
|
14
|
+
source?: string;
|
|
15
|
+
roomId?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface sendAdminMsgParams {
|
|
18
|
+
channelId: string;
|
|
19
|
+
msg?: string;
|
|
20
|
+
imgUrl?: string;
|
|
21
|
+
pic?: string;
|
|
22
|
+
nickName?: string;
|
|
23
|
+
actor?: string;
|
|
24
|
+
adminIndex?: number;
|
|
25
|
+
freeReview?: boolean;
|
|
26
|
+
apiVersion?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface sendChatParams {
|
|
29
|
+
channelId: string;
|
|
30
|
+
userId: string;
|
|
31
|
+
content: string;
|
|
32
|
+
imgUrl?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface sendHiddenByAdminParams {
|
|
35
|
+
channelId: string;
|
|
36
|
+
content: string;
|
|
37
|
+
role: string;
|
|
38
|
+
}
|
|
39
|
+
export interface delChatParams {
|
|
40
|
+
channelId: string;
|
|
41
|
+
id: string;
|
|
42
|
+
}
|
|
43
|
+
export interface cleanChatParams {
|
|
44
|
+
channelId: string;
|
|
45
|
+
}
|
|
46
|
+
export interface messageAuditParams {
|
|
47
|
+
channelId: string;
|
|
48
|
+
messages: messageAuditItem[];
|
|
49
|
+
}
|
|
50
|
+
export interface messageAuditItem {
|
|
51
|
+
msgId: string;
|
|
52
|
+
content: string;
|
|
53
|
+
viewerId: string;
|
|
54
|
+
nickName: string;
|
|
55
|
+
avatar?: string;
|
|
56
|
+
sessionId?: string;
|
|
57
|
+
viewerType?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface alertToSpecialParams {
|
|
60
|
+
channelId: string;
|
|
61
|
+
message: string;
|
|
62
|
+
title: string;
|
|
63
|
+
}
|
|
64
|
+
export interface getSpeakListParams {
|
|
65
|
+
startTime?: number;
|
|
66
|
+
endTime?: number;
|
|
67
|
+
cursor?: string;
|
|
68
|
+
size?: number;
|
|
69
|
+
}
|
|
70
|
+
export interface ChatMessage {
|
|
71
|
+
id: string;
|
|
72
|
+
content: string;
|
|
73
|
+
msgType?: string;
|
|
74
|
+
user?: {
|
|
75
|
+
userId: string;
|
|
76
|
+
nick: string;
|
|
77
|
+
pic: string;
|
|
78
|
+
userType: string;
|
|
79
|
+
};
|
|
80
|
+
time?: number;
|
|
81
|
+
status?: string;
|
|
82
|
+
image?: string;
|
|
83
|
+
roomId?: string;
|
|
84
|
+
sessionId?: string;
|
|
85
|
+
accountId?: string;
|
|
86
|
+
}
|
|
87
|
+
export interface ChatHistoryPageResponse {
|
|
88
|
+
contents: ChatMessage[];
|
|
89
|
+
total: number;
|
|
90
|
+
pageSize: number;
|
|
91
|
+
pageNumber: number;
|
|
92
|
+
totalPages: number;
|
|
93
|
+
}
|
|
94
|
+
export interface SendAdminMsgResponse {
|
|
95
|
+
success: boolean;
|
|
96
|
+
message: string;
|
|
97
|
+
data?: string;
|
|
98
|
+
}
|
|
99
|
+
export interface SendChatResponse {
|
|
100
|
+
status: string;
|
|
101
|
+
result?: string;
|
|
102
|
+
}
|
|
103
|
+
export interface SendHiddenByAdminResponse {
|
|
104
|
+
code?: number;
|
|
105
|
+
status: string;
|
|
106
|
+
message?: string;
|
|
107
|
+
data?: string;
|
|
108
|
+
}
|
|
109
|
+
export interface delChatResponse {
|
|
110
|
+
success: boolean;
|
|
111
|
+
message: string;
|
|
112
|
+
data: string;
|
|
113
|
+
}
|
|
114
|
+
export interface cleanChatResponse {
|
|
115
|
+
success: boolean;
|
|
116
|
+
data: boolean;
|
|
117
|
+
}
|
|
118
|
+
export interface messageAuditResponse {
|
|
119
|
+
code?: number;
|
|
120
|
+
status?: string;
|
|
121
|
+
requestId?: string;
|
|
122
|
+
success?: boolean;
|
|
123
|
+
data: {
|
|
124
|
+
id: string;
|
|
125
|
+
msgId: string;
|
|
126
|
+
status: boolean;
|
|
127
|
+
msg: string;
|
|
128
|
+
}[];
|
|
129
|
+
}
|
|
130
|
+
export interface alertToSpecialResponse {
|
|
131
|
+
code?: number;
|
|
132
|
+
status?: string;
|
|
133
|
+
requestId?: string;
|
|
134
|
+
success?: boolean;
|
|
135
|
+
data: boolean;
|
|
136
|
+
}
|
|
137
|
+
export interface SpeakListResponse {
|
|
138
|
+
cursor: string;
|
|
139
|
+
size: number;
|
|
140
|
+
list: ChatMessage[];
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=chat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/types/chat.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH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AW,EAAE,CAAC;CACrB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client Types
|
|
3
|
+
*
|
|
4
|
+
* Configuration and types for the PolyV API client.
|
|
5
|
+
*/
|
|
6
|
+
import type { ApiVersion } from './version.ts';
|
|
7
|
+
/**
|
|
8
|
+
* PolyV Client Configuration
|
|
9
|
+
*
|
|
10
|
+
* Configuration options for creating a PolyVClient instance.
|
|
11
|
+
*/
|
|
12
|
+
export interface PolyVClientConfig {
|
|
13
|
+
/** PolyV App ID */
|
|
14
|
+
appId: string;
|
|
15
|
+
/** PolyV App Secret */
|
|
16
|
+
appSecret: string;
|
|
17
|
+
/** API Base URL (default: https://api.polyv.net/live/v3) */
|
|
18
|
+
baseUrl?: string;
|
|
19
|
+
/** Request timeout in milliseconds (default: 30000) */
|
|
20
|
+
timeout?: number;
|
|
21
|
+
/** Custom headers to include in all requests */
|
|
22
|
+
headers?: Record<string, string>;
|
|
23
|
+
/** API version (default: v3) */
|
|
24
|
+
version?: ApiVersion;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Internal client configuration (resolved with defaults)
|
|
28
|
+
*/
|
|
29
|
+
export interface ResolvedClientConfig {
|
|
30
|
+
/** PolyV App ID */
|
|
31
|
+
appId: string;
|
|
32
|
+
/** PolyV App Secret */
|
|
33
|
+
appSecret: string;
|
|
34
|
+
/** API Base URL with version */
|
|
35
|
+
baseUrl: string;
|
|
36
|
+
/** Request timeout in milliseconds */
|
|
37
|
+
timeout: number;
|
|
38
|
+
/** Custom headers */
|
|
39
|
+
headers: Record<string, string>;
|
|
40
|
+
/** API version */
|
|
41
|
+
version: ApiVersion;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/types/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,gCAAgC;IAChC,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,kBAAkB;IAClB,OAAO,EAAE,UAAU,CAAC;CACrB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common Types
|
|
3
|
+
*
|
|
4
|
+
* General-purpose utility types.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Makes specified keys of T required
|
|
8
|
+
*/
|
|
9
|
+
export type RequireKeys<T, K extends keyof T> = T & Required<Pick<T, K>>;
|
|
10
|
+
/**
|
|
11
|
+
* Makes specified keys of T optional
|
|
12
|
+
*/
|
|
13
|
+
export type OptionalKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
14
|
+
/**
|
|
15
|
+
* Deep partial type
|
|
16
|
+
*/
|
|
17
|
+
export type DeepPartial<T> = T extends object ? {
|
|
18
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
19
|
+
} : T;
|
|
20
|
+
/**
|
|
21
|
+
* Non-nullable type
|
|
22
|
+
*/
|
|
23
|
+
export type NonNullable<T> = T extends null | undefined ? never : T;
|
|
24
|
+
/**
|
|
25
|
+
* Extract the element type of an array
|
|
26
|
+
*/
|
|
27
|
+
export type ArrayElement<T> = T extends readonly (infer E)[] ? E : never;
|
|
28
|
+
/**
|
|
29
|
+
* Make all properties mutable
|
|
30
|
+
*/
|
|
31
|
+
export type Mutable<T> = {
|
|
32
|
+
-readonly [P in keyof T]: T[P];
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Primitive types
|
|
36
|
+
*/
|
|
37
|
+
export type Primitive = string | number | boolean | null | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* JSON value types
|
|
40
|
+
*/
|
|
41
|
+
export type JsonValue = Primitive | JsonObject | JsonArray;
|
|
42
|
+
/**
|
|
43
|
+
* JSON object
|
|
44
|
+
*/
|
|
45
|
+
export interface JsonObject {
|
|
46
|
+
[key: string]: JsonValue;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* JSON array
|
|
50
|
+
*/
|
|
51
|
+
export type JsonArray = JsonValue[];
|
|
52
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAElF;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GACzC;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACtC,CAAC,CAAC;AAEN;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,GAAG,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;IACvB,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAC/B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Finance Types
|
|
3
|
+
*
|
|
4
|
+
* TypeScript type definitions for Finance Service APIs (Audio/Video Moderation).
|
|
5
|
+
*
|
|
6
|
+
* @module types/finance
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Y/N switch type for moderation settings
|
|
10
|
+
*/
|
|
11
|
+
export type YNEnabled = 'Y' | 'N';
|
|
12
|
+
/**
|
|
13
|
+
* Audio moderation strategy (for audio)
|
|
14
|
+
* easy: Loose moderation
|
|
15
|
+
* normal: Standard moderation
|
|
16
|
+
* strict: Strict moderation
|
|
17
|
+
*/
|
|
18
|
+
export type AudioModerationStrategy = 'easy' | 'normal' | 'strict';
|
|
19
|
+
/**
|
|
20
|
+
* Video moderation strategy (for video)
|
|
21
|
+
* Uses finance_ prefix
|
|
22
|
+
*/
|
|
23
|
+
export type VideoModerationStrategy = 'finance_easy' | 'finance_normal' | 'finance_serious';
|
|
24
|
+
/**
|
|
25
|
+
* Image frequency for video moderation (in seconds)
|
|
26
|
+
* 5: Premium (12 audits/minute)
|
|
27
|
+
* 20: Enhanced (3 audits/minute)
|
|
28
|
+
* 60: Standard (1 audit/minute)
|
|
29
|
+
*/
|
|
30
|
+
export type ImageFrequency = 5 | 20 | 60;
|
|
31
|
+
/**
|
|
32
|
+
* Moderation result type
|
|
33
|
+
* 1: Passed
|
|
34
|
+
* 2: Violation
|
|
35
|
+
* 3: Suspected
|
|
36
|
+
*/
|
|
37
|
+
export type ModerationResultType = 1 | 2 | 3;
|
|
38
|
+
/**
|
|
39
|
+
* Label type for moderation results
|
|
40
|
+
*/
|
|
41
|
+
export type ModerationLabel = 'Normal' | 'Porn' | 'Abuse' | 'Ad' | 'Custom' | 'Badword' | 'Illegal' | 'Polity' | 'Moan' | 'Terror' | 'Religion' | 'Sexy' | 'Teenager' | 'Copyright';
|
|
42
|
+
/**
|
|
43
|
+
* Illegal notification settings
|
|
44
|
+
* Controls who gets notified when violations are detected
|
|
45
|
+
*/
|
|
46
|
+
export interface IllegalNotifySettings {
|
|
47
|
+
/** Assistant notification: Y/N */
|
|
48
|
+
assistantEnabled?: YNEnabled;
|
|
49
|
+
/** Monitor notification: Y/N */
|
|
50
|
+
monitorEnabled?: YNEnabled;
|
|
51
|
+
/** Platform notification: Y/N */
|
|
52
|
+
platformEnabled?: YNEnabled;
|
|
53
|
+
/** Talent (host) notification: Y/N */
|
|
54
|
+
talentEnabled?: YNEnabled;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Audio moderation settings response
|
|
58
|
+
*/
|
|
59
|
+
export interface AudioModerationSettings {
|
|
60
|
+
/** POLYV user ID */
|
|
61
|
+
userId?: string;
|
|
62
|
+
/** Channel ID */
|
|
63
|
+
channelId: number;
|
|
64
|
+
/** Moderation switch: Y/N */
|
|
65
|
+
moderationEnabled: YNEnabled;
|
|
66
|
+
/** Moderation strategy */
|
|
67
|
+
moderationStrategy: AudioModerationStrategy;
|
|
68
|
+
/** Badword filter switch: Y/N */
|
|
69
|
+
badwordEnabled?: YNEnabled;
|
|
70
|
+
/** Illegal notification settings */
|
|
71
|
+
illegalNotify: IllegalNotifySettings;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* List audio moderation records parameters
|
|
75
|
+
*/
|
|
76
|
+
export interface ListAudioModerationRecordsParams {
|
|
77
|
+
/** Channel ID (required) */
|
|
78
|
+
channelId: number | string;
|
|
79
|
+
/** Page number (default 1) */
|
|
80
|
+
pageNumber?: number;
|
|
81
|
+
/** Page size (default 10, max 1000) */
|
|
82
|
+
pageSize?: number;
|
|
83
|
+
/** Start time (13-bit timestamp) */
|
|
84
|
+
startTime?: number;
|
|
85
|
+
/** End time (13-bit timestamp) */
|
|
86
|
+
endTime?: number;
|
|
87
|
+
/** Session ID */
|
|
88
|
+
sessionId?: string;
|
|
89
|
+
/** Moderation strategy filter (comma-separated: pass,block,review) */
|
|
90
|
+
moderationStrategy?: string;
|
|
91
|
+
/** Result type filter */
|
|
92
|
+
resultType?: ModerationResultType;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Audio moderation record item
|
|
96
|
+
*/
|
|
97
|
+
export interface AudioModerationRecordItem {
|
|
98
|
+
/** Audit task ID */
|
|
99
|
+
id: number | string;
|
|
100
|
+
/** Session ID */
|
|
101
|
+
sessionId?: string;
|
|
102
|
+
/** Audio transcription text */
|
|
103
|
+
audioText?: string;
|
|
104
|
+
/** Audio slice URL */
|
|
105
|
+
audioUrl?: string;
|
|
106
|
+
/** Badword detected */
|
|
107
|
+
badword?: string;
|
|
108
|
+
/** Keyword detected */
|
|
109
|
+
keyword?: string;
|
|
110
|
+
/** Label type */
|
|
111
|
+
label?: ModerationLabel;
|
|
112
|
+
/** Label description */
|
|
113
|
+
labelDesc?: string;
|
|
114
|
+
/** Moderation strategy */
|
|
115
|
+
moderationStrategy?: AudioModerationStrategy;
|
|
116
|
+
/** Moderation strategy description */
|
|
117
|
+
moderationStrategyDesc?: string;
|
|
118
|
+
/** Result type: 1=pass, 2=violation, 3=suspected */
|
|
119
|
+
resultType: ModerationResultType;
|
|
120
|
+
/** Confidence score */
|
|
121
|
+
score?: number;
|
|
122
|
+
/** Audio duration */
|
|
123
|
+
duration?: number;
|
|
124
|
+
/** Create time */
|
|
125
|
+
createTime?: string;
|
|
126
|
+
/** Start time */
|
|
127
|
+
startTime?: string;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* List audio moderation records response (paginated)
|
|
131
|
+
*/
|
|
132
|
+
export interface ListAudioModerationRecordsResponse {
|
|
133
|
+
/** Record items */
|
|
134
|
+
contents: AudioModerationRecordItem[];
|
|
135
|
+
/** Current page number */
|
|
136
|
+
pageNumber: number;
|
|
137
|
+
/** Page size */
|
|
138
|
+
pageSize: number;
|
|
139
|
+
/** Total pages */
|
|
140
|
+
totalPages: number;
|
|
141
|
+
/** Total items */
|
|
142
|
+
totalItems: number;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Update audio moderation settings parameters
|
|
146
|
+
*/
|
|
147
|
+
export interface UpdateAudioModerationSettingsParams {
|
|
148
|
+
/** Moderation switch: Y/N */
|
|
149
|
+
moderationEnabled?: YNEnabled;
|
|
150
|
+
/** Moderation strategy */
|
|
151
|
+
moderationStrategy?: AudioModerationStrategy;
|
|
152
|
+
/** Badword filter switch: Y/N */
|
|
153
|
+
badwordEnabled?: YNEnabled;
|
|
154
|
+
/** Illegal notification settings */
|
|
155
|
+
illegalNotify?: IllegalNotifySettings;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Video moderation settings response
|
|
159
|
+
*/
|
|
160
|
+
export interface VideoModerationSettings {
|
|
161
|
+
/** Channel ID */
|
|
162
|
+
channelId: number;
|
|
163
|
+
/** Moderation switch: Y/N */
|
|
164
|
+
moderationEnabled: YNEnabled;
|
|
165
|
+
/** Moderation strategy (with finance_ prefix) */
|
|
166
|
+
moderationStrategy: VideoModerationStrategy;
|
|
167
|
+
/** Image frequency (seconds): 5, 20, or 60 */
|
|
168
|
+
imageFrequency: ImageFrequency;
|
|
169
|
+
/** Illegal notification settings */
|
|
170
|
+
illegalNotify: IllegalNotifySettings;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Update video moderation settings parameters
|
|
174
|
+
*/
|
|
175
|
+
export interface UpdateVideoModerationSettingsParams {
|
|
176
|
+
/** Moderation switch: Y/N (required) */
|
|
177
|
+
moderationEnabled: YNEnabled;
|
|
178
|
+
/** Moderation strategy (required) */
|
|
179
|
+
moderationStrategy: VideoModerationStrategy;
|
|
180
|
+
/** Image frequency (required): 5, 20, or 60 */
|
|
181
|
+
imageFrequency: ImageFrequency;
|
|
182
|
+
/** Illegal notification settings (required) */
|
|
183
|
+
illegalNotify: IllegalNotifySettings;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* List video moderation results parameters
|
|
187
|
+
*/
|
|
188
|
+
export interface ListVideoModerationResultsParams {
|
|
189
|
+
/** Channel ID (required) */
|
|
190
|
+
channelId: number | string;
|
|
191
|
+
/** Page number (default 1) */
|
|
192
|
+
pageNumber?: number;
|
|
193
|
+
/** Page size (default 10, max 1000) */
|
|
194
|
+
pageSize?: number;
|
|
195
|
+
/** Session ID */
|
|
196
|
+
sessionId?: string;
|
|
197
|
+
/** Label filter (comma-separated) */
|
|
198
|
+
label?: string;
|
|
199
|
+
/** Result type filter (comma-separated: 1,2,3) */
|
|
200
|
+
resultType?: string;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Video moderation result item
|
|
204
|
+
*/
|
|
205
|
+
export interface VideoModerationResultItem {
|
|
206
|
+
/** Record ID */
|
|
207
|
+
id: number;
|
|
208
|
+
/** User ID */
|
|
209
|
+
userId?: string;
|
|
210
|
+
/** Channel ID */
|
|
211
|
+
channelId: number;
|
|
212
|
+
/** Session ID */
|
|
213
|
+
sessionId?: string;
|
|
214
|
+
/** Task ID */
|
|
215
|
+
taskId?: number;
|
|
216
|
+
/** Image URL */
|
|
217
|
+
imageUrl?: string;
|
|
218
|
+
/** OCR text detected */
|
|
219
|
+
ocrText?: string;
|
|
220
|
+
/** OCR keyword */
|
|
221
|
+
ocrKeyword?: string;
|
|
222
|
+
/** Political figure name */
|
|
223
|
+
politicalName?: string;
|
|
224
|
+
/** Label type */
|
|
225
|
+
label?: ModerationLabel;
|
|
226
|
+
/** Label description */
|
|
227
|
+
labelDesc?: string;
|
|
228
|
+
/** Result type: 1=pass, 2=violation, 3=suspected */
|
|
229
|
+
resultType: ModerationResultType;
|
|
230
|
+
/** Result type description */
|
|
231
|
+
resultTypeDesc?: string;
|
|
232
|
+
/** Moderation strategy description */
|
|
233
|
+
moderationStrategyDesc?: string;
|
|
234
|
+
/** Create time (timestamp) */
|
|
235
|
+
createTime?: number;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* List video moderation results response (paginated)
|
|
239
|
+
*/
|
|
240
|
+
export interface ListVideoModerationResultsResponse {
|
|
241
|
+
/** Result items */
|
|
242
|
+
contents: VideoModerationResultItem[];
|
|
243
|
+
/** Current page number */
|
|
244
|
+
pageNumber: number;
|
|
245
|
+
/** Page size */
|
|
246
|
+
pageSize: number;
|
|
247
|
+
/** Total pages */
|
|
248
|
+
totalPages: number;
|
|
249
|
+
/** Total items */
|
|
250
|
+
totalItems: number;
|
|
251
|
+
}
|
|
252
|
+
//# sourceMappingURL=finance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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B,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Group Service Types
|
|
3
|
+
*
|
|
4
|
+
* Types for the PolyV Group Account Management API (v2)
|
|
5
|
+
* These APIs are used for managing sub-account resource allocation
|
|
6
|
+
*
|
|
7
|
+
* @module types/group
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Type of allocation record filter
|
|
11
|
+
* - all: Include both VOD and live records
|
|
12
|
+
* - live: Live streaming records only
|
|
13
|
+
* - vod: VOD records only
|
|
14
|
+
*/
|
|
15
|
+
export type AllocateLogType = 'all' | 'live' | 'vod';
|
|
16
|
+
/**
|
|
17
|
+
* Allocation origin type
|
|
18
|
+
* Describes the type of allocation action performed
|
|
19
|
+
*/
|
|
20
|
+
export type AllocateOrigin = 'ADD_CONCURRENCES' | 'ADD_DURATION' | 'ADD_FLOW' | 'ADD_SPACE' | 'RECOVER_CONCURRENCES' | 'RECOVER_DURATION' | 'RECOVER_FLOW' | 'RECOVER_SPACE';
|
|
21
|
+
/**
|
|
22
|
+
* Allocation log content item
|
|
23
|
+
* Represents a single allocation record
|
|
24
|
+
*/
|
|
25
|
+
export interface GroupAllocateLogContent {
|
|
26
|
+
/** Sub-account email */
|
|
27
|
+
email: string;
|
|
28
|
+
/** Allocation record timestamp */
|
|
29
|
+
date: string;
|
|
30
|
+
/** Origin type code */
|
|
31
|
+
origin: string;
|
|
32
|
+
/** Origin description text */
|
|
33
|
+
originText: string;
|
|
34
|
+
/** Allocated VOD space in bytes (null if not applicable) */
|
|
35
|
+
space: string | null;
|
|
36
|
+
/** Allocated VOD flow in bytes (null if not applicable) */
|
|
37
|
+
flow: string | null;
|
|
38
|
+
/** Channel allocation value (null if not applicable) */
|
|
39
|
+
channels: string | null;
|
|
40
|
+
/** Concurrency allocation value */
|
|
41
|
+
concurrences: number | null;
|
|
42
|
+
/** Duration allocation value in minutes (null if not applicable) */
|
|
43
|
+
duration: string | null;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Parameters for listAllocateLog
|
|
47
|
+
*/
|
|
48
|
+
export interface ListAllocateLogParams {
|
|
49
|
+
/** Sub-account emails, comma-separated (required) */
|
|
50
|
+
emails: string;
|
|
51
|
+
/** Record type filter: all, live, or vod */
|
|
52
|
+
type?: AllocateLogType;
|
|
53
|
+
/** Query start time, format: yyyy-MM-dd HH:mm:ss */
|
|
54
|
+
startTime?: string;
|
|
55
|
+
/** Query end time, format: yyyy-MM-dd HH:mm:ss */
|
|
56
|
+
endTime?: string;
|
|
57
|
+
/** Page number (1-indexed) */
|
|
58
|
+
page?: number;
|
|
59
|
+
/** Page size */
|
|
60
|
+
pageSize?: number;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Response for listAllocateLog
|
|
64
|
+
*/
|
|
65
|
+
export interface ListAllocateLogResponse {
|
|
66
|
+
/** Current page number */
|
|
67
|
+
pageNumber: number;
|
|
68
|
+
/** Total number of pages */
|
|
69
|
+
totalPages: number;
|
|
70
|
+
/** Page size */
|
|
71
|
+
pageSize: number;
|
|
72
|
+
/** Total number of items */
|
|
73
|
+
totalItems: number;
|
|
74
|
+
/** Allocation log contents */
|
|
75
|
+
contents: GroupAllocateLogContent[];
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Allocation type
|
|
79
|
+
* - add: Add/allocate resources
|
|
80
|
+
* - recover: Recover/reclaim resources
|
|
81
|
+
*/
|
|
82
|
+
export type AllocationType = 'add' | 'recover';
|
|
83
|
+
/**
|
|
84
|
+
* Parameters for setConcurrences
|
|
85
|
+
*/
|
|
86
|
+
export interface SetConcurrencesParams {
|
|
87
|
+
/** Sub-account email (required) */
|
|
88
|
+
email: string;
|
|
89
|
+
/** Allocation type: add or recover (default: add) */
|
|
90
|
+
type?: AllocationType;
|
|
91
|
+
/** Concurrency count, must be a positive integer (required for add) */
|
|
92
|
+
concurrences: number;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Parameters for setFlow
|
|
96
|
+
*/
|
|
97
|
+
export interface SetFlowParams {
|
|
98
|
+
/** Sub-account email (required) */
|
|
99
|
+
email: string;
|
|
100
|
+
/** Allocation type: add or recover (default: add) */
|
|
101
|
+
type?: AllocationType;
|
|
102
|
+
/** Recover all flag: 1 = recover all (only valid when type=recover) */
|
|
103
|
+
all?: 1;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Parameters for setLiveDurations
|
|
107
|
+
*/
|
|
108
|
+
export interface SetLiveDurationsParams {
|
|
109
|
+
/** Sub-account email (required) */
|
|
110
|
+
email: string;
|
|
111
|
+
/** Allocation type: add or recover (default: add) */
|
|
112
|
+
type?: AllocationType;
|
|
113
|
+
/** Duration in minutes, must be a positive integer (required) */
|
|
114
|
+
duration: number;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Parameters for setSpace
|
|
118
|
+
*/
|
|
119
|
+
export interface SetSpaceParams {
|
|
120
|
+
/** Sub-account email (required) */
|
|
121
|
+
email: string;
|
|
122
|
+
/** Allocation type: add or recover (default: add) */
|
|
123
|
+
type?: AllocationType;
|
|
124
|
+
/** Space in GB (required for add) */
|
|
125
|
+
space?: number;
|
|
126
|
+
/** Recover all flag: 1 = recover all (only valid when type=recover) */
|
|
127
|
+
all?: 1;
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../src/types/group.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC;AAErD;;;GAGG;AACH,MAAM,MAAM,cAAc,GACtB,kBAAkB,GAClB,cAA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