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
2229
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.1-alpha.1 to 2.0.1-alpha.2

4

package.json
{
"name": "@clerk/types",
"version": "2.0.1-alpha.1",
"version": "2.0.1-alpha.2",
"license": "MIT",

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

"homepage": "https://clerk.dev/",
"gitHead": "e455eb2271fc2ac8d6a2e260b17a8b05accc8805"
"gitHead": "afd03b019ab74e0a81c8325d474cbd03f52f5ce8"
}
import { ClientResource } from './client';
import { DisplayThemeJSON } from './json';
import { OrganizationResource } from './organization';
import {
MembershipRole,
OrganizationMembershipResource,
} from './organizationMembership';
import { MembershipRole, OrganizationMembershipResource } from './organizationMembership';
import { ActiveSessionResource } from './session';

@@ -14,5 +11,3 @@ import { UserResource } from './user';

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

@@ -126,6 +121,3 @@ export type SignOutCallback = () => void | Promise<any>;

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

@@ -146,6 +138,3 @@ /**

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

@@ -228,5 +217,3 @@ /**

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

@@ -236,5 +223,3 @@ /**

*/
createOrganization: (
params: CreateOrganizationParams,
) => Promise<OrganizationResource>;
createOrganization: (params: CreateOrganizationParams) => Promise<OrganizationResource>;

@@ -249,5 +234,3 @@ /**

*/
getOrganization: (
organizationId: string,
) => Promise<OrganizationResource | undefined>;
getOrganization: (organizationId: string) => Promise<OrganizationResource | undefined>;

