auth/invite_schema.ts

Invite types and client-safe schemas.

Defines the runtime types for the invite system: invite creation, matching, and claiming.

view source

Declarations
#

4 declarations

CreateInviteInput
#

auth/invite_schema.ts view source

CreateInviteInput import type {CreateInviteInput} from '@fuzdev/fuz_app/auth/invite_schema.js';

Input for creating an invite.

email?

type string | null

username?

type string | null

created_by

type Branded | null

Invite
#

auth/invite_schema.ts view source

Invite import type {Invite} from '@fuzdev/fuz_app/auth/invite_schema.js';

Invite row from the database.

id

type Branded

email

type string | null

username

type string | null

claimed_by

type Branded | null

claimed_at

type string | null

created_at

type string

created_by

type Branded | null

InviteJson
#

auth/invite_schema.ts view source

value + type

{ id: Branded<string, "Uuid">; created_at: string; username: string | null; email: string | null; claimed_by: Branded<string, "Uuid"> | null; claimed_at: string | null; created_by: Branded<...> | null; } import {InviteJson} from '@fuzdev/fuz_app/auth/invite_schema.js';

Client-safe invite data, a @fuzdev/fuz_schema schema. Its username is UsernameCanonical, the lowercase every creation path stores.

id

type Branded

created_at

type string

username

type string | null

email

type string | null

claimed_by

type Branded | null

claimed_at

type string | null

created_by

type Branded | null

InviteWithUsernamesJson
#

auth/invite_schema.ts view source

value + type

{ id: Branded<string, "Uuid">; created_at: string; username: string | null; email: string | null; claimed_by: Branded<string, "Uuid"> | null; claimed_at: string | null; created_by: Branded<...> | null; created_by_username: string | null; claimed_by_username: string | null; } import {InviteWithUsernamesJson} from '@fuzdev/fuz_app/auth/invite_schema.js';

Invite data with resolved creator/claimer usernames, a @fuzdev/fuz_schema schema. The resolved names are plain strings.

id

type Branded

created_at

type string

username

type string | null

email

type string | null

claimed_by

type Branded | null

claimed_at

type string | null

created_by

type Branded | null

created_by_username

type string | null

claimed_by_username

type string | null

Depends on
#

Imported by
#