@tsed/formio 6.95.7 → 6.96.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +10 -10
- package/lib/cjs/FormioModule.d.ts +0 -24
- package/lib/cjs/builder/FormioMapper.d.ts +0 -11
- package/lib/cjs/components/AlterActions.d.ts +0 -15
- package/lib/cjs/components/AlterAudit.d.ts +0 -5
- package/lib/cjs/components/AlterHost.d.ts +0 -5
- package/lib/cjs/components/AlterLog.d.ts +0 -5
- package/lib/cjs/components/AlterSkip.d.ts +0 -7
- package/lib/cjs/components/AlterTemplateExportSteps.d.ts +0 -12
- package/lib/cjs/components/AlterTemplateImportSteps.d.ts +0 -11
- package/lib/cjs/decorators/action.d.ts +0 -7
- package/lib/cjs/decorators/actionCtx.d.ts +0 -23
- package/lib/cjs/decorators/alter.d.ts +0 -6
- package/lib/cjs/decorators/on.d.ts +0 -6
- package/lib/cjs/decorators/useFormioAuth.d.ts +0 -6
- package/lib/cjs/domain/AlterHook.d.ts +0 -3
- package/lib/cjs/domain/Formio.d.ts +0 -112
- package/lib/cjs/domain/FormioAction.d.ts +0 -20
- package/lib/cjs/domain/FormioActionsIndex.d.ts +0 -15
- package/lib/cjs/domain/FormioAuth.d.ts +0 -67
- package/lib/cjs/domain/FormioBaseModel.d.ts +0 -11
- package/lib/cjs/domain/FormioConfig.d.ts +0 -59
- package/lib/cjs/domain/FormioCtxMapper.d.ts +0 -7
- package/lib/cjs/domain/FormioDecodedToken.d.ts +0 -12
- package/lib/cjs/domain/FormioErrors.d.ts +0 -53
- package/lib/cjs/domain/FormioHooks.d.ts +0 -194
- package/lib/cjs/domain/FormioJs.d.ts +0 -17
- package/lib/cjs/domain/FormioModels.d.ts +0 -42
- package/lib/cjs/domain/FormioRouter.d.ts +0 -7
- package/lib/cjs/domain/FormioSettings.d.ts +0 -53
- package/lib/cjs/domain/FormioTemplate.d.ts +0 -8
- package/lib/cjs/domain/FormioTemplateUtil.d.ts +0 -13
- package/lib/cjs/domain/FormioUpdate.d.ts +0 -19
- package/lib/cjs/domain/FormioUtils.d.ts +0 -307
- package/lib/cjs/domain/OnHook.d.ts +0 -3
- package/lib/cjs/domain/Resource.d.ts +0 -18
- package/lib/cjs/index.d.ts +0 -38
- package/lib/cjs/middlewares/FormioAuthMiddleware.d.ts +0 -11
- package/lib/cjs/services/FormioAuthService.d.ts +0 -54
- package/lib/cjs/services/FormioDatabase.d.ts +0 -24
- package/lib/cjs/services/FormioHooksService.d.ts +0 -17
- package/lib/cjs/services/FormioInstaller.d.ts +0 -14
- package/lib/cjs/services/FormioService.d.ts +0 -36
- package/lib/cjs/utils/isMongoId.d.ts +0 -1
package/lib/cjs/index.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export * from "./decorators/action";
|
|
2
|
-
export * from "./decorators/actionCtx";
|
|
3
|
-
export * from "./decorators/alter";
|
|
4
|
-
export * from "./decorators/on";
|
|
5
|
-
export * from "./decorators/useFormioAuth";
|
|
6
|
-
export * from "./middlewares/FormioAuthMiddleware";
|
|
7
|
-
export * from "./domain/AlterHook";
|
|
8
|
-
export * from "./domain/Formio";
|
|
9
|
-
export * from "./domain/FormioDecodedToken";
|
|
10
|
-
export * from "./domain/FormioAction";
|
|
11
|
-
export * from "./domain/FormioActionsIndex";
|
|
12
|
-
export * from "./domain/FormioAuth";
|
|
13
|
-
export * from "./domain/FormioBaseModel";
|
|
14
|
-
export * from "./domain/FormioConfig";
|
|
15
|
-
export * from "./domain/FormioCtxMapper";
|
|
16
|
-
export * from "./domain/FormioErrors";
|
|
17
|
-
export * from "./domain/FormioHooks";
|
|
18
|
-
export * from "./domain/FormioJs";
|
|
19
|
-
export * from "./domain/FormioModels";
|
|
20
|
-
export * from "./domain/FormioRouter";
|
|
21
|
-
export * from "./domain/FormioSettings";
|
|
22
|
-
export * from "./domain/FormioUpdate";
|
|
23
|
-
export * from "./domain/FormioUtils";
|
|
24
|
-
export * from "./domain/FormioTemplate";
|
|
25
|
-
export * from "./domain/FormioTemplateUtil";
|
|
26
|
-
export * from "./domain/OnHook";
|
|
27
|
-
export * from "./FormioModule";
|
|
28
|
-
export * from "./builder/FormioMapper";
|
|
29
|
-
export * from "./services/FormioService";
|
|
30
|
-
export * from "./services/FormioDatabase";
|
|
31
|
-
export * from "./services/FormioDatabase";
|
|
32
|
-
export * from "./services/FormioAuthService";
|
|
33
|
-
export * from "./services/FormioHooksService";
|
|
34
|
-
export * from "./components/AlterActions";
|
|
35
|
-
export * from "./components/AlterAudit";
|
|
36
|
-
export * from "./components/AlterLog";
|
|
37
|
-
export * from "./components/AlterHost";
|
|
38
|
-
export * from "./components/AlterSkip";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Context } from "@tsed/common";
|
|
2
|
-
import { FormioService } from "../services/FormioService";
|
|
3
|
-
/**
|
|
4
|
-
* @middleware
|
|
5
|
-
* @formio
|
|
6
|
-
*/
|
|
7
|
-
export declare class FormioAuthMiddleware {
|
|
8
|
-
protected formio: FormioService;
|
|
9
|
-
get tokenHandler(): any;
|
|
10
|
-
use(ctx: Context): Promise<void>;
|
|
11
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/// <reference types="mongoose" />
|
|
2
|
-
import { PlatformContext, Req } from "@tsed/common";
|
|
3
|
-
import { FormioPayloadToken } from "../domain/FormioDecodedToken";
|
|
4
|
-
import { FormioSubmission, WithID } from "../domain/FormioModels";
|
|
5
|
-
import { FormioDatabase } from "./FormioDatabase";
|
|
6
|
-
import { FormioHooksService } from "./FormioHooksService";
|
|
7
|
-
import { FormioService } from "./FormioService";
|
|
8
|
-
export declare class FormioAuthService {
|
|
9
|
-
formio: FormioService;
|
|
10
|
-
hooks: FormioHooksService;
|
|
11
|
-
db: FormioDatabase;
|
|
12
|
-
get currentUser(): (arg1: Req, arg2: import("@tsed/common").Res) => Promise<unknown>;
|
|
13
|
-
get getToken(): (payload: FormioPayloadToken) => string | boolean;
|
|
14
|
-
get tempToken(): (req: Req, res: import("@tsed/common").Res) => void;
|
|
15
|
-
get logout(): (req: Req, res: import("@tsed/common").Res, next: TsED.NextFunction) => void;
|
|
16
|
-
setCurrentUser<User = any>(user: WithID<FormioSubmission<User>>, token: FormioPayloadToken, ctx: PlatformContext): this;
|
|
17
|
-
/**
|
|
18
|
-
* Generate the payload token for the session
|
|
19
|
-
* @param user
|
|
20
|
-
* @param ctx
|
|
21
|
-
*/
|
|
22
|
-
generatePayloadToken<User = any>(user: WithID<FormioSubmission<User>>, ctx: PlatformContext): Promise<{
|
|
23
|
-
user: WithID<FormioSubmission<User>>;
|
|
24
|
-
token: FormioPayloadToken;
|
|
25
|
-
}>;
|
|
26
|
-
/**
|
|
27
|
-
* Generate session from the given authenticated user.
|
|
28
|
-
* @param user
|
|
29
|
-
* @param ctx
|
|
30
|
-
*/
|
|
31
|
-
generateSession<User = any>(user: WithID<FormioSubmission<User>>, ctx: PlatformContext): Promise<void>;
|
|
32
|
-
/**
|
|
33
|
-
* Retrieve roles
|
|
34
|
-
* @param req
|
|
35
|
-
*/
|
|
36
|
-
getRoles(req?: Req): Promise<import("mongoose").LeanDocument<import("@tsed/mongoose").MongooseMergedDocument<import("mongoose").Document<any, {}> & import("@tsed/formio-types/lib/types/domain/FormioRole").FormioRole & import("@tsed/mongoose").MongooseDocumentMethods<import("@tsed/formio-types/lib/types/domain/FormioRole").FormioRole>>>[]>;
|
|
37
|
-
/**
|
|
38
|
-
* Update the role of the current user submission
|
|
39
|
-
* @param _id
|
|
40
|
-
* @param role
|
|
41
|
-
* @param req
|
|
42
|
-
*/
|
|
43
|
-
updateUserRole(_id: string | any, role: string, req?: Req): Promise<import("@tsed/mongoose").MongooseMergedDocument<import("mongoose").Document<any, {}> & FormioSubmission<any> & import("@tsed/mongoose").MongooseDocumentMethods<FormioSubmission<any>>>>;
|
|
44
|
-
/**
|
|
45
|
-
* Create a user submission in formio
|
|
46
|
-
* @param user
|
|
47
|
-
*/
|
|
48
|
-
createUser<User = any>(user: Partial<FormioSubmission<User>>): Promise<import("mongoose").LeanDocument<import("mongoose").Document<any, {}> & FormioSubmission<any> & import("@tsed/mongoose").MongooseDocumentMethods<FormioSubmission<any>>>>;
|
|
49
|
-
/**
|
|
50
|
-
* Update user submission in formio
|
|
51
|
-
* @param user
|
|
52
|
-
*/
|
|
53
|
-
updateUser<User = any>(user: WithID<FormioSubmission<User>>): Promise<WithID<FormioSubmission<User>>>;
|
|
54
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/// <reference types="mongoose" />
|
|
2
|
-
import { MongooseModel } from "@tsed/mongoose";
|
|
3
|
-
import { FormioAction, FormioActionItem, FormioForm, FormioRole, FormioSubmission, FormioToken } from "@tsed/formio-types";
|
|
4
|
-
import { FormioMapper } from "../builder/FormioMapper";
|
|
5
|
-
import { FormioService } from "./FormioService";
|
|
6
|
-
export declare class FormioDatabase {
|
|
7
|
-
protected formio: FormioService;
|
|
8
|
-
get models(): {
|
|
9
|
-
[index: string]: import("mongoose").Model<any, {}>;
|
|
10
|
-
};
|
|
11
|
-
get roleModel(): MongooseModel<FormioRole>;
|
|
12
|
-
get formModel(): MongooseModel<FormioForm>;
|
|
13
|
-
get actionModel(): MongooseModel<FormioAction>;
|
|
14
|
-
get submissionModel(): MongooseModel<FormioSubmission>;
|
|
15
|
-
get tokenModel(): MongooseModel<FormioToken>;
|
|
16
|
-
get actionItemModel(): MongooseModel<FormioActionItem>;
|
|
17
|
-
getFormioMapper(): Promise<FormioMapper>;
|
|
18
|
-
hasForms(): Promise<boolean>;
|
|
19
|
-
hasForm(name: string): Promise<boolean>;
|
|
20
|
-
getForm(nameOrId: string): Promise<import("mongoose").LeanDocument<import("@tsed/mongoose").MongooseMergedDocument<import("mongoose").Document<any, {}> & FormioForm & import("@tsed/mongoose").MongooseDocumentMethods<FormioForm>>> | null>;
|
|
21
|
-
createFormIfNotExists(form: FormioForm, onCreate?: (form: FormioForm) => any): Promise<import("mongoose").LeanDocument<import("@tsed/mongoose").MongooseMergedDocument<import("mongoose").Document<any, {}> & FormioForm & import("@tsed/mongoose").MongooseDocumentMethods<FormioForm>>> | null>;
|
|
22
|
-
saveFormDefinition(form: FormioForm): Promise<import("mongoose").Document<any, {}> & FormioForm & import("@tsed/mongoose").MongooseDocumentMethods<FormioForm>>;
|
|
23
|
-
idToBson(form?: any): any;
|
|
24
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { InjectorService } from "@tsed/common";
|
|
2
|
-
import { FormioHooks } from "../domain/FormioHooks";
|
|
3
|
-
import { FormioService } from "./FormioService";
|
|
4
|
-
import { Request } from "express";
|
|
5
|
-
export declare class FormioHooksService {
|
|
6
|
-
protected injector: InjectorService;
|
|
7
|
-
protected formio: FormioService;
|
|
8
|
-
get settings(): (req: Request, cb: Function) => void;
|
|
9
|
-
get invoke(): <T = any>(...args: any[]) => boolean | T;
|
|
10
|
-
get alter(): (event: string, ...args: any[]) => any;
|
|
11
|
-
get alterAsync(): (event: string, ...args: any[]) => Promise<any>;
|
|
12
|
-
getHooks(): FormioHooks;
|
|
13
|
-
protected getProviders(type: "alter" | "on"): import("@tsed/common").Provider<any>[];
|
|
14
|
-
protected getHooksProvider(type: "alter" | "on"): {};
|
|
15
|
-
protected bindHooks(type: "alter" | "on", hooks: Record<string, Function[]>): {};
|
|
16
|
-
private createHooks;
|
|
17
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Logger } from "@tsed/logger";
|
|
2
|
-
import { FormioSubmission } from "../domain/FormioModels";
|
|
3
|
-
import { FormioTemplate } from "../domain/FormioTemplate";
|
|
4
|
-
import { FormioDatabase } from "./FormioDatabase";
|
|
5
|
-
import { FormioService } from "./FormioService";
|
|
6
|
-
export declare class FormioInstaller extends FormioDatabase {
|
|
7
|
-
protected formio: FormioService;
|
|
8
|
-
protected logger: Logger;
|
|
9
|
-
install(template: FormioTemplate, root: any): Promise<void>;
|
|
10
|
-
createRootUser<User = unknown>(user: {
|
|
11
|
-
email: string;
|
|
12
|
-
password: string;
|
|
13
|
-
}, template: FormioTemplate): Promise<FormioSubmission<User>>;
|
|
14
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { InjectorService } from "@tsed/common";
|
|
2
|
-
import { Db } from "mongodb";
|
|
3
|
-
import { Mongoose } from "mongoose";
|
|
4
|
-
import { Formio } from "../domain/Formio";
|
|
5
|
-
import { FormioConfig } from "../domain/FormioConfig";
|
|
6
|
-
import { FormioHook, FormioHooks } from "../domain/FormioHooks";
|
|
7
|
-
import { FormioSchemas } from "../domain/FormioModels";
|
|
8
|
-
import { FormioRouter } from "../domain/FormioRouter";
|
|
9
|
-
import { FormioTemplate } from "../domain/FormioTemplate";
|
|
10
|
-
import { FormioExportOptions } from "../domain/FormioTemplateUtil";
|
|
11
|
-
export declare class FormioService {
|
|
12
|
-
router: FormioRouter;
|
|
13
|
-
protected injector: InjectorService;
|
|
14
|
-
get audit(): Function;
|
|
15
|
-
get auth(): import("..").FormioAuth;
|
|
16
|
-
get swagger(): (...args: any[]) => Promise<unknown>;
|
|
17
|
-
get config(): FormioConfig;
|
|
18
|
-
get db(): Db;
|
|
19
|
-
get resources(): any;
|
|
20
|
-
get mongoose(): Mongoose;
|
|
21
|
-
get middleware(): import("../domain/Formio").FormioMiddlewares;
|
|
22
|
-
get schemas(): FormioSchemas;
|
|
23
|
-
get formio(): Formio;
|
|
24
|
-
get hook(): FormioHook;
|
|
25
|
-
get util(): import("..").FormioUtil;
|
|
26
|
-
get template(): import("../domain/FormioTemplateUtil").FormioTemplateUtil;
|
|
27
|
-
get Action(): import("..").FormioActionModelCtor;
|
|
28
|
-
exportTemplate(options?: Partial<FormioExportOptions>): Promise<FormioTemplate>;
|
|
29
|
-
importTemplate(template: FormioTemplate): Promise<FormioTemplate>;
|
|
30
|
-
encrypt(text: string): Promise<string>;
|
|
31
|
-
isInit(): boolean;
|
|
32
|
-
createRouter(options: FormioConfig): any;
|
|
33
|
-
init(options: FormioConfig, hooks?: FormioHooks): Promise<Formio> | undefined;
|
|
34
|
-
protected mapConfiguration(options: FormioConfig): FormioConfig;
|
|
35
|
-
protected bindLogger(): void;
|
|
36
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isMongoId(text: string): RegExpMatchArray | null;
|