* 1. CONTEXT * * This section defines the "contexts" that are available in the backend API. * * These allow you to access things when processing a request, like the database, the session, etc.
| 32 | */ |
| 33 | |
| 34 | interface CreateContextOptions { |
| 35 | user: |
| 36 | | (User & { |
| 37 | role: "member" | "admin" | "owner"; |
| 38 | ownerId: string; |
| 39 | enableEnterpriseFeatures: boolean; |
| 40 | isValidEnterpriseLicense: boolean; |
| 41 | }) |
| 42 | | null; |
| 43 | session: |
| 44 | | (Session & { activeOrganizationId: string; impersonatedBy?: string }) |
| 45 | | null; |
| 46 | req: CreateNextContextOptions["req"]; |
| 47 | res: CreateNextContextOptions["res"]; |
| 48 | } |
| 49 | |
| 50 | /** |
| 51 | * This helper generates the "internals" for a tRPC context. If you need to use it, you can export |
nothing calls this directly
no outgoing calls
no test coverage detected