Skip to content

@masks/client

The BFF and browser-PKCE halves of @masks/client, generated from its TypeScript by ./dev reference. CI fails when this page and the source disagree.

Defined in: types.ts:99

new AccessDenied(
code,
description?,
status?
): AccessDenied;

Defined in: types.ts:87

Parameter Type
code string
description? string
status? number

AccessDenied

MasksError.constructor

Property Modifier Type Inherited from Defined in
code readonly string MasksError.code types.ts:83
description? readonly string MasksError.description types.ts:84
status? readonly number MasksError.status types.ts:85

Defined in: types.ts:98

new ConsentRequired(
code,
description?,
status?
): ConsentRequired;

Defined in: types.ts:87

Parameter Type
code string
description? string
status? number

ConsentRequired

MasksError.constructor

Property Modifier Type Inherited from Defined in
code readonly string MasksError.code types.ts:83
description? readonly string MasksError.description types.ts:84
status? readonly number MasksError.status types.ts:85

Defined in: types.ts:100

new InvalidGrant(
code,
description?,
status?
): InvalidGrant;

Defined in: types.ts:87

Parameter Type
code string
description? string
status? number

InvalidGrant

MasksError.constructor

Property Modifier Type Inherited from Defined in
code readonly string MasksError.code types.ts:83
description? readonly string MasksError.description types.ts:84
status? readonly number MasksError.status types.ts:85

Defined in: types.ts:102

new InvalidIssuer(
code,
description?,
status?
): InvalidIssuer;

Defined in: types.ts:87

Parameter Type
code string
description? string
status? number

InvalidIssuer

MasksError.constructor

Property Modifier Type Inherited from Defined in
code readonly string MasksError.code types.ts:83
description? readonly string MasksError.description types.ts:84
status? readonly number MasksError.status types.ts:85

Defined in: types.ts:101

new InvalidToken(
code,
description?,
status?
): InvalidToken;

Defined in: types.ts:87

Parameter Type
code string
description? string
status? number

InvalidToken

MasksError.constructor

Property Modifier Type Inherited from Defined in
code readonly string MasksError.code types.ts:83
description? readonly string MasksError.description types.ts:84
status? readonly number MasksError.status types.ts:85

Defined in: types.ts:97

new LoginRequired(
code,
description?,
status?
): LoginRequired;

Defined in: types.ts:87

Parameter Type
code string
description? string
status? number

LoginRequired

MasksError.constructor

Property Modifier Type Inherited from Defined in
code readonly string MasksError.code types.ts:83
description? readonly string MasksError.description types.ts:84
status? readonly number MasksError.status types.ts:85

Defined in: types.ts:82

  • Error
new MasksError(
code,
description?,
status?
): MasksError;

Defined in: types.ts:87

Parameter Type
code string
description? string
status? number

MasksError

Error.constructor
Property Modifier Type Defined in
code readonly string types.ts:83
description? readonly string types.ts:84
status? readonly number types.ts:85

Defined in: types.ts:22

Property Type Defined in
account_url? string types.ts:36
avatars? Avatars types.ts:30
email? string types.ts:27
email_verified? boolean types.ts:28
expires_at? number types.ts:35
name? string types.ts:25
nickname? string types.ts:26
organization? Organization types.ts:32
organizations? Organization[] types.ts:33
picture? string types.ts:29
scopes string[] types.ts:34
signed_in boolean types.ts:23
subject? string types.ts:24
tenant? Tenant types.ts:31

Defined in: actor.ts:3

Property Type Defined in
details string[] actor.ts:5
manager boolean actor.ts:7
name string actor.ts:4
organization Organization | null actor.ts:8
organizations Organization[] actor.ts:9
others Organization[] actor.ts:10
owner boolean actor.ts:12
role string | null actor.ts:11
unconfirmed boolean actor.ts:6

Defined in: browser.ts:43

Property Type Defined in
organization? string browser.ts:46
prompt? string browser.ts:45
returnTo? string browser.ts:44

Defined in: types.ts:9

Property Type Defined in
identicon string types.ts:11
initials string types.ts:12
photo string | null types.ts:10

Defined in: browser.ts:49

accessToken(): string | null;

