@funhub/platform 0.1.160-beta.0 → 0.1.160
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/biz.d.mts +1 -22
- package/dist/biz.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/client.d.mts +19 -0
- package/dist/components/biz/business/banner-carousel/client.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/default-props.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/material.d.mts +4 -1
- package/dist/components/biz/business/banner-carousel/material.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/schema.d.mts +2 -0
- package/dist/components/biz/business/banner-carousel/schema.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/server.d.mts +4 -2
- package/dist/components/biz/business/banner-carousel/server.mjs +1 -1
- package/dist/components/biz/business/channel-list/client.mjs +1 -1
- package/dist/components/biz/business/detail/shared/detail-follow-action.mjs +1 -1
- package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +1 -1
- package/dist/components/biz/business/detail/shared/use-video-detail-webview-bridge.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-actions/client.mjs +1 -1
- package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
- package/dist/components/biz/business/index.d.mts +0 -22
- package/dist/components/biz/business/large-feature-grid/card-item.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/client.mjs +1 -1
- package/dist/components/common/series-episodes/index.mjs +1 -1
- package/dist/components/pages/home/client.mjs +1 -1
- package/dist/components/pages/video-detail/video-detail-client.mjs +1 -1
- package/dist/components/pages/video-list/index.mjs +1 -1
- package/dist/components/pages/video-list/video-list-client.mjs +1 -1
- package/dist/components/ui/image.d.mts +4 -4
- package/dist/hooks.d.mts +1 -1
- package/dist/materials.d.mts +1 -6
- package/dist/materials.mjs +1 -1
- package/dist/service.d.mts +1 -2
- package/dist/service.mjs +1 -1
- package/dist/utils/schema/inspector.d.mts +2 -2
- package/dist/utils/schema/material.d.mts +0 -1
- package/package.json +1 -1
- package/dist/components/biz/business/advertisement/ad-match.d.mts +0 -98
- package/dist/components/biz/business/advertisement/ad-match.mjs +0 -2
- package/dist/components/biz/business/advertisement/ad-provider.d.mts +0 -33
- package/dist/components/biz/business/advertisement/ad-provider.mjs +0 -2
- package/dist/components/biz/business/advertisement/ad-query.d.mts +0 -27
- package/dist/components/biz/business/advertisement/ad-query.mjs +0 -2
- package/dist/components/biz/business/advertisement/ad-runtime-provider.d.mts +0 -25
- package/dist/components/biz/business/advertisement/ad-runtime-provider.mjs +0 -2
- package/dist/components/biz/business/advertisement/banner-ad/client.d.mts +0 -18
- package/dist/components/biz/business/advertisement/banner-ad/client.mjs +0 -2
- package/dist/components/biz/business/advertisement/banner-ad/index.d.mts +0 -5
- package/dist/components/biz/business/advertisement/banner-ad/material.d.mts +0 -30
- package/dist/components/biz/business/advertisement/banner-ad/material.mjs +0 -2
- package/dist/components/biz/business/advertisement/banner-ad/schema.d.mts +0 -75
- package/dist/components/biz/business/advertisement/banner-ad/schema.mjs +0 -2
- package/dist/components/biz/business/advertisement/banner-ad/server.d.mts +0 -11
- package/dist/components/biz/business/advertisement/banner-ad/server.mjs +0 -2
- package/dist/components/biz/business/advertisement/feed-ad/index.d.mts +0 -39
- package/dist/components/biz/business/advertisement/feed-ad/index.mjs +0 -2
- package/dist/components/biz/business/advertisement/floating-ad/client.d.mts +0 -21
- package/dist/components/biz/business/advertisement/floating-ad/client.mjs +0 -2
- package/dist/components/biz/business/advertisement/floating-ad/index.d.mts +0 -5
- package/dist/components/biz/business/advertisement/floating-ad/material.d.mts +0 -25
- package/dist/components/biz/business/advertisement/floating-ad/material.mjs +0 -2
- package/dist/components/biz/business/advertisement/floating-ad/schema.d.mts +0 -75
- package/dist/components/biz/business/advertisement/floating-ad/schema.mjs +0 -2
- package/dist/components/biz/business/advertisement/floating-ad/server.d.mts +0 -11
- package/dist/components/biz/business/advertisement/floating-ad/server.mjs +0 -2
- package/dist/components/biz/business/advertisement/icon-ad/client.d.mts +0 -16
- package/dist/components/biz/business/advertisement/icon-ad/client.mjs +0 -2
- package/dist/components/biz/business/advertisement/icon-ad/index.d.mts +0 -5
- package/dist/components/biz/business/advertisement/icon-ad/material.d.mts +0 -29
- package/dist/components/biz/business/advertisement/icon-ad/material.mjs +0 -2
- package/dist/components/biz/business/advertisement/icon-ad/schema.d.mts +0 -69
- package/dist/components/biz/business/advertisement/icon-ad/schema.mjs +0 -2
- package/dist/components/biz/business/advertisement/icon-ad/server.d.mts +0 -11
- package/dist/components/biz/business/advertisement/icon-ad/server.mjs +0 -2
- package/dist/components/biz/business/advertisement/index.d.mts +0 -26
- package/dist/components/biz/business/advertisement/text-ad/client.d.mts +0 -15
- package/dist/components/biz/business/advertisement/text-ad/client.mjs +0 -2
- package/dist/components/biz/business/advertisement/text-ad/index.d.mts +0 -5
- package/dist/components/biz/business/advertisement/text-ad/material.d.mts +0 -27
- package/dist/components/biz/business/advertisement/text-ad/material.mjs +0 -2
- package/dist/components/biz/business/advertisement/text-ad/schema.d.mts +0 -53
- package/dist/components/biz/business/advertisement/text-ad/schema.mjs +0 -2
- package/dist/components/biz/business/advertisement/text-ad/server.d.mts +0 -11
- package/dist/components/biz/business/advertisement/text-ad/server.mjs +0 -2
- package/dist/service/advertisement.d.mts +0 -172
- package/dist/service/advertisement.mjs +0 -2
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { BannerAdInspectorProps, BannerAdItem, BannerAdProps, BannerAdStyleSize, bannerAdInspectorDefaultProps, bannerAdInspectorPropsSchema, bannerAdStyleSizeOptions } from "./banner-ad/schema.mjs";
|
|
3
|
-
import { FloatingAdEditableProps, FloatingAdInspectorProps, FloatingAdItem, FloatingAdProps, floatingAdInspectorDefaultProps, floatingAdInspectorPropsSchema } from "./floating-ad/schema.mjs";
|
|
4
|
-
import { IconAdInspectorProps, IconAdItem, IconAdProps, iconAdInspectorDefaultProps, iconAdInspectorPropsSchema } from "./icon-ad/schema.mjs";
|
|
5
|
-
import { TextAdInspectorProps, TextAdItem, TextAdProps, textAdInspectorDefaultProps, textAdInspectorPropsSchema } from "./text-ad/schema.mjs";
|
|
6
|
-
import { AdsMatchExtData, adaptBannerAdProps, adaptFloatingAdItem, adaptIconAdProps, adaptPopupAdMaterials, adaptTextAdProps, buildAdsMatchRequest, getFirstMatchedMaterial, hasMatchedAds, parseAdsMatchExtData, resolveAdsAppCode, sortAdsMatchMaterials } from "./ad-match.mjs";
|
|
7
|
-
import { AdProvider, AdProviderProps, AdProviderValue, useAdProvider } from "./ad-provider.mjs";
|
|
8
|
-
import { AdsMatchQueryOptions, createAdsMatchPrefetchItem, createAdsMatchQueryFn, getAdsMatchQueryKey } from "./ad-query.mjs";
|
|
9
|
-
import { AdRuntimeProvider, AdRuntimeProviderProps } from "./ad-runtime-provider.mjs";
|
|
10
|
-
import { BannerAd } from "./banner-ad/client.mjs";
|
|
11
|
-
import { BannerAdServer } from "./banner-ad/server.mjs";
|
|
12
|
-
import { bannerAdMaterial } from "./banner-ad/material.mjs";
|
|
13
|
-
import "./banner-ad/index.mjs";
|
|
14
|
-
import { FeedAdBadge, FeedAdItemLike, getFeedAdIcon, getFeedAdJumpUrl, isFeedAdItem } from "./feed-ad/index.mjs";
|
|
15
|
-
import { FloatingAd } from "./floating-ad/client.mjs";
|
|
16
|
-
import { FloatingAdServer } from "./floating-ad/server.mjs";
|
|
17
|
-
import { floatingAdMaterial } from "./floating-ad/material.mjs";
|
|
18
|
-
import "./floating-ad/index.mjs";
|
|
19
|
-
import { IconAd } from "./icon-ad/client.mjs";
|
|
20
|
-
import { IconAdServer } from "./icon-ad/server.mjs";
|
|
21
|
-
import { iconAdMaterial } from "./icon-ad/material.mjs";
|
|
22
|
-
import "./icon-ad/index.mjs";
|
|
23
|
-
import { TextAd } from "./text-ad/client.mjs";
|
|
24
|
-
import { TextAdServer } from "./text-ad/server.mjs";
|
|
25
|
-
import { textAdMaterial } from "./text-ad/material.mjs";
|
|
26
|
-
import "./text-ad/index.mjs";
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { TextAdProps } from "./schema.mjs";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region components/biz/business/advertisement/text-ad/client.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* 文字广告组件。
|
|
8
|
-
*/
|
|
9
|
-
declare function TextAd({
|
|
10
|
-
displayCount,
|
|
11
|
-
items,
|
|
12
|
-
mode: _mode
|
|
13
|
-
}: TextAdProps): react_jsx_runtime0.JSX.Element | null;
|
|
14
|
-
//#endregion
|
|
15
|
-
export { TextAd };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{adaptTextAdProps as e,hasMatchedAds as t}from"../ad-match.mjs";import{useAdProvider as n}from"../ad-provider.mjs";import{MarqueeClient as r}from"../../marquee/client.mjs";import{useMemo as i}from"react";import{jsx as a}from"react/jsx-runtime";function o({displayCount:o,items:s,mode:c=`renderer`}){let l=n(),u=i(()=>t(l?.matchData)?e(l?.matchData):{displayCount:o,items:s},[l?.matchData,o,s]),d=i(()=>{let e=u.items.filter(e=>e.text?.trim());return typeof u.displayCount==`number`?e.slice(0,Math.max(u.displayCount,0)):e},[u]),f=i(()=>d.map(e=>`${e.text}:${e.jumpUrl||``}`).join(`|`),[d]);return d.length===0?null:a(r,{marqueeKey:f||`text-ad`,mode,contents:d.map(e=>({text:e.text,link:e.jumpUrl||``})),click:{enabled:!0,redirectType:`link`,link:``},close:{enabled:!0},displayStrategy:{rule:`daily`}})}export{o as TextAd};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { TextAdInspectorProps, TextAdItem, TextAdProps, textAdInspectorDefaultProps, textAdInspectorPropsSchema } from "./schema.mjs";
|
|
3
|
-
import { TextAd } from "./client.mjs";
|
|
4
|
-
import { TextAdServer } from "./server.mjs";
|
|
5
|
-
import { textAdMaterial } from "./material.mjs";
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { SchemaHasDefaultValue } from "../../../../../utils/schema/schema.mjs";
|
|
3
|
-
import { DefineMaterialOption } from "../../../../../utils/schema/material.mjs";
|
|
4
|
-
import "../../../../../utils.mjs";
|
|
5
|
-
import { TextAd } from "./client.mjs";
|
|
6
|
-
import { TextAdServer } from "./server.mjs";
|
|
7
|
-
import * as zod from "zod";
|
|
8
|
-
import * as zod_v4_core0 from "zod/v4/core";
|
|
9
|
-
|
|
10
|
-
//#region components/biz/business/advertisement/text-ad/material.d.ts
|
|
11
|
-
/**
|
|
12
|
-
* 文字广告物料定义。
|
|
13
|
-
*/
|
|
14
|
-
declare const textAdMaterial: DefineMaterialOption<typeof TextAdServer, typeof TextAd, zod.ZodObject<{
|
|
15
|
-
readonly displayCount: zod.ZodNumber & SchemaHasDefaultValue;
|
|
16
|
-
readonly items: zod.ZodArray<zod.ZodObject<{
|
|
17
|
-
text: zod.ZodString & SchemaHasDefaultValue;
|
|
18
|
-
jumpUrl: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
19
|
-
}, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
|
|
20
|
-
} & {
|
|
21
|
-
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
22
|
-
renderer: "renderer";
|
|
23
|
-
editor: "editor";
|
|
24
|
-
}>>;
|
|
25
|
-
}, zod_v4_core0.$strip>, "text-ad", "广告组件">;
|
|
26
|
-
//#endregion
|
|
27
|
-
export { textAdMaterial };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{TextAd as t}from"./client.mjs";import{textAdInspectorPropsSchema as n}from"./schema.mjs";import{TextAdServer as r}from"./server.mjs";const i=e({type:`text-ad`,name:`文字广告`,icon:`/static/components-thumb/marquee_clickable_closable.png`,category:`广告组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as textAdMaterial};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { InferSchemaProps, MaterialComponentMode, SchemaHasDefaultValue } from "../../../../../utils/schema/schema.mjs";
|
|
3
|
-
import "../../../../../utils.mjs";
|
|
4
|
-
import z$1 from "zod";
|
|
5
|
-
|
|
6
|
-
//#region components/biz/business/advertisement/text-ad/schema.d.ts
|
|
7
|
-
/**
|
|
8
|
-
* 文字广告单条数据。
|
|
9
|
-
*/
|
|
10
|
-
interface TextAdItem {
|
|
11
|
-
/**
|
|
12
|
-
* 广告文案。
|
|
13
|
-
*/
|
|
14
|
-
text: string;
|
|
15
|
-
/**
|
|
16
|
-
* 跳转链接。
|
|
17
|
-
*/
|
|
18
|
-
jumpUrl?: string;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* 文字广告物料属性。
|
|
22
|
-
*/
|
|
23
|
-
declare const textAdInspectorPropsSchema: z$1.ZodObject<{
|
|
24
|
-
readonly displayCount: z$1.ZodNumber & SchemaHasDefaultValue;
|
|
25
|
-
readonly items: z$1.ZodArray<z$1.ZodObject<{
|
|
26
|
-
text: z$1.ZodString & SchemaHasDefaultValue;
|
|
27
|
-
jumpUrl: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
28
|
-
}, z$1.core.$strip>> & SchemaHasDefaultValue;
|
|
29
|
-
} & {
|
|
30
|
-
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
31
|
-
renderer: "renderer";
|
|
32
|
-
editor: "editor";
|
|
33
|
-
}>>;
|
|
34
|
-
}, z$1.core.$strip>;
|
|
35
|
-
declare const textAdInspectorDefaultProps: {
|
|
36
|
-
readonly displayCount: number;
|
|
37
|
-
readonly items: {
|
|
38
|
-
text: string;
|
|
39
|
-
jumpUrl?: string | undefined;
|
|
40
|
-
}[];
|
|
41
|
-
};
|
|
42
|
-
type TextAdInspectorProps<T extends object = object> = InferSchemaProps<typeof textAdInspectorPropsSchema> & T;
|
|
43
|
-
/**
|
|
44
|
-
* 文字广告组件 props。
|
|
45
|
-
*/
|
|
46
|
-
type TextAdProps = TextAdInspectorProps<{
|
|
47
|
-
/**
|
|
48
|
-
* 渲染模式。
|
|
49
|
-
*/
|
|
50
|
-
mode?: MaterialComponentMode;
|
|
51
|
-
}>;
|
|
52
|
-
//#endregion
|
|
53
|
-
export { TextAdInspectorProps, TextAdItem, TextAdProps, textAdInspectorDefaultProps, textAdInspectorPropsSchema };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";import n from"zod";const r=e(e=>({displayCount:e.number(1,{label:`广告展示数量选择`,required:!0}).refine(e=>e>=1&&e<=5,`广告展示数量必须为 1-5`),items:e.array(n.object({text:e.string(`请输入广告文案`,{label:`广告文案`,required:!0}),jumpUrl:e.string(``,{label:`跳转链接`,required:!1})}),{label:`广告列表`,required:!0,defaultValue:[{text:`这是第一条文字广告`,jumpUrl:`/search`},{text:`这是第二条文字广告`,jumpUrl:`/search`}]})})),i=t(r);export{i as textAdInspectorDefaultProps,r as textAdInspectorPropsSchema};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { TextAdProps } from "./schema.mjs";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region components/biz/business/advertisement/text-ad/server.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* 文字广告服务端组件。
|
|
8
|
-
*/
|
|
9
|
-
declare function TextAdServer(props: TextAdProps): Promise<react_jsx_runtime0.JSX.Element>;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { TextAdServer };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{resolveAdsAppCode as e}from"../ad-match.mjs";import{AdRuntimeProvider as t}from"../ad-runtime-provider.mjs";import{TextAd as n}from"./client.mjs";import{jsx as r}from"react/jsx-runtime";async function i(i){let{mode:a=`renderer`,...o}=i;return r(t,{adType:`text`,appCode:e(),mode:a,children:r(n,{...o,mode:a})})}export{i as TextAdServer};
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { RequestConfig, ResponseData } from "../utils/http.mjs";
|
|
3
|
-
|
|
4
|
-
//#region service/advertisement.d.ts
|
|
5
|
-
type ExtraRequestConfig = Omit<RequestConfig, 'url' | 'method' | 'params' | 'data'>;
|
|
6
|
-
/**
|
|
7
|
-
* 广告匹配请求场景上下文。
|
|
8
|
-
*/
|
|
9
|
-
interface AdsMatchSceneContext {
|
|
10
|
-
/**
|
|
11
|
-
* 开屏广告启动类型:cold | hot。
|
|
12
|
-
*/
|
|
13
|
-
startupType?: 'cold' | 'hot';
|
|
14
|
-
/**
|
|
15
|
-
* 是否为热启动。
|
|
16
|
-
*/
|
|
17
|
-
isStartupHot?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* 热启动距离上次退后台的分钟数。
|
|
20
|
-
*/
|
|
21
|
-
backgroundDurationMin?: number;
|
|
22
|
-
/**
|
|
23
|
-
* 当前视频已播放秒数,盲点广告使用。
|
|
24
|
-
*/
|
|
25
|
-
videoPlayedSeconds?: number;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* 广告匹配请求类型。
|
|
29
|
-
*/
|
|
30
|
-
type AdsMatchAdType = 'splash' | 'popup' | 'floating' | 'icon' | 'text' | 'banner' | 'preroll' | 'blind';
|
|
31
|
-
/**
|
|
32
|
-
* 广告匹配请求体。
|
|
33
|
-
*/
|
|
34
|
-
interface AdsMatchRequest {
|
|
35
|
-
/**
|
|
36
|
-
* 广告类型。
|
|
37
|
-
*/
|
|
38
|
-
adType: AdsMatchAdType;
|
|
39
|
-
/**
|
|
40
|
-
* 登录用户 ID,已登录时优先传。
|
|
41
|
-
*/
|
|
42
|
-
userId?: string;
|
|
43
|
-
/**
|
|
44
|
-
* 设备 ID,游客场景建议传。
|
|
45
|
-
*/
|
|
46
|
-
deviceId?: string;
|
|
47
|
-
/**
|
|
48
|
-
* 应用 code。
|
|
49
|
-
*/
|
|
50
|
-
appCode: string;
|
|
51
|
-
/**
|
|
52
|
-
* 场景上下文。
|
|
53
|
-
*/
|
|
54
|
-
sceneContext?: AdsMatchSceneContext;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* 广告匹配返回配置。
|
|
58
|
-
*/
|
|
59
|
-
interface AdsMatchConfig {
|
|
60
|
-
/**
|
|
61
|
-
* 跳过时间,开屏 / 贴片类广告使用。
|
|
62
|
-
*/
|
|
63
|
-
skipSeconds?: number;
|
|
64
|
-
/**
|
|
65
|
-
* 弹窗广告连续展示条数。
|
|
66
|
-
*/
|
|
67
|
-
popupCount?: number;
|
|
68
|
-
/**
|
|
69
|
-
* 单用户单日最大展示次数,-1 表示不限制。
|
|
70
|
-
*/
|
|
71
|
-
dailyMaxShow?: number;
|
|
72
|
-
/**
|
|
73
|
-
* 盲点广告触发分钟数。
|
|
74
|
-
*/
|
|
75
|
-
triggerVideoProgressMin?: number;
|
|
76
|
-
/**
|
|
77
|
-
* 轮播切换时间。
|
|
78
|
-
*/
|
|
79
|
-
switchInterval?: number;
|
|
80
|
-
/**
|
|
81
|
-
* 组件展示数量。
|
|
82
|
-
*/
|
|
83
|
-
displayCount?: number;
|
|
84
|
-
/**
|
|
85
|
-
* Banner 样式尺寸。
|
|
86
|
-
*/
|
|
87
|
-
styleSize?: string;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* 广告素材原始项。
|
|
91
|
-
*/
|
|
92
|
-
interface AdsMatchMaterial {
|
|
93
|
-
/**
|
|
94
|
-
* 广告业务编码。
|
|
95
|
-
*/
|
|
96
|
-
advertiseCode?: string;
|
|
97
|
-
/**
|
|
98
|
-
* 广告名称。
|
|
99
|
-
*/
|
|
100
|
-
advertiseName?: string;
|
|
101
|
-
/**
|
|
102
|
-
* 跳转地址。
|
|
103
|
-
*/
|
|
104
|
-
advertiseUrl?: string;
|
|
105
|
-
/**
|
|
106
|
-
* 图片素材地址。
|
|
107
|
-
*/
|
|
108
|
-
advertiseIcon?: string;
|
|
109
|
-
/**
|
|
110
|
-
* PC 图片素材地址。
|
|
111
|
-
*/
|
|
112
|
-
adPcAdvertiseIcon?: string;
|
|
113
|
-
/**
|
|
114
|
-
* 第三方广告类型枚举。
|
|
115
|
-
*/
|
|
116
|
-
advertiseType?: number;
|
|
117
|
-
/**
|
|
118
|
-
* 广告文案描述。
|
|
119
|
-
*/
|
|
120
|
-
advertiseDesc?: string;
|
|
121
|
-
/**
|
|
122
|
-
* 排序值。
|
|
123
|
-
*/
|
|
124
|
-
sort?: number;
|
|
125
|
-
/**
|
|
126
|
-
* 投放开始时间。
|
|
127
|
-
*/
|
|
128
|
-
startTimeStamp?: number;
|
|
129
|
-
/**
|
|
130
|
-
* 投放结束时间。
|
|
131
|
-
*/
|
|
132
|
-
endTimeStamp?: number;
|
|
133
|
-
/**
|
|
134
|
-
* 扩展展示信息。
|
|
135
|
-
*/
|
|
136
|
-
adExtData?: string;
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* 广告匹配响应 data。
|
|
140
|
-
*/
|
|
141
|
-
interface AdsMatchResponseData {
|
|
142
|
-
/**
|
|
143
|
-
* 是否命中广告。
|
|
144
|
-
*/
|
|
145
|
-
hit?: boolean;
|
|
146
|
-
/**
|
|
147
|
-
* 本次返回的广告类型。
|
|
148
|
-
*/
|
|
149
|
-
adType?: AdsMatchAdType;
|
|
150
|
-
/**
|
|
151
|
-
* 命中的第三方广告位编码。
|
|
152
|
-
*/
|
|
153
|
-
advertiseLocationCode?: string;
|
|
154
|
-
/**
|
|
155
|
-
* 服务端配置。
|
|
156
|
-
*/
|
|
157
|
-
config?: AdsMatchConfig;
|
|
158
|
-
/**
|
|
159
|
-
* 广告素材列表。
|
|
160
|
-
*/
|
|
161
|
-
materials?: AdsMatchMaterial[];
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* 广告匹配接口。
|
|
165
|
-
*/
|
|
166
|
-
declare function pContentAdsMatch(data: AdsMatchRequest, config?: ExtraRequestConfig): Promise<ResponseData<AdsMatchResponseData>>;
|
|
167
|
-
/**
|
|
168
|
-
* 广告匹配接口缓存 key。
|
|
169
|
-
*/
|
|
170
|
-
declare function pContentAdsMatchKey(data: Pick<AdsMatchRequest, 'adType' | 'appCode' | 'sceneContext'>): (string | AdsMatchSceneContext)[];
|
|
171
|
-
//#endregion
|
|
172
|
-
export { AdsMatchAdType, AdsMatchConfig, AdsMatchMaterial, AdsMatchRequest, AdsMatchResponseData, AdsMatchSceneContext, pContentAdsMatch, pContentAdsMatchKey };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import e from"../utils/http.mjs";async function t(t,n){let i=await e.request({...n??{},url:`/api/content/ads/match`,method:`POST`,data:t});return{...i,data:r(i.data)}}function n(e){return[`content-ads-match`,e.adType,e.appCode,e.sceneContext??{}]}function r(e){if(e)return{hit:e.hit,adType:e.adType??e.ad_type,advertiseLocationCode:e.advertiseLocationCode??e.advertise_location_code,config:i(e.config),materials:e.materials?.map(a)??[]}}function i(e){if(e)return{skipSeconds:e.skipSeconds??e.skip_seconds,popupCount:e.popupCount??e.popup_count,dailyMaxShow:e.dailyMaxShow??e.daily_max_show,triggerVideoProgressMin:e.triggerVideoProgressMin??e.trigger_video_progress_min,switchInterval:e.switchInterval??e.switch_interval,displayCount:e.displayCount??e.display_count,styleSize:e.styleSize??e.style_size}}function a(e){return{advertiseCode:e.advertiseCode??e.advertise_code,advertiseName:e.advertiseName??e.advertise_name,advertiseUrl:e.advertiseUrl??e.advertise_url,advertiseIcon:e.advertiseIcon??e.advertise_icon,adPcAdvertiseIcon:e.adPcAdvertiseIcon??e.pc_advertise_icon,advertiseType:e.advertiseType??e.advertise_type,advertiseDesc:e.advertiseDesc??e.advertise_desc,sort:e.sort,startTimeStamp:e.startTimeStamp??e.start_timestamp,endTimeStamp:e.endTimeStamp??e.end_timestamp,adExtData:e.adExtData??e.ad_ext_data}}export{t as pContentAdsMatch,n as pContentAdsMatchKey};
|