Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@clerk/types

Package Overview
Dependencies
Maintainers
9
Versions
2121
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 2.0.0-alpha.3 to 2.0.0-alpha.4

37

dist/clerk.d.ts

@@ -244,10 +244,2 @@ import { EnvironmentResource } from '.';

signUpUrl?: string;
/**
* @deprecated Use {@link SignInProps.afterSignInUrl} instead;
*/
afterSignIn?: string | null;
/**
* @deprecated Use {@link SignInProps.signUpUrl} instead;
*/
signUpURL?: string;
} & RedirectOptions;

@@ -262,10 +254,2 @@ export declare type SignUpProps = {

signInUrl?: string;
/**
* @deprecated Use {@link SignUpProps.afterSignUpUrl} instead;
*/
afterSignUp?: string | null;
/**
* @deprecated Use {@link SignUpProps.signInUrl} instead;
*/
signInURL?: string;
} & RedirectOptions;

@@ -303,21 +287,2 @@ export declare type UserProfileProps = {

afterSwitchSessionUrl?: string;
/**
* @deprecated Use {@link UserButtonProps.afterSwitchSessionUrl} instead;
*/
afterSwitchSession?: string;
/**
* @deprecated Use {@link UserButtonProps.userProfileUrl} instead;
*/
userProfileURL?: string;
/**
* @deprecated Use {@link UserButtonProps.signInUrl} instead;
*/ signInURL?: string;
/**
* @deprecated Use {@link UserButtonProps.afterSignOutAllUrl} instead;
*/
afterSignOutAll?: string;
/**
* @deprecated Use {@link UserButtonProps.afterSignOutOneUrl} instead;
*/
afterSignOutOne?: string;
};

@@ -339,3 +304,3 @@ export interface HandleMagicLinkVerificationParams {

*/
onVerifiedOnOtherDevice?: Function;
onVerifiedOnOtherDevice?: () => void;
}

@@ -342,0 +307,0 @@ export interface AuthenticateWithMetamaskParams {

@@ -1,11 +0,3 @@

export declare type OAuthProvider = 'facebook' | 'google' | 'hubspot' | 'github' | 'tiktok' | 'gitlab' | 'discord' | 'twitter' | 'twitch';
export declare type OAuthProvider = 'facebook' | 'google' | 'hubspot' | 'github' | 'tiktok' | 'gitlab' | 'discord' | 'twitter' | 'twitch' | 'linkedin';
export declare type OAuthStrategy = `oauth_${OAuthProvider}`;
/**
* @deprecated `OAuthCallbacks` has been deprecated and will be removed soon.
* Use {@link AuthenticateWithRedirectParams}, SignIn.authenticateWithRedirect() or SignUp.authenticateWithRedirect() instead.
*/
export declare type OAuthCallbacks = {
callbackUrl: string;
callbackUrlComplete: string;
};
export declare type AuthenticateWithRedirectParams = {

@@ -16,3 +8,3 @@ /**

strategy: OAuthStrategy;
} & ({
} & {
/**

@@ -28,18 +20,3 @@ * Full URL or path to the route that will complete the OAuth flow.

redirectUrlComplete: string;
callbackUrl?: never;
callbackUrlComplete?: never;
} | {
/**
* @deprecated `callbackUrl` has been deprecated and will be removed soon.
* Use {@link AuthenticateWithRedirectParams.redirectUrl} instead.
*/
callbackUrl: string;
/**
* @deprecated `callbackUrlComplete` has been deprecated and will be removed soon.
* Use {@link AuthenticateWithRedirectParams.redirectUrlComplete} instead.
*/
callbackUrlComplete: string;
redirectUrl?: never;
redirectUrlComplete?: never;
});
};
//# sourceMappingURL=oauth.d.ts.map

@@ -14,6 +14,2 @@ import { ClerkResource } from './resource';

remove: () => Promise<SessionResource>;
/**
* `revoke` has been deprecated and will be removed soon.
*/
revoke: () => Promise<SessionResource>;
touch: () => Promise<SessionResource>;

