(
ownerWorkspaceId: string,
handleId: string,
mutator: (record: WorkspaceTurnTaskHandleRecord) => WorkspaceTurnTaskHandleRecord
)
| 132 | } |
| 133 | |
| 134 | async updateWorkspaceTurn( |
| 135 | ownerWorkspaceId: string, |
| 136 | handleId: string, |
| 137 | mutator: (record: WorkspaceTurnTaskHandleRecord) => WorkspaceTurnTaskHandleRecord |
| 138 | ): Promise<WorkspaceTurnTaskHandleRecord | null> { |
| 139 | assert(ownerWorkspaceId.trim().length > 0, "updateWorkspaceTurn requires ownerWorkspaceId"); |
| 140 | assert(handleId.trim().length > 0, "updateWorkspaceTurn requires handleId"); |
| 141 | const current = await this.getWorkspaceTurn(ownerWorkspaceId, handleId); |
| 142 | if (current == null) { |
| 143 | return null; |
| 144 | } |
| 145 | const next = mutator(current); |
| 146 | await this.upsertWorkspaceTurn(next); |
| 147 | return next; |
| 148 | } |
| 149 | |
| 150 | async getWorkspaceTurn( |
| 151 | ownerWorkspaceId: string, |
nothing calls this directly
no test coverage detected