Skip to content
rw3iss Auth

NamespacesFlow

NamespacesFlow

Defined in: auth-client/src/core/flows/namespaces.flow.ts:28

Constructors

Constructor

new NamespacesFlow(deps): NamespacesFlow

Defined in: auth-client/src/core/flows/namespaces.flow.ts:31

Parameters

deps

FlowDeps

Returns

NamespacesFlow

Methods

addUserNamespace()

addUserNamespace(userId, namespace): Promise<void>

Defined in: auth-client/src/core/flows/namespaces.flow.ts:89

POST /admin/users/{userId}/namespaces — tag the user into an additional pool. Idempotent; tagging the home pool is rejected.

Parameters

userId

string

namespace

string

Returns

Promise<void>


getForUser()

getForUser(userId): Promise<UserNamespacesResponse>

Defined in: auth-client/src/core/flows/namespaces.flow.ts:61

GET /admin/users/{userId}/namespaces — the user’s home (default) pool + tag pools.

Parameters

userId

string

Returns

Promise<UserNamespacesResponse>


invalidate()

invalidate(): void

Defined in: auth-client/src/core/flows/namespaces.flow.ts:53

Drop the cached pool catalog (next list() refetches).

Returns

void


list()

list(opts?): Promise<NamespaceInfo[]>

Defined in: auth-client/src/core/flows/namespaces.flow.ts:38

GET /admin/namespaces — every known pool with user counts (home / tag / distinct total) + the app codes referencing it. Cached for 60s; mutations on this flow invalidate.

Parameters

opts?
forceRefresh?

boolean

Returns

Promise<NamespaceInfo[]>


removeUserNamespace()

removeUserNamespace(userId, namespace): Promise<void>

Defined in: auth-client/src/core/flows/namespaces.flow.ts:103

DELETE /admin/users/{userId}/namespaces/{namespace} — remove a pool tag. The home pool is refused — use setUserHome instead.

Parameters

userId

string

namespace

string

Returns

Promise<void>


setUserHome()

setUserHome(userId, namespace): Promise<void>

Defined in: auth-client/src/core/flows/namespaces.flow.ts:75

PUT /admin/users/{userId}/namespace — move the user’s default (home) pool. 409 when the email already exists in the target pool. A tag equal to the new home pool is cleaned up server-side.

Parameters

userId

string

namespace

string

Returns

Promise<void>