@@ -20,0 +16,0 @@ getToken: (options?: GetSessionTokenOptions) => Promise<string>;

1

dist/token.d.ts

@@ -11,2 +11,3 @@ import { JWT } from './jwt';

throwOnError?: boolean;
skipCache?: boolean;
};

@@ -13,0 +14,0 @@ export interface TokenResource extends ClerkResource {

@@ -7,3 +7,2 @@ import { EmailAddressResource } from './emailAddress';

import { SessionWithActivitiesResource } from './session';
import { JWTService, GetUserTokenOptions } from './token';
import { ImageResource } from './image';

@@ -39,3 +38,2 @@ import { SnakeToCamel } from './utils';

isPrimaryIdentification: (ident: EmailAddressResource | PhoneNumberResource) => boolean;
getToken: (service: JWTService, options?: GetUserTokenOptions) => Promise<string>;
getSessions: () => Promise<SessionWithActivitiesResource[]>;

@@ -42,0 +40,0 @@ setProfileImage: (file: Blob | File) => Promise<ImageResource>;

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

export interface StartMagicLinkFlowParams {
redirectUrl?: string;
/**
* @deprecated Use {@link StartMagicLinkFlowParams.redirectUrl} instead.
*/
callbackUrl?: string;
redirectUrl: string;
}

@@ -31,0 +27,0 @@ export declare type CreateMagicLinkFlowReturn<Params, Resource> = {

{
"name": "@clerk/types",
"version": "2.0.0-alpha.3",
"version": "2.0.0-alpha.4",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Clerk.dev Types",

@@ -10,3 +10,5 @@ import { EnvironmentResource } from '.';

export type UnsubscribeCallback = () => void;
export type BeforeEmitCallback = (session: ActiveSessionResource | null) => void | Promise<any>;
export type BeforeEmitCallback = (
session: ActiveSessionResource | null,
) => void | Promise<any>;
export type SignOutCallback = () => void | Promise<any>;

@@ -112,3 +114,6 @@

*/
mountUserButton: (targetNode: HTMLDivElement, userButtonProps?: UserButtonProps) => void;
mountUserButton: (
targetNode: HTMLDivElement,
userButtonProps?: UserButtonProps,
) => void;

@@ -129,3 +134,6 @@ /**

*/
mountUserProfile: (targetNode: HTMLDivElement, userProfileProps?: UserProfileProps) => void;
mountUserProfile: (
targetNode: HTMLDivElement,
userProfileProps?: UserProfileProps,
) => void;

@@ -211,3 +219,5 @@ /**

*/
authenticateWithMetamask: (params?: AuthenticateWithMetamaskParams) => Promise<unknown>;
authenticateWithMetamask: (
params?: AuthenticateWithMetamaskParams,
) => Promise<unknown>;

@@ -262,3 +272,5 @@ /**

polling?: boolean;
selectInitialSession?: (client: ClientResource) => ActiveSessionResource | null;
selectInitialSession?: (
client: ClientResource,
) => ActiveSessionResource | null;
theme?: ClerkThemeOptions;

@@ -313,12 +325,2 @@ }

signUpUrl?: string;
/**
* @deprecated Use {@link SignInProps.afterSignInUrl} instead;
*/
afterSignIn?: string | null;
/**
* @deprecated Use {@link SignInProps.signUpUrl} instead;
*/
signUpURL?: string;
} & RedirectOptions;

@@ -342,12 +344,2 @@

signInUrl?: string;
/**
* @deprecated Use {@link SignUpProps.afterSignUpUrl} instead;
*/
afterSignUp?: string | null;
/**
* @deprecated Use {@link SignUpProps.signInUrl} instead;
*/
signInURL?: string;
} & RedirectOptions;

@@ -411,26 +403,2 @@

afterSwitchSessionUrl?: string;
/**
* @deprecated Use {@link UserButtonProps.afterSwitchSessionUrl} instead;
*/
afterSwitchSession?: string;
/**
* @deprecated Use {@link UserButtonProps.userProfileUrl} instead;
*/
userProfileURL?: string;
/**
* @deprecated Use {@link UserButtonProps.signInUrl} instead;
*/ signInURL?: string;
/**
* @deprecated Use {@link UserButtonProps.afterSignOutAllUrl} instead;
*/
afterSignOutAll?: string;
/**
* @deprecated Use {@link UserButtonProps.afterSignOutOneUrl} instead;
*/
afterSignOutOne?: string;
};