Defined in: browser.ts:75

string | null

authorization(): string | null;

Defined in: browser.ts:77

string | null

authorize(options?): Promise<void>;

Defined in: browser.ts:52

Parameter Type
options? AuthorizeOptions

Promise<void>

authorizeUrl(options?): Promise<string>;

Defined in: browser.ts:53

Parameter Type
options? AuthorizeOptions

Promise<string>

avatars(): Avatars | null;

Defined in: browser.ts:65

Avatars | null

avatarUrl(subject, options?): Promise<string>;

Defined in: browser.ts:66

Parameter Type
subject string
options? { size?: number; style?: AvatarStyle; }
options.size? number
options.style? AvatarStyle

Promise<string>

callback(url?): Promise<{
identity: Claims | null;
returnTo: string;
tokens: Tokens;
}>;

Defined in: browser.ts:55

Parameter Type
url? string

Promise<{ identity: Claims | null; returnTo: string; tokens: Tokens; }>

discover(): Promise<Discovery>;

Defined in: browser.ts:51

Promise<Discovery>

expired(leeway?): boolean;

Defined in: browser.ts:78

Parameter Type
leeway? number

boolean

fetch(url, init?): Promise<Response>;

Defined in: browser.ts:73

Parameter Type
url string
init? RequestInit

Promise<Response>

freshAccessToken(leeway?): Promise<string | null>;

Defined in: browser.ts:72

Parameter Type
leeway? number

Promise<string | null>

identity(): Claims | null;

Defined in: browser.ts:58

Claims | null

logout(options?): Promise<void>;

Defined in: browser.ts:79

Parameter Type
options? LogoutOptions

Promise<void>

organization(): Organization | null;

Defined in: browser.ts:59

Organization | null

organizations(): Organization[];

Defined in: browser.ts:60

Organization[]

pending(): boolean;

Defined in: browser.ts:54

boolean

photo(subject?): Promise<Blob | null>;

Defined in: browser.ts:70

Parameter Type
subject? string

Promise<Blob | null>

proof(method, url): Promise<string | null>;

Defined in: browser.ts:74

Parameter Type
method string
url string

Promise<string | null>

ready(): Promise<Claims | null>;

Defined in: browser.ts:50

Promise<Claims | null>

refresh(): Promise<Tokens>;

Defined in: browser.ts:71

Promise<Tokens>

switchOrganization(key, options?): Promise<void>;

Defined in: browser.ts:61

Parameter Type
key string
options? Omit<AuthorizeOptions, "organization">

Promise<void>

tokens(): Tokens | null;

Defined in: browser.ts:76

Tokens | null


Defined in: browser.ts:18

Property Type Defined in
clientId? string browser.ts:20
dpop? boolean browser.ts:27
fetch? (input, init?) => Promise<Response> browser.ts:25
issuer string browser.ts:19
organization? string browser.ts:24
redirectUri? string browser.ts:21
resource? string | string[] browser.ts:23
scope? string | string[] browser.ts:22
storage? Storage browser.ts:26

Defined in: types.ts:51

[claim: string]: unknown
Property Type Defined in
org? Organization types.ts:52
orgs? Organization[] types.ts:53

Defined in: metadata.ts:9

Property Type Defined in
dpop? boolean metadata.ts:16
logoUri? string metadata.ts:15
name string metadata.ts:11
origin string metadata.ts:10
postLogoutRedirectUris? string[] metadata.ts:13
redirectUris? string[] metadata.ts:12
scope? string | string[] metadata.ts:14

Defined in: types.ts:67

[claim: string]: unknown
Property Type Defined in
authorization_endpoint string types.ts:69
avatar_endpoint? string types.ts:72
avatar_sizes_supported? number[] types.ts:74
avatar_styles_supported? AvatarStyle[] types.ts:73
end_session_endpoint? string types.ts:77
issuer string types.ts:68
jwks_uri? string types.ts:75
revocation_endpoint? string types.ts:76
tenant? Tenant types.ts:78
token_endpoint string types.ts:70
userinfo_endpoint? string types.ts:71

Defined in: jwt.ts:11

  • JsonWebKey
