@tsed/formio-types 6.88.1 → 6.89.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.
Files changed (86) hide show
  1. package/lib/{domain → cjs/domain}/FormioAccess.d.ts +0 -0
  2. package/lib/cjs/domain/FormioAccess.js +3 -0
  3. package/lib/cjs/domain/FormioAccess.js.map +1 -0
  4. package/lib/{domain → cjs/domain}/FormioAction.d.ts +0 -0
  5. package/lib/cjs/domain/FormioAction.js +3 -0
  6. package/lib/cjs/domain/FormioAction.js.map +1 -0
  7. package/lib/{domain → cjs/domain}/FormioActionInfo.d.ts +0 -0
  8. package/lib/cjs/domain/FormioActionInfo.js +3 -0
  9. package/lib/cjs/domain/FormioActionInfo.js.map +1 -0
  10. package/lib/{domain → cjs/domain}/FormioActionItem.d.ts +0 -0
  11. package/lib/cjs/domain/FormioActionItem.js +3 -0
  12. package/lib/cjs/domain/FormioActionItem.js.map +1 -0
  13. package/lib/{domain → cjs/domain}/FormioComponent.d.ts +0 -0
  14. package/lib/cjs/domain/FormioComponent.js +3 -0
  15. package/lib/cjs/domain/FormioComponent.js.map +1 -0
  16. package/lib/{domain → cjs/domain}/FormioForm.d.ts +0 -0
  17. package/lib/cjs/domain/FormioForm.js +3 -0
  18. package/lib/cjs/domain/FormioForm.js.map +1 -0
  19. package/lib/{domain → cjs/domain}/FormioPermission.d.ts +0 -0
  20. package/lib/cjs/domain/FormioPermission.js +3 -0
  21. package/lib/cjs/domain/FormioPermission.js.map +1 -0
  22. package/lib/{domain → cjs/domain}/FormioRole.d.ts +0 -0
  23. package/lib/cjs/domain/FormioRole.js +3 -0
  24. package/lib/cjs/domain/FormioRole.js.map +1 -0
  25. package/lib/{domain → cjs/domain}/FormioSchema.d.ts +0 -0
  26. package/lib/cjs/domain/FormioSchema.js +3 -0
  27. package/lib/cjs/domain/FormioSchema.js.map +1 -0
  28. package/lib/{domain → cjs/domain}/FormioSubmission.d.ts +0 -0
  29. package/lib/cjs/domain/FormioSubmission.js +3 -0
  30. package/lib/cjs/domain/FormioSubmission.js.map +1 -0
  31. package/lib/{domain → cjs/domain}/FormioToken.d.ts +0 -0
  32. package/lib/cjs/domain/FormioToken.js +3 -0
  33. package/lib/cjs/domain/FormioToken.js.map +1 -0
  34. package/lib/{index.d.ts → cjs/index.d.ts} +0 -0
  35. package/lib/cjs/index.js +14 -0
  36. package/lib/cjs/index.js.map +1 -0
  37. package/lib/{domain → esm/domain}/FormioAccess.js +0 -0
  38. package/lib/esm/domain/FormioAccess.js.map +1 -0
  39. package/lib/{domain → esm/domain}/FormioAction.js +0 -0
  40. package/lib/esm/domain/FormioAction.js.map +1 -0
  41. package/lib/{domain → esm/domain}/FormioActionInfo.js +0 -0
  42. package/lib/esm/domain/FormioActionInfo.js.map +1 -0
  43. package/lib/{domain → esm/domain}/FormioActionItem.js +0 -0
  44. package/lib/esm/domain/FormioActionItem.js.map +1 -0
  45. package/lib/{domain → esm/domain}/FormioComponent.js +0 -0
  46. package/lib/esm/domain/FormioComponent.js.map +1 -0
  47. package/lib/{domain → esm/domain}/FormioForm.js +0 -0
  48. package/lib/esm/domain/FormioForm.js.map +1 -0
  49. package/lib/{domain → esm/domain}/FormioPermission.js +0 -0
  50. package/lib/esm/domain/FormioPermission.js.map +1 -0
  51. package/lib/{domain → esm/domain}/FormioRole.js +0 -0
  52. package/lib/esm/domain/FormioRole.js.map +1 -0
  53. package/lib/{domain → esm/domain}/FormioSchema.js +0 -0
  54. package/lib/esm/domain/FormioSchema.js.map +1 -0
  55. package/lib/{domain → esm/domain}/FormioSubmission.js +0 -0
  56. package/lib/esm/domain/FormioSubmission.js.map +1 -0
  57. package/lib/{domain → esm/domain}/FormioToken.js +0 -0
  58. package/lib/esm/domain/FormioToken.js.map +1 -0
  59. package/lib/{index.js → esm/index.js} +0 -0
  60. package/lib/esm/index.js.map +1 -0
  61. package/lib/types/domain/FormioAccess.d.ts +5 -0
  62. package/lib/types/domain/FormioAction.d.ts +12 -0
  63. package/lib/types/domain/FormioActionInfo.d.ts +14 -0
  64. package/lib/types/domain/FormioActionItem.d.ts +12 -0
  65. package/lib/types/domain/FormioComponent.d.ts +17 -0
  66. package/lib/types/domain/FormioForm.d.ts +55 -0
  67. package/lib/types/domain/FormioPermission.d.ts +4 -0
  68. package/lib/types/domain/FormioRole.d.ts +8 -0
  69. package/lib/types/domain/FormioSchema.d.ts +6 -0
  70. package/lib/types/domain/FormioSubmission.d.ts +19 -0
  71. package/lib/types/domain/FormioToken.d.ts +5 -0
  72. package/lib/types/index.d.ts +10 -0
  73. package/package.json +13 -5
  74. package/tsconfig.compile.esm.json +23 -0
  75. package/lib/domain/FormioAccess.js.map +0 -1
  76. package/lib/domain/FormioAction.js.map +0 -1
  77. package/lib/domain/FormioActionInfo.js.map +0 -1
  78. package/lib/domain/FormioActionItem.js.map +0 -1
  79. package/lib/domain/FormioComponent.js.map +0 -1
  80. package/lib/domain/FormioForm.js.map +0 -1
  81. package/lib/domain/FormioPermission.js.map +0 -1
  82. package/lib/domain/FormioRole.js.map +0 -1
  83. package/lib/domain/FormioSchema.js.map +0 -1
  84. package/lib/domain/FormioSubmission.js.map +0 -1
  85. package/lib/domain/FormioToken.js.map +0 -1
  86. package/lib/index.js.map +0 -1
