@webiny/api-headless-cms-ddb 0.0.0-mt-2 → 0.0.0-unstable.0156a4c312

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 (215) hide show
  1. package/README.md +6 -20
  2. package/abstractions/CmsDdbDataLoaders.d.ts +5 -0
  3. package/abstractions/CmsDdbDataLoaders.js +5 -0
  4. package/abstractions/CmsDdbDataLoaders.js.map +1 -0
  5. package/abstractions/CmsDdbEntryEntity.d.ts +5 -0
  6. package/abstractions/CmsDdbEntryEntity.js +5 -0
  7. package/abstractions/CmsDdbEntryEntity.js.map +1 -0
  8. package/abstractions/CmsDdbGroupEntity.d.ts +5 -0
  9. package/abstractions/CmsDdbGroupEntity.js +5 -0
  10. package/abstractions/CmsDdbGroupEntity.js.map +1 -0
  11. package/abstractions/CmsDdbModelEntity.d.ts +5 -0
  12. package/abstractions/CmsDdbModelEntity.js +5 -0
  13. package/abstractions/CmsDdbModelEntity.js.map +1 -0
  14. package/abstractions/CmsDdbTable.d.ts +5 -0
  15. package/abstractions/CmsDdbTable.js +5 -0
  16. package/abstractions/CmsDdbTable.js.map +1 -0
  17. package/definitions/entry.d.ts +6 -6
  18. package/definitions/entry.js +9 -95
  19. package/definitions/entry.js.map +1 -0
  20. package/definitions/group.d.ts +6 -6
  21. package/definitions/group.js +9 -72
  22. package/definitions/group.js.map +1 -0
  23. package/definitions/model.d.ts +6 -6
  24. package/definitions/model.js +9 -94
  25. package/definitions/model.js.map +1 -0
  26. package/definitions/table.d.ts +6 -7
  27. package/definitions/table.js +8 -30
  28. package/definitions/table.js.map +1 -0
  29. package/definitions/types.d.ts +65 -0
  30. package/definitions/types.js +0 -0
  31. package/index.d.ts +10 -2
  32. package/index.js +45 -123
  33. package/index.js.map +1 -0
  34. package/operations/entry/DdbCreateEntry.d.ts +16 -0
  35. package/operations/entry/DdbCreateEntry.js +77 -0
  36. package/operations/entry/DdbCreateEntry.js.map +1 -0
  37. package/operations/entry/DdbCreateEntryRevisionFrom.d.ts +16 -0
  38. package/operations/entry/DdbCreateEntryRevisionFrom.js +85 -0
  39. package/operations/entry/DdbCreateEntryRevisionFrom.js.map +1 -0
  40. package/operations/entry/DdbDeleteEntry.d.ts +16 -0
  41. package/operations/entry/DdbDeleteEntry.js +65 -0
  42. package/operations/entry/DdbDeleteEntry.js.map +1 -0
  43. package/operations/entry/DdbDeleteEntryRevision.d.ts +17 -0
  44. package/operations/entry/DdbDeleteEntryRevision.js +91 -0
  45. package/operations/entry/DdbDeleteEntryRevision.js.map +1 -0
  46. package/operations/entry/DdbDeleteMultipleEntries.d.ts +16 -0
  47. package/operations/entry/DdbDeleteMultipleEntries.js +59 -0
  48. package/operations/entry/DdbDeleteMultipleEntries.js.map +1 -0
  49. package/operations/entry/DdbGetEntriesByIds.d.ts +14 -0
  50. package/operations/entry/DdbGetEntriesByIds.js +31 -0
  51. package/operations/entry/DdbGetEntriesByIds.js.map +1 -0
  52. package/operations/entry/DdbGetEntry.d.ts +14 -0
  53. package/operations/entry/DdbGetEntry.js +27 -0
  54. package/operations/entry/DdbGetEntry.js.map +1 -0
  55. package/operations/entry/DdbGetLatestEntriesByIds.d.ts +14 -0
  56. package/operations/entry/DdbGetLatestEntriesByIds.js +31 -0
  57. package/operations/entry/DdbGetLatestEntriesByIds.js.map +1 -0
  58. package/operations/entry/DdbGetLatestRevisionByEntryId.d.ts +14 -0
  59. package/operations/entry/DdbGetLatestRevisionByEntryId.js +35 -0
  60. package/operations/entry/DdbGetLatestRevisionByEntryId.js.map +1 -0
  61. package/operations/entry/DdbGetPreviousRevision.d.ts +14 -0
  62. package/operations/entry/DdbGetPreviousRevision.js +53 -0
  63. package/operations/entry/DdbGetPreviousRevision.js.map +1 -0
  64. package/operations/entry/DdbGetPublishedEntriesByIds.d.ts +14 -0
  65. package/operations/entry/DdbGetPublishedEntriesByIds.js +31 -0
  66. package/operations/entry/DdbGetPublishedEntriesByIds.js.map +1 -0
  67. package/operations/entry/DdbGetPublishedRevisionByEntryId.d.ts +14 -0
  68. package/operations/entry/DdbGetPublishedRevisionByEntryId.js +35 -0
  69. package/operations/entry/DdbGetPublishedRevisionByEntryId.js.map +1 -0
  70. package/operations/entry/DdbGetRevisionById.d.ts +14 -0
  71. package/operations/entry/DdbGetRevisionById.js +34 -0
  72. package/operations/entry/DdbGetRevisionById.js.map +1 -0
  73. package/operations/entry/DdbGetRevisions.d.ts +14 -0
  74. package/operations/entry/DdbGetRevisions.js +33 -0
  75. package/operations/entry/DdbGetRevisions.js.map +1 -0
  76. package/operations/entry/DdbGetUniqueFieldValues.d.ts +12 -0
  77. package/operations/entry/DdbGetUniqueFieldValues.js +31 -0
  78. package/operations/entry/DdbGetUniqueFieldValues.js.map +1 -0
  79. package/operations/entry/DdbListEntries.d.ts +30 -0
  80. package/operations/entry/DdbListEntries.js +133 -0
  81. package/operations/entry/DdbListEntries.js.map +1 -0
  82. package/operations/entry/DdbMoveEntry.d.ts +16 -0
  83. package/operations/entry/DdbMoveEntry.js +63 -0
  84. package/operations/entry/DdbMoveEntry.js.map +1 -0
  85. package/operations/entry/DdbMoveToBin.d.ts +16 -0
  86. package/operations/entry/DdbMoveToBin.js +77 -0
  87. package/operations/entry/DdbMoveToBin.js.map +1 -0
  88. package/operations/entry/DdbPublishEntry.d.ts +18 -0
  89. package/operations/entry/DdbPublishEntry.js +162 -0
  90. package/operations/entry/DdbPublishEntry.js.map +1 -0
  91. package/operations/entry/DdbRestoreFromBin.d.ts +16 -0
  92. package/operations/entry/DdbRestoreFromBin.js +78 -0
  93. package/operations/entry/DdbRestoreFromBin.js.map +1 -0
  94. package/operations/entry/DdbUnpublishEntry.d.ts +17 -0
  95. package/operations/entry/DdbUnpublishEntry.js +112 -0
  96. package/operations/entry/DdbUnpublishEntry.js.map +1 -0
  97. package/operations/entry/DdbUpdateEntry.d.ts +17 -0
  98. package/operations/entry/DdbUpdateEntry.js +105 -0
  99. package/operations/entry/DdbUpdateEntry.js.map +1 -0
  100. package/operations/entry/dataLoader/DataLoaderCache.d.ts +16 -0
  101. package/operations/entry/dataLoader/DataLoaderCache.js +27 -0
  102. package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -0
  103. package/operations/entry/dataLoader/constants.d.ts +1 -0
  104. package/operations/entry/dataLoader/constants.js +5 -0
  105. package/operations/entry/dataLoader/constants.js.map +1 -0
  106. package/operations/entry/dataLoader/createBatchScheduleFn.d.ts +8 -0
  107. package/operations/entry/dataLoader/createBatchScheduleFn.js +10 -0
  108. package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -0
  109. package/operations/entry/dataLoader/getAllEntryRevisions.d.ts +4 -0
  110. package/operations/entry/dataLoader/getAllEntryRevisions.js +24 -0
  111. package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -0
  112. package/operations/entry/dataLoader/getLatestRevisionByEntryId.d.ts +4 -0
  113. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +40 -0
  114. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -0
  115. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.d.ts +4 -0
  116. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +40 -0
  117. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -0
  118. package/operations/entry/dataLoader/getRevisionById.d.ts +4 -0
  119. package/operations/entry/dataLoader/getRevisionById.js +42 -0
  120. package/operations/entry/dataLoader/getRevisionById.js.map +1 -0
  121. package/operations/entry/dataLoader/index.d.ts +8 -0
  122. package/operations/entry/dataLoader/index.js +18 -0
  123. package/operations/entry/dataLoader/index.js.map +1 -0
  124. package/operations/entry/dataLoader/types.d.ts +6 -0
  125. package/operations/entry/dataLoader/types.js +0 -0
  126. package/operations/entry/dataLoaders.d.ts +20 -31
  127. package/operations/entry/dataLoaders.js +91 -296
  128. package/operations/entry/dataLoaders.js.map +1 -0
  129. package/operations/entry/feature.d.ts +4 -0
  130. package/operations/entry/feature.js +55 -0
  131. package/operations/entry/feature.js.map +1 -0
  132. package/operations/entry/keys.d.ts +46 -2
  133. package/operations/entry/keys.js +53 -55
  134. package/operations/entry/keys.js.map +1 -0
  135. package/operations/entry/storageEntryUtils.d.ts +8 -0
  136. package/operations/entry/storageEntryUtils.js +25 -0
  137. package/operations/entry/storageEntryUtils.js.map +1 -0
  138. package/operations/group/DdbCreateGroup.d.ts +12 -0
  139. package/operations/group/DdbCreateGroup.js +35 -0
  140. package/operations/group/DdbCreateGroup.js.map +1 -0
  141. package/operations/group/DdbDeleteGroup.d.ts +12 -0
  142. package/operations/group/DdbDeleteGroup.js +31 -0
  143. package/operations/group/DdbDeleteGroup.js.map +1 -0
  144. package/operations/group/DdbGetGroup.d.ts +12 -0
  145. package/operations/group/DdbGetGroup.js +31 -0
  146. package/operations/group/DdbGetGroup.js.map +1 -0
  147. package/operations/group/DdbListGroups.d.ts +14 -0
  148. package/operations/group/DdbListGroups.js +52 -0
  149. package/operations/group/DdbListGroups.js.map +1 -0
  150. package/operations/group/DdbUpdateGroup.d.ts +12 -0
  151. package/operations/group/DdbUpdateGroup.js +35 -0
  152. package/operations/group/DdbUpdateGroup.js.map +1 -0
  153. package/operations/group/feature.d.ts +4 -0
  154. package/operations/group/feature.js +19 -0
  155. package/operations/group/feature.js.map +1 -0
  156. package/operations/group/keys.d.ts +15 -0
  157. package/operations/group/keys.js +17 -0
  158. package/operations/group/keys.js.map +1 -0
  159. package/operations/model/DdbCreateModel.d.ts +12 -0
  160. package/operations/model/DdbCreateModel.js +37 -0
  161. package/operations/model/DdbCreateModel.js.map +1 -0
  162. package/operations/model/DdbDeleteModel.d.ts +12 -0
  163. package/operations/model/DdbDeleteModel.js +31 -0
  164. package/operations/model/DdbDeleteModel.js.map +1 -0
  165. package/operations/model/DdbGetModel.d.ts +12 -0
  166. package/operations/model/DdbGetModel.js +30 -0
  167. package/operations/model/DdbGetModel.js.map +1 -0
  168. package/operations/model/DdbListModels.d.ts +12 -0
  169. package/operations/model/DdbListModels.js +36 -0
  170. package/operations/model/DdbListModels.js.map +1 -0
  171. package/operations/model/DdbUpdateModel.d.ts +12 -0
  172. package/operations/model/DdbUpdateModel.js +36 -0
  173. package/operations/model/DdbUpdateModel.js.map +1 -0
  174. package/operations/model/feature.d.ts +4 -0
  175. package/operations/model/feature.js +19 -0
  176. package/operations/model/feature.js.map +1 -0
  177. package/operations/model/keys.d.ts +15 -0
  178. package/operations/model/keys.js +16 -0
  179. package/operations/model/keys.js.map +1 -0
  180. package/package.json +30 -34
  181. package/types.d.ts +12 -76
  182. package/types.js +8 -15
  183. package/types.js.map +1 -0
  184. package/definitions/settings.d.ts +0 -8
  185. package/definitions/settings.js +0 -62
  186. package/definitions/system.d.ts +0 -8
  187. package/definitions/system.js +0 -50
  188. package/dynamoDb/index.d.ts +0 -2
  189. package/dynamoDb/index.js +0 -24
  190. package/dynamoDb/path/plainObject.d.ts +0 -3
  191. package/dynamoDb/path/plainObject.js +0 -33
  192. package/dynamoDb/path/ref.d.ts +0 -3
  193. package/dynamoDb/path/ref.js +0 -27
  194. package/dynamoDb/storage/date.d.ts +0 -3
  195. package/dynamoDb/storage/date.js +0 -65
  196. package/dynamoDb/storage/longText.d.ts +0 -7
  197. package/dynamoDb/storage/longText.js +0 -83
  198. package/dynamoDb/storage/richText.d.ts +0 -8
  199. package/dynamoDb/storage/richText.js +0 -110
  200. package/dynamoDb/transformValue/datetime.d.ts +0 -3
  201. package/dynamoDb/transformValue/datetime.js +0 -47
  202. package/operations/entry/index.d.ts +0 -8
  203. package/operations/entry/index.js +0 -823
  204. package/operations/entry/systemFields.d.ts +0 -2
  205. package/operations/entry/systemFields.js +0 -50
  206. package/operations/entry/utils.d.ts +0 -31
  207. package/operations/entry/utils.js +0 -406
  208. package/operations/group/index.d.ts +0 -8
  209. package/operations/group/index.js +0 -198
  210. package/operations/model/index.d.ts +0 -6
  211. package/operations/model/index.js +0 -161
  212. package/operations/settings/index.d.ts +0 -6
  213. package/operations/settings/index.js +0 -141
  214. package/operations/system/index.d.ts +0 -6
  215. package/operations/system/index.js +0 -105
