- database.ts: Use TaskStatus type instead of string for task.status in listPendingApprovals return type so it matches PendingApprovalRecord - convex-provider.tsx: Coerce undefined to null in getAccessToken return to match Convex UseAuth interface
Unified · Split
| @@ -21,7 +21,7 @@ function useConvexWorkosAuth() { · 20 unmodified lines | ||
| 21 | 21 | return { |
| 22 | 22 | isLoading: loading, |
| 23 | 23 | user, |
| 24 | − getAccessToken, | |
| 24 | + getAccessToken: async () => (await getAccessToken()) ?? null, | |
| 25 | 25 | }; |
| 26 | 26 | } |
| 27 | 27 | |
| @@ -3,6 +3,7 @@ import type { Doc } from "./_generated/dataModel"; · 2 unmodified lines | ||
| 3 | 3 | import type { MutationCtx, QueryCtx } from "./_generated/server"; |
| 4 | 4 | import { mutation, query } from "./_generated/server"; |
| 5 | 5 | import { ensureUniqueSlug } from "./lib/slug"; |
| 6 | +import type { TaskStatus } from "@executor/contracts"; | |
| 6 | 7 | |
| 7 | 8 | const DEFAULT_TIMEOUT_MS = 300_000; |
| 8 | 9 | type OrganizationRole = "owner" | "admin" | "member" | "billing_admin"; |
| @@ -558,7 +559,7 @@ export const listPendingApprovals = query({ · 549 unmodified lines | ||
| 558 | 559 | |
| 559 | 560 | const results: Array< |
| 560 | 561 | ReturnType<typeof mapApproval> & { |
| 561 | − task: { id: string; status: string; runtimeId: string; timeoutMs: number; createdAt: number }; | |
| 562 | + task: { id: string; status: TaskStatus; runtimeId: string; timeoutMs: number; createdAt: number }; | |
| 562 | 563 | } |
| 563 | 564 | > = []; |
| 564 | 565 | for (let i = 0; i < docs.length; i++) { |