(event: Y.Map<unknown>, at: string)
| 319 | } |
| 320 | |
| 321 | function getEventPreview(event: Y.Map<unknown>, at: string): Record<string, unknown> { |
| 322 | const source = event.get("source") |
| 323 | const sourceMap = source instanceof Y.Map ? source : null |
| 324 | return { |
| 325 | type: "action", |
| 326 | status: event.get("status") as OpenADEEventStatus, |
| 327 | sourceType: sourceMap?.get("type"), |
| 328 | sourceLabel: stringValue(sourceMap?.get("userLabel"), "Action"), |
| 329 | at, |
| 330 | } |
| 331 | } |
| 332 | |
| 333 | function getLastNonSnapshotEvent(taskDoc: Y.Doc): Y.Map<unknown> | null { |
| 334 | const order = taskDoc.getArray<string>("task:events:order").toArray() |
no test coverage detected