@@ -1,65 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _error = _interopRequireDefault(require("@webiny/error"));
11
-
12
- var _StorageTransformPlugin = require("@webiny/api-headless-cms/content/plugins/storage/StorageTransformPlugin");
13
-
14
- const excludeTypes = ["time", "dateTimeWithTimezone"];
15
- const plugin = new _StorageTransformPlugin.StorageTransformPlugin({
16
- fieldType: "datetime",
17
- fromStorage: async ({
18
- value,
19
- field
20
- }) => {
21
- const {
22
- type
23
- } = field.settings || {};
24
-
25
- if (!value || !type || excludeTypes.includes(type)) {
26
- return value;
27
- }
28
-
29
- try {
30
- return new Date(value);
31
- } catch {
32
- console.log(`Could not transform from storage for field type`);
33
- return value;
34
- }
35
- },
36
- toStorage: async ({
37
- value,
38
- field
39
- }) => {
40
- const {
41
- type
42
- } = field.settings || {};
43
-
44
- if (!value || !type || excludeTypes.includes(type)) {
45
- return value;
46
- }
47
-
48
- if (value.toISOString) {
49
- return value.toISOString();
50
- } else if (typeof value === "string") {
51
- return value;
52
- }
53
-
54
- throw new _error.default("Error converting value to a storage type.", "TO_STORAGE_ERROR", {
55
- value,
56
- fieldId: field.fieldId
57
- });
58
- }
59
- });
60
-
61
- var _default = () => {
62
- return plugin;
63
- };
64
-
65
- exports.default = _default;
@@ -1,7 +0,0 @@
1
- import { StorageTransformPlugin } from "@webiny/api-headless-cms/content/plugins/storage/StorageTransformPlugin";
2
- export interface StorageValue {
3
- compression: string;
4
- value: any;
5
- }
6
- declare const _default: () => StorageTransformPlugin<string, StorageValue>;
7
- export default _default;
@@ -1,83 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _error = _interopRequireDefault(require("@webiny/error"));
11
-
12
- var _gzip = require("@webiny/utils/compression/gzip");
13
-
14
- var _StorageTransformPlugin = require("@webiny/api-headless-cms/content/plugins/storage/StorageTransformPlugin");
15
-
16
- const GZIP = "gzip";
17
- const TO_STORAGE_ENCODING = "base64";
18
- const FROM_STORAGE_ENCODING = "utf8";
19
-
20
- const convertToBuffer = value => {
21
- if (typeof value === "string") {
22
- return Buffer.from(value, TO_STORAGE_ENCODING);
23
- }
24
-
25
- return value;
26
- };
27
-
28
- const plugin = new _StorageTransformPlugin.StorageTransformPlugin({
29
- fieldType: "long-text",
30
- fromStorage: async ({
31
- field,
32
- value: storageValue
33
- }) => {
34
- const typeOf = typeof storageValue;
35
-
36
- if (!storageValue || typeOf === "string" || typeOf === "number") {
37
- return storageValue;
38
- } else if (typeof storageValue !== "object") {
39
- throw new _error.default(`LongText value received in "fromStorage" function is not an object in field "${field.fieldId}".`);
40
- }
41
-
42
- const {
43
- compression,
44
- value
45
- } = storageValue;
46
- /**
47
- * Check if possibly undefined, null, empty...
48
- */
49
-
50
- if (!compression) {
51
- throw new _error.default(`Missing compression in "fromStorage" function in field "${field.fieldId}": ${JSON.stringify(storageValue)}.`, "MISSING_COMPRESSION", {
52
- value: storageValue
53
- });
54
- } else if (compression !== GZIP) {
55
- throw new _error.default(`This plugin cannot transform something not compressed with "GZIP".`, "WRONG_COMPRESSION", {
56
- compression
57
- });
58
- }
59
-
60
- try {
61
- const buf = await (0, _gzip.decompress)(convertToBuffer(value));
62
- return buf.toString(FROM_STORAGE_ENCODING);
63
- } catch (ex) {
64
- console.log(ex.message);
65
- return null;
66
- }
67
- },
68
- toStorage: async ({
69
- value
70
- }) => {
71
- const compressedValue = await (0, _gzip.compress)(value);
72
- return {
73
- compression: GZIP,
74
- value: compressedValue.toString(TO_STORAGE_ENCODING)
75
- };
76
- }
77
- });
78
-
79
- var _default = () => {
80
- return plugin;
81
- };
82
-
83
- exports.default = _default;
@@ -1,8 +0,0 @@
1
- import { StorageTransformPlugin } from "@webiny/api-headless-cms/content/plugins/storage/StorageTransformPlugin";
2
- export declare type OriginalValue = Record<string, any> | any[];
3
- export interface StorageValue {
4
- compression: string;
5
- value: any;
6
- }
7
- declare const _default: () => StorageTransformPlugin<any, any>;
8
- export default _default;
@@ -1,110 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _jsonpack = _interopRequireDefault(require("jsonpack"));
11
-
12
- var _error = _interopRequireDefault(require("@webiny/error"));
13
-
14
- var _StorageTransformPlugin = require("@webiny/api-headless-cms/content/plugins/storage/StorageTransformPlugin");
15
-
16
- /**
17
- * Remove when jsonpack gets PR with a fix merged
18
- * https://github.com/rgcl/jsonpack/pull/25/files
19
- * NOTE 2021-07-28: it seems PR is not going to be merged so keep this.
20
- */
21
- const transformArray = value => {
22
- if (!value) {
23
- return value;
24
- }
25
-
26
- let isArray = Array.isArray(value);
27
- const shouldBeArray = value instanceof Array === false && isArray;
28
-
29
- if (shouldBeArray) {
30
- value = Array.from(value);
31
- isArray = true;
32
- }
33
-
34
- if (typeof value === "object" || isArray) {
35
- for (const k in value) {
36
- value[k] = transformArray(value[k]);
37
- }
38
- }
39
-
40
- return value;
41
- };
42
-
43
- const plugin = new _StorageTransformPlugin.StorageTransformPlugin({
44
- fieldType: "rich-text",
45
- fromStorage: async ({
46
- field,
47
- value: storageValue
48
- }) => {
49
- if (!storageValue) {
50
- return storageValue;
51
- } else if (typeof storageValue !== "object") {
52
- throw new _error.default(`RichText value received in "fromStorage" function is not an object in field "${field.fieldId}".`);
53
- }
54
- /**
55
- * This is to circumvent a bug introduced with 5.8.0 storage operations.
56
- * Do not remove.
57
- */
58
-
59
-
60
- if (storageValue.hasOwnProperty("compression") === false) {
61
- return storageValue;
62
- }
63
-
64
- const {
65
- compression,
66
- value
67
- } = storageValue;
68
-
69
- if (!compression) {
70
- throw new _error.default(`Missing compression in "fromStorage" function in field "${field.fieldId}": ${JSON.stringify(storageValue)}.`, "MISSING_COMPRESSION", {
71
- value: storageValue
72
- });
73
- }
74
-
75
- if (compression !== "jsonpack") {
76
- throw new _error.default(`This plugin cannot transform something not packed with "jsonpack".`, "WRONG_COMPRESSION", {
77
- compression
78
- });
79
- }
80
-
81
- try {
82
- return _jsonpack.default.unpack(value);
83
- } catch {
84
- return null;
85
- }
86
- },
87
- toStorage: async ({
88
- value
89
- }) => {
90
- /**
91
- * There is a possibility that we are trying to compress already compressed value.
92
- * Introduced a bug with 5.8.0 storage operations, so just return the value to correct it.
93
- */
94
- if (value && value.hasOwnProperty("compression") === true) {
95
- return value;
96
- }
97
-
98
- value = transformArray(value);
99
- return {
100
- compression: "jsonpack",
101
- value: value ? _jsonpack.default.pack(value) : value
102
- };
103
- }
104
- });
105
-
106
- var _default = () => {
107
- return plugin;
108
- };
109
-
110
- exports.default = _default;
@@ -1,3 +0,0 @@
1
- import { CmsFieldFilterValueTransformPlugin } from "../../types";
2
- declare const _default: () => CmsFieldFilterValueTransformPlugin;
3
- export default _default;
@@ -1,47 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _TimeTransformPlugin = require("@webiny/db-dynamodb/plugins/definitions/TimeTransformPlugin");
9
-
10
- var _DateTimeTransformPlugin = require("@webiny/db-dynamodb/plugins/definitions/DateTimeTransformPlugin");
11
-
12
- const timeTransformer = new _TimeTransformPlugin.TimeTransformPlugin({
13
- fields: ["*"]
14
- });
15
- const dateTimeTransformer = new _DateTimeTransformPlugin.DateTimeTransformPlugin({
16
- fields: ["*"]
17
- });
18
-
19
- var _default = () => ({
20
- type: "cms-field-filter-value-transform",
21
- name: "cms-field-value-filter-transform-datetime",
22
- fieldType: "datetime",
23
-
24
- /**
25
- * Always transform into the milliseconds.
26
- */
27
- transform: ({
28
- field,
29
- value
30
- }) => {
31
- const {
32
- type
33
- } = field.settings || {};
34
-
35
- if (type === "time") {
36
- return timeTransformer.transform({
37
- value
38
- });
39
- }
40
-
41
- return dateTimeTransformer.transform({
42
- value
43
- });
44
- }
45
- });
46
-
47
- exports.default = _default;
@@ -1,8 +0,0 @@
1
- import { CmsEntryStorageOperations } from "@webiny/api-headless-cms/types";
2
- import { Entity } from "dynamodb-toolbox";
3
- import { PluginsContainer } from "@webiny/plugins";
4
- export interface Params {
5
- entity: Entity<any>;
6
- plugins: PluginsContainer;
7
- }
8
- export declare const createEntriesStorageOperations: (params: Params) => CmsEntryStorageOperations;