Property Type Defined in
kid? string jwt.ts:12

Defined in: session.ts:15

Property Type Defined in
organization? string session.ts:17
returnTo? string session.ts:16

Defined in: browser.ts:38

Property Type Defined in
everywhere? boolean browser.ts:39
postLogoutRedirectUri? string browser.ts:40

Defined in: types.ts:15

Property Type Defined in
id string types.ts:16
key string types.ts:17
name string types.ts:18
role string types.ts:19

Defined in: types.ts:39

Property Type Defined in
error string types.ts:41
handshake_url? string types.ts:43
login_url? string types.ts:42
signed_in false types.ts:40

Defined in: session.ts:20

avatarUrl(account, options?): string | null;

Defined in: session.ts:32

Parameter Type
account Account | null
options? { size?: number; style?: AvatarStyle; }
options.size? number
options.style? AvatarStyle

string | null

handshake(): void;

Defined in: session.ts:30

void

handshakeUrl(): string;

Defined in: session.ts:31

string

login(options?): void;

Defined in: session.ts:24

Parameter Type
options? LoginOptions

void

loginUrl(options?): string;

Defined in: session.ts:29

Parameter Type
options? LoginOptions

string

logout(options?): Promise<void>;

Defined in: session.ts:36

Parameter Type
options? { everywhere?: boolean; }
options.everywhere? boolean

Promise<void>

require(options?): Promise<Account>;

Defined in: session.ts:23

Parameter Type
options? LoginOptions

Promise<Account>

session(): Promise<Account | null>;

Defined in: session.ts:21

Promise<Account | null>

status(): Promise<Status>;

Defined in: session.ts:22

Promise<Status>

switchOrganization(key, options?): void;

Defined in: session.ts:25

Parameter Type
key string
options? Omit<LoginOptions, "organization">

void


Defined in: session.ts:9

Property Type Defined in
basePath? string session.ts:10
csrfToken? () => string | null session.ts:12
fetch? (input, init?) => Promise<Response> session.ts:11

Defined in: types.ts:1

Property Type Defined in
name? string types.ts:4
subdomain? string types.ts:3
uuid? string types.ts:2

Defined in: types.ts:57

Property Type Defined in
access_token string types.ts:58
expires_in number types.ts:63
id_token? string types.ts:59
obtained_at number types.ts:64
refresh_token? string types.ts:60
scope string types.ts:62
token_type string types.ts:61

Defined in: jwt.ts:15

Property Type Defined in
audience string jwt.ts:17
issuer string jwt.ts:16
keyFor (kid) => Promise<Jwk> jwt.ts:20
leeway? number jwt.ts:19
nonce string jwt.ts:18
type AvatarStyle = "photo" | "identicon" | "initials";

Defined in: types.ts:7


type Status =
| {
account: Account;
state: "signed_in";
}
| {
loginUrl: string;
state: "signed_out";
}
| {
handshakeUrl: string;
state: "handshake_required";
};

Defined in: types.ts:46

const CLIENT_PATH: "/oauth/client.json" = "/oauth/client.json";

Defined in: metadata.ts:1

function actorFrom(account): ActorInfo;

Defined in: actor.ts:15

Parameter Type
account Account

ActorInfo


function clientMetadata(options): Record<string, unknown>;

Defined in: metadata.ts:19

Parameter Type
options ClientMetadataOptions

Record<string, unknown>


function createBrowserClient(options): BrowserClient;

Defined in: browser.ts:82

Parameter Type
options BrowserOptions

BrowserClient


function createSession(options?): SessionClient;

Defined in: session.ts:59

Parameter Type
options? SessionOptions

SessionClient


function holdsRole(account, ...roles): boolean;

Defined in: actor.ts:42

Parameter Type
account Account
…roles string[]

boolean


function initials(name): string;

Defined in: actor.ts:48

Parameter Type
name string

string


function masksError(
code,
description?,
status?
): MasksError;

Defined in: types.ts:114

Parameter Type
code string
description? string
status? number

MasksError


function verifyIdToken(token, __namedParameters): Promise<Claims>;

Defined in: jwt.ts:51

Parameter Type
token string
__namedParameters VerifyOptions

Promise<Claims>