@clerk/backend
Advanced tools
Comparing version 0.2.2-staging.1 to 0.2.2
import { AllowlistIdentifier } from '../resources/AllowlistIdentifier'; | ||
import { AbstractAPI } from './AbstractApi'; | ||
declare type AllowlistIdentifierCreateParams = { | ||
type AllowlistIdentifierCreateParams = { | ||
identifier: string; | ||
@@ -5,0 +5,0 @@ notify: boolean; |
import { DeletedObject, EmailAddress } from '../resources'; | ||
import { AbstractAPI } from './AbstractApi'; | ||
declare type CreateEmailAddressParams = { | ||
type CreateEmailAddressParams = { | ||
userId: string; | ||
@@ -9,3 +9,3 @@ emailAddress: string; | ||
}; | ||
declare type UpdateEmailAddressParams = { | ||
type UpdateEmailAddressParams = { | ||
verified?: boolean; | ||
@@ -12,0 +12,0 @@ primary?: boolean; |
import { Email } from '../resources/Email'; | ||
import { AbstractAPI } from './AbstractApi'; | ||
declare type EmailParams = { | ||
type EmailParams = { | ||
fromEmailName: string; | ||
@@ -5,0 +5,0 @@ emailAddressId: string; |
import { Invitation } from '../resources/Invitation'; | ||
import { AbstractAPI } from './AbstractApi'; | ||
declare type CreateParams = { | ||
type CreateParams = { | ||
emailAddress: string; | ||
@@ -5,0 +5,0 @@ redirectUrl?: string; |
import { Organization, OrganizationInvitation, OrganizationMembership } from '../resources'; | ||
import { OrganizationMembershipRole } from '../resources/Enums'; | ||
import { AbstractAPI } from './AbstractApi'; | ||
declare type MetadataParams = { | ||
type MetadataParams = { | ||
publicMetadata?: Record<string, unknown>; | ||
privateMetadata?: Record<string, unknown>; | ||
}; | ||
declare type GetOrganizationListParams = { | ||
type GetOrganizationListParams = { | ||
limit?: number; | ||
offset?: number; | ||
}; | ||
declare type CreateParams = { | ||
type CreateParams = { | ||
name: string; | ||
@@ -17,3 +17,3 @@ slug?: string; | ||
} & MetadataParams; | ||
declare type GetOrganizationParams = { | ||
type GetOrganizationParams = { | ||
organizationId: string; | ||
@@ -23,7 +23,7 @@ } | { | ||
}; | ||
declare type UpdateParams = { | ||
type UpdateParams = { | ||
name?: string; | ||
}; | ||
declare type UpdateMetadataParams = MetadataParams; | ||
declare type GetOrganizationMembershipListParams = { | ||
type UpdateMetadataParams = MetadataParams; | ||
type GetOrganizationMembershipListParams = { | ||
organizationId: string; | ||
@@ -33,3 +33,3 @@ limit?: number; | ||
}; | ||
declare type CreateOrganizationMembershipParams = { | ||
type CreateOrganizationMembershipParams = { | ||
organizationId: string; | ||
@@ -39,12 +39,12 @@ userId: string; | ||
}; | ||
declare type UpdateOrganizationMembershipParams = CreateOrganizationMembershipParams; | ||
declare type UpdateOrganizationMembershipMetadataParams = { | ||
type UpdateOrganizationMembershipParams = CreateOrganizationMembershipParams; | ||
type UpdateOrganizationMembershipMetadataParams = { | ||
organizationId: string; | ||
userId: string; | ||
} & MetadataParams; | ||
declare type DeleteOrganizationMembershipParams = { | ||
type DeleteOrganizationMembershipParams = { | ||
organizationId: string; | ||
userId: string; | ||
}; | ||
declare type CreateOrganizationInvitationParams = { | ||
type CreateOrganizationInvitationParams = { | ||
organizationId: string; | ||
@@ -56,3 +56,3 @@ inviterUserId: string; | ||
}; | ||
declare type GetPendingOrganizationInvitationListParams = { | ||
type GetPendingOrganizationInvitationListParams = { | ||
organizationId: string; | ||
@@ -62,3 +62,3 @@ limit?: number; | ||
}; | ||
declare type RevokeOrganizationInvitationParams = { | ||
type RevokeOrganizationInvitationParams = { | ||
organizationId: string; | ||
@@ -65,0 +65,0 @@ invitationId: string; |
import { DeletedObject, PhoneNumber } from '../resources'; | ||
import { AbstractAPI } from './AbstractApi'; | ||
declare type CreatePhoneNumberParams = { | ||
type CreatePhoneNumberParams = { | ||
userId: string; | ||
@@ -9,3 +9,3 @@ phoneNumber: string; | ||
}; | ||
declare type UpdatePhoneNumberParams = { | ||
type UpdatePhoneNumberParams = { | ||
verified?: boolean; | ||
@@ -12,0 +12,0 @@ primary?: boolean; |
import { RedirectUrl } from '../resources/RedirectUrl'; | ||
import { AbstractAPI } from './AbstractApi'; | ||
declare type CreateRedirectUrlParams = { | ||
type CreateRedirectUrlParams = { | ||
url: string; | ||
@@ -5,0 +5,0 @@ }; |
import { Session } from '../resources/Session'; | ||
import { AbstractAPI } from './AbstractApi'; | ||
declare type QueryParams = { | ||
type QueryParams = { | ||
clientId?: string; | ||
@@ -5,0 +5,0 @@ userId?: string; |
import { SignInToken } from '../resources/SignInTokens'; | ||
import { AbstractAPI } from './AbstractApi'; | ||
declare type CreateSignInTokensParams = { | ||
type CreateSignInTokensParams = { | ||
userId: string; | ||
@@ -5,0 +5,0 @@ expiresInSeconds: number; |
import { SMSMessage } from '../resources/SMSMessage'; | ||
import { AbstractAPI } from './AbstractApi'; | ||
declare type SMSParams = { | ||
type SMSParams = { | ||
phoneNumberId: string; | ||
@@ -5,0 +5,0 @@ message: string; |
import { OAuthProvider } from '@clerk/types'; | ||
import { OauthAccessToken, OrganizationMembership, User } from '../resources'; | ||
import { AbstractAPI } from './AbstractApi'; | ||
declare type UserCountParams = { | ||
type UserCountParams = { | ||
emailAddress?: string[]; | ||
@@ -12,3 +12,3 @@ phoneNumber?: string[]; | ||
}; | ||
declare type UserListParams = UserCountParams & { | ||
type UserListParams = UserCountParams & { | ||
limit?: number; | ||
@@ -18,3 +18,3 @@ offset?: number; | ||
}; | ||
declare type UserMetadataParams = { | ||
type UserMetadataParams = { | ||
publicMetadata?: Record<string, unknown>; | ||
@@ -24,3 +24,3 @@ privateMetadata?: Record<string, unknown>; | ||
}; | ||
declare type CreateUserParams = { | ||
type CreateUserParams = { | ||
externalId?: string; | ||
@@ -48,3 +48,3 @@ emailAddress?: string[]; | ||
} | ||
declare type GetOrganizationMembershipListParams = { | ||
type GetOrganizationMembershipListParams = { | ||
userId: string; | ||
@@ -51,0 +51,0 @@ limit?: number; |
import { AllowlistIdentifierAPI, ClientAPI, EmailAddressAPI, EmailAPI, InterstitialAPI, InvitationAPI, OrganizationAPI, PhoneNumberAPI, RedirectUrlAPI, SessionAPI, SignInTokenAPI, SMSMessageAPI, UserAPI } from './endpoints'; | ||
export declare type CreateBackendApiOptions = { | ||
export type CreateBackendApiOptions = { | ||
apiKey: string; | ||
@@ -8,3 +8,3 @@ apiUrl?: string; | ||
}; | ||
export declare type ApiClient = ReturnType<typeof createBackendApiClient>; | ||
export type ApiClient = ReturnType<typeof createBackendApiClient>; | ||
export declare function createBackendApiClient(options: CreateBackendApiOptions): { | ||
@@ -11,0 +11,0 @@ allowlistIdentifiers: AllowlistIdentifierAPI; |
import type { ClerkAPIError } from '@clerk/types'; | ||
import type { CreateBackendApiOptions } from './factory'; | ||
export declare type ClerkBackendApiRequestOptions = { | ||
export type ClerkBackendApiRequestOptions = { | ||
method: 'GET' | 'POST' | 'PATCH' | 'DELETE' | 'PUT'; | ||
@@ -15,3 +15,3 @@ queryParams?: Record<string, unknown>; | ||
}); | ||
export declare type ClerkBackendApiResponse<T> = { | ||
export type ClerkBackendApiResponse<T> = { | ||
data: T; | ||
@@ -23,4 +23,4 @@ errors: null; | ||
}; | ||
export declare type RequestFunction = ReturnType<typeof buildRequest>; | ||
export type RequestFunction = ReturnType<typeof buildRequest>; | ||
export declare function buildRequest({ apiUrl, apiKey, apiVersion, userAgent }: CreateBackendApiOptions): <T>({ path, method, queryParams, headerParams, bodyParams, }: ClerkBackendApiRequestOptions) => Promise<ClerkBackendApiResponse<T>>; | ||
//# sourceMappingURL=request.d.ts.map |
@@ -1,11 +0,11 @@ | ||
export declare type OAuthProvider = 'facebook' | 'google' | 'hubspot' | 'github' | 'tiktok' | 'gitlab' | 'discord' | 'twitter' | 'twitch' | 'linkedin' | 'dropbox' | 'bitbucket' | 'microsoft' | 'notion' | 'apple'; | ||
export declare type OAuthStrategy = `oauth_${OAuthProvider}`; | ||
export declare type OrganizationInvitationStatus = 'pending' | 'accepted' | 'revoked'; | ||
export declare type OrganizationMembershipRole = 'basic_member' | 'guest_member' | 'admin'; | ||
export declare type SignInIdentifier = 'username' | 'email_address' | 'phone_number' | 'web3_wallet' | OAuthStrategy; | ||
export declare type SignInFactorStrategy = 'password' | 'email_link' | 'phone_code' | 'email_code' | OAuthStrategy; | ||
export declare type SignInStatus = 'needs_identifier' | 'needs_factor_one' | 'needs_factor_two' | 'complete'; | ||
export declare type SignUpStatus = 'missing_requirements' | 'complete' | 'abandoned'; | ||
export declare type SignUpIdentificationRequirements = ('email_address' | 'phone_number' | 'web3_wallet' | 'username' | OAuthStrategy)[][]; | ||
export declare type SignUpAttributeRequirements = ('name_title' | 'name_middle' | 'name_last' | 'name_suffix' | 'age' | 'gender')[][]; | ||
export type OAuthProvider = 'facebook' | 'google' | 'hubspot' | 'github' | 'tiktok' | 'gitlab' | 'discord' | 'twitter' | 'twitch' | 'linkedin' | 'dropbox' | 'bitbucket' | 'microsoft' | 'notion' | 'apple'; | ||
export type OAuthStrategy = `oauth_${OAuthProvider}`; | ||
export type OrganizationInvitationStatus = 'pending' | 'accepted' | 'revoked'; | ||
export type OrganizationMembershipRole = 'basic_member' | 'guest_member' | 'admin'; | ||
export type SignInIdentifier = 'username' | 'email_address' | 'phone_number' | 'web3_wallet' | OAuthStrategy; | ||
export type SignInFactorStrategy = 'password' | 'email_link' | 'phone_code' | 'email_code' | OAuthStrategy; | ||
export type SignInStatus = 'needs_identifier' | 'needs_factor_one' | 'needs_factor_two' | 'complete'; | ||
export type SignUpStatus = 'missing_requirements' | 'complete' | 'abandoned'; | ||
export type SignUpIdentificationRequirements = ('email_address' | 'phone_number' | 'web3_wallet' | 'username' | OAuthStrategy)[][]; | ||
export type SignUpAttributeRequirements = ('name_title' | 'name_middle' | 'name_last' | 'name_suffix' | 'age' | 'gender')[][]; | ||
//# sourceMappingURL=Enums.d.ts.map |
@@ -7,3 +7,3 @@ import { type CreateBackendApiOptions } from './api'; | ||
export * from './tokens/verify'; | ||
export declare type ClerkOptions = CreateBackendApiOptions & Pick<CreateAuthStateOptions, 'jwtKey'>; | ||
export type ClerkOptions = CreateBackendApiOptions & Pick<CreateAuthStateOptions, 'jwtKey'>; | ||
export default function Clerk(options: ClerkOptions): { | ||
@@ -10,0 +10,0 @@ authState: ({ apiKey: runtimeApiKey, frontendApi: runtimeFrontendApi, ...rest }: Omit<import("./tokens/authState").AuthStateOptions, "apiUrl" | "apiVersion">) => Promise<import("./tokens").AuthState>; |
@@ -1,2 +0,2 @@ | ||
declare type Runtime = { | ||
type Runtime = { | ||
crypto: Crypto; | ||
@@ -3,0 +3,0 @@ fetch: typeof global.fetch; |
import type { ActClaim, JwtPayload, ServerGetToken } from '@clerk/types'; | ||
import { Organization, Session, User } from '../api/resources'; | ||
import { type VerifyTokenOptions } from './verify'; | ||
declare type RequiredVerifyTokenOptions = Required<Pick<VerifyTokenOptions, 'apiKey' | 'apiUrl' | 'apiVersion'>>; | ||
declare type OptionalVerifyTokenOptions = Partial<Pick<VerifyTokenOptions, 'authorizedParties' | 'clockSkewInSeconds' | 'jwksCacheTtlInMs' | 'skipJwksCache' | 'jwtKey'>>; | ||
export declare type TokenCarrier = 'header' | 'cookie'; | ||
declare type LoadResourcesOptions = { | ||
type RequiredVerifyTokenOptions = Required<Pick<VerifyTokenOptions, 'apiKey' | 'apiUrl' | 'apiVersion'>>; | ||
type OptionalVerifyTokenOptions = Partial<Pick<VerifyTokenOptions, 'authorizedParties' | 'clockSkewInSeconds' | 'jwksCacheTtlInMs' | 'skipJwksCache' | 'jwtKey'>>; | ||
export type TokenCarrier = 'header' | 'cookie'; | ||
type LoadResourcesOptions = { | ||
loadSession?: boolean; | ||
@@ -12,3 +12,3 @@ loadUser?: boolean; | ||
}; | ||
export declare type AuthStateOptions = RequiredVerifyTokenOptions & OptionalVerifyTokenOptions & LoadResourcesOptions & { | ||
export type AuthStateOptions = RequiredVerifyTokenOptions & OptionalVerifyTokenOptions & LoadResourcesOptions & { | ||
cookieToken?: string; | ||
@@ -55,3 +55,3 @@ clientUat?: string; | ||
} | ||
export declare type SignedInAuthState = { | ||
export type SignedInAuthState = { | ||
frontendApi: string; | ||
@@ -74,3 +74,3 @@ isSignedIn: true; | ||
}; | ||
export declare type SignedOutAuthState = { | ||
export type SignedOutAuthState = { | ||
frontendApi: string; | ||
@@ -92,3 +92,3 @@ isSignedIn: false; | ||
}; | ||
export declare type InterstitialAuthState = Omit<SignedOutAuthState, 'isInterstitial'> & { | ||
export type InterstitialAuthState = Omit<SignedOutAuthState, 'isInterstitial'> & { | ||
isSignedIn: false; | ||
@@ -98,5 +98,5 @@ isInterstitial: true; | ||
}; | ||
export declare type AuthState = SignedInAuthState | SignedOutAuthState | InterstitialAuthState; | ||
export type AuthState = SignedInAuthState | SignedOutAuthState | InterstitialAuthState; | ||
export declare function getAuthState(options: AuthStateOptions): Promise<AuthState>; | ||
export {}; | ||
//# sourceMappingURL=authState.d.ts.map |
@@ -5,3 +5,3 @@ import { type ApiClient } from '../api'; | ||
import { toSSRResource } from './utils'; | ||
export declare type CreateAuthStateOptions = Partial<Pick<AuthStateOptions, 'apiKey' | 'apiUrl' | 'apiVersion' | 'frontendApi' | 'jwtKey'>> & { | ||
export type CreateAuthStateOptions = Partial<Pick<AuthStateOptions, 'apiKey' | 'apiUrl' | 'apiVersion' | 'frontendApi' | 'jwtKey'>> & { | ||
apiClient: ApiClient; | ||
@@ -8,0 +8,0 @@ }; |
import { ServerGetToken } from '@clerk/types'; | ||
declare type TokenFetcher = (sessionId: string, template: string) => Promise<string>; | ||
declare type CreateGetToken = (params: { | ||
type TokenFetcher = (sessionId: string, template: string) => Promise<string>; | ||
type CreateGetToken = (params: { | ||
sessionId: string; | ||
@@ -5,0 +5,0 @@ cookieToken?: string; |
@@ -1,2 +0,2 @@ | ||
export declare type LoadInterstitialOptions = { | ||
export type LoadInterstitialOptions = { | ||
apiUrl: string; | ||
@@ -3,0 +3,0 @@ frontendApi: string; |
import { Jwt, JwtPayload } from '@clerk/types'; | ||
declare type IssuerResolver = string | ((iss: string) => boolean); | ||
type IssuerResolver = string | ((iss: string) => boolean); | ||
export declare function hasValidSignature(jwt: Jwt, jwk: JsonWebKey): Promise<boolean>; | ||
export declare function decodeJwt(token: string): Jwt; | ||
export declare type VerifyJwtOptions = { | ||
export type VerifyJwtOptions = { | ||
audience?: string | string[]; | ||
@@ -7,0 +7,0 @@ authorizedParties?: string[]; |
export declare function loadClerkJWKFromLocal(localKey?: string): JsonWebKey; | ||
export declare type LoadClerkJWKFromRemoteOptions = { | ||
export type LoadClerkJWKFromRemoteOptions = { | ||
kid: string; | ||
@@ -4,0 +4,0 @@ jwksCacheTtlInMs?: number; |
import type { JwtPayload } from '@clerk/types'; | ||
import { type VerifyJwtOptions } from './jwt'; | ||
import { LoadClerkJWKFromRemoteOptions } from './keys'; | ||
export declare type VerifyTokenOptions = Pick<VerifyJwtOptions, 'authorizedParties' | 'audience' | 'issuer' | 'clockSkewInSeconds'> & { | ||
export type VerifyTokenOptions = Pick<VerifyJwtOptions, 'authorizedParties' | 'audience' | 'issuer' | 'clockSkewInSeconds'> & { | ||
jwtKey?: string; | ||
@@ -6,0 +6,0 @@ } & Pick<LoadClerkJWKFromRemoteOptions, 'apiKey' | 'apiUrl' | 'apiVersion' | 'jwksCacheTtlInMs' | 'skipJwksCache'>; |
@@ -1,4 +0,4 @@ | ||
declare type PathString = string | null | undefined; | ||
type PathString = string | null | undefined; | ||
export declare function joinPaths(...args: PathString[]): string; | ||
export {}; | ||
//# sourceMappingURL=path.d.ts.map |
{ | ||
"name": "@clerk/backend", | ||
"version": "0.2.2-staging.1", | ||
"version": "0.2.2", | ||
"license": "MIT", | ||
@@ -27,3 +27,3 @@ "description": "Clerk Backend SDK - REST Client for Backend API & JWT verification utilities", | ||
"dependencies": { | ||
"@clerk/types": "^3.22.0-staging.1", | ||
"@clerk/types": "^3.22.0", | ||
"@types/node": "16.18.6", | ||
@@ -76,3 +76,3 @@ "node-fetch-native": "0.1.8", | ||
}, | ||
"gitHead": "cadb0c29f4647cc41d196802f06c986d0822eb38" | ||
"gitHead": "71419681190c0e0340322832bb6c01a1779074e5" | ||
} |
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
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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
452878
140
1590
Updated@clerk/types@^3.22.0