@webiny/api-headless-cms-ddb 0.0.0-mt-3 → 0.0.0-unstable.1145e7667f

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 (138) hide show
  1. package/definitions/entry.d.ts +2 -1
  2. package/definitions/entry.js +9 -12
  3. package/definitions/entry.js.map +1 -0
  4. package/definitions/group.d.ts +2 -1
  5. package/definitions/group.js +3 -12
  6. package/definitions/group.js.map +1 -0
  7. package/definitions/model.d.ts +2 -1
  8. package/definitions/model.js +25 -12
  9. package/definitions/model.js.map +1 -0
  10. package/definitions/settings.d.ts +2 -1
  11. package/definitions/settings.js +3 -12
  12. package/definitions/settings.js.map +1 -0
  13. package/definitions/system.d.ts +2 -1
  14. package/definitions/system.js +3 -12
  15. package/definitions/system.js.map +1 -0
  16. package/definitions/table.d.ts +2 -1
  17. package/definitions/table.js +0 -3
  18. package/definitions/table.js.map +1 -0
  19. package/dynamoDb/index.d.ts +1 -1
  20. package/dynamoDb/index.js +6 -17
  21. package/dynamoDb/index.js.map +1 -0
  22. package/dynamoDb/path/plainObject.d.ts +2 -3
  23. package/dynamoDb/path/plainObject.js +25 -25
  24. package/dynamoDb/path/plainObject.js.map +1 -0
  25. package/dynamoDb/storage/date.d.ts +3 -3
  26. package/dynamoDb/storage/date.js +80 -54
  27. package/dynamoDb/storage/date.js.map +1 -0
  28. package/dynamoDb/storage/longText.d.ts +7 -4
  29. package/dynamoDb/storage/longText.js +72 -64
  30. package/dynamoDb/storage/longText.js.map +1 -0
  31. package/dynamoDb/storage/richText.d.ts +2 -8
  32. package/dynamoDb/storage/richText.js +62 -77
  33. package/dynamoDb/storage/richText.js.map +1 -0
  34. package/dynamoDb/transformValue/datetime.d.ts +4 -2
  35. package/dynamoDb/transformValue/datetime.js +28 -30
  36. package/dynamoDb/transformValue/datetime.js.map +1 -0
  37. package/index.d.ts +1 -0
  38. package/index.js +48 -41
  39. package/index.js.map +1 -0
  40. package/operations/entry/dataLoaders.d.ts +12 -8
  41. package/operations/entry/dataLoaders.js +27 -52
  42. package/operations/entry/dataLoaders.js.map +1 -0
  43. package/operations/entry/filtering/createExpressions.d.ts +26 -0
  44. package/operations/entry/filtering/createExpressions.js +176 -0
  45. package/operations/entry/filtering/createExpressions.js.map +1 -0
  46. package/operations/entry/filtering/createFields.d.ts +14 -0
  47. package/operations/entry/filtering/createFields.js +105 -0
  48. package/operations/entry/filtering/createFields.js.map +1 -0
  49. package/operations/entry/filtering/extractSort.d.ts +17 -0
  50. package/operations/entry/filtering/extractSort.js +67 -0
  51. package/operations/entry/filtering/extractSort.js.map +1 -0
  52. package/operations/entry/filtering/filter.d.ts +15 -0
  53. package/operations/entry/filtering/filter.js +143 -0
  54. package/operations/entry/filtering/filter.js.map +1 -0
  55. package/operations/entry/filtering/fullTextSearch.d.ts +14 -0
  56. package/operations/entry/filtering/fullTextSearch.js +48 -0
  57. package/operations/entry/filtering/fullTextSearch.js.map +1 -0
  58. package/operations/entry/filtering/getValue.d.ts +5 -0
  59. package/operations/entry/filtering/getValue.js +63 -0
  60. package/operations/entry/filtering/getValue.js.map +1 -0
  61. package/operations/entry/filtering/index.d.ts +2 -0
  62. package/operations/entry/filtering/index.js +19 -0
  63. package/operations/entry/filtering/index.js.map +1 -0
  64. package/operations/entry/filtering/mapPlugins.d.ts +8 -0
  65. package/operations/entry/filtering/mapPlugins.js +31 -0
  66. package/operations/entry/filtering/mapPlugins.js.map +1 -0
  67. package/operations/entry/filtering/plugins/defaultFilterCreate.d.ts +2 -0
  68. package/operations/entry/filtering/plugins/defaultFilterCreate.js +41 -0
  69. package/operations/entry/filtering/plugins/defaultFilterCreate.js.map +1 -0
  70. package/operations/entry/filtering/plugins/index.d.ts +1 -0
  71. package/operations/entry/filtering/plugins/index.js +13 -0
  72. package/operations/entry/filtering/plugins/index.js.map +1 -0
  73. package/operations/entry/filtering/plugins/objectFilterCreate.d.ts +2 -0
  74. package/operations/entry/filtering/plugins/objectFilterCreate.js +86 -0
  75. package/operations/entry/filtering/plugins/objectFilterCreate.js.map +1 -0
  76. package/operations/entry/filtering/plugins/refFilterCreate.d.ts +2 -0
  77. package/operations/entry/filtering/plugins/refFilterCreate.js +71 -0
  78. package/operations/entry/filtering/plugins/refFilterCreate.js.map +1 -0
  79. package/operations/entry/filtering/sort.d.ts +12 -0
  80. package/operations/entry/filtering/sort.js +69 -0
  81. package/operations/entry/filtering/sort.js.map +1 -0
  82. package/operations/entry/filtering/systemFields.d.ts +4 -0
  83. package/operations/entry/filtering/systemFields.js +70 -0
  84. package/operations/entry/filtering/systemFields.js.map +1 -0
  85. package/operations/entry/filtering/transform.d.ts +6 -0
  86. package/operations/entry/filtering/transform.js +16 -0
  87. package/operations/entry/filtering/transform.js.map +1 -0
  88. package/operations/entry/filtering/types.d.ts +40 -0
  89. package/operations/entry/filtering/types.js +5 -0
  90. package/operations/entry/filtering/types.js.map +1 -0
  91. package/operations/entry/filtering/values.d.ts +2 -0
  92. package/operations/entry/filtering/values.js +22 -0
  93. package/operations/entry/filtering/values.js.map +1 -0
  94. package/operations/entry/filtering/where.d.ts +5 -0
  95. package/operations/entry/filtering/where.js +32 -0
  96. package/operations/entry/filtering/where.js.map +1 -0
  97. package/operations/entry/index.d.ts +2 -2
  98. package/operations/entry/index.js +323 -330
  99. package/operations/entry/index.js.map +1 -0
  100. package/operations/entry/keys.js +7 -14
  101. package/operations/entry/keys.js.map +1 -0
  102. package/operations/entry/systemFields.js +24 -2
  103. package/operations/entry/systemFields.js.map +1 -0
  104. package/operations/group/index.d.ts +3 -2
  105. package/operations/group/index.js +9 -45
  106. package/operations/group/index.js.map +1 -0
  107. package/operations/model/index.d.ts +3 -2
  108. package/operations/model/index.js +13 -37
  109. package/operations/model/index.js.map +1 -0
  110. package/operations/settings/index.d.ts +3 -2
  111. package/operations/settings/index.js +7 -37
  112. package/operations/settings/index.js.map +1 -0
  113. package/operations/system/index.d.ts +3 -2
  114. package/operations/system/index.js +5 -28
  115. package/operations/system/index.js.map +1 -0
  116. package/package.json +22 -23
  117. package/plugins/CmsEntryFieldFilterPathPlugin.d.ts +22 -0
  118. package/plugins/CmsEntryFieldFilterPathPlugin.js +41 -0
  119. package/plugins/CmsEntryFieldFilterPathPlugin.js.map +1 -0
  120. package/plugins/CmsEntryFieldFilterPlugin.d.ts +43 -0
  121. package/plugins/CmsEntryFieldFilterPlugin.js +24 -0
  122. package/plugins/CmsEntryFieldFilterPlugin.js.map +1 -0
  123. package/plugins/CmsEntryFieldSortingPlugin.d.ts +42 -0
  124. package/plugins/CmsEntryFieldSortingPlugin.js +28 -0
  125. package/plugins/CmsEntryFieldSortingPlugin.js.map +1 -0
  126. package/plugins/CmsFieldFilterValueTransformPlugin.d.ts +11 -0
  127. package/plugins/CmsFieldFilterValueTransformPlugin.js +24 -0
  128. package/plugins/CmsFieldFilterValueTransformPlugin.js.map +1 -0
  129. package/plugins/index.d.ts +4 -0
  130. package/plugins/index.js +49 -0
  131. package/plugins/index.js.map +1 -0
  132. package/types.d.ts +2 -33
  133. package/types.js +0 -1
  134. package/types.js.map +1 -0
  135. package/dynamoDb/path/ref.d.ts +0 -3
  136. package/dynamoDb/path/ref.js +0 -27
  137. package/operations/entry/utils.d.ts +0 -31
  138. package/operations/entry/utils.js +0 -406
