Comparing version 0.2.5 to 0.2.6
import { IOEither } from "fp-ts/lib/IOEither"; | ||
import { Option } from "fp-ts/lib/Option"; | ||
import { EnonicError } from "./common"; | ||
export interface LoginParams { | ||
readonly user: string; | ||
readonly password?: string; | ||
readonly idProvider?: string; | ||
readonly skipAuth?: boolean; | ||
readonly sessionTimeout?: number; | ||
} | ||
export interface LoginResult { | ||
readonly authenticated: boolean; | ||
readonly user: User; | ||
} | ||
export interface Principal { | ||
readonly type: string; | ||
readonly key: string; | ||
readonly displayName: string; | ||
readonly modifiedTime: string; | ||
} | ||
export interface User extends Principal { | ||
readonly disabled: boolean; | ||
readonly email: string; | ||
readonly login: string; | ||
readonly idProvider: string; | ||
} | ||
export interface WithProfile<A> { | ||
readonly profile?: A; | ||
} | ||
export interface Role extends Principal { | ||
readonly description?: string; | ||
} | ||
export interface Group extends Principal { | ||
readonly description?: string; | ||
} | ||
export interface FindUsersParams { | ||
readonly start?: number; | ||
readonly count: number; | ||
readonly query: string; | ||
readonly sort?: string; | ||
readonly includeProfile?: boolean; | ||
} | ||
export interface UserQueryResult<A> { | ||
readonly total: number; | ||
readonly count: number; | ||
readonly hits: ReadonlyArray<User & WithProfile<A>>; | ||
} | ||
export interface ModifyUserParams { | ||
readonly key: string; | ||
readonly editor: (c: User) => User; | ||
} | ||
export interface CreateUserParams { | ||
readonly idProvider: string; | ||
readonly name: string; | ||
readonly displayName: string; | ||
readonly email?: string; | ||
} | ||
export interface CreateRoleParams { | ||
readonly name: string; | ||
readonly displayName: string; | ||
readonly description?: string; | ||
} | ||
export interface CreateGroupParams { | ||
readonly idProvider: string; | ||
readonly name: string; | ||
readonly displayName: string; | ||
readonly description: string; | ||
} | ||
import { CreateGroupParams, CreateRoleParams, CreateUserParams, FindUsersParams, Group, LoginParams, LoginResult, ModifyUserParams, Principal, Role, User, UserQueryResult } from "enonic-types/lib/auth"; | ||
export declare function login(params: LoginParams): IOEither<EnonicError, LoginResult>; | ||
@@ -70,0 +6,0 @@ export declare function logout(): IOEither<EnonicError, void>; |
@@ -1,28 +0,1 @@ | ||
export declare interface Request { | ||
readonly method: "GET" | "PUT" | "POST" | "DELETE"; | ||
readonly scheme: string; | ||
readonly host: string; | ||
readonly port: string; | ||
readonly path: string; | ||
readonly url: string; | ||
readonly remoteAddress: string; | ||
readonly mode: string; | ||
readonly branch: string; | ||
readonly body: string; | ||
readonly params: { | ||
readonly [key: string]: string | undefined; | ||
}; | ||
readonly headers: { | ||
readonly [key: string]: string | undefined; | ||
}; | ||
readonly cookies: { | ||
readonly [key: string]: string | undefined; | ||
}; | ||
} | ||
export interface PageContributions { | ||
readonly headBegin?: string | ReadonlyArray<string>; | ||
readonly headEnd?: string | ReadonlyArray<string>; | ||
readonly bodyBegin?: string | ReadonlyArray<string>; | ||
readonly bodyEnd?: string | ReadonlyArray<string>; | ||
} | ||
interface BaseError { | ||
@@ -33,17 +6,2 @@ readonly errorKey: EnonicErrorKey; | ||
export declare type EnonicErrorKey = GeneralEnonicErrorKey | "BadRequestError"; | ||
export declare interface Response { | ||
readonly status: number; | ||
readonly body?: string | object; | ||
readonly contentType?: string; | ||
readonly headers?: { | ||
readonly [key: string]: string; | ||
}; | ||
readonly cookies?: { | ||
readonly [key: string]: string; | ||
}; | ||
readonly redirect?: string; | ||
readonly postProcess?: boolean; | ||
readonly pageContributions?: PageContributions; | ||
readonly applyFilters?: boolean; | ||
} | ||
export interface BadRequestErrorsByKey { | ||
@@ -50,0 +8,0 @@ readonly [key: string]: ReadonlyArray<string>; |
{ | ||
"name": "enonic-fp", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "Functional programming helpers for Enonic XP", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
41768
731