{"openapi":"3.0.0","info":{"title":"ZISHU API Documentation","version":"1.0.0","description":"Backend API for ZISHU platform with RBAC authentication","contact":{"name":"ZISHU Team"}},"servers":[{"url":"http://localhost:18080","description":"Development server"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Enter JWT token in satoken header"},"apiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"企业开发者 API Key（zsk_<32 字符 hex>）。仅供 /open-api/* 入口使用。"}},"schemas":{"ApiResponse":{"type":"object","properties":{"code":{"type":"integer","example":200},"message":{"type":"string","example":"成功"},"data":{}},"required":["code","message"]},"Error":{"type":"object","properties":{"code":{"type":"number","example":500},"message":{"type":"string","example":"Error message"},"data":{"type":"object","nullable":true}}},"Success":{"type":"object","properties":{"code":{"type":"number","example":200},"message":{"type":"string","example":"Success"},"data":{"type":"object"}}},"User":{"type":"object","properties":{"id":{"type":"string","example":"user_123"},"username":{"type":"string","example":"admin"},"nickname":{"type":"string","example":"Administrator"},"phone":{"type":"string","example":"13800138000"},"email":{"type":"string","nullable":true},"avatar":{"type":"string","nullable":true},"status":{"type":"number","example":1,"description":"1: active, 0: inactive"},"roleId":{"type":"string","example":"role_123"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Role":{"type":"object","properties":{"id":{"type":"string","example":"role_123"},"name":{"type":"string","example":"admin"},"label":{"type":"string","example":"Administrator"},"description":{"type":"string","nullable":true},"status":{"type":"number","example":1},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Menu":{"type":"object","properties":{"id":{"type":"string","example":"menu_123"},"parentId":{"type":"string","nullable":true},"name":{"type":"string","example":"Dashboard"},"path":{"type":"string","example":"/dashboard"},"component":{"type":"string","nullable":true},"redirect":{"type":"string","nullable":true},"icon":{"type":"string","nullable":true},"permission":{"type":"string","example":"dashboard:view","nullable":true},"type":{"type":"number","example":1,"description":"1: menu, 2: button"},"sort":{"type":"number","example":1},"status":{"type":"number","example":1},"hideInMenu":{"type":"number","example":0},"keepAlive":{"type":"number","example":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"children":{"type":"array","items":{"$ref":"#/components/schemas/Menu"}}}},"FrontendAsset":{"type":"object","properties":{"id":{"type":"string","example":"asset_123"},"version":{"type":"string","example":"1.0.0"},"platform":{"type":"string","example":"desktop"},"fileName":{"type":"string","example":"assets-1.0.0.zip"},"fileUrl":{"type":"string","example":"https://file.zishutonggao.com/assets/desktop/1.0.0/assets-1.0.0.zip"},"fileSize":{"type":"string","example":"10485760"},"checksum":{"type":"string","example":"sha256:abc123..."},"status":{"type":"number","example":1},"isLatest":{"type":"number","example":1},"releaseNotes":{"type":"string","nullable":true,"example":"Bug fixes and improvements"},"uploadedBy":{"type":"string","example":"user_123"},"publishedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"uploader":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string","nullable":true}}}}},"DesktopVersion":{"type":"object","properties":{"id":{"type":"string","example":"version_123"},"version":{"type":"string","example":"1.0.0"},"platform":{"type":"string","example":"windows"},"updateLog":{"type":"string","nullable":true},"downloadUrl":{"type":"string"},"fileSize":{"type":"string","example":"104857600"},"fileName":{"type":"string"},"checksum":{"type":"string"},"forceUpdate":{"type":"boolean","example":false},"status":{"type":"string","example":"published"},"publishedAt":{"type":"string","format":"date-time","nullable":true},"uploadedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"uploader":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"nickname":{"type":"string","nullable":true}}}}},"SmsLog":{"type":"object","properties":{"id":{"type":"string"},"phone":{"type":"string"},"content":{"type":"string"},"type":{"type":"string"},"templateId":{"type":"string","nullable":true},"status":{"type":"number"},"messageId":{"type":"string","nullable":true},"errorMsg":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}}},"SmsLogStats":{"type":"object","properties":{"totalCount":{"type":"number"},"todayCount":{"type":"number"},"successCount":{"type":"number"},"failCount":{"type":"number"},"successRate":{"type":"string"}}},"BloggerActivityStats":{"type":"object","properties":{"todayNew":{"type":"integer"},"weekNew":{"type":"integer"},"todayUpdated":{"type":"integer"},"weekUpdated":{"type":"integer"},"total":{"type":"integer"}}},"Organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","SUSPENDED"]},"dataMode":{"type":"string","enum":["CLOUD","LOCAL"]},"subscriptionPlan":{"type":"string","nullable":true},"subscriptionExpiresAt":{"type":"string","format":"date-time","nullable":true},"ownerId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","status","dataMode","ownerId","createdAt","updatedAt"]},"OrganizationMember":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string","enum":["OWNER","MEMBER"]},"status":{"type":"string","enum":["ACTIVE","REMOVED"]},"joinedAt":{"type":"string","format":"date-time"},"nickname":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"avatar":{"type":"string","nullable":true}},"required":["id","organizationId","userId","role","status","joinedAt"]},"OrganizationCurrentSummary":{"type":"object","nullable":true,"properties":{"organization":{"$ref":"#/components/schemas/Organization"},"member":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["OWNER","MEMBER"]},"joinedAt":{"type":"string","format":"date-time"}},"required":["id","role","joinedAt"]}}},"OrganizationApiKey":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"maskedKey":{"type":"string","description":"脱敏后的 key 前缀（不会返回明文）"},"scope":{"description":"JSON 形式的权限范围","type":"object","additionalProperties":true,"nullable":true},"enabled":{"type":"boolean","description":"是否启用；禁用后用该 key 调 /open-api/* 会返 401"},"lastUsedAt":{"type":"string","format":"date-time","nullable":true},"lastUsedIp":{"type":"string","nullable":true,"description":"最近一次调用的客户端 IP（IPv4 或 IPv6）"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","organizationId","name","maskedKey","enabled","createdAt"]},"OrganizationApiKeyCreated":{"type":"object","properties":{"key":{"type":"string","description":"明文 key（仅本次返回，请妥善保存）。形如 zsk_<32 字符 hex>"},"record":{"$ref":"#/components/schemas/OrganizationApiKey"}},"required":["key","record"]},"OrganizationApiKeyList":{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationApiKey"}}},"required":["list"]},"OrganizationMemberList":{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationMember"}}},"required":["list"]},"Blogger":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"ownerUserId":{"type":"string","nullable":true,"description":"CLOUD 模式下为 null；LOCAL 模式为持有人 userId"},"platform":{"type":"string","enum":["STARMAP","PGY","VIDEO_HUXUAN","MP_HUXUAN","BILIBILI_HUAHUO","KUAISHOU_JLJX"]},"platformBloggerId":{"type":"string"},"nickname":{"type":"string"},"avatar":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"gender":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"fansCount":{"type":"integer","nullable":true},"interactRate":{"type":"integer","nullable":true,"description":"万分比（如 350 = 3.5%）"},"priceJson":{"description":"报价 JSON（平台维度差异较大）","nullable":true,"type":"object","additionalProperties":true},"contactWechat":{"type":"string","nullable":true},"contactPhone":{"type":"string","nullable":true},"contactEmail":{"type":"string","nullable":true},"tags":{"type":"string","nullable":true},"remark":{"type":"string","nullable":true},"rebatePercent":{"type":"number","nullable":true,"description":"建联返点（百分比数值，如 5.5 = 5.5%）"},"linkupAt":{"type":"string","format":"date-time","nullable":true,"description":"建联时间（达成合作意向的日期）"},"linkupRemark":{"type":"string","nullable":true,"description":"建联备注（30 字符内）"},"lastSyncedAt":{"type":"string","format":"date-time","nullable":true},"source":{"type":"string","enum":["MANUAL","IMPORT","SCRAPE","OPEN_API"]},"rawData":{"description":"原始数据 JSON","nullable":true,"type":"object","additionalProperties":true},"platformStatus":{"type":"string","enum":["ACTIVE","NOT_FOUND","INVALID_URL"]},"platformStatusReason":{"type":"string","nullable":true},"platformStatusCheckedAt":{"type":"string","format":"date-time","nullable":true},"reviewStatus":{"type":"string","enum":["PENDING","APPROVED","REJECTED"],"description":"企业版审核状态；PR 个人版恒为 APPROVED"},"ownerUserName":{"type":"string","nullable":true,"description":"添加人（owner 用户名）；CLOUD 模式下为 null"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"creatorType":{"type":"string","nullable":true},"contentTopic":{"type":"string","nullable":true},"industryTag":{"type":"string","nullable":true},"monthFansIncreaseRate":{"type":"string","nullable":true},"priceShortWithFee":{"type":"integer","nullable":true},"priceMidWithFee":{"type":"integer","nullable":true},"priceLongWithFee":{"type":"integer","nullable":true},"personal30PlayMid":{"type":"string","format":"int64","nullable":true},"personal30PlayOverRate":{"type":"string","nullable":true},"personal30InteractRate":{"type":"string","nullable":true},"personal30ItemNum":{"type":"integer","nullable":true},"personal30AvgDuration":{"type":"integer","nullable":true},"personal30LikeAvg":{"type":"string","format":"int64","nullable":true},"personal30CommentAvg":{"type":"integer","nullable":true},"personal30ForwardAvg":{"type":"string","format":"int64","nullable":true},"personal90PlayMid":{"type":"string","format":"int64","nullable":true},"personal90PlayOverRate":{"type":"string","nullable":true},"personal90InteractRate":{"type":"string","nullable":true},"personal90ItemNum":{"type":"integer","nullable":true},"personal90AvgDuration":{"type":"integer","nullable":true},"personal90LikeAvg":{"type":"string","format":"int64","nullable":true},"personal90CommentAvg":{"type":"integer","nullable":true},"personal90ForwardAvg":{"type":"string","format":"int64","nullable":true},"star30PlayMid":{"type":"string","format":"int64","nullable":true},"star30PlayOverRate":{"type":"string","nullable":true},"star30InteractRate":{"type":"string","nullable":true},"star30ItemNum":{"type":"integer","nullable":true},"star30AvgDuration":{"type":"integer","nullable":true},"star30LikeAvg":{"type":"string","format":"int64","nullable":true},"star30CommentAvg":{"type":"integer","nullable":true},"star30ForwardAvg":{"type":"string","format":"int64","nullable":true},"star90PlayMid":{"type":"string","format":"int64","nullable":true},"star90PlayOverRate":{"type":"string","nullable":true},"star90InteractRate":{"type":"string","nullable":true},"star90ItemNum":{"type":"integer","nullable":true},"star90AvgDuration":{"type":"integer","nullable":true},"star90LikeAvg":{"type":"string","format":"int64","nullable":true},"star90CommentAvg":{"type":"integer","nullable":true},"star90ForwardAvg":{"type":"string","format":"int64","nullable":true},"estimate120ExpectCpm":{"type":"number","format":"float","nullable":true},"estimate120ExpectCpe":{"type":"number","format":"float","nullable":true},"estimate120ExpectVv":{"type":"integer","nullable":true},"estimate120HotItemRate":{"type":"string","nullable":true},"estimate2160ExpectCpm":{"type":"number","format":"float","nullable":true},"estimate2160ExpectCpe":{"type":"number","format":"float","nullable":true},"estimate2160ExpectVv":{"type":"integer","nullable":true},"estimate2160HotItemRate":{"type":"string","nullable":true},"estimate60PlusExpectCpm":{"type":"number","format":"float","nullable":true},"estimate60PlusExpectCpe":{"type":"number","format":"float","nullable":true},"estimate60PlusExpectVv":{"type":"integer","nullable":true},"estimate60PlusHotItemRate":{"type":"string","nullable":true},"seed30BizSearchAfterViewCnt":{"type":"string","nullable":true},"seed30BizSearchAfterViewRate":{"type":"string","nullable":true},"seed30BizBluewordCtr":{"type":"string","nullable":true},"seed30PersonalSearchAfterViewCnt":{"type":"string","nullable":true},"seed30PersonalSearchAfterViewRate":{"type":"string","nullable":true},"seed30PersonalBluewordCtr":{"type":"string","nullable":true},"seed30A3IncrCnt":{"type":"string","nullable":true},"seed30SearchWordCtr":{"type":"string","nullable":true},"seed90BizSearchAfterViewCnt":{"type":"string","nullable":true},"seed90BizSearchAfterViewRate":{"type":"string","nullable":true},"seed90BizBluewordCtr":{"type":"string","nullable":true},"seed90PersonalSearchAfterViewCnt":{"type":"string","nullable":true},"seed90PersonalSearchAfterViewRate":{"type":"string","nullable":true},"seed90PersonalBluewordCtr":{"type":"string","nullable":true},"seed90A3IncrCnt":{"type":"string","nullable":true},"seed90SearchWordCtr":{"type":"string","nullable":true},"convert7RelatedVideoCnt":{"type":"integer","nullable":true},"convert7VideoVvMedian":{"type":"string","format":"int64","nullable":true},"convert7ComponentClickCnt":{"type":"string","nullable":true},"convert7ComponentClickRate":{"type":"string","nullable":true},"convert7RelatedCpc":{"type":"string","nullable":true},"convert30RelatedVideoCnt":{"type":"integer","nullable":true},"convert30VideoVvMedian":{"type":"string","format":"int64","nullable":true},"convert30ComponentClickCnt":{"type":"string","nullable":true},"convert30ComponentClickRate":{"type":"string","nullable":true},"convert30RelatedCpc":{"type":"string","nullable":true},"convert90RelatedVideoCnt":{"type":"integer","nullable":true},"convert90VideoVvMedian":{"type":"string","format":"int64","nullable":true},"convert90ComponentClickCnt":{"type":"string","nullable":true},"convert90ComponentClickRate":{"type":"string","nullable":true},"convert90RelatedCpc":{"type":"string","nullable":true},"last15AllPlayMin":{"type":"string","format":"int64","nullable":true},"last15AllPlayMax":{"type":"string","format":"int64","nullable":true},"last15AllPlayAvg":{"type":"string","format":"int64","nullable":true},"last15AllLikeMin":{"type":"string","format":"int64","nullable":true},"last15AllLikeMax":{"type":"string","format":"int64","nullable":true},"last15AllLikeAvg":{"type":"string","format":"int64","nullable":true},"last15AllCommentMin":{"type":"integer","nullable":true},"last15AllCommentMax":{"type":"integer","nullable":true},"last15AllCommentAvg":{"type":"integer","nullable":true},"last15AllForwardMin":{"type":"string","format":"int64","nullable":true},"last15AllForwardMax":{"type":"string","format":"int64","nullable":true},"last15AllForwardAvg":{"type":"string","format":"int64","nullable":true},"last15PersonalPlayMin":{"type":"string","format":"int64","nullable":true},"last15PersonalPlayMax":{"type":"string","format":"int64","nullable":true},"last15PersonalPlayAvg":{"type":"string","format":"int64","nullable":true},"last15PersonalLikeMin":{"type":"string","format":"int64","nullable":true},"last15PersonalLikeMax":{"type":"string","format":"int64","nullable":true},"last15PersonalLikeAvg":{"type":"string","format":"int64","nullable":true},"last15PersonalCommentMin":{"type":"integer","nullable":true},"last15PersonalCommentMax":{"type":"integer","nullable":true},"last15PersonalCommentAvg":{"type":"integer","nullable":true},"last15PersonalForwardMin":{"type":"string","format":"int64","nullable":true},"last15PersonalForwardMax":{"type":"string","format":"int64","nullable":true},"last15PersonalForwardAvg":{"type":"string","format":"int64","nullable":true},"last15StarPlayMin":{"type":"string","format":"int64","nullable":true},"last15StarPlayMax":{"type":"string","format":"int64","nullable":true},"last15StarPlayAvg":{"type":"string","format":"int64","nullable":true},"last15StarLikeMin":{"type":"string","format":"int64","nullable":true},"last15StarLikeMax":{"type":"string","format":"int64","nullable":true},"last15StarLikeAvg":{"type":"string","format":"int64","nullable":true},"last15StarCommentMin":{"type":"integer","nullable":true},"last15StarCommentMax":{"type":"integer","nullable":true},"last15StarCommentAvg":{"type":"integer","nullable":true},"last15StarForwardMin":{"type":"string","format":"int64","nullable":true},"last15StarForwardMax":{"type":"string","format":"int64","nullable":true},"last15StarForwardAvg":{"type":"string","format":"int64","nullable":true},"contentAnalysisSummary":{"type":"string","nullable":true},"contentAnalysisTop1":{"type":"string","nullable":true},"contentAnalysisTop2":{"type":"string","nullable":true},"contentAnalysisTop3":{"type":"string","nullable":true},"contentAnalysisTop4":{"type":"string","nullable":true},"contentAnalysisTop5":{"type":"string","nullable":true},"contentAnalysisTop6":{"type":"string","nullable":true},"contentAnalysisTop7":{"type":"string","nullable":true},"contentAnalysisTop8":{"type":"string","nullable":true},"contentAnalysisTop9":{"type":"string","nullable":true},"contentAnalysisTop10":{"type":"string","nullable":true},"linkUserTotal":{"type":"string","format":"int64","nullable":true},"linkUserTotalRatio":{"type":"string","nullable":true},"linkAwarenessValue":{"type":"string","format":"int64","nullable":true},"linkAwarenessRatio":{"type":"string","nullable":true},"linkInterestValue":{"type":"string","format":"int64","nullable":true},"linkInterestRatio":{"type":"string","nullable":true},"linkLikeValue":{"type":"string","format":"int64","nullable":true},"linkLikeRatio":{"type":"string","nullable":true},"linkFollowValue":{"type":"string","format":"int64","nullable":true},"linkFollowRatio":{"type":"string","nullable":true},"fansTrend":{"type":"string","nullable":true},"fansGrowth":{"type":"integer","nullable":true},"fansGrowthRate":{"type":"string","nullable":true},"fansPortraitJson":{"type":"object","additionalProperties":true,"nullable":true,"description":"粉丝画像（74 字段对象）"},"audiencePortraitJson":{"type":"object","additionalProperties":true,"nullable":true,"description":"互动用户画像（74 字段对象）"},"tiePortraitJson":{"type":"object","additionalProperties":true,"nullable":true,"description":"建联用户画像（74 字段对象）"}},"required":["id","organizationId","platform","platformBloggerId","nickname","source","platformStatus","reviewStatus","createdAt","updatedAt"]},"BloggerUpsertInput":{"type":"object","required":["platform","platformBloggerId","nickname"],"properties":{"platform":{"type":"string","enum":["STARMAP","PGY","VIDEO_HUXUAN","MP_HUXUAN","BILIBILI_HUAHUO","KUAISHOU_JLJX"]},"platformBloggerId":{"type":"string"},"nickname":{"type":"string"},"avatar":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"gender":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"fansCount":{"type":"integer","nullable":true},"interactRate":{"type":"integer","nullable":true},"priceJson":{"type":"object","additionalProperties":true,"nullable":true},"contactWechat":{"type":"string","nullable":true},"contactPhone":{"type":"string","nullable":true},"contactEmail":{"type":"string","nullable":true},"tags":{"type":"string","nullable":true},"remark":{"type":"string","nullable":true},"rebatePercent":{"type":"number","nullable":true,"description":"建联返点（百分比数值，如 5.5 = 5.5%）"},"linkupAt":{"type":"string","format":"date-time","nullable":true,"description":"建联时间（达成合作意向的日期）"},"linkupRemark":{"type":"string","nullable":true,"description":"建联备注（30 字符内）"},"source":{"type":"string","enum":["MANUAL","IMPORT","SCRAPE","OPEN_API"]},"creatorType":{"type":"string","nullable":true},"contentTopic":{"type":"string","nullable":true},"industryTag":{"type":"string","nullable":true},"monthFansIncreaseRate":{"type":"string","nullable":true},"priceShortWithFee":{"type":"integer","nullable":true},"priceMidWithFee":{"type":"integer","nullable":true},"priceLongWithFee":{"type":"integer","nullable":true},"personal30PlayMid":{"type":"string","format":"int64","nullable":true},"personal30PlayOverRate":{"type":"string","nullable":true},"personal30InteractRate":{"type":"string","nullable":true},"personal30ItemNum":{"type":"integer","nullable":true},"personal30AvgDuration":{"type":"integer","nullable":true},"personal30LikeAvg":{"type":"string","format":"int64","nullable":true},"personal30CommentAvg":{"type":"integer","nullable":true},"personal30ForwardAvg":{"type":"string","format":"int64","nullable":true},"personal90PlayMid":{"type":"string","format":"int64","nullable":true},"personal90PlayOverRate":{"type":"string","nullable":true},"personal90InteractRate":{"type":"string","nullable":true},"personal90ItemNum":{"type":"integer","nullable":true},"personal90AvgDuration":{"type":"integer","nullable":true},"personal90LikeAvg":{"type":"string","format":"int64","nullable":true},"personal90CommentAvg":{"type":"integer","nullable":true},"personal90ForwardAvg":{"type":"string","format":"int64","nullable":true},"star30PlayMid":{"type":"string","format":"int64","nullable":true},"star30PlayOverRate":{"type":"string","nullable":true},"star30InteractRate":{"type":"string","nullable":true},"star30ItemNum":{"type":"integer","nullable":true},"star30AvgDuration":{"type":"integer","nullable":true},"star30LikeAvg":{"type":"string","format":"int64","nullable":true},"star30CommentAvg":{"type":"integer","nullable":true},"star30ForwardAvg":{"type":"string","format":"int64","nullable":true},"star90PlayMid":{"type":"string","format":"int64","nullable":true},"star90PlayOverRate":{"type":"string","nullable":true},"star90InteractRate":{"type":"string","nullable":true},"star90ItemNum":{"type":"integer","nullable":true},"star90AvgDuration":{"type":"integer","nullable":true},"star90LikeAvg":{"type":"string","format":"int64","nullable":true},"star90CommentAvg":{"type":"integer","nullable":true},"star90ForwardAvg":{"type":"string","format":"int64","nullable":true},"estimate120ExpectCpm":{"type":"number","format":"float","nullable":true},"estimate120ExpectCpe":{"type":"number","format":"float","nullable":true},"estimate120ExpectVv":{"type":"integer","nullable":true},"estimate120HotItemRate":{"type":"string","nullable":true},"estimate2160ExpectCpm":{"type":"number","format":"float","nullable":true},"estimate2160ExpectCpe":{"type":"number","format":"float","nullable":true},"estimate2160ExpectVv":{"type":"integer","nullable":true},"estimate2160HotItemRate":{"type":"string","nullable":true},"estimate60PlusExpectCpm":{"type":"number","format":"float","nullable":true},"estimate60PlusExpectCpe":{"type":"number","format":"float","nullable":true},"estimate60PlusExpectVv":{"type":"integer","nullable":true},"estimate60PlusHotItemRate":{"type":"string","nullable":true},"seed30BizSearchAfterViewCnt":{"type":"string","nullable":true},"seed30BizSearchAfterViewRate":{"type":"string","nullable":true},"seed30BizBluewordCtr":{"type":"string","nullable":true},"seed30PersonalSearchAfterViewCnt":{"type":"string","nullable":true},"seed30PersonalSearchAfterViewRate":{"type":"string","nullable":true},"seed30PersonalBluewordCtr":{"type":"string","nullable":true},"seed30A3IncrCnt":{"type":"string","nullable":true},"seed30SearchWordCtr":{"type":"string","nullable":true},"seed90BizSearchAfterViewCnt":{"type":"string","nullable":true},"seed90BizSearchAfterViewRate":{"type":"string","nullable":true},"seed90BizBluewordCtr":{"type":"string","nullable":true},"seed90PersonalSearchAfterViewCnt":{"type":"string","nullable":true},"seed90PersonalSearchAfterViewRate":{"type":"string","nullable":true},"seed90PersonalBluewordCtr":{"type":"string","nullable":true},"seed90A3IncrCnt":{"type":"string","nullable":true},"seed90SearchWordCtr":{"type":"string","nullable":true},"convert7RelatedVideoCnt":{"type":"integer","nullable":true},"convert7VideoVvMedian":{"type":"string","format":"int64","nullable":true},"convert7ComponentClickCnt":{"type":"string","nullable":true},"convert7ComponentClickRate":{"type":"string","nullable":true},"convert7RelatedCpc":{"type":"string","nullable":true},"convert30RelatedVideoCnt":{"type":"integer","nullable":true},"convert30VideoVvMedian":{"type":"string","format":"int64","nullable":true},"convert30ComponentClickCnt":{"type":"string","nullable":true},"convert30ComponentClickRate":{"type":"string","nullable":true},"convert30RelatedCpc":{"type":"string","nullable":true},"convert90RelatedVideoCnt":{"type":"integer","nullable":true},"convert90VideoVvMedian":{"type":"string","format":"int64","nullable":true},"convert90ComponentClickCnt":{"type":"string","nullable":true},"convert90ComponentClickRate":{"type":"string","nullable":true},"convert90RelatedCpc":{"type":"string","nullable":true},"last15AllPlayMin":{"type":"string","format":"int64","nullable":true},"last15AllPlayMax":{"type":"string","format":"int64","nullable":true},"last15AllPlayAvg":{"type":"string","format":"int64","nullable":true},"last15AllLikeMin":{"type":"string","format":"int64","nullable":true},"last15AllLikeMax":{"type":"string","format":"int64","nullable":true},"last15AllLikeAvg":{"type":"string","format":"int64","nullable":true},"last15AllCommentMin":{"type":"integer","nullable":true},"last15AllCommentMax":{"type":"integer","nullable":true},"last15AllCommentAvg":{"type":"integer","nullable":true},"last15AllForwardMin":{"type":"string","format":"int64","nullable":true},"last15AllForwardMax":{"type":"string","format":"int64","nullable":true},"last15AllForwardAvg":{"type":"string","format":"int64","nullable":true},"last15PersonalPlayMin":{"type":"string","format":"int64","nullable":true},"last15PersonalPlayMax":{"type":"string","format":"int64","nullable":true},"last15PersonalPlayAvg":{"type":"string","format":"int64","nullable":true},"last15PersonalLikeMin":{"type":"string","format":"int64","nullable":true},"last15PersonalLikeMax":{"type":"string","format":"int64","nullable":true},"last15PersonalLikeAvg":{"type":"string","format":"int64","nullable":true},"last15PersonalCommentMin":{"type":"integer","nullable":true},"last15PersonalCommentMax":{"type":"integer","nullable":true},"last15PersonalCommentAvg":{"type":"integer","nullable":true},"last15PersonalForwardMin":{"type":"string","format":"int64","nullable":true},"last15PersonalForwardMax":{"type":"string","format":"int64","nullable":true},"last15PersonalForwardAvg":{"type":"string","format":"int64","nullable":true},"last15StarPlayMin":{"type":"string","format":"int64","nullable":true},"last15StarPlayMax":{"type":"string","format":"int64","nullable":true},"last15StarPlayAvg":{"type":"string","format":"int64","nullable":true},"last15StarLikeMin":{"type":"string","format":"int64","nullable":true},"last15StarLikeMax":{"type":"string","format":"int64","nullable":true},"last15StarLikeAvg":{"type":"string","format":"int64","nullable":true},"last15StarCommentMin":{"type":"integer","nullable":true},"last15StarCommentMax":{"type":"integer","nullable":true},"last15StarCommentAvg":{"type":"integer","nullable":true},"last15StarForwardMin":{"type":"string","format":"int64","nullable":true},"last15StarForwardMax":{"type":"string","format":"int64","nullable":true},"last15StarForwardAvg":{"type":"string","format":"int64","nullable":true},"contentAnalysisSummary":{"type":"string","nullable":true},"contentAnalysisTop1":{"type":"string","nullable":true},"contentAnalysisTop2":{"type":"string","nullable":true},"contentAnalysisTop3":{"type":"string","nullable":true},"contentAnalysisTop4":{"type":"string","nullable":true},"contentAnalysisTop5":{"type":"string","nullable":true},"contentAnalysisTop6":{"type":"string","nullable":true},"contentAnalysisTop7":{"type":"string","nullable":true},"contentAnalysisTop8":{"type":"string","nullable":true},"contentAnalysisTop9":{"type":"string","nullable":true},"contentAnalysisTop10":{"type":"string","nullable":true},"linkUserTotal":{"type":"string","format":"int64","nullable":true},"linkUserTotalRatio":{"type":"string","nullable":true},"linkAwarenessValue":{"type":"string","format":"int64","nullable":true},"linkAwarenessRatio":{"type":"string","nullable":true},"linkInterestValue":{"type":"string","format":"int64","nullable":true},"linkInterestRatio":{"type":"string","nullable":true},"linkLikeValue":{"type":"string","format":"int64","nullable":true},"linkLikeRatio":{"type":"string","nullable":true},"linkFollowValue":{"type":"string","format":"int64","nullable":true},"linkFollowRatio":{"type":"string","nullable":true},"fansTrend":{"type":"string","nullable":true},"fansGrowth":{"type":"integer","nullable":true},"fansGrowthRate":{"type":"string","nullable":true},"fansPortraitJson":{"type":"object","additionalProperties":true,"nullable":true,"description":"粉丝画像（74 字段对象）"},"audiencePortraitJson":{"type":"object","additionalProperties":true,"nullable":true,"description":"互动用户画像（74 字段对象）"},"tiePortraitJson":{"type":"object","additionalProperties":true,"nullable":true,"description":"建联用户画像（74 字段对象）"}}},"BloggerBatchInput":{"type":"object","required":["bloggers"],"properties":{"bloggers":{"type":"array","items":{"$ref":"#/components/schemas/BloggerUpsertInput"}}}},"BloggerBatchResult":{"type":"object","properties":{"imported":{"type":"integer"},"updated":{"type":"integer"},"failed":{"type":"integer"}},"required":["imported","updated","failed"]},"BloggerList":{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/Blogger"}},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}},"required":["list","hasMore"]},"BloggerRefreshQueue":{"type":"object","description":"按 platform + 过滤条件（如 staleHours）的待刷新博主队列，附带匹配总数","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/Blogger"}},"take":{"type":"integer"},"totalCount":{"type":"integer","description":"满足过滤条件的博主总数（与 take 无关），用于前端预估任务规模"}},"required":["list","take","totalCount"]},"BloggerPlatformOverview":{"type":"object","properties":{"platform":{"type":"string","enum":["STARMAP","PGY","VIDEO_HUXUAN","MP_HUXUAN","BILIBILI_HUAHUO","KUAISHOU_JLJX"]},"totalCount":{"type":"integer"},"lastUpdatedAt":{"type":"string","format":"date-time","nullable":true},"newCount7d":{"type":"integer"},"newCount30d":{"type":"integer"},"avgFansCount":{"type":"integer"},"priceDistribution":{"type":"object","properties":{"0-10w":{"type":"integer"},"10-100w":{"type":"integer"},"100w+":{"type":"integer"}},"required":["0-10w","10-100w","100w+"]},"updatedRatio1d":{"type":"number","description":"最近 1 天完成数据更新/检查的占比，0~1"},"updatedRatio7d":{"type":"number","description":"最近 7 天完成数据更新/检查的占比，0~1"},"updatedRatio30d":{"type":"number","description":"最近 30 天完成数据更新/检查的占比，0~1"},"abnormalCount":{"type":"integer","description":"平台状态异常的达人数量，如平台后台找不到或链接无效"},"abnormalRatio":{"type":"number","description":"平台状态异常的占比，0~1"},"staleRatio60d":{"type":"number","description":"超过 60 天没有完成数据更新/检查的占比，0~1"}},"required":["platform","totalCount","newCount7d","newCount30d","avgFansCount","priceDistribution","updatedRatio1d","updatedRatio7d","updatedRatio30d","abnormalCount","abnormalRatio","staleRatio60d"]},"BloggerOverview":{"type":"object","properties":{"totalBloggers":{"type":"integer"},"avgFansCount":{"type":"integer"},"platformCount":{"type":"integer"},"perPlatform":{"type":"array","items":{"$ref":"#/components/schemas/BloggerPlatformOverview"}},"list":{"type":"array","items":{"$ref":"#/components/schemas/BloggerPlatformOverview"},"description":"与 perPlatform 相同，保留旧前端兼容字段"}},"required":["totalBloggers","avgFansCount","platformCount","perPlatform"]},"BloggerSnapshotPerPlatform":{"type":"object","properties":{"platform":{"type":"string","enum":["STARMAP","PGY","VIDEO_HUXUAN","MP_HUXUAN","BILIBILI_HUAHUO","KUAISHOU_JLJX"]},"totalCount":{"type":"integer"},"newCount":{"type":"integer"},"updatedCount":{"type":"integer"}},"required":["platform","totalCount","newCount","updatedCount"]},"BloggerSnapshotDay":{"type":"object","properties":{"snapshotDate":{"type":"string","format":"date"},"perPlatform":{"type":"array","items":{"$ref":"#/components/schemas/BloggerSnapshotPerPlatform"}}},"required":["snapshotDate","perPlatform"]},"BloggerSnapshotList":{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/BloggerSnapshotDay"}}},"required":["list"]},"AdminBlogger":{"allOf":[{"$ref":"#/components/schemas/Blogger"},{"type":"object","properties":{"organizationName":{"type":"string","nullable":true,"description":"所属企业名称（来自 organizations.name，跨企业聚合时使用）"},"ownerUserName":{"type":"string","nullable":true,"description":"添加人用户名；CLOUD 模式或无 ownerUser 时为 null"}}}]},"AdminBloggerList":{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/AdminBlogger"}},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}},"required":["list","hasMore"]},"AdminBloggerPlatformStat":{"type":"object","properties":{"platform":{"type":"string","enum":["STARMAP","PGY","VIDEO_HUXUAN","MP_HUXUAN","BILIBILI_HUAHUO","KUAISHOU_JLJX"]},"count":{"type":"integer"}},"required":["platform","count"]},"AdminBloggerOrganizationStat":{"type":"object","properties":{"organizationId":{"type":"string"},"organizationName":{"type":"string","nullable":true},"count":{"type":"integer"}},"required":["organizationId","count"]},"AdminBloggerOverview":{"type":"object","properties":{"totalCount":{"type":"integer"},"organizationCount":{"type":"integer"},"perPlatform":{"type":"array","items":{"$ref":"#/components/schemas/AdminBloggerPlatformStat"}},"perOrganization":{"type":"array","items":{"$ref":"#/components/schemas/AdminBloggerOrganizationStat"}}},"required":["totalCount","organizationCount","perPlatform","perOrganization"]},"FingerprintProfile":{"type":"object","description":"浏览器指纹 profile：账号创建时随机生成、永不变更，用于采集窗口的指纹注入伪装。列表接口不会返回（载荷较大）；getScraperAccount 详情和 cookie 接口会同时返回。","properties":{"userAgent":{"type":"string","description":"完整 UA 字符串"},"platform":{"type":"string","enum":["Win32","MacIntel","Linux x86_64"],"description":"navigator.platform 值（与 UA 对应）"},"language":{"type":"string","example":"zh-CN"},"languages":{"type":"array","items":{"type":"string"},"description":"navigator.languages 值"},"timezone":{"type":"string","description":"IANA 时区标识，如 Asia/Shanghai"},"screen":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"},"colorDepth":{"type":"integer"}},"required":["width","height","colorDepth"]},"viewport":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"}},"required":["width","height"]},"hardwareConcurrency":{"type":"integer","description":"navigator.hardwareConcurrency（CPU 核心数）"},"deviceMemory":{"type":"integer","description":"navigator.deviceMemory（GB）"},"seeds":{"type":"object","description":"各项指纹的随机种子（hex 字符串），由 preload 用于做确定性扰动","properties":{"canvas":{"type":"string","description":"Canvas 像素扰动种子（16 字节 hex）"},"audio":{"type":"string","description":"AudioContext 频谱扰动种子（16 字节 hex）"},"webgl":{"type":"string","description":"WebGL 参数扰动种子（16 字节 hex）"},"fonts":{"type":"string","description":"字体枚举扰动种子（16 字节 hex）"}},"required":["canvas","audio","webgl","fonts"]},"webgl":{"type":"object","properties":{"vendor":{"type":"string","description":"WebGL UNMASKED_VENDOR_WEBGL"},"renderer":{"type":"string","description":"WebGL UNMASKED_RENDERER_WEBGL"}},"required":["vendor","renderer"]}},"required":["userAgent","platform","language","languages","timezone","screen","viewport","hardwareConcurrency","deviceMemory","seeds","webgl"]},"ScraperAccount":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"ownerUserId":{"type":"string","nullable":true},"ownerUserName":{"type":"string","nullable":true,"description":"持有人用户名（来自 User.username，可能为 null）。"},"platform":{"type":"string","enum":["STARMAP","PGY","VIDEO_HUXUAN","MP_HUXUAN","BILIBILI_HUAHUO","KUAISHOU_JLJX"]},"displayName":{"type":"string"},"avatar":{"type":"string","nullable":true},"weight":{"type":"integer","minimum":1,"maximum":10},"partition":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","RISK","BANNED","REVOKED"]},"lastAuthAt":{"type":"string","format":"date-time","nullable":true},"lastUsedAt":{"type":"string","format":"date-time","nullable":true},"fingerprintProfile":{"$ref":"#/components/schemas/FingerprintProfile","nullable":true,"description":"浏览器指纹 profile。创建时随机生成、永不变更；通过 update 接口传入会被静默忽略。"},"usedToday":{"type":"integer","description":"今日已用次数（DB 累计）","default":0},"usedThisHour":{"type":"integer","description":"当前小时已用次数","default":0},"cooldownUntil":{"type":"string","format":"date-time","nullable":true,"description":"冷却结束时刻；早于此刻账号不参与调度"},"consecutiveFailures":{"type":"integer","description":"连续失败次数","default":0},"lastCaptchaAt":{"type":"string","format":"date-time","nullable":true,"description":"上次出现验证码 / 滑块的时间，仅用于审计；当前不再因验证码触发冷却账号"},"lastResetAt":{"type":"string","format":"date-time","nullable":true,"description":"最近一次跨日/跨小时计数重置时刻"},"riskReason":{"type":"string","nullable":true,"description":"最近一次进入 RISK 的原因（≤500 字符）"},"riskAt":{"type":"string","format":"date-time","nullable":true,"description":"最近一次进入 RISK 的时刻"},"lastConnectivityCheckAt":{"type":"string","format":"date-time","nullable":true,"description":"上次连通性测试 / 人工状态确认时间"},"maxPerTaskOverride":{"type":"integer","nullable":true,"description":"账号级别单任务上限覆盖（不传走平台策略）"},"currentShiftCount":{"type":"integer","description":"当前班次内已处理条数"},"shiftRestUntil":{"type":"string","format":"date-time","nullable":true,"description":"班次休息结束时间；未来时间内不参与调度"},"lastShiftEndedAt":{"type":"string","format":"date-time","nullable":true,"description":"最近一次班次结束时间，用于跨 run 轮休排序"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","organizationId","platform","displayName","weight","partition","status","usedToday","usedThisHour","consecutiveFailures","currentShiftCount","createdAt","updatedAt"]},"ScraperAccountListItem":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"ownerUserId":{"type":"string","nullable":true},"ownerUserName":{"type":"string","nullable":true,"description":"持有人用户名（来自 User.username，可能为 null）。前端按持有人维度展示时用，例如 OWNER 切到\"全部\"视图后在卡片上显示是谁授权的。"},"platform":{"type":"string","enum":["STARMAP","PGY","VIDEO_HUXUAN","MP_HUXUAN","BILIBILI_HUAHUO","KUAISHOU_JLJX"]},"displayName":{"type":"string"},"avatar":{"type":"string","nullable":true},"weight":{"type":"integer","minimum":1,"maximum":10},"partition":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","RISK","BANNED","REVOKED"]},"lastAuthAt":{"type":"string","format":"date-time","nullable":true},"lastUsedAt":{"type":"string","format":"date-time","nullable":true},"usedToday":{"type":"integer","default":0},"usedThisHour":{"type":"integer","default":0},"cooldownUntil":{"type":"string","format":"date-time","nullable":true},"consecutiveFailures":{"type":"integer","default":0},"lastCaptchaAt":{"type":"string","format":"date-time","nullable":true,"description":"上次出现验证码 / 滑块的时间，仅用于审计；当前不再因验证码触发冷却账号"},"lastResetAt":{"type":"string","format":"date-time","nullable":true},"riskReason":{"type":"string","nullable":true},"riskAt":{"type":"string","format":"date-time","nullable":true},"lastConnectivityCheckAt":{"type":"string","format":"date-time","nullable":true,"description":"上次连通性测试 / 人工状态确认时间"},"maxPerTaskOverride":{"type":"integer","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","organizationId","platform","displayName","weight","partition","status","usedToday","usedThisHour","consecutiveFailures","createdAt","updatedAt"]},"ScraperAccountCreateInput":{"type":"object","required":["platform","displayName"],"properties":{"platform":{"type":"string","enum":["STARMAP","PGY","VIDEO_HUXUAN","MP_HUXUAN","BILIBILI_HUAHUO","KUAISHOU_JLJX"]},"displayName":{"type":"string","maxLength":100},"avatar":{"type":"string","nullable":true},"weight":{"type":"integer","minimum":1,"maximum":10,"default":1},"usedToday":{"type":"integer","minimum":0,"default":0,"description":"可选：授权前当日已消耗的平台额度估算值。创建后直接写入 usedToday，并以创建时刻作为 24h 滑动重置起点。"},"partition":{"type":"string","pattern":"^persist:scraper-[A-Za-z0-9_-]{8,64}$","description":"可选：桌面端授权窗口实际使用的 Electron session partition。企业采集账号创建时传入，保证授权窗口与后续采集窗口共享登录态。"},"fingerprintProfile":{"$ref":"#/components/schemas/FingerprintProfile","description":"可选：客户端可显式传入指纹 profile（覆盖服务端随机生成）。一般业务路径不传，由服务端随机生成。"}}},"ScraperAccountUpdateInput":{"type":"object","properties":{"displayName":{"type":"string","maxLength":100},"avatar":{"type":"string","nullable":true},"weight":{"type":"integer","minimum":1,"maximum":10},"status":{"type":"string","enum":["ACTIVE","RISK","BANNED","REVOKED"]}}},"ScraperAccountList":{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/ScraperAccountListItem"}}},"required":["list"]},"ScraperAccountCookie":{"type":"object","description":"主进程拉取登录信息时的复合响应：含解密后的 cookie 和指纹 profile，指纹 profile 在采集窗口启动前注入，与登录 cookie 配套使用。","properties":{"cookie":{"type":"string","nullable":true},"fingerprintProfile":{"$ref":"#/components/schemas/FingerprintProfile","nullable":true}}},"MarkRiskInput":{"type":"object","description":"标记 RISK 入参；不传任何字段则视为「用户主动标记」（行为同旧版，仅切 status=RISK）；传 reason 则视为「系统降速 / 风控触发」，会落 riskReason/riskAt/cooldownUntil。","properties":{"reason":{"type":"string","maxLength":500,"description":"进入 RISK 的原因（≤500 字符）。可携带分级关键字：L4_BANNED → 升级 BANNED；L2_CAPTCHA / L3_AUTH_FAIL → 强制 RISK；其他 → 仅落 cooldown。"},"cooldownMinutes":{"type":"integer","minimum":0,"default":360,"description":"冷却时长（分钟），默认 360。仅当 reason 不为空时生效。"}}},"ScrapingTask":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"ownerUserId":{"type":"string","nullable":true},"name":{"type":"string"},"platforms":{"description":"平台列表（JSON 数组）","type":"array","items":{"type":"string","enum":["STARMAP","PGY","VIDEO_HUXUAN","MP_HUXUAN","BILIBILI_HUAHUO","KUAISHOU_JLJX"]}},"scope":{"type":"string","enum":["ALL","FILTERED"]},"filterJson":{"type":"object","additionalProperties":true,"nullable":true},"fieldsJson":{"type":"array","items":{"type":"string"},"nullable":true,"description":"可选字段白名单（Blogger 字段名）；null=全部字段"},"scheduleType":{"type":"string","enum":["MANUAL","DAILY","WEEKLY","MONTHLY"]},"cronExpression":{"type":"string","nullable":true},"enabled":{"type":"boolean"},"priority":{"type":"string","enum":["MANUAL","DAILY","WEEKLY","MONTHLY"]},"maxRunDurationMinutes":{"type":"integer"},"failureRetryCount":{"type":"integer"},"retryIntervalMinutes":{"type":"integer"},"currentRetryCount":{"type":"integer"},"pacePolicyId":{"type":"string","nullable":true,"description":"采集策略 ID（PRD §5.3 v2）；null = dispatcher 兜底 BALANCED"},"lastRunAt":{"type":"string","format":"date-time","nullable":true},"nextRunAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"runCount":{"type":"integer","description":"该模板累计创建过的执行实例数量"},"lastRun":{"type":"object","nullable":true,"description":"最近一次 run 概要，没有 run 时为 null","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","RUNNING","SUCCESS","PARTIAL","PAUSED","FAILED","CANCELLED"]},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","format":"date-time","nullable":true},"targetCount":{"type":"integer"},"successCount":{"type":"integer"},"failedCount":{"type":"integer"},"pendingCount":{"type":"integer","description":"PAUSED 时剩余未处理条数（=待续跑）"},"attempt":{"type":"integer"}},"required":["id","status","startedAt","targetCount","successCount","failedCount","pendingCount","attempt"]}},"required":["id","organizationId","name","platforms","scope","scheduleType","enabled","priority","maxRunDurationMinutes","failureRetryCount","retryIntervalMinutes","currentRetryCount","createdAt","updatedAt","runCount"]},"ScrapingTaskCreateInput":{"type":"object","required":["name","platforms"],"properties":{"name":{"type":"string","maxLength":100},"platforms":{"type":"array","items":{"type":"string","enum":["STARMAP","PGY","VIDEO_HUXUAN","MP_HUXUAN","BILIBILI_HUAHUO","KUAISHOU_JLJX"]},"minItems":1},"scope":{"type":"string","enum":["ALL","FILTERED"],"default":"ALL"},"filterJson":{"type":"object","additionalProperties":true,"nullable":true},"fieldsJson":{"type":"array","items":{"type":"string"},"nullable":true,"description":"可选字段白名单（Blogger 字段名）；null/省略=全部字段"},"scheduleType":{"type":"string","enum":["MANUAL","DAILY","WEEKLY","MONTHLY"],"default":"MANUAL"},"cronExpression":{"type":"string","nullable":true},"enabled":{"type":"boolean","default":true},"priority":{"type":"string","enum":["MANUAL","DAILY","WEEKLY","MONTHLY"]},"maxRunDurationMinutes":{"type":"integer","minimum":1},"failureRetryCount":{"type":"integer","minimum":0},"retryIntervalMinutes":{"type":"integer","minimum":1},"pacePolicyId":{"type":"string","nullable":true,"description":"采集策略 ID；null/省略 = dispatcher 兜底 BALANCED"}}},"ScrapingTaskUpdateInput":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"platforms":{"type":"array","items":{"type":"string","enum":["STARMAP","PGY","VIDEO_HUXUAN","MP_HUXUAN","BILIBILI_HUAHUO","KUAISHOU_JLJX"]},"minItems":1},"scope":{"type":"string","enum":["ALL","FILTERED"]},"filterJson":{"type":"object","additionalProperties":true,"nullable":true},"fieldsJson":{"type":"array","items":{"type":"string"},"nullable":true},"scheduleType":{"type":"string","enum":["MANUAL","DAILY","WEEKLY","MONTHLY"]},"cronExpression":{"type":"string","nullable":true},"enabled":{"type":"boolean"},"priority":{"type":"string","enum":["MANUAL","DAILY","WEEKLY","MONTHLY"]},"maxRunDurationMinutes":{"type":"integer","minimum":1},"failureRetryCount":{"type":"integer","minimum":0},"retryIntervalMinutes":{"type":"integer","minimum":1},"pacePolicyId":{"type":"string","nullable":true},"lastRunAt":{"type":"string","format":"date-time","nullable":true},"nextRunAt":{"type":"string","format":"date-time","nullable":true}}},"ScrapingTaskList":{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/ScrapingTask"}}},"required":["list"]},"FailedTargetEntry":{"type":"object","description":"一条失败采集 target 的结构化记录（前端导出失败列表用）","properties":{"url":{"type":"string"},"errorCode":{"type":"string","nullable":true},"errorMessage":{"type":"string","nullable":true},"accountId":{"type":"string","nullable":true},"attempt":{"type":"integer"},"ts":{"type":"integer","description":"失败时间戳（毫秒）"}},"required":["url","attempt","ts"]},"ScrapingTaskRun":{"type":"object","properties":{"id":{"type":"string"},"taskId":{"type":"string"},"status":{"type":"string","enum":["PENDING","RUNNING","SUCCESS","PARTIAL","PAUSED","FAILED","CANCELLED"]},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","format":"date-time","nullable":true},"targetCount":{"type":"integer"},"successCount":{"type":"integer"},"failedCount":{"type":"integer"},"captchaCount":{"type":"integer"},"accountUsageJson":{"type":"object","additionalProperties":true,"nullable":true},"errorLog":{"type":"string","nullable":true},"pauseReason":{"type":"string","nullable":true},"attempt":{"type":"integer","description":"该任务下第几次续跑（从 1 开始）"},"pendingBloggerIds":{"type":"array","items":{"type":"string"},"nullable":true,"description":"PAUSED 时剩余未处理的 blogger id 数组（续跑用）"},"processedBloggerIds":{"type":"array","items":{"type":"string"},"nullable":true,"description":"已成功处理的 blogger id 列表（Excel 导出用）"},"parentRunId":{"type":"string","nullable":true,"description":"续跑指向的 parent run id"},"failedTargets":{"type":"array","items":{"$ref":"#/components/schemas/FailedTargetEntry"},"nullable":true,"description":"结构化失败列表（前端\"下载失败列表\"按钮用）"}},"required":["id","taskId","status","startedAt","targetCount","successCount","failedCount","captchaCount","attempt"]},"ScrapingTaskRunUpdateInput":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","RUNNING","SUCCESS","PARTIAL","PAUSED","FAILED","CANCELLED"]},"finishedAt":{"type":"string","format":"date-time","nullable":true},"targetCount":{"type":"integer"},"successCount":{"type":"integer"},"failedCount":{"type":"integer"},"captchaCount":{"type":"integer"},"accountUsageJson":{"type":"object","additionalProperties":true,"nullable":true},"errorLog":{"type":"string","nullable":true},"pauseReason":{"type":"string","nullable":true},"pendingBloggerIds":{"type":"array","items":{"type":"string"},"nullable":true},"processedBloggerIds":{"type":"array","items":{"type":"string"},"nullable":true},"failedTargets":{"type":"array","items":{"$ref":"#/components/schemas/FailedTargetEntry"},"nullable":true,"description":"dispatcher 在失败时增量回写的结构化失败列表"}}},"ScrapingTaskRunList":{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/ScrapingTaskRun"}},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}},"required":["list","hasMore"]},"PacePolicy":{"type":"object","properties":{"id":{"type":"string"},"systemKey":{"type":"string","nullable":true,"description":"内置策略 key（CONSERVATIVE/BALANCED/FAST）；企业自定义为 null"},"organizationId":{"type":"string","nullable":true},"name":{"type":"string"},"description":{"type":"string","nullable":true},"kRatio":{"type":"number","format":"float"},"spareAccounts":{"type":"integer"},"shiftSizeFactor":{"type":"number","format":"float"},"restFactor":{"type":"number","format":"float"},"hourlyFactor":{"type":"number","format":"float"},"scrapesPerDay":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：单账号日采集上限；null 表示沿用平台基准"},"scrapesPerHour":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：单账号小时采集上限；null 表示沿用平台基准"},"burstSize":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：token bucket 瞬时桶容量；null 表示沿用平台基准"},"refillRatePerMin":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：每分钟令牌恢复数；null 表示沿用平台基准"},"maxPerTask":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：单账号单任务最大数量；null 表示沿用平台基准"},"minIntervalMs":{"type":"integer","minimum":0,"nullable":true,"description":"可选覆盖：两次请求最小间隔毫秒数；null 表示沿用平台基准"},"orgDailyBudget":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：企业日预算；null 表示沿用平台基准"},"consecutiveFailureThreshold":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：连续失败阈值；null 表示沿用平台基准"},"cooldownMinutes":{"type":"integer","minimum":0,"nullable":true,"description":"可选覆盖：风控冷却分钟数；null 表示沿用平台基准"},"shiftSize":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：基础班次大小；null 表示沿用平台基准"},"shiftRestMinutes":{"type":"integer","minimum":0,"nullable":true,"description":"可选覆盖：基础班次休息分钟数；null 表示沿用平台基准"},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"usedByTaskCount":{"type":"integer","description":"被多少 task 引用，UI 用来阻止删除"},"scope":{"type":"string","enum":["system_builtin","org_custom"]}},"required":["id","name","kRatio","spareAccounts","shiftSizeFactor","restFactor","hourlyFactor","enabled","createdAt","updatedAt","usedByTaskCount","scope"]},"PacePolicyList":{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/PacePolicy"}}},"required":["list"]},"PacePolicyCreateInput":{"type":"object","required":["name","kRatio","spareAccounts","shiftSizeFactor","restFactor","hourlyFactor"],"properties":{"name":{"type":"string","maxLength":50},"description":{"type":"string","maxLength":200,"nullable":true},"kRatio":{"type":"number","minimum":0.01,"maximum":1},"spareAccounts":{"type":"integer","minimum":0,"maximum":10},"shiftSizeFactor":{"type":"number","minimum":0.01,"maximum":5},"restFactor":{"type":"number","minimum":0.01,"maximum":5},"hourlyFactor":{"type":"number","minimum":0.01,"maximum":1},"scrapesPerDay":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：单账号日采集上限；null 表示沿用平台基准"},"scrapesPerHour":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：单账号小时采集上限；null 表示沿用平台基准"},"burstSize":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：token bucket 瞬时桶容量；null 表示沿用平台基准"},"refillRatePerMin":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：每分钟令牌恢复数；null 表示沿用平台基准"},"maxPerTask":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：单账号单任务最大数量；null 表示沿用平台基准"},"minIntervalMs":{"type":"integer","minimum":0,"nullable":true,"description":"可选覆盖：两次请求最小间隔毫秒数；null 表示沿用平台基准"},"orgDailyBudget":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：企业日预算；null 表示沿用平台基准"},"consecutiveFailureThreshold":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：连续失败阈值；null 表示沿用平台基准"},"cooldownMinutes":{"type":"integer","minimum":0,"nullable":true,"description":"可选覆盖：风控冷却分钟数；null 表示沿用平台基准"},"shiftSize":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：基础班次大小；null 表示沿用平台基准"},"shiftRestMinutes":{"type":"integer","minimum":0,"nullable":true,"description":"可选覆盖：基础班次休息分钟数；null 表示沿用平台基准"}}},"PacePolicyUpdateInput":{"type":"object","properties":{"name":{"type":"string","maxLength":50},"description":{"type":"string","maxLength":200,"nullable":true},"kRatio":{"type":"number","minimum":0.01,"maximum":1},"spareAccounts":{"type":"integer","minimum":0,"maximum":10},"shiftSizeFactor":{"type":"number","minimum":0.01,"maximum":5},"restFactor":{"type":"number","minimum":0.01,"maximum":5},"hourlyFactor":{"type":"number","minimum":0.01,"maximum":1},"scrapesPerDay":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：单账号日采集上限；null 表示沿用平台基准"},"scrapesPerHour":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：单账号小时采集上限；null 表示沿用平台基准"},"burstSize":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：token bucket 瞬时桶容量；null 表示沿用平台基准"},"refillRatePerMin":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：每分钟令牌恢复数；null 表示沿用平台基准"},"maxPerTask":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：单账号单任务最大数量；null 表示沿用平台基准"},"minIntervalMs":{"type":"integer","minimum":0,"nullable":true,"description":"可选覆盖：两次请求最小间隔毫秒数；null 表示沿用平台基准"},"orgDailyBudget":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：企业日预算；null 表示沿用平台基准"},"consecutiveFailureThreshold":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：连续失败阈值；null 表示沿用平台基准"},"cooldownMinutes":{"type":"integer","minimum":0,"nullable":true,"description":"可选覆盖：风控冷却分钟数；null 表示沿用平台基准"},"shiftSize":{"type":"integer","minimum":1,"nullable":true,"description":"可选覆盖：基础班次大小；null 表示沿用平台基准"},"shiftRestMinutes":{"type":"integer","minimum":0,"nullable":true,"description":"可选覆盖：基础班次休息分钟数；null 表示沿用平台基准"},"enabled":{"type":"boolean"}}},"SyncEndpoint":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"ownerUserId":{"type":"string","nullable":true},"name":{"type":"string"},"platformFilter":{"type":"array","items":{"type":"string","enum":["STARMAP","PGY","VIDEO_HUXUAN","MP_HUXUAN","BILIBILI_HUAHUO","KUAISHOU_JLJX"]},"nullable":true,"description":"为空表示全平台命中"},"url":{"type":"string"},"method":{"type":"string"},"headersJson":{"type":"object","additionalProperties":true,"nullable":true},"authType":{"type":"string","enum":["NONE","BEARER","BASIC","SIGNATURE"]},"authConfigJson":{"type":"object","additionalProperties":true,"nullable":true},"batchSize":{"type":"integer","enum":[1,5,10,50],"description":"单次推送的 blogger 数；缓冲达到此数或 200ms 软超时即触发 dispatch"},"retryCount":{"type":"integer"},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","organizationId","name","url","method","authType","batchSize","retryCount","enabled","createdAt","updatedAt"]},"SyncEndpointCreated":{"allOf":[{"$ref":"#/components/schemas/SyncEndpoint"},{"type":"object","properties":{"webhookSecret":{"type":"string","description":"HMAC-SHA256 共享密钥（64 字符 hex）— **仅创建时一次性返回**。请妥善保存；之后只能通过重置接口换发新密钥。"}},"required":["webhookSecret"]}]},"SyncEndpointCreateInput":{"type":"object","required":["name","url"],"properties":{"name":{"type":"string","maxLength":100},"platformFilter":{"type":"array","items":{"type":"string","enum":["STARMAP","PGY","VIDEO_HUXUAN","MP_HUXUAN","BILIBILI_HUAHUO","KUAISHOU_JLJX"]},"nullable":true,"description":"为空表示全平台命中"},"url":{"type":"string"},"method":{"type":"string","default":"POST"},"headersJson":{"type":"object","additionalProperties":true,"nullable":true},"authType":{"type":"string","enum":["NONE","BEARER","BASIC","SIGNATURE"],"default":"NONE"},"authConfigJson":{"type":"object","additionalProperties":true,"nullable":true},"batchSize":{"type":"integer","enum":[1,5,10,50],"default":1},"retryCount":{"type":"integer","minimum":0,"maximum":10,"default":3},"enabled":{"type":"boolean","default":true}}},"SyncEndpointUpdateInput":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"platformFilter":{"type":"array","items":{"type":"string","enum":["STARMAP","PGY","VIDEO_HUXUAN","MP_HUXUAN","BILIBILI_HUAHUO","KUAISHOU_JLJX"]},"nullable":true},"url":{"type":"string"},"method":{"type":"string"},"headersJson":{"type":"object","additionalProperties":true,"nullable":true},"authType":{"type":"string","enum":["NONE","BEARER","BASIC","SIGNATURE"]},"authConfigJson":{"type":"object","additionalProperties":true,"nullable":true},"batchSize":{"type":"integer","enum":[1,5,10,50]},"retryCount":{"type":"integer","minimum":0,"maximum":10},"enabled":{"type":"boolean"}}},"SyncEndpointList":{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/SyncEndpoint"}}},"required":["list"]},"SyncEndpointRun":{"type":"object","properties":{"id":{"type":"string"},"endpointId":{"type":"string"},"attempt":{"type":"integer","description":"第几次尝试（含 retry / 立即重推；首次=1）"},"status":{"type":"string","enum":["PENDING","RUNNING","SUCCESS","FAILED"]},"bloggerIds":{"type":"array","items":{"type":"string"},"description":"本批次推送的 Blogger.id 列表"},"failedBloggerIds":{"type":"array","items":{"type":"string"},"description":"失败的 Blogger.id 列表（成功时为空数组）"},"totalCount":{"type":"integer"},"successCount":{"type":"integer"},"failedCount":{"type":"integer"},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","format":"date-time","nullable":true},"lastError":{"type":"string","nullable":true}},"required":["id","endpointId","attempt","status","bloggerIds","failedBloggerIds","totalCount","successCount","failedCount","startedAt"]},"SyncEndpointRunList":{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/SyncEndpointRun"}},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}},"required":["list","hasMore"]},"SyncEndpointTestResult":{"type":"object","properties":{"ok":{"type":"boolean"},"status":{"type":"integer","nullable":true},"error":{"type":"string","nullable":true}},"required":["ok"]},"OrganizationDataModeUpdateInput":{"type":"object","required":["dataMode","confirmed"],"properties":{"dataMode":{"type":"string","enum":["CLOUD","LOCAL"]},"confirmed":{"type":"boolean"}}},"OrganizationInfo":{"type":"object","nullable":true,"description":"当前用户所属企业的轻量信息（仅 ACTIVE 状态返回，未入企业为 null）","properties":{"id":{"type":"string"},"name":{"type":"string"},"dataMode":{"type":"string","enum":["CLOUD","LOCAL"]},"role":{"type":"string","enum":["OWNER","MEMBER"]}},"required":["id","name","dataMode","role"]},"PermsAndMenusResponse":{"type":"object","properties":{"permissions":{"type":"array","description":"权限字符串列表；超管为 ['*']","items":{"type":"string"}},"menus":{"type":"array","description":"菜单树（带 children 的 Menu 节点）","items":{"$ref":"#/components/schemas/Menu"}},"organization":{"$ref":"#/components/schemas/OrganizationInfo"}},"required":["permissions","menus"]},"PlatformPolicy":{"type":"object","description":"平台采集策略（每平台一行，admin 编辑）","properties":{"id":{"type":"string"},"platform":{"type":"string","enum":["STARMAP","PGY","VIDEO_HUXUAN","MP_HUXUAN","BILIBILI_HUAHUO","KUAISHOU_JLJX"]},"acquisitionMode":{"type":"string","enum":["OFFICIAL_API","AUTH_EXPORT","MANUAL_ASSIST","DISABLED"],"description":"采集模式（由代码常量决定，**只读**；不接受 admin 编辑）"},"scrapesPerDay":{"type":"integer","description":"单账号日上限"},"scrapesPerHour":{"type":"integer","description":"单账号小时上限"},"burstSize":{"type":"integer","description":"令牌桶突发容量"},"refillRatePerMin":{"type":"integer","description":"令牌桶每分钟补充速率"},"maxPerTask":{"type":"integer","description":"单任务硬上限"},"minIntervalMs":{"type":"integer","description":"相邻两次采集最小间隔（毫秒）"},"orgDailyBudget":{"type":"integer","description":"企业级日预算"},"consecutiveFailureThreshold":{"type":"integer","description":"连续失败多少次进入 cooldown"},"cooldownMinutes":{"type":"integer","description":"cooldown 时长（分钟）"},"shiftSize":{"type":"integer","description":"单账号一个班次最多处理条数，达到后强制休息"},"shiftRestMinutes":{"type":"integer","description":"单账号班次结束后的休息分钟数"},"allowedFields":{"type":"array","items":{"type":"string"},"description":"允许采集的字段白名单（超出会被丢弃 + 写 AuditLog）"},"policySourceUrl":{"type":"string","nullable":true,"description":"该平台公开政策的来源 URL（admin 内部参考）"},"updatedById":{"type":"string","nullable":true},"updatedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","platform","acquisitionMode","scrapesPerDay","scrapesPerHour","burstSize","refillRatePerMin","maxPerTask","minIntervalMs","orgDailyBudget","consecutiveFailureThreshold","cooldownMinutes","shiftSize","shiftRestMinutes","allowedFields","updatedAt","createdAt"]},"UpdatePlatformPolicyInput":{"type":"object","description":"更新平台策略入参（仅 admin），所有字段可选，传入即更新；acquisitionMode 已下沉到代码常量，不可改","properties":{"scrapesPerDay":{"type":"integer","minimum":1},"scrapesPerHour":{"type":"integer","minimum":1},"burstSize":{"type":"integer","minimum":1},"refillRatePerMin":{"type":"integer","minimum":1},"maxPerTask":{"type":"integer","minimum":1},"minIntervalMs":{"type":"integer","minimum":0},"orgDailyBudget":{"type":"integer","minimum":1},"consecutiveFailureThreshold":{"type":"integer","minimum":1},"cooldownMinutes":{"type":"integer","minimum":0},"shiftSize":{"type":"integer","minimum":1},"shiftRestMinutes":{"type":"integer","minimum":0},"allowedFields":{"type":"array","items":{"type":"string"}},"policySourceUrl":{"type":"string","nullable":true,"maxLength":500}}},"BloggerImportAuditLog":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"platform":{"type":"string","enum":["STARMAP","PGY","VIDEO_HUXUAN","MP_HUXUAN","BILIBILI_HUAHUO","KUAISHOU_JLJX"]},"level":{"type":"string","enum":["INFO","WARNING","ERROR"]},"source":{"type":"string","enum":["MANUAL","IMPORT","SCRAPE","OPEN_API"]},"message":{"type":"string","description":"截断到 500 字以内"},"detailJson":{"description":"事件详情 JSON（如被丢弃字段列表）","nullable":true,"type":"object","additionalProperties":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","organizationId","platform","level","source","message","createdAt"]},"BloggerImportAuditLogList":{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#/components/schemas/BloggerImportAuditLog"}},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}},"required":["list","hasMore"]},"ScraperAccountUsageBatchItem":{"type":"object","required":["accountId","count"],"properties":{"accountId":{"type":"string"},"count":{"type":"integer","minimum":1,"description":"本批次该账号实际采集成功数"}}},"ScraperAccountUsageBatchInput":{"type":"object","required":["items"],"properties":{"items":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/ScraperAccountUsageBatchItem"}}}},"RecoverScraperAccountResponse":{"allOf":[{"$ref":"#/components/schemas/ScraperAccount"}],"description":"恢复成功后返回完整的 ScraperAccount（status=ACTIVE，cooldown/risk 字段已清空）"}}},"security":[{"bearerAuth":[]}],"paths":{},"tags":[]}