1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252 |
- import { request } from 'umi';
- import { api } from '../api';
- /**
- * 查询优化目标权限
- * @param data
- * @returns
- */
- export async function getOptimizationGoalPermissionsV3Api(data: any) {
- return request(api + `/adq/v3/launch/tools/getOptimizationGoalPermissions`, {
- method: 'POST',
- data
- })
- }
- /**
- * 获取地理位置
- * @param data
- * @returns
- */
- export async function getTargetingGagsApi(data: any) {
- return request(api + `/adq/v3/launch/tools/getTargetingGags`, {
- method: 'POST',
- data
- })
- }
- /**
- * 获取小说列表
- * @param data
- * @returns
- */
- export async function getmarketingAssetContentApi(data: {
- marketingAssetType?: string,
- marketingAssetName?: string,
- accountId: number,
- pageNum: number,
- pageSize: number,
- marketingAssetNameList: string[]
- }) {
- return request(api + `/adq/v3/marketingAssets/marketingAssetContent/get`, {
- method: 'POST',
- data,
- });
- }
- /**
- * 远程小说接口
- * @param data
- * @returns
- */
- export async function getByRemotemarketingAssetContentApi(data: {
- marketingAssetType?: string,
- marketingAssetName?: string,
- accountId: number,
- pageNum: number,
- pageSize: number,
- marketingIdList: number[]
- }) {
- return request(api + `/adq/v3/marketingAssets/marketingAssetContent/getByRemote`, {
- method: 'POST',
- data,
- });
- }
- /**
- * 同步小说
- * @param data
- * @returns
- */
- export async function synMarketingAssetContentApi(data: { accountId: number }) {
- return request(api + `/adq/v3/marketingAssets/marketingAssetContent/sync`, {
- method: 'POST',
- data,
- });
- }
- /**
- * 获取公众号
- * @param data
- * @returns
- */
- export async function getWechatOfficialAccountApi(data: { accountId: number }) {
- return request(api + `/adq/v3/marketingAssets/getWechatOfficialAccounts`, {
- method: 'POST',
- data,
- });
- }
- /**
- * 批量获取公众号
- * @param data
- * @returns
- */
- export async function getWechatOfficialAccountsApi(data: { accountIdList: number[] }) {
- return request(api + `/adq/v3/marketingAssets/getWechatOfficialAccountsBatch`, {
- method: 'POST',
- data,
- });
- }
- /**
- * 获取视频号
- * @param data
- * @returns
- */
- export async function getVideoChannelInfoApi(data: { accountIdList?: number[], accountId?: number }) {
- return request(api + `/adq/v3/marketingAssets/getVideoChannelInfo`, {
- method: 'POST',
- data,
- });
- }
- /**
- * 批量获取视频号
- * @param data
- * @returns
- */
- export async function getVideoChannelInfoBatchApi(data: { accountIdList?: number[], accountId?: number }) {
- return request(api + `/adq/v3/marketingAssets/getVideoChannelInfoBatch`, {
- method: 'POST',
- data,
- });
- }
- /**
- * 获取转化归因
- * @param data
- * @returns
- */
- export async function getConversionInfoApi(data: {
- accountId: number,
- pageNum: number,
- pageSize: number,
- accessStatus?: string[] // ACCESS_STATUS_COMPLETED 已接入 ACCESS_STATUS_PENDING 待接入
- conversionId?: number,
- conversionName?: string,
- conversionType?: string, // 扣费类型(ID_TYPE_CPC, BID_TYPE_CPA, BID_TYPE_CPS, BID_TYPE_CPM, BID_TYPE_CPD)
- createSourceType?: string, // 转化创建来源,如 (SELF_CREATED 自建转化),(PLATFORM 平台类转化)
- deepBehaviorOptimizationGoal?: string,
- deepWorthAdvancedGoal?: string,
- deepWorthOptimizationGoal?: string,
- marketingScene?: string,
- optimizationGoal?: string,
- siteSet?: string,
- }) {
- return request(api + `/adq/v3/launch/tools/getConversionInfo`, {
- method: 'POST',
- data,
- });
- }
- /**
- * 获取数据源
- * @param data
- * @returns
- */
- export async function getDataSourceV3Api(data: { accountIds: number[], promotedObjectType?: string }) {
- return request(api + `/adq/v3/userActionSets/allByAccount`, {
- method: 'POST',
- data
- })
- }
- /**
- * 同步数据源
- * @param data
- * @returns
- */
- export async function sysDataSourceV3Api(data: number[]) {
- return request(api + `/adq/v3/userActionSets/syncByAdAccountId`, {
- method: 'PATCH',
- data,
- });
- }
- /**
- * 获取创意规格详情
- * @param data
- * @returns
- */
- export async function getCreativeDetailsApi(data: any) {
- return request(api + `/adq/v3/launch/tools/getCreativeDetails`, {
- method: 'POST',
- data
- })
- }
- /**
- * 获取流量包
- * @param data
- * @returns
- */
- export async function getBatchUnionPositionPackagesApi(data: { unionPackageType: 'UNION_PACKAGE_TYPE_INCLUDE' | 'UNION_PACKAGE_TYPE_EXCLUDE', accountId?: number, accountIds?: number[] }) {
- return request(api + `/adq/v3/marketingAssets/getBatchUnionPositionPackages`, {
- method: 'POST',
- data,
- });
- }
- /**
- * 获取创意规格列表
- * @param data
- * @returns
- */
- export async function getCreativeTemplateListApi(data: any) {
- return request(api + `/adq/v3/launch/tools/getCreativeTemplateList`, {
- method: 'POST',
- data
- })
- }
- /**
- * 文案助手
- * @param params
- * @returns
- */
- export async function getTextApi(params: { maxTextLength: number, adAccountId: number }) {
- return request(api + `/adq/v3/launch/tools/creative/tools/text`, {
- method: 'GET',
- params
- })
- }
- /**
- * 获取原生页授权方信息
- * @param accountId
- * @returns
- */
- export async function getWXDownPageAuthInfoListApi(accountId: number) {
- return request(api + `/adq/v3/marketingAssets/listWXDownPageAuthInfo/${accountId}`, {
- method: 'GET'
- });
- }
- /**
- * 获取ADQ落地页列表
- * @param adgroupName 广告名称
- * @param promotedObjectType 广告类型
- * @param accountId 账户ID
- */
- export async function getAdqLandingPageListApi(params: {
- pageNum: number;
- pageSize: number;
- accountId?: number;
- pageName?: string;
- pageType?: string;
- pageTemplateId?: string;
- pageStatus?: string;
- ownerUid?: number;
- creativeTemplateId?: number,
- marketingCarrierId?: string,
- marketingCarrierType?: string
- marketingGoal?: string,
- marketingSubGoal?: string,
- marketingTargetType?: string,
- siteSet?: string[],
- }) {
- Object.keys(params).forEach(key => {
- if (!params[key as keyof typeof params]) {
- delete params[key as keyof typeof params]
- }
- })
- return request(api + '/adq/v3/marketingAssets/listWXDownPageToRemote', {
- method: 'POST',
- data: params,
- });
- }
- /**
- * 删除落地页
- * @param data
- * @returns
- */
- export async function delPageApi(data: { accountId: number, pageIds: number[] }) {
- return request(api + `/adq/v3/marketingAssets/batchDelWXDownPage`, {
- method: 'DELETE',
- data
- });
- }
- /**
- * 灵鹊落地页
- * @param params
- * @returns
- */
- export async function getAdqLandingPageOfficialListApi(params: {
- pageNum: number;
- pageSize: number;
- accountId?: number;
- creativeTemplateId?: number,
- marketingCarrierId?: string,
- marketingCarrierType?: string
- marketingGoal?: string,
- marketingSubGoal?: string,
- marketingTargetType?: string,
- siteSet?: string[],
- ownerUid?: number,
- pageIds?: number[],
- pageName?: string,
- pageStatus?: string,
- pageType?: string,
- userId?: number
- }) {
- Object.keys(params).forEach(key => {
- if (!params[key as keyof typeof params]) {
- delete params[key as keyof typeof params]
- }
- })
- return request(api + '/adq/v3/marketingAssets/listDownPageToRemote', {
- method: 'POST',
- data: params,
- });
- }
- /**
- * 按账号同步落地页
- * @param adAccountId 本地ID
- */
- export async function putAdqLandingPageApi(data: any) {
- return request(api + `/adq/v3/marketingAssets/syncAllWXDownPage`, {
- method: 'PUT',
- data
- });
- }
- /**
- * 获取品牌形象列表
- * @returns
- */
- export async function getSysBrandApi() {
- return request(api + `/adq/sysBrand/allOfUser`, {
- method: 'GET'
- })
- }
- /**
- * 新增品牌形象
- * @param data
- * @returns
- */
- export async function addSysBrandApi(data: { name: string, brandImgUrl: string }) {
- return request(api + `/adq/sysBrand`, {
- method: 'POST',
- data
- })
- }
- /**
- * 修改品牌形象
- * @param data
- * @returns
- */
- export async function editSysBrandApi(data: { name: string, brandImgUrl: string, sysBrandId: number }) {
- const { sysBrandId, ...params } = data
- return request(api + `/adq/sysBrand/${sysBrandId}`, {
- method: 'PUT',
- data: params
- })
- }
- /**
- * 删除品牌形象
- * @param data
- * @returns
- */
- export async function delSysBrandApi(data: { sysBrandId: number }) {
- const { sysBrandId } = data
- return request(api + `/adq/sysBrand/${sysBrandId}`, {
- method: 'DELETE'
- })
- }
- /**
- * 新增头像昵称跳转页
- * @param data
- * @returns
- */
- export async function addProfilesApi(data: { profileName: string, imageUrl: string, description: string }) {
- return request(api + `/adq/v3/marketingAssets/profiles/add`, {
- method: 'POST',
- data
- })
- }
- /**
- * 获取头像昵称跳转页
- * @param data
- * @returns
- */
- export async function getProfilesApi(data: { profileName?: string }) {
- return request(api + `/adq/v3/marketingAssets/profiles/get`, {
- method: 'POST',
- data
- })
- }
- /**
- * 删除头像昵称跳转页
- * @param data
- * @returns
- */
- export async function delProfilesApi(params: { id: number }) {
- return request(api + `/adq/v3/marketingAssets/deleteSysProfiles`, {
- method: 'DELETE',
- params
- })
- }
- /**
- * 获取创意审核详情
- * @param data
- * @returns
- */
- export async function getCreativeReviewDetailApi({ accountId, dynamicCreativeIds }: { accountId: number, dynamicCreativeIds: number[] }) {
- return request(api + `/adq/adgroup/creativeReviewDetail`, {
- method: 'POST',
- data: dynamicCreativeIds,
- params: { accountId }
- })
- }
- /**
- * 查询元素组件申诉复审结果
- * @param data
- * @returns
- */
- export async function getFsResultApi(data: { accountId: number, componentId: number, dynamicCreativeId: number, elementFingerPrint: string, elementId: number }) {
- return request(api + `/adq/adgroup/getResult`, {
- method: 'POST',
- data
- })
- }
- /**
- * 同步广告
- * @param data
- * @returns
- */
- export async function syncAdInfoApi(data: { accountAdgroupMaps: string[], adgroupCreateLogId: number }) {
- return request(api + `/adq/syncAdInfo/syncByAdgroupIds`, {
- method: 'POST',
- data
- })
- }
- /**
- * 获取图片信息
- * @param data
- * @returns
- */
- export async function getImagesInfoApi(data: { adAccountId: number, imageIds: number[], pageNum: number, pageSize: number }) {
- return request(api + `/adq/v3/marketingAssets/getImages`, {
- method: 'POST',
- data
- })
- }
- /**
- * 获取视频信息
- * @param data
- * @returns
- */
- export async function getVideosInfoApi(data: { adAccountId: number, videoIds: number[] }) {
- return request(api + `/adq/v3/marketingAssets/getVideos`, {
- method: 'POST',
- data
- })
- }
- /**
- * 新增微信小程序
- * @param data
- * @returns
- */
- export async function addWechatAppletApi(data: { appletId: string, appletName: string, appletLink: string, description: string }) {
- return request(api + `/adq/v3/wechatApplet/add`, {
- method: 'POST',
- data
- })
- }
- /**
- * 查询本地微信小程序列表
- * @param data
- * @returns
- */
- export async function getWechatAppletApi(data: { pageNum: number, pageSize: number, appletName?: string, appletIdList?: string[], createBy?: number }) {
- return request(api + `/adq/v3/wechatApplet/list`, {
- method: 'POST',
- data
- })
- }
- /**
- * 删除微信小程序
- * @param data
- * @returns
- */
- export async function delWechatAppletApi(id: number) {
- return request(api + `/adq/v3/wechatApplet/delById/${id}`, {
- method: 'DELETE'
- })
- }
- /**
- * 下载小程序上传模板
- * @returns
- */
- export async function downloadTemplateApi() {
- return request(api + `/adq/v3/wechatApplet/downloadTemplate`, {
- method: 'POST',
- responseType: 'blob'
- })
- }
- /**
- * 上传
- * @returns
- */
- export async function importExcelApi(data: any) {
- return request(api + `/adq/v3/wechatApplet/importExcel`, {
- method: 'POST',
- data
- })
- }
- /**
- * 修改微信小程序
- * @param data
- * @returns
- */
- export async function updateWechatAppletApi(data: { appletId: string, appletName: string, appletLink: string, description: string, id: number }) {
- return request(api + `/adq/v3/wechatApplet/update`, {
- method: 'POST',
- data
- })
- }
- /**
- * 获取所有微信小程序列表
- * @param data
- * @returns
- */
- export async function getWechatAppletAllApi(data: { appletName?: string, appletIdList?: string[] }) {
- return request(api + `/adq/v3/wechatApplet/listAll`, {
- method: 'POST',
- data
- })
- }
- /**
- * 获取详情
- * @param id
- * @returns
- */
- export async function getWechatAppletDetailApi(id: number) {
- return request(api + `/adq/v3/wechatApplet/getById/${id}`, {
- method: 'GET'
- })
- }
- /**
- * 新增本地企微微信信息
- * @param data
- * @returns
- */
- export async function addCorpWechatApi(data: { wechatId: string, wechatName: string }) {
- return request(api + `/adq/v3/corpWechat/add`, {
- method: 'POST',
- data
- })
- }
- /**
- * 查询本地企业微信列表
- * @param data
- * @returns
- */
- export async function getCorpWechatApi(data: { pageNum: number, pageSize: number, wechatName?: string, wechatIdList?: string[] }) {
- return request(api + `/adq/v3/corpWechat/list`, {
- method: 'POST',
- data
- })
- }
- /**
- * 删除本地企业微信信息
- * @param data
- * @returns
- */
- export async function delCorpWechatApi(id: number) {
- return request(api + `/adq/v3/corpWechat/delById/${id}`, {
- method: 'DELETE'
- })
- }
- /**
- * 获取所有微信小程序列表
- * @param data
- * @returns
- */
- export async function getCorpWechatAllApi(data: { wechatName?: string, wechatIdList?: string[] }) {
- return request(api + `/adq/v3/corpWechat/listAll`, {
- method: 'POST',
- data
- })
- }
- /**
- * 获取详情
- * @param id
- * @returns
- */
- export async function getCorpWechatDetailApi(id: number) {
- return request(api + `/adq/v3/corpWechat/getById/${id}`, {
- method: 'GET'
- })
- }
- /**
- * 获取广告标签
- * @param data
- * @returns
- */
- export async function getAdLabelApi(data: { accountId?: number }) {
- return request(api + `/adq/v3/launch/tools/getAdLabel`, {
- method: 'POST',
- data
- })
- }
- /**
- * 获取游戏列表
- * @param data
- * @returns
- */
- export async function getGameLibraryListApi(data: { pageNum: number, pageSize: number, gameName?: string, idList?: number[], gameType?: string }) {
- return request(api + `/adq/v3/gameLibrary/pageList`, {
- method: 'POST',
- data
- })
- }
- /**
- * 所有游戏列表
- * @param data
- * @returns
- */
- export async function getGameLibraryApi(data: { gameName?: string, idList?: number[], gameType?: string }) {
- return request(api + `/adq/v3/gameLibrary/listAll`, {
- method: 'POST',
- data
- })
- }
- /**
- * 新增游戏
- * @param data
- * @returns
- */
- export async function addGameApi(data: { appId: string, gameName: string, gameType: string, id?: number }) {
- return request(api + `/adq/v3/gameLibrary/add`, {
- method: 'POST',
- data
- })
- }
- /**
- * 删除游戏
- * @param id
- * @returns
- */
- export async function delGameApi(id: number) {
- return request(api + `/adq/v3/gameLibrary/delById/${id}`, {
- method: 'DELETE'
- })
- }
- /**
- * 获取游戏详情
- * @param id
- * @returns
- */
- export async function getGameLibraryDetailApi(id: number) {
- return request(api + `/adq/v3/gameLibrary/getById/${id}`, {
- method: 'GET'
- })
- }
- /**
- * 获取游戏详情
- * @param wxGameAppId
- * @returns
- */
- export async function getGameLibraryAppIdDetailApi(wxGameAppId: number) {
- return request(api + `/adq/v3/gameLibrary/getByAppId/${wxGameAppId}`, {
- method: 'GET'
- })
- }
- /**
- * 获取弹幕
- * @param data
- * @returns
- */
- export async function getBarrageRecommendListApi(params: { adAccountId?: number, taskType?: 'GAME' | 'NOVEL' }) {
- // return request(api + `/adq/v3/launch/tools/creative/tools/barrage`, {
- return request(api + `/adq/v3/launch/tools/creative/tools/barrageRecommend`, {
- method: 'GET',
- params
- })
- }
- /**
- * 账户资产组分页查询
- * @param params
- * @returns
- */
- export async function getAccountAssetsGroupListApi(data: { accountGroupName?: string, authMainAccountIds?: number[], authType?: string, pageNum: number, pageSize: number }) {
- return request(api + `/adq/v3/marketingAssets/accountAssetsGroup/pageList`, {
- method: 'POST',
- data
- })
- }
- /**
- * 所有账户资产共享组
- * @param data
- * @returns
- */
- export async function getAccountAssetsGroupListAllApi(data: { accountGroupName?: string, authMainAccountIds?: number[] }) {
- return request(api + `/adq/v3/marketingAssets/accountAssetsGroup/ListAll`, {
- method: 'POST',
- data
- })
- }
- /**
- * 账户资产组修改(只能改名字)
- * @param data
- * @returns
- */
- export async function updateAccountAssetsGroupApi(data: { accountGroupId: number, accountGroupName: string }) {
- return request(api + `/adq/v3/marketingAssets/accountAssetsGroup/update`, {
- method: 'POST',
- data
- })
- }
- /**
- * 账户资产组取消授权
- * @param data
- * @returns
- */
- export async function revokeAuthAccountAssetsGroupApi(data: { accountAssetsGroupId: number, accountId: number[], assetId?: number }) {
- return request(api + `/adq/v3/marketingAssets/accountAssetsGroup/revokeAuth`, {
- method: 'POST',
- data
- })
- }
- /**
- * 删除账户组
- * @param data
- * @returns
- */
- export async function delAuthAccountAssetsGroupApi(data: { id: number }) {
- return request(api + `/adq/v3/marketingAssets/accountAssetsGroup/delete/${data.id}`, {
- method: 'DELETE',
- })
- }
- /**
- * 账户资产组创建
- * @param data
- * @returns
- */
- export async function createAccountAssetsGroupApi(data: { accountGroupId?: number, accountGroupName: string, authMainAccountId: number, authType: string }) {
- return request(api + `/adq/v3/marketingAssets/accountAssetsGroup/create`, {
- method: 'POST',
- data
- })
- }
- /**
- * 查询被授权的账户
- * @param data
- * @returns
- */
- export async function getAccountAssetsGroupAccountListApi(data: { groupId: number }) {
- return request(api + `/adq/v3/marketingAssets/accountAssetsGroup/authAccountList/${data.groupId}`, {
- method: 'GET'
- })
- }
- /**
- * 账户资产授权
- * @param data
- * @returns
- */
- export async function authAccountAssetsGroupAccountApi(data: { accountAssetsGroupId: number, accountId: number[], assetId?: number, assetName?: string }) {
- return request(api + `/adq/v3/marketingAssets/accountAssetsGroup/auth`, {
- method: 'POST',
- data
- })
- }
- /**
- * 批量授权
- * @param data
- * @returns
- */
- export async function batchAuthAccountAssetsGroupAccountApi(data: { accountAssetsGroupId: number, accountId: number[], assetsDTOS: { assetId: number, assetName: string }[] }) {
- return request(api + `/adq/v3/marketingAssets/accountAssetsGroup/batchAuth`, {
- method: 'POST',
- data
- })
- }
- /**
- * 同步素材
- * @param data
- * @returns
- */
- export async function syncMediaImageApi({ type, ...data }: { accountIds: number[], createTimeMin: string, createTimeMax: string, type: 'image' | 'video' }) {
- if (type === 'image') {
- return request(api + `/adq/v3/mediaImage/syncImage`, {
- method: 'POST',
- data
- })
- }
- return request(api + `/adq/v3/mediaVideo/syncVideo`, {
- method: 'POST',
- data
- })
- }
- /**
- * 获取文案库列表
- * @param data
- * @returns
- */
- export async function getCopyWritingListApi(data: { category?: string, content?: string, createBy?: number, pageNum: number, pageSize: number }) {
- return request(api + `/adq/copyWriting/pageList`, {
- method: 'POST',
- data
- })
- }
- /**
- * 新增修改文案
- * @param data
- * @returns
- */
- export async function copyWritingApi(data: { category: string, contentList?: string[], content?: string, id?: number }) {
- if (data?.id) {
- return request(api + `/adq/copyWriting/update`, {
- method: 'POST',
- data
- })
- }
- return request(api + `/adq/copyWriting/addBatch`, {
- method: 'POST',
- data
- })
- }
- /**
- * 删除
- * @param id
- * @returns
- */
- export async function delCopyWritingApi(id: number) {
- return request(api + `/adq/copyWriting/delById/${id}`, {
- method: 'DELETE',
- })
- }
- /**
- * 批量删除
- * @param ids
- * @returns
- */
- export async function delsCopyWritingApi(ids: number[]) {
- return request(api + `/adq/copyWriting/batchDelByIds`, {
- method: 'DELETE',
- data: ids
- })
- }
- export type ApplicationTypeProps = 'IOS' | 'ANDROID'
- export interface GetApplicationListProps {
- pageNum: number,
- pageSize: number,
- createBy?: number,
- applicationId?: string
- name?: string
- type?: ApplicationTypeProps
- }
- /**
- * 查询本地推广应用列表
- * @param data
- * @returns
- */
- export async function getApplicationListApi(data: GetApplicationListProps) {
- return request(api + `/adq/promote/application/list`, {
- method: 'POST',
- data
- })
- }
- /**
- * 查询本地推广全部应用列表
- * @param data
- * @returns
- */
- export async function getApplicationAllApi(data: Omit<GetApplicationListProps, 'pageNum' | 'pageSize'>) {
- return request(api + `/adq/promote/application/listAll`, {
- method: 'POST',
- data
- })
- }
- export interface AddApplicationProps {
- applicationId: number,
- name: string,
- type: ApplicationTypeProps
- id?: number
- }
- /**
- * 新增推广应用
- * @param data
- * @returns
- */
- export async function addApplicationApi(data: AddApplicationProps) {
- return request(api + `/adq/promote/application/add`, {
- method: 'POST',
- data
- })
- }
- /**
- * 修改推广应用
- * @param data
- * @returns
- */
- export async function updateApplicationApi(data: Required<AddApplicationProps>) {
- return request(api + `/adq/promote/application/update`, {
- method: 'POST',
- data
- })
- }
- /**
- * 删除本地推广应用
- * @param id
- * @returns
- */
- export async function delApplicationApi(id: number) {
- return request(api + `/adq/promote/application/delById/${id}`, {
- method: 'DELETE',
- })
- }
- /**
- * 应用详情
- * @param id
- * @returns
- */
- export async function getApplicationDetailApi(id: number) {
- return request(api + `/adq/promote/application/getById/${id}`, {
- method: 'GET'
- })
- }
- /**
- * 查询企业微信组件客服组
- * @param data
- * @returns
- */
- export async function getCustomerServiceGroupListApi(data: { adAccountId: number, pageNum: number, pageSize: number, tencentCorpId?: string }) {
- return request(api + `/adq/v3/launch/tools/selectCustomerServiceGroup`, {
- method: 'POST',
- data
- })
- }
- export interface updateCustomerServiceGroupProps {
- adAccountId: number,
- tencentCorpId: string,
- groupId: number,
- groupName: string,
- userIdList: string[]
- }
- /**
- * 修改企业微信组件客服组
- * @param data
- * @returns
- */
- export async function updateCustomerServiceGroupApi(data: updateCustomerServiceGroupProps) {
- return request(api + `/adq/v3/launch/tools/updateCustomerServiceGroup`, {
- method: 'POST',
- data
- })
- }
- export interface getWechatPagesCsgroupUserProps {
- adAccountId: number,
- tencentCorpId: string,
- corpName: string,
- departmentId?: number
- }
- /**
- * 获取企业微信组件客服组成员
- * @param data
- * @returns
- */
- export async function getWechatPagesCsgroupUserApi(data: getWechatPagesCsgroupUserProps) {
- return request(api + `/adq/v3/launch/tools/wechatPagesCsgroupUser/get`, {
- method: 'POST',
- data
- })
- }
- /**
- * 获取企业部门列表
- * @param data
- * @returns
- */
- export async function getCorpDepartmentListApi(params: { corpName: string }) {
- return request(api + `/adq/v3/launch/tools/corpDepartmentList/get`, {
- method: 'POST',
- params
- })
- }
- /**
- * 查询企微关系列表
- * @param params
- * @returns
- */
- export async function getCorpRelationListApi(data: { adAccountId: number }) {
- return request(api + `/adq/corpRelation/listOfPage`, {
- method: 'POST',
- data
- })
- }
- /**
- * 查询所有企微关系
- * @param data
- * @returns
- */
- export async function getCorpRelationAllApi(data: { adAccountId: number }) {
- return request(api + `/adq/corpRelation/listAll`, {
- method: 'POST',
- data
- })
- }
- /**
- * 删除企微关系
- * @param id
- * @returns
- */
- export async function delCorpRelationApi(id: number) {
- return request(api + `/adq/corpRelation/delById/${id}`, {
- method: 'DELETE'
- })
- }
- /**
- * 新增企微关系
- * @param params
- * @returns
- */
- export async function addCorpRelationListApi(data: { adAccountId: number, corpId: string, corpName: string, tencentCorpId: string }) {
- return request(api + `/adq/corpRelation/add`, {
- method: 'POST',
- data
- })
- }
- /**
- * 获取所有企微列表
- * @returns
- */
- export async function getCorpListAllApi() {
- return request(api + `/adq/corpRelation/corpListAll`, {
- method: 'GET',
- })
- }
- export interface AddPageCustomerGroupProps {
- adAccountId: number,
- customerGroupId: number,
- customerGroupName: string,
- pageId: number,
- pageName: string,
- tencentCorpId: string
- }
- /**
- * 新增落地页客服关系
- * @param data
- * @returns
- */
- export async function addPageCustomerGroupApi(data: AddPageCustomerGroupProps) {
- return request(api + `/adq/pageCustomerGroup/relation/add`, {
- method: 'POST',
- data
- })
- }
- /**
- * 删除落地页客服关系
- * @param id
- * @returns
- */
- export async function delPageCustomerGroupApi(id: number) {
- return request(api + `/adq/pageCustomerGroup/relation/delById/${id}`, {
- method: 'DELETE'
- })
- }
- export interface GetPageCustomerGroupListProps {
- adAccountId: number,
- pageNum: number,
- pageSize: number,
- pageId?: number,
- customerGroupId?: number,
- customerGroupName?: string,
- pageName?: string,
- tencentCorpId?: string
- }
- /**
- * 查询落地页客服关系
- * @param data
- * @returns
- */
- export async function getPageCustomerGroupListApi(data: GetPageCustomerGroupListProps) {
- return request(api + `/adq/pageCustomerGroup/relation/listOfPage`, {
- method: 'POST',
- data
- })
- }
- export interface GetCreativeComponentProps {
- pageNum: number,
- pageSize: number,
- adAccountId?: number,
- componentId?: string[],
- componentSubType?: string[]
- componentType?: string[]
- createTimeMin?: string
- createTimeMax?: string
- generationType?: string[]
- imageId?: string[]
- videoId?: string[]
- isDeleted?: boolean
- potentialStatus?: string
- activeKey?: string
- }
- /**
- * 分页查询创意组件
- * @param data
- * @returns
- */
- export async function getCreativeComponentListApi(data: GetCreativeComponentProps) {
- return request(api + `/adq/creative/component/listOfPage`, {
- method: 'POST',
- data
- })
- }
- export interface CreativeComponentDetailDTOS {
- materialId?: string,
- componentSubType: string
- componentType?: string, //'image' | 'imageList' | 'video' | 'videoList' | 'description',
- materialIdList?: string[]
- coverUrl?: string
- text?: string
- }
- export interface AddBatchCreativeComponent {
- adAccountId: number,
- creativeComponentDetailDTOS: CreativeComponentDetailDTOS[]
- }
- /**
- * 批量创建创意组件
- * @param data
- * @returns
- */
- export async function addBatchCreativeComponentApi(data: AddBatchCreativeComponent) {
- return request(api + `/adq/creative/component/addBatch`, {
- method: 'POST',
- data
- })
- }
- /**
- * 查询业务单元共享状态
- * @returns
- */
- export async function getDefaultSharingApi(params: { adAccountId: number }) {
- return request(api + `/adq/creative/component/getDefaultSharing/${params.adAccountId}`, {
- method: 'GET'
- })
- }
- /**
- * 修改业务单元组件共享状态
- * @param params
- * @returns
- */
- export async function updateDefaultSharingApi(params: { adAccountId: number, type: string }) {
- return request(api + `/adq/creative/component/updateDefaultSharing`, {
- method: 'POST',
- params
- })
- }
|