feat: add self-operated analytics and enforce Lastleg module boundaries
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: Platform Self-operated Analytics Sync Commands
|
||||
version: 1.0.0
|
||||
paths:
|
||||
/api/platform/v1/last-leg/self-operated-analytics/sync-tasks:
|
||||
post:
|
||||
operationId: requestSelfoperatedAnalyticsSyncTask
|
||||
summary: 创建人工采集、复查、重建或恢复任务
|
||||
description: >-
|
||||
仅平台账号且须 platform:self-operated-analytics:sync 权限。命令先持久化,
|
||||
不在 HTTP 请求内运行历史采集。collectionMode 默认 OFF;VALIDATION 仅用于持久预算内的样本暂存,
|
||||
BUSINESS 仅允许生产环境,并要求真实出口取得服务端核验的人工独占许可。
|
||||
出库来源时间及业务时间统一 Asia/Shanghai;首次正式目标固定为 E0 前两个滚动月。
|
||||
BACKFILL 单片不超过一天。RETRY 使用 taskNo 和非空 reason 恢复原分仓逻辑任务,
|
||||
保留半归并屏障及旧尝试,拒绝验证会话复活、账号共享任务伪装单仓、有效执行租约及上游未齐;
|
||||
requestKey 同键异载荷拒绝。成功受理只表示排队,不表示采集或发布成功。
|
||||
security:
|
||||
- bearerAuth: []
|
||||
x-required-authorities:
|
||||
- platform:self-operated-analytics:sync
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/SyncCommand'
|
||||
responses:
|
||||
'200':
|
||||
description: 平台 ApiResponse 包络,成功 code 为字符串 200;返回稳定业务任务号与 ACCEPTED
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
code: { type: string }
|
||||
message: { type: string }
|
||||
data:
|
||||
type: object
|
||||
properties:
|
||||
taskNo: { type: string }
|
||||
warehouseCode: { type: string }
|
||||
status: { type: string, enum: [ACCEPTED] }
|
||||
'401': { description: 未认证 }
|
||||
'403': { description: 非平台身份或无独立写权限 }
|
||||
components:
|
||||
securitySchemes:
|
||||
bearerAuth: { type: http, scheme: bearer, bearerFormat: JWT }
|
||||
schemas:
|
||||
SyncCommand:
|
||||
type: object
|
||||
required: [requestKey, warehouseCode, action]
|
||||
properties:
|
||||
requestKey: { type: string, minLength: 1, maxLength: 100 }
|
||||
warehouseCode: { type: string, minLength: 1, maxLength: 64 }
|
||||
action: { type: string, enum: [INVENTORY, BACKFILL, RECHECK, REBUILD, RETRY, VALIDATION] }
|
||||
taskNo: { type: string, minLength: 1, maxLength: 64, description: RETRY 必填,原始分仓业务任务号 }
|
||||
reason: { type: string, minLength: 1, maxLength: 500, description: RETRY 必填,随操作人和原任务审计保存 }
|
||||
sourceFrom: { type: string, example: '2026-10-11T00:00:00' }
|
||||
sourceUntil: { type: string, example: '2026-10-12T00:00:00' }
|
||||
customerCode: { type: string, maxLength: 64, description: RECHECK 必填 }
|
||||
deliveryNo: { type: string, maxLength: 128, description: RECHECK 必填 }
|
||||
Reference in New Issue
Block a user