/** Java 主后端 API 路径常量表(不含 /newApi/api 前缀,前缀由 buildJavaUrl 统一加) */ export const API_ENDPOINTS = { files: { upload: '/api/files/upload', excelInfo: '/api/files/excel-info', }, dedupe: { run: '/api/dedupe/run', runProgress: '/api/dedupe/run/{runId}/progress', history: '/api/dedupe/history', historyDelete: '/api/dedupe/history/{resultId}', resultDownload: '/api/dedupe/results/{resultId}/download', }, split: { run: '/api/split/run', history: '/api/split/history', historyDelete: '/api/split/history/{resultId}', resultDownload: '/api/split/results/{resultId}/download', }, convert: { run: '/api/convert/run', history: '/api/convert/history', historyDelete: '/api/convert/history/{resultId}', templates: '/api/convert/templates', templatesImport: '/api/convert/templates/import', templateDefault: '/api/convert/templates/{templateCode}/default', templateDelete: '/api/convert/templates/{templateCode}', resultDownload: '/api/convert/results/{resultId}/download', }, publish: { parse: '/api/publish/parse', taskActivate: '/api/publish/tasks/{taskId}/activate', fileActivate: '/api/publish/tasks/{taskId}/files/{fileId}/activate', items: '/api/publish/tasks/{taskId}/items', progressBatch: '/api/publish/tasks/progress/batch', progressLight: '/api/publish/tasks/progress/light', result: '/api/publish/tasks/{taskId}/result', dashboard: '/api/publish/dashboard', history: '/api/publish/history', taskDelete: '/api/publish/tasks/{taskId}', }, deleteBrand: { run: '/api/delete-brand/run', history: '/api/delete-brand/history', historyDelete: '/api/delete-brand/history/{resultId}', taskDetail: '/api/delete-brand/tasks/{taskId}', taskDetails: '/api/delete-brand/tasks/batch', taskDownload: '/api/delete-brand/tasks/{taskId}/download', resultDownload: '/api/delete-brand/results/{resultId}/download', resultSubmit: '/api/delete-brand/tasks/{taskId}/result', progressBatch: '/api/delete-brand/tasks/progress/batch', progressLight: '/api/delete-brand/tasks/progress/light', }, productRisk: { candidates: '/api/product-risk-resolve/candidates', candidateAdd: '/api/product-risk-resolve/candidates', candidateDelete: '/api/product-risk-resolve/candidates/{id}', countryPreference: '/api/product-risk-resolve/country-preference', matchShops: '/api/product-risk-resolve/match-shops', dashboard: '/api/product-risk-resolve/dashboard', history: '/api/product-risk-resolve/history', historyDelete: '/api/product-risk-resolve/history/{resultId}', taskCreate: '/api/product-risk-resolve/tasks', taskDelete: '/api/product-risk-resolve/tasks/{taskId}', taskBatch: '/api/product-risk-resolve/tasks/batch', progressBatch: '/api/product-risk-resolve/tasks/progress/batch', progressLight: '/api/product-risk-resolve/tasks/progress/light', pendingShopResult: '/api/product-risk-resolve/pending-shop-result', resultDownload: '/api/product-risk-resolve/results/{resultId}/download', }, shopMatch: { candidates: '/api/shop-match/candidates', candidateAdd: '/api/shop-match/candidates', candidateDelete: '/api/shop-match/candidates/{id}', countryPreference: '/api/shop-match/country-preference', matchShops: '/api/shop-match/match-shops', dashboard: '/api/shop-match/dashboard', history: '/api/shop-match/history', historyDelete: '/api/shop-match/history/{resultId}', taskCreate: '/api/shop-match/tasks', taskDelete: '/api/shop-match/tasks/{taskId}', taskActivate: '/api/shop-match/tasks/{taskId}/activate', stageFinished: '/api/shop-match/tasks/{taskId}/stage-finished', taskBatch: '/api/shop-match/tasks/batch', progressBatch: '/api/shop-match/tasks/progress/batch', progressLight: '/api/shop-match/tasks/progress/light', skipAsins: '/api/shop-match/tasks/{taskId}/skip-asins/paginated', resultDownload: '/api/shop-match/results/{resultId}/download', }, patrolDelete: { candidates: '/api/patrol-delete/candidates', candidateAdd: '/api/patrol-delete/candidates', candidateDelete: '/api/patrol-delete/candidates/{id}', conditions: '/api/patrol-delete/conditions', conditionAdd: '/api/patrol-delete/conditions', conditionDelete: '/api/patrol-delete/conditions/{id}', matchShops: '/api/patrol-delete/match-shops', dashboard: '/api/patrol-delete/dashboard', history: '/api/patrol-delete/history', historyDelete: '/api/patrol-delete/history/{resultId}', progressBatch: '/api/patrol-delete/tasks/progress/batch', progressLight: '/api/patrol-delete/tasks/progress/light', taskCreate: '/api/patrol-delete/tasks', taskDelete: '/api/patrol-delete/tasks/{taskId}', taskResult: '/api/patrol-delete/tasks/{taskId}/result', resultDownload: '/api/patrol-delete/results/{resultId}/download', }, queryAsin: { candidates: '/api/query-asin/candidates', candidateAdd: '/api/query-asin/candidates', candidateDelete: '/api/query-asin/candidates/{id}', matchShops: '/api/query-asin/match-shops', dashboard: '/api/query-asin/dashboard', history: '/api/query-asin/history', historyDelete: '/api/query-asin/history/{resultId}', progressBatch: '/api/query-asin/tasks/progress/batch', progressLight: '/api/query-asin/tasks/progress/light', taskCreate: '/api/query-asin/tasks', taskDelete: '/api/query-asin/tasks/{taskId}', taskResult: '/api/query-asin/tasks/{taskId}/result', resultDownload: '/api/query-asin/results/{resultId}/download', }, shopDataCrawl: { candidates: '/api/shop-data-crawl/candidates', candidateAdd: '/api/shop-data-crawl/candidates', candidateDelete: '/api/shop-data-crawl/candidates/{id}', countryPreference: '/api/shop-data-crawl/country-preference', matchShops: '/api/shop-data-crawl/match-shops', dashboard: '/api/shop-data-crawl/dashboard', history: '/api/shop-data-crawl/history', historyDelete: '/api/shop-data-crawl/history/{resultId}', progressBatch: '/api/shop-data-crawl/tasks/progress/batch', progressLight: '/api/shop-data-crawl/tasks/progress/light', taskCreate: '/api/shop-data-crawl/tasks', taskDelete: '/api/shop-data-crawl/tasks/{taskId}', resultDownload: '/api/shop-data-crawl/results/{resultId}/download', }, withdraw: { candidates: '/api/withdraw/candidates', candidateAdd: '/api/withdraw/candidates', candidateDelete: '/api/withdraw/candidates/{id}', candidatesClear: '/api/withdraw/candidates/clear', matchShops: '/api/withdraw/match-shops', dashboard: '/api/withdraw/dashboard', history: '/api/withdraw/history', historyDelete: '/api/withdraw/history/{resultId}', progressBatch: '/api/withdraw/tasks/progress/batch', progressLight: '/api/withdraw/tasks/progress/light', taskCreate: '/api/withdraw/tasks', taskDelete: '/api/withdraw/tasks/{taskId}', taskResult: '/api/withdraw/tasks/{taskId}/result', resultDownload: '/api/withdraw/results/{resultId}/download', }, priceTrack: { candidates: '/api/price-track/candidates', candidateAdd: '/api/price-track/candidates', candidateDelete: '/api/price-track/candidates/{id}', countryPreference: '/api/price-track/country-preference', matchShops: '/api/price-track/match-shops', taskCreate: '/api/price-track/tasks', taskDelete: '/api/price-track/tasks/{taskId}', tasksBatch: '/api/price-track/tasks/batch', progressBatch: '/api/price-track/tasks/progress/batch', progressLight: '/api/price-track/tasks/progress/light', loopRuns: '/api/price-track/loop-runs', loopRunDetail: '/api/price-track/loop-runs/{loopRunId}', loopRunStop: '/api/price-track/loop-runs/{loopRunId}/stop', loopRunDispatchNext: '/api/price-track/loop-runs/{loopRunId}/dispatch-next', loopRunChildFinished: '/api/price-track/loop-runs/{loopRunId}/child-finished', skipAsinCheck: '/api/price-track/tasks/{taskId}/skip-asin/check', skipAsins: '/api/price-track/tasks/{taskId}/skip-asins/paginated', pendingShopResult: '/api/price-track/pending-shop-result', dispatchFailed: '/api/price-track/tasks/{taskId}/dispatch-failed', dashboard: '/api/price-track/dashboard', history: '/api/price-track/history', historyDelete: '/api/price-track/history/{resultId}', resultDownload: '/api/price-track/results/{resultId}/download', }, similarAsin: { parse: '/api/similar-asin/parse', dashboard: '/api/similar-asin/dashboard', history: '/api/similar-asin/history', historyDelete: '/api/similar-asin/history/{resultId}', progressBatch: '/api/similar-asin/tasks/progress/batch', progressLight: '/api/similar-asin/tasks/progress/light', taskActivate: '/api/similar-asin/tasks/{taskId}/activate', taskDelete: '/api/similar-asin/tasks/{taskId}', resultDownload: '/api/similar-asin/results/{resultId}/download', }, appearancePatent: { parse: '/api/appearance-patent/parse', queuePayload: '/api/appearance-patent/tasks/{taskId}/queue-payload', dashboard: '/api/appearance-patent/dashboard', history: '/api/appearance-patent/history', historyDelete: '/api/appearance-patent/history/{resultId}', progressBatch: '/api/appearance-patent/tasks/progress/batch', progressLight: '/api/appearance-patent/tasks/progress/light', taskActivate: '/api/appearance-patent/tasks/{taskId}/activate', taskDelete: '/api/appearance-patent/tasks/{taskId}', resultDownload: '/api/appearance-patent/results/{resultId}/download', }, /** 专利/货源的本地采集开关(服务端唯一真源,前端只读)。 */ collectRouting: { get: '/api/collect-routing', }, /** 京东店铺商品采集(v1.4):建单走 LOCAL 通道,由本机客户端在已登录京麦的窗口内执行。 */ jdCollect: { create: '/api/jd-collect/tasks', /** 采集类目下拉数据源(公共库已落库 category_path 全集,建单页多选面板用) */ categories: '/api/jd-collect/categories', /** 店铺分类只读列表(管理员在后管京东数据库建的分类+组内商品数;2026-11-16 客户口径「普通账户都能看到」) */ groups: '/api/jd-collect/groups', /** 激活(PENDING→RUNNING):推客户端队列**之前**必须调用,否则分片被拒、心跳要求客户端收手 */ activate: '/api/jd-collect/tasks/{taskId}/activate', /** 采集进度(用户端「获取店铺数据」进度条数据源) */ progress: '/api/jd-collect/tasks/{taskId}/progress', heartbeat: '/api/jd-collect/tasks/{taskId}/heartbeat', chunk: '/api/jd-collect/tasks/{taskId}/chunk', /** 任务面板总览(运行中/成功/失败计数统计卡) */ dashboard: '/api/jd-collect/dashboard', /** 任务历史(活跃任务排前,含行数与断点游标) */ history: '/api/jd-collect/history', /** 批量任务进度(面板轮询专用,归属先经公共出口过滤) */ progressBatch: '/api/jd-collect/tasks/progress/batch', /** 删除任务(连带清理京东数据库该任务的商品/图片/SKU 行与断点游标) */ deleteTask: '/api/jd-collect/tasks/{taskId}', }, /** 京东商品上架:用户端建单/选品/面板;派发载荷由服务端下发,认领只由客户端和后端完成。 */ jdPublish: { /** 后端兼容建单入口;新版页面用独占路径,避免旧后端忽略品牌参数。 */ create: '/api/jd-publish/tasks', createWithTargetBrand: '/api/jd-publish/tasks/target-brand', /** 修改目标品牌后原位重试;沿用建单回执以直推本机队列。 */ retryBrand: '/api/jd-publish/tasks/{taskId}/retry-brand', /** 用户端选品分页(作用域=本账号可见数据权限分组下的分类归属行,2026-11-25 口径改: * 同组同事采集的商品同样可上架;跨公司/跨组不可见) */ products: '/api/jd-publish/products', /** 任务面板总览(运行中/成功/失败计数统计卡) */ dashboard: '/api/jd-publish/dashboard', /** 任务历史(活跃任务排前,含行级四档计数与建单载荷带回) */ history: '/api/jd-publish/history', /** 批量任务进度(面板轮询专用,归属先经公共出口过滤) */ progressBatch: '/api/jd-publish/tasks/progress/batch', /** 单任务行级进度(行级四档计数;面板批量口覆盖不到的兜底) */ progress: '/api/jd-publish/tasks/{taskId}/progress', /** 删除任务(连带清理该任务的发布明细快照行) */ deleteTask: '/api/jd-publish/tasks/{taskId}', /** 在架商品分页+额度余量(2026-11-25 客户口径「上限=同时在架商品数」) */ onShelf: '/api/jd-publish/on-shelf', /** 标记/取消标记已下架(按商品整组腾额度) */ markDelisted: '/api/jd-publish/items/{itemId}/delisted', /** 京麦店铺品牌候选(2026-11-28 客户口径「品牌看看能不能获取下来,也可以支持自己输入」): * 客户端在发布表单的品牌面板里抓到真名候选就增量上报,用户端目标品牌输入框读它做联想; * 京麦品牌只能按关键词远程搜索,没有可离线拉取的全量清单。 */ shopBrands: '/api/jd-shop-brands', }, userSecret: { bundle: '/api/user-secrets', save: '/api/user-secrets/{moduleKey}', clear: '/api/user-secrets/{moduleKey}', check: '/api/user-secrets/{moduleKey}/check', migrate: '/api/user-secrets/migrate', proxyBalance: '/api/user-secrets/proxy-balance', llmBalance: '/api/user-secrets/llm-balance', proxyPlan: '/api/user-secrets/proxy-plan', proxyWhitelist: '/api/user-secrets/proxy-whitelist', clientIp: '/api/user-secrets/client-ip', }, costGuard: { status: '/api/user/cost-guard/status', resume: '/api/user/cost-guard/resume', }, notification: { summary: '/api/notifications/summary', list: '/api/notifications', groups: '/api/notifications/groups', read: '/api/notifications/{id}/read', readAll: '/api/notifications/read-all', }, collectData: { parse: '/api/collect-data/parse', countryPreference: '/api/collect-data/country-preference', dashboard: '/api/collect-data/dashboard', history: '/api/collect-data/history', historyDelete: '/api/collect-data/history/{resultId}', progressBatch: '/api/collect-data/tasks/progress/batch', progressLight: '/api/collect-data/tasks/progress/light', taskActivate: '/api/collect-data/tasks/{taskId}/activate', taskDelete: '/api/collect-data/tasks/{taskId}', fail: '/api/collect-data/tasks/{taskId}/fail', items: '/api/collect-data/tasks/{taskId}/items', resultDownload: '/api/collect-data/results/{resultId}/download', }, imageVideo: { workflowRun: '/api/image-video/workflow/run', workflowResult: '/api/image-video/workflow/result', secrets: '/api/image-video/secrets', taskDetail: '/api/image-video/tasks/{taskId}', voiceClone: '/api/image-video/voice/clone', voiceList: '/api/image-video/voice/list', voiceDelete: '/api/image-video/voice/delete', voiceSynthesis: '/api/image-video/voice/synthesis', douyinCopy: '/api/image-video/douyin-copy', }, brand: { run: '/api/brand/run', expandFolder: '/api/brand/expand-folder', expandFolderRecursive: '/api/brand/expand-folder-recursive', taskDetail: '/api/brand/tasks/{taskId}', taskCancel: '/api/brand/tasks/{taskId}/cancel', taskDownload: '/api/brand/tasks/{taskId}/download', taskEvents: '/api/brand/tasks/{taskId}/events', }, permission: { columnPermissions: '/api/admin/permission-users/{uid}/column-permissions', }, digitalHuman: { versions: '/api/digital-human/versions', upload: '/api/digital-human/versions/upload', latest: '/api/digital-human/versions/latest', detail: '/api/digital-human/versions/{version}', release: '/api/digital-human/versions/{version}/release', setLatest: '/api/digital-human/versions/{version}/set-latest', delete: '/api/digital-human/versions/{version}', downloadUrl: '/api/digital-human/versions/{version}/download-url', }, tutorial: { latest: '/api/tutorial/latest', }, } as const export type ApiEndpointGroup = { [K in keyof typeof API_ENDPOINTS]: (typeof API_ENDPOINTS)[K][keyof (typeof API_ENDPOINTS)[K]] }