lib/auth/types
Interfaces
'Read the “', Interfaces, '” section'ExpiringBucket
'Read the “', ExpiringBucket, '” section'Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:77
Represents a bucket with an expiration mechanism.
ExpiringBucket
Properties
'Read the “', Properties, '” section'count: number;
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:78
The number of items in the bucket.
createdAt
'Read the “', createdAt, '” section'createdAt: number;
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:79
The timestamp when the bucket was created.
OAuthAccountsTable
'Read the “', OAuthAccountsTable, '” section'Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:16
Represents a table of OAuth accounts.
OAuthAccountsTable
tsOAuthAccountsSelect
Properties
'Read the “', Properties, '” section'provider: string;
The name of the OAuth provider (e.g., Google, Facebook).
Inherited from
'Read the “', Inherited from, '” section'tsOAuthAccountsSelect.provider
providerUserId
'Read the “', providerUserId, '” section'providerUserId: string;
The unique identifier for the user provided by the OAuth provider.
Inherited from
'Read the “', Inherited from, '” section'tsOAuthAccountsSelect.providerUserId
userId: string;
The unique identifier for the user within the application.
Inherited from
'Read the “', Inherited from, '” section'tsOAuthAccountsSelect.userId
PermissionsTable
'Read the “', PermissionsTable, '” section'Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:24
Interface representing a table of user permissions.
tsPermissionsSelect
Properties
'Read the “', Properties, '” section'rank: string;
The rank or role assigned to the user.
Inherited from
'Read the “', Inherited from, '” section'tsPermissionsSelect.rank
user: string;
The username of the individual.
Inherited from
'Read the “', Inherited from, '” section'tsPermissionsSelect.user
RefillBucket
'Read the “', RefillBucket, '” section'Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:65
Represents an individual refillable token bucket.
RefillBucket
Properties
'Read the “', Properties, '” section'count: number;
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:66
The current token count in the bucket.
refilledAt
'Read the “', refilledAt, '” section'refilledAt: number;
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:67
The last timestamp when tokens were refilled.
ThrottlingCounter
'Read the “', ThrottlingCounter, '” section'Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:88
Interface representing a throttling counter.
Properties
'Read the “', Properties, '” section'timeout: number;
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:89
The duration (in milliseconds) for which the throttling is applied.
updatedAt
'Read the “', updatedAt, '” section'updatedAt: number;
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:90
The timestamp (in milliseconds since epoch) when the throttling counter was last updated.
Type Aliases
'Read the “', Type Aliases, '” section'SessionValidationResult
'Read the “', SessionValidationResult, '” section'type SessionValidationResult = | UserSession | { session: null; user: null;};
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:56
Represents the result of a session validation.
This type can either be a valid UserSession
or an object indicating
an invalid session with both session
and user
properties set to null
.
UserSession
'Read the “', UserSession, '” section'type UserSession = { session: tsSessionTableSelect; user: tsUsersSelect;};
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:45
Represents a user session which includes user information and session details.
Type declaration
'Read the “', Type declaration, '” section'session: tsSessionTableSelect;
user: tsUsersSelect;
UserSessionData
'Read the “', UserSessionData, '” section'type UserSessionData = { isLoggedIn: boolean; permissionLevel: "owner" | "admin" | "editor" | "visitor" | "unknown"; user: tsUsersSelect | null;};
Defined in: studiocms/packages/studiocms/src/lib/auth/types.ts:33
Represents the session data for a user.
Type declaration
'Read the “', Type declaration, '” section'isLoggedIn
'Read the “', isLoggedIn, '” section'isLoggedIn: boolean;
permissionLevel
'Read the “', permissionLevel, '” section'permissionLevel: "owner" | "admin" | "editor" | "visitor" | "unknown";
user: tsUsersSelect | null;