( _target: TargetShape, identity: Identity, organizationId: string, )
| 149 | /** Switch this account's active org; returns the identity scoped to it via |
| 150 | * the per-request org-selector header (no session mutation involved). */ |
| 151 | const switchOrg = ( |
| 152 | _target: TargetShape, |
| 153 | identity: Identity, |
| 154 | organizationId: string, |
| 155 | ): Effect.Effect<Identity> => |
| 156 | Effect.succeed({ |
| 157 | ...identity, |
| 158 | headers: { ...identity.headers, [ORG_SELECTOR_HEADER]: organizationId }, |
| 159 | }); |
| 160 | |
| 161 | /** The org this identity's requests are scoped to (selector header included, |
| 162 | * mirroring the web client). */ |
no outgoing calls
no test coverage detected