@hyext/types-ext-sdk-hy 3.14.4-beta.3 → 3.15.0-beta.2
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/index.d.ts +126 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -979,6 +979,41 @@ namespace ad {
|
|
|
979
979
|
* @returns 调用结果
|
|
980
980
|
*/
|
|
981
981
|
function ztPresentAppStore(params: ZtPresentAppStoreReq): Promise<void>;
|
|
982
|
+
/**
|
|
983
|
+
* 创建广告实例
|
|
984
|
+
* @param params - 传入参数
|
|
985
|
+
* @returns 调用结果
|
|
986
|
+
*/
|
|
987
|
+
function createAd(params: CreateAdReq): Promise<CreateAdRsp>;
|
|
988
|
+
/**
|
|
989
|
+
* 显示广告
|
|
990
|
+
* @param params - 传入参数
|
|
991
|
+
* @returns 调用结果
|
|
992
|
+
*/
|
|
993
|
+
function showAd(params: ShowAdReq): Promise<void>;
|
|
994
|
+
/**
|
|
995
|
+
* 加载广告
|
|
996
|
+
* @param params - 传入参数
|
|
997
|
+
* @returns 调用结果
|
|
998
|
+
*/
|
|
999
|
+
function loadAd(params: LoadAdReq): Promise<void>;
|
|
1000
|
+
/**
|
|
1001
|
+
* 销毁广告实例
|
|
1002
|
+
* @param params - 传入参数
|
|
1003
|
+
* @returns 调用结果
|
|
1004
|
+
*/
|
|
1005
|
+
function destroyAd(params: DestroyAdReq): Promise<void>;
|
|
1006
|
+
/**
|
|
1007
|
+
* 监听广告消息
|
|
1008
|
+
* @param params - 传入参数
|
|
1009
|
+
* @returns 调用结果
|
|
1010
|
+
*/
|
|
1011
|
+
function onAdMessage(params: OnAdMessageReq): Promise<void>;
|
|
1012
|
+
/**
|
|
1013
|
+
* 取消监听广告消息
|
|
1014
|
+
* @returns 调用结果
|
|
1015
|
+
*/
|
|
1016
|
+
function offAdMessage(): Promise<void>;
|
|
982
1017
|
}
|
|
983
1018
|
|
|
984
1019
|
/**
|
|
@@ -1111,6 +1146,97 @@ type ZtPresentAppStoreReq = {
|
|
|
1111
1146
|
appStoreLink: string;
|
|
1112
1147
|
};
|
|
1113
1148
|
|
|
1149
|
+
/**
|
|
1150
|
+
* 广告实例信息
|
|
1151
|
+
* @property instanceId - 广告实例ID
|
|
1152
|
+
*/
|
|
1153
|
+
type CreateAdRsp = {
|
|
1154
|
+
instanceId: string;
|
|
1155
|
+
};
|
|
1156
|
+
|
|
1157
|
+
/**
|
|
1158
|
+
* 创建广告实例参数
|
|
1159
|
+
* @property type - 广告类型, rewardedVideoAd-激励广告, interstitialAd-插屏广告
|
|
1160
|
+
* @property adUnitId - 广告单元 id
|
|
1161
|
+
*/
|
|
1162
|
+
type CreateAdReq = {
|
|
1163
|
+
type: string;
|
|
1164
|
+
adUnitId: string;
|
|
1165
|
+
};
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* 展示广告参数
|
|
1169
|
+
* @property instanceId - 广告实例ID
|
|
1170
|
+
*/
|
|
1171
|
+
type ShowAdReq = {
|
|
1172
|
+
instanceId: string;
|
|
1173
|
+
};
|
|
1174
|
+
|
|
1175
|
+
/**
|
|
1176
|
+
* 加载广告参数
|
|
1177
|
+
* @property instanceId - 广告实例ID
|
|
1178
|
+
*/
|
|
1179
|
+
type LoadAdReq = {
|
|
1180
|
+
instanceId: string;
|
|
1181
|
+
};
|
|
1182
|
+
|
|
1183
|
+
/**
|
|
1184
|
+
* 销毁广告实例参数
|
|
1185
|
+
* @property instanceId - 广告实例ID
|
|
1186
|
+
*/
|
|
1187
|
+
type DestroyAdReq = {
|
|
1188
|
+
instanceId: string;
|
|
1189
|
+
};
|
|
1190
|
+
|
|
1191
|
+
/**
|
|
1192
|
+
* 关闭信息
|
|
1193
|
+
* @property isEnded - 是否看完
|
|
1194
|
+
*/
|
|
1195
|
+
type CloseInfo = {
|
|
1196
|
+
isEnded: boolean;
|
|
1197
|
+
};
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
* 报错信息
|
|
1201
|
+
* @property message - 报错信息
|
|
1202
|
+
* @property stack - 报错堆栈
|
|
1203
|
+
* @property line - 报错行
|
|
1204
|
+
* @property column - 报错列
|
|
1205
|
+
* @property Error - 报错原对象
|
|
1206
|
+
*/
|
|
1207
|
+
type ErrorInfo = {
|
|
1208
|
+
message: string;
|
|
1209
|
+
stack: string[];
|
|
1210
|
+
line: number;
|
|
1211
|
+
column: number;
|
|
1212
|
+
Error: any;
|
|
1213
|
+
};
|
|
1214
|
+
|
|
1215
|
+
/**
|
|
1216
|
+
* 广告消息
|
|
1217
|
+
* @property instanceId - 广告实例ID
|
|
1218
|
+
* @property eventName - 事件名, onLoad-加载完成, onError-广告报错, onClose-广告关闭
|
|
1219
|
+
* @property [res] - 回调数据
|
|
1220
|
+
*/
|
|
1221
|
+
type AdMessage = {
|
|
1222
|
+
instanceId: string;
|
|
1223
|
+
eventName: string;
|
|
1224
|
+
res?: CloseInfo | ErrorInfo;
|
|
1225
|
+
};
|
|
1226
|
+
|
|
1227
|
+
/**
|
|
1228
|
+
* @param message - 广告消息
|
|
1229
|
+
*/
|
|
1230
|
+
type AdMessageCallback = (message: AdMessage) => void;
|
|
1231
|
+
|
|
1232
|
+
/**
|
|
1233
|
+
* 监听广告消息参数
|
|
1234
|
+
* @property callback - 广告消息回调
|
|
1235
|
+
*/
|
|
1236
|
+
type OnAdMessageReq = {
|
|
1237
|
+
callback: AdMessageCallback;
|
|
1238
|
+
};
|
|
1239
|
+
|
|
1114
1240
|
/**
|
|
1115
1241
|
* AR特效
|
|
1116
1242
|
*/
|