@webiny/api-form-builder-so-ddb 0.0.0-unstable.fcdad0bc61 → 0.0.0-unstable.fdd9228b5d

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 (45) hide show
  1. package/definitions/form.d.ts +4 -3
  2. package/definitions/form.js +9 -13
  3. package/definitions/form.js.map +1 -1
  4. package/definitions/settings.d.ts +4 -3
  5. package/definitions/settings.js +8 -12
  6. package/definitions/settings.js.map +1 -1
  7. package/definitions/submission.d.ts +4 -3
  8. package/definitions/submission.js +8 -12
  9. package/definitions/submission.js.map +1 -1
  10. package/definitions/system.d.ts +4 -3
  11. package/definitions/system.js +8 -12
  12. package/definitions/system.js.map +1 -1
  13. package/definitions/table.d.ts +4 -4
  14. package/definitions/table.js +7 -6
  15. package/definitions/table.js.map +1 -1
  16. package/index.d.ts +2 -1
  17. package/index.js +49 -47
  18. package/index.js.map +1 -1
  19. package/operations/form/fields.js +2 -3
  20. package/operations/form/fields.js.map +1 -1
  21. package/operations/form/index.d.ts +4 -4
  22. package/operations/form/index.js +119 -166
  23. package/operations/form/index.js.map +1 -1
  24. package/operations/settings/index.d.ts +3 -3
  25. package/operations/settings/index.js +22 -26
  26. package/operations/settings/index.js.map +1 -1
  27. package/operations/submission/fields.js +2 -3
  28. package/operations/submission/fields.js.map +1 -1
  29. package/operations/submission/index.d.ts +4 -4
  30. package/operations/submission/index.js +27 -44
  31. package/operations/submission/index.js.map +1 -1
  32. package/operations/system/index.d.ts +3 -3
  33. package/operations/system/index.js +18 -23
  34. package/operations/system/index.js.map +1 -1
  35. package/package.json +19 -25
  36. package/plugins/FormDynamoDbFieldPlugin.js +5 -9
  37. package/plugins/FormDynamoDbFieldPlugin.js.map +1 -1
  38. package/plugins/FormSubmissionDynamoDbFieldPlugin.js +5 -9
  39. package/plugins/FormSubmissionDynamoDbFieldPlugin.js.map +1 -1
  40. package/plugins/index.d.ts +2 -0
  41. package/plugins/index.js +29 -0
  42. package/plugins/index.js.map +1 -0
  43. package/types.d.ts +9 -11
  44. package/types.js +5 -5
  45. package/types.js.map +1 -1
@@ -1,7 +1,8 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  interface Params {
4
- table: Table;
5
+ table: Table<string, string, string>;
5
6
  entityName: string;
6
7
  attributes: Attributes;
7
8
  }
