@webiny/api-form-builder-so-ddb-es 0.0.0-unstable.78f581c1d2 → 0.0.0-unstable.7f63ea0744

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 (67) hide show
  1. package/configurations.js +0 -11
  2. package/configurations.js.map +1 -1
  3. package/definitions/elasticsearch.js +0 -5
  4. package/definitions/elasticsearch.js.map +1 -1
  5. package/definitions/form.js +0 -5
  6. package/definitions/form.js.map +1 -1
  7. package/definitions/settings.js +0 -5
  8. package/definitions/settings.js.map +1 -1
  9. package/definitions/submission.js +0 -5
  10. package/definitions/submission.js.map +1 -1
  11. package/definitions/system.js +0 -5
  12. package/definitions/system.js.map +1 -1
  13. package/definitions/table.js +0 -3
  14. package/definitions/table.js.map +1 -1
  15. package/definitions/tableElasticsearch.js +0 -3
  16. package/definitions/tableElasticsearch.js.map +1 -1
  17. package/elasticsearch/createElasticsearchIndex.js +0 -11
  18. package/elasticsearch/createElasticsearchIndex.js.map +1 -1
  19. package/elasticsearch/indices/base.js +0 -3
  20. package/elasticsearch/indices/base.js.map +1 -1
  21. package/elasticsearch/indices/index.js +0 -4
  22. package/elasticsearch/indices/index.js.map +1 -1
  23. package/elasticsearch/indices/japanese.js +0 -3
  24. package/elasticsearch/indices/japanese.js.map +1 -1
  25. package/index.js +0 -30
  26. package/index.js.map +1 -1
  27. package/operations/form/elasticsearchBody.js +0 -27
  28. package/operations/form/elasticsearchBody.js.map +1 -1
  29. package/operations/form/elasticsearchFields.js +0 -3
  30. package/operations/form/elasticsearchFields.js.map +1 -1
  31. package/operations/form/fields.js +0 -3
  32. package/operations/form/fields.js.map +1 -1
  33. package/operations/form/index.js +2 -103
  34. package/operations/form/index.js.map +1 -1
  35. package/operations/settings/index.js +0 -20
  36. package/operations/settings/index.js.map +1 -1
  37. package/operations/submission/elasticsearchBody.js +0 -29
  38. package/operations/submission/elasticsearchBody.js.map +1 -1
  39. package/operations/submission/elasticsearchFields.js +0 -3
  40. package/operations/submission/elasticsearchFields.js.map +1 -1
  41. package/operations/submission/index.js +1 -49
  42. package/operations/submission/index.js.map +1 -1
  43. package/operations/system/index.js +0 -18
  44. package/operations/system/index.js.map +1 -1
  45. package/package.json +15 -15
  46. package/plugins/FormDynamoDbFieldPlugin.js +0 -5
  47. package/plugins/FormDynamoDbFieldPlugin.js.map +1 -1
  48. package/plugins/FormElasticsearchBodyModifierPlugin.js +0 -5
  49. package/plugins/FormElasticsearchBodyModifierPlugin.js.map +1 -1
  50. package/plugins/FormElasticsearchFieldPlugin.js +0 -5
  51. package/plugins/FormElasticsearchFieldPlugin.js.map +1 -1
  52. package/plugins/FormElasticsearchIndexPlugin.js +0 -5
  53. package/plugins/FormElasticsearchIndexPlugin.js.map +1 -1
  54. package/plugins/FormElasticsearchQueryModifierPlugin.js +0 -5
  55. package/plugins/FormElasticsearchQueryModifierPlugin.js.map +1 -1
  56. package/plugins/FormElasticsearchSortModifierPlugin.js +0 -5
  57. package/plugins/FormElasticsearchSortModifierPlugin.js.map +1 -1
  58. package/plugins/SubmissionElasticsearchBodyModifierPlugin.js +0 -5
  59. package/plugins/SubmissionElasticsearchBodyModifierPlugin.js.map +1 -1
  60. package/plugins/SubmissionElasticsearchFieldPlugin.js +0 -5
  61. package/plugins/SubmissionElasticsearchFieldPlugin.js.map +1 -1
  62. package/plugins/SubmissionElasticsearchQueryModifierPlugin.js +0 -5
  63. package/plugins/SubmissionElasticsearchQueryModifierPlugin.js.map +1 -1
  64. package/plugins/SubmissionElasticsearchSortModifierPlugin.js +0 -5
  65. package/plugins/SubmissionElasticsearchSortModifierPlugin.js.map +1 -1
  66. package/types.js +0 -1
  67. package/types.js.map +1 -1
package/configurations.js CHANGED
@@ -1,50 +1,39 @@
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
  });
8
7
  exports.configurations = void 0;
9
-
10
8
  var _error = _interopRequireDefault(require("@webiny/error"));
11
-
12
9
  const configurations = {
13
10
  es(params) {
14
11
  const {
15
12
  tenant,
16
13
  locale
17
14
  } = params;
18
-
19
15
  if (!tenant) {
20
16
  throw new _error.default(`Missing "tenant" parameter when trying to create Elasticsearch index name.`, "TENANT_ERROR");
21
17
  }
22
-
23
18
  const sharedIndex = process.env.ELASTICSEARCH_SHARED_INDEXES === "true";
24
19
  const tenantId = sharedIndex ? "root" : tenant;
25
20
  let localeCode = null;
26
-
27
21
  if (process.env.WEBINY_ELASTICSEARCH_INDEX_LOCALE === "true") {
28
22
  if (!locale) {
29
23
  throw new _error.default(`Missing "locale" parameter when trying to create Elasticsearch index name.`, "LOCALE_ERROR");
30
24
  }
31
-
32
25
  localeCode = locale;
33
26
  }
34
-
35
27
  const index = [tenantId, localeCode, "form-builder"].filter(Boolean).join("-").toLowerCase();
36
28
  const prefix = process.env.ELASTIC_SEARCH_INDEX_PREFIX || "";
37
-
38
29
  if (!prefix) {
39
30
  return {
40
31
  index
41
32
  };
42
33
  }
43
-
44
34
  return {
45
35
  index: prefix + index
46
36
  };
47
37
  }
48
-
49
38
  };
50
39
  exports.configurations = configurations;
@@ -1 +1 @@
1
- {"version":3,"names":["configurations","es","params","tenant","locale","WebinyError","sharedIndex","process","env","ELASTICSEARCH_SHARED_INDEXES","tenantId","localeCode","WEBINY_ELASTICSEARCH_INDEX_LOCALE","index","filter","Boolean","join","toLowerCase","prefix","ELASTIC_SEARCH_INDEX_PREFIX"],"sources":["configurations.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\n\nexport interface ElasticsearchConfigParams {\n tenant: string;\n locale: string;\n}\n\ninterface ElasticsearchConfig {\n index: string;\n}\n\nexport const configurations = {\n es(params: ElasticsearchConfigParams): ElasticsearchConfig {\n const { tenant, locale } = params;\n if (!tenant) {\n throw new WebinyError(\n `Missing \"tenant\" parameter when trying to create Elasticsearch index name.`,\n \"TENANT_ERROR\"\n );\n }\n\n const sharedIndex = process.env.ELASTICSEARCH_SHARED_INDEXES === \"true\";\n\n const tenantId = sharedIndex ? \"root\" : tenant;\n let localeCode: string | null = null;\n if (process.env.WEBINY_ELASTICSEARCH_INDEX_LOCALE === \"true\") {\n if (!locale) {\n throw new WebinyError(\n `Missing \"locale\" parameter when trying to create Elasticsearch index name.`,\n \"LOCALE_ERROR\"\n );\n }\n localeCode = locale;\n }\n\n const index = [tenantId, localeCode, \"form-builder\"]\n .filter(Boolean)\n .join(\"-\")\n .toLowerCase();\n\n const prefix = process.env.ELASTIC_SEARCH_INDEX_PREFIX || \"\";\n if (!prefix) {\n return {\n index\n };\n }\n return {\n index: prefix + index\n };\n }\n};\n"],"mappings":";;;;;;;;;AAAA;;AAWO,MAAMA,cAAc,GAAG;EAC1BC,EAAE,CAACC,MAAD,EAAyD;IACvD,MAAM;MAAEC,MAAF;MAAUC;IAAV,IAAqBF,MAA3B;;IACA,IAAI,CAACC,MAAL,EAAa;MACT,MAAM,IAAIE,cAAJ,CACD,4EADC,EAEF,cAFE,CAAN;IAIH;;IAED,MAAMC,WAAW,GAAGC,OAAO,CAACC,GAAR,CAAYC,4BAAZ,KAA6C,MAAjE;IAEA,MAAMC,QAAQ,GAAGJ,WAAW,GAAG,MAAH,GAAYH,MAAxC;IACA,IAAIQ,UAAyB,GAAG,IAAhC;;IACA,IAAIJ,OAAO,CAACC,GAAR,CAAYI,iCAAZ,KAAkD,MAAtD,EAA8D;MAC1D,IAAI,CAACR,MAAL,EAAa;QACT,MAAM,IAAIC,cAAJ,CACD,4EADC,EAEF,cAFE,CAAN;MAIH;;MACDM,UAAU,GAAGP,MAAb;IACH;;IAED,MAAMS,KAAK,GAAG,CAACH,QAAD,EAAWC,UAAX,EAAuB,cAAvB,EACTG,MADS,CACFC,OADE,EAETC,IAFS,CAEJ,GAFI,EAGTC,WAHS,EAAd;IAKA,MAAMC,MAAM,GAAGX,OAAO,CAACC,GAAR,CAAYW,2BAAZ,IAA2C,EAA1D;;IACA,IAAI,CAACD,MAAL,EAAa;MACT,OAAO;QACHL;MADG,CAAP;IAGH;;IACD,OAAO;MACHA,KAAK,EAAEK,MAAM,GAAGL;IADb,CAAP;EAGH;;AAtCyB,CAAvB"}
1
+ {"version":3,"names":["configurations","es","params","tenant","locale","WebinyError","sharedIndex","process","env","ELASTICSEARCH_SHARED_INDEXES","tenantId","localeCode","WEBINY_ELASTICSEARCH_INDEX_LOCALE","index","filter","Boolean","join","toLowerCase","prefix","ELASTIC_SEARCH_INDEX_PREFIX"],"sources":["configurations.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\n\nexport interface ElasticsearchConfigParams {\n tenant: string;\n locale: string;\n}\n\ninterface ElasticsearchConfig {\n index: string;\n}\n\nexport const configurations = {\n es(params: ElasticsearchConfigParams): ElasticsearchConfig {\n const { tenant, locale } = params;\n if (!tenant) {\n throw new WebinyError(\n `Missing \"tenant\" parameter when trying to create Elasticsearch index name.`,\n \"TENANT_ERROR\"\n );\n }\n\n const sharedIndex = process.env.ELASTICSEARCH_SHARED_INDEXES === \"true\";\n\n const tenantId = sharedIndex ? \"root\" : tenant;\n let localeCode: string | null = null;\n if (process.env.WEBINY_ELASTICSEARCH_INDEX_LOCALE === \"true\") {\n if (!locale) {\n throw new WebinyError(\n `Missing \"locale\" parameter when trying to create Elasticsearch index name.`,\n \"LOCALE_ERROR\"\n );\n }\n localeCode = locale;\n }\n\n const index = [tenantId, localeCode, \"form-builder\"]\n .filter(Boolean)\n .join(\"-\")\n .toLowerCase();\n\n const prefix = process.env.ELASTIC_SEARCH_INDEX_PREFIX || \"\";\n if (!prefix) {\n return {\n index\n };\n }\n return {\n index: prefix + index\n };\n }\n};\n"],"mappings":";;;;;;;AAAA;AAWO,MAAMA,cAAc,GAAG;EAC1BC,EAAE,CAACC,MAAiC,EAAuB;IACvD,MAAM;MAAEC,MAAM;MAAEC;IAAO,CAAC,GAAGF,MAAM;IACjC,IAAI,CAACC,MAAM,EAAE;MACT,MAAM,IAAIE,cAAW,CAChB,4EAA2E,EAC5E,cAAc,CACjB;IACL;IAEA,MAAMC,WAAW,GAAGC,OAAO,CAACC,GAAG,CAACC,4BAA4B,KAAK,MAAM;IAEvE,MAAMC,QAAQ,GAAGJ,WAAW,GAAG,MAAM,GAAGH,MAAM;IAC9C,IAAIQ,UAAyB,GAAG,IAAI;IACpC,IAAIJ,OAAO,CAACC,GAAG,CAACI,iCAAiC,KAAK,MAAM,EAAE;MAC1D,IAAI,CAACR,MAAM,EAAE;QACT,MAAM,IAAIC,cAAW,CAChB,4EAA2E,EAC5E,cAAc,CACjB;MACL;MACAM,UAAU,GAAGP,MAAM;IACvB;IAEA,MAAMS,KAAK,GAAG,CAACH,QAAQ,EAAEC,UAAU,EAAE,cAAc,CAAC,CAC/CG,MAAM,CAACC,OAAO,CAAC,CACfC,IAAI,CAAC,GAAG,CAAC,CACTC,WAAW,EAAE;IAElB,MAAMC,MAAM,GAAGX,OAAO,CAACC,GAAG,CAACW,2BAA2B,IAAI,EAAE;IAC5D,IAAI,CAACD,MAAM,EAAE;MACT,OAAO;QACHL;MACJ,CAAC;IACL;IACA,OAAO;MACHA,KAAK,EAAEK,MAAM,GAAGL;IACpB,CAAC;EACL;AACJ,CAAC;AAAC"}
@@ -1,16 +1,12 @@
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
  });
8
7
  exports.createElasticsearchEntity = void 0;
9
-
10
8
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
9
  var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
14
10
  const createElasticsearchEntity = params => {
15
11
  const {
16
12
  table,
@@ -39,5 +35,4 @@ const createElasticsearchEntity = params => {
39
35
  }, attributes || {})
40
36
  });
41
37
  };
42
-
43
38
  exports.createElasticsearchEntity = createElasticsearchEntity;
@@ -1 +1 @@
1
- {"version":3,"names":["createElasticsearchEntity","params","table","entityName","attributes","Entity","name","PK","partitionKey","SK","sortKey","index","type","data","TYPE"],"sources":["elasticsearch.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 createElasticsearchEntity = (params: Params) => {\n const { table, entityName, attributes } = 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 index: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n TYPE: {\n type: \"string\"\n },\n\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,yBAAyB,GAAIC,MAAD,IAAoB;EACzD,MAAM;IAAEC,KAAF;IAASC,UAAT;IAAqBC;EAArB,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEH,UADQ;IAEdD,KAFc;IAGdE,UAAU;MACNG,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,KAAK,EAAE;QACHC,IAAI,EAAE;MADH,CAPD;MAUNC,IAAI,EAAE;QACFD,IAAI,EAAE;MADJ,CAVA;MAaNE,IAAI,EAAE;QACFF,IAAI,EAAE;MADJ;IAbA,GAiBFR,UAAU,IAAI,EAjBZ;EAHI,CAAX,CAAP;AAuBH,CAzBM"}
1
+ {"version":3,"names":["createElasticsearchEntity","params","table","entityName","attributes","Entity","name","PK","partitionKey","SK","sortKey","index","type","data","TYPE"],"sources":["elasticsearch.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 createElasticsearchEntity = (params: Params) => {\n const { table, entityName, attributes } = 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 index: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n TYPE: {\n type: \"string\"\n },\n\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;AAAA;AASO,MAAMA,yBAAyB,GAAIC,MAAc,IAAK;EACzD,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC;EAAW,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBAAM,CAAC;IACdC,IAAI,EAAEH,UAAU;IAChBD,KAAK;IACLE,UAAU;MACNG,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,KAAK,EAAE;QACHC,IAAI,EAAE;MACV,CAAC;MACDC,IAAI,EAAE;QACFD,IAAI,EAAE;MACV,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV;IAAC,GAEGR,UAAU,IAAI,CAAC,CAAC;EAE5B,CAAC,CAAC;AACN,CAAC;AAAC"}
@@ -1,16 +1,12 @@
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
  });
8
7
  exports.createFormEntity = void 0;
9
-
10
8
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
9
  var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
14
10
  const createFormEntity = params => {
15
11
  const {
16
12
  table,
@@ -96,5 +92,4 @@ const createFormEntity = params => {
96
92
  }, attributes || {})
97
93
  });
98
94
  };
99
-
100
95
  exports.createFormEntity = createFormEntity;
@@ -1 +1 @@
1
- {"version":3,"names":["createFormEntity","params","table","entityName","attributes","Entity","name","PK","partitionKey","SK","sortKey","TYPE","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 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,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,IAAI,EAAE;QACFC,IAAI,EAAE;MADJ,CAPA;MAUNC,EAAE,EAAE;QACAD,IAAI,EAAE;MADN,CAVE;MAaNE,MAAM,EAAE;QACJF,IAAI,EAAE;MADF,CAbF;MAgBNG,MAAM,EAAE;QACJH,IAAI,EAAE;MADF,CAhBF;MAmBNI,MAAM,EAAE;QACJJ,IAAI,EAAE;MADF,CAnBF;MAsBNK,SAAS,EAAE;QACPL,IAAI,EAAE;MADC,CAtBL;MAyBNM,OAAO,EAAE;QACLN,IAAI,EAAE;MADD,CAzBH;MA4BNO,OAAO,EAAE;QACLP,IAAI,EAAE;MADD,CA5BH;MA+BNQ,SAAS,EAAE;QACPR,IAAI,EAAE;MADC,CA/BL;MAkCNN,IAAI,EAAE;QACFM,IAAI,EAAE;MADJ,CAlCA;MAqCNS,IAAI,EAAE;QACFT,IAAI,EAAE;MADJ,CArCA;MAwCNU,OAAO,EAAE;QACLV,IAAI,EAAE;MADD,CAxCH;MA2CNW,MAAM,EAAE;QACJX,IAAI,EAAE;MADF,CA3CF;MA8CNY,SAAS,EAAE;QACPZ,IAAI,EAAE;MADC,CA9CL;MAiDNa,WAAW,EAAE;QACTb,IAAI,EAAE;MADG,CAjDP;MAoDNc,MAAM,EAAE;QACJd,IAAI,EAAE;MADF,CApDF;MAuDNe,MAAM,EAAE;QACJf,IAAI,EAAE;MADF,CAvDF;MA0DNgB,MAAM,EAAE;QACJhB,IAAI,EAAE;MADF,CA1DF;MA6DNiB,KAAK,EAAE;QACHjB,IAAI,EAAE;MADH,CA7DD;MAgENkB,QAAQ,EAAE;QACNlB,IAAI,EAAE;MADA,CAhEJ;MAmENmB,QAAQ,EAAE;QACNnB,IAAI,EAAE;MADA,CAnEJ;MAsENoB,aAAa,EAAE;QACXpB,IAAI,EAAE;MADK;IAtET,GAyEFR,UAAU,IAAI,EAzEZ;EAHI,CAAX,CAAP;AA+EH,CAjFM"}
1
+ {"version":3,"names":["createFormEntity","params","table","entityName","attributes","Entity","name","PK","partitionKey","SK","sortKey","TYPE","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 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,MAAc,IAAkB;EAC7D,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC;EAAW,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBAAM,CAAC;IACdH,KAAK;IACLI,IAAI,EAAEH,UAAU;IAChBC,UAAU;MACNG,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,EAAE,EAAE;QACAD,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;MACDK,SAAS,EAAE;QACPL,IAAI,EAAE;MACV,CAAC;MACDM,OAAO,EAAE;QACLN,IAAI,EAAE;MACV,CAAC;MACDO,OAAO,EAAE;QACLP,IAAI,EAAE;MACV,CAAC;MACDQ,SAAS,EAAE;QACPR,IAAI,EAAE;MACV,CAAC;MACDN,IAAI,EAAE;QACFM,IAAI,EAAE;MACV,CAAC;MACDS,IAAI,EAAE;QACFT,IAAI,EAAE;MACV,CAAC;MACDU,OAAO,EAAE;QACLV,IAAI,EAAE;MACV,CAAC;MACDW,MAAM,EAAE;QACJX,IAAI,EAAE;MACV,CAAC;MACDY,SAAS,EAAE;QACPZ,IAAI,EAAE;MACV,CAAC;MACDa,WAAW,EAAE;QACTb,IAAI,EAAE;MACV,CAAC;MACDc,MAAM,EAAE;QACJd,IAAI,EAAE;MACV,CAAC;MACDe,MAAM,EAAE;QACJf,IAAI,EAAE;MACV,CAAC;MACDgB,MAAM,EAAE;QACJhB,IAAI,EAAE;MACV,CAAC;MACDiB,KAAK,EAAE;QACHjB,IAAI,EAAE;MACV,CAAC;MACDkB,QAAQ,EAAE;QACNlB,IAAI,EAAE;MACV,CAAC;MACDmB,QAAQ,EAAE;QACNnB,IAAI,EAAE;MACV,CAAC;MACDoB,aAAa,EAAE;QACXpB,IAAI,EAAE;MACV;IAAC,GACGR,UAAU,IAAI,CAAC,CAAC;EAE5B,CAAC,CAAC;AACN,CAAC;AAAC"}
@@ -1,16 +1,12 @@
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
  });
8
7
  exports.createSettingsEntity = void 0;
9
-
10
8
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
9
  var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
14
10
  const createSettingsEntity = params => {
15
11
  const {
16
12
  entityName,
@@ -45,5 +41,4 @@ const createSettingsEntity = params => {
45
41
  }, attributes || {})
46
42
  });
47
43
  };
48
-
49
44
  exports.createSettingsEntity = createSettingsEntity;
@@ -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":["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,MAAc,IAAkB;EACjE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU;MACNI,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;IAAC,GACGT,UAAU,IAAI,CAAC,CAAC;EAE5B,CAAC,CAAC;AACN,CAAC;AAAC"}
@@ -1,16 +1,12 @@
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
  });
8
7
  exports.createSubmissionEntity = void 0;
9
-
10
8
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
9
  var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
14
10
  const createSubmissionEntity = params => {
15
11
  const {
16
12
  table,
@@ -66,5 +62,4 @@ const createSubmissionEntity = params => {
66
62
  }, attributes || {})
67
63
  });
68
64
  };
69
-
70
65
  exports.createSubmissionEntity = createSubmissionEntity;
@@ -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":["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,MAAc,IAAkB;EACnE,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC;EAAW,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBAAM,CAAC;IACdH,KAAK;IACLI,IAAI,EAAEH,UAAU;IAChBC,UAAU;MACNG,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;IAAC,GACGR,UAAU,IAAI,CAAC,CAAC;EAE5B,CAAC,CAAC;AACN,CAAC;AAAC"}
@@ -1,16 +1,12 @@
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
  });
8
7
  exports.createSystemEntity = void 0;
9
-
10
8
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
9
  var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
14
10
  const createSystemEntity = params => {
15
11
  const {
16
12
  entityName,
@@ -36,5 +32,4 @@ const createSystemEntity = params => {
36
32
  }, attributes || {})
37
33
  });
38
34
  };
39
-
40
35
  exports.createSystemEntity = createSystemEntity;
@@ -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":["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,MAAc,IAAkB;EAC/D,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU;MACNI,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;IAAC,GACGT,UAAU,IAAI,CAAC,CAAC;EAE5B,CAAC,CAAC;AACN,CAAC;AAAC"}
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.createTable = void 0;
7
-
8
7
  var _dynamodbToolbox = require("dynamodb-toolbox");
9
-
10
8
  const createTable = params => {
11
9
  const {
12
10
  tableName,
@@ -19,5 +17,4 @@ const createTable = params => {
19
17
  DocumentClient: documentClient
20
18
  });
21
19
  };
22
-
23
20
  exports.createTable = createTable;
@@ -1 +1 @@
1
- {"version":3,"names":["createTable","params","tableName","documentClient","Table","name","process","env","DB_TABLE","partitionKey","sortKey","DocumentClient"],"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 });\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;EAJH,CAAV,CAAP;AAMH,CATM"}
1
+ {"version":3,"names":["createTable","params","tableName","documentClient","Table","name","process","env","DB_TABLE","partitionKey","sortKey","DocumentClient"],"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 });\n};\n"],"mappings":";;;;;;AACA;AAOO,MAAMA,WAAW,GAAIC,MAAc,IAAY;EAClD,MAAM;IAAEC,SAAS;IAAEC;EAAe,CAAC,GAAGF,MAAM;EAE5C,OAAO,IAAIG,sBAAK,CAAC;IACbC,IAAI,EAAEH,SAAS,IAAKI,OAAO,CAACC,GAAG,CAACC,QAAmB;IACnDC,YAAY,EAAE,IAAI;IAClBC,OAAO,EAAE,IAAI;IACbC,cAAc,EAAER;EACpB,CAAC,CAAC;AACN,CAAC;AAAC"}
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.createElasticsearchTable = void 0;
7
-
8
7
  var _dynamodbToolbox = require("dynamodb-toolbox");
9
-
10
8
  const createElasticsearchTable = params => {
11
9
  const {
12
10
  tableName,
@@ -19,5 +17,4 @@ const createElasticsearchTable = params => {
19
17
  DocumentClient: documentClient
20
18
  });
21
19
  };
22
-
23
20
  exports.createElasticsearchTable = createElasticsearchTable;
@@ -1 +1 @@
1
- {"version":3,"names":["createElasticsearchTable","params","tableName","documentClient","Table","name","process","env","DB_TABLE_ELASTICSEARCH","partitionKey","sortKey","DocumentClient"],"sources":["tableElasticsearch.ts"],"sourcesContent":["import { Table } from \"dynamodb-toolbox\";\nimport { DocumentClient } from \"aws-sdk/clients/dynamodb\";\n\ninterface Params {\n documentClient: DocumentClient;\n tableName?: string;\n}\n\nexport const createElasticsearchTable = (params: Params): Table => {\n const { tableName, documentClient } = params;\n return new Table({\n name: tableName || (process.env.DB_TABLE_ELASTICSEARCH as string),\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient\n });\n};\n"],"mappings":";;;;;;;AAAA;;AAQO,MAAMA,wBAAwB,GAAIC,MAAD,IAA2B;EAC/D,MAAM;IAAEC,SAAF;IAAaC;EAAb,IAAgCF,MAAtC;EACA,OAAO,IAAIG,sBAAJ,CAAU;IACbC,IAAI,EAAEH,SAAS,IAAKI,OAAO,CAACC,GAAR,CAAYC,sBADnB;IAEbC,YAAY,EAAE,IAFD;IAGbC,OAAO,EAAE,IAHI;IAIbC,cAAc,EAAER;EAJH,CAAV,CAAP;AAMH,CARM"}
1
+ {"version":3,"names":["createElasticsearchTable","params","tableName","documentClient","Table","name","process","env","DB_TABLE_ELASTICSEARCH","partitionKey","sortKey","DocumentClient"],"sources":["tableElasticsearch.ts"],"sourcesContent":["import { Table } from \"dynamodb-toolbox\";\nimport { DocumentClient } from \"aws-sdk/clients/dynamodb\";\n\ninterface Params {\n documentClient: DocumentClient;\n tableName?: string;\n}\n\nexport const createElasticsearchTable = (params: Params): Table => {\n const { tableName, documentClient } = params;\n return new Table({\n name: tableName || (process.env.DB_TABLE_ELASTICSEARCH as string),\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient\n });\n};\n"],"mappings":";;;;;;AAAA;AAQO,MAAMA,wBAAwB,GAAIC,MAAc,IAAY;EAC/D,MAAM;IAAEC,SAAS;IAAEC;EAAe,CAAC,GAAGF,MAAM;EAC5C,OAAO,IAAIG,sBAAK,CAAC;IACbC,IAAI,EAAEH,SAAS,IAAKI,OAAO,CAACC,GAAG,CAACC,sBAAiC;IACjEC,YAAY,EAAE,IAAI;IAClBC,OAAO,EAAE,IAAI;IACbC,cAAc,EAAER;EACpB,CAAC,CAAC;AACN,CAAC;AAAC"}
@@ -1,20 +1,14 @@
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
  });
8
7
  exports.createElasticsearchIndex = void 0;
9
-
10
8
  var _apiElasticsearch = require("@webiny/api-elasticsearch");
11
-
12
9
  var _FormElasticsearchIndexPlugin = require("../plugins/FormElasticsearchIndexPlugin");
13
-
14
10
  var _error = _interopRequireDefault(require("@webiny/error"));
15
-
16
11
  var _configurations = require("../configurations");
17
-
18
12
  const createElasticsearchIndex = async params => {
19
13
  const {
20
14
  elasticsearch,
@@ -27,23 +21,19 @@ const createElasticsearchIndex = async params => {
27
21
  type: _FormElasticsearchIndexPlugin.FormElasticsearchIndexPlugin.type,
28
22
  locale
29
23
  });
30
-
31
24
  const {
32
25
  index
33
26
  } = _configurations.configurations.es({
34
27
  locale,
35
28
  tenant
36
29
  });
37
-
38
30
  try {
39
31
  const response = await elasticsearch.indices.exists({
40
32
  index
41
33
  });
42
-
43
34
  if (response.body) {
44
35
  return;
45
36
  }
46
-
47
37
  await elasticsearch.indices.create({
48
38
  index,
49
39
  body: plugin.body
@@ -59,5 +49,4 @@ const createElasticsearchIndex = async params => {
59
49
  });
60
50
  }
61
51
  };
62
-
63
52
  exports.createElasticsearchIndex = createElasticsearchIndex;
@@ -1 +1 @@
1
- {"version":3,"names":["createElasticsearchIndex","params","elasticsearch","plugins","container","locale","tenant","plugin","getLastAddedIndexPlugin","type","FormElasticsearchIndexPlugin","index","configurations","es","response","indices","exists","body","create","ex","WebinyError","message","code","error"],"sources":["createElasticsearchIndex.ts"],"sourcesContent":["import { Client } from \"@elastic/elasticsearch\";\nimport { getLastAddedIndexPlugin } from \"@webiny/api-elasticsearch\";\nimport { FormElasticsearchIndexPlugin } from \"~/plugins/FormElasticsearchIndexPlugin\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport WebinyError from \"@webiny/error\";\nimport { configurations } from \"~/configurations\";\n\ninterface CreateElasticsearchIndexParams {\n elasticsearch: Client;\n plugins: PluginsContainer;\n tenant: string;\n locale: string;\n}\n\nexport const createElasticsearchIndex = async (params: CreateElasticsearchIndexParams) => {\n const { elasticsearch, plugins: container, locale, tenant } = params;\n\n const plugin = getLastAddedIndexPlugin<FormElasticsearchIndexPlugin>({\n container,\n type: FormElasticsearchIndexPlugin.type,\n locale\n });\n\n const { index } = configurations.es({\n locale,\n tenant\n });\n\n try {\n const response = await elasticsearch.indices.exists({\n index\n });\n if (response.body) {\n return;\n }\n\n await elasticsearch.indices.create({\n index,\n body: plugin.body\n });\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not create Elasticsearch index for the Form Builder.\",\n ex.code || \"FB_ELASTICSEARCH_INDEX_ERROR\",\n {\n error: ex,\n type: FormElasticsearchIndexPlugin.type,\n locale,\n tenant,\n index,\n body: plugin.body\n }\n );\n }\n};\n"],"mappings":";;;;;;;;;AACA;;AACA;;AAEA;;AACA;;AASO,MAAMA,wBAAwB,GAAG,MAAOC,MAAP,IAAkD;EACtF,MAAM;IAAEC,aAAF;IAAiBC,OAAO,EAAEC,SAA1B;IAAqCC,MAArC;IAA6CC;EAA7C,IAAwDL,MAA9D;EAEA,MAAMM,MAAM,GAAG,IAAAC,yCAAA,EAAsD;IACjEJ,SADiE;IAEjEK,IAAI,EAAEC,0DAAA,CAA6BD,IAF8B;IAGjEJ;EAHiE,CAAtD,CAAf;;EAMA,MAAM;IAAEM;EAAF,IAAYC,8BAAA,CAAeC,EAAf,CAAkB;IAChCR,MADgC;IAEhCC;EAFgC,CAAlB,CAAlB;;EAKA,IAAI;IACA,MAAMQ,QAAQ,GAAG,MAAMZ,aAAa,CAACa,OAAd,CAAsBC,MAAtB,CAA6B;MAChDL;IADgD,CAA7B,CAAvB;;IAGA,IAAIG,QAAQ,CAACG,IAAb,EAAmB;MACf;IACH;;IAED,MAAMf,aAAa,CAACa,OAAd,CAAsBG,MAAtB,CAA6B;MAC/BP,KAD+B;MAE/BM,IAAI,EAAEV,MAAM,CAACU;IAFkB,CAA7B,CAAN;EAIH,CAZD,CAYE,OAAOE,EAAP,EAAW;IACT,MAAM,IAAIC,cAAJ,CACFD,EAAE,CAACE,OAAH,IAAc,4DADZ,EAEFF,EAAE,CAACG,IAAH,IAAW,8BAFT,EAGF;MACIC,KAAK,EAAEJ,EADX;MAEIV,IAAI,EAAEC,0DAAA,CAA6BD,IAFvC;MAGIJ,MAHJ;MAIIC,MAJJ;MAKIK,KALJ;MAMIM,IAAI,EAAEV,MAAM,CAACU;IANjB,CAHE,CAAN;EAYH;AACJ,CAxCM"}
1
+ {"version":3,"names":["createElasticsearchIndex","params","elasticsearch","plugins","container","locale","tenant","plugin","getLastAddedIndexPlugin","type","FormElasticsearchIndexPlugin","index","configurations","es","response","indices","exists","body","create","ex","WebinyError","message","code","error"],"sources":["createElasticsearchIndex.ts"],"sourcesContent":["import { Client } from \"@elastic/elasticsearch\";\nimport { getLastAddedIndexPlugin } from \"@webiny/api-elasticsearch\";\nimport { FormElasticsearchIndexPlugin } from \"~/plugins/FormElasticsearchIndexPlugin\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport WebinyError from \"@webiny/error\";\nimport { configurations } from \"~/configurations\";\n\ninterface CreateElasticsearchIndexParams {\n elasticsearch: Client;\n plugins: PluginsContainer;\n tenant: string;\n locale: string;\n}\n\nexport const createElasticsearchIndex = async (params: CreateElasticsearchIndexParams) => {\n const { elasticsearch, plugins: container, locale, tenant } = params;\n\n const plugin = getLastAddedIndexPlugin<FormElasticsearchIndexPlugin>({\n container,\n type: FormElasticsearchIndexPlugin.type,\n locale\n });\n\n const { index } = configurations.es({\n locale,\n tenant\n });\n\n try {\n const response = await elasticsearch.indices.exists({\n index\n });\n if (response.body) {\n return;\n }\n\n await elasticsearch.indices.create({\n index,\n body: plugin.body\n });\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not create Elasticsearch index for the Form Builder.\",\n ex.code || \"FB_ELASTICSEARCH_INDEX_ERROR\",\n {\n error: ex,\n type: FormElasticsearchIndexPlugin.type,\n locale,\n tenant,\n index,\n body: plugin.body\n }\n );\n }\n};\n"],"mappings":";;;;;;;AACA;AACA;AAEA;AACA;AASO,MAAMA,wBAAwB,GAAG,MAAOC,MAAsC,IAAK;EACtF,MAAM;IAAEC,aAAa;IAAEC,OAAO,EAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGL,MAAM;EAEpE,MAAMM,MAAM,GAAG,IAAAC,yCAAuB,EAA+B;IACjEJ,SAAS;IACTK,IAAI,EAAEC,0DAA4B,CAACD,IAAI;IACvCJ;EACJ,CAAC,CAAC;EAEF,MAAM;IAAEM;EAAM,CAAC,GAAGC,8BAAc,CAACC,EAAE,CAAC;IAChCR,MAAM;IACNC;EACJ,CAAC,CAAC;EAEF,IAAI;IACA,MAAMQ,QAAQ,GAAG,MAAMZ,aAAa,CAACa,OAAO,CAACC,MAAM,CAAC;MAChDL;IACJ,CAAC,CAAC;IACF,IAAIG,QAAQ,CAACG,IAAI,EAAE;MACf;IACJ;IAEA,MAAMf,aAAa,CAACa,OAAO,CAACG,MAAM,CAAC;MAC/BP,KAAK;MACLM,IAAI,EAAEV,MAAM,CAACU;IACjB,CAAC,CAAC;EACN,CAAC,CAAC,OAAOE,EAAE,EAAE;IACT,MAAM,IAAIC,cAAW,CACjBD,EAAE,CAACE,OAAO,IAAI,4DAA4D,EAC1EF,EAAE,CAACG,IAAI,IAAI,8BAA8B,EACzC;MACIC,KAAK,EAAEJ,EAAE;MACTV,IAAI,EAAEC,0DAA4B,CAACD,IAAI;MACvCJ,MAAM;MACNC,MAAM;MACNK,KAAK;MACLM,IAAI,EAAEV,MAAM,CAACU;IACjB,CAAC,CACJ;EACL;AACJ,CAAC;AAAC"}
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.base = void 0;
7
-
8
7
  var _FormElasticsearchIndexPlugin = require("../../plugins/FormElasticsearchIndexPlugin");
9
-
10
8
  var _apiElasticsearch = require("@webiny/api-elasticsearch");
11
-
12
9
  const base = new _FormElasticsearchIndexPlugin.FormElasticsearchIndexPlugin({
13
10
  body: (0, _apiElasticsearch.getBaseConfiguration)()
14
11
  });
@@ -1 +1 @@
1
- {"version":3,"names":["base","FormElasticsearchIndexPlugin","body","getBaseConfiguration"],"sources":["base.ts"],"sourcesContent":["import { FormElasticsearchIndexPlugin } from \"~/plugins/FormElasticsearchIndexPlugin\";\nimport { getBaseConfiguration } from \"@webiny/api-elasticsearch\";\n\nexport const base = new FormElasticsearchIndexPlugin({\n body: getBaseConfiguration()\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEO,MAAMA,IAAI,GAAG,IAAIC,0DAAJ,CAAiC;EACjDC,IAAI,EAAE,IAAAC,sCAAA;AAD2C,CAAjC,CAAb"}
1
+ {"version":3,"names":["base","FormElasticsearchIndexPlugin","body","getBaseConfiguration"],"sources":["base.ts"],"sourcesContent":["import { FormElasticsearchIndexPlugin } from \"~/plugins/FormElasticsearchIndexPlugin\";\nimport { getBaseConfiguration } from \"@webiny/api-elasticsearch\";\n\nexport const base = new FormElasticsearchIndexPlugin({\n body: getBaseConfiguration()\n});\n"],"mappings":";;;;;;AAAA;AACA;AAEO,MAAMA,IAAI,GAAG,IAAIC,0DAA4B,CAAC;EACjDC,IAAI,EAAE,IAAAC,sCAAoB;AAC9B,CAAC,CAAC;AAAC"}
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.elasticsearchIndexPlugins = void 0;
7
-
8
7
  var _base = require("./base");
9
-
10
8
  var _japanese = require("./japanese");
11
-
12
9
  const elasticsearchIndexPlugins = () => {
13
10
  return [_base.base, _japanese.japanese];
14
11
  };
15
-
16
12
  exports.elasticsearchIndexPlugins = elasticsearchIndexPlugins;
@@ -1 +1 @@
1
- {"version":3,"names":["elasticsearchIndexPlugins","base","japanese"],"sources":["index.ts"],"sourcesContent":["import { base } from \"./base\";\nimport { japanese } from \"./japanese\";\n\nexport const elasticsearchIndexPlugins = () => {\n return [base, japanese];\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEO,MAAMA,yBAAyB,GAAG,MAAM;EAC3C,OAAO,CAACC,UAAD,EAAOC,kBAAP,CAAP;AACH,CAFM"}
1
+ {"version":3,"names":["elasticsearchIndexPlugins","base","japanese"],"sources":["index.ts"],"sourcesContent":["import { base } from \"./base\";\nimport { japanese } from \"./japanese\";\n\nexport const elasticsearchIndexPlugins = () => {\n return [base, japanese];\n};\n"],"mappings":";;;;;;AAAA;AACA;AAEO,MAAMA,yBAAyB,GAAG,MAAM;EAC3C,OAAO,CAACC,UAAI,EAAEC,kBAAQ,CAAC;AAC3B,CAAC;AAAC"}
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.japanese = void 0;
7
-
8
7
  var _apiElasticsearch = require("@webiny/api-elasticsearch");
9
-
10
8
  var _FormElasticsearchIndexPlugin = require("../../plugins/FormElasticsearchIndexPlugin");
11
-
12
9
  const japanese = new _FormElasticsearchIndexPlugin.FormElasticsearchIndexPlugin({
13
10
  body: (0, _apiElasticsearch.getJapaneseConfiguration)(),
14
11
  locales: ["ja", "ja-jp"]
@@ -1 +1 @@
1
- {"version":3,"names":["japanese","FormElasticsearchIndexPlugin","body","getJapaneseConfiguration","locales"],"sources":["japanese.ts"],"sourcesContent":["import { getJapaneseConfiguration } from \"@webiny/api-elasticsearch\";\nimport { FormElasticsearchIndexPlugin } from \"~/plugins/FormElasticsearchIndexPlugin\";\n\nexport const japanese = new FormElasticsearchIndexPlugin({\n body: getJapaneseConfiguration(),\n locales: [\"ja\", \"ja-jp\"]\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEO,MAAMA,QAAQ,GAAG,IAAIC,0DAAJ,CAAiC;EACrDC,IAAI,EAAE,IAAAC,0CAAA,GAD+C;EAErDC,OAAO,EAAE,CAAC,IAAD,EAAO,OAAP;AAF4C,CAAjC,CAAjB"}
1
+ {"version":3,"names":["japanese","FormElasticsearchIndexPlugin","body","getJapaneseConfiguration","locales"],"sources":["japanese.ts"],"sourcesContent":["import { getJapaneseConfiguration } from \"@webiny/api-elasticsearch\";\nimport { FormElasticsearchIndexPlugin } from \"~/plugins/FormElasticsearchIndexPlugin\";\n\nexport const japanese = new FormElasticsearchIndexPlugin({\n body: getJapaneseConfiguration(),\n locales: [\"ja\", \"ja-jp\"]\n});\n"],"mappings":";;;;;;AAAA;AACA;AAEO,MAAMA,QAAQ,GAAG,IAAIC,0DAA4B,CAAC;EACrDC,IAAI,EAAE,IAAAC,0CAAwB,GAAE;EAChCC,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO;AAC3B,CAAC,CAAC;AAAC"}
package/index.js CHANGED
@@ -1,66 +1,40 @@
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
  });
8
7
  exports.createFormBuilderStorageOperations = void 0;
9
-
10
8
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
9
  var _filters = _interopRequireDefault(require("@webiny/db-dynamodb/plugins/filters"));
13
-
14
10
  var _elasticsearchFields = _interopRequireDefault(require("./operations/form/elasticsearchFields"));
15
-
16
11
  var _elasticsearchFields2 = _interopRequireDefault(require("./operations/submission/elasticsearchFields"));
17
-
18
12
  var _error = _interopRequireDefault(require("@webiny/error"));
19
-
20
13
  var _types = require("./types");
21
-
22
14
  var _table = require("./definitions/table");
23
-
24
15
  var _form = require("./definitions/form");
25
-
26
16
  var _submission = require("./definitions/submission");
27
-
28
17
  var _system = require("./definitions/system");
29
-
30
18
  var _settings = require("./definitions/settings");
31
-
32
19
  var _system2 = require("./operations/system");
33
-
34
20
  var _submission2 = require("./operations/submission");
35
-
36
21
  var _settings2 = require("./operations/settings");
37
-
38
22
  var _form2 = require("./operations/form");
39
-
40
23
  var _tableElasticsearch = require("./definitions/tableElasticsearch");
41
-
42
24
  var _plugins = require("@webiny/plugins");
43
-
44
25
  var _elasticsearch = require("./definitions/elasticsearch");
45
-
46
26
  var _apiElasticsearch = require("@webiny/api-elasticsearch");
47
-
48
27
  var _indices = require("./elasticsearch/indices");
49
-
50
28
  var _createElasticsearchIndex = require("./elasticsearch/createElasticsearchIndex");
51
-
52
29
  const reservedFields = ["PK", "SK", "index", "data", "TYPE", "__type", "GSI1_PK", "GSI1_SK"];
53
-
54
30
  const isReserved = name => {
55
31
  if (reservedFields.includes(name) === false) {
56
32
  return;
57
33
  }
58
-
59
34
  throw new _error.default(`Attribute name "${name}" is not allowed.`, "ATTRIBUTE_NOT_ALLOWED", {
60
35
  name
61
36
  });
62
37
  };
63
-
64
38
  const createFormBuilderStorageOperations = params => {
65
39
  const {
66
40
  attributes,
@@ -70,13 +44,11 @@ const createFormBuilderStorageOperations = params => {
70
44
  elasticsearch,
71
45
  plugins: userPlugins
72
46
  } = params;
73
-
74
47
  if (attributes) {
75
48
  Object.values(attributes).forEach(attrs => {
76
49
  Object.keys(attrs).forEach(isReserved);
77
50
  });
78
51
  }
79
-
80
52
  const plugins = new _plugins.PluginsContainer([
81
53
  /**
82
54
  * User defined plugins.
@@ -134,7 +106,6 @@ const createFormBuilderStorageOperations = params => {
134
106
  table,
135
107
  attributes: attributes ? attributes[_types.ENTITIES.SETTINGS] : {}
136
108
  }),
137
-
138
109
  /**
139
110
  * Elasticsearch entities.
140
111
  */
@@ -187,5 +158,4 @@ const createFormBuilderStorageOperations = params => {
187
158
  plugins
188
159
  }));
189
160
  };
190
-
191
161
  exports.createFormBuilderStorageOperations = createFormBuilderStorageOperations;
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["reservedFields","isReserved","name","includes","WebinyError","createFormBuilderStorageOperations","params","attributes","table","tableName","esTable","esTableName","documentClient","elasticsearch","plugins","userPlugins","Object","values","forEach","attrs","keys","PluginsContainer","submissionElasticsearchFields","formElasticsearchFields","dynamoDbValueFilters","getElasticsearchOperators","elasticsearchIndexPlugins","createTable","createElasticsearchTable","entities","form","createFormEntity","entityName","ENTITIES","FORM","submission","createSubmissionEntity","SUBMISSION","system","createSystemEntity","SYSTEM","settings","createSettingsEntity","SETTINGS","esForm","createElasticsearchEntity","ES_FORM","esSubmission","ES_SUBMISSION","init","context","i18n","locales","onLocaleBeforeCreate","subscribe","locale","tenant","createElasticsearchIndex","code","upgrade","getTable","getEsTable","getEntities","createSystemStorageOperations","entity","createSettingsStorageOperations","createFormStorageOperations","esEntity","createSubmissionStorageOperations"],"sources":["index.ts"],"sourcesContent":["import dynamoDbValueFilters from \"@webiny/db-dynamodb/plugins/filters\";\nimport formElasticsearchFields from \"./operations/form/elasticsearchFields\";\nimport submissionElasticsearchFields from \"./operations/submission/elasticsearchFields\";\nimport WebinyError from \"@webiny/error\";\nimport { 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 { createElasticsearchTable } from \"~/definitions/tableElasticsearch\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport { createElasticsearchEntity } from \"~/definitions/elasticsearch\";\nimport { getElasticsearchOperators } from \"@webiny/api-elasticsearch\";\nimport { elasticsearchIndexPlugins } from \"~/elasticsearch/indices\";\nimport { createElasticsearchIndex } from \"~/elasticsearch/createElasticsearchIndex\";\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 {\n attributes,\n table: tableName,\n esTable: esTableName,\n documentClient,\n elasticsearch,\n plugins: userPlugins\n } = 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 * Elasticsearch field definitions for the submission record.\n */\n submissionElasticsearchFields(),\n /**\n * Elasticsearch field definitions for the form record.\n */\n formElasticsearchFields(),\n /**\n * DynamoDB filter plugins for the where conditions.\n */\n dynamoDbValueFilters(),\n /**\n * Elasticsearch operators.\n */\n getElasticsearchOperators(),\n /**\n * Built-in Elasticsearch index plugins\n */\n elasticsearchIndexPlugins()\n ]);\n\n const table = createTable({\n tableName,\n documentClient\n });\n\n const esTable = createElasticsearchTable({\n tableName: esTableName,\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 * Elasticsearch entities.\n */\n esForm: createElasticsearchEntity({\n entityName: ENTITIES.ES_FORM,\n table: esTable,\n attributes: attributes ? attributes[ENTITIES.ES_FORM] : {}\n }),\n esSubmission: createElasticsearchEntity({\n entityName: ENTITIES.ES_SUBMISSION,\n table: esTable,\n attributes: attributes ? attributes[ENTITIES.ES_SUBMISSION] : {}\n })\n };\n\n return {\n init: async context => {\n context.i18n.locales.onLocaleBeforeCreate.subscribe(async ({ locale, tenant }) => {\n await createElasticsearchIndex({\n elasticsearch,\n plugins,\n tenant,\n locale: locale.code\n });\n });\n },\n upgrade: null,\n getTable: () => table,\n getEsTable: () => esTable,\n getEntities: () => entities,\n ...createSystemStorageOperations({\n table,\n entity: entities.system\n }),\n ...createSettingsStorageOperations({\n table,\n entity: entities.settings\n }),\n ...createFormStorageOperations({\n elasticsearch,\n table,\n entity: entities.form,\n esEntity: entities.esForm,\n plugins\n }),\n ...createSubmissionStorageOperations({\n elasticsearch,\n table,\n entity: entities.submission,\n esEntity: entities.esSubmission,\n plugins\n })\n };\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;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1
+ {"version":3,"names":["reservedFields","isReserved","name","includes","WebinyError","createFormBuilderStorageOperations","params","attributes","table","tableName","esTable","esTableName","documentClient","elasticsearch","plugins","userPlugins","Object","values","forEach","attrs","keys","PluginsContainer","submissionElasticsearchFields","formElasticsearchFields","dynamoDbValueFilters","getElasticsearchOperators","elasticsearchIndexPlugins","createTable","createElasticsearchTable","entities","form","createFormEntity","entityName","ENTITIES","FORM","submission","createSubmissionEntity","SUBMISSION","system","createSystemEntity","SYSTEM","settings","createSettingsEntity","SETTINGS","esForm","createElasticsearchEntity","ES_FORM","esSubmission","ES_SUBMISSION","init","context","i18n","locales","onLocaleBeforeCreate","subscribe","locale","tenant","createElasticsearchIndex","code","upgrade","getTable","getEsTable","getEntities","createSystemStorageOperations","entity","createSettingsStorageOperations","createFormStorageOperations","esEntity","createSubmissionStorageOperations"],"sources":["index.ts"],"sourcesContent":["import dynamoDbValueFilters from \"@webiny/db-dynamodb/plugins/filters\";\nimport formElasticsearchFields from \"./operations/form/elasticsearchFields\";\nimport submissionElasticsearchFields from \"./operations/submission/elasticsearchFields\";\nimport WebinyError from \"@webiny/error\";\nimport { 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 { createElasticsearchTable } from \"~/definitions/tableElasticsearch\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport { createElasticsearchEntity } from \"~/definitions/elasticsearch\";\nimport { getElasticsearchOperators } from \"@webiny/api-elasticsearch\";\nimport { elasticsearchIndexPlugins } from \"~/elasticsearch/indices\";\nimport { createElasticsearchIndex } from \"~/elasticsearch/createElasticsearchIndex\";\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 {\n attributes,\n table: tableName,\n esTable: esTableName,\n documentClient,\n elasticsearch,\n plugins: userPlugins\n } = 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 * Elasticsearch field definitions for the submission record.\n */\n submissionElasticsearchFields(),\n /**\n * Elasticsearch field definitions for the form record.\n */\n formElasticsearchFields(),\n /**\n * DynamoDB filter plugins for the where conditions.\n */\n dynamoDbValueFilters(),\n /**\n * Elasticsearch operators.\n */\n getElasticsearchOperators(),\n /**\n * Built-in Elasticsearch index plugins\n */\n elasticsearchIndexPlugins()\n ]);\n\n const table = createTable({\n tableName,\n documentClient\n });\n\n const esTable = createElasticsearchTable({\n tableName: esTableName,\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 * Elasticsearch entities.\n */\n esForm: createElasticsearchEntity({\n entityName: ENTITIES.ES_FORM,\n table: esTable,\n attributes: attributes ? attributes[ENTITIES.ES_FORM] : {}\n }),\n esSubmission: createElasticsearchEntity({\n entityName: ENTITIES.ES_SUBMISSION,\n table: esTable,\n attributes: attributes ? attributes[ENTITIES.ES_SUBMISSION] : {}\n })\n };\n\n return {\n init: async context => {\n context.i18n.locales.onLocaleBeforeCreate.subscribe(async ({ locale, tenant }) => {\n await createElasticsearchIndex({\n elasticsearch,\n plugins,\n tenant,\n locale: locale.code\n });\n });\n },\n upgrade: null,\n getTable: () => table,\n getEsTable: () => esTable,\n getEntities: () => entities,\n ...createSystemStorageOperations({\n table,\n entity: entities.system\n }),\n ...createSettingsStorageOperations({\n table,\n entity: entities.settings\n }),\n ...createFormStorageOperations({\n elasticsearch,\n table,\n entity: entities.form,\n esEntity: entities.esForm,\n plugins\n }),\n ...createSubmissionStorageOperations({\n elasticsearch,\n table,\n entity: entities.submission,\n esEntity: entities.esSubmission,\n plugins\n })\n };\n};\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAMA,cAAc,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC;AAE5F,MAAMC,UAAU,GAAIC,IAAY,IAAW;EACvC,IAAIF,cAAc,CAACG,QAAQ,CAACD,IAAI,CAAC,KAAK,KAAK,EAAE;IACzC;EACJ;EACA,MAAM,IAAIE,cAAW,CAAE,mBAAkBF,IAAK,mBAAkB,EAAE,uBAAuB,EAAE;IACvFA;EACJ,CAAC,CAAC;AACN,CAAC;AAEM,MAAMG,kCAAuE,GAAGC,MAAM,IAAI;EAC7F,MAAM;IACFC,UAAU;IACVC,KAAK,EAAEC,SAAS;IAChBC,OAAO,EAAEC,WAAW;IACpB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