* Minimal thread record matching the platform `/threads` list payload, with * sensible defaults so tests only specify the fields they assert on.
(
overrides: Partial<{
id: string;
organizationId: string;
agentId: string;
createdById: string;
name: string | null;
archived: boolean;
createdAt: string;
updatedAt: string;
lastRunAt: string;
}>,
)
| 13 | * sensible defaults so tests only specify the fields they assert on. |
| 14 | */ |
| 15 | function threadRecord( |
| 16 | overrides: Partial<{ |
| 17 | id: string; |
| 18 | organizationId: string; |
| 19 | agentId: string; |
| 20 | createdById: string; |
| 21 | name: string | null; |
| 22 | archived: boolean; |
| 23 | createdAt: string; |
| 24 | updatedAt: string; |
| 25 | lastRunAt: string; |
| 26 | }>, |
| 27 | ): Record<string, unknown> { |
| 28 | return { |
| 29 | id: "t-1", |
| 30 | organizationId: "org-1", |
| 31 | agentId: "agent-1", |
| 32 | createdById: "user-1", |
| 33 | name: null, |
| 34 | archived: false, |
| 35 | createdAt: "2024-01-01T00:00:00.000Z", |
| 36 | updatedAt: "2024-01-01T00:00:00.000Z", |
| 37 | ...overrides, |
| 38 | }; |
| 39 | } |
| 40 | |
| 41 | /** Builds a Response-like object accepted by rxjs `fromFetch`. */ |
| 42 | function jsonResponse(body: unknown, init?: { ok?: boolean; status?: number }) { |
no outgoing calls
no test coverage detected
searching dependent graphs…