@accounts/server
Advanced tools
Comparing version 1.0.0-alpha-20231122105229-8edd073f to 1.0.0-alpha-20231122120807-69a661e3
import * as jwt from 'jsonwebtoken'; | ||
import Emittery from 'emittery'; | ||
import { User, LoginResult, Tokens, Session, ImpersonationUserIdentity, ImpersonationResult, HookListener, DatabaseInterface, ConnectionInformations, DatabaseInterfaceUser, DatabaseInterfaceSessions, AuthenticationService } from '@accounts/types'; | ||
import { AccountsServerOptions } from './types/accounts-server-options'; | ||
import { EmailTemplateType } from './types/email-template-type'; | ||
import { type User, type LoginResult, type Tokens, type Session, type ImpersonationUserIdentity, type ImpersonationResult, type HookListener, type DatabaseInterface, type ConnectionInformations, type DatabaseInterfaceUser, type DatabaseInterfaceSessions, type AuthenticationService } from '@accounts/types'; | ||
import { type AccountsServerOptions } from './types/accounts-server-options'; | ||
import { type EmailTemplateType } from './types/email-template-type'; | ||
import { ExecutionContext } from 'graphql-modules'; | ||
import { AuthenticationServices } from './types/authentication-services'; | ||
import { type AuthenticationServices } from './types/authentication-services'; | ||
declare const defaultOptions: { | ||
@@ -9,0 +9,0 @@ enableAutologin: boolean; |
@@ -1,8 +0,8 @@ | ||
import * as jwt from 'jsonwebtoken'; | ||
import { User, Session } from '@accounts/types'; | ||
import { EmailTemplatesType } from './email-templates-type'; | ||
import { PrepareMailFunction } from './prepare-mail-function'; | ||
import { SendMailType } from './send-mail-type'; | ||
import { TokenCreator } from './token-creator'; | ||
import { JwtData } from './jwt-data'; | ||
import type * as jwt from 'jsonwebtoken'; | ||
import { type User, type Session } from '@accounts/types'; | ||
import { type EmailTemplatesType } from './email-templates-type'; | ||
import { type PrepareMailFunction } from './prepare-mail-function'; | ||
import { type SendMailType } from './send-mail-type'; | ||
import { type TokenCreator } from './token-creator'; | ||
import { type JwtData } from './jwt-data'; | ||
export interface AccountsServerOptions<CustomUser extends User = User> { | ||
@@ -9,0 +9,0 @@ micro?: boolean; |
import { InjectionToken } from 'graphql-modules'; | ||
import { AccountsServerOptions } from './accounts-server-options'; | ||
import { type AccountsServerOptions } from './accounts-server-options'; | ||
export declare const AccountsCoreConfigToken: InjectionToken<AccountsServerOptions<import("@accounts/types").User>>; |
@@ -1,4 +0,4 @@ | ||
import { AuthenticationService, User } from '@accounts/types'; | ||
import { type AuthenticationService, type User } from '@accounts/types'; | ||
export interface AuthenticationServices<CustomUser extends User = User> { | ||
[key: string]: (new (args: any) => AuthenticationService<CustomUser>) | AuthenticationService<CustomUser> | undefined; | ||
} |
import { InjectionToken } from 'graphql-modules'; | ||
import { AuthenticationServices } from './authentication-services'; | ||
import { type AuthenticationServices } from './authentication-services'; | ||
export declare const AuthenticationServicesToken: InjectionToken<AuthenticationServices<import("@accounts/types").User>>; |
@@ -1,3 +0,3 @@ | ||
import { DatabaseInterfaceSessions } from '@accounts/types'; | ||
import { type DatabaseInterfaceSessions } from '@accounts/types'; | ||
import { InjectionToken } from 'graphql-modules'; | ||
export declare const DatabaseInterfaceSessionsToken: InjectionToken<DatabaseInterfaceSessions>; |
@@ -1,3 +0,3 @@ | ||
import { DatabaseInterfaceUser } from '@accounts/types'; | ||
import { type DatabaseInterfaceUser } from '@accounts/types'; | ||
import { InjectionToken } from 'graphql-modules'; | ||
export declare const DatabaseInterfaceUserToken: InjectionToken<DatabaseInterfaceUser<import("@accounts/types").User>>; |
@@ -1,2 +0,2 @@ | ||
import { User } from '@accounts/types'; | ||
import { type User } from '@accounts/types'; | ||
export interface EmailTemplateType { | ||
@@ -3,0 +3,0 @@ from?: string; |
@@ -1,2 +0,2 @@ | ||
import { EmailTemplateType } from './email-template-type'; | ||
import { type EmailTemplateType } from './email-template-type'; | ||
export interface EmailTemplatesType { | ||
@@ -3,0 +3,0 @@ from: string; |
@@ -1,4 +0,4 @@ | ||
import { EmailTemplateType } from './email-template-type'; | ||
import { type EmailTemplateType } from './email-template-type'; | ||
export type EmailType = EmailTemplateType & { | ||
to: string; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import { JwtData } from './jwt-data'; | ||
import { type JwtData } from './jwt-data'; | ||
export interface JwtPayload { | ||
@@ -3,0 +3,0 @@ data: JwtData; |
@@ -1,3 +0,3 @@ | ||
import { User } from '@accounts/types'; | ||
import { EmailTemplateType } from './email-template-type'; | ||
import { type User } from '@accounts/types'; | ||
import { type EmailTemplateType } from './email-template-type'; | ||
export type PrepareMailFunction = (to: string, token: string, user: User, pathFragment: string, emailTemplate: EmailTemplateType, from: string) => object; |
@@ -1,4 +0,4 @@ | ||
import { User } from '@accounts/types'; | ||
import { type User } from '@accounts/types'; | ||
export interface TokenCreator { | ||
createToken(user: User): Promise<string>; | ||
} |
@@ -1,4 +0,4 @@ | ||
import { EmailTemplatesType } from '../types/email-templates-type'; | ||
import { type EmailTemplatesType } from '../types/email-templates-type'; | ||
export declare const emailTemplates: EmailTemplatesType; | ||
export type SendMailType = (mail: object) => Promise<void>; | ||
export declare const sendMail: (mail: object) => Promise<void>; |
@@ -1,2 +0,2 @@ | ||
import { User } from '@accounts/types'; | ||
import { type User } from '@accounts/types'; | ||
export declare function getFirstUserEmail(user: User, address: string): string; |
{ | ||
"name": "@accounts/server", | ||
"version": "1.0.0-alpha-20231122105229-8edd073f", | ||
"version": "1.0.0-alpha-20231122120807-69a661e3", | ||
"description": "Fullstack authentication and accounts-management", | ||
@@ -51,3 +51,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@accounts/types": "1.0.0-alpha-20231122105229-8edd073f", | ||
"@accounts/types": "1.0.0-alpha-20231122120807-69a661e3", | ||
"@types/jsonwebtoken": "9.0.5", | ||
@@ -54,0 +54,0 @@ "emittery": "0.13.1", |
@@ -5,14 +5,14 @@ import merge from 'lodash.merge'; | ||
import { | ||
User, | ||
LoginResult, | ||
Tokens, | ||
Session, | ||
ImpersonationUserIdentity, | ||
ImpersonationResult, | ||
HookListener, | ||
DatabaseInterface, | ||
ConnectionInformations, | ||
DatabaseInterfaceUser, | ||
DatabaseInterfaceSessions, | ||
AuthenticationService, | ||
type User, | ||
type LoginResult, | ||
type Tokens, | ||
type Session, | ||
type ImpersonationUserIdentity, | ||
type ImpersonationResult, | ||
type HookListener, | ||
type DatabaseInterface, | ||
type ConnectionInformations, | ||
type DatabaseInterfaceUser, | ||
type DatabaseInterfaceSessions, | ||
type AuthenticationService, | ||
} from '@accounts/types'; | ||
@@ -25,6 +25,6 @@ | ||
import { AccountsServerOptions } from './types/accounts-server-options'; | ||
import { JwtData } from './types/jwt-data'; | ||
import { EmailTemplateType } from './types/email-template-type'; | ||
import { JwtPayload } from './types/jwt-payload'; | ||
import { type AccountsServerOptions } from './types/accounts-server-options'; | ||
import { type JwtData } from './types/jwt-data'; | ||
import { type EmailTemplateType } from './types/email-template-type'; | ||
import { type JwtPayload } from './types/jwt-payload'; | ||
import { AccountsJsError } from './utils/accounts-error'; | ||
@@ -44,3 +44,3 @@ import { | ||
import { AuthenticationServicesToken } from './types/AuthenticationServices.symbol'; | ||
import { AuthenticationServices } from './types/authentication-services'; | ||
import { type AuthenticationServices } from './types/authentication-services'; | ||
import { DatabaseInterfaceUserToken } from './types/DatabaseInterfaceUser.symbol'; | ||
@@ -47,0 +47,0 @@ import { DatabaseInterfaceSessionsToken } from './types/DatabaseInterfaceSessions.symbol'; |
@@ -1,8 +0,8 @@ | ||
import * as jwt from 'jsonwebtoken'; | ||
import { User, Session } from '@accounts/types'; | ||
import { EmailTemplatesType } from './email-templates-type'; | ||
import { PrepareMailFunction } from './prepare-mail-function'; | ||
import { SendMailType } from './send-mail-type'; | ||
import { TokenCreator } from './token-creator'; | ||
import { JwtData } from './jwt-data'; | ||
import type * as jwt from 'jsonwebtoken'; | ||
import { type User, type Session } from '@accounts/types'; | ||
import { type EmailTemplatesType } from './email-templates-type'; | ||
import { type PrepareMailFunction } from './prepare-mail-function'; | ||
import { type SendMailType } from './send-mail-type'; | ||
import { type TokenCreator } from './token-creator'; | ||
import { type JwtData } from './jwt-data'; | ||
@@ -9,0 +9,0 @@ export interface AccountsServerOptions<CustomUser extends User = User> { |
import { InjectionToken } from 'graphql-modules'; | ||
import { AccountsServerOptions } from './accounts-server-options'; | ||
import { type AccountsServerOptions } from './accounts-server-options'; | ||
@@ -4,0 +4,0 @@ export const AccountsCoreConfigToken = new InjectionToken<AccountsServerOptions>( |
@@ -1,2 +0,2 @@ | ||
import { AuthenticationService, User } from '@accounts/types'; | ||
import { type AuthenticationService, type User } from '@accounts/types'; | ||
@@ -3,0 +3,0 @@ export interface AuthenticationServices<CustomUser extends User = User> { |
import { InjectionToken } from 'graphql-modules'; | ||
import { AuthenticationServices } from './authentication-services'; | ||
import { type AuthenticationServices } from './authentication-services'; | ||
@@ -4,0 +4,0 @@ export const AuthenticationServicesToken = new InjectionToken<AuthenticationServices>( |
@@ -1,2 +0,2 @@ | ||
import { DatabaseInterfaceSessions } from '@accounts/types'; | ||
import { type DatabaseInterfaceSessions } from '@accounts/types'; | ||
import { InjectionToken } from 'graphql-modules'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { DatabaseInterfaceUser } from '@accounts/types'; | ||
import { type DatabaseInterfaceUser } from '@accounts/types'; | ||
import { InjectionToken } from 'graphql-modules'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { User } from '@accounts/types'; | ||
import { type User } from '@accounts/types'; | ||
@@ -3,0 +3,0 @@ export interface EmailTemplateType { |
@@ -1,2 +0,2 @@ | ||
import { EmailTemplateType } from './email-template-type'; | ||
import { type EmailTemplateType } from './email-template-type'; | ||
@@ -3,0 +3,0 @@ export interface EmailTemplatesType { |
@@ -1,3 +0,3 @@ | ||
import { EmailTemplateType } from './email-template-type'; | ||
import { type EmailTemplateType } from './email-template-type'; | ||
export type EmailType = EmailTemplateType & { to: string }; |
@@ -1,2 +0,2 @@ | ||
import { JwtData } from './jwt-data'; | ||
import { type JwtData } from './jwt-data'; | ||
@@ -3,0 +3,0 @@ export interface JwtPayload { |
@@ -1,3 +0,3 @@ | ||
import { User } from '@accounts/types'; | ||
import { EmailTemplateType } from './email-template-type'; | ||
import { type User } from '@accounts/types'; | ||
import { type EmailTemplateType } from './email-template-type'; | ||
@@ -4,0 +4,0 @@ export type PrepareMailFunction = ( |
@@ -1,2 +0,2 @@ | ||
import { User } from '@accounts/types'; | ||
import { type User } from '@accounts/types'; | ||
@@ -3,0 +3,0 @@ export interface TokenCreator { |
@@ -1,3 +0,3 @@ | ||
import { User } from '@accounts/types'; | ||
import { EmailTemplatesType } from '../types/email-templates-type'; | ||
import { type User } from '@accounts/types'; | ||
import { type EmailTemplatesType } from '../types/email-templates-type'; | ||
@@ -4,0 +4,0 @@ export const emailTemplates: EmailTemplatesType = { |
@@ -1,2 +0,2 @@ | ||
import { User } from '@accounts/types'; | ||
import { type User } from '@accounts/types'; | ||
@@ -3,0 +3,0 @@ export function getFirstUserEmail(user: User, address: string): string { |
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
121466
2386
+ Added@accounts/types@1.0.0-alpha-20231122120807-69a661e3(transitive)
- Removed@accounts/types@1.0.0-alpha-20231122105229-8edd073f(transitive)