@foal/typeorm

Last updated 11 days ago

Table of contents

index.ts

Functions

middleware

Warning Beta!

Deprecated!</span>

function middleware(operations: string, middleware: Middleware): Partial<Record<keyof IResourceCollection, Middleware>>;

Parameters

Name

Type

operations

string

middleware

Middleware

Return type

Partial>

PermissionRequired

function PermissionRequired(perm: string, options: { redirect?: string | undefined; } = {}): HookDecorator;

Parameters

Name

Type

Default value

perm

string

options

{ redirect?: string | undefined; }

{}

Return type

HookDecorator

fetchUserWithPermissions

function fetchUserWithPermissions(userEntityClass: Class<{ id: number | string; }>): (id: number | string) => Promise<any>;

Parameters

Name

Type

userEntityClass

Class<{ id: number | string; }>

Return type

(id: number | string) => Promise

fetchUser

function fetchUser(userEntityClass: Class<{ id: number | string; }>): (id: number | string) => Promise<any>;

Parameters

Name

Type

userEntityClass

Class<{ id: number | string; }>

Return type

(id: number | string) => Promise

Interfaces

EmailUser

Warning Beta!

Deprecated!</span>

interface EmailUser extends UserWithPermissions {
email: string;
password: string;
}

Extends

UserWithPermissions

Properties

Name

Type

Optional

email

string

false

password

string

false

Types

Middleware

Warning Beta!

Deprecated!</span>

type Middleware = (context: { user: any; resource: any; data: any; params: CollectionParams; }) => any;

Type

(context: { user: any; resource: any; data: any; params: CollectionParams; }) => any

RelationLoader

Warning Beta!

Deprecated!</span>

type RelationLoader = (user: any, params: CollectionParams) => string[];

Type

(user: any, params: CollectionParams) => string[]

Classes

Warning Beta!

Deprecated!</span>

Authenticator with email and password.

Warning Beta!

Deprecated!</span>

Create, read, update or delete entities and return representations of them.

Group

Variables

emailSchema

Warning Beta!

Deprecated!</span>

const emailSchema: { additionalProperties: boolean; properties: { email: { type: string; format: string; }; password: { type: string; }; }; required: string[]; type: string; };

Type

{ additionalProperties: boolean; properties: { email: { type: string; format: string; }; password: { type: string; }; }; required: string[]; type: string; }

[VariableDeclaration-0]: index.md#emailschema