@@ -1,26 +1,20 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.createFormEntity = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
14
8
  const createFormEntity = params => {
15
9
  const {
16
10
  table,
17
11
  entityName,
18
12
  attributes
19
13
  } = params;
20
- return new _dynamodbToolbox.Entity({
14
+ return new _toolbox.Entity({
21
15
  table,
22
16
  name: entityName,
23
- attributes: (0, _objectSpread2.default)({
17
+ attributes: {
24
18
  PK: {
25
19
  partitionKey: true
26
20
  },
@@ -84,7 +78,7 @@ const createFormEntity = params => {
84
78
  fields: {
85
79
  type: "list"
86
80
  },
87
- layout: {
81
+ steps: {
88
82
  type: "list"
89
83
  },
90
84
  stats: {
@@ -98,9 +92,11 @@ const createFormEntity = params => {
98
92
  },
99
93
  webinyVersion: {
100
94
  type: "string"
101
- }
102
- }, attributes || {})
95
+ },
96
+ ...(attributes || {})
97
+ }
103
98
  });
104
99
  };
100
+ exports.createFormEntity = createFormEntity;
105
101
 
106
- exports.createFormEntity = createFormEntity;
102
+ //# sourceMappingURL=form.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createFormEntity","params","table","entityName","attributes","Entity","name","PK","partitionKey","SK","sortKey","GSI1_PK","type","GSI1_SK","TYPE","id","formId","tenant","locale","createdBy","ownedBy","savedOn","createdOn","slug","version","locked","published","publishedOn","status","fields","layout","stats","settings","triggers","webinyVersion"],"sources":["form.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createFormEntity = (params: Params): Entity<any> => {\n const { table, entityName, attributes } = params;\n return new Entity({\n table,\n name: entityName,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n GSI1_PK: {\n type: \"string\"\n },\n GSI1_SK: {\n type: \"string\"\n },\n TYPE: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n formId: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n ownedBy: {\n type: \"map\"\n },\n savedOn: {\n type: \"string\"\n },\n createdOn: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n slug: {\n type: \"string\"\n },\n version: {\n type: \"number\"\n },\n locked: {\n type: \"boolean\"\n },\n published: {\n type: \"boolean\"\n },\n publishedOn: {\n type: \"string\"\n },\n status: {\n type: \"string\"\n },\n fields: {\n type: \"list\"\n },\n layout: {\n type: \"list\"\n },\n stats: {\n type: \"map\"\n },\n settings: {\n type: \"map\"\n },\n triggers: {\n type: \"map\"\n },\n webinyVersion: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,gBAAgB,GAAIC,MAAD,IAAiC;EAC7D,MAAM;IAAEC,KAAF;IAASC,UAAT;IAAqBC;EAArB,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdH,KADc;IAEdI,IAAI,EAAEH,UAFQ;IAGdC,UAAU;MACNG,EAA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AI,EAAE;MADA,CAzEJ;MA4ENsB,aAAa,EAAE;QACXtB,IAAI,EAAE;MADK;IA5ET,GA+EFR,UAAU,IAAI,EA/EZ;EAHI,CAAX,CAAP;AAqFH,CAvFM"}
1
+ {"version":3,"names":["_toolbox","require","createFormEntity","params","table","entityName","attributes","Entity","name","PK","partitionKey","SK","sortKey","GSI1_PK","type","GSI1_SK","TYPE","id","formId","tenant","locale","createdBy","ownedBy","savedOn","createdOn","slug","version","locked","published","publishedOn","status","fields","steps","stats","settings","triggers","webinyVersion","exports"],"sources":["form.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createFormEntity = (params: Params): Entity<any> => {\n const { table, entityName, attributes } = params;\n return new Entity({\n table,\n name: entityName,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n GSI1_PK: {\n type: \"string\"\n },\n GSI1_SK: {\n type: \"string\"\n },\n TYPE: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n formId: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n ownedBy: {\n type: \"map\"\n },\n savedOn: {\n type: \"string\"\n },\n createdOn: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n slug: {\n type: \"string\"\n },\n version: {\n type: \"number\"\n },\n locked: {\n type: \"boolean\"\n },\n published: {\n type: \"boolean\"\n },\n publishedOn: {\n type: \"string\"\n },\n status: {\n type: \"string\"\n },\n fields: {\n type: \"list\"\n },\n steps: {\n type: \"list\"\n },\n stats: {\n type: \"map\"\n },\n settings: {\n type: \"map\"\n },\n triggers: {\n type: \"map\"\n },\n webinyVersion: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;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ACDkB,KAAK,EAAE;QACHlB,IAAI,EAAE;MACV,CAAC;MACDmB,KAAK,EAAE;QACHnB,IAAI,EAAE;MACV,CAAC;MACDoB,QAAQ,EAAE;QACNpB,IAAI,EAAE;MACV,CAAC;MACDqB,QAAQ,EAAE;QACNrB,IAAI,EAAE;MACV,CAAC;MACDsB,aAAa,EAAE;QACXtB,IAAI,EAAE;MACV,CAAC;MACD,IAAIR,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAAC+B,OAAA,CAAAnC,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -1,7 +1,8 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  interface Params {
4
- table: Table;
5
+ table: Table<string, string, string>;
5
6
  entityName: string;
6
7
  attributes: Attributes;
7
8
  }
@@ -1,26 +1,20 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.createSettingsEntity = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
14
8
  const createSettingsEntity = params => {
15
9
  const {
16
10
  entityName,
17
11
  attributes,
18
12
  table
19
13
  } = params;
20
- return new _dynamodbToolbox.Entity({
14
+ return new _toolbox.Entity({
21
15
  name: entityName,
22
16
  table,
23
- attributes: (0, _objectSpread2.default)({
17
+ attributes: {
24
18
  PK: {
25
19
  partitionKey: true
26
20
  },
@@ -41,9 +35,11 @@ const createSettingsEntity = params => {
41
35
  },
42
36
  locale: {
43
37
  type: "string"
44
- }
45
- }, attributes || {})
38
+ },
39
+ ...(attributes || {})
40
+ }
46
41
  });
47
42
  };
43
+ exports.createSettingsEntity = createSettingsEntity;
48
44
 
49
- exports.createSettingsEntity = createSettingsEntity;
45
+ //# sourceMappingURL=settings.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createSettingsEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","reCaptcha","domain","tenant","locale"],"sources":["settings.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSettingsEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n reCaptcha: {\n type: \"map\"\n },\n domain: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,oBAAoB,GAAIC,MAAD,IAAiC;EACjE,MAAM;IAAEC,UAAF;IAAcC,UAAd;IAA0BC;EAA1B,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEJ,UADQ;IAEdE,KAFc;IAGdD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,IAAI,EAAE;QACFC,IAAI,EAAE;MADJ,CAPA;MAUNC,SAAS,EAAE;QACPD,IAAI,EAAE;MADC,CAVL;MAaNE,MAAM,EAAE;QACJF,IAAI,EAAE;MADF,CAbF;MAgBNG,MAAM,EAAE;QACJH,IAAI,EAAE;MADF,CAhBF;MAmBNI,MAAM,EAAE;QACJJ,IAAI,EAAE;MADF;IAnBF,GAsBFT,UAAU,IAAI,EAtBZ;EAHI,CAAX,CAAP;AA4BH,CA9BM"}
1
+ {"version":3,"names":["_toolbox","require","createSettingsEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","reCaptcha","domain","tenant","locale","exports"],"sources":["settings.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSettingsEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n reCaptcha: {\n type: \"map\"\n },\n domain: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,oBAAoB,GAAIC,MAAc,IAAkB;EACjE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,SAAS,EAAE;QACPD,IAAI,EAAE;MACV,CAAC;MACDE,MAAM,EAAE;QACJF,IAAI,EAAE;MACV,CAAC;MACDG,MAAM,EAAE;QACJH,IAAI,EAAE;MACV,CAAC;MACDI,MAAM,EAAE;QACJJ,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACc,OAAA,CAAAjB,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -1,7 +1,8 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  interface Params {
4
- table: Table;
5
+ table: Table<string, string, string>;
5
6
  entityName: string;
6
7
  attributes: Attributes;
7
8
  }
@@ -1,26 +1,20 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.createSubmissionEntity = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
14
8
  const createSubmissionEntity = params => {
15
9
  const {
16
10
  table,
17
11
  entityName,
18
12
  attributes
19
13
  } = params;
20
- return new _dynamodbToolbox.Entity({
14
+ return new _toolbox.Entity({
21
15
  table,
22
16
  name: entityName,
23
- attributes: (0, _objectSpread2.default)({
17
+ attributes: {
24
18
  PK: {
25
19
  partitionKey: true
26
20
  },
@@ -62,9 +56,11 @@ const createSubmissionEntity = params => {
62
56
  },
63
57
  webinyVersion: {
64
58
  type: "string"
65
- }
66
- }, attributes || {})
59
+ },
60
+ ...(attributes || {})
61
+ }
67
62
  });
68
63
  };
64
+ exports.createSubmissionEntity = createSubmissionEntity;
69
65
 
70
- exports.createSubmissionEntity = createSubmissionEntity;
66
+ //# sourceMappingURL=submission.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createSubmissionEntity","params","table","entityName","attributes","Entity","name","PK","partitionKey","SK","sortKey","id","type","TYPE","data","meta","form","logs","createdOn","savedOn","ownedBy","tenant","locale","webinyVersion"],"sources":["submission.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSubmissionEntity = (params: Params): Entity<any> => {\n const { table, entityName, attributes } = params;\n return new Entity({\n table,\n name: entityName,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n id: {\n type: \"string\"\n },\n TYPE: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n meta: {\n type: \"map\"\n },\n form: {\n type: \"map\"\n },\n logs: {\n type: \"list\"\n },\n createdOn: {\n type: \"string\"\n },\n savedOn: {\n type: \"string\"\n },\n ownedBy: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n webinyVersion: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,sBAAsB,GAAIC,MAAD,IAAiC;EACnE,MAAM;IAAEC,KAAF;IAASC,UAAT;IAAqBC;EAArB,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdH,KADc;IAEdI,IAAI,EAAEH,UAFQ;IAGdC,UAAU;MACNG,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,EAAE,EAAE;QACAC,IAAI,EAAE;MADN,CAPE;MAUNC,IAAI,EAAE;QACFD,IAAI,EAAE;MADJ,CAVA;MAaNE,IAAI,EAAE;QACFF,IAAI,EAAE;MADJ,CAbA;MAgBNG,IAAI,EAAE;QACFH,IAAI,EAAE;MADJ,CAhBA;MAmBNI,IAAI,EAAE;QACFJ,IAAI,EAAE;MADJ,CAnBA;MAsBNK,IAAI,EAAE;QACFL,IAAI,EAAE;MADJ,CAtBA;MAyBNM,SAAS,EAAE;QACPN,IAAI,EAAE;MADC,CAzBL;MA4BNO,OAAO,EAAE;QACLP,IAAI,EAAE;MADD,CA5BH;MA+BNQ,OAAO,EAAE;QACLR,IAAI,EAAE;MADD,CA/BH;MAkCNS,MAAM,EAAE;QACJT,IAAI,EAAE;MADF,CAlCF;MAqCNU,MAAM,EAAE;QACJV,IAAI,EAAE;MADF,CArCF;MAwCNW,aAAa,EAAE;QACXX,IAAI,EAAE;MADK;IAxCT,GA2CFR,UAAU,IAAI,EA3CZ;EAHI,CAAX,CAAP;AAiDH,CAnDM"}
1
+ {"version":3,"names":["_toolbox","require","createSubmissionEntity","params","table","entityName","attributes","Entity","name","PK","partitionKey","SK","sortKey","id","type","TYPE","data","meta","form","logs","createdOn","savedOn","ownedBy","tenant","locale","webinyVersion","exports"],"sources":["submission.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSubmissionEntity = (params: Params): Entity<any> => {\n const { table, entityName, attributes } = params;\n return new Entity({\n table,\n name: entityName,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n id: {\n type: \"string\"\n },\n TYPE: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n meta: {\n type: \"map\"\n },\n form: {\n type: \"map\"\n },\n logs: {\n type: \"list\"\n },\n createdOn: {\n type: \"string\"\n },\n savedOn: {\n type: \"string\"\n },\n ownedBy: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n webinyVersion: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,sBAAsB,GAAIC,MAAc,IAAkB;EACnE,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC;EAAW,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdH,KAAK;IACLI,IAAI,EAAEH,UAAU;IAChBC,UAAU,EAAE;MACRG,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,EAAE,EAAE;QACAC,IAAI,EAAE;MACV,CAAC;MACDC,IAAI,EAAE;QACFD,IAAI,EAAE;MACV,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV,CAAC;MACDG,IAAI,EAAE;QACFH,IAAI,EAAE;MACV,CAAC;MACDI,IAAI,EAAE;QACFJ,IAAI,EAAE;MACV,CAAC;MACDK,IAAI,EAAE;QACFL,IAAI,EAAE;MACV,CAAC;MACDM,SAAS,EAAE;QACPN,IAAI,EAAE;MACV,CAAC;MACDO,OAAO,EAAE;QACLP,IAAI,EAAE;MACV,CAAC;MACDQ,OAAO,EAAE;QACLR,IAAI,EAAE;MACV,CAAC;MACDS,MAAM,EAAE;QACJT,IAAI,EAAE;MACV,CAAC;MACDU,MAAM,EAAE;QACJV,IAAI,EAAE;MACV,CAAC;MACDW,aAAa,EAAE;QACXX,IAAI,EAAE;MACV,CAAC;MACD,IAAIR,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACoB,OAAA,CAAAxB,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -1,7 +1,8 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  interface Params {
4
- table: Table;
5
+ table: Table<string, string, string>;
5
6
  entityName: string;
6
7
  attributes: Attributes;
7
8
  }
@@ -1,26 +1,20 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.createSystemEntity = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
14
8
  const createSystemEntity = params => {
15
9
  const {
16
10
  entityName,
17
11
  attributes,
18
12
  table
19
13
  } = params;
20
- return new _dynamodbToolbox.Entity({
14
+ return new _toolbox.Entity({
21
15
  name: entityName,
22
16
  table,
23
- attributes: (0, _objectSpread2.default)({
17
+ attributes: {
24
18
  PK: {
25
19
  partitionKey: true
26
20
  },
@@ -32,9 +26,11 @@ const createSystemEntity = params => {
32
26
  },
33
27
  tenant: {
34
28
  type: "string"
35
- }
36
- }, attributes || {})
29
+ },
30
+ ...(attributes || {})
31
+ }
37
32
  });
38
33
  };
34
+ exports.createSystemEntity = createSystemEntity;
39
35
 
40
- exports.createSystemEntity = createSystemEntity;
36
+ //# sourceMappingURL=system.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createSystemEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","version","type","tenant"],"sources":["system.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSystemEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n version: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,kBAAkB,GAAIC,MAAD,IAAiC;EAC/D,MAAM;IAAEC,UAAF;IAAcC,UAAd;IAA0BC;EAA1B,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEJ,UADQ;IAEdE,KAFc;IAGdD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,OAAO,EAAE;QACLC,IAAI,EAAE;MADD,CAPH;MAUNC,MAAM,EAAE;QACJD,IAAI,EAAE;MADF;IAVF,GAaFT,UAAU,IAAI,EAbZ;EAHI,CAAX,CAAP;AAmBH,CArBM"}
1
+ {"version":3,"names":["_toolbox","require","createSystemEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","version","type","tenant","exports"],"sources":["system.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSystemEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n version: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,kBAAkB,GAAIC,MAAc,IAAkB;EAC/D,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,OAAO,EAAE;QACLC,IAAI,EAAE;MACV,CAAC;MACDC,MAAM,EAAE;QACJD,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACW,OAAA,CAAAd,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -1,8 +1,8 @@
1
- import { DocumentClient } from "aws-sdk/clients/dynamodb";
2
- import { Table } from "dynamodb-toolbox";
1
+ import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
2
+ import { Table } from "@webiny/db-dynamodb/toolbox";
3
3
  interface Params {
4
4
  tableName?: string;
5
- documentClient: DocumentClient;
5
+ documentClient: DynamoDBDocument;
6
6
  }
7
- export declare const createTable: (params: Params) => Table;
7
+ export declare const createTable: (params: Params) => Table<string, string, string>;
8
8
  export {};
@@ -4,15 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.createTable = void 0;
7
-
8
- var _dynamodbToolbox = require("dynamodb-toolbox");
9
-
7
+ var _toolbox = require("@webiny/db-dynamodb/toolbox");
10
8
  const createTable = params => {
11
9
  const {
12
10
  tableName,
13
11
  documentClient
14
12
  } = params;
15
- return new _dynamodbToolbox.Table({
13
+ return new _toolbox.Table({
16
14
  name: tableName || process.env.DB_TABLE,
17
15
  partitionKey: "PK",
18
16
  sortKey: "SK",
@@ -22,8 +20,11 @@ const createTable = params => {
22
20
  partitionKey: "GSI1_PK",
23
21
  sortKey: "GSI1_SK"
24
22
  }
25
- }
23
+ },
24
+ autoExecute: true,
25
+ autoParse: true
26
26
  });
27
27
  };
28
+ exports.createTable = createTable;
28
29
 
29
- exports.createTable = createTable;
30
+ //# sourceMappingURL=table.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createTable","params","tableName","documentClient","Table","name","process","env","DB_TABLE","partitionKey","sortKey","DocumentClient","indexes","GSI1"],"sources":["table.ts"],"sourcesContent":["import { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport { Table } from \"dynamodb-toolbox\";\n\ninterface Params {\n tableName?: string;\n documentClient: DocumentClient;\n}\n\nexport const createTable = (params: Params): Table => {\n const { tableName, documentClient } = params;\n\n return new Table({\n name: tableName || (process.env.DB_TABLE as string),\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient,\n indexes: {\n GSI1: {\n partitionKey: \"GSI1_PK\",\n sortKey: \"GSI1_SK\"\n }\n }\n });\n};\n"],"mappings":";;;;;;;AACA;;AAOO,MAAMA,WAAW,GAAIC,MAAD,IAA2B;EAClD,MAAM;IAAEC,SAAF;IAAaC;EAAb,IAAgCF,MAAtC;EAEA,OAAO,IAAIG,sBAAJ,CAAU;IACbC,IAAI,EAAEH,SAAS,IAAKI,OAAO,CAACC,GAAR,CAAYC,QADnB;IAEbC,YAAY,EAAE,IAFD;IAGbC,OAAO,EAAE,IAHI;IAIbC,cAAc,EAAER,cAJH;IAKbS,OAAO,EAAE;MACLC,IAAI,EAAE;QACFJ,YAAY,EAAE,SADZ;QAEFC,OAAO,EAAE;MAFP;IADD;EALI,CAAV,CAAP;AAYH,CAfM"}
1
+ {"version":3,"names":["_toolbox","require","createTable","params","tableName","documentClient","Table","name","process","env","DB_TABLE","partitionKey","sortKey","DocumentClient","indexes","GSI1","autoExecute","autoParse","exports"],"sources":["table.ts"],"sourcesContent":["import type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb\";\nimport { Table } from \"@webiny/db-dynamodb/toolbox\";\n\ninterface Params {\n tableName?: string;\n documentClient: DynamoDBDocument;\n}\n\nexport const createTable = (params: Params): Table<string, string, string> => {\n const { tableName, documentClient } = params;\n\n return new Table({\n name: tableName || (process.env.DB_TABLE as string),\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient,\n indexes: {\n GSI1: {\n partitionKey: \"GSI1_PK\",\n sortKey: \"GSI1_SK\"\n }\n },\n autoExecute: true,\n autoParse: true\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAOO,MAAMC,WAAW,GAAIC,MAAc,IAAoC;EAC1E,MAAM;IAAEC,SAAS;IAAEC;EAAe,CAAC,GAAGF,MAAM;EAE5C,OAAO,IAAIG,cAAK,CAAC;IACbC,IAAI,EAAEH,SAAS,IAAKI,OAAO,CAACC,GAAG,CAACC,QAAmB;IACnDC,YAAY,EAAE,IAAI;IAClBC,OAAO,EAAE,IAAI;IACbC,cAAc,EAAER,cAAc;IAC9BS,OAAO,EAAE;MACLC,IAAI,EAAE;QACFJ,YAAY,EAAE,SAAS;QACvBC,OAAO,EAAE;MACb;IACJ,CAAC;IACDI,WAAW,EAAE,IAAI;IACjBC,SAAS,EAAE;EACf,CAAC,CAAC;AACN,CAAC;AAACC,OAAA,CAAAhB,WAAA,GAAAA,WAAA","ignoreList":[]}
package/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- import { FormBuilderStorageOperationsFactory } from "./types";
1
+ import type { FormBuilderStorageOperationsFactory } from "./types";
2
+ export * from "./plugins";
2
3
  export declare const createFormBuilderStorageOperations: FormBuilderStorageOperationsFactory;
package/index.js CHANGED
@@ -1,56 +1,50 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
7
+ var _exportNames = {
8
+ createFormBuilderStorageOperations: true
9
+ };
8
10
  exports.createFormBuilderStorageOperations = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
11
+ var _filters = _interopRequireDefault(require("@webiny/db-dynamodb/plugins/filters"));
12
+ var _fields = _interopRequireDefault(require("./operations/submission/fields"));
13
+ var _fields2 = _interopRequireDefault(require("./operations/form/fields"));
14
+ var _error = _interopRequireDefault(require("@webiny/error"));
12
15
  var _types = require("./types");
13
-
14
16
  var _table = require("./definitions/table");
15
-
16
17
  var _form = require("./definitions/form");
17
-
18
18
  var _submission = require("./definitions/submission");
19
-
20
19
  var _system = require("./definitions/system");
21
-
22
20
  var _settings = require("./definitions/settings");
23
-
24
21
  var _system2 = require("./operations/system");
25
-
26
22
  var _submission2 = require("./operations/submission");
27
-
28
23
  var _settings2 = require("./operations/settings");
29
-
30
24
  var _form2 = require("./operations/form");
31
-
32
25
  var _plugins = require("@webiny/plugins");
33
-
34
- var _filters = _interopRequireDefault(require("@webiny/db-dynamodb/plugins/filters"));
35
-
36
- var _fields = _interopRequireDefault(require("./operations/submission/fields"));
37
-
38
- var _fields2 = _interopRequireDefault(require("./operations/form/fields"));
39
-
40
- var _error = _interopRequireDefault(require("@webiny/error"));
41
-
26
+ var _plugins2 = require("./plugins");
27
+ Object.keys(_plugins2).forEach(function (key) {
28
+ if (key === "default" || key === "__esModule") return;
29
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
30
+ if (key in exports && exports[key] === _plugins2[key]) return;
31
+ Object.defineProperty(exports, key, {
32
+ enumerable: true,
33
+ get: function () {
34
+ return _plugins2[key];
35
+ }
36
+ });
37
+ });
38
+ var _api = require("@webiny/api");
42
39
  const reservedFields = ["PK", "SK", "index", "data", "TYPE", "__type", "GSI1_PK", "GSI1_SK"];
43
-
44
40
  const isReserved = name => {
45
41
  if (reservedFields.includes(name) === false) {
46
42
  return;
47
43
  }
48
-
49
44
  throw new _error.default(`Attribute name "${name}" is not allowed.`, "ATTRIBUTE_NOT_ALLOWED", {
50
45
  name
51
46
  });
52
47
  };
53
-
54
48
  const createFormBuilderStorageOperations = params => {
55
49
  const {
56
50
  attributes,
@@ -58,13 +52,11 @@ const createFormBuilderStorageOperations = params => {
58
52
  documentClient,
59
53
  plugins: userPlugins
60
54
  } = params;
61
-
62
55
  if (attributes) {
63
56
  Object.values(attributes).forEach(attrs => {
64
57
  Object.keys(attrs).forEach(isReserved);
65
58
  });
66
59
  }
67
-
68
60
  const plugins = new _plugins.PluginsContainer([
69
61
  /**
70
62
  * User defined plugins.
@@ -111,25 +103,35 @@ const createFormBuilderStorageOperations = params => {
111
103
  attributes: attributes ? attributes[_types.ENTITIES.SETTINGS] : {}
112
104
  })
113
105
  };
114
- return (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({
115
- upgrade: null,
106
+ return {
107
+ beforeInit: async context => {
108
+ const types = [_plugins2.FormDynamoDbFieldPlugin.type, _plugins2.FormSubmissionDynamoDbFieldPlugin.type, _api.CompressorPlugin.type];
109
+ for (const type of types) {
110
+ plugins.mergeByType(context.plugins, type);
111
+ }
112
+ },
116
113
  getTable: () => table,
117
- getEntities: () => entities
118
- }, (0, _system2.createSystemStorageOperations)({
119
- table,
120
- entity: entities.system
121
- })), (0, _settings2.createSettingsStorageOperations)({
122
- table,
123
- entity: entities.settings
124
- })), (0, _form2.createFormStorageOperations)({
125
- table,
126
- entity: entities.form,
127
- plugins
128
- })), (0, _submission2.createSubmissionStorageOperations)({
129
- table,
130
- entity: entities.submission,
131
- plugins
132
- }));
114
+ getEntities: () => entities,
115
+ ...(0, _system2.createSystemStorageOperations)({
116
+ table,
117
+ entity: entities.system
118
+ }),
119
+ ...(0, _settings2.createSettingsStorageOperations)({
120
+ table,
121
+ entity: entities.settings
122
+ }),
123
+ ...(0, _form2.createFormStorageOperations)({
124
+ table,
125
+ entity: entities.form,
126
+ plugins
127
+ }),
128
+ ...(0, _submission2.createSubmissionStorageOperations)({
129
+ table,
130
+ entity: entities.submission,
131
+ plugins
132
+ })
133
+ };
133
134
  };
135
+ exports.createFormBuilderStorageOperations = createFormBuilderStorageOperations;
134
136
 
135
- exports.createFormBuilderStorageOperations = createFormBuilderStorageOperations;
137
+ //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["reservedFields","isReserved","name","includes","WebinyError","createFormBuilderStorageOperations","params","attributes","table","tableName","documentClient","plugins","userPlugins","Object","values","forEach","attrs","keys","PluginsContainer","formSubmissionFields","formFields","dynamoDbValueFilters","createTable","entities","form","createFormEntity","entityName","ENTITIES","FORM","submission","createSubmissionEntity","SUBMISSION","system","createSystemEntity","SYSTEM","settings","createSettingsEntity","SETTINGS","upgrade","getTable","getEntities","createSystemStorageOperations","entity","createSettingsStorageOperations","createFormStorageOperations","createSubmissionStorageOperations"],"sources":["index.ts"],"sourcesContent":["import { FormBuilderStorageOperationsFactory, ENTITIES } from \"~/types\";\nimport { createTable } from \"~/definitions/table\";\nimport { createFormEntity } from \"~/definitions/form\";\nimport { createSubmissionEntity } from \"~/definitions/submission\";\nimport { createSystemEntity } from \"~/definitions/system\";\nimport { createSettingsEntity } from \"~/definitions/settings\";\nimport { createSystemStorageOperations } from \"~/operations/system\";\nimport { createSubmissionStorageOperations } from \"~/operations/submission\";\nimport { createSettingsStorageOperations } from \"~/operations/settings\";\nimport { createFormStorageOperations } from \"~/operations/form\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport dynamoDbValueFilters from \"@webiny/db-dynamodb/plugins/filters\";\nimport formSubmissionFields from \"~/operations/submission/fields\";\nimport formFields from \"~/operations/form/fields\";\nimport WebinyError from \"@webiny/error\";\n\nconst reservedFields = [\"PK\", \"SK\", \"index\", \"data\", \"TYPE\", \"__type\", \"GSI1_PK\", \"GSI1_SK\"];\n\nconst isReserved = (name: string): void => {\n if (reservedFields.includes(name) === false) {\n return;\n }\n throw new WebinyError(`Attribute name \"${name}\" is not allowed.`, \"ATTRIBUTE_NOT_ALLOWED\", {\n name\n });\n};\n\nexport const createFormBuilderStorageOperations: FormBuilderStorageOperationsFactory = params => {\n const { attributes, table: tableName, documentClient, plugins: userPlugins } = params;\n\n if (attributes) {\n Object.values(attributes).forEach(attrs => {\n Object.keys(attrs).forEach(isReserved);\n });\n }\n\n const plugins = new PluginsContainer([\n /**\n * User defined plugins.\n */\n userPlugins || [],\n /**\n * Form submission DynamoDB fields.\n */\n formSubmissionFields(),\n /**\n * Form DynamoDB fields.\n */\n formFields(),\n\n /**\n * DynamoDB filter plugins for the where conditions.\n */\n dynamoDbValueFilters()\n ]);\n\n const table = createTable({\n tableName,\n documentClient\n });\n\n const entities = {\n /**\n * Regular entities.\n */\n form: createFormEntity({\n entityName: ENTITIES.FORM,\n table,\n attributes: attributes ? attributes[ENTITIES.FORM] : {}\n }),\n submission: createSubmissionEntity({\n entityName: ENTITIES.SUBMISSION,\n table,\n attributes: attributes ? attributes[ENTITIES.SUBMISSION] : {}\n }),\n system: createSystemEntity({\n entityName: ENTITIES.SYSTEM,\n table,\n attributes: attributes ? attributes[ENTITIES.SYSTEM] : {}\n }),\n settings: createSettingsEntity({\n entityName: ENTITIES.SETTINGS,\n table,\n attributes: attributes ? attributes[ENTITIES.SETTINGS] : {}\n })\n };\n\n return {\n upgrade: null,\n getTable: () => table,\n getEntities: () => entities,\n ...createSystemStorageOperations({\n table,\n entity: entities.system\n }),\n ...createSettingsStorageOperations({\n table,\n entity: entities.settings\n }),\n ...createFormStorageOperations({\n table,\n entity: entities.form,\n plugins\n }),\n ...createSubmissionStorageOperations({\n table,\n entity: entities.submission,\n plugins\n })\n };\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA,MAAMA,cAAc,GAAG,CAAC,IAAD,EAAO,IAAP,EAAa,OAAb,EAAsB,MAAtB,EAA8B,MAA9B,EAAsC,QAAtC,EAAgD,SAAhD,EAA2D,SAA3D,CAAvB;;AAEA,MAAMC,UAAU,GAAIC,IAAD,IAAwB;EACvC,IAAIF,cAAc,CAACG,QAAf,CAAwBD,IAAxB,MAAkC,KAAtC,EAA6C;IACzC;EACH;;EACD,MAAM,IAAIE,cAAJ,CAAiB,mBAAkBF,IAAK,mBAAxC,EAA4D,uBAA5D,EAAqF;IACvFA;EADuF,CAArF,CAAN;AAGH,CAPD;;AASO,MAAMG,kCAAuE,GAAGC,MAAM,IAAI;EAC7F,MAAM;IAAEC,UAAF;IAAcC,KAAK,EAAEC,SAArB;IAAgCC,cAAhC;IAAgDC,OAAO,EAAEC;EAAzD,IA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M;MAE3B7B,KAF2B;MAG3BD,UAAU,EAAEA,UAAU,GAAGA,UAAU,CAACoB,eAAA,CAASU,QAAV,CAAb,GAAmC;IAH9B,CAArB;EAnBG,CAAjB;EA0BA;IACIC,OAAO,EAAE,IADb;IAEIC,QAAQ,EAAE,MAAM/B,KAFpB;IAGIgC,WAAW,EAAE,MAAMjB;EAHvB,GAIO,IAAAkB,sCAAA,EAA8B;IAC7BjC,KAD6B;IAE7BkC,MAAM,EAAEnB,QAAQ,CAACS;EAFY,CAA9B,CAJP,GAQO,IAAAW,0CAAA,EAAgC;IAC/BnC,KAD+B;IAE/BkC,MAAM,EAAEnB,QAAQ,CAACY;EAFc,CAAhC,CARP,GAYO,IAAAS,kCAAA,EAA4B;IAC3BpC,KAD2B;IAE3BkC,MAAM,EAAEnB,QAAQ,CAACC,IAFU;IAG3Bb;EAH2B,CAA5B,CAZP,GAiBO,IAAAkC,8CAAA,EAAkC;IACjCrC,KADiC;IAEjCkC,MAAM,EAAEnB,QAAQ,CAACM,UAFgB;IAGjClB;EAHiC,CAAlC,CAjBP;AAuBH,CAnFM"}
1
+ {"version":3,"names":["_filters","_interopRequireDefault","require","_fields","_fields2","_error","_types","_table","_form","_submission","_system","_settings","_system2","_submission2","_settings2","_form2","_plugins","_plugins2","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_api","reservedFields","isReserved","name","includes","WebinyError","createFormBuilderStorageOperations","params","attributes","table","tableName","documentClient","plugins","userPlugins","values","attrs","PluginsContainer","formSubmissionFields","formFields","dynamoDbValueFilters","createTable","entities","form","createFormEntity","entityName","ENTITIES","FORM","submission","createSubmissionEntity","SUBMISSION","system","createSystemEntity","SYSTEM","settings","createSettingsEntity","SETTINGS","beforeInit","context","types","FormDynamoDbFieldPlugin","type","FormSubmissionDynamoDbFieldPlugin","CompressorPlugin","mergeByType","getTable","getEntities","createSystemStorageOperations","entity","createSettingsStorageOperations","createFormStorageOperations","createSubmissionStorageOperations"],"sources":["index.ts"],"sourcesContent":["import dynamoDbValueFilters from \"@webiny/db-dynamodb/plugins/filters\";\nimport formSubmissionFields from \"~/operations/submission/fields\";\nimport formFields from \"~/operations/form/fields\";\nimport WebinyError from \"@webiny/error\";\nimport type { FormBuilderStorageOperationsFactory } from \"~/types\";\nimport { ENTITIES } from \"~/types\";\nimport { createTable } from \"~/definitions/table\";\nimport { createFormEntity } from \"~/definitions/form\";\nimport { createSubmissionEntity } from \"~/definitions/submission\";\nimport { createSystemEntity } from \"~/definitions/system\";\nimport { createSettingsEntity } from \"~/definitions/settings\";\nimport { createSystemStorageOperations } from \"~/operations/system\";\nimport { createSubmissionStorageOperations } from \"~/operations/submission\";\nimport { createSettingsStorageOperations } from \"~/operations/settings\";\nimport { createFormStorageOperations } from \"~/operations/form\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport { FormDynamoDbFieldPlugin, FormSubmissionDynamoDbFieldPlugin } from \"~/plugins\";\nimport { CompressorPlugin } from \"@webiny/api\";\n\nconst reservedFields = [\"PK\", \"SK\", \"index\", \"data\", \"TYPE\", \"__type\", \"GSI1_PK\", \"GSI1_SK\"];\n\nconst isReserved = (name: string): void => {\n if (reservedFields.includes(name) === false) {\n return;\n }\n throw new WebinyError(`Attribute name \"${name}\" is not allowed.`, \"ATTRIBUTE_NOT_ALLOWED\", {\n name\n });\n};\n\nexport * from \"./plugins\";\n\nexport const createFormBuilderStorageOperations: FormBuilderStorageOperationsFactory = params => {\n const { attributes, table: tableName, documentClient, plugins: userPlugins } = params;\n\n if (attributes) {\n Object.values(attributes).forEach(attrs => {\n Object.keys(attrs).forEach(isReserved);\n });\n }\n\n const plugins = new PluginsContainer([\n /**\n * User defined plugins.\n */\n userPlugins || [],\n /**\n * Form submission DynamoDB fields.\n */\n formSubmissionFields(),\n /**\n * Form DynamoDB fields.\n */\n formFields(),\n\n /**\n * DynamoDB filter plugins for the where conditions.\n */\n dynamoDbValueFilters()\n ]);\n\n const table = createTable({\n tableName,\n documentClient\n });\n\n const entities = {\n /**\n * Regular entities.\n */\n form: createFormEntity({\n entityName: ENTITIES.FORM,\n table,\n attributes: attributes ? attributes[ENTITIES.FORM] : {}\n }),\n submission: createSubmissionEntity({\n entityName: ENTITIES.SUBMISSION,\n table,\n attributes: attributes ? attributes[ENTITIES.SUBMISSION] : {}\n }),\n system: createSystemEntity({\n entityName: ENTITIES.SYSTEM,\n table,\n attributes: attributes ? attributes[ENTITIES.SYSTEM] : {}\n }),\n settings: createSettingsEntity({\n entityName: ENTITIES.SETTINGS,\n table,\n attributes: attributes ? attributes[ENTITIES.SETTINGS] : {}\n })\n };\n\n return {\n beforeInit: async context => {\n const types: string[] = [\n FormDynamoDbFieldPlugin.type,\n FormSubmissionDynamoDbFieldPlugin.type,\n CompressorPlugin.type\n ];\n for (const type of types) {\n plugins.mergeByType(context.plugins, type);\n }\n },\n getTable: () => table,\n getEntities: () => entities,\n ...createSystemStorageOperations({\n table,\n entity: entities.system\n }),\n ...createSettingsStorageOperations({\n table,\n entity: entities.settings\n }),\n ...createFormStorageOperations({\n table,\n entity: entities.form,\n plugins\n }),\n ...createSubmissionStorageOperations({\n table,\n entity: entities.submission,\n plugins\n })\n };\n};\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AACA,IAAAW,YAAA,GAAAX,OAAA;AACA,IAAAY,UAAA,GAAAZ,OA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,MAAMC,OAAO,IAAI;MACzB,MAAMC,KAAe,GAAG,CACpBC,iCAAuB,CAACC,IAAI,EAC5BC,2CAAiC,CAACD,IAAI,EACtCE,qBAAgB,CAACF,IAAI,CACxB;MACD,KAAK,MAAMA,IAAI,IAAIF,KAAK,EAAE;QACtB1B,OAAO,CAAC+B,WAAW,CAACN,OAAO,CAACzB,OAAO,EAAE4B,IAAI,CAAC;MAC9C;IACJ,CAAC;IACDI,QAAQ,EAAEA,CAAA,KAAMnC,KAAK;IACrBoC,WAAW,EAAEA,CAAA,KAAMxB,QAAQ;IAC3B,GAAG,IAAAyB,sCAA6B,EAAC;MAC7BrC,KAAK;MACLsC,MAAM,EAAE1B,QAAQ,CAACS;IACrB,CAAC,CAAC;IACF,GAAG,IAAAkB,0CAA+B,EAAC;MAC/BvC,KAAK;MACLsC,MAAM,EAAE1B,QAAQ,CAACY;IACrB,CAAC,CAAC;IACF,GAAG,IAAAgB,kCAA2B,EAAC;MAC3BxC,KAAK;MACLsC,MAAM,EAAE1B,QAAQ,CAACC,IAAI;MACrBV;IACJ,CAAC,CAAC;IACF,GAAG,IAAAsC,8CAAiC,EAAC;MACjCzC,KAAK;MACLsC,MAAM,EAAE1B,QAAQ,CAACM,UAAU;MAC3Bf;IACJ,CAAC;EACL,CAAC;AACL,CAAC;AAAChB,OAAA,CAAAU,kCAAA,GAAAA,kCAAA","ignoreList":[]}
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _FormDynamoDbFieldPlugin = require("../../plugins/FormDynamoDbFieldPlugin");
9
-
10
8
  var _default = () => [new _FormDynamoDbFieldPlugin.FormDynamoDbFieldPlugin({
11
9
  field: "publishedOn",
12
10
  type: "date"
@@ -39,5 +37,6 @@ var _default = () => [new _FormDynamoDbFieldPlugin.FormDynamoDbFieldPlugin({
39
37
  field: "createdBy",
40
38
  path: "createdBy.id"
41
39
  })];
40
+ exports.default = _default;
42
41
 
43
- exports.default = _default;
42
+ //# sourceMappingURL=fields.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["FormDynamoDbFieldPlugin","field","type","path"],"sources":["fields.ts"],"sourcesContent":["import { FormDynamoDbFieldPlugin } from \"~/plugins/FormDynamoDbFieldPlugin\";\n\nexport default () => [\n new FormDynamoDbFieldPlugin({\n field: \"publishedOn\",\n type: \"date\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"createdOn\",\n type: \"date\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"savedOn\",\n type: \"date\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"name\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"slug\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"locale\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"tenant\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"published\",\n type: \"boolean\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"status\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"version\",\n type: \"number\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"ownedBy\",\n path: \"ownedBy.id\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"createdBy\",\n path: \"createdBy.id\"\n })\n];\n"],"mappings":";;;;;;;AAAA;;eAEe,MAAM,CACjB,IAAIA,gDAAJ,CAA4B;EACxBC,KAAK,EAAE,aADiB;EAExBC,IAAI,EAAE;AAFkB,CAA5B,CADiB,EAKjB,IAAIF,gDAAJ,CAA4B;EACxBC,KAAK,EAAE,WADiB;EAExBC,IAAI,EAAE;AAFkB,CAA5B,CALiB,EASjB,IAAIF,gDAAJ,CAA4B;EACxBC,KAAK,EAAE,SADiB;EAExBC,IAAI,EAAE;AAFkB,CAA5B,CATiB,EAajB,IAAIF,gDAAJ,CAA4B;EACxBC,KAAK,EAAE;AADiB,CAA5B,CAbiB,EAgBjB,IAAID,gDAAJ,CAA4B;EACxBC,KAAK,EAAE;AADiB,CAA5B,CAhBiB,EAmBjB,IAAID,gDAAJ,CAA4B;EACxBC,KAAK,EAAE;AADiB,CAA5B,CAnBiB,EAsBjB,IAAID,gDAAJ,CAA4B;EACxBC,KAAK,EAAE;AADiB,CAA5B,CAtBiB,EAyBjB,IAAID,gDAAJ,CAA4B;EACxBC,KAAK,EAAE,WADiB;EAExBC,IAAI,EAAE;AAFkB,CAA5B,CAzBiB,EA6BjB,IAAIF,gDAAJ,CAA4B;EACxBC,KAAK,EAAE;AADiB,CAA5B,CA7BiB,EAgCjB,IAAID,gDAAJ,CAA4B;EACxBC,KAAK,EAAE,SADiB;EAExBC,IAAI,EAAE;AAFkB,CAA5B,CAhCiB,EAoCjB,IAAIF,gDAAJ,CAA4B;EACxBC,KAAK,EAAE,SADiB;EAExBE,IAAI,EAAE;AAFkB,CAA5B,CApCiB,EAwCjB,IAAIH,gDAAJ,CAA4B;EACxBC,KAAK,EAAE,WADiB;EAExBE,IAAI,EAAE;AAFkB,CAA5B,CAxCiB,C"}
1
+ {"version":3,"names":["_FormDynamoDbFieldPlugin","require","_default","FormDynamoDbFieldPlugin","field","type","path","exports","default"],"sources":["fields.ts"],"sourcesContent":["import { FormDynamoDbFieldPlugin } from \"~/plugins/FormDynamoDbFieldPlugin\";\n\nexport default () => [\n new FormDynamoDbFieldPlugin({\n field: \"publishedOn\",\n type: \"date\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"createdOn\",\n type: \"date\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"savedOn\",\n type: \"date\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"name\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"slug\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"locale\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"tenant\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"published\",\n type: \"boolean\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"status\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"version\",\n type: \"number\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"ownedBy\",\n path: \"ownedBy.id\"\n }),\n new FormDynamoDbFieldPlugin({\n field: \"createdBy\",\n path: \"createdBy.id\"\n })\n];\n"],"mappings":";;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AAA4E,IAAAC,QAAA,GAE7DA,CAAA,KAAM,CACjB,IAAIC,gDAAuB,CAAC;EACxBC,KAAK,EAAE,aAAa;EACpBC,IAAI,EAAE;AACV,CAAC,CAAC,EACF,IAAIF,gDAAuB,CAAC;EACxBC,KAAK,EAAE,WAAW;EAClBC,IAAI,EAAE;AACV,CAAC,CAAC,EACF,IAAIF,gDAAuB,CAAC;EACxBC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAE;AACV,CAAC,CAAC,EACF,IAAIF,gDAAuB,CAAC;EACxBC,KAAK,EAAE;AACX,CAAC,CAAC,EACF,IAAID,gDAAuB,CAAC;EACxBC,KAAK,EAAE;AACX,CAAC,CAAC,EACF,IAAID,gDAAuB,CAAC;EACxBC,KAAK,EAAE;AACX,CAAC,CAAC,EACF,IAAID,gDAAuB,CAAC;EACxBC,KAAK,EAAE;AACX,CAAC,CAAC,EACF,IAAID,gDAAuB,CAAC;EACxBC,KAAK,EAAE,WAAW;EAClBC,IAAI,EAAE;AACV,CAAC,CAAC,EACF,IAAIF,gDAAuB,CAAC;EACxBC,KAAK,EAAE;AACX,CAAC,CAAC,EACF,IAAID,gDAAuB,CAAC;EACxBC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAE;AACV,CAAC,CAAC,EACF,IAAIF,gDAAuB,CAAC;EACxBC,KAAK,EAAE,SAAS;EAChBE,IAAI,EAAE;AACV,CAAC,CAAC,EACF,IAAIH,gDAAuB,CAAC;EACxBC,KAAK,EAAE,WAAW;EAClBE,IAAI,EAAE;AACV,CAAC,CAAC,CACL;AAAAC,OAAA,CAAAC,OAAA,GAAAN,QAAA","ignoreList":[]}