feat(api): embed slots with ov replica and public feed
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -188,8 +188,8 @@ export class OutboxSender {
|
||||
|
||||
/**
|
||||
* outbox 行 → SyncEvent 线格式。entityId 按实体类型取自不同位置:
|
||||
* album → albumId 列;photo → photoId 列;category/asset → 载荷内的
|
||||
* categoryId/assetId(outbox 表无此二列)。映射缺料抛错(fail-fast:
|
||||
* album → albumId 列;photo → photoId 列;category/asset/slot-state → 载荷内
|
||||
* 的 categoryId/assetId/slotId(outbox 表无此三列)。映射缺料抛错(fail-fast:
|
||||
* 本轮不推、不标记,错误日志暴露;cn 侧发射器按构造保证不缺料)。
|
||||
*/
|
||||
private toWireEvent(row: OutboxRow): SyncEventWire {
|
||||
@@ -204,6 +204,11 @@ export class OutboxSender {
|
||||
throw new Error(`outbox 事件 ${row.id}(${type})缺 photoId,无法推导 entityId`);
|
||||
}
|
||||
entityId = row.photoId;
|
||||
} else if (entityType === 'slot-state') {
|
||||
if (typeof payload.slotId !== 'string') {
|
||||
throw new Error(`outbox 事件 ${row.id}(${type})载荷缺 slotId,无法推导 entityId`);
|
||||
}
|
||||
entityId = payload.slotId;
|
||||
} else if (typeof payload.categoryId === 'string') {
|
||||
entityId = payload.categoryId;
|
||||
} else if (typeof payload.assetId === 'string') {
|
||||
|
||||
Reference in New Issue
Block a user