- 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 | return { | 21 | return { |
| 22 | isLoading: loading, | 22 | isLoading: loading, |
| 23 | user, | 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 | import type { MutationCtx, QueryCtx } from "./_generated/server"; | 3 | import type { MutationCtx, QueryCtx } from "./_generated/server"; |
| 4 | import { mutation, query } from "./_generated/server"; | 4 | import { mutation, query } from "./_generated/server"; |
| 5 | import { ensureUniqueSlug } from "./lib/slug"; | 5 | import { ensureUniqueSlug } from "./lib/slug"; |
| 6 | import type { TaskStatus } from "@executor/contracts"; | ||
| 6 | 7 | ||
| 7 | const DEFAULT_TIMEOUT_MS = 300_000; | 8 | const DEFAULT_TIMEOUT_MS = 300_000; |
| 8 | type OrganizationRole = "owner" | "admin" | "member" | "billing_admin"; | 9 | type OrganizationRole = "owner" | "admin" | "member" | "billing_admin"; |
| @@ -558,7 +559,7 @@ export const listPendingApprovals = query({ · 549 unmodified lines | |||
| 558 | 559 | ||
| 559 | const results: Array< | 560 | const results: Array< |
| 560 | ReturnType<typeof mapApproval> & { | 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 | for (let i = 0; i < docs.length; i++) { | 565 | for (let i = 0; i < docs.length; i++) { |