New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@clerk/types

Package Overview
Dependencies
Maintainers
9
Versions
2356
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clerk/types - npm Package Compare versions

Comparing version 3.22.0-staging.1 to 3.22.0

106

dist/appearance.d.ts

@@ -5,7 +5,7 @@ import * as CSS from 'csstype';

import { Web3Provider } from './web3';
declare type CSSProperties = CSS.PropertiesFallback<number | string>;
declare type CSSPropertiesWithMultiValues = {
type CSSProperties = CSS.PropertiesFallback<number | string>;
type CSSPropertiesWithMultiValues = {
[K in keyof CSSProperties]: CSSProperties[K];
};
declare type CSSPseudos = {
type CSSPseudos = {
[K in CSS.Pseudos as `&${K}`]?: CSSObject;

@@ -15,17 +15,17 @@ };

}
declare type UserDefinedStyle = string | CSSObject;
declare type Shade = '50' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
export declare type ColorScale<T = string> = Record<Shade, T>;
export declare type AlphaColorScale<T = string> = Record<'20' | Shade, T>;
export declare type ColorScaleWithRequiredBase<T = string> = Partial<ColorScale<T>> & {
type UserDefinedStyle = string | CSSObject;
type Shade = '50' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
export type ColorScale<T = string> = Record<Shade, T>;
export type AlphaColorScale<T = string> = Record<'20' | Shade, T>;
export type ColorScaleWithRequiredBase<T = string> = Partial<ColorScale<T>> & {
'500': T;
};
export declare type CssColorOrScale = string | ColorScaleWithRequiredBase;
export declare type CssColorOrAlphaScale = string | AlphaColorScale;
declare type CssColor = string | TransparentColor | BuiltInColors;
declare type CssLengthUnit = string;
declare type FontSmoothing = 'auto' | 'antialiased' | 'never';
declare type FontWeightNamedValue = CSS.Properties['fontWeight'];
declare type FontWeightNumericValue = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
declare type FontWeightScale = {
export type CssColorOrScale = string | ColorScaleWithRequiredBase;
export type CssColorOrAlphaScale = string | AlphaColorScale;
type CssColor = string | TransparentColor | BuiltInColors;
type CssLengthUnit = string;
type FontSmoothing = 'auto' | 'antialiased' | 'never';
type FontWeightNamedValue = CSS.Properties['fontWeight'];
type FontWeightNumericValue = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
type FontWeightScale = {
normal?: FontWeightNamedValue | FontWeightNumericValue;

@@ -35,17 +35,17 @@ medium?: FontWeightNamedValue | FontWeightNumericValue;

};
declare type WebSafeFont = 'Arial' | 'Brush Script MT' | 'Courier New' | 'Garamond' | 'Georgia' | 'Helvetica' | 'Tahoma' | 'Times New Roman' | 'Trebuchet MS' | 'Verdana';
export declare type FontFamily = string | WebSafeFont;
declare type LoadingState = 'loading';
declare type ErrorState = 'error';
declare type OpenState = 'open';
declare type ActiveState = 'active';
export declare type ElementState = LoadingState | ErrorState | OpenState | ActiveState;
declare type ControlState = ErrorState;
export declare type AlertId = 'danger' | 'warning';
export declare type FieldId = 'firstName' | 'lastName' | 'emailAddress' | 'phoneNumber' | 'password' | 'confirmPassword' | 'identifier' | 'username' | 'code' | 'name';
export declare type ProfileSectionId = 'profile' | 'username' | 'emailAddresses' | 'phoneNumbers' | 'connectedAccounts' | 'web3Wallets' | 'password' | 'mfa' | 'activeDevices' | 'organization-profile' | 'organization-danger';
export declare type ProfilePageId = 'account' | 'security' | 'organization-settings' | 'organization-members';
export declare type NavbarItemId = 'account' | 'security';
export declare type UserPreviewId = 'userButton' | 'personalWorkspace';
export declare type OrganizationPreviewId = 'organizationSwitcher';
type WebSafeFont = 'Arial' | 'Brush Script MT' | 'Courier New' | 'Garamond' | 'Georgia' | 'Helvetica' | 'Tahoma' | 'Times New Roman' | 'Trebuchet MS' | 'Verdana';
export type FontFamily = string | WebSafeFont;
type LoadingState = 'loading';
type ErrorState = 'error';
type OpenState = 'open';
type ActiveState = 'active';
export type ElementState = LoadingState | ErrorState | OpenState | ActiveState;
type ControlState = ErrorState;
export type AlertId = 'danger' | 'warning';
export type FieldId = 'firstName' | 'lastName' | 'emailAddress' | 'phoneNumber' | 'password' | 'confirmPassword' | 'identifier' | 'username' | 'code' | 'name';
export type ProfileSectionId = 'profile' | 'username' | 'emailAddresses' | 'phoneNumbers' | 'connectedAccounts' | 'web3Wallets' | 'password' | 'mfa' | 'activeDevices' | 'organization-profile' | 'organization-danger';
export type ProfilePageId = 'account' | 'security' | 'organization-settings' | 'organization-members';
export type NavbarItemId = 'account' | 'security';
export type UserPreviewId = 'userButton' | 'personalWorkspace';
export type OrganizationPreviewId = 'organizationSwitcher';
/**

@@ -56,3 +56,3 @@ * A type that describes the states and the ids that we will combine

*/
declare type ConfigOptions = {
type ConfigOptions = {
states: ElementState;

@@ -62,3 +62,3 @@ ids: string;

};
declare type WithOptions<Ids, States, Jsx> = {
type WithOptions<Ids, States, Jsx> = {
ids: Ids;

@@ -71,11 +71,11 @@ states: States;

*/
export declare type StateSelectors<E extends string, S extends ElementState | undefined = never> = S extends never ? never : `${E}__${S}`;
export type StateSelectors<E extends string, S extends ElementState | undefined = never> = S extends never ? never : `${E}__${S}`;
/**
* Create a type union consisting of the base element with all valid ids appended
*/
export declare type IdSelectors<E extends string, Id extends string | undefined = never> = Id extends never ? never : `${E}__${Id}`;
export type IdSelectors<E extends string, Id extends string | undefined = never> = Id extends never ? never : `${E}__${Id}`;
/**
* Create a type union consisting of all base, base+state, base+id, base+id+state combinations
*/
declare type ElementPartsKeys<Name extends string, Opts extends ConfigOptions> = StateSelectors<Name, Opts['states']> | IdSelectors<Name, Opts['ids']> | StateSelectors<IdSelectors<Name, Opts['ids']>, Opts['states']>;
type ElementPartsKeys<Name extends string, Opts extends ConfigOptions> = StateSelectors<Name, Opts['states']> | IdSelectors<Name, Opts['ids']> | StateSelectors<IdSelectors<Name, Opts['ids']>, Opts['states']>;
/**

@@ -85,7 +85,7 @@ * Create an object type mapping base elements and part combinations (base, base+state, base+id, base+id+state)

*/
declare type Selectors<RootElemName extends string, Opts extends ConfigOptions> = Partial<Record<RootElemName, UserDefinedStyle | Opts['jsx']>> | Partial<Record<ElementPartsKeys<RootElemName, Opts>, UserDefinedStyle>>;
type Selectors<RootElemName extends string, Opts extends ConfigOptions> = Partial<Record<RootElemName, UserDefinedStyle | Opts['jsx']>> | Partial<Record<ElementPartsKeys<RootElemName, Opts>, UserDefinedStyle>>;
/**
* Convert a kebab-cased key from ElementsConfig into a camelCased Elements key
*/
export declare type ElementObjectKey<K extends string> = K extends `${infer Parent}-${infer Rest}` ? `${Parent}${Capitalize<Rest>}` : K;
export type ElementObjectKey<K extends string> = K extends `${infer Parent}-${infer Rest}` ? `${Parent}${Capitalize<Rest>}` : K;
/**

@@ -96,3 +96,3 @@ * A map that describes the possible combinations we need to generate

*/
export declare type ElementsConfig = {
export type ElementsConfig = {
rootBox: WithOptions<never, never, never>;

@@ -281,6 +281,6 @@ card: WithOptions<never, never, never>;

};
export declare type Elements = {
export type Elements = {
[k in keyof ElementsConfig]: Selectors<ElementObjectKey<k> & string, ElementsConfig[k]>;
}[keyof ElementsConfig];
export declare type Variables = {
export type Variables = {
/**

@@ -383,7 +383,7 @@ * The primary color used throughout the components. Set this to your brand color.

};
export declare type BaseThemeTaggedType = {
export type BaseThemeTaggedType = {
__type: 'prebuilt_appearance';
};
export declare type BaseTheme = BaseThemeTaggedType;
export declare type Theme = {
export type BaseTheme = BaseThemeTaggedType;
export type Theme = {
/**

@@ -416,3 +416,3 @@ * A theme used as the base theme for the components.

};
export declare type Layout = {
export type Layout = {
/**

@@ -469,10 +469,10 @@ * Controls whether the logo will be rendered inside or outside the component card.

};
export declare type SignInTheme = Theme;
export declare type SignUpTheme = Theme;
export declare type UserButtonTheme = Theme;
export declare type UserProfileTheme = Theme;
export declare type OrganizationSwitcherTheme = Theme;
export declare type OrganizationProfileTheme = Theme;
export declare type CreateOrganizationTheme = Theme;
export declare type Appearance<T = Theme> = T & {
export type SignInTheme = Theme;
export type SignUpTheme = Theme;
export type UserButtonTheme = Theme;
export type UserProfileTheme = Theme;
export type OrganizationSwitcherTheme = Theme;
export type OrganizationProfileTheme = Theme;
export type CreateOrganizationTheme = Theme;
export type Appearance<T = Theme> = T & {
/**

@@ -479,0 +479,0 @@ * Theme overrides that only apply to the `<SignIn/>` component

@@ -1,5 +0,5 @@

export declare type FirstNameAttribute = 'first_name';
export declare type LastNameAttribute = 'last_name';
export declare type PasswordAttribute = 'password';
export declare type BirthdayAttribute = 'birthday';
export declare type GenderAttribute = 'gender';
export type FirstNameAttribute = 'first_name';
export type LastNameAttribute = 'last_name';
export type PasswordAttribute = 'password';
export type BirthdayAttribute = 'birthday';
export type GenderAttribute = 'gender';

@@ -11,8 +11,8 @@ import { Appearance, CreateOrganizationTheme, OrganizationProfileTheme, OrganizationSwitcherTheme, SignInTheme, SignUpTheme, UserButtonTheme, UserProfileTheme } from './appearance';

import { DeepPartial, DeepSnakeToCamel } from './utils';
export declare type InstanceType = 'production' | 'development';
export declare type ListenerCallback = (emission: Resources) => void;
export declare type UnsubscribeCallback = () => void;
export declare type BeforeEmitCallback = (session: ActiveSessionResource | null) => void | Promise<any>;
export declare type SignOutCallback = () => void | Promise<any>;
export declare type SignOutOptions = {
export type InstanceType = 'production' | 'development';
export type ListenerCallback = (emission: Resources) => void;
export type UnsubscribeCallback = () => void;
export type BeforeEmitCallback = (session: ActiveSessionResource | null) => void | Promise<any>;
export type SignOutCallback = () => void | Promise<any>;
export type SignOutOptions = {
/**

@@ -28,3 +28,3 @@ * Specify a specific session to sign out. Useful for

}
export declare type SetSession = (session: ActiveSessionResource | string | null, beforeEmit?: BeforeEmitCallback) => Promise<void>;
export type SetSession = (session: ActiveSessionResource | string | null, beforeEmit?: BeforeEmitCallback) => Promise<void>;
/**

@@ -323,3 +323,3 @@ * Main Clerk SDK object.

}
export declare type HandleOAuthCallbackParams = {
export type HandleOAuthCallbackParams = {
/**

@@ -351,4 +351,4 @@ * Full URL or path to navigate after successful sign up.

};
export declare type CustomNavigation = (to: string) => Promise<unknown> | void;
export declare type ClerkThemeOptions = DeepSnakeToCamel<DeepPartial<DisplayThemeJSON>>;
export type CustomNavigation = (to: string) => Promise<unknown> | void;
export type ClerkThemeOptions = DeepSnakeToCamel<DeepPartial<DisplayThemeJSON>>;
export interface ClerkOptions {

@@ -374,4 +374,4 @@ appearance?: Appearance;

}
export declare type RoutingStrategy = 'path' | 'hash' | 'virtual';
export declare type RedirectOptions = {
export type RoutingStrategy = 'path' | 'hash' | 'virtual';
export type RedirectOptions = {
/**

@@ -395,3 +395,3 @@ * Full URL or path to navigate after successful sign in.

};
export declare type SetActiveParams = {
export type SetActiveParams = {
/**

@@ -413,4 +413,4 @@ * The session resource or session id (string version) to be set as active.

};
export declare type SetActive = (params: SetActiveParams) => Promise<void>;
export declare type SignInProps = {
export type SetActive = (params: SetActiveParams) => Promise<void>;
export type SignInProps = {
routing?: RoutingStrategy;

@@ -430,3 +430,3 @@ path?: string;

} & RedirectOptions;
export declare type SignUpProps = {
export type SignUpProps = {
routing?: RoutingStrategy;

@@ -446,3 +446,3 @@ path?: string;

} & RedirectOptions;
export declare type UserProfileProps = {
export type UserProfileProps = {
routing?: RoutingStrategy;

@@ -458,3 +458,3 @@ path?: string;

};
export declare type OrganizationProfileProps = {
export type OrganizationProfileProps = {
routing?: RoutingStrategy;

@@ -474,3 +474,3 @@ path?: string;

};
export declare type CreateOrganizationProps = {
export type CreateOrganizationProps = {
routing?: RoutingStrategy;

@@ -490,3 +490,3 @@ path?: string;

};
export declare type UserButtonProps = {
export type UserButtonProps = {
/**

@@ -540,3 +540,3 @@ * Controls if the username is displayed next to the trigger button

};
export declare type OrganizationSwitcherProps = {
export type OrganizationSwitcherProps = {
/**

@@ -617,3 +617,3 @@ Controls the default state of the OrganizationSwitcher

}
export declare type CreateOrganizationInvitationParams = {
export type CreateOrganizationInvitationParams = {
emailAddress: string;

@@ -623,3 +623,3 @@ role: MembershipRole;

};
export declare type CreateBulkOrganizationInvitationParams = {
export type CreateBulkOrganizationInvitationParams = {
emailAddresses: string[];

@@ -626,0 +626,0 @@ role: MembershipRole;

import { DisplayThemeJSON } from './json';
import { ClerkResource } from './resource';
export declare type PreferredSignInStrategy = 'password' | 'otp';
export type PreferredSignInStrategy = 'password' | 'otp';
export interface DisplayConfigJSON {

@@ -5,0 +5,0 @@ object: 'display_config';

@@ -5,3 +5,3 @@ import { IdentificationLinkResource } from './identificationLink';

import { CreateMagicLinkFlowReturn, StartMagicLinkFlowParams, VerificationResource } from './verification';
export declare type PrepareEmailAddressVerificationParams = {
export type PrepareEmailAddressVerificationParams = {
strategy: EmailCodeStrategy;

@@ -12,3 +12,3 @@ } | {

};
export declare type AttemptEmailAddressVerificationParams = {
export type AttemptEmailAddressVerificationParams = {
code: string;

@@ -15,0 +15,0 @@ };

import { BackupCodeStrategy, EmailCodeStrategy, EmailLinkStrategy, OAuthStrategy, PasswordStrategy, PhoneCodeStrategy, TOTPStrategy, Web3Strategy } from './strategies';
export declare type EmailCodeFactor = {
export type EmailCodeFactor = {
strategy: EmailCodeStrategy;

@@ -7,3 +7,3 @@ emailAddressId: string;

};
export declare type EmailLinkFactor = {
export type EmailLinkFactor = {
strategy: EmailLinkStrategy;

@@ -13,3 +13,3 @@ emailAddressId: string;

};
export declare type PhoneCodeFactor = {
export type PhoneCodeFactor = {
strategy: PhoneCodeStrategy;

@@ -20,55 +20,55 @@ phoneNumberId: string;

};
export declare type Web3SignatureFactor = {
export type Web3SignatureFactor = {
strategy: Web3Strategy;
web3WalletId: string;
};
export declare type PasswordFactor = {
export type PasswordFactor = {
strategy: PasswordStrategy;
};
export declare type OauthFactor = {
export type OauthFactor = {
strategy: OAuthStrategy;
};
export declare type TOTPFactor = {
export type TOTPFactor = {
strategy: TOTPStrategy;
};
export declare type BackupCodeFactor = {
export type BackupCodeFactor = {
strategy: BackupCodeStrategy;
};
export declare type EmailCodeConfig = Omit<EmailCodeFactor, 'safeIdentifier'>;
export declare type EmailLinkConfig = Omit<EmailLinkFactor, 'safeIdentifier'> & {
export type EmailCodeConfig = Omit<EmailCodeFactor, 'safeIdentifier'>;
export type EmailLinkConfig = Omit<EmailLinkFactor, 'safeIdentifier'> & {
redirectUrl: string;
};
export declare type PhoneCodeConfig = Omit<PhoneCodeFactor, 'safeIdentifier'>;
export declare type Web3SignatureConfig = Web3SignatureFactor;
export declare type OAuthConfig = OauthFactor & {
export type PhoneCodeConfig = Omit<PhoneCodeFactor, 'safeIdentifier'>;
export type Web3SignatureConfig = Web3SignatureFactor;
export type OAuthConfig = OauthFactor & {
redirectUrl: string;
actionCompleteRedirectUrl: string;
};
export declare type PhoneCodeSecondFactorConfig = {
export type PhoneCodeSecondFactorConfig = {
strategy: PhoneCodeStrategy;
phoneNumberId?: string;
};
export declare type EmailCodeAttempt = {
export type EmailCodeAttempt = {
strategy: EmailCodeStrategy;
code: string;
};
export declare type PhoneCodeAttempt = {
export type PhoneCodeAttempt = {
strategy: PhoneCodeStrategy;
code: string;
};
export declare type PasswordAttempt = {
export type PasswordAttempt = {
strategy: PasswordStrategy;
password: string;
};
export declare type Web3Attempt = {
export type Web3Attempt = {
strategy: Web3Strategy;
signature: string;
};
export declare type TOTPAttempt = {
export type TOTPAttempt = {
strategy: TOTPStrategy;
code: string;
};
export declare type BackupCodeAttempt = {
export type BackupCodeAttempt = {
strategy: BackupCodeStrategy;
code: string;
};

@@ -1,5 +0,5 @@

export declare type UsernameIdentifier = 'username';
export declare type EmailAddressIdentifier = 'email_address';
export declare type PhoneNumberIdentifier = 'phone_number';
export declare type Web3WalletIdentifier = 'web3_wallet';
export declare type EmailAddressOrPhoneNumberIdentifier = 'email_address_or_phone_number';
export type UsernameIdentifier = 'username';
export type EmailAddressIdentifier = 'email_address';
export type PhoneNumberIdentifier = 'phone_number';
export type Web3WalletIdentifier = 'web3_wallet';
export type EmailAddressOrPhoneNumberIdentifier = 'email_address_or_phone_number';

@@ -293,3 +293,3 @@ /**

}
export declare type SignInFirstFactorJSON = CamelToSnake<SignInFirstFactor>;
export declare type SignInSecondFactorJSON = CamelToSnake<SignInSecondFactor>;
export type SignInFirstFactorJSON = CamelToSnake<SignInFirstFactor>;
export type SignInSecondFactorJSON = CamelToSnake<SignInSecondFactor>;

@@ -90,2 +90,2 @@ import { MembershipRole } from './organizationMembership';

}
export declare type OrganizationsJWTClaim = Record<string, MembershipRole>;
export type OrganizationsJWTClaim = Record<string, MembershipRole>;
import { type InstanceType } from './clerk';
export declare type PublishableKey = {
export type PublishableKey = {
frontendApi: string;
instanceType: InstanceType;
};
import { DeepPartial } from './utils';
export declare type LocalizationValue = string;
export type LocalizationValue = string;
/**

@@ -11,4 +11,4 @@ * A type containing all the possible localization keys the prebuilt Clerk components support.

*/
export declare type LocalizationResource = DeepPartial<_LocalizationResource>;
declare type _LocalizationResource = {
export type LocalizationResource = DeepPartial<_LocalizationResource>;
type _LocalizationResource = {
socialButtonsBlockButton: LocalizationValue;

@@ -15,0 +15,0 @@ dividerText: LocalizationValue;

@@ -8,25 +8,25 @@ import { OAuthStrategy } from './strategies';

}
export declare type FacebookOauthProvider = 'facebook';
export declare type GoogleOauthProvider = 'google';
export declare type HubspotOauthProvider = 'hubspot';
export declare type GithubOauthProvider = 'github';
export declare type TiktokOauthProvider = 'tiktok';
export declare type GitlabOauthProvider = 'gitlab';
export declare type DiscordOauthProvider = 'discord';
export declare type TwitterOauthProvider = 'twitter';
export declare type TwitchOauthProvider = 'twitch';
export declare type LinkedinOauthProvider = 'linkedin';
export declare type DropboxOauthProvider = 'dropbox';
export declare type AtlassianOauthProvider = 'atlassian';
export declare type BitbucketOauthProvider = 'bitbucket';
export declare type MicrosoftOauthProvider = 'microsoft';
export declare type NotionOauthProvider = 'notion';
export declare type AppleOauthProvider = 'apple';
export declare type LineOauthProvider = 'line';
export declare type InstagramOauthProvider = 'instagram';
export declare type CoinbaseOauthProvider = 'coinbase';
export declare type SpotifyOauthProvider = 'spotify';
export declare type XeroOauthProvider = 'xero';
export declare type BoxOauthProvider = 'box';
export declare type OAuthProvider = FacebookOauthProvider | GoogleOauthProvider | HubspotOauthProvider | GithubOauthProvider | TiktokOauthProvider | GitlabOauthProvider | DiscordOauthProvider | TwitterOauthProvider | TwitchOauthProvider | LinkedinOauthProvider | DropboxOauthProvider | AtlassianOauthProvider | BitbucketOauthProvider | MicrosoftOauthProvider | NotionOauthProvider | AppleOauthProvider | LineOauthProvider | InstagramOauthProvider | CoinbaseOauthProvider | SpotifyOauthProvider | XeroOauthProvider | BoxOauthProvider;
export type FacebookOauthProvider = 'facebook';
export type GoogleOauthProvider = 'google';
export type HubspotOauthProvider = 'hubspot';
export type GithubOauthProvider = 'github';
export type TiktokOauthProvider = 'tiktok';
export type GitlabOauthProvider = 'gitlab';
export type DiscordOauthProvider = 'discord';
export type TwitterOauthProvider = 'twitter';
export type TwitchOauthProvider = 'twitch';
export type LinkedinOauthProvider = 'linkedin';
export type DropboxOauthProvider = 'dropbox';
export type AtlassianOauthProvider = 'atlassian';
export type BitbucketOauthProvider = 'bitbucket';
export type MicrosoftOauthProvider = 'microsoft';
export type NotionOauthProvider = 'notion';
export type AppleOauthProvider = 'apple';
export type LineOauthProvider = 'line';
export type InstagramOauthProvider = 'instagram';
export type CoinbaseOauthProvider = 'coinbase';
export type SpotifyOauthProvider = 'spotify';
export type XeroOauthProvider = 'xero';
export type BoxOauthProvider = 'box';
export type OAuthProvider = FacebookOauthProvider | GoogleOauthProvider | HubspotOauthProvider | GithubOauthProvider | TiktokOauthProvider | GitlabOauthProvider | DiscordOauthProvider | TwitterOauthProvider | TwitchOauthProvider | LinkedinOauthProvider | DropboxOauthProvider | AtlassianOauthProvider | BitbucketOauthProvider | MicrosoftOauthProvider | NotionOauthProvider | AppleOauthProvider | LineOauthProvider | InstagramOauthProvider | CoinbaseOauthProvider | SpotifyOauthProvider | XeroOauthProvider | BoxOauthProvider;
export declare const OAUTH_PROVIDERS: OAuthProviderData[];

@@ -39,3 +39,3 @@ interface getOAuthProviderDataProps {

export declare function sortedOAuthProviders(sortingArray: OAuthStrategy[]): OAuthProviderData[];
export declare type AuthenticateWithRedirectParams = {
export type AuthenticateWithRedirectParams = {
/**

@@ -42,0 +42,0 @@ * One of the supported OAuth providers you can use to authenticate with, eg 'oauth_google'.

@@ -35,4 +35,4 @@ import { ClerkPaginationParams } from './api';

}
export declare type GetMembershipsParams = ClerkPaginationParams;
export declare type GetPendingInvitationsParams = ClerkPaginationParams;
export type GetMembershipsParams = ClerkPaginationParams;
export type GetPendingInvitationsParams = ClerkPaginationParams;
export interface AddMemberParams {

@@ -39,0 +39,0 @@ userId: string;

@@ -23,2 +23,2 @@ import { MembershipRole } from './organizationMembership';

}
export declare type OrganizationInvitationStatus = 'pending' | 'accepted' | 'revoked';
export type OrganizationInvitationStatus = 'pending' | 'accepted' | 'revoked';

@@ -24,5 +24,5 @@ import { OrganizationResource } from './organization';

}
export declare type MembershipRole = 'admin' | 'basic_member' | 'guest_member';
export declare type UpdateOrganizationMembershipParams = {
export type MembershipRole = 'admin' | 'basic_member' | 'guest_member';
export type UpdateOrganizationMembershipParams = {
role: MembershipRole;
};

@@ -5,10 +5,10 @@ import { IdentificationLinkResource } from './identificationLink';

import { VerificationResource } from './verification';
export declare type PhoneNumberVerificationStrategy = PhoneCodeStrategy;
export declare type PreparePhoneNumberVerificationParams = {
export type PhoneNumberVerificationStrategy = PhoneCodeStrategy;
export type PreparePhoneNumberVerificationParams = {
strategy: PhoneNumberVerificationStrategy;
};
export declare type AttemptPhoneNumberVerificationParams = {
export type AttemptPhoneNumberVerificationParams = {
code: string;
};
export declare type SetReservedForSecondFactorParams = {
export type SetReservedForSecondFactorParams = {
reserved: boolean;

@@ -15,0 +15,0 @@ };

@@ -1,2 +0,2 @@

export declare type ClerkResourceReloadParams = {
export type ClerkResourceReloadParams = {
rotatingTokenNonce?: string;

@@ -3,0 +3,0 @@ };

@@ -46,3 +46,3 @@ import { ActJWTClaim } from './jwt';

}
export declare type SessionStatus = 'abandoned' | 'active' | 'ended' | 'expired' | 'removed' | 'replaced' | 'revoked';
export type SessionStatus = 'abandoned' | 'active' | 'ended' | 'expired' | 'removed' | 'replaced' | 'revoked';
export interface PublicUserData {

@@ -55,3 +55,3 @@ firstName: string | null;

}
export declare type GetTokenOptions = {
export type GetTokenOptions = {
template?: string;

@@ -61,2 +61,2 @@ leewayInSeconds?: number;

};
export declare type GetToken = (options?: GetTokenOptions) => Promise<string | null>;
export type GetToken = (options?: GetTokenOptions) => Promise<string | null>;

@@ -29,6 +29,6 @@ import { BackupCodeAttempt, BackupCodeFactor, EmailCodeAttempt, EmailCodeConfig, EmailCodeFactor, EmailLinkConfig, EmailLinkFactor, OAuthConfig, OauthFactor, PasswordAttempt, PasswordFactor, PhoneCodeAttempt, PhoneCodeConfig, PhoneCodeFactor, PhoneCodeSecondFactorConfig, TOTPAttempt, TOTPFactor, Web3Attempt, Web3SignatureConfig, Web3SignatureFactor } from './factors';

}
export declare type SignInStatus = 'needs_identifier' | 'needs_first_factor' | 'needs_second_factor' | 'complete';
export declare type SignInIdentifier = UsernameIdentifier | EmailAddressIdentifier | PhoneNumberIdentifier | Web3WalletIdentifier;
export declare type SignInFirstFactor = EmailCodeFactor | EmailLinkFactor | PhoneCodeFactor | PasswordFactor | Web3SignatureFactor | OauthFactor;
export declare type SignInSecondFactor = PhoneCodeFactor | TOTPFactor | BackupCodeFactor;
export type SignInStatus = 'needs_identifier' | 'needs_first_factor' | 'needs_second_factor' | 'complete';
export type SignInIdentifier = UsernameIdentifier | EmailAddressIdentifier | PhoneNumberIdentifier | Web3WalletIdentifier;
export type SignInFirstFactor = EmailCodeFactor | EmailLinkFactor | PhoneCodeFactor | PasswordFactor | Web3SignatureFactor | OauthFactor;
export type SignInSecondFactor = PhoneCodeFactor | TOTPFactor | BackupCodeFactor;
export interface UserData {

@@ -39,8 +39,8 @@ firstName?: string;

}
export declare type SignInFactor = SignInFirstFactor | SignInSecondFactor;
export declare type PrepareFirstFactorParams = EmailCodeConfig | EmailLinkConfig | PhoneCodeConfig | Web3SignatureConfig | OAuthConfig;
export declare type AttemptFirstFactorParams = EmailCodeAttempt | PhoneCodeAttempt | PasswordAttempt | Web3Attempt;
export declare type PrepareSecondFactorParams = PhoneCodeSecondFactorConfig;
export declare type AttemptSecondFactorParams = PhoneCodeAttempt | TOTPAttempt | BackupCodeAttempt;
export declare type SignInCreateParams = ({
export type SignInFactor = SignInFirstFactor | SignInSecondFactor;
export type PrepareFirstFactorParams = EmailCodeConfig | EmailLinkConfig | PhoneCodeConfig | Web3SignatureConfig | OAuthConfig;
export type AttemptFirstFactorParams = EmailCodeAttempt | PhoneCodeAttempt | PasswordAttempt | Web3Attempt;
export type PrepareSecondFactorParams = PhoneCodeSecondFactorConfig;
export type AttemptSecondFactorParams = PhoneCodeAttempt | TOTPAttempt | BackupCodeAttempt;
export type SignInCreateParams = ({
strategy: OAuthStrategy;

@@ -73,3 +73,3 @@ redirectUrl: string;

}
export declare type SignInStrategy = PasswordStrategy | PhoneCodeStrategy | EmailCodeStrategy | EmailLinkStrategy | TicketStrategy | Web3Strategy | TOTPStrategy | BackupCodeStrategy | OAuthStrategy;
export type SignInStrategy = PasswordStrategy | PhoneCodeStrategy | EmailCodeStrategy | EmailLinkStrategy | TicketStrategy | Web3Strategy | TOTPStrategy | BackupCodeStrategy | OAuthStrategy;
export interface SignInJSON extends ClerkResourceJSON {

@@ -76,0 +76,0 @@ object: 'sign_in';

@@ -44,5 +44,5 @@ import { BirthdayAttribute, FirstNameAttribute, GenderAttribute, LastNameAttribute, PasswordAttribute } from './attributes';

}
export declare type SignUpStatus = 'missing_requirements' | 'complete' | 'abandoned';
export declare type SignUpField = SignUpAttributeField | SignUpIdentificationField;
export declare type PrepareVerificationParams = {
export type SignUpStatus = 'missing_requirements' | 'complete' | 'abandoned';
export type SignUpField = SignUpAttributeField | SignUpIdentificationField;
export type PrepareVerificationParams = {
strategy: EmailCodeStrategy;

@@ -61,3 +61,3 @@ } | {

};
export declare type AttemptVerificationParams = {
export type AttemptVerificationParams = {
strategy: EmailCodeStrategy;

@@ -72,6 +72,6 @@ code: string;

};
export declare type SignUpAttributeField = FirstNameAttribute | LastNameAttribute | PasswordAttribute | BirthdayAttribute | GenderAttribute;
export declare type SignUpVerifiableField = UsernameIdentifier | EmailAddressIdentifier | PhoneNumberIdentifier | EmailAddressOrPhoneNumberIdentifier | Web3WalletIdentifier;
export declare type SignUpIdentificationField = SignUpVerifiableField | OAuthStrategy;
export declare type SignUpCreateParams = Partial<{
export type SignUpAttributeField = FirstNameAttribute | LastNameAttribute | PasswordAttribute | BirthdayAttribute | GenderAttribute;
export type SignUpVerifiableField = UsernameIdentifier | EmailAddressIdentifier | PhoneNumberIdentifier | EmailAddressOrPhoneNumberIdentifier | Web3WalletIdentifier;
export type SignUpIdentificationField = SignUpVerifiableField | OAuthStrategy;
export type SignUpCreateParams = Partial<{
externalAccountStrategy: string;

@@ -87,3 +87,3 @@ externalAccountRedirectUrl: string;

} & SnakeToCamel<Record<SignUpAttributeField | SignUpVerifiableField, string>>>;
export declare type SignUpUpdateParams = SignUpCreateParams;
export type SignUpUpdateParams = SignUpCreateParams;
export interface SignUpVerificationsResource {

@@ -90,0 +90,0 @@ emailAddress: SignUpVerificationResource;

@@ -5,7 +5,7 @@ import { OrganizationJSON, SessionJSON, UserJSON } from './json';

import { UserResource } from './user';
export declare type ServerGetTokenOptions = {
export type ServerGetTokenOptions = {
template?: string;
};
export declare type ServerGetToken = (options?: ServerGetTokenOptions) => Promise<string | null>;
export declare type ServerSideAuth = {
export type ServerGetToken = (options?: ServerGetTokenOptions) => Promise<string | null>;
export type ServerSideAuth = {
sessionId: string | null;

@@ -17,3 +17,3 @@ userId: string | null;

};
declare type SsrSessionState<SessionType> = {
type SsrSessionState<SessionType> = {
sessionId: null;

@@ -25,3 +25,3 @@ session: null;

};
declare type SsrOrganizationState<OrganizationType> = {
type SsrOrganizationState<OrganizationType> = {
organization: null;

@@ -31,3 +31,3 @@ } | {

};
declare type SsrUserState<UserType> = {
type SsrUserState<UserType> = {
userId: null;

@@ -39,5 +39,5 @@ user: null;

};
export declare type SsrAuthData = SsrSessionState<SessionResource> & SsrUserState<UserResource>;
export declare type ClerkSsrState = SsrSessionState<SessionJSON> & SsrUserState<UserJSON>;
export declare type InitialState = {
export type SsrAuthData = SsrSessionState<SessionResource> & SsrUserState<UserResource>;
export type ClerkSsrState = SsrSessionState<SessionJSON> & SsrUserState<UserJSON>;
export type InitialState = {
user: undefined;

@@ -44,0 +44,0 @@ userId: undefined;

import { OAuthProvider } from './oauth';
import { Web3Provider } from './web3';
export declare type PasswordStrategy = 'password';
export declare type PhoneCodeStrategy = 'phone_code';
export declare type EmailCodeStrategy = 'email_code';
export declare type EmailLinkStrategy = 'email_link';
export declare type TicketStrategy = 'ticket';
export declare type TOTPStrategy = 'totp';
export declare type BackupCodeStrategy = 'backup_code';
export declare type OAuthStrategy = `oauth_${OAuthProvider}`;
export declare type Web3Strategy = `web3_${Web3Provider}_signature`;
export type PasswordStrategy = 'password';
export type PhoneCodeStrategy = 'phone_code';
export type EmailCodeStrategy = 'email_code';
export type EmailLinkStrategy = 'email_link';
export type TicketStrategy = 'ticket';
export type TOTPStrategy = 'totp';
export type BackupCodeStrategy = 'backup_code';
export type OAuthStrategy = `oauth_${OAuthProvider}`;
export type Web3Strategy = `web3_${Web3Provider}_signature`;

@@ -1,8 +0,8 @@

export declare type EmUnit = string;
export declare type FontWeight = string;
export declare type BoxShadow = string;
export declare type TransparentColor = 'transparent';
export declare type BuiltInColors = 'black' | 'blue' | 'red' | 'green' | 'grey' | 'white' | 'yellow';
export declare type HexColor = `#${string}`;
export declare type HslaColor = {
export type EmUnit = string;
export type FontWeight = string;
export type BoxShadow = string;
export type TransparentColor = 'transparent';
export type BuiltInColors = 'black' | 'blue' | 'red' | 'green' | 'grey' | 'white' | 'yellow';
export type HexColor = `#${string}`;
export type HslaColor = {
h: number;

@@ -13,3 +13,3 @@ s: number;

};
export declare type RgbaColor = {
export type RgbaColor = {
r: number;

@@ -20,6 +20,6 @@ g: number;

};
export declare type HexColorString = HexColor;
export declare type HslaColorString = `hsl(${string})` | `hsla(${string})`;
export declare type RgbaColorString = `rgb(${string})` | `rgba(${string})`;
export declare type Color = string | HexColor | HslaColor | RgbaColor | TransparentColor;
export declare type ColorString = HexColorString | HslaColorString | RgbaColorString;
export type HexColorString = HexColor;
export type HslaColorString = `hsl(${string})` | `hsla(${string})`;
export type RgbaColorString = `rgb(${string})` | `rgba(${string})`;
export type Color = string | HexColor | HslaColor | RgbaColor | TransparentColor;
export type ColorString = HexColorString | HslaColorString | RgbaColorString;

@@ -81,19 +81,19 @@ import { BackupCodeResource } from './backupCode';

}
export declare type CreateEmailAddressParams = {
export type CreateEmailAddressParams = {
email: string;
};
export declare type CreatePhoneNumberParams = {
export type CreatePhoneNumberParams = {
phoneNumber: string;
};
export declare type CreateWeb3WalletParams = {
export type CreateWeb3WalletParams = {
web3Wallet: string;
};
export declare type SetProfileImageParams = {
export type SetProfileImageParams = {
file: Blob | File | null;
};
export declare type VerifyTOTPParams = {
export type VerifyTOTPParams = {
code: string;
};
declare type UpdateUserJSON = Pick<UserJSON, 'username' | 'password' | 'first_name' | 'last_name' | 'primary_email_address_id' | 'primary_phone_number_id' | 'primary_web3_wallet_id' | 'unsafe_metadata'>;
export declare type UpdateUserParams = Partial<SnakeToCamel<UpdateUserJSON>>;
type UpdateUserJSON = Pick<UserJSON, 'username' | 'password' | 'first_name' | 'last_name' | 'primary_email_address_id' | 'primary_phone_number_id' | 'primary_web3_wallet_id' | 'unsafe_metadata'>;
export type UpdateUserParams = Partial<SnakeToCamel<UpdateUserJSON>>;
export {};
import { ClerkResourceJSON } from './json';
import { ClerkResource } from './resource';
import { OAuthStrategy, Web3Strategy } from './strategies';
declare type Attribute = 'email_address' | 'phone_number' | 'username' | 'first_name' | 'last_name' | 'password' | 'web3_wallet' | 'authenticator_app' | 'backup_code';
export declare type VerificationStrategy = 'email_link' | 'email_code' | 'phone_code' | 'totp' | 'backup_code';
export declare type OAuthProviderSettings = {
type Attribute = 'email_address' | 'phone_number' | 'username' | 'first_name' | 'last_name' | 'password' | 'web3_wallet' | 'authenticator_app' | 'backup_code';
export type VerificationStrategy = 'email_link' | 'email_code' | 'phone_code' | 'totp' | 'backup_code';
export type OAuthProviderSettings = {
enabled: boolean;

@@ -12,3 +12,3 @@ required: boolean;

};
export declare type AttributeData = {
export type AttributeData = {
enabled: boolean;

@@ -24,3 +24,3 @@ required: boolean;

};
export declare type SignInData = {
export type SignInData = {
second_factor: {

@@ -31,10 +31,10 @@ required: boolean;

};
export declare type SignUpData = {
export type SignUpData = {
allowlist_only: boolean;
progressive: boolean;
};
export declare type OAuthProviders = {
export type OAuthProviders = {
[provider in OAuthStrategy]: OAuthProviderSettings;
};
export declare type Attributes = {
export type Attributes = {
[attribute in Attribute]: AttributeData;

@@ -41,0 +41,0 @@ };

@@ -1,17 +0,17 @@

export declare type SnakeToCamel<T> = T extends `${infer A}_${infer B}` ? `${Uncapitalize<A>}${Capitalize<SnakeToCamel<B>>}` : T extends {} ? {
export type SnakeToCamel<T> = T extends `${infer A}_${infer B}` ? `${Uncapitalize<A>}${Capitalize<SnakeToCamel<B>>}` : T extends {} ? {
[K in keyof T as SnakeToCamel<K>]: T[K];
} : T;
export declare type DeepSnakeToCamel<T> = T extends `${infer A}_${infer B}` ? `${Uncapitalize<A>}${Capitalize<DeepSnakeToCamel<B>>}` : T extends {} ? {
export type DeepSnakeToCamel<T> = T extends `${infer A}_${infer B}` ? `${Uncapitalize<A>}${Capitalize<DeepSnakeToCamel<B>>}` : T extends {} ? {
[K in keyof T as DeepSnakeToCamel<K>]: DeepSnakeToCamel<T[K]>;
} : T;
export declare type DeepCamelToSnake<T> = T extends `${infer C0}${infer R}` ? `${C0 extends Uppercase<C0> ? '_' : ''}${Lowercase<C0>}${DeepCamelToSnake<R>}` : T extends {} ? {
export type DeepCamelToSnake<T> = T extends `${infer C0}${infer R}` ? `${C0 extends Uppercase<C0> ? '_' : ''}${Lowercase<C0>}${DeepCamelToSnake<R>}` : T extends {} ? {
[K in keyof T as DeepCamelToSnake<Extract<K, string>>]: DeepCamelToSnake<T[K]>;
} : T;
export declare type CamelToSnake<T> = T extends `${infer C0}${infer R}` ? `${C0 extends Uppercase<C0> ? '_' : ''}${Lowercase<C0>}${CamelToSnake<R>}` : T extends {} ? {
export type CamelToSnake<T> = T extends `${infer C0}${infer R}` ? `${C0 extends Uppercase<C0> ? '_' : ''}${Lowercase<C0>}${CamelToSnake<R>}` : T extends {} ? {
[K in keyof T as CamelToSnake<Extract<K, string>>]: T[K];
} : T;
export declare type DeepPartial<T> = {
export type DeepPartial<T> = {
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
};
export declare type DeepRequired<T> = Required<{
export type DeepRequired<T> = Required<{
[P in keyof T]: T[P] extends object | undefined ? DeepRequired<Required<T[P]>> : T[P];

@@ -22,7 +22,7 @@ }>;

*/
declare type PathImpl<T, Key extends keyof T> = Key extends string ? T[Key] extends Record<string, any> ? `${Key}.${PathImpl<T[Key], Exclude<keyof T[Key], keyof any[]>> & string}` | `${Key}.${Exclude<keyof T[Key], keyof any[]> & string}` : never : never;
type PathImpl<T, Key extends keyof T> = Key extends string ? T[Key] extends Record<string, any> ? `${Key}.${PathImpl<T[Key], Exclude<keyof T[Key], keyof any[]>> & string}` | `${Key}.${Exclude<keyof T[Key], keyof any[]> & string}` : never : never;
/**
* Internal type used by RecordToPath
*/
declare type PathImpl2<T> = PathImpl<T, keyof T> | keyof T;
type PathImpl2<T> = PathImpl<T, keyof T> | keyof T;
/**

@@ -34,3 +34,3 @@ * Used to construct a type union containing all the keys (even if nested) of an object defined as const

*/
export declare type RecordToPath<T> = PathImpl2<T> extends string | keyof T ? PathImpl2<T> : keyof T;
export type RecordToPath<T> = PathImpl2<T> extends string | keyof T ? PathImpl2<T> : keyof T;
/**

@@ -42,3 +42,3 @@ * Used to read the value of a string path inside an object defined as const

*/
export declare type PathValue<T, P extends RecordToPath<T>> = P extends `${infer Key}.${infer Rest}` ? Key extends keyof T ? Rest extends RecordToPath<T[Key]> ? PathValue<T[Key], Rest> : never : never : P extends keyof T ? T[P] : never;
export type PathValue<T, P extends RecordToPath<T>> = P extends `${infer Key}.${infer Rest}` ? Key extends keyof T ? Rest extends RecordToPath<T[Key]> ? PathValue<T[Key], Rest> : never : never : P extends keyof T ? T[P] : never;
export {};

@@ -13,3 +13,3 @@ import { ClerkAPIError } from './api';

}
export declare type VerificationStatus = 'unverified' | 'verified' | 'transferable' | 'failed' | 'expired';
export type VerificationStatus = 'unverified' | 'verified' | 'transferable' | 'failed' | 'expired';
export interface CodeVerificationAttemptParam {

@@ -23,9 +23,9 @@ code: string;

}
export declare type VerificationAttemptParams = CodeVerificationAttemptParam | SignatureVerificationAttemptParam;
export type VerificationAttemptParams = CodeVerificationAttemptParam | SignatureVerificationAttemptParam;
export interface StartMagicLinkFlowParams {
redirectUrl: string;
}
export declare type CreateMagicLinkFlowReturn<Params, Resource> = {
export type CreateMagicLinkFlowReturn<Params, Resource> = {
startMagicLinkFlow: (params: Params) => Promise<Resource>;
cancelMagicLinkFlow: () => void;
};

@@ -7,4 +7,4 @@ import { Web3Strategy } from './strategies';

}
export declare type MetamaskWeb3Provider = 'metamask';
export declare type Web3Provider = MetamaskWeb3Provider;
export type MetamaskWeb3Provider = 'metamask';
export type Web3Provider = MetamaskWeb3Provider;
export declare const WEB3_PROVIDERS: Web3ProviderData[];

@@ -11,0 +11,0 @@ interface getWeb3ProviderDataProps {

import { ClerkResource } from './resource';
import { Web3Strategy } from './strategies';
import { VerificationResource } from './verification';
export declare type PrepareWeb3WalletVerificationParams = {
export type PrepareWeb3WalletVerificationParams = {
strategy: Web3Strategy;
};
export declare type AttemptWeb3WalletVerificationParams = {
export type AttemptWeb3WalletVerificationParams = {
signature?: string;

@@ -21,3 +21,3 @@ /** @deprecated Use signature field instead */

}
export declare type GenerateSignature = (opts: GenerateSignatureParams) => Promise<string>;
export type GenerateSignature = (opts: GenerateSignatureParams) => Promise<string>;
export interface AuthenticateWithWeb3Params {

@@ -24,0 +24,0 @@ identifier: string;

{
"name": "@clerk/types",
"version": "3.22.0-staging.1",
"version": "3.22.0",
"license": "MIT",

@@ -51,3 +51,3 @@ "description": "Typings for Clerk libraries.",

},
"gitHead": "cadb0c29f4647cc41d196802f06c986d0822eb38"
"gitHead": "71419681190c0e0340322832bb6c01a1779074e5"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc