@webiny/api-headless-cms-ddb-es 0.0.0-unstable.97a151f74d → 0.0.0-unstable.99666aeb00

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 (214) hide show
  1. package/configurations.d.ts +1 -1
  2. package/configurations.js +0 -8
  3. package/configurations.js.map +1 -1
  4. package/definitions/entry.js +6 -5
  5. package/definitions/entry.js.map +1 -1
  6. package/definitions/entryElasticsearch.js +0 -5
  7. package/definitions/entryElasticsearch.js.map +1 -1
  8. package/definitions/group.js +0 -5
  9. package/definitions/group.js.map +1 -1
  10. package/definitions/model.js +17 -5
  11. package/definitions/model.js.map +1 -1
  12. package/definitions/settings.js +0 -5
  13. package/definitions/settings.js.map +1 -1
  14. package/definitions/system.js +0 -5
  15. package/definitions/system.js.map +1 -1
  16. package/definitions/table.js +0 -3
  17. package/definitions/table.js.map +1 -1
  18. package/definitions/tableElasticsearch.js +0 -3
  19. package/definitions/tableElasticsearch.js.map +1 -1
  20. package/dynamoDb/index.js +0 -5
  21. package/dynamoDb/index.js.map +1 -1
  22. package/dynamoDb/storage/date.js +5 -27
  23. package/dynamoDb/storage/date.js.map +1 -1
  24. package/dynamoDb/storage/longText.js +10 -18
  25. package/dynamoDb/storage/longText.js.map +1 -1
  26. package/dynamoDb/storage/richText.js +12 -35
  27. package/dynamoDb/storage/richText.js.map +1 -1
  28. package/elasticsearch/createElasticsearchIndex.js +0 -11
  29. package/elasticsearch/createElasticsearchIndex.js.map +1 -1
  30. package/elasticsearch/deleteElasticsearchIndex.js +0 -7
  31. package/elasticsearch/deleteElasticsearchIndex.js.map +1 -1
  32. package/elasticsearch/index.js +0 -5
  33. package/elasticsearch/index.js.map +1 -1
  34. package/elasticsearch/indexing/dateTimeIndexing.js +8 -23
  35. package/elasticsearch/indexing/dateTimeIndexing.js.map +1 -1
  36. package/elasticsearch/indexing/defaultFieldIndexing.js +15 -10
  37. package/elasticsearch/indexing/defaultFieldIndexing.js.map +1 -1
  38. package/elasticsearch/indexing/index.js +0 -9
  39. package/elasticsearch/indexing/index.js.map +1 -1
  40. package/elasticsearch/indexing/longTextIndexing.js +2 -14
  41. package/elasticsearch/indexing/longTextIndexing.js.map +1 -1
  42. package/elasticsearch/indexing/numberIndexing.js +0 -9
  43. package/elasticsearch/indexing/numberIndexing.js.map +1 -1
  44. package/elasticsearch/indexing/objectIndexing.js +19 -37
  45. package/elasticsearch/indexing/objectIndexing.js.map +1 -1
  46. package/elasticsearch/indexing/richTextIndexing.js +0 -5
  47. package/elasticsearch/indexing/richTextIndexing.js.map +1 -1
  48. package/elasticsearch/indices/base.js +0 -3
  49. package/elasticsearch/indices/base.js.map +1 -1
  50. package/elasticsearch/indices/index.js +0 -4
  51. package/elasticsearch/indices/index.js.map +1 -1
  52. package/elasticsearch/indices/japanese.js +0 -3
  53. package/elasticsearch/indices/japanese.js.map +1 -1
  54. package/elasticsearch/search/index.js +0 -4
  55. package/elasticsearch/search/index.js.map +1 -1
  56. package/elasticsearch/search/refSearch.js +0 -6
  57. package/elasticsearch/search/refSearch.js.map +1 -1
  58. package/elasticsearch/search/timeSearch.js +0 -7
  59. package/elasticsearch/search/timeSearch.js.map +1 -1
  60. package/helpers/entryIndexHelpers.js +37 -57
  61. package/helpers/entryIndexHelpers.js.map +1 -1
  62. package/helpers/fieldIdentifier.d.ts +6 -0
  63. package/helpers/fieldIdentifier.js +39 -0
  64. package/helpers/fieldIdentifier.js.map +1 -0
  65. package/helpers/index.d.ts +1 -0
  66. package/helpers/index.js +11 -2
  67. package/helpers/index.js.map +1 -1
  68. package/index.js +20 -78
  69. package/index.js.map +1 -1
  70. package/operations/entry/dataLoader/DataLoaderCache.d.ts +17 -0
  71. package/operations/entry/dataLoader/DataLoaderCache.js +43 -0
  72. package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -0
  73. package/operations/entry/dataLoader/constants.d.ts +1 -0
  74. package/operations/entry/dataLoader/constants.js +9 -0
  75. package/operations/entry/dataLoader/constants.js.map +1 -0
  76. package/operations/entry/dataLoader/createBatchScheduleFn.d.ts +8 -0
  77. package/operations/entry/dataLoader/createBatchScheduleFn.js +23 -0
  78. package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -0
  79. package/operations/entry/dataLoader/getAllEntryRevisions.d.ts +4 -0
  80. package/operations/entry/dataLoader/getAllEntryRevisions.js +43 -0
  81. package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -0
  82. package/operations/entry/dataLoader/getLatestRevisionByEntryId.d.ts +4 -0
  83. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +53 -0
  84. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -0
  85. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.d.ts +4 -0
  86. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +53 -0
  87. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -0
  88. package/operations/entry/dataLoader/getRevisionById.d.ts +4 -0
  89. package/operations/entry/dataLoader/getRevisionById.js +63 -0
  90. package/operations/entry/dataLoader/getRevisionById.js.map +1 -0
  91. package/operations/entry/dataLoader/index.d.ts +8 -0
  92. package/operations/entry/dataLoader/index.js +38 -0
  93. package/operations/entry/dataLoader/index.js.map +1 -0
  94. package/operations/entry/dataLoader/types.d.ts +6 -0
  95. package/operations/entry/dataLoader/types.js +5 -0
  96. package/operations/entry/dataLoader/types.js.map +1 -0
  97. package/operations/entry/dataLoaders.d.ts +15 -36
  98. package/operations/entry/dataLoaders.js +42 -292
  99. package/operations/entry/dataLoaders.js.map +1 -1
  100. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +18 -0
  101. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +32 -0
  102. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +1 -0
  103. package/operations/entry/elasticsearch/body.js +8 -30
  104. package/operations/entry/elasticsearch/body.js.map +1 -1
  105. package/operations/entry/elasticsearch/fields.d.ts +5 -4
  106. package/operations/entry/elasticsearch/fields.js +112 -60
  107. package/operations/entry/elasticsearch/fields.js.map +1 -1
  108. package/operations/entry/elasticsearch/filtering/applyFiltering.js +1 -10
  109. package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +1 -1
  110. package/operations/entry/elasticsearch/filtering/exec.js +15 -57
  111. package/operations/entry/elasticsearch/filtering/exec.js.map +1 -1
  112. package/operations/entry/elasticsearch/filtering/index.js +0 -2
  113. package/operations/entry/elasticsearch/filtering/index.js.map +1 -1
  114. package/operations/entry/elasticsearch/filtering/path.js +1 -9
  115. package/operations/entry/elasticsearch/filtering/path.js.map +1 -1
  116. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js +1 -8
  117. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js.map +1 -1
  118. package/operations/entry/elasticsearch/filtering/plugins/index.js +0 -5
  119. package/operations/entry/elasticsearch/filtering/plugins/index.js.map +1 -1
  120. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js +3 -14
  121. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js.map +1 -1
  122. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js +0 -10
  123. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js.map +1 -1
  124. package/operations/entry/elasticsearch/filtering/populated.js +0 -7
  125. package/operations/entry/elasticsearch/filtering/populated.js.map +1 -1
  126. package/operations/entry/elasticsearch/filtering/values.js +0 -6
  127. package/operations/entry/elasticsearch/filtering/values.js.map +1 -1
  128. package/operations/entry/elasticsearch/fullTextSearch.d.ts +4 -1
  129. package/operations/entry/elasticsearch/fullTextSearch.js +70 -15
  130. package/operations/entry/elasticsearch/fullTextSearch.js.map +1 -1
  131. package/operations/entry/elasticsearch/fullTextSearchFields.js +8 -35
  132. package/operations/entry/elasticsearch/fullTextSearchFields.js.map +1 -1
  133. package/operations/entry/elasticsearch/initialQuery.js +5 -19
  134. package/operations/entry/elasticsearch/initialQuery.js.map +1 -1
  135. package/operations/entry/elasticsearch/keyword.js +0 -4
  136. package/operations/entry/elasticsearch/keyword.js.map +1 -1
  137. package/operations/entry/elasticsearch/plugins/bodyModifier.js +0 -3
  138. package/operations/entry/elasticsearch/plugins/bodyModifier.js.map +1 -1
  139. package/operations/entry/elasticsearch/plugins/operator.js +0 -8
  140. package/operations/entry/elasticsearch/plugins/operator.js.map +1 -1
  141. package/operations/entry/elasticsearch/plugins/queryModifier.js +0 -3
  142. package/operations/entry/elasticsearch/plugins/queryModifier.js.map +1 -1
  143. package/operations/entry/elasticsearch/plugins/search.js +0 -6
  144. package/operations/entry/elasticsearch/plugins/search.js.map +1 -1
  145. package/operations/entry/elasticsearch/plugins/sortModifier.js +0 -3
  146. package/operations/entry/elasticsearch/plugins/sortModifier.js.map +1 -1
  147. package/operations/entry/elasticsearch/sort.js +9 -20
  148. package/operations/entry/elasticsearch/sort.js.map +1 -1
  149. package/operations/entry/elasticsearch/transformValueForSearch.js +0 -4
  150. package/operations/entry/elasticsearch/transformValueForSearch.js.map +1 -1
  151. package/operations/entry/elasticsearch/types.d.ts +3 -3
  152. package/operations/entry/elasticsearch/types.js.map +1 -1
  153. package/operations/entry/index.d.ts +1 -1
  154. package/operations/entry/index.js +238 -172
  155. package/operations/entry/index.js.map +1 -1
  156. package/operations/entry/keys.js +0 -9
  157. package/operations/entry/keys.js.map +1 -1
  158. package/operations/entry/recordType.js +0 -6
  159. package/operations/entry/recordType.js.map +1 -1
  160. package/operations/group/index.js +2 -32
  161. package/operations/group/index.js.map +1 -1
  162. package/operations/model/index.js +1 -34
  163. package/operations/model/index.js.map +1 -1
  164. package/operations/settings/index.js +0 -24
  165. package/operations/settings/index.js.map +1 -1
  166. package/operations/system/index.js +0 -17
  167. package/operations/system/index.js.map +1 -1
  168. package/package.json +31 -28
  169. package/plugins/CmsElasticsearchModelFieldPlugin.d.ts +69 -0
  170. package/plugins/CmsElasticsearchModelFieldPlugin.js +48 -0
  171. package/plugins/CmsElasticsearchModelFieldPlugin.js.map +1 -0
  172. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +1 -0
  173. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +6 -8
  174. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +1 -1
  175. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.d.ts +23 -0
  176. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js +28 -0
  177. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js.map +1 -0
  178. package/plugins/CmsEntryElasticsearchIndexPlugin.js +0 -5
  179. package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +1 -1
  180. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.d.ts +1 -0
  181. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +6 -12
  182. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js.map +1 -1
  183. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +1 -0
  184. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +6 -8
  185. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +1 -1
  186. package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +1 -0
  187. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +6 -8
  188. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +1 -1
  189. package/plugins/CmsEntryFilterPlugin.js +0 -7
  190. package/plugins/CmsEntryFilterPlugin.js.map +1 -1
  191. package/plugins/index.d.ts +2 -1
  192. package/plugins/index.js +22 -23
  193. package/plugins/index.js.map +1 -1
  194. package/types.d.ts +11 -2
  195. package/types.js +0 -5
  196. package/types.js.map +1 -1
  197. package/helpers/createElasticsearchQueryBody.d.ts +0 -11
  198. package/helpers/createElasticsearchQueryBody.js +0 -618
  199. package/helpers/createElasticsearchQueryBody.js.map +0 -1
  200. package/helpers/fields.d.ts +0 -19
  201. package/helpers/fields.js +0 -196
  202. package/helpers/fields.js.map +0 -1
  203. package/helpers/searchPluginsList.d.ts +0 -6
  204. package/helpers/searchPluginsList.js +0 -26
  205. package/helpers/searchPluginsList.js.map +0 -1
  206. package/helpers/transformValueForSearch.d.ts +0 -12
  207. package/helpers/transformValueForSearch.js +0 -29
  208. package/helpers/transformValueForSearch.js.map +0 -1
  209. package/operations/entry/elasticsearchFields.d.ts +0 -2
  210. package/operations/entry/elasticsearchFields.js +0 -38
  211. package/operations/entry/elasticsearchFields.js.map +0 -1
  212. package/plugins/CmsEntryElasticsearchFieldPlugin.d.ts +0 -12
  213. package/plugins/CmsEntryElasticsearchFieldPlugin.js +0 -24
  214. package/plugins/CmsEntryElasticsearchFieldPlugin.js.map +0 -1
