@tsed/formio-types 8.0.0 → 8.0.2
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 +4 -3
- package/src/domain/FormioAccess.ts +5 -0
- package/src/domain/FormioAction.ts +12 -0
- package/src/domain/FormioActionInfo.ts +14 -0
- package/src/domain/FormioActionItem.ts +12 -0
- package/src/domain/FormioComponent.ts +22 -0
- package/src/domain/FormioForm.ts +58 -0
- package/src/domain/FormioPermission.ts +4 -0
- package/src/domain/FormioRole.ts +8 -0
- package/src/domain/FormioSchema.ts +6 -0
- package/src/domain/FormioSubmission.ts +16 -0
- package/src/domain/FormioToken.ts +5 -0
- package/src/index.ts +14 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tsed/formio-types",
|
|
3
3
|
"description": "Formio types definition package for Ts.ED framework",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "8.0.
|
|
5
|
+
"version": "8.0.2",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"Formio",
|
|
8
8
|
"Ts.ED",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"typings": "./lib/types/index.d.ts",
|
|
18
18
|
"exports": {
|
|
19
19
|
".": {
|
|
20
|
+
"@tsed/source": "./src/index.ts",
|
|
20
21
|
"types": "./lib/types/index.d.ts",
|
|
21
22
|
"import": "./lib/esm/index.js",
|
|
22
23
|
"default": "./lib/esm/index.js"
|
|
@@ -35,8 +36,8 @@
|
|
|
35
36
|
"formiojs": ">=4.0.0"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
|
-
"@tsed/barrels": "8.0.
|
|
39
|
-
"@tsed/typescript": "8.0.
|
|
39
|
+
"@tsed/barrels": "8.0.2",
|
|
40
|
+
"@tsed/typescript": "8.0.2",
|
|
40
41
|
"eslint": "9.12.0",
|
|
41
42
|
"typescript": "5.4.5"
|
|
42
43
|
},
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface FormioActionItem<Data = any> {
|
|
2
|
+
_id: string | undefined;
|
|
3
|
+
title: string;
|
|
4
|
+
form: string;
|
|
5
|
+
submission?: string;
|
|
6
|
+
action: string;
|
|
7
|
+
handler: string;
|
|
8
|
+
method: string;
|
|
9
|
+
state: "new" | "inprogress" | "complete" | "error";
|
|
10
|
+
messages: any[];
|
|
11
|
+
data: Data;
|
|
12
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type {ExtendedComponentSchema} from "formiojs";
|
|
2
|
+
|
|
3
|
+
import {FormioForm} from "./FormioForm.js";
|
|
4
|
+
|
|
5
|
+
export interface FormioComponent extends ExtendedComponentSchema {
|
|
6
|
+
type: string;
|
|
7
|
+
key: string;
|
|
8
|
+
|
|
9
|
+
// additional props
|
|
10
|
+
template?: string;
|
|
11
|
+
dataSrc?: "json" | "url";
|
|
12
|
+
data?: {
|
|
13
|
+
json?: any;
|
|
14
|
+
url?: string;
|
|
15
|
+
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
valueProperty?: string;
|
|
19
|
+
customConditional?: string;
|
|
20
|
+
components?: FormioComponent[];
|
|
21
|
+
form?: string | FormioForm;
|
|
22
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {FormioComponent} from "./FormioComponent.js";
|
|
2
|
+
import {FormioPermission} from "./FormioPermission.js";
|
|
3
|
+
|
|
4
|
+
export interface FormioForm extends Record<string, any> {
|
|
5
|
+
_id: string | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* The title for the form
|
|
8
|
+
*/
|
|
9
|
+
title: string;
|
|
10
|
+
/**
|
|
11
|
+
* The machine name for this form
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
/**
|
|
15
|
+
* The path for this resource
|
|
16
|
+
*/
|
|
17
|
+
path: string;
|
|
18
|
+
/**
|
|
19
|
+
* The form type.
|
|
20
|
+
*/
|
|
21
|
+
type: string;
|
|
22
|
+
/**
|
|
23
|
+
* The display method for this form
|
|
24
|
+
*/
|
|
25
|
+
display?: "form" | "wizard" | string;
|
|
26
|
+
/**
|
|
27
|
+
* A custom action URL to submit the data to.
|
|
28
|
+
*/
|
|
29
|
+
action?: string;
|
|
30
|
+
|
|
31
|
+
tags?: string[];
|
|
32
|
+
|
|
33
|
+
deleted: number | null;
|
|
34
|
+
/**
|
|
35
|
+
* Access rules
|
|
36
|
+
*/
|
|
37
|
+
access: FormioPermission[];
|
|
38
|
+
/**
|
|
39
|
+
* Submission access rules
|
|
40
|
+
*/
|
|
41
|
+
submissionAccess: FormioPermission[];
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
owner: string;
|
|
46
|
+
/**
|
|
47
|
+
* Components.
|
|
48
|
+
*/
|
|
49
|
+
components: FormioComponent[];
|
|
50
|
+
/**
|
|
51
|
+
* Custom form settings object.
|
|
52
|
+
*/
|
|
53
|
+
settings?: any;
|
|
54
|
+
/**
|
|
55
|
+
* Custom form properties.
|
|
56
|
+
*/
|
|
57
|
+
properties?: any;
|
|
58
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {FormioAccess} from "./FormioAccess.js";
|
|
2
|
+
|
|
3
|
+
export interface FormioSubmission<Data = any> extends Record<string, any> {
|
|
4
|
+
_id: string | undefined;
|
|
5
|
+
form: string;
|
|
6
|
+
data: Data;
|
|
7
|
+
owner?: string;
|
|
8
|
+
roles?: string[];
|
|
9
|
+
access?: FormioAccess[];
|
|
10
|
+
externalIds?: {type?: string; resource?: string; id?: string}[];
|
|
11
|
+
metadata?: Record<string, any>;
|
|
12
|
+
created?: string;
|
|
13
|
+
updated?: string;
|
|
14
|
+
deleted?: string | null;
|
|
15
|
+
modified?: string;
|
|
16
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Automatically generated by @tsed/barrels.
|
|
3
|
+
*/
|
|
4
|
+
export * from "./domain/FormioAccess.js";
|
|
5
|
+
export * from "./domain/FormioAction.js";
|
|
6
|
+
export * from "./domain/FormioActionInfo.js";
|
|
7
|
+
export * from "./domain/FormioActionItem.js";
|
|
8
|
+
export * from "./domain/FormioComponent.js";
|
|
9
|
+
export * from "./domain/FormioForm.js";
|
|
10
|
+
export * from "./domain/FormioPermission.js";
|
|
11
|
+
export * from "./domain/FormioRole.js";
|
|
12
|
+
export * from "./domain/FormioSchema.js";
|
|
13
|
+
export * from "./domain/FormioSubmission.js";
|
|
14
|
+
export * from "./domain/FormioToken.js";
|