File without changes
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=FormioAccess.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioAccess.js","sourceRoot":"","sources":["../../../src/domain/FormioAccess.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioAccess {\n _id: string | undefined;\n type: string;\n resources: any[];\n}\n"]}
File without changes
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=FormioAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioAction.js","sourceRoot":"","sources":["../../../src/domain/FormioAction.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioAction<Settings = any> {\n name: string;\n title: string;\n action: string;\n handler: string[];\n method: string[];\n priority: number;\n form: any;\n settings: Settings;\n condition?: any;\n deleted?: number | null;\n}\n"]}
File without changes
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=FormioActionInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioActionInfo.js","sourceRoot":"","sources":["../../../src/domain/FormioActionInfo.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioActionInfo {\n name: string;\n title: string;\n description: string;\n priority: number;\n defaults: {\n handler: string[];\n method: string[];\n };\n access?: {\n handler: boolean;\n method: boolean;\n };\n}\n"]}
File without changes
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=FormioActionItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioActionItem.js","sourceRoot":"","sources":["../../../src/domain/FormioActionItem.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioActionItem<Data = any> {\n _id: string | undefined;\n title: string;\n form: string;\n submission?: string;\n action: string;\n handler: string;\n method: string;\n state: \"new\" | \"inprogress\" | \"complete\" | \"error\";\n messages: any[];\n data: Data;\n}\n"]}
File without changes
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=FormioComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioComponent.js","sourceRoot":"","sources":["../../../src/domain/FormioComponent.ts"],"names":[],"mappings":"","sourcesContent":["import {FormioForm} from \"./FormioForm\";\nimport type {ExtendedComponentSchema} from \"formiojs\";\n\nexport interface FormioComponent extends ExtendedComponentSchema {\n type: string;\n key: string;\n\n // additional props\n template?: string;\n dataSrc?: \"json\" | \"url\";\n data?: {\n json?: any;\n url?: string;\n\n [key: string]: any;\n };\n valueProperty?: string;\n customConditional?: string;\n components?: FormioComponent[];\n form?: string | FormioForm;\n}\n"]}
File without changes
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=FormioForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioForm.js","sourceRoot":"","sources":["../../../src/domain/FormioForm.ts"],"names":[],"mappings":"","sourcesContent":["import {FormioComponent} from \"./FormioComponent\";\nimport {FormioPermission} from \"./FormioPermission\";\n\nexport interface FormioForm extends Record<string, any> {\n _id: string | undefined;\n /**\n * The title for the form\n */\n title: string;\n /**\n * The machine name for this form\n */\n name: string;\n /**\n * The path for this resource\n */\n path: string;\n /**\n * The form type.\n */\n type: string;\n /**\n * The display method for this form\n */\n display?: \"form\" | \"wizard\" | string;\n /**\n * A custom action URL to submit the data to.\n */\n action?: string;\n\n tags?: string[];\n\n deleted: number | null;\n /**\n * Access rules\n */\n access: FormioPermission[];\n /**\n * Submission access rules\n */\n submissionAccess: FormioPermission[];\n /**\n *\n */\n owner: string;\n /**\n * Components.\n */\n components: FormioComponent[];\n /**\n * Custom form settings object.\n */\n settings?: any;\n /**\n * Custom form properties.\n */\n properties?: any;\n}\n"]}
File without changes
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=FormioPermission.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioPermission.js","sourceRoot":"","sources":["../../../src/domain/FormioPermission.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioPermission {\n type: \"create_all\" | \"read_all\" | \"update_all\" | \"delete_all\" | \"create_own\" | \"read_own\" | \"update_own\" | \"delete_own\" | \"self\";\n roles: string[];\n}\n"]}
File without changes
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=FormioRole.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioRole.js","sourceRoot":"","sources":["../../../src/domain/FormioRole.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioRole extends Record<string, any> {\n _id: string | undefined;\n title: string;\n description: string;\n deleted: number | null;\n default: boolean;\n admin: boolean;\n}\n"]}
File without changes
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=FormioSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioSchema.js","sourceRoot":"","sources":["../../../src/domain/FormioSchema.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioSchema {\n key: string;\n isLocked: boolean;\n version: string;\n value: string;\n}\n"]}
File without changes
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=FormioSubmission.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioSubmission.js","sourceRoot":"","sources":["../../../src/domain/FormioSubmission.ts"],"names":[],"mappings":"","sourcesContent":["import {FormioAccess} from \"./FormioAccess\";\n\nexport interface FormioSubmission<Data = any> extends Record<string, any> {\n _id: string | undefined;\n form: string;\n data: Data;\n owner?: string;\n roles?: string[];\n access?: FormioAccess[];\n externalIds?: {type?: string; resource?: string; id?: string}[];\n metadata?: Record<string, any>;\n created?: string;\n updated?: string;\n deleted?: string | null;\n modified?: string;\n}\n"]}
File without changes
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=FormioToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioToken.js","sourceRoot":"","sources":["../../../src/domain/FormioToken.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioToken {\n key: string;\n value: string;\n expireAt: Date;\n}\n"]}
File without changes
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ (0, tslib_1.__exportStar)(require("./domain/FormioAction"), exports);
5
+ (0, tslib_1.__exportStar)(require("./domain/FormioActionInfo"), exports);
6
+ (0, tslib_1.__exportStar)(require("./domain/FormioActionItem"), exports);
7
+ (0, tslib_1.__exportStar)(require("./domain/FormioComponent"), exports);
8
+ (0, tslib_1.__exportStar)(require("./domain/FormioForm"), exports);
9
+ (0, tslib_1.__exportStar)(require("./domain/FormioPermission"), exports);
10
+ (0, tslib_1.__exportStar)(require("./domain/FormioRole"), exports);
11
+ (0, tslib_1.__exportStar)(require("./domain/FormioSchema"), exports);
12
+ (0, tslib_1.__exportStar)(require("./domain/FormioSubmission"), exports);
13
+ (0, tslib_1.__exportStar)(require("./domain/FormioToken"), exports);
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,qEAAsC;AACtC,yEAA0C;AAC1C,yEAA0C;AAC1C,wEAAyC;AACzC,mEAAoC;AACpC,yEAA0C;AAC1C,mEAAoC;AACpC,qEAAsC;AACtC,yEAA0C;AAC1C,oEAAqC","sourcesContent":["export * from \"./domain/FormioAction\";\nexport * from \"./domain/FormioActionInfo\";\nexport * from \"./domain/FormioActionItem\";\nexport * from \"./domain/FormioComponent\";\nexport * from \"./domain/FormioForm\";\nexport * from \"./domain/FormioPermission\";\nexport * from \"./domain/FormioRole\";\nexport * from \"./domain/FormioSchema\";\nexport * from \"./domain/FormioSubmission\";\nexport * from \"./domain/FormioToken\";\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioAccess.js","sourceRoot":"","sources":["../../../src/domain/FormioAccess.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioAccess {\n _id: string | undefined;\n type: string;\n resources: any[];\n}\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioAction.js","sourceRoot":"","sources":["../../../src/domain/FormioAction.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioAction<Settings = any> {\n name: string;\n title: string;\n action: string;\n handler: string[];\n method: string[];\n priority: number;\n form: any;\n settings: Settings;\n condition?: any;\n deleted?: number | null;\n}\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioActionInfo.js","sourceRoot":"","sources":["../../../src/domain/FormioActionInfo.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioActionInfo {\n name: string;\n title: string;\n description: string;\n priority: number;\n defaults: {\n handler: string[];\n method: string[];\n };\n access?: {\n handler: boolean;\n method: boolean;\n };\n}\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioActionItem.js","sourceRoot":"","sources":["../../../src/domain/FormioActionItem.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioActionItem<Data = any> {\n _id: string | undefined;\n title: string;\n form: string;\n submission?: string;\n action: string;\n handler: string;\n method: string;\n state: \"new\" | \"inprogress\" | \"complete\" | \"error\";\n messages: any[];\n data: Data;\n}\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioComponent.js","sourceRoot":"","sources":["../../../src/domain/FormioComponent.ts"],"names":[],"mappings":"","sourcesContent":["import {FormioForm} from \"./FormioForm\";\nimport type {ExtendedComponentSchema} from \"formiojs\";\n\nexport interface FormioComponent extends ExtendedComponentSchema {\n type: string;\n key: string;\n\n // additional props\n template?: string;\n dataSrc?: \"json\" | \"url\";\n data?: {\n json?: any;\n url?: string;\n\n [key: string]: any;\n };\n valueProperty?: string;\n customConditional?: string;\n components?: FormioComponent[];\n form?: string | FormioForm;\n}\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioForm.js","sourceRoot":"","sources":["../../../src/domain/FormioForm.ts"],"names":[],"mappings":"","sourcesContent":["import {FormioComponent} from \"./FormioComponent\";\nimport {FormioPermission} from \"./FormioPermission\";\n\nexport interface FormioForm extends Record<string, any> {\n _id: string | undefined;\n /**\n * The title for the form\n */\n title: string;\n /**\n * The machine name for this form\n */\n name: string;\n /**\n * The path for this resource\n */\n path: string;\n /**\n * The form type.\n */\n type: string;\n /**\n * The display method for this form\n */\n display?: \"form\" | \"wizard\" | string;\n /**\n * A custom action URL to submit the data to.\n */\n action?: string;\n\n tags?: string[];\n\n deleted: number | null;\n /**\n * Access rules\n */\n access: FormioPermission[];\n /**\n * Submission access rules\n */\n submissionAccess: FormioPermission[];\n /**\n *\n */\n owner: string;\n /**\n * Components.\n */\n components: FormioComponent[];\n /**\n * Custom form settings object.\n */\n settings?: any;\n /**\n * Custom form properties.\n */\n properties?: any;\n}\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioPermission.js","sourceRoot":"","sources":["../../../src/domain/FormioPermission.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioPermission {\n type: \"create_all\" | \"read_all\" | \"update_all\" | \"delete_all\" | \"create_own\" | \"read_own\" | \"update_own\" | \"delete_own\" | \"self\";\n roles: string[];\n}\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioRole.js","sourceRoot":"","sources":["../../../src/domain/FormioRole.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioRole extends Record<string, any> {\n _id: string | undefined;\n title: string;\n description: string;\n deleted: number | null;\n default: boolean;\n admin: boolean;\n}\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioSchema.js","sourceRoot":"","sources":["../../../src/domain/FormioSchema.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioSchema {\n key: string;\n isLocked: boolean;\n version: string;\n value: string;\n}\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioSubmission.js","sourceRoot":"","sources":["../../../src/domain/FormioSubmission.ts"],"names":[],"mappings":"","sourcesContent":["import {FormioAccess} from \"./FormioAccess\";\n\nexport interface FormioSubmission<Data = any> extends Record<string, any> {\n _id: string | undefined;\n form: string;\n data: Data;\n owner?: string;\n roles?: string[];\n access?: FormioAccess[];\n externalIds?: {type?: string; resource?: string; id?: string}[];\n metadata?: Record<string, any>;\n created?: string;\n updated?: string;\n deleted?: string | null;\n modified?: string;\n}\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormioToken.js","sourceRoot":"","sources":["../../../src/domain/FormioToken.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioToken {\n key: string;\n value: string;\n expireAt: Date;\n}\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC","sourcesContent":["export * from \"./domain/FormioAction\";\nexport * from \"./domain/FormioActionInfo\";\nexport * from \"./domain/FormioActionItem\";\nexport * from \"./domain/FormioComponent\";\nexport * from \"./domain/FormioForm\";\nexport * from \"./domain/FormioPermission\";\nexport * from \"./domain/FormioRole\";\nexport * from \"./domain/FormioSchema\";\nexport * from \"./domain/FormioSubmission\";\nexport * from \"./domain/FormioToken\";\n"]}
@@ -0,0 +1,5 @@
1
+ export interface FormioAccess {
2
+ _id: string | undefined;
3
+ type: string;
4
+ resources: any[];
5
+ }
@@ -0,0 +1,12 @@
1
+ export interface FormioAction<Settings = any> {
2
+ name: string;
3
+ title: string;
4
+ action: string;
5
+ handler: string[];
6
+ method: string[];
7
+ priority: number;
8
+ form: any;
9
+ settings: Settings;
10
+ condition?: any;
11
+ deleted?: number | null;
12
+ }
@@ -0,0 +1,14 @@
1
+ export interface FormioActionInfo {
2
+ name: string;
3
+ title: string;
4
+ description: string;
5
+ priority: number;
6
+ defaults: {
7
+ handler: string[];
8
+ method: string[];
9
+ };
10
+ access?: {
11
+ handler: boolean;
12
+ method: boolean;
13
+ };
14
+ }
@@ -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,17 @@
1
+ import { FormioForm } from "./FormioForm";
2
+ import type { ExtendedComponentSchema } from "formiojs";
3
+ export interface FormioComponent extends ExtendedComponentSchema {
4
+ type: string;
5
+ key: string;
6
+ template?: string;
7
+ dataSrc?: "json" | "url";
8
+ data?: {
9
+ json?: any;
10
+ url?: string;
11
+ [key: string]: any;
12
+ };
13
+ valueProperty?: string;
14
+ customConditional?: string;
15
+ components?: FormioComponent[];
16
+ form?: string | FormioForm;
17
+ }
@@ -0,0 +1,55 @@
1
+ import { FormioComponent } from "./FormioComponent";
2
+ import { FormioPermission } from "./FormioPermission";
3
+ export interface FormioForm extends Record<string, any> {
4
+ _id: string | undefined;
5
+ /**
6
+ * The title for the form
7
+ */
8
+ title: string;
9
+ /**
10
+ * The machine name for this form
11
+ */
12
+ name: string;
13
+ /**
14
+ * The path for this resource
15
+ */
16
+ path: string;
17
+ /**
18
+ * The form type.
19
+ */
20
+ type: string;
21
+ /**
22
+ * The display method for this form
23
+ */
24
+ display?: "form" | "wizard" | string;
25
+ /**
26
+ * A custom action URL to submit the data to.
27
+ */
28
+ action?: string;
29
+ tags?: string[];
30
+ deleted: number | null;
31
+ /**
32
+ * Access rules
33
+ */
34
+ access: FormioPermission[];
35
+ /**
36
+ * Submission access rules
37
+ */
38
+ submissionAccess: FormioPermission[];
39
+ /**
40
+ *
41
+ */
42
+ owner: string;
43
+ /**
44
+ * Components.
45
+ */
46
+ components: FormioComponent[];
47
+ /**
48
+ * Custom form settings object.
49
+ */
50
+ settings?: any;
51
+ /**
52
+ * Custom form properties.
53
+ */
54
+ properties?: any;
55
+ }
@@ -0,0 +1,4 @@
1
+ export interface FormioPermission {
2
+ type: "create_all" | "read_all" | "update_all" | "delete_all" | "create_own" | "read_own" | "update_own" | "delete_own" | "self";
3
+ roles: string[];
4
+ }
@@ -0,0 +1,8 @@
1
+ export interface FormioRole extends Record<string, any> {
2
+ _id: string | undefined;
3
+ title: string;
4
+ description: string;
5
+ deleted: number | null;
6
+ default: boolean;
7
+ admin: boolean;
8
+ }
@@ -0,0 +1,6 @@
1
+ export interface FormioSchema {
2
+ key: string;
3
+ isLocked: boolean;
4
+ version: string;
5
+ value: string;
6
+ }
@@ -0,0 +1,19 @@
1
+ import { FormioAccess } from "./FormioAccess";
2
+ export interface FormioSubmission<Data = any> extends Record<string, any> {
3
+ _id: string | undefined;
4
+ form: string;
5
+ data: Data;
6
+ owner?: string;
7
+ roles?: string[];
8
+ access?: FormioAccess[];
9
+ externalIds?: {
10
+ type?: string;
11
+ resource?: string;
12
+ id?: string;
13
+ }[];
14
+ metadata?: Record<string, any>;
15
+ created?: string;
16
+ updated?: string;
17
+ deleted?: string | null;
18
+ modified?: string;
19
+ }
@@ -0,0 +1,5 @@
1
+ export interface FormioToken {
2
+ key: string;
3
+ value: string;
4
+ expireAt: Date;
5
+ }
@@ -0,0 +1,10 @@
1
+ export * from "./domain/FormioAction";
2
+ export * from "./domain/FormioActionInfo";
3
+ export * from "./domain/FormioActionItem";
4
+ export * from "./domain/FormioComponent";
5
+ export * from "./domain/FormioForm";
6
+ export * from "./domain/FormioPermission";
7
+ export * from "./domain/FormioRole";
8
+ export * from "./domain/FormioSchema";
9
+ export * from "./domain/FormioSubmission";
10
+ export * from "./domain/FormioToken";
package/package.json CHANGED
@@ -1,10 +1,7 @@
1
1
  {
2
2
  "name": "@tsed/formio-types",
3
- "version": "6.88.1",
3
+ "version": "6.89.0",
4
4
  "description": "Formio types definition package for Ts.ED framework",
5
- "source": "./src/index.ts",
6
- "main": "./lib/index.js",
7
- "typings": "./lib/index.d.ts",
8
5
  "private": false,
9
6
  "keywords": [
10
7
  "Formio",
@@ -14,8 +11,19 @@
14
11
  "decorators",
15
12
  "express"
16
13
  ],
14
+ "source": "./src/index.ts",
15
+ "main": "./lib/cjs/index.js",
16
+ "typings": "./lib/types/index.d.ts",
17
+ "exports": {
18
+ "types": "./lib/types/index.d.ts",
19
+ "import": "./lib/esm/index.js",
20
+ "require": "./lib/cjs/index.js",
21
+ "default": "./lib/esm/index.js"
22
+ },
17
23
  "scripts": {
18
- "build": "tsc --build tsconfig.compile.json",
24
+ "build": "yarn run build:esm && yarn run build:cjs",
25
+ "build:cjs": "tsc --build tsconfig.compile.json",
26
+ "build:esm": "tsc --build tsconfig.compile.esm.json",
19
27
  "start": "ts-node -r tsconfig-paths/register test/app/index.ts"
20
28
  },
21
29
  "dependencies": {
@@ -0,0 +1,23 @@
1
+ {
2
+ "extends": "./tsconfig.compile.json",
3
+ "compilerOptions": {
4
+ "baseUrl": ".",
5
+ "module": "ES2020",
6
+ "rootDir": "src",
7
+ "outDir": "./lib/esm",
8
+ "declaration": true,
9
+ "declarationDir": "./lib/types"
10
+ },
11
+ "exclude": [
12
+ "node_modules",
13
+ "test",
14
+ "lib",
15
+ "benchmark",
16
+ "coverage",
17
+ "spec",
18
+ "**/*.benchmark.ts",
19
+ "**/*.spec.ts",
20
+ "keys",
21
+ "jest.config.js"
22
+ ]
23
+ }
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormioAccess.js","sourceRoot":"","sources":["../../src/domain/FormioAccess.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioAccess {\n _id: string | undefined;\n type: string;\n resources: any[];\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormioAction.js","sourceRoot":"","sources":["../../src/domain/FormioAction.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioAction<Settings = any> {\n name: string;\n title: string;\n action: string;\n handler: string[];\n method: string[];\n priority: number;\n form: any;\n settings: Settings;\n condition?: any;\n deleted?: number | null;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormioActionInfo.js","sourceRoot":"","sources":["../../src/domain/FormioActionInfo.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioActionInfo {\n name: string;\n title: string;\n description: string;\n priority: number;\n defaults: {\n handler: string[];\n method: string[];\n };\n access?: {\n handler: boolean;\n method: boolean;\n };\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormioActionItem.js","sourceRoot":"","sources":["../../src/domain/FormioActionItem.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioActionItem<Data = any> {\n _id: string | undefined;\n title: string;\n form: string;\n submission?: string;\n action: string;\n handler: string;\n method: string;\n state: \"new\" | \"inprogress\" | \"complete\" | \"error\";\n messages: any[];\n data: Data;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormioComponent.js","sourceRoot":"","sources":["../../src/domain/FormioComponent.ts"],"names":[],"mappings":"","sourcesContent":["import {FormioForm} from \"./FormioForm\";\nimport type {ExtendedComponentSchema} from \"formiojs\";\n\nexport interface FormioComponent extends ExtendedComponentSchema {\n type: string;\n key: string;\n\n // additional props\n template?: string;\n dataSrc?: \"json\" | \"url\";\n data?: {\n json?: any;\n url?: string;\n\n [key: string]: any;\n };\n valueProperty?: string;\n customConditional?: string;\n components?: FormioComponent[];\n form?: string | FormioForm;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormioForm.js","sourceRoot":"","sources":["../../src/domain/FormioForm.ts"],"names":[],"mappings":"","sourcesContent":["import {FormioComponent} from \"./FormioComponent\";\nimport {FormioPermission} from \"./FormioPermission\";\n\nexport interface FormioForm extends Record<string, any> {\n _id: string | undefined;\n /**\n * The title for the form\n */\n title: string;\n /**\n * The machine name for this form\n */\n name: string;\n /**\n * The path for this resource\n */\n path: string;\n /**\n * The form type.\n */\n type: string;\n /**\n * The display method for this form\n */\n display?: \"form\" | \"wizard\" | string;\n /**\n * A custom action URL to submit the data to.\n */\n action?: string;\n\n tags?: string[];\n\n deleted: number | null;\n /**\n * Access rules\n */\n access: FormioPermission[];\n /**\n * Submission access rules\n */\n submissionAccess: FormioPermission[];\n /**\n *\n */\n owner: string;\n /**\n * Components.\n */\n components: FormioComponent[];\n /**\n * Custom form settings object.\n */\n settings?: any;\n /**\n * Custom form properties.\n */\n properties?: any;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormioPermission.js","sourceRoot":"","sources":["../../src/domain/FormioPermission.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioPermission {\n type: \"create_all\" | \"read_all\" | \"update_all\" | \"delete_all\" | \"create_own\" | \"read_own\" | \"update_own\" | \"delete_own\" | \"self\";\n roles: string[];\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormioRole.js","sourceRoot":"","sources":["../../src/domain/FormioRole.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioRole extends Record<string, any> {\n _id: string | undefined;\n title: string;\n description: string;\n deleted: number | null;\n default: boolean;\n admin: boolean;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormioSchema.js","sourceRoot":"","sources":["../../src/domain/FormioSchema.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioSchema {\n key: string;\n isLocked: boolean;\n version: string;\n value: string;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormioSubmission.js","sourceRoot":"","sources":["../../src/domain/FormioSubmission.ts"],"names":[],"mappings":"","sourcesContent":["import {FormioAccess} from \"./FormioAccess\";\n\nexport interface FormioSubmission<Data = any> extends Record<string, any> {\n _id: string | undefined;\n form: string;\n data: Data;\n owner?: string;\n roles?: string[];\n access?: FormioAccess[];\n externalIds?: {type?: string; resource?: string; id?: string}[];\n metadata?: Record<string, any>;\n created?: string;\n updated?: string;\n deleted?: string | null;\n modified?: string;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormioToken.js","sourceRoot":"","sources":["../../src/domain/FormioToken.ts"],"names":[],"mappings":"","sourcesContent":["export interface FormioToken {\n key: string;\n value: string;\n expireAt: Date;\n}\n"]}
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC","sourcesContent":["export * from \"./domain/FormioAction\";\nexport * from \"./domain/FormioActionInfo\";\nexport * from \"./domain/FormioActionItem\";\nexport * from \"./domain/FormioComponent\";\nexport * from \"./domain/FormioForm\";\nexport * from \"./domain/FormioPermission\";\nexport * from \"./domain/FormioRole\";\nexport * from \"./domain/FormioSchema\";\nexport * from \"./domain/FormioSubmission\";\nexport * from \"./domain/FormioToken\";\n"]}