@@ -3,7 +3,7 @@ interface ElasticsearchConfig {
3
3
  index: string;
4
4
  }
5
5
  interface CmsElasticsearchParams {
6
- model: CmsModel;
6
+ model: Pick<CmsModel, "tenant" | "locale" | "modelId">;
7
7
  }
8
8
  interface Configurations {
9
9
  es: (params: CmsElasticsearchParams) => ElasticsearchConfig;
package/configurations.js CHANGED
@@ -1,14 +1,11 @@
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({
14
11
  model
@@ -17,27 +14,22 @@ const configurations = {
17
14
  tenant,
18
15
  locale
19
16
  } = model;
20
-
21
17
  if (!tenant) {
22
18
  throw new _error.default(`Missing "tenant" parameter when trying to create Elasticsearch index name.`, "TENANT_ERROR");
23
19
  } else if (!locale) {
24
20
  throw new _error.default(`Missing "locale" parameter when trying to create Elasticsearch index name.`, "LOCALE_ERROR");
25
21
  }
26
-
27
22
  const sharedIndex = process.env.ELASTICSEARCH_SHARED_INDEXES === "true";
28
23
  const index = [sharedIndex ? "root" : tenant, "headless-cms", locale, model.modelId].join("-").toLowerCase();
29
24
  const prefix = process.env.ELASTIC_SEARCH_INDEX_PREFIX || "";
30
-
31
25
  if (!prefix) {
32
26
  return {
33
27
  index
34
28
  };
35
29
  }
36
-
37
30
  return {
38
31
  index: prefix + index
39
32
  };
40
33
  }
41
-
42
34
  };
43
35
  exports.configurations = configurations;
@@ -1 +1 @@
1
- {"version":3,"names":["configurations","es","model","tenant","locale","WebinyError","sharedIndex","process","env","ELASTICSEARCH_SHARED_INDEXES","index","modelId","join","toLowerCase","prefix","ELASTIC_SEARCH_INDEX_PREFIX"],"sources":["configurations.ts"],"sourcesContent":["import { CmsModel } from \"@webiny/api-headless-cms/types\";\nimport WebinyError from \"@webiny/error\";\n\ninterface ElasticsearchConfig {\n index: string;\n}\n\ninterface CmsElasticsearchParams {\n model: CmsModel;\n}\ninterface Configurations {\n es: (params: CmsElasticsearchParams) => ElasticsearchConfig;\n}\n\nexport const configurations: Configurations = {\n es({ model }) {\n const { tenant, locale } = model;\n\n if (!tenant) {\n throw new WebinyError(\n `Missing \"tenant\" parameter when trying to create Elasticsearch index name.`,\n \"TENANT_ERROR\"\n );\n } else if (!locale) {\n throw new WebinyError(\n `Missing \"locale\" parameter when trying to create Elasticsearch index name.`,\n \"LOCALE_ERROR\"\n );\n }\n\n const sharedIndex = process.env.ELASTICSEARCH_SHARED_INDEXES === \"true\";\n const index = [sharedIndex ? \"root\" : tenant, \"headless-cms\", locale, model.modelId]\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":";;;;;;;;;AACA;;AAaO,MAAMA,cAA8B,GAAG;EAC1CC,EAAE,CAAC;IAAEC;EAAF,CAAD,EAAY;IACV,MAAM;MAAEC,MAAF;MAAUC;IAAV,IAAqBF,KAA3B;;IAEA,IAAI,CAACC,MAAL,EAAa;MACT,MAAM,IAAIE,cAAJ,CACD,4EADC,EAEF,cAFE,CAAN;IAIH,CALD,MAKO,IAAI,CAACD,MAAL,EAAa;MAChB,MAAM,IAAIC,cAAJ,CACD,4EADC,EAEF,cAFE,CAAN;IAIH;;IAED,MAAMC,WAAW,GAAGC,OAAO,CAACC,GAAR,CAAYC,4BAAZ,KAA6C,MAAjE;IACA,MAAMC,KAAK,GAAG,CAACJ,WAAW,GAAG,MAAH,GAAYH,MAAxB,EAAgC,cAAhC,EAAgDC,MAAhD,EAAwDF,KAAK,CAACS,OAA9D,EACTC,IADS,CACJ,GADI,EAETC,WAFS,EAAd;IAIA,MAAMC,MAAM,GAAGP,OAAO,CAACC,GAAR,CAAYO,2BAAZ,IAA2C,EAA1D;;IACA,IAAI,CAACD,MAAL,EAAa;MACT,OAAO;QACHJ;MADG,CAAP;IAGH;;IACD,OAAO;MACHA,KAAK,EAAEI,MAAM,GAAGJ;IADb,CAAP;EAGH;;AA9ByC,CAAvC"}
1
+ {"version":3,"names":["configurations","es","model","tenant","locale","WebinyError","sharedIndex","process","env","ELASTICSEARCH_SHARED_INDEXES","index","modelId","join","toLowerCase","prefix","ELASTIC_SEARCH_INDEX_PREFIX"],"sources":["configurations.ts"],"sourcesContent":["import { CmsModel } from \"@webiny/api-headless-cms/types\";\nimport WebinyError from \"@webiny/error\";\n\ninterface ElasticsearchConfig {\n index: string;\n}\n\ninterface CmsElasticsearchParams {\n model: Pick<CmsModel, \"tenant\" | \"locale\" | \"modelId\">;\n}\n\ninterface Configurations {\n es: (params: CmsElasticsearchParams) => ElasticsearchConfig;\n}\n\nexport const configurations: Configurations = {\n es({ model }) {\n const { tenant, locale } = model;\n\n if (!tenant) {\n throw new WebinyError(\n `Missing \"tenant\" parameter when trying to create Elasticsearch index name.`,\n \"TENANT_ERROR\"\n );\n } else if (!locale) {\n throw new WebinyError(\n `Missing \"locale\" parameter when trying to create Elasticsearch index name.`,\n \"LOCALE_ERROR\"\n );\n }\n\n const sharedIndex = process.env.ELASTICSEARCH_SHARED_INDEXES === \"true\";\n const index = [sharedIndex ? \"root\" : tenant, \"headless-cms\", locale, model.modelId]\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":";;;;;;;AACA;AAcO,MAAMA,cAA8B,GAAG;EAC1CC,EAAE,CAAC;IAAEC;EAAM,CAAC,EAAE;IACV,MAAM;MAAEC,MAAM;MAAEC;IAAO,CAAC,GAAGF,KAAK;IAEhC,IAAI,CAACC,MAAM,EAAE;MACT,MAAM,IAAIE,cAAW,CAChB,4EAA2E,EAC5E,cAAc,CACjB;IACL,CAAC,MAAM,IAAI,CAACD,MAAM,EAAE;MAChB,MAAM,IAAIC,cAAW,CAChB,4EAA2E,EAC5E,cAAc,CACjB;IACL;IAEA,MAAMC,WAAW,GAAGC,OAAO,CAACC,GAAG,CAACC,4BAA4B,KAAK,MAAM;IACvE,MAAMC,KAAK,GAAG,CAACJ,WAAW,GAAG,MAAM,GAAGH,MAAM,EAAE,cAAc,EAAEC,MAAM,EAAEF,KAAK,CAACS,OAAO,CAAC,CAC/EC,IAAI,CAAC,GAAG,CAAC,CACTC,WAAW,EAAE;IAElB,MAAMC,MAAM,GAAGP,OAAO,CAACC,GAAG,CAACO,2BAA2B,IAAI,EAAE;IAC5D,IAAI,CAACD,MAAM,EAAE;MACT,OAAO;QACHJ;MACJ,CAAC;IACL;IACA,OAAO;MACHA,KAAK,EAAEI,MAAM,GAAGJ;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.createEntryEntity = 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 createEntryEntity = params => {
15
11
  const {
16
12
  table,
@@ -53,6 +49,9 @@ const createEntryEntity = params => {
53
49
  ownedBy: {
54
50
  type: "map"
55
51
  },
52
+ modifiedBy: {
53
+ type: "map"
54
+ },
56
55
  createdOn: {
57
56
  type: "string"
58
57
  },
@@ -77,6 +76,9 @@ const createEntryEntity = params => {
77
76
  status: {
78
77
  type: "string"
79
78
  },
79
+ location: {
80
+ type: "map"
81
+ },
80
82
  values: {
81
83
  type: "map"
82
84
  },
@@ -86,5 +88,4 @@ const createEntryEntity = params => {
86
88
  }, attributes || {})
87
89
  });
88
90
  };
89
-
90
91
  exports.createEntryEntity = createEntryEntity;
@@ -1 +1 @@
1
- {"version":3,"names":["createEntryEntity","params","table","entityName","attributes","Entity","name","PK","type","partitionKey","SK","sortKey","TYPE","__type","webinyVersion","tenant","entryId","id","createdBy","ownedBy","createdOn","savedOn","modelId","locale","publishedOn","version","locked","status","values","meta"],"sources":["entry.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateEntryEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\nexport const createEntryEntity = (params: CreateEntryEntityParams): Entity<any> => {\n const { table, entityName, attributes } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n type: \"string\",\n partitionKey: true\n },\n SK: {\n type: \"string\",\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n __type: {\n type: \"string\"\n },\n webinyVersion: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n entryId: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n ownedBy: {\n type: \"map\"\n },\n createdOn: {\n type: \"string\"\n },\n savedOn: {\n type: \"string\"\n },\n modelId: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n publishedOn: {\n type: \"string\"\n },\n version: {\n type: \"number\"\n },\n locked: {\n type: \"boolean\"\n },\n status: {\n type: \"string\"\n },\n values: {\n type: \"map\"\n },\n meta: {\n type: \"map\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AAQO,MAAMA,iBAAiB,GAAIC,MAAD,IAAkD;EAC/E,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,IAAI,EAAE,QADN;QAEAC,YAAY,EAAE;MAFd,CADE;MAKNC,EAAE,EAAE;QACAF,IAAI,EAAE,QADN;QAEAG,OAAO,EAAE;MAFT,CALE;MASNC,IAAI,EAAE;QACFJ,IAAI,EAAE;MADJ,CATA;MAYNK,MAAM,EAAE;QACJL,IAAI,EAAE;MADF,CAZF;MAeNM,aAAa,EAAE;QACXN,IAAI,EAAE;MADK,CAfT;MAkBNO,MAAM,EAAE;QACJP,IAAI,EAAE;MADF,CAlBF;MAqBNQ,OAAO,EAAE;QACLR,IAAI,EAAE;MADD,CArBH;MAwBNS,EAAE,EAAE;QACAT,IAAI,EAAE;MADN,CAxBE;MA2BNU,SAAS,EAAE;QACPV,IAAI,EAAE;MADC,CA3BL;MA8BNW,OAAO,EAAE;QACLX,IAAI,EAAE;MADD,CA9BH;MAiCNY,SAAS,EAAE;QACPZ,IAAI,EAAE;MADC,CAjCL;MAoCNa,OAAO,EAAE;QACLb,IAAI,EAAE;MADD,CApCH;MAuCNc,OAAO,EAAE;QACLd,IAAI,EAAE;MADD,CAvCH;MA0CNe,MAAM,EAAE;QACJf,IAAI,EAAE;MADF,CA1CF;MA6CNgB,WAAW,EAAE;QACThB,IAAI,EAAE;MADG,CA7CP;MAgDNiB,OAAO,EAAE;QACLjB,IAAI,EAAE;MADD,CAhDH;MAmDNkB,MAAM,EAAE;QACJlB,IAAI,EAAE;MADF,CAnDF;MAsDNmB,MAAM,EAAE;QACJnB,IAAI,EAAE;MADF,CAtDF;MAyDNoB,MAAM,EAAE;QACJpB,IAAI,EAAE;MADF,CAzDF;MA4DNqB,IAAI,EAAE;QACFrB,IAAI,EAAE;MADJ;IA5DA,GA+DFJ,UAAU,IAAI,EA/DZ;EAHI,CAAX,CAAP;AAqEH,CAvEM"}
1
+ {"version":3,"names":["createEntryEntity","params","table","entityName","attributes","Entity","name","PK","type","partitionKey","SK","sortKey","TYPE","__type","webinyVersion","tenant","entryId","id","createdBy","ownedBy","modifiedBy","createdOn","savedOn","modelId","locale","publishedOn","version","locked","status","location","values","meta"],"sources":["entry.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateEntryEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\nexport const createEntryEntity = (params: CreateEntryEntityParams): Entity<any> => {\n const { table, entityName, attributes } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n type: \"string\",\n partitionKey: true\n },\n SK: {\n type: \"string\",\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n __type: {\n type: \"string\"\n },\n webinyVersion: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n entryId: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n ownedBy: {\n type: \"map\"\n },\n modifiedBy: {\n type: \"map\"\n },\n createdOn: {\n type: \"string\"\n },\n savedOn: {\n type: \"string\"\n },\n modelId: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n publishedOn: {\n type: \"string\"\n },\n version: {\n type: \"number\"\n },\n locked: {\n type: \"boolean\"\n },\n status: {\n type: \"string\"\n },\n location: {\n type: \"map\"\n },\n values: {\n type: \"map\"\n },\n meta: {\n type: \"map\"\n },\n ...(attributes || {})\n }\n });\n};\n"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DsB,MAAM,EAAE;QACJtB,IAAI,EAAE;MACV,CAAC;MACDuB,IAAI,EAAE;QACFvB,IAAI,EAAE;MACV;IAAC,GACGJ,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.createEntryElasticsearchEntity = 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 createEntryElasticsearchEntity = params => {
15
11
  const {
16
12
  table,
@@ -38,5 +34,4 @@ const createEntryElasticsearchEntity = params => {
38
34
  }, attributes || {})
39
35
  });
40
36
  };
41
-
42
37
  exports.createEntryElasticsearchEntity = createEntryElasticsearchEntity;
@@ -1 +1 @@
1
- {"version":3,"names":["createEntryElasticsearchEntity","params","table","entityName","attributes","Entity","name","PK","type","partitionKey","SK","sortKey","index","data"],"sources":["entryElasticsearch.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateEntryElasticsearchEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\nexport const createEntryElasticsearchEntity = (\n params: CreateEntryElasticsearchEntityParams\n): Entity<any> => {\n const { table, entityName, attributes } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n type: \"string\",\n partitionKey: true\n },\n SK: {\n type: \"string\",\n sortKey: true\n },\n index: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AAQO,MAAMA,8BAA8B,GACvCC,MAD0C,IAE5B;EACd,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,IAAI,EAAE,QADN;QAEAC,YAAY,EAAE;MAFd,CADE;MAKNC,EAAE,EAAE;QACAF,IAAI,EAAE,QADN;QAEAG,OAAO,EAAE;MAFT,CALE;MASNC,KAAK,EAAE;QACHJ,IAAI,EAAE;MADH,CATD;MAYNK,IAAI,EAAE;QACFL,IAAI,EAAE;MADJ;IAZA,GAeFJ,UAAU,IAAI,EAfZ;EAHI,CAAX,CAAP;AAqBH,CAzBM"}
1
+ {"version":3,"names":["createEntryElasticsearchEntity","params","table","entityName","attributes","Entity","name","PK","type","partitionKey","SK","sortKey","index","data"],"sources":["entryElasticsearch.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateEntryElasticsearchEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\nexport const createEntryElasticsearchEntity = (\n params: CreateEntryElasticsearchEntityParams\n): Entity<any> => {\n const { table, entityName, attributes } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n type: \"string\",\n partitionKey: true\n },\n SK: {\n type: \"string\",\n sortKey: true\n },\n index: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;AAAA;AAQO,MAAMA,8BAA8B,GACvCC,MAA4C,IAC9B;EACd,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,IAAI,EAAE,QAAQ;QACdC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAF,IAAI,EAAE,QAAQ;QACdG,OAAO,EAAE;MACb,CAAC;MACDC,KAAK,EAAE;QACHJ,IAAI,EAAE;MACV,CAAC;MACDK,IAAI,EAAE;QACFL,IAAI,EAAE;MACV;IAAC,GACGJ,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.createGroupEntity = 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 createGroupEntity = params => {
15
11
  const {
16
12
  table,
@@ -66,5 +62,4 @@ const createGroupEntity = params => {
66
62
  }, attributes || {})
67
63
  });
68
64
  };
69
-
70
65
  exports.createGroupEntity = createGroupEntity;
@@ -1 +1 @@
1
- {"version":3,"names":["createGroupEntity","params","table","attributes","entityName","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","webinyVersion","id","slug","locale","description","icon","createdBy","createdOn","savedOn","tenant"],"sources":["group.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateGroupEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\nexport const createGroupEntity = (params: CreateGroupEntityParams): Entity<any> => {\n const { table, attributes, entityName } = 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 webinyVersion: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n slug: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n icon: {\n type: \"string\"\n },\n\n createdBy: {\n type: \"map\"\n },\n createdOn: {\n type: \"string\"\n },\n savedOn: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AAQO,MAAMA,iBAAiB,GAAIC,MAAD,IAAkD;EAC/E,MAAM;IAAEC,KAAF;IAASC,UAAT;IAAqBC;EAArB,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEF,UADQ;IAEdF,KAFc;IAGdC,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,aAAa,EAAE;QACXD,IAAI,EAAE;MADK,CAVT;MAaNE,EAAE,EAAE;QACAF,IAAI,EAAE;MADN,CAbE;MAgBNN,IAAI,EAAE;QACFM,IAAI,EAAE;MADJ,CAhBA;MAmBNG,IAAI,EAAE;QACFH,IAAI,EAAE;MADJ,CAnBA;MAsBNI,MAAM,EAAE;QACJJ,IAAI,EAAE;MADF,CAtBF;MAyBNK,WAAW,EAAE;QACTL,IAAI,EAAE;MADG,CAzBP;MA4BNM,IAAI,EAAE;QACFN,IAAI,EAAE;MADJ,CA5BA;MAgCNO,SAAS,EAAE;QACPP,IAAI,EAAE;MADC,CAhCL;MAmCNQ,SAAS,EAAE;QACPR,IAAI,EAAE;MADC,CAnCL;MAsCNS,OAAO,EAAE;QACLT,IAAI,EAAE;MADD,CAtCH;MAyCNU,MAAM,EAAE;QACJV,IAAI,EAAE;MADF;IAzCF,GA4CFT,UAAU,IAAI,EA5CZ;EAHI,CAAX,CAAP;AAkDH,CApDM"}
1
+ {"version":3,"names":["createGroupEntity","params","table","attributes","entityName","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","webinyVersion","id","slug","locale","description","icon","createdBy","createdOn","savedOn","tenant"],"sources":["group.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateGroupEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\nexport const createGroupEntity = (params: CreateGroupEntityParams): Entity<any> => {\n const { table, attributes, entityName } = 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 webinyVersion: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n slug: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n icon: {\n type: \"string\"\n },\n\n createdBy: {\n type: \"map\"\n },\n createdOn: {\n type: \"string\"\n },\n savedOn: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;AAAA;AAQO,MAAMA,iBAAiB,GAAIC,MAA+B,IAAkB;EAC/E,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC;EAAW,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBAAM,CAAC;IACdC,IAAI,EAAEF,UAAU;IAChBF,KAAK;IACLC,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,aAAa,EAAE;QACXD,IAAI,EAAE;MACV,CAAC;MACDE,EAAE,EAAE;QACAF,IAAI,EAAE;MACV,CAAC;MACDN,IAAI,EAAE;QACFM,IAAI,EAAE;MACV,CAAC;MACDG,IAAI,EAAE;QACFH,IAAI,EAAE;MACV,CAAC;MACDI,MAAM,EAAE;QACJJ,IAAI,EAAE;MACV,CAAC;MACDK,WAAW,EAAE;QACTL,IAAI,EAAE;MACV,CAAC;MACDM,IAAI,EAAE;QACFN,IAAI,EAAE;MACV,CAAC;MAEDO,SAAS,EAAE;QACPP,IAAI,EAAE;MACV,CAAC;MACDQ,SAAS,EAAE;QACPR,IAAI,EAAE;MACV,CAAC;MACDS,OAAO,EAAE;QACLT,IAAI,EAAE;MACV,CAAC;MACDU,MAAM,EAAE;QACJV,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.createModelEntity = 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 createModelEntity = params => {
15
11
  const {
16
12
  table,
@@ -43,6 +39,14 @@ const createModelEntity = params => {
43
39
  type: "string",
44
40
  required: true
45
41
  },
42
+ singularApiName: {
43
+ type: "string",
44
+ required: true
45
+ },
46
+ pluralApiName: {
47
+ type: "string",
48
+ required: true
49
+ },
46
50
  locale: {
47
51
  type: "string",
48
52
  required: true
@@ -51,6 +55,9 @@ const createModelEntity = params => {
51
55
  type: "map",
52
56
  required: true
53
57
  },
58
+ icon: {
59
+ type: "string"
60
+ },
54
61
  description: {
55
62
  type: "string"
56
63
  },
@@ -86,6 +93,12 @@ const createModelEntity = params => {
86
93
  titleFieldId: {
87
94
  type: "string"
88
95
  },
96
+ descriptionFieldId: {
97
+ type: "string"
98
+ },
99
+ imageFieldId: {
100
+ type: "string"
101
+ },
89
102
  tenant: {
90
103
  type: "string",
91
104
  required: true
@@ -93,5 +106,4 @@ const createModelEntity = params => {
93
106
  }, attributes || {})
94
107
  });
95
108
  };
96
-
97
109
  exports.createModelEntity = createModelEntity;
@@ -1 +1 @@
1
- {"version":3,"names":["createModelEntity","params","table","attributes","entityName","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","required","webinyVersion","modelId","locale","group","description","createdOn","savedOn","createdBy","fields","layout","tags","default","lockedFields","titleFieldId","tenant"],"sources":["model.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateModelEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createModelEntity = (params: CreateModelEntityParams): Entity<any> => {\n const { table, attributes, entityName } = 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 required: true\n },\n webinyVersion: {\n type: \"string\",\n required: true\n },\n name: {\n type: \"string\",\n required: true\n },\n modelId: {\n type: \"string\",\n required: true\n },\n locale: {\n type: \"string\",\n required: true\n },\n group: {\n type: \"map\",\n required: true\n },\n description: {\n type: \"string\"\n },\n createdOn: {\n type: \"string\",\n required: true\n },\n savedOn: {\n type: \"string\",\n required: true\n },\n createdBy: {\n type: \"map\",\n required: true\n },\n fields: {\n type: \"list\",\n required: true\n },\n layout: {\n type: \"list\",\n required: true\n },\n tags: {\n type: \"list\",\n required: false,\n default: []\n },\n lockedFields: {\n type: \"list\",\n required: true\n },\n titleFieldId: {\n type: \"string\"\n },\n tenant: {\n type: \"string\",\n required: true\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,iBAAiB,GAAIC,MAAD,IAAkD;EAC/E,MAAM;IAAEC,KAAF;IAASC,UAAT;IAAqBC;EAArB,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEF,UADQ;IAEdF,KAFc;IAGdC,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,IAAI,EAAE;QACFC,IAAI,EAAE,QADJ;QAEFC,Q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createModelEntity","params","table","attributes","entityName","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","required","webinyVersion","modelId","singularApiName","pluralApiName","locale","group","icon","description","createdOn","savedOn","createdBy","fields","layout","tags","default","lockedFields","titleFieldId","descriptionFieldId","imageFieldId","tenant"],"sources":["model.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateModelEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createModelEntity = (params: CreateModelEntityParams): Entity<any> => {\n const { table, attributes, entityName } = 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 required: true\n },\n webinyVersion: {\n type: \"string\",\n required: true\n },\n name: {\n type: \"string\",\n required: true\n },\n modelId: {\n type: \"string\",\n required: true\n },\n singularApiName: {\n type: \"string\",\n required: true\n },\n pluralApiName: {\n type: \"string\",\n required: true\n },\n locale: {\n type: \"string\",\n required: true\n },\n group: {\n type: \"map\",\n required: true\n },\n icon: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n createdOn: {\n type: \"string\",\n required: true\n },\n savedOn: {\n type: \"string\",\n required: true\n },\n createdBy: {\n type: \"map\",\n required: true\n },\n fields: {\n type: \"list\",\n required: true\n },\n layout: {\n type: \"list\",\n required: true\n },\n tags: {\n type: \"list\",\n required: false,\n default: []\n },\n lockedFields: {\n type: \"list\",\n required: true\n },\n titleFieldId: {\n type: \"string\"\n },\n descriptionFieldId: {\n type: \"string\"\n },\n imageFieldId: {\n type: \"string\"\n },\n tenant: {\n type: \"string\",\n required: true\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;AAAA;AASO,MAAMA,iBAAiB,GAAIC,MAA+B,IAAkB;EAC/E,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC;EAAW,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBA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AAE,MAAM;QACZC,QAAQ,EAAE,KAAK;QACfe,OAAO,EAAE;MACb,CAAC;MACDC,YAAY,EAAE;QACVjB,IAAI,EAAE,MAAM;QACZC,QAAQ,EAAE;MACd,CAAC;MACDiB,YAAY,EAAE;QACVlB,IAAI,EAAE;MACV,CAAC;MACDmB,kBAAkB,EAAE;QAChBnB,IAAI,EAAE;MACV,CAAC;MACDoB,YAAY,EAAE;QACVpB,IAAI,EAAE;MACV,CAAC;MACDqB,MAAM,EAAE;QACJrB,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd;IAAC,GACGV,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,
@@ -54,5 +50,4 @@ const createSettingsEntity = params => {
54
50
  }, attributes || {})
55
51
  });
56
52
  };
57
-
58
53
  exports.createSettingsEntity = createSettingsEntity;
@@ -1 +1 @@
1
- {"version":3,"names":["createSettingsEntity","params","entityName","table","attributes","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","key","uploadMinFileSize","uploadMaxFileSize","srcPrefix","contentModelLastChange","tenant","locale"],"sources":["settings.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateSettingsEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSettingsEntity = (params: CreateSettingsEntityParams): Entity<any> => {\n const { entityName, table, 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 TYPE: {\n type: \"string\"\n },\n key: {\n type: \"string\"\n },\n uploadMinFileSize: {\n type: \"number\"\n },\n uploadMaxFileSize: {\n type: \"number\"\n },\n srcPrefix: {\n type: \"string\"\n },\n contentModelLastChange: {\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,IAAqD;EACrF,MAAM;IAAEC,UAAF;IAAcC,KAAd;IAAqBC;EAArB,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEJ,UADQ;IAEdC,KAFc;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,GAAG,EAAE;QACDD,IAAI,EAAE;MADL,CAVC;MAaNE,iBAAiB,EAAE;QACfF,IAAI,EAAE;MADS,CAbb;MAgBNG,iBAAiB,EAAE;QACfH,IAAI,EAAE;MADS,CAhBb;MAmBNI,SAAS,EAAE;QACPJ,IAAI,EAAE;MADC,CAnBL;MAsBNK,sBAAsB,EAAE;QACpBL,IAAI,EAAE;MADc,CAtBlB;MAyBNM,MAAM,EAAE;QACJN,IAAI,EAAE;MADF,CAzBF;MA4BNO,MAAM,EAAE;QACJP,IAAI,EAAE;MADF;IA5BF,GA+BFR,UAAU,IAAI,EA/BZ;EAHI,CAAX,CAAP;AAqCH,CAvCM"}
1
+ {"version":3,"names":["createSettingsEntity","params","entityName","table","attributes","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","key","uploadMinFileSize","uploadMaxFileSize","srcPrefix","contentModelLastChange","tenant","locale"],"sources":["settings.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateSettingsEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSettingsEntity = (params: CreateSettingsEntityParams): Entity<any> => {\n const { entityName, table, 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 TYPE: {\n type: \"string\"\n },\n key: {\n type: \"string\"\n },\n uploadMinFileSize: {\n type: \"number\"\n },\n uploadMaxFileSize: {\n type: \"number\"\n },\n srcPrefix: {\n type: \"string\"\n },\n contentModelLastChange: {\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,MAAkC,IAAkB;EACrF,MAAM;IAAEC,UAAU;IAAEC,KAAK;IAAEC;EAAW,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBC,KAAK;IACLC,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,GAAG,EAAE;QACDD,IAAI,EAAE;MACV,CAAC;MACDE,iBAAiB,EAAE;QACfF,IAAI,EAAE;MACV,CAAC;MACDG,iBAAiB,EAAE;QACfH,IAAI,EAAE;MACV,CAAC;MACDI,SAAS,EAAE;QACPJ,IAAI,EAAE;MACV,CAAC;MACDK,sBAAsB,EAAE;QACpBL,IAAI,EAAE;MACV,CAAC;MACDM,MAAM,EAAE;QACJN,IAAI,EAAE;MACV,CAAC;MACDO,MAAM,EAAE;QACJP,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,
@@ -42,5 +38,4 @@ const createSystemEntity = params => {
42
38
  }, attributes || {})
43
39
  });
44
40
  };
45
-
46
41
  exports.createSystemEntity = createSystemEntity;
@@ -1 +1 @@
1
- {"version":3,"names":["createSystemEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","version","type","locale","tenant","readAPIKey"],"sources":["system.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateSystemEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSystemEntity = (params: CreateSystemEntityParams): 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 locale: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n readAPIKey: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,kBAAkB,GAAIC,MAAD,IAAmD;EACjF,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,CAVF;MAaNE,MAAM,EAAE;QACJF,IAAI,EAAE;MADF,CAbF;MAgBNG,UAAU,EAAE;QACRH,IAAI,EAAE;MADE;IAhBN,GAmBFT,UAAU,IAAI,EAnBZ;EAHI,CAAX,CAAP;AAyBH,CA3BM"}
1
+ {"version":3,"names":["createSystemEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","version","type","locale","tenant","readAPIKey"],"sources":["system.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateSystemEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSystemEntity = (params: CreateSystemEntityParams): 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 locale: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n readAPIKey: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;AAAA;AASO,MAAMA,kBAAkB,GAAIC,MAAgC,IAAkB;EACjF,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,CAAC;MACDE,MAAM,EAAE;QACJF,IAAI,EAAE;MACV,CAAC;MACDG,UAAU,EAAE;QACRH,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 = ({
11
9
  table,
12
10
  documentClient
@@ -20,5 +18,4 @@ const createTable = ({
20
18
  const config = typeof table === "function" ? table(tableConfig) : tableConfig;
21
19
  return new _dynamodbToolbox.Table(config);
22
20
  };
23
-
24
21
  exports.createTable = createTable;
@@ -1 +1 @@
1
- {"version":3,"names":["createTable","table","documentClient","tableConfig","name","process","env","DB_TABLE_HEADLESS_CMS","DB_TABLE","partitionKey","sortKey","DocumentClient","config","Table"],"sources":["table.ts"],"sourcesContent":["import { TableModifier } from \"~/types\";\nimport { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport { Table } from \"dynamodb-toolbox\";\nimport { TableConstructor } from \"dynamodb-toolbox/dist/classes/Table\";\n\nexport interface CreateTableParams {\n table?: TableModifier;\n documentClient: DocumentClient;\n}\nexport const createTable = ({ table, documentClient }: CreateTableParams): Table => {\n const tableConfig: TableConstructor = {\n name: process.env.DB_TABLE_HEADLESS_CMS || (process.env.DB_TABLE as string),\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient\n };\n\n const config = typeof table === \"function\" ? table(tableConfig) : tableConfig;\n\n return new Table(config);\n};\n"],"mappings":";;;;;;;AAEA;;AAOO,MAAMA,WAAW,GAAG,CAAC;EAAEC,KAAF;EAASC;AAAT,CAAD,KAAyD;EAChF,MAAMC,WAA6B,GAAG;IAClCC,IAAI,EAAEC,OAAO,CAACC,GAAR,CAAYC,qBAAZ,IAAsCF,OAAO,CAACC,GAAR,CAAYE,QADtB;IAElCC,YAAY,EAAE,IAFoB;IAGlCC,OAAO,EAAE,IAHyB;IAIlCC,cAAc,EAAET;EAJkB,CAAtC;EAOA,MAAMU,MAAM,GAAG,OAAOX,KAAP,KAAiB,UAAjB,GAA8BA,KAAK,CAACE,WAAD,CAAnC,GAAmDA,WAAlE;EAEA,OAAO,IAAIU,sBAAJ,CAAUD,MAAV,CAAP;AACH,CAXM"}
1
+ {"version":3,"names":["createTable","table","documentClient","tableConfig","name","process","env","DB_TABLE_HEADLESS_CMS","DB_TABLE","partitionKey","sortKey","DocumentClient","config","Table"],"sources":["table.ts"],"sourcesContent":["import { TableModifier } from \"~/types\";\nimport { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport { Table } from \"dynamodb-toolbox\";\nimport { TableConstructor } from \"dynamodb-toolbox/dist/classes/Table\";\n\nexport interface CreateTableParams {\n table?: TableModifier;\n documentClient: DocumentClient;\n}\nexport const createTable = ({ table, documentClient }: CreateTableParams): Table => {\n const tableConfig: TableConstructor = {\n name: process.env.DB_TABLE_HEADLESS_CMS || (process.env.DB_TABLE as string),\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient\n };\n\n const config = typeof table === \"function\" ? table(tableConfig) : tableConfig;\n\n return new Table(config);\n};\n"],"mappings":";;;;;;AAEA;AAOO,MAAMA,WAAW,GAAG,CAAC;EAAEC,KAAK;EAAEC;AAAkC,CAAC,KAAY;EAChF,MAAMC,WAA6B,GAAG;IAClCC,IAAI,EAAEC,OAAO,CAACC,GAAG,CAACC,qBAAqB,IAAKF,OAAO,CAACC,GAAG,CAACE,QAAmB;IAC3EC,YAAY,EAAE,IAAI;IAClBC,OAAO,EAAE,IAAI;IACbC,cAAc,EAAET;EACpB,CAAC;EAED,MAAMU,MAAM,GAAG,OAAOX,KAAK,KAAK,UAAU,GAAGA,KAAK,CAACE,WAAW,CAAC,GAAGA,WAAW;EAE7E,OAAO,IAAIU,sBAAK,CAACD,MAAM,CAAC;AAC5B,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 = ({
11
9
  table,
12
10
  documentClient
@@ -20,5 +18,4 @@ const createElasticsearchTable = ({
20
18
  const config = typeof table === "function" ? table(tableConfig) : tableConfig;
21
19
  return new _dynamodbToolbox.Table(config);
22
20
  };
23
-
24
21
  exports.createElasticsearchTable = createElasticsearchTable;
@@ -1 +1 @@
1
- {"version":3,"names":["createElasticsearchTable","table","documentClient","tableConfig","name","process","env","DB_TABLE_ELASTICSEARCH","partitionKey","sortKey","DocumentClient","config","Table"],"sources":["tableElasticsearch.ts"],"sourcesContent":["import { TableModifier } from \"~/types\";\nimport { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport { Table } from \"dynamodb-toolbox\";\nimport { TableConstructor } from \"dynamodb-toolbox/dist/classes/Table\";\n\nexport interface CreateElasticsearchTableParams {\n table?: TableModifier;\n documentClient: DocumentClient;\n}\nexport const createElasticsearchTable = ({\n table,\n documentClient\n}: CreateElasticsearchTableParams): Table => {\n const tableConfig: TableConstructor = {\n name: process.env.DB_TABLE_ELASTICSEARCH as string,\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient\n };\n\n const config = typeof table === \"function\" ? table(tableConfig) : tableConfig;\n\n return new Table(config);\n};\n"],"mappings":";;;;;;;AAEA;;AAOO,MAAMA,wBAAwB,GAAG,CAAC;EACrCC,KADqC;EAErCC;AAFqC,CAAD,KAGK;EACzC,MAAMC,WAA6B,GAAG;IAClCC,IAAI,EAAEC,OAAO,CAACC,GAAR,CAAYC,sBADgB;IAElCC,YAAY,EAAE,IAFoB;IAGlCC,OAAO,EAAE,IAHyB;IAIlCC,cAAc,EAAER;EAJkB,CAAtC;EAOA,MAAMS,MAAM,GAAG,OAAOV,KAAP,KAAiB,UAAjB,GAA8BA,KAAK,CAACE,WAAD,CAAnC,GAAmDA,WAAlE;EAEA,OAAO,IAAIS,sBAAJ,CAAUD,MAAV,CAAP;AACH,CAdM"}
1
+ {"version":3,"names":["createElasticsearchTable","table","documentClient","tableConfig","name","process","env","DB_TABLE_ELASTICSEARCH","partitionKey","sortKey","DocumentClient","config","Table"],"sources":["tableElasticsearch.ts"],"sourcesContent":["import { TableModifier } from \"~/types\";\nimport { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport { Table } from \"dynamodb-toolbox\";\nimport { TableConstructor } from \"dynamodb-toolbox/dist/classes/Table\";\n\nexport interface CreateElasticsearchTableParams {\n table?: TableModifier;\n documentClient: DocumentClient;\n}\nexport const createElasticsearchTable = ({\n table,\n documentClient\n}: CreateElasticsearchTableParams): Table => {\n const tableConfig: TableConstructor = {\n name: process.env.DB_TABLE_ELASTICSEARCH as string,\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient\n };\n\n const config = typeof table === \"function\" ? table(tableConfig) : tableConfig;\n\n return new Table(config);\n};\n"],"mappings":";;;;;;AAEA;AAOO,MAAMA,wBAAwB,GAAG,CAAC;EACrCC,KAAK;EACLC;AAC4B,CAAC,KAAY;EACzC,MAAMC,WAA6B,GAAG;IAClCC,IAAI,EAAEC,OAAO,CAACC,GAAG,CAACC,sBAAgC;IAClDC,YAAY,EAAE,IAAI;IAClBC,OAAO,EAAE,IAAI;IACbC,cAAc,EAAER;EACpB,CAAC;EAED,MAAMS,MAAM,GAAG,OAAOV,KAAK,KAAK,UAAU,GAAGA,KAAK,CAACE,WAAW,CAAC,GAAGA,WAAW;EAE7E,OAAO,IAAIS,sBAAK,CAACD,MAAM,CAAC;AAC5B,CAAC;AAAC"}
package/dynamoDb/index.js CHANGED
@@ -4,13 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _richText = require("./storage/richText");
9
-
10
8
  var _longText = require("./storage/longText");
11
-
12
9
  var _date = require("./storage/date");
13
-
14
10
  var _default = () => [(0, _richText.createRichTextStorageTransformPlugin)(), (0, _longText.createLongTextStorageTransformPlugin)(), (0, _date.createDateStorageTransformPlugin)()];
15
-
16
11
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"names":["createRichTextStorageTransformPlugin","createLongTextStorageTransformPlugin","createDateStorageTransformPlugin"],"sources":["index.ts"],"sourcesContent":["import { createRichTextStorageTransformPlugin } from \"./storage/richText\";\nimport { createLongTextStorageTransformPlugin } from \"./storage/longText\";\nimport { createDateStorageTransformPlugin } from \"./storage/date\";\n\nexport default () => [\n createRichTextStorageTransformPlugin(),\n createLongTextStorageTransformPlugin(),\n createDateStorageTransformPlugin()\n];\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;eAEe,MAAM,CACjB,IAAAA,8CAAA,GADiB,EAEjB,IAAAC,8CAAA,GAFiB,EAGjB,IAAAC,sCAAA,GAHiB,C"}
1
+ {"version":3,"names":["createRichTextStorageTransformPlugin","createLongTextStorageTransformPlugin","createDateStorageTransformPlugin"],"sources":["index.ts"],"sourcesContent":["import { createRichTextStorageTransformPlugin } from \"./storage/richText\";\nimport { createLongTextStorageTransformPlugin } from \"./storage/longText\";\nimport { createDateStorageTransformPlugin } from \"./storage/date\";\n\nexport default () => [\n createRichTextStorageTransformPlugin(),\n createLongTextStorageTransformPlugin(),\n createDateStorageTransformPlugin()\n];\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAAkE,eAEnD,MAAM,CACjB,IAAAA,8CAAoC,GAAE,EACtC,IAAAC,8CAAoC,GAAE,EACtC,IAAAC,sCAAgC,GAAE,CACrC;AAAA"}
@@ -1,21 +1,17 @@
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.createDateStorageTransformPlugin = void 0;
9
-
10
8
  var _error = _interopRequireDefault(require("@webiny/error"));
11
-
12
9
  var _apiHeadlessCms = require("@webiny/api-headless-cms");
13
-
14
10
  /**
15
11
  * File is @internal
16
12
  */
17
- const excludeTypes = ["time", "dateTimeWithTimezone"];
18
13
 
14
+ const excludeTypes = ["time", "dateTimeWithTimezone"];
19
15
  const convertFromStorage = (field, value) => {
20
16
  try {
21
17
  if (field.multipleValues) {
@@ -23,30 +19,26 @@ const convertFromStorage = (field, value) => {
23
19
  return new Date(v);
24
20
  });
25
21
  }
26
-
27
22
  return new Date(value);
28
23
  } catch {
29
24
  console.log(`Could not transform from storage for field type`);
30
25
  return value;
31
26
  }
32
27
  };
33
-
34
28
  const convertValueToStorage = (field, value) => {
35
29
  if (value.toISOString) {
36
30
  return value.toISOString();
37
31
  } else if (typeof value === "string") {
38
32
  return value;
39
33
  }
40
-
41
34
  throw new _error.default("Error converting value to a storage type.", "TO_STORAGE_ERROR", {
42
35
  value: value,
43
36
  fieldId: field.fieldId,
44
37
  storageId: field.storageId
45
38
  });
46
39
  };
47
-
48
40
  const createDateStorageTransformPlugin = () => {
49
- return new _apiHeadlessCms.StorageTransformPlugin({
41
+ const plugin = new _apiHeadlessCms.StorageTransformPlugin({
50
42
  fieldType: "datetime",
51
43
  fromStorage: async ({
52
44
  value,
@@ -55,11 +47,9 @@ const createDateStorageTransformPlugin = () => {
55
47
  const {
56
48
  type
57
49
  } = field.settings || {};
58
-
59
50
  if (!value || !type || excludeTypes.includes(type)) {
60
51
  return value;
61
52
  }
62
-
63
53
  return convertFromStorage(field, value);
64
54
  },
65
55
  toStorage: async ({
@@ -69,31 +59,19 @@ const createDateStorageTransformPlugin = () => {
69
59
  const {
70
60
  type
71
61
  } = field.settings || {};
72
-
73
62
  if (!value || !type || excludeTypes.includes(type)) {
74
63
  return value;
75
64
  }
76
-
77
65
  if (field.multipleValues) {
78
66
  const multipleValues = value;
79
67
  return (multipleValues || []).filter(v => !!v).map(v => {
80
68
  return convertValueToStorage(field, v);
81
69
  });
82
70
  }
83
-
84
- if (value.toISOString) {
85
- return value.toISOString();
86
- } else if (typeof value === "string") {
87
- return value;
88
- }
89
-
90
- throw new _error.default("Error converting value to a storage type.", "TO_STORAGE_ERROR", {
91
- value,
92
- fieldId: field.fieldId,
93
- storageId: field.storageId
94
- });
71
+ return convertValueToStorage(field, value);
95
72
  }
96
73
  });
74
+ plugin.name = `headless-cms.dynamodb.storageTransform.date`;
75
+ return plugin;
97
76
  };
98
-
99
77
  exports.createDateStorageTransformPlugin = createDateStorageTransformPlugin;
@@ -1 +1 @@
1
- {"version":3,"names":["excludeTypes","convertFromStorage","field","value","multipleValues","filter","v","map","Date","console","log","convertValueToStorage","toISOString","WebinyError","fieldId","storageId","createDateStorageTransformPlugin","StorageTransformPlugin","fieldType","fromStorage","type","settings","includes","toStorage"],"sources":["date.ts"],"sourcesContent":["/**\n * File is @internal\n */\nimport WebinyError from \"@webiny/error\";\nimport { StorageTransformPlugin } from \"@webiny/api-headless-cms\";\nimport { CmsModelField } from \"@webiny/api-headless-cms/types\";\n\ntype PartialCmsModelField = Pick<CmsModelField, \"fieldId\" | \"storageId\" | \"multipleValues\">;\n\nconst excludeTypes = [\"time\", \"dateTimeWithTimezone\"];\n\nconst convertFromStorage = (field: PartialCmsModelField, value: string | string[]) => {\n try {\n if (field.multipleValues) {\n return ((value as string[]) || [])\n .filter(v => !!v)\n .map((v: string) => {\n return new Date(v);\n });\n }\n return new Date(value as string);\n } catch {\n console.log(`Could not transform from storage for field type`);\n return value;\n }\n};\n\nconst convertValueToStorage = (field: PartialCmsModelField, value: any): any => {\n if ((value as any).toISOString) {\n return (value as Date).toISOString();\n } else if (typeof value === \"string\") {\n return value as string;\n }\n throw new WebinyError(\"Error converting value to a storage type.\", \"TO_STORAGE_ERROR\", {\n value: value,\n fieldId: field.fieldId,\n storageId: field.storageId\n });\n};\n\nexport const createDateStorageTransformPlugin = () => {\n return new StorageTransformPlugin({\n fieldType: \"datetime\",\n fromStorage: async ({ value, field }) => {\n const { type } = field.settings || {};\n if (!value || !type || excludeTypes.includes(type)) {\n return value;\n }\n return convertFromStorage(field, value);\n },\n toStorage: async ({ value, field }) => {\n const { type } = field.settings || {};\n if (!value || !type || excludeTypes.includes(type)) {\n return value;\n }\n if (field.multipleValues) {\n const multipleValues = value as (string | Date | null | undefined)[];\n return (multipleValues || [])\n .filter(v => !!v)\n .map(v => {\n return convertValueToStorage(field, v);\n });\n }\n if ((value as any).toISOString) {\n return (value as Date).toISOString();\n } else if (typeof value === \"string\") {\n return value as string;\n }\n throw new WebinyError(\"Error converting value to a storage type.\", \"TO_STORAGE_ERROR\", {\n value,\n fieldId: field.fieldId,\n storageId: field.storageId\n });\n }\n });\n};\n"],"mappings":";;;;;;;;;AAGA;;AACA;;AAJA;AACA;AACA;AAOA,MAAMA,YAAY,GAAG,CAAC,MAAD,EAAS,sBAAT,CAArB;;AAEA,MAAMC,kBAAkB,GAAG,CAACC,KAAD,EAA8BC,KAA9B,KAA2D;EAClF,IAAI;IACA,IAAID,KAAK,CAACE,cAAV,EAA0B;MACtB,OAAO,CAAED,KAAD,IAAuB,EAAxB,EACFE,MADE,CACKC,CAAC,IAAI,CAAC,CAACA,CADZ,EAEFC,GAFE,CAEGD,CAAD,IAAe;QAChB,OAAO,IAAIE,IAAJ,CAASF,CAAT,CAAP;MACH,CAJE,CAAP;IAKH;;IACD,OAAO,IAAIE,IAAJ,CAASL,KAAT,CAAP;EACH,CATD,CASE,MAAM;IACJM,OAAO,CAACC,GAAR,CAAa,iDAAb;IACA,OAAOP,KAAP;EACH;AACJ,CAdD;;AAgBA,MAAMQ,qBAAqB,GAAG,CAACT,KAAD,EAA8BC,KAA9B,KAAkD;EAC5E,IAAKA,KAAD,CAAeS,WAAnB,EAAgC;IAC5B,OAAQT,KAAD,CAAgBS,WAAhB,EAAP;EACH,CAFD,MAEO,IAAI,OAAOT,KAAP,KAAiB,QAArB,EAA+B;IAClC,OAAOA,KAAP;EACH;;EACD,MAAM,IAAIU,cAAJ,CAAgB,2CAAhB,EAA6D,kBAA7D,EAAiF;IACnFV,KAAK,EAAEA,KAD4E;I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M,IAAIU,cAAJ,CAAgB,2CAAhB,EAA6D,kBAA7D,EAAiF;QACnFV,KADmF;QAEnFW,OAAO,EAAEZ,KAAK,CAACY,OAFoE;QAGnFC,SAAS,EAAEb,KAAK,CAACa;MAHkE,CAAjF,CAAN;IAKH;EAhC6B,CAA3B,CAAP;AAkCH,CAnCM"}
1
+ {"version":3,"names":["excludeTypes","convertFromStorage","field","value","multipleValues","filter","v","map","Date","console","log","convertValueToStorage","toISOString","WebinyError","fieldId","storageId","createDateStorageTransformPlugin","plugin","StorageTransformPlugin","fieldType","fromStorage","type","settings","includes","toStorage","name"],"sources":["date.ts"],"sourcesContent":["/**\n * File is @internal\n */\nimport WebinyError from \"@webiny/error\";\nimport { StorageTransformPlugin } from \"@webiny/api-headless-cms\";\nimport { CmsModelField } from \"@webiny/api-headless-cms/types\";\n\ntype PartialCmsModelField = Pick<CmsModelField, \"fieldId\" | \"storageId\" | \"multipleValues\">;\n\nconst excludeTypes = [\"time\", \"dateTimeWithTimezone\"];\n\nconst convertFromStorage = (field: PartialCmsModelField, value: string | string[]) => {\n try {\n if (field.multipleValues) {\n return ((value as string[]) || [])\n .filter(v => !!v)\n .map((v: string) => {\n return new Date(v);\n });\n }\n return new Date(value as string);\n } catch {\n console.log(`Could not transform from storage for field type`);\n return value;\n }\n};\n\nconst convertValueToStorage = (field: PartialCmsModelField, value: any): any => {\n if ((value as any).toISOString) {\n return (value as Date).toISOString();\n } else if (typeof value === \"string\") {\n return value as string;\n }\n throw new WebinyError(\"Error converting value to a storage type.\", \"TO_STORAGE_ERROR\", {\n value: value,\n fieldId: field.fieldId,\n storageId: field.storageId\n });\n};\n\nexport const createDateStorageTransformPlugin = () => {\n const plugin = new StorageTransformPlugin({\n fieldType: \"datetime\",\n fromStorage: async ({ value, field }) => {\n const { type } = field.settings || {};\n if (!value || !type || excludeTypes.includes(type)) {\n return value;\n }\n return convertFromStorage(field, value);\n },\n toStorage: async ({ value, field }) => {\n const { type } = field.settings || {};\n if (!value || !type || excludeTypes.includes(type)) {\n return value;\n }\n if (field.multipleValues) {\n const multipleValues = value as (string | Date | null | undefined)[];\n return (multipleValues || [])\n .filter(v => !!v)\n .map(v => {\n return convertValueToStorage(field, v);\n });\n }\n return convertValueToStorage(field, value);\n }\n });\n plugin.name = `headless-cms.dynamodb.storageTransform.date`;\n\n return plugin;\n};\n"],"mappings":";;;;;;;AAGA;AACA;AAJA;AACA;AACA;;AAOA,MAAMA,YAAY,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC;AAErD,MAAMC,kBAAkB,GAAG,CAACC,KAA2B,EAAEC,KAAwB,KAAK;EAClF,IAAI;IACA,IAAID,KAAK,CAACE,cAAc,EAAE;MACtB,OAAO,CAAED,KAAK,IAAiB,EAAE,EAC5BE,MAAM,CAACC,CAAC,IAAI,CAAC,CAACA,CAAC,CAAC,CAChBC,GAAG,CAAED,CAAS,IAAK;QAChB,OAAO,IAAIE,IAAI,CAACF,CAAC,CAAC;MACtB,CAAC,CAAC;IACV;IACA,OAAO,IAAIE,IAAI,CAACL,KAAK,CAAW;EACpC,CAAC,CAAC,MAAM;IACJM,OAAO,CAACC,GAAG,CAAE,iDAAgD,CAAC;IAC9D,OAAOP,KAAK;EAChB;AACJ,CAAC;AAED,MAAMQ,qBAAqB,GAAG,CAACT,KAA2B,EAAEC,KAAU,KAAU;EAC5E,IAAKA,KAAK,CAASS,WAAW,EAAE;IAC5B,OAAQT,KAAK,CAAUS,WAAW,EAAE;EACxC,CAAC,MAAM,IAAI,OAAOT,KAAK,KAAK,QAAQ,EAAE;IAClC,OAAOA,KAAK;EAChB;EACA,MAAM,IAAIU,cAAW,CAAC,2CAA2C,EAAE,kBAAkB,EAAE;IACnFV,KAAK,EAAEA,KAAK;IACZW,OAAO,EAAEZ,KAAK,CAACY,OAAO;IACtBC,SAAS,EAAEb,KAAK,CAACa;EACrB,CAAC,CAAC;AACN,CAAC;AAEM,MAAMC,gCAAgC,GAAG,MAAM;EAClD,MAAMC,MAAM,GAA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