@@ -301,5 +284,3 @@ /**

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

@@ -306,0 +287,0 @@ }

import { IdentificationLinkResource } from './identificationLink';
import { ClerkResource } from './resource';
import { EmailCodeStrategy, EmailLinkStrategy } from './strategies';
import {
CreateMagicLinkFlowReturn,
StartMagicLinkFlowParams,
VerificationResource,
} from './verification';
import { CreateMagicLinkFlowReturn, StartMagicLinkFlowParams, VerificationResource } from './verification';

@@ -29,13 +25,6 @@ export type PrepareEmailAddressVerificationParams =

toString: () => string;
prepareVerification: (
params?: PrepareEmailAddressVerificationParams,
) => Promise<EmailAddressResource>;
attemptVerification: (
params: AttemptEmailAddressVerificationParams,
) => Promise<EmailAddressResource>;
createMagicLinkFlow: () => CreateMagicLinkFlowReturn<
StartMagicLinkFlowParams,
EmailAddressResource
>;
prepareVerification: (params?: PrepareEmailAddressVerificationParams) => Promise<EmailAddressResource>;
attemptVerification: (params: AttemptEmailAddressVerificationParams) => Promise<EmailAddressResource>;
createMagicLinkFlow: () => CreateMagicLinkFlowReturn<StartMagicLinkFlowParams, EmailAddressResource>;
destroy: () => Promise<void>;
}

@@ -11,12 +11,6 @@ import { OrganizationInvitationResource } from './organizationInvitation';

update: (params: UpdateOrganizationParams) => Promise<OrganizationResource>;
getMemberships: (
params?: GetMembershipsParams,
) => Promise<OrganizationMembershipResource[]>;
getMemberships: (params?: GetMembershipsParams) => Promise<OrganizationMembershipResource[]>;
getPendingInvitations: () => Promise<OrganizationInvitationResource[]>;
inviteMember: (
params: InviteMemberParams,
) => Promise<OrganizationInvitationResource>;
updateMember: (
params: UpdateMembershipParams,
) => Promise<OrganizationMembershipResource>;
inviteMember: (params: InviteMemberParams) => Promise<OrganizationInvitationResource>;
updateMember: (params: UpdateMembershipParams) => Promise<OrganizationMembershipResource>;
removeMember: (userId: string) => Promise<OrganizationMembershipResource>;

@@ -23,0 +17,0 @@ }

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

destroy: () => Promise<OrganizationMembershipResource>;
update: (
updateParams: UpdateOrganizationMembershipParams,
) => Promise<OrganizationMembershipResource>;
update: (updateParams: UpdateOrganizationMembershipParams) => Promise<OrganizationMembershipResource>;
}

@@ -17,0 +15,0 @@

@@ -47,10 +47,3 @@ import { ClerkResource } from './resource';

export type SessionStatus =
| 'abandoned'
| 'active'
| 'ended'
| 'expired'
| 'removed'
| 'replaced'
| 'revoked';
export type SessionStatus = 'abandoned' | 'active' | 'ended' | 'expired' | 'removed' | 'replaced' | 'revoked';

@@ -57,0 +50,0 @@ export interface PublicUserData {

@@ -19,9 +19,4 @@ import {

} from './factors';
import { EmailAddressIdentifier, PhoneNumberIdentifier, UsernameIdentifier, Web3WalletIdentifier } from './identifiers';
import {
EmailAddressIdentifier,
PhoneNumberIdentifier,
UsernameIdentifier,
Web3WalletIdentifier,
} from './identifiers';
import {
ClerkResourceJSON,

@@ -44,7 +39,3 @@ SignInFirstFactorJSON,

} from './strategies';
import {
CreateMagicLinkFlowReturn,
StartMagicLinkFlowParams,
VerificationResource,
} from './verification';
import { CreateMagicLinkFlowReturn, StartMagicLinkFlowParams, VerificationResource } from './verification';
import { AuthenticateWithWeb3Params } from './web3Wallet';

@@ -65,39 +56,20 @@

prepareFirstFactor: (
params: PrepareFirstFactorParams,
) => Promise<SignInResource>;
prepareFirstFactor: (params: PrepareFirstFactorParams) => Promise<SignInResource>;
attemptFirstFactor: (
params: AttemptFirstFactorParams,
) => Promise<SignInResource>;
attemptFirstFactor: (params: AttemptFirstFactorParams) => Promise<SignInResource>;
prepareSecondFactor: (
params: PrepareSecondFactorParams,
) => Promise<SignInResource>;
prepareSecondFactor: (params: PrepareSecondFactorParams) => Promise<SignInResource>;
attemptSecondFactor: (
params: AttemptSecondFactorParams,
) => Promise<SignInResource>;
attemptSecondFactor: (params: AttemptSecondFactorParams) => Promise<SignInResource>;
authenticateWithRedirect: (
params: AuthenticateWithRedirectParams,
) => Promise<void>;
authenticateWithRedirect: (params: AuthenticateWithRedirectParams) => Promise<void>;
authenticateWithWeb3: (
params: AuthenticateWithWeb3Params,
) => Promise<SignInResource>;
authenticateWithWeb3: (params: AuthenticateWithWeb3Params) => Promise<SignInResource>;
authenticateWithMetamask: () => Promise<SignInResource>;
createMagicLinkFlow: () => CreateMagicLinkFlowReturn<
SignInStartMagicLinkFlowParams,
SignInResource
>;
createMagicLinkFlow: () => CreateMagicLinkFlowReturn<SignInStartMagicLinkFlowParams, SignInResource>;
}
export type SignInStatus =
| 'needs_identifier'
| 'needs_first_factor'
| 'needs_second_factor'
| 'complete';
export type SignInStatus = 'needs_identifier' | 'needs_first_factor' | 'needs_second_factor' | 'complete';

@@ -135,7 +107,3 @@ export type SignInIdentifier =

export type AttemptFirstFactorParams =
| EmailCodeAttempt
| PhoneCodeAttempt
| PasswordAttempt
| Web3Attempt;
export type AttemptFirstFactorParams = EmailCodeAttempt | PhoneCodeAttempt | PasswordAttempt | Web3Attempt;

@@ -176,4 +144,3 @@ export type PrepareSecondFactorParams = PhoneCodeSecondFactorConfig;

export interface SignInStartMagicLinkFlowParams
extends StartMagicLinkFlowParams {
export interface SignInStartMagicLinkFlowParams extends StartMagicLinkFlowParams {
emailAddressId: string;

@@ -180,0 +147,0 @@ }

@@ -27,7 +27,2 @@ export type EmUnit = string;

export type Color =
| string
| HexColor
| HslaColor
| RgbaColor
| TransparentColor;
export type Color = string | HexColor | HslaColor | RgbaColor | TransparentColor;

@@ -35,12 +35,6 @@ import { EmailAddressResource } from './emailAddress';

update: (params: UpdateUserParams) => Promise<UserResource>;
createEmailAddress: (
params: CreateEmailAddressParams,
) => Promise<EmailAddressResource>;
createPhoneNumber: (
params: CreatePhoneNumberParams,
) => Promise<PhoneNumberResource>;
createEmailAddress: (params: CreateEmailAddressParams) => Promise<EmailAddressResource>;
createPhoneNumber: (params: CreatePhoneNumberParams) => Promise<PhoneNumberResource>;
twoFactorEnabled: () => boolean;
isPrimaryIdentification: (
ident: EmailAddressResource | PhoneNumberResource,
) => boolean;
isPrimaryIdentification: (ident: EmailAddressResource | PhoneNumberResource) => boolean;
getSessions: () => Promise<SessionWithActivitiesResource[]>;

@@ -47,0 +41,0 @@ setProfileImage: (params: SetProfileImageParams) => Promise<ImageResource>;

@@ -14,10 +14,6 @@ export type SnakeToCamel<T> = T extends `${infer A}_${infer B}`

export type DeepCamelToSnake<T> = T extends `${infer C0}${infer R}`
? `${C0 extends Uppercase<C0>
? '_'
: ''}${Lowercase<C0>}${DeepCamelToSnake<R>}`
? `${C0 extends Uppercase<C0> ? '_' : ''}${Lowercase<C0>}${DeepCamelToSnake<R>}`
: T extends {}
? {
[K in keyof T as DeepCamelToSnake<Extract<K, string>>]: DeepCamelToSnake<
T[K]
>;
[K in keyof T as DeepCamelToSnake<Extract<K, string>>]: DeepCamelToSnake<T[K]>;
}

@@ -24,0 +20,0 @@ : T;

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

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