Comparing version 0.1.5 to 0.1.6
@@ -5,65 +5,65 @@ import { IOEither } from "fp-ts/lib/IOEither"; | ||
export interface LoginParams { | ||
user: string; | ||
password?: string; | ||
idProvider?: string; | ||
skipAuth?: boolean; | ||
sessionTimeout?: number; | ||
readonly user: string; | ||
readonly password?: string; | ||
readonly idProvider?: string; | ||
readonly skipAuth?: boolean; | ||
readonly sessionTimeout?: number; | ||
} | ||
export interface LoginResult { | ||
authenticated: boolean; | ||
user: User; | ||
readonly authenticated: boolean; | ||
readonly user: User; | ||
} | ||
export interface Principal { | ||
type: string; | ||
key: string; | ||
displayName: string; | ||
modifiedTime: string; | ||
readonly type: string; | ||
readonly key: string; | ||
readonly displayName: string; | ||
readonly modifiedTime: string; | ||
} | ||
export interface User extends Principal { | ||
disabled: boolean; | ||
email: string; | ||
login: string; | ||
idProvider: string; | ||
readonly disabled: boolean; | ||
readonly email: string; | ||
readonly login: string; | ||
readonly idProvider: string; | ||
} | ||
export interface WithProfile<A> { | ||
profile?: A; | ||
readonly profile?: A; | ||
} | ||
export interface Role extends Principal { | ||
description?: string; | ||
readonly description?: string; | ||
} | ||
export interface Group extends Principal { | ||
description?: string; | ||
readonly description?: string; | ||
} | ||
export interface FindUsersParams { | ||
start?: number; | ||
count: number; | ||
query: string; | ||
sort?: string; | ||
includeProfile?: boolean; | ||
readonly start?: number; | ||
readonly count: number; | ||
readonly query: string; | ||
readonly sort?: string; | ||
readonly includeProfile?: boolean; | ||
} | ||
export interface UserQueryResult<A> { | ||
total: number; | ||
count: number; | ||
hits: Array<User & WithProfile<A>>; | ||
readonly total: number; | ||
readonly count: number; | ||
readonly hits: ReadonlyArray<User & WithProfile<A>>; | ||
} | ||
export interface ModifyUserParams { | ||
key: string; | ||
editor: (c: User) => User; | ||
readonly key: string; | ||
readonly editor: (c: User) => User; | ||
} | ||
export interface CreateUserParams { | ||
idProvider: string; | ||
name: string; | ||
displayName: string; | ||
email?: string; | ||
readonly idProvider: string; | ||
readonly name: string; | ||
readonly displayName: string; | ||
readonly email?: string; | ||
} | ||
export interface CreateRoleParams { | ||
name: string; | ||
displayName: string; | ||
description?: string; | ||
readonly name: string; | ||
readonly displayName: string; | ||
readonly description?: string; | ||
} | ||
export interface CreateGroupParams { | ||
idProvider: string; | ||
name: string; | ||
displayName: string; | ||
description: string; | ||
readonly idProvider: string; | ||
readonly name: string; | ||
readonly displayName: string; | ||
readonly description: string; | ||
} | ||
@@ -77,7 +77,7 @@ export declare function login(params: LoginParams): IOEither<EnonicError, LoginResult>; | ||
export declare function createUser(params: CreateUserParams): IOEither<EnonicError, User>; | ||
export declare function addMembers(principalKey: string, members: Array<string>): IOEither<EnonicError, void>; | ||
export declare function removeMembers(principalKey: string, members: Array<string>): IOEither<EnonicError, void>; | ||
export declare function addMembers(principalKey: string, members: ReadonlyArray<string>): IOEither<EnonicError, void>; | ||
export declare function removeMembers(principalKey: string, members: ReadonlyArray<string>): IOEither<EnonicError, void>; | ||
export declare function getPrincipal(principalKey: string): Option<User>; | ||
export declare function createRole(params: CreateRoleParams): IOEither<EnonicError, Role>; | ||
export declare function createGroup(params: CreateGroupParams): IOEither<EnonicError, Group>; | ||
export declare function getMemberships(principalKey: string, transitive?: boolean): IOEither<EnonicError, Array<Principal>>; | ||
export declare function getMemberships(principalKey: string, transitive?: boolean): IOEither<EnonicError, ReadonlyArray<Principal>>; |
export declare interface Request { | ||
method: "GET" | "PUT" | "POST" | "DELETE"; | ||
scheme: string; | ||
host: string; | ||
port: string; | ||
path: string; | ||
url: string; | ||
remoteAddress: string; | ||
mode: string; | ||
branch: string; | ||
body: string; | ||
params: { | ||
[key: string]: string | undefined; | ||
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; | ||
}; | ||
headers: { | ||
[key: string]: string | undefined; | ||
readonly headers: { | ||
readonly [key: string]: string | undefined; | ||
}; | ||
cookies: { | ||
[key: string]: string | undefined; | ||
readonly cookies: { | ||
readonly [key: string]: string | undefined; | ||
}; | ||
} | ||
export interface PageContributions { | ||
headBegin?: string | Array<string>; | ||
headEnd?: string | Array<string>; | ||
bodyBegin?: string | Array<string>; | ||
bodyEnd?: string | Array<string>; | ||
readonly headBegin?: string | ReadonlyArray<string>; | ||
readonly headEnd?: string | ReadonlyArray<string>; | ||
readonly bodyBegin?: string | ReadonlyArray<string>; | ||
readonly bodyEnd?: string | ReadonlyArray<string>; | ||
} | ||
interface BaseError { | ||
errorKey: EnonicErrorKey; | ||
readonly errorKey: EnonicErrorKey; | ||
} | ||
@@ -34,27 +34,27 @@ export declare type GeneralEnonicErrorKey = "UnauthorizedError" | "ForbiddenError" | "NotFoundError" | "MethodNotAllowedError" | "InternalServerError" | "BadGatewayError" | "PublishError"; | ||
export declare interface Response { | ||
status: number; | ||
body?: string | object; | ||
contentType?: string; | ||
headers?: { | ||
[key: string]: string; | ||
readonly status: number; | ||
readonly body?: string | object; | ||
readonly contentType?: string; | ||
readonly headers?: { | ||
readonly [key: string]: string; | ||
}; | ||
cookies?: { | ||
[key: string]: string; | ||
readonly cookies?: { | ||
readonly [key: string]: string; | ||
}; | ||
redirect?: string; | ||
postProcess?: boolean; | ||
pageContributions?: PageContributions; | ||
applyFilters?: boolean; | ||
readonly redirect?: string; | ||
readonly postProcess?: boolean; | ||
readonly pageContributions?: PageContributions; | ||
readonly applyFilters?: boolean; | ||
} | ||
export interface BadRequestErrorsByKey { | ||
[key: string]: Array<string>; | ||
readonly [key: string]: ReadonlyArray<string>; | ||
} | ||
export interface GenericError extends BaseError { | ||
errorKey: GeneralEnonicErrorKey; | ||
cause?: string; | ||
stackTrace?: string; | ||
readonly errorKey: GeneralEnonicErrorKey; | ||
readonly cause?: string; | ||
readonly stackTrace?: string; | ||
} | ||
export interface BadRequestError extends BaseError { | ||
errorKey: "BadRequestError"; | ||
errors: BadRequestErrorsByKey; | ||
readonly errorKey: "BadRequestError"; | ||
readonly errors: BadRequestErrorsByKey; | ||
} | ||
@@ -61,0 +61,0 @@ export declare function isBadRequestError(err: EnonicError): err is BadRequestError; |
import { IOEither } from "fp-ts/lib/IOEither"; | ||
import { EnonicError } from "./common"; | ||
export interface Content<A> { | ||
_id: string; | ||
_name: string; | ||
_path: string; | ||
creator: string; | ||
modifier: string; | ||
createdTime: string; | ||
modifiedTime: string; | ||
owner: string; | ||
type: string; | ||
displayName: string; | ||
hasChildren: boolean; | ||
language: string; | ||
valid: boolean; | ||
childOrder: string; | ||
data: A; | ||
x: { | ||
[key: string]: string; | ||
readonly _id: string; | ||
readonly _name: string; | ||
readonly _path: string; | ||
readonly creator: string; | ||
readonly modifier: string; | ||
readonly createdTime: string; | ||
readonly modifiedTime: string; | ||
readonly owner: string; | ||
readonly type: string; | ||
readonly displayName: string; | ||
readonly hasChildren: boolean; | ||
readonly language: string; | ||
readonly valid: boolean; | ||
readonly childOrder: string; | ||
readonly data: A; | ||
readonly x: { | ||
readonly [key: string]: string; | ||
}; | ||
page: any; | ||
attachments: Attachments; | ||
publish: any; | ||
readonly page: any; | ||
readonly attachments: Attachments; | ||
readonly publish: any; | ||
} | ||
export interface Attachment { | ||
name: string; | ||
label?: string; | ||
size: number; | ||
mimeType: string; | ||
readonly name: string; | ||
readonly label?: string; | ||
readonly size: number; | ||
readonly mimeType: string; | ||
} | ||
export interface Attachments { | ||
[key: string]: Attachment; | ||
readonly [key: string]: Attachment; | ||
} | ||
export interface QueryContentParams { | ||
start?: number; | ||
count: number; | ||
query: string; | ||
filters?: object; | ||
sort?: string; | ||
aggregations?: string; | ||
contentTypes?: Array<string>; | ||
readonly start?: number; | ||
readonly count: number; | ||
readonly query: string; | ||
readonly filters?: object; | ||
readonly sort?: string; | ||
readonly aggregations?: string; | ||
readonly contentTypes?: ReadonlyArray<string>; | ||
} | ||
export interface QueryResponse<A> { | ||
aggregations: object; | ||
count: number; | ||
hits: Array<Content<A>>; | ||
total: number; | ||
readonly aggregations: object; | ||
readonly count: number; | ||
readonly hits: ReadonlyArray<Content<A>>; | ||
readonly total: number; | ||
} | ||
export interface GetContentParams { | ||
key: string; | ||
readonly key: string; | ||
} | ||
export interface DeleteContentParams { | ||
key: string; | ||
readonly key: string; | ||
} | ||
export interface CreateContentParams<A> { | ||
name: string; | ||
parentPath: string; | ||
displayName?: string; | ||
requireValid?: boolean; | ||
refresh?: boolean; | ||
contentType: string; | ||
language?: string; | ||
childOrder?: string; | ||
data: A; | ||
x?: string; | ||
readonly name: string; | ||
readonly parentPath: string; | ||
readonly displayName?: string; | ||
readonly requireValid?: boolean; | ||
readonly refresh?: boolean; | ||
readonly contentType: string; | ||
readonly language?: string; | ||
readonly childOrder?: string; | ||
readonly data: A; | ||
readonly x?: string; | ||
} | ||
export interface ModifyContentParams<A> { | ||
key: string; | ||
editor: (c: Content<A>) => Content<A>; | ||
requireValid?: boolean; | ||
readonly key: string; | ||
readonly editor: (c: Content<A>) => Content<A>; | ||
readonly requireValid?: boolean; | ||
} | ||
export interface PublishContentParams { | ||
keys: Array<string>; | ||
sourceBranch: string; | ||
targetBranch: string; | ||
schedule?: ScheduleParams; | ||
excludeChildrenIds?: Array<string>; | ||
includeDependencies?: boolean; | ||
readonly keys: ReadonlyArray<string>; | ||
readonly sourceBranch: string; | ||
readonly targetBranch: string; | ||
readonly schedule?: ScheduleParams; | ||
readonly excludeChildrenIds?: ReadonlyArray<string>; | ||
readonly includeDependencies?: boolean; | ||
} | ||
export interface ScheduleParams { | ||
from: string; | ||
to: string; | ||
readonly from: string; | ||
readonly to: string; | ||
} | ||
export interface PublishResponse { | ||
pushedContents: Array<string>; | ||
deletedContents: Array<string>; | ||
failedContents: Array<string>; | ||
readonly pushedContents: ReadonlyArray<string>; | ||
readonly deletedContents: ReadonlyArray<string>; | ||
readonly failedContents: ReadonlyArray<string>; | ||
} | ||
export interface UnpublishContentParams { | ||
keys: Array<string>; | ||
readonly keys: ReadonlyArray<string>; | ||
} | ||
export interface GetChildrenParams { | ||
key: string; | ||
start?: number; | ||
count?: number; | ||
sort?: string; | ||
readonly key: string; | ||
readonly start?: number; | ||
readonly count?: number; | ||
readonly sort?: string; | ||
} | ||
export interface MoveParams { | ||
source: string; | ||
target: string; | ||
readonly source: string; | ||
readonly target: string; | ||
} | ||
export interface GetSiteParams { | ||
key: string; | ||
readonly key: string; | ||
} | ||
export interface Site<A> { | ||
_id: string; | ||
_name: string; | ||
_path: string; | ||
type: string; | ||
hasChildren: boolean; | ||
valid: boolean; | ||
data: { | ||
siteConfig: SiteConfig<A>; | ||
readonly _id: string; | ||
readonly _name: string; | ||
readonly _path: string; | ||
readonly type: string; | ||
readonly hasChildren: boolean; | ||
readonly valid: boolean; | ||
readonly data: { | ||
readonly siteConfig: SiteConfig<A>; | ||
}; | ||
x: { | ||
[key: string]: string; | ||
readonly x: { | ||
readonly [key: string]: string; | ||
}; | ||
page: any; | ||
attachments: object; | ||
publish: any; | ||
readonly page: any; | ||
readonly attachments: object; | ||
readonly publish: any; | ||
} | ||
export interface SiteConfig<A> { | ||
applicationKey: string; | ||
config: A; | ||
readonly applicationKey: string; | ||
readonly config: A; | ||
} | ||
export interface GetSiteConfigParams { | ||
key: string; | ||
applicationKey: string; | ||
readonly key: string; | ||
readonly applicationKey: string; | ||
} | ||
export interface AttachmentStreamParams { | ||
key: string; | ||
name: string; | ||
readonly key: string; | ||
readonly name: string; | ||
} | ||
export interface RemoveAttachmentParams { | ||
key: string; | ||
name: string | Array<string>; | ||
readonly key: string; | ||
readonly name: string | ReadonlyArray<string>; | ||
} | ||
export interface CreateMediaParams { | ||
name?: string; | ||
parentPath?: string; | ||
mimeType?: string; | ||
focalX?: number; | ||
focalY?: number; | ||
data: any; | ||
readonly name?: string; | ||
readonly parentPath?: string; | ||
readonly mimeType?: string; | ||
readonly focalX?: number; | ||
readonly focalY?: number; | ||
readonly data: any; | ||
} | ||
export interface GetPermissionsParams { | ||
key: string; | ||
readonly key: string; | ||
} | ||
export interface GetPermissionsResult { | ||
inheritsPermissions: boolean; | ||
permissions: Array<PermissionsParams>; | ||
readonly inheritsPermissions: boolean; | ||
readonly permissions: ReadonlyArray<PermissionsParams>; | ||
} | ||
export interface PermissionsParams { | ||
principal: string; | ||
allow: Array<string>; | ||
deny: Array<string>; | ||
readonly principal: string; | ||
readonly allow: ReadonlyArray<string>; | ||
readonly deny: ReadonlyArray<string>; | ||
} | ||
export interface SetPermissionsParams { | ||
key: string; | ||
inheritPermissions: boolean; | ||
overwriteChildPermissions: boolean; | ||
permissions: Array<PermissionsParams>; | ||
readonly key: string; | ||
readonly inheritPermissions: boolean; | ||
readonly overwriteChildPermissions: boolean; | ||
readonly permissions: ReadonlyArray<PermissionsParams>; | ||
} | ||
export interface IconType { | ||
data?: any; | ||
mimeType?: string; | ||
modifiedTime?: string; | ||
readonly data?: any; | ||
readonly mimeType?: string; | ||
readonly modifiedTime?: string; | ||
} | ||
export interface ContentType { | ||
name: string; | ||
displayName: string; | ||
description: string; | ||
superType: string; | ||
abstract: boolean; | ||
final: boolean; | ||
allowChildContent: boolean; | ||
displayNameExpression: string; | ||
icon: Array<IconType>; | ||
form: Array<any>; | ||
readonly name: string; | ||
readonly displayName: string; | ||
readonly description: string; | ||
readonly superType: string; | ||
readonly abstract: boolean; | ||
readonly final: boolean; | ||
readonly allowChildContent: boolean; | ||
readonly displayNameExpression: string; | ||
readonly icon: ReadonlyArray<IconType>; | ||
readonly form: ReadonlyArray<any>; | ||
} | ||
@@ -188,3 +188,3 @@ export declare function get<A>(params: GetContentParams): IOEither<EnonicError, Content<A>>; | ||
export declare function publish(params: PublishContentParams): IOEither<EnonicError, PublishResponse>; | ||
export declare function unpublish(params: UnpublishContentParams): IOEither<EnonicError, Array<string>>; | ||
export declare function unpublish(params: UnpublishContentParams): IOEither<EnonicError, ReadonlyArray<string>>; | ||
export declare function getChildren<A>(params: GetChildrenParams): IOEither<EnonicError, QueryResponse<A>>; | ||
@@ -201,2 +201,2 @@ export declare function move<A>(params: MoveParams): IOEither<EnonicError, Content<A>>; | ||
export declare function getType(name: string): IOEither<EnonicError, ContentType>; | ||
export declare function getTypes(): IOEither<EnonicError, Array<ContentType>>; | ||
export declare function getTypes(): IOEither<EnonicError, ReadonlyArray<ContentType>>; |
@@ -5,33 +5,33 @@ import { IO } from "fp-ts/lib/IO"; | ||
export interface Context { | ||
repository: string; | ||
branch: string; | ||
authInfo: AuthInfo; | ||
readonly repository: string; | ||
readonly branch: string; | ||
readonly authInfo: AuthInfo; | ||
} | ||
interface AuthInfo { | ||
user: User; | ||
readonly user: User; | ||
} | ||
interface User { | ||
type: string; | ||
key: string; | ||
displayName: string; | ||
disabled: boolean; | ||
email: string; | ||
login: string; | ||
idProvider: string; | ||
readonly type: string; | ||
readonly key: string; | ||
readonly displayName: string; | ||
readonly disabled: boolean; | ||
readonly email: string; | ||
readonly login: string; | ||
readonly idProvider: string; | ||
} | ||
export declare function get(): IOEither<EnonicError, Context>; | ||
interface RunContext { | ||
repository?: string; | ||
branch?: string; | ||
user?: { | ||
login: string; | ||
idProvider?: string; | ||
readonly repository?: string; | ||
readonly branch?: string; | ||
readonly user?: { | ||
readonly login: string; | ||
readonly idProvider?: string; | ||
}; | ||
principals?: Array<string>; | ||
attributes?: { | ||
[key: string]: string | boolean | number; | ||
readonly principals?: ReadonlyArray<string>; | ||
readonly attributes?: { | ||
readonly [key: string]: string | boolean | number; | ||
}; | ||
} | ||
export declare function get(): IOEither<EnonicError, Context>; | ||
export declare function runUnsafe<A>(runContext: RunContext, f: () => A): A; | ||
export declare function run<A>(runContext: RunContext): (a: IO<A>) => IO<A>; | ||
export {}; |
@@ -5,37 +5,37 @@ import { IOEither } from "fp-ts/lib/IOEither"; | ||
/** Proxy host name to use. */ | ||
host?: string; | ||
readonly host?: string; | ||
/** Proxy port to use. */ | ||
port?: number; | ||
readonly port?: number; | ||
/** User name for proxy authentication. */ | ||
user?: string; | ||
readonly user?: string; | ||
/** Password for proxy authentication. */ | ||
password?: string; | ||
readonly password?: string; | ||
} | ||
interface HttpRequestParamsAuth { | ||
/** User name for basic authentication. */ | ||
user?: string; | ||
readonly user?: string; | ||
/** Password for basic authentication. */ | ||
password?: string; | ||
readonly password?: string; | ||
} | ||
export interface HttpRequestParams { | ||
/** URL to which the request is sent. */ | ||
url: string; | ||
readonly url: string; | ||
/** The HTTP method to use for the request (e.g. "POST", "GET", "HEAD", "PUT", "DELETE"). */ | ||
method?: string; | ||
readonly method?: string; | ||
/** Query or form parameters to be sent with the request. */ | ||
params?: { | ||
[key: string]: string; | ||
readonly params?: { | ||
readonly [key: string]: string; | ||
}; | ||
/** HTTP headers, an object where the keys are header names and the values the header values. */ | ||
headers?: { | ||
[key: string]: string; | ||
readonly headers?: { | ||
readonly [key: string]: string; | ||
}; | ||
/** The timeout on establishing the connection, in milliseconds. */ | ||
connectionTimeout?: number; | ||
readonly connectionTimeout?: number; | ||
/** The timeout on waiting to receive data, in milliseconds. */ | ||
readTimeout?: number; | ||
readonly readTimeout?: number; | ||
/** Body content to send with the request, usually for POST or PUT requests. It can be of type string or stream. */ | ||
body?: string | any; | ||
readonly body?: string | any; | ||
/** Content type of the request. */ | ||
contentType?: string; | ||
readonly contentType?: string; | ||
/** | ||
@@ -46,7 +46,7 @@ * Multipart form data to send with the request, an array of part objects. Each part object contains | ||
*/ | ||
multipart?: Array<object>; | ||
readonly multipart?: ReadonlyArray<object>; | ||
/** Settings for basic authentication. */ | ||
auth?: HttpRequestParamsAuth; | ||
readonly auth?: HttpRequestParamsAuth; | ||
/** Proxy settings. */ | ||
proxy?: HttpRequestParamsProxy; | ||
readonly proxy?: HttpRequestParamsProxy; | ||
/** | ||
@@ -56,19 +56,19 @@ * If set to false redirect responses (status=3xx) will not trigger a new internal request, and the function will | ||
*/ | ||
followRedirects?: boolean; | ||
readonly followRedirects?: boolean; | ||
} | ||
export interface HttpResponse { | ||
/** HTTP status code returned. */ | ||
status: number; | ||
readonly status: number; | ||
/** HTTP status message returned. */ | ||
message: string; | ||
readonly message: string; | ||
/** HTTP headers of the response. */ | ||
headers: { | ||
[key: string]: string | undefined; | ||
readonly headers: { | ||
readonly [key: string]: string | undefined; | ||
}; | ||
/** Content type of the response. */ | ||
contentType: string; | ||
readonly contentType: string; | ||
/** Body of the response as string. Null if the response content-type is not of type text. */ | ||
body: string | null; | ||
readonly body: string | null; | ||
/** Body of the response as a stream object. */ | ||
bodyStream: any; | ||
readonly bodyStream: any; | ||
} | ||
@@ -75,0 +75,0 @@ /** |
import { Option } from "fp-ts/lib/Option"; | ||
export declare function getPhrases(locale: string | Array<string>, bundles: Array<string>): { | ||
export interface LocalizeParams { | ||
readonly key: string; | ||
readonly locale?: string | ReadonlyArray<string>; | ||
readonly values?: ReadonlyArray<string>; | ||
readonly bundles?: ReadonlyArray<string>; | ||
readonly application?: string; | ||
} | ||
export declare function getPhrases(locale: string | ReadonlyArray<string>, bundles: ReadonlyArray<string>): { | ||
[key: string]: string; | ||
}; | ||
export declare function getSupportedLocales(bundles: Array<string>): Array<string>; | ||
export interface LocalizeParams { | ||
key: string; | ||
locale?: string | Array<string>; | ||
values?: Array<string>; | ||
bundles?: Array<string>; | ||
application?: string; | ||
} | ||
export declare function getSupportedLocales(bundles: ReadonlyArray<string>): ReadonlyArray<string>; | ||
export declare function localize(params: LocalizeParams): Option<string>; |
import { IO } from "fp-ts/lib/IO"; | ||
export declare function info(...args: Array<any>): IO<void>; | ||
export declare function warn(...args: Array<any>): IO<void>; | ||
export declare function error(...args: Array<any>): IO<void>; | ||
export declare function info(...args: ReadonlyArray<any>): IO<void>; | ||
export declare function warn(...args: ReadonlyArray<any>): IO<void>; | ||
export declare function error(...args: ReadonlyArray<any>): IO<void>; |
import { IOEither } from "fp-ts/lib/IOEither"; | ||
import { EnonicError } from "./common"; | ||
export interface EmailAttachment { | ||
fileName: string; | ||
data: any; | ||
mimeType: string; | ||
headers: { | ||
readonly fileName: string; | ||
readonly data: any; | ||
readonly mimeType: string; | ||
readonly headers: { | ||
[key: string]: string; | ||
@@ -12,13 +12,13 @@ }; | ||
export interface EmailParams { | ||
from: string; | ||
to: string | Array<string>; | ||
cc?: string | Array<string>; | ||
bcc?: string | Array<string>; | ||
replyTo?: string; | ||
subject: string; | ||
body: string; | ||
contentType?: string; | ||
headers?: string; | ||
attachments?: Array<EmailAttachment>; | ||
readonly from: string; | ||
readonly to: string | ReadonlyArray<string>; | ||
readonly cc?: string | ReadonlyArray<string>; | ||
readonly bcc?: string | ReadonlyArray<string>; | ||
readonly replyTo?: string; | ||
readonly subject: string; | ||
readonly body: string; | ||
readonly contentType?: string; | ||
readonly headers?: string; | ||
readonly attachments?: ReadonlyArray<EmailAttachment>; | ||
} | ||
export declare function send(params: EmailParams): IOEither<EnonicError, void>; |
@@ -5,18 +5,18 @@ import { IOEither } from "fp-ts/lib/IOEither"; | ||
export interface Source { | ||
repoId: string; | ||
branch: string; | ||
user?: { | ||
login: string; | ||
idProvider?: string; | ||
readonly repoId: string; | ||
readonly branch: string; | ||
readonly user?: { | ||
readonly login: string; | ||
readonly idProvider?: string; | ||
}; | ||
principals?: Array<string>; | ||
readonly principals?: ReadonlyArray<string>; | ||
} | ||
export interface NodeQueryHit { | ||
id: string; | ||
score: number; | ||
readonly id: string; | ||
readonly score: number; | ||
} | ||
export interface NodeQueryResponse { | ||
total: number; | ||
count: number; | ||
hits: Array<NodeQueryHit>; | ||
readonly total: number; | ||
readonly count: number; | ||
readonly hits: ReadonlyArray<NodeQueryHit>; | ||
} | ||
@@ -27,27 +27,27 @@ export interface NodeQueryParams { | ||
*/ | ||
start?: number; | ||
readonly start?: number; | ||
/** | ||
* Number of contents to fetch. | ||
*/ | ||
count?: number; | ||
readonly count?: number; | ||
/** | ||
* Query expression. | ||
*/ | ||
query: string; | ||
readonly query: string; | ||
/** | ||
* Query filters | ||
*/ | ||
filters?: any; | ||
readonly filters?: any; | ||
/** | ||
* Sorting expression. | ||
*/ | ||
sort?: string; | ||
readonly sort?: string; | ||
/** | ||
* Aggregations expression. | ||
*/ | ||
aggregations?: string; | ||
readonly aggregations?: string; | ||
/** | ||
* Return score calculation explanation. | ||
*/ | ||
explain?: boolean; | ||
readonly explain?: boolean; | ||
} | ||
@@ -59,32 +59,32 @@ export interface IndexConfigEntry { | ||
*/ | ||
decideByType: boolean; | ||
readonly decideByType: boolean; | ||
/** | ||
* If false, indexing will be disabled for the affected properties | ||
*/ | ||
enabled: boolean; | ||
readonly enabled: boolean; | ||
/** | ||
* Values are stored as 'ngram' | ||
*/ | ||
nGram: boolean; | ||
readonly nGram: boolean; | ||
/** | ||
* Values are stored as 'ngram', 'analyzed' and also added to the _allText system property | ||
*/ | ||
fulltext: boolean; | ||
readonly fulltext: boolean; | ||
/** | ||
* Affected values will be added to the _allText property | ||
*/ | ||
includeInAllText: boolean; | ||
readonly includeInAllText: boolean; | ||
/** | ||
* Values are stored as 'path' type and applicable for the pathMatch-function | ||
*/ | ||
path: boolean; | ||
indexValueProcessors: Array<any>; | ||
languages: Array<any>; | ||
readonly path: boolean; | ||
readonly indexValueProcessors: ReadonlyArray<any>; | ||
readonly languages: ReadonlyArray<any>; | ||
} | ||
export declare type IndexConfigTemplates = "none" | "byType" | "fulltext" | "path" | "minimal"; | ||
export interface IndexConfig { | ||
default: IndexConfigEntry | IndexConfigTemplates; | ||
configs?: Array<{ | ||
path: string; | ||
config: IndexConfigEntry | IndexConfigTemplates; | ||
readonly default: IndexConfigEntry | IndexConfigTemplates; | ||
readonly configs?: ReadonlyArray<{ | ||
readonly path: string; | ||
readonly config: IndexConfigEntry | IndexConfigTemplates; | ||
}>; | ||
@@ -96,41 +96,41 @@ } | ||
*/ | ||
_name?: string; | ||
readonly _name?: string; | ||
/** | ||
* Path to place content under. | ||
*/ | ||
_parentPath?: string; | ||
readonly _parentPath?: string; | ||
/** | ||
* How the document should be indexed. A default value "byType" will be set if no value specified. | ||
*/ | ||
_indexConfig?: IndexConfig; | ||
readonly _indexConfig?: IndexConfig; | ||
/** | ||
* The access control list for the node. By default the creator will have full access | ||
*/ | ||
_permissions?: Array<PermissionsParams>; | ||
readonly _permissions?: ReadonlyArray<PermissionsParams>; | ||
/** | ||
* true if the permissions should be inherited from the node parent. Default is false. | ||
*/ | ||
_inheritsPermissions?: boolean; | ||
readonly _inheritsPermissions?: boolean; | ||
/** | ||
* Value used to order document when ordering by parent and child-order is set to manual | ||
*/ | ||
_manualOrderValue?: number; | ||
readonly _manualOrderValue?: number; | ||
/** | ||
* Default ordering of children when doing getChildren if no order is given in query | ||
*/ | ||
_childOrder?: string; | ||
readonly _childOrder?: string; | ||
} | ||
export interface RepoNode { | ||
_id: string; | ||
_childOrder: string; | ||
_indexConfig: IndexConfig; | ||
_inheritsPermissions: boolean; | ||
_permissions: Array<PermissionsParams>; | ||
_state: string; | ||
_nodeType: string; | ||
readonly _id: string; | ||
readonly _childOrder: string; | ||
readonly _indexConfig: IndexConfig; | ||
readonly _inheritsPermissions: boolean; | ||
readonly _permissions: ReadonlyArray<PermissionsParams>; | ||
readonly _state: string; | ||
readonly _nodeType: string; | ||
} | ||
export interface RepoConnection { | ||
create<A>(a: A & NodeCreateParams): A & RepoNode; | ||
delete(keys: Array<string> | string): boolean; | ||
get<A>(keys: string | Array<string>): Array<A & RepoNode>; | ||
delete(keys: ReadonlyArray<string> | string): boolean; | ||
get<A>(keys: string | ReadonlyArray<string>): ReadonlyArray<A & RepoNode>; | ||
query<A>(params: NodeQueryParams): NodeQueryResponse; | ||
@@ -145,3 +145,3 @@ } | ||
*/ | ||
export declare function get<A>(repo: RepoConnection, keys: string | Array<string>): IOEither<EnonicError, Array<A & RepoNode>>; | ||
export declare function get<A>(repo: RepoConnection, keys: string | ReadonlyArray<string>): IOEither<EnonicError, ReadonlyArray<A & RepoNode>>; | ||
/** | ||
@@ -154,3 +154,3 @@ * This function creates a node. | ||
*/ | ||
export declare function remove(repo: RepoConnection, keys: Array<string>): IOEither<EnonicError, boolean>; | ||
export declare function remove(repo: RepoConnection, keys: ReadonlyArray<string>): IOEither<EnonicError, boolean>; | ||
/** | ||
@@ -157,0 +157,0 @@ * This command queries nodes. |
@@ -5,97 +5,97 @@ import { IOEither } from "fp-ts/lib/IOEither"; | ||
export interface IdProviderUrlParams { | ||
idProvider?: string; | ||
contextPath?: string; | ||
type?: "server" | "absolute"; | ||
params?: { | ||
[key: string]: string; | ||
readonly idProvider?: string; | ||
readonly contextPath?: string; | ||
readonly type?: "server" | "absolute"; | ||
readonly params?: { | ||
readonly [key: string]: string; | ||
}; | ||
} | ||
export interface ImagePlaceHolderParams { | ||
width: number; | ||
height: number; | ||
readonly width: number; | ||
readonly height: number; | ||
} | ||
export interface AssetUrlParams { | ||
path: string; | ||
application?: string; | ||
type?: "server" | "absolute"; | ||
params?: { | ||
[key: string]: string; | ||
readonly path: string; | ||
readonly application?: string; | ||
readonly type?: "server" | "absolute"; | ||
readonly params?: { | ||
readonly [key: string]: string; | ||
}; | ||
} | ||
export interface AttachmentUrlParams { | ||
id?: string; | ||
path?: string; | ||
name?: string; | ||
label?: string; | ||
download?: boolean; | ||
params?: { | ||
[key: string]: string; | ||
readonly id?: string; | ||
readonly path?: string; | ||
readonly name?: string; | ||
readonly label?: string; | ||
readonly download?: boolean; | ||
readonly params?: { | ||
readonly [key: string]: string; | ||
}; | ||
type?: "server" | "absolute"; | ||
readonly type?: "server" | "absolute"; | ||
} | ||
export interface ComponentUrlParams { | ||
id?: string; | ||
path?: string; | ||
component?: string; | ||
type?: "server" | "absolute"; | ||
params?: { | ||
[key: string]: string; | ||
readonly id?: string; | ||
readonly path?: string; | ||
readonly component?: string; | ||
readonly type?: "server" | "absolute"; | ||
readonly params?: { | ||
readonly [key: string]: string; | ||
}; | ||
} | ||
export interface ImageUrlParams { | ||
id?: string; | ||
path?: string; | ||
scale: string; | ||
quality?: number; | ||
background?: string; | ||
format?: string; | ||
filter?: string; | ||
type?: "server" | "absolute"; | ||
params?: { | ||
[key: string]: string; | ||
readonly id?: string; | ||
readonly path?: string; | ||
readonly scale: string; | ||
readonly quality?: number; | ||
readonly background?: string; | ||
readonly format?: string; | ||
readonly filter?: string; | ||
readonly type?: "server" | "absolute"; | ||
readonly params?: { | ||
readonly [key: string]: string; | ||
}; | ||
} | ||
export interface PageUrlParams { | ||
id?: string; | ||
path?: string; | ||
type?: "server" | "absolute"; | ||
params?: { | ||
[key: string]: string; | ||
readonly id?: string; | ||
readonly path?: string; | ||
readonly type?: "server" | "absolute"; | ||
readonly params?: { | ||
readonly [key: string]: string; | ||
}; | ||
} | ||
export interface LoginUrlParams { | ||
idProvider?: string; | ||
redirect?: string; | ||
contextPath?: string; | ||
type?: "server" | "absolute"; | ||
params?: { | ||
[key: string]: string; | ||
readonly idProvider?: string; | ||
readonly redirect?: string; | ||
readonly contextPath?: string; | ||
readonly type?: "server" | "absolute"; | ||
readonly params?: { | ||
readonly [key: string]: string; | ||
}; | ||
} | ||
export interface LogoutUrlParams { | ||
redirect?: string; | ||
contextPath?: string; | ||
type?: "server" | "absolute"; | ||
params?: { | ||
[key: string]: string; | ||
readonly redirect?: string; | ||
readonly contextPath?: string; | ||
readonly type?: "server" | "absolute"; | ||
readonly params?: { | ||
readonly [key: string]: string; | ||
}; | ||
} | ||
export interface ServiceUrlParams { | ||
service: string; | ||
application?: string; | ||
type?: "server" | "absolute"; | ||
params?: { | ||
[key: string]: string; | ||
readonly service: string; | ||
readonly application?: string; | ||
readonly type?: "server" | "absolute"; | ||
readonly params?: { | ||
readonly [key: string]: string; | ||
}; | ||
} | ||
export interface UrlParams { | ||
path?: string; | ||
type?: "server" | "absolute"; | ||
params?: { | ||
[key: string]: string; | ||
readonly path?: string; | ||
readonly type?: "server" | "absolute"; | ||
readonly params?: { | ||
readonly [key: string]: string; | ||
}; | ||
} | ||
export interface ProcessHtmlParams { | ||
value: string; | ||
type?: "server" | "absolute"; | ||
readonly value: string; | ||
readonly type?: "server" | "absolute"; | ||
} | ||
@@ -102,0 +102,0 @@ export declare function getContent<A>(): IOEither<EnonicError, Content<A>>; |
@@ -5,13 +5,13 @@ import { IOEither } from "fp-ts/lib/IOEither"; | ||
export interface IndexDefinition { | ||
settings: any; | ||
mapping: any; | ||
readonly settings: any; | ||
readonly mapping: any; | ||
} | ||
export interface CreateRepoParams { | ||
id: string; | ||
rootPermissions?: Array<PermissionsParams>; | ||
settings?: { | ||
definitions?: { | ||
search?: IndexDefinition; | ||
version?: IndexDefinition; | ||
branch?: IndexDefinition; | ||
readonly id: string; | ||
readonly rootPermissions?: ReadonlyArray<PermissionsParams>; | ||
readonly settings?: { | ||
readonly definitions?: { | ||
readonly search?: IndexDefinition; | ||
readonly version?: IndexDefinition; | ||
readonly branch?: IndexDefinition; | ||
}; | ||
@@ -21,18 +21,18 @@ }; | ||
export interface CreateBranchParams { | ||
branchId: string; | ||
repoId: string; | ||
readonly branchId: string; | ||
readonly repoId: string; | ||
} | ||
export interface RepositoryConfig { | ||
id: string; | ||
branches: Array<string>; | ||
settings: any; | ||
readonly id: string; | ||
readonly branches: ReadonlyArray<string>; | ||
readonly settings: any; | ||
} | ||
export interface RefreshParams { | ||
mode?: string; | ||
repo?: string; | ||
branch?: string; | ||
readonly mode?: string; | ||
readonly repo?: string; | ||
readonly branch?: string; | ||
} | ||
export interface DeleteBranchParams { | ||
branchId: string; | ||
repoId: string; | ||
readonly branchId: string; | ||
readonly repoId: string; | ||
} | ||
@@ -42,5 +42,5 @@ export declare function create(params: CreateRepoParams): IOEither<EnonicError, RepositoryConfig>; | ||
export declare function get(id: string): IOEither<EnonicError, RepositoryConfig>; | ||
export declare function list(): IOEither<EnonicError, Array<RepositoryConfig>>; | ||
export declare function list(): IOEither<EnonicError, ReadonlyArray<RepositoryConfig>>; | ||
export declare function remove(id: string): IOEither<EnonicError, boolean>; | ||
export declare function deleteBranch(params: DeleteBranchParams): IOEither<EnonicError, any>; | ||
export declare function refresh(params: RefreshParams): IOEither<EnonicError, Array<RepositoryConfig>>; | ||
export declare function refresh(params: RefreshParams): IOEither<EnonicError, ReadonlyArray<RepositoryConfig>>; |
import { IOEither } from "fp-ts/lib/IOEither"; | ||
import { EnonicError } from "./common"; | ||
export interface ThymeleafRenderOptions { | ||
mode: "HTML" | "XML" | "TEXT" | "JAVASCRIPT" | "CSS" | "RAW"; | ||
readonly mode: "HTML" | "XML" | "TEXT" | "JAVASCRIPT" | "CSS" | "RAW"; | ||
} | ||
@@ -6,0 +6,0 @@ export declare function renderUnsafe<A>(view: any, model?: A, options?: ThymeleafRenderOptions): string; |
{ | ||
"name": "enonic-fp", | ||
"version": "0.1.5", | ||
"version": "0.1.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
56014