( _target: TargetShape, identity: Identity, organizationId: string, )
| 128 | /** Switch this account's active org; returns the identity scoped to it via |
| 129 | * the per-request org-selector header (no session mutation involved). */ |
| 130 | const switchOrg = ( |
| 131 | _target: TargetShape, |
| 132 | identity: Identity, |
| 133 | organizationId: string, |
| 134 | ): Effect.Effect<Identity> => |
| 135 | Effect.succeed({ |
| 136 | ...identity, |
| 137 | headers: { ...identity.headers, [ORG_SELECTOR_HEADER]: organizationId }, |
| 138 | }); |
| 139 | |
| 140 | /** The org this identity's session is currently bound to. */ |
| 141 | const activeOrganizationId = (target: TargetShape, identity: Identity) => |
no outgoing calls
no test coverage detected