@@ -1,8 +1,9 @@
1
1
  import { Entity, Table } from "dynamodb-toolbox";
2
2
  import { Attributes } from "../types";
3
- export interface Params {
3
+ interface Params {
4
4
  table: Table;
5
5
  entityName: string;
6
6
  attributes: Attributes;
7
7
  }
8
8
  export declare const createEntryEntity: (params: Params) => Entity<any>;
9
+ export {};
@@ -1,20 +1,12 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.createEntryEntity = void 0;
9
-
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
12
9
  var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
14
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
15
-
16
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
17
-
18
10
  const createEntryEntity = params => {
19
11
  const {
20
12
  table,
@@ -24,7 +16,7 @@ const createEntryEntity = params => {
24
16
  return new _dynamodbToolbox.Entity({
25
17
  name: entityName,
26
18
  table,
27
- attributes: _objectSpread({
19
+ attributes: (0, _objectSpread2.default)({
28
20
  PK: {
29
21
  type: "string",
30
22
  partitionKey: true
@@ -63,6 +55,9 @@ const createEntryEntity = params => {
63
55
  ownedBy: {
64
56
  type: "map"
65
57
  },
58
+ modifiedBy: {
59
+ type: "map"
60
+ },
66
61
  createdOn: {
67
62
  type: "string"
68
63
  },
@@ -89,9 +84,11 @@ const createEntryEntity = params => {
89
84
  },
90
85
  values: {
91
86
  type: "map"
87
+ },
88
+ meta: {
89
+ type: "map"
92
90
  }
93
91
  }, attributes || {})
94
92
  });
95
93
  };
96
-
97
94
  exports.createEntryEntity = createEntryEntity;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createEntryEntity","params","table","entityName","attributes","Entity","name","PK","type","partitionKey","SK","sortKey","GSI1_PK","GSI1_SK","TYPE","__type","webinyVersion","tenant","entryId","id","createdBy","ownedBy","modifiedBy","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\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\nexport const createEntryEntity = (params: Params): 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 GSI1_PK: {\n type: \"string\"\n },\n GSI1_SK: {\n type: \"string\"\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 values: {\n type: \"map\"\n },\n meta: {\n type: \"map\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;AAAA;AAQO,MAAMA,iBAAiB,GAAIC,MAAc,IAAkB;EAC9D,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,OAAO,EAAE;QACLJ,IAAI,EAAE;MACV,CAAC;MACDK,OAAO,EAAE;QACLL,IAAI,EAAE;MACV,CAAC;MACDM,IAAI,EAAE;QACFN,IAAI,EAAE;MACV,CAAC;MACDO,MAAM,EAAE;QACJP,IAAI,EAAE;MACV,CAAC;MACDQ,aAAa,EAAE;QACXR,IAAI,EAAE;MACV,CAAC;MACDS,MAAM,EAAE;QACJT,IAAI,EAAE;MACV,CAAC;MACDU,OAAO,EAAE;QACLV,IAAI,EAAE;MACV,CAAC;MACDW,EAAE,EAAE;QACAX,IAAI,EAAE;MACV,CAAC;MACDY,SAAS,EAAE;QACPZ,IAAI,EAAE;MACV,CAAC;MACDa,OAAO,EAAE;QACLb,IAAI,EAAE;MACV,CAAC;MACDc,UAAU,EAAE;QACRd,IAAI,EAAE;MACV,CAAC;MACDe,SAAS,EAAE;QACPf,IAAI,EAAE;MACV,CAAC;MACDgB,OAAO,EAAE;QACLhB,IAAI,EAAE;MACV,CAAC;MACDiB,OAAO,EAAE;QACLjB,IAAI,EAAE;MACV,CAAC;MACDkB,MAAM,EAAE;QACJlB,IAAI,EAAE;MACV,CAAC;MACDmB,WAAW,EAAE;QACTnB,IAAI,EAAE;MACV,CAAC;MACDoB,OAAO,EAAE;QACLpB,IAAI,EAAE;MACV,CAAC;MACDqB,MAAM,EAAE;QACJrB,IAAI,EAAE;MACV,CAAC;MACDsB,MAAM,EAAE;QACJtB,IAAI,EAAE;MACV,CAAC;MACDuB,MAAM,EAAE;QACJvB,IAAI,EAAE;MACV,CAAC;MACDwB,IAAI,EAAE;QACFxB,IAAI,EAAE;MACV;IAAC,GACGJ,UAAU,IAAI,CAAC,CAAC;EAE5B,CAAC,CAAC;AACN,CAAC;AAAC"}
@@ -1,8 +1,9 @@
1
1
  import { Entity, Table } from "dynamodb-toolbox";
2
2
  import { Attributes } from "../types";
3
- export interface Params {
3
+ interface Params {
4
4
  table: Table;
5
5
  entityName: string;
6
6
  attributes: Attributes;
7
7
  }
8
8
  export declare const createGroupEntity: (params: Params) => Entity<any>;
9
+ export {};
@@ -1,20 +1,12 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.createGroupEntity = void 0;
9
-
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
12
9
  var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
14
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
15
-
16
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
17
-
18
10
  const createGroupEntity = params => {
19
11
  const {
20
12
  table,
@@ -24,7 +16,7 @@ const createGroupEntity = params => {
24
16
  return new _dynamodbToolbox.Entity({
25
17
  name: entityName,
26
18
  table,
27
- attributes: _objectSpread({
19
+ attributes: (0, _objectSpread2.default)({
28
20
  PK: {
29
21
  partitionKey: true
30
22
  },
@@ -70,5 +62,4 @@ const createGroupEntity = params => {
70
62
  }, attributes || {})
71
63
  });
72
64
  };
73
-
74
65
  exports.createGroupEntity = createGroupEntity;
@@ -0,0 +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\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\nexport const createGroupEntity = (params: Params): 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,MAAc,IAAkB;EAC9D,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,8 +1,9 @@
1
1
  import { Entity, Table } from "dynamodb-toolbox";
2
2
  import { Attributes } from "../types";
3
- export interface Params {
3
+ interface Params {
4
4
  table: Table;
5
5
  entityName: string;
6
6
  attributes: Attributes;
7
7
  }
8
8
  export declare const createModelEntity: (params: Params) => Entity<any>;
9
+ export {};
@@ -1,20 +1,12 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.createModelEntity = void 0;
9
-
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
12
9
  var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
14
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
15
-
16
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
17
-
18
10
  const createModelEntity = params => {
19
11
  const {
20
12
  table,
@@ -24,7 +16,7 @@ const createModelEntity = params => {
24
16
  return new _dynamodbToolbox.Entity({
25
17
  name: entityName,
26
18
  table,
27
- attributes: _objectSpread({
19
+ attributes: (0, _objectSpread2.default)({
28
20
  PK: {
29
21
  partitionKey: true
30
22
  },
@@ -47,6 +39,14 @@ const createModelEntity = params => {
47
39
  type: "string",
48
40
  required: true
49
41
  },
42
+ singularApiName: {
43
+ type: "string",
44
+ required: true
45
+ },
46
+ pluralApiName: {
47
+ type: "string",
48
+ required: true
49
+ },
50
50
  locale: {
51
51
  type: "string",
52
52
  required: true
@@ -55,6 +55,9 @@ const createModelEntity = params => {
55
55
  type: "map",
56
56
  required: true
57
57
  },
58
+ icon: {
59
+ type: "string"
60
+ },
58
61
  description: {
59
62
  type: "string"
60
63
  },
@@ -78,6 +81,11 @@ const createModelEntity = params => {
78
81
  type: "list",
79
82
  required: true
80
83
  },
84
+ tags: {
85
+ type: "list",
86
+ required: false,
87
+ default: []
88
+ },
81
89
  lockedFields: {
82
90
  type: "list",
83
91
  required: true
@@ -85,6 +93,12 @@ const createModelEntity = params => {
85
93
  titleFieldId: {
86
94
  type: "string"
87
95
  },
96
+ descriptionFieldId: {
97
+ type: "string"
98
+ },
99
+ imageFieldId: {
100
+ type: "string"
101
+ },
88
102
  tenant: {
89
103
  type: "string",
90
104
  required: true
@@ -92,5 +106,4 @@ const createModelEntity = params => {
92
106
  }, attributes || {})
93
107
  });
94
108
  };
95
-
96
109
  exports.createModelEntity = createModelEntity;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["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\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createModelEntity = (params: Params): 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,MAAc,IAAkB;EAC9D,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,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDC,aAAa,EAAE;QACXF,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDP,IAAI,EAAE;QACFM,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDE,OAAO,EAAE;QACLH,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDG,eAAe,EAAE;QACbJ,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDI,aAAa,EAAE;QACXL,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDK,MAAM,EAAE;QACJN,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDM,KAAK,EAAE;QACHP,IAAI,EAAE,KAAK;QACXC,QAAQ,EAAE;MACd,CAAC;MACDO,IAAI,EAAE;QACFR,IAAI,EAAE;MACV,CAAC;MACDS,WAAW,EAAE;QACTT,IAAI,EAAE;MACV,CAAC;MACDU,SAAS,EAAE;QACPV,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDU,OAAO,EAAE;QACLX,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDW,SAAS,EAAE;QACPZ,IAAI,EAAE,KAAK;QACXC,QAAQ,EAAE;MACd,CAAC;MACDY,MAAM,EAAE;QACJb,IAAI,EAAE,MAAM;QACZC,QAAQ,EAAE;MACd,CAAC;MACDa,MAAM,EAAE;QACJd,IAAI,EAAE,MAAM;QACZC,QAAQ,EAAE;MACd,CAAC;MACDc,IAAI,EAAE;QACFf,IAAI,EAAE,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,8 +1,9 @@
1
1
  import { Entity, Table } from "dynamodb-toolbox";
2
2
  import { Attributes } from "../types";
3
- export interface Params {
3
+ interface Params {
4
4
  table: Table;
5
5
  entityName: string;
6
6
  attributes: Attributes;
7
7
  }
8
8
  export declare const createSettingsEntity: (params: Params) => Entity<any>;
9
+ export {};
@@ -1,20 +1,12 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.createSettingsEntity = void 0;
9
-
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
12
9
  var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
14
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
15
-
16
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
17
-
18
10
  const createSettingsEntity = params => {
19
11
  const {
20
12
  entityName,
@@ -24,7 +16,7 @@ const createSettingsEntity = params => {
24
16
  return new _dynamodbToolbox.Entity({
25
17
  name: entityName,
26
18
  table,
27
- attributes: _objectSpread({
19
+ attributes: (0, _objectSpread2.default)({
28
20
  PK: {
29
21
  partitionKey: true
30
22
  },
@@ -58,5 +50,4 @@ const createSettingsEntity = params => {
58
50
  }, attributes || {})
59
51
  });
60
52
  };
61
-
62
53
  exports.createSettingsEntity = createSettingsEntity;
@@ -0,0 +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\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSettingsEntity = (params: Params): 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,MAAc,IAAkB;EACjE,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,8 +1,9 @@
1
1
  import { Entity, Table } from "dynamodb-toolbox";
2
2
  import { Attributes } from "../types";
3
- export interface Params {
3
+ interface Params {
4
4
  table: Table;
5
5
  entityName: string;
6
6
  attributes: Attributes;
7
7
  }
8
8
  export declare const createSystemEntity: (params: Params) => Entity<any>;
9
+ export {};
@@ -1,20 +1,12 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.createSystemEntity = void 0;
9
-
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
12
9
  var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
14
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
15
-
16
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
17
-
18
10
  const createSystemEntity = params => {
19
11
  const {
20
12
  entityName,
@@ -24,7 +16,7 @@ const createSystemEntity = params => {
24
16
  return new _dynamodbToolbox.Entity({
25
17
  name: entityName,
26
18
  table,
27
- attributes: _objectSpread({
19
+ attributes: (0, _objectSpread2.default)({
28
20
  PK: {
29
21
  partitionKey: true
30
22
  },
@@ -46,5 +38,4 @@ const createSystemEntity = params => {
46
38
  }, attributes || {})
47
39
  });
48
40
  };
49
-
50
41
  exports.createSystemEntity = createSystemEntity;
@@ -0,0 +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\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 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,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,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"}
@@ -1,8 +1,9 @@
1
1
  import { TableModifier } from "../types";
2
2
  import { DocumentClient } from "aws-sdk/clients/dynamodb";
3
3
  import { Table } from "dynamodb-toolbox";
4
- export interface Params {
4
+ interface Params {
5
5
  table?: TableModifier;
6
6
  documentClient: DocumentClient;
7
7
  }
8
8
  export declare const createTable: ({ table, documentClient }: Params) => Table;
9
+ export {};
@@ -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
@@ -26,5 +24,4 @@ const createTable = ({
26
24
  const config = typeof table === "function" ? table(tableConfig) : tableConfig;
27
25
  return new _dynamodbToolbox.Table(config);
28
26
  };
29
-
30
27
  exports.createTable = createTable;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createTable","table","documentClient","tableConfig","name","process","env","DB_TABLE_HEADLESS_CMS","DB_TABLE","partitionKey","sortKey","DocumentClient","indexes","GSI1","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\ninterface Params {\n table?: TableModifier;\n documentClient: DocumentClient;\n}\nexport const createTable = ({ table, documentClient }: Params): 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 indexes: {\n GSI1: {\n partitionKey: \"GSI1_PK\",\n sortKey: \"GSI1_SK\"\n }\n }\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;AAAuB,CAAC,KAAY;EACrE,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,cAAc;IAC9BU,OAAO,EAAE;MACLC,IAAI,EAAE;QACFJ,YAAY,EAAE,SAAS;QACvBC,OAAO,EAAE;MACb;IACJ;EACJ,CAAC;EAED,MAAMI,MAAM,GAAG,OAAOb,KAAK,KAAK,UAAU,GAAGA,KAAK,CAACE,WAAW,CAAC,GAAGA,WAAW;EAE7E,OAAO,IAAIY,sBAAK,CAACD,MAAM,CAAC;AAC5B,CAAC;AAAC"}
@@ -1,2 +1,2 @@
1
- declare const _default: () => (import("@webiny/api-headless-cms").StorageTransformPlugin<any, any> | import("../types").CmsFieldFilterValueTransformPlugin | import("../types").CmsFieldFilterPathPlugin)[];
1
+ declare const _default: () => (import("@webiny/api-headless-cms").StorageTransformPlugin<any, any, import("@webiny/api-headless-cms/types").CmsModelField> | import("..").CmsEntryFieldFilterPathPlugin | import("../types").CmsFieldFilterValueTransformPlugin)[];
2
2
  export default _default;
package/dynamoDb/index.js CHANGED
@@ -1,24 +1,13 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.default = void 0;
9
-
10
- var _richText = _interopRequireDefault(require("./storage/richText"));
11
-
12
- var _longText = _interopRequireDefault(require("./storage/longText"));
13
-
14
- var _date = _interopRequireDefault(require("./storage/date"));
15
-
16
- var _plainObject = _interopRequireDefault(require("./path/plainObject"));
17
-
18
- var _ref = _interopRequireDefault(require("./path/ref"));
19
-
20
- var _datetime = _interopRequireDefault(require("./transformValue/datetime"));
21
-
22
- var _default = () => [(0, _richText.default)(), (0, _longText.default)(), (0, _date.default)(), (0, _plainObject.default)(), (0, _ref.default)(), (0, _datetime.default)()];
23
-
7
+ var _richText = require("./storage/richText");
8
+ var _longText = require("./storage/longText");
9
+ var _date = require("./storage/date");
10
+ var _plainObject = require("./path/plainObject");
11
+ var _datetime = require("./transformValue/datetime");
12
+ var _default = () => [(0, _richText.createRichTextStorageTransformPlugin)(), (0, _longText.createLongTextStorageTransformPlugin)(), (0, _date.createDateStorageTransformPlugin)(), (0, _plainObject.createPlainObjectPathPlugin)(), (0, _datetime.createDatetimeTransformValuePlugin)()];
24
13
  exports.default = _default;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createRichTextStorageTransformPlugin","createLongTextStorageTransformPlugin","createDateStorageTransformPlugin","createPlainObjectPathPlugin","createDatetimeTransformValuePlugin"],"sources":["index.ts"],"sourcesContent":["import { createRichTextStorageTransformPlugin } from \"./storage/richText\";\nimport { createLongTextStorageTransformPlugin } from \"./storage/longText\";\nimport { createDateStorageTransformPlugin } from \"./storage/date\";\nimport { createPlainObjectPathPlugin } from \"./path/plainObject\";\nimport { createDatetimeTransformValuePlugin } from \"./transformValue/datetime\";\n\nexport default () => [\n createRichTextStorageTransformPlugin(),\n createLongTextStorageTransformPlugin(),\n createDateStorageTransformPlugin(),\n createPlainObjectPathPlugin(),\n createDatetimeTransformValuePlugin()\n];\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAA+E,eAEhE,MAAM,CACjB,IAAAA,8CAAoC,GAAE,EACtC,IAAAC,8CAAoC,GAAE,EACtC,IAAAC,sCAAgC,GAAE,EAClC,IAAAC,wCAA2B,GAAE,EAC7B,IAAAC,4CAAkC,GAAE,CACvC;AAAA"}
@@ -1,3 +1,2 @@
1
- import { CmsFieldFilterPathPlugin } from "../../types";
2
- declare const _default: () => CmsFieldFilterPathPlugin;
3
- export default _default;
1
+ import { CmsEntryFieldFilterPathPlugin } from "../../plugins/CmsEntryFieldFilterPathPlugin";
2
+ export declare const createPlainObjectPathPlugin: () => CmsEntryFieldFilterPathPlugin;
@@ -1,33 +1,33 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
- exports.default = void 0;
9
-
7
+ exports.createPlainObjectPathPlugin = void 0;
10
8
  var _error = _interopRequireDefault(require("@webiny/error"));
9
+ var _CmsEntryFieldFilterPathPlugin = require("../../plugins/CmsEntryFieldFilterPathPlugin");
10
+ /**
11
+ * File is @internal
12
+ */
11
13
 
12
- var _default = () => ({
13
- type: "cms-field-filter-path",
14
- name: "cms-field-filter-path-plain-object",
15
- fieldType: "plainObject",
16
- createPath: ({
17
- field
18
- }) => {
19
- const {
20
- path
21
- } = field.settings || {};
22
-
23
- if (!path) {
24
- throw new _error.default("Missing path settings value.", "FIELD_SETTINGS_ERROR", {
25
- field
26
- });
27
- }
28
-
29
- return path;
14
+ const createPath = ({
15
+ field
16
+ }) => {
17
+ const {
18
+ path
19
+ } = field.settings || {};
20
+ if (!path) {
21
+ throw new _error.default("Missing path settings value.", "FIELD_SETTINGS_ERROR", {
22
+ field
23
+ });
30
24
  }
31
- });
32
-
33
- exports.default = _default;
25
+ return path;
26
+ };
27
+ const createPlainObjectPathPlugin = () => {
28
+ return new _CmsEntryFieldFilterPathPlugin.CmsEntryFieldFilterPathPlugin({
29
+ fieldType: "plainObject",
30
+ path: createPath
31
+ });
32
+ };
33
+ exports.createPlainObjectPathPlugin = createPlainObjectPathPlugin;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createPath","field","path","settings","WebinyError","createPlainObjectPathPlugin","CmsEntryFieldFilterPathPlugin","fieldType"],"sources":["plainObject.ts"],"sourcesContent":["/**\n * File is @internal\n */\nimport WebinyError from \"@webiny/error\";\nimport {\n CmsEntryFieldFilterPathPlugin,\n CreatePathCallable\n} from \"~/plugins/CmsEntryFieldFilterPathPlugin\";\n\nconst createPath: CreatePathCallable = ({ field }) => {\n const { path } = field.settings || {};\n if (!path) {\n throw new WebinyError(\"Missing path settings value.\", \"FIELD_SETTINGS_ERROR\", {\n field\n });\n }\n return path;\n};\n\nexport const createPlainObjectPathPlugin = (): CmsEntryFieldFilterPathPlugin => {\n return new CmsEntryFieldFilterPathPlugin({\n fieldType: \"plainObject\",\n path: createPath\n });\n};\n"],"mappings":";;;;;;;AAGA;AACA;AAJA;AACA;AACA;;AAOA,MAAMA,UAA8B,GAAG,CAAC;EAAEC;AAAM,CAAC,KAAK;EAClD,MAAM;IAAEC;EAAK,CAAC,GAAGD,KAAK,CAACE,QAAQ,IAAI,CAAC,CAAC;EACrC,IAAI,CAACD,IAAI,EAAE;IACP,MAAM,IAAIE,cAAW,CAAC,8BAA8B,EAAE,sBAAsB,EAAE;MAC1EH;IACJ,CAAC,CAAC;EACN;EACA,OAAOC,IAAI;AACf,CAAC;AAEM,MAAMG,2BAA2B,GAAG,MAAqC;EAC5E,OAAO,IAAIC,4DAA6B,CAAC;IACrCC,SAAS,EAAE,aAAa;IACxBL,IAAI,EAAEF;EACV,CAAC,CAAC;AACN,CAAC;AAAC"}
@@ -1,3 +1,3 @@
1
- import { StorageTransformPlugin } from "@webiny/api-headless-cms/content/plugins/storage/StorageTransformPlugin";
2
- declare const _default: () => StorageTransformPlugin<any, any>;
3
- export default _default;
1
+ import { StorageTransformPlugin } from "@webiny/api-headless-cms";
2
+ import { CmsModelField } from "@webiny/api-headless-cms/types";
3
+ export declare const createDateStorageTransformPlugin: () => StorageTransformPlugin<any, any, CmsModelField>;