(identity: Identity)
| 104 | /** The org selector this identity's requests carry — the same header the web |
| 105 | * client derives from the console URL's slug. */ |
| 106 | export const orgSelectorOf = (identity: Identity): string => { |
| 107 | const selector = identity.headers?.[ORG_SELECTOR_HEADER]; |
| 108 | if (!selector) throw new Error(`identity ${identity.label} carries no org selector header`); |
| 109 | return selector; |
| 110 | }; |
| 111 | |
| 112 | /** |
| 113 | * Invite `member` into `admin`'s org and accept — the real invite flow. The |