@@ -453,3 +421,3 @@

*/
onVerifiedOnOtherDevice?: Function;
onVerifiedOnOtherDevice?: () => void;
}

@@ -456,0 +424,0 @@

@@ -10,15 +10,7 @@ export type OAuthProvider =

| 'twitter'
| 'twitch';
| 'twitch'
| 'linkedin';
export type OAuthStrategy = `oauth_${OAuthProvider}`;
/**
* @deprecated `OAuthCallbacks` has been deprecated and will be removed soon.
* Use {@link AuthenticateWithRedirectParams}, SignIn.authenticateWithRedirect() or SignUp.authenticateWithRedirect() instead.
*/
export type OAuthCallbacks = {
callbackUrl: string;
callbackUrlComplete: string;
};
export type AuthenticateWithRedirectParams = {

@@ -29,31 +21,13 @@ /**

strategy: OAuthStrategy;
} & (
| {
/**
* Full URL or path to the route that will complete the OAuth flow.
* Typically, this will be a simple `/sso-callback` route that calls `Clerk.handleRedirectCallback`
* or mounts the <AuthenticateWithRedirectCallback /> component.
*/
redirectUrl: string;
/**
* Full URL or path to navigate after the OAuth flow completes.
*/
redirectUrlComplete: string;
callbackUrl?: never;
callbackUrlComplete?: never;
}
| {
/**
* @deprecated `callbackUrl` has been deprecated and will be removed soon.
* Use {@link AuthenticateWithRedirectParams.redirectUrl} instead.
*/
callbackUrl: string;
/**
* @deprecated `callbackUrlComplete` has been deprecated and will be removed soon.
* Use {@link AuthenticateWithRedirectParams.redirectUrlComplete} instead.
*/
callbackUrlComplete: string;
redirectUrl?: never;
redirectUrlComplete?: never;
}
);
} & {
/**
* Full URL or path to the route that will complete the OAuth flow.
* Typically, this will be a simple `/sso-callback` route that calls `Clerk.handleRedirectCallback`
* or mounts the <AuthenticateWithRedirectCallback /> component.
*/
redirectUrl: string;
/**
* Full URL or path to navigate after the OAuth flow completes.
*/
redirectUrlComplete: string;
};

@@ -15,6 +15,2 @@ import { ClerkResource } from './resource';

remove: () => Promise<SessionResource>;
/**
* `revoke` has been deprecated and will be removed soon.
*/
revoke: () => Promise<SessionResource>;
touch: () => Promise<SessionResource>;

@@ -21,0 +17,0 @@ getToken: (options?: GetSessionTokenOptions) => Promise<string>;

@@ -14,2 +14,3 @@ import { JWT } from './jwt';

throwOnError?: boolean;
skipCache?: boolean;
};

@@ -16,0 +17,0 @@

@@ -7,3 +7,2 @@ import { EmailAddressResource } from './emailAddress';

import { SessionWithActivitiesResource } from './session';
import { JWTService, GetUserTokenOptions } from './token';
import { ImageResource } from './image';

@@ -43,6 +42,2 @@ import { SnakeToCamel } from './utils';

) => boolean;
getToken: (
service: JWTService,
options?: GetUserTokenOptions,
) => Promise<string>;
getSessions: () => Promise<SessionWithActivitiesResource[]>;

@@ -49,0 +44,0 @@ setProfileImage: (file: Blob | File) => Promise<ImageResource>;

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

export interface StartMagicLinkFlowParams {
redirectUrl?: string;
// DX: Deprecated v2.4.4
/**
* @deprecated Use {@link StartMagicLinkFlowParams.redirectUrl} instead.
*/
callbackUrl?: string;
redirectUrl: string;
}

@@ -45,0 +40,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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