@webiny/api-headless-cms-ddb 0.0.0-unstable.b14eaecf38 → 0.0.0-unstable.b6d7105cee

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 (165) hide show
  1. package/README.md +6 -20
  2. package/definitions/entry.d.ts +4 -5
  3. package/definitions/entry.js +10 -93
  4. package/definitions/entry.js.map +1 -1
  5. package/definitions/group.d.ts +4 -5
  6. package/definitions/group.js +10 -64
  7. package/definitions/group.js.map +1 -1
  8. package/definitions/model.d.ts +4 -5
  9. package/definitions/model.js +10 -108
  10. package/definitions/model.js.map +1 -1
  11. package/definitions/table.d.ts +4 -6
  12. package/definitions/table.js +7 -26
  13. package/definitions/table.js.map +1 -1
  14. package/definitions/types.d.ts +65 -0
  15. package/definitions/types.js +0 -0
  16. package/dynamoDb/index.d.ts +1 -1
  17. package/dynamoDb/index.js +8 -12
  18. package/dynamoDb/index.js.map +1 -1
  19. package/index.d.ts +2 -3
  20. package/index.js +87 -128
  21. package/index.js.map +1 -1
  22. package/operations/entry/dataLoader/DataLoaderCache.d.ts +16 -0
  23. package/operations/entry/dataLoader/DataLoaderCache.js +27 -0
  24. package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -0
  25. package/operations/entry/dataLoader/constants.d.ts +1 -0
  26. package/operations/entry/dataLoader/constants.js +5 -0
  27. package/operations/entry/dataLoader/constants.js.map +1 -0
  28. package/operations/entry/dataLoader/createBatchScheduleFn.d.ts +8 -0
  29. package/operations/entry/dataLoader/createBatchScheduleFn.js +10 -0
  30. package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -0
  31. package/operations/entry/dataLoader/getAllEntryRevisions.d.ts +4 -0
  32. package/operations/entry/dataLoader/getAllEntryRevisions.js +24 -0
  33. package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -0
  34. package/operations/entry/dataLoader/getLatestRevisionByEntryId.d.ts +4 -0
  35. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +40 -0
  36. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -0
  37. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.d.ts +4 -0
  38. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +40 -0
  39. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -0
  40. package/operations/entry/dataLoader/getRevisionById.d.ts +4 -0
  41. package/operations/entry/dataLoader/getRevisionById.js +42 -0
  42. package/operations/entry/dataLoader/getRevisionById.js.map +1 -0
  43. package/operations/entry/dataLoader/index.d.ts +8 -0
  44. package/operations/entry/dataLoader/index.js +18 -0
  45. package/operations/entry/dataLoader/index.js.map +1 -0
  46. package/operations/entry/dataLoader/types.d.ts +6 -0
  47. package/operations/entry/dataLoader/types.js +0 -0
  48. package/operations/entry/dataLoaders.d.ts +14 -30
  49. package/operations/entry/dataLoaders.js +84 -272
  50. package/operations/entry/dataLoaders.js.map +1 -1
  51. package/operations/entry/index.d.ts +5 -4
  52. package/operations/entry/index.js +899 -807
  53. package/operations/entry/index.js.map +1 -1
  54. package/operations/entry/keys.d.ts +46 -2
  55. package/operations/entry/keys.js +54 -49
  56. package/operations/entry/keys.js.map +1 -1
  57. package/operations/group/index.d.ts +4 -5
  58. package/operations/group/index.js +117 -158
  59. package/operations/group/index.js.map +1 -1
  60. package/operations/model/index.d.ts +3 -3
  61. package/operations/model/index.js +103 -134
  62. package/operations/model/index.js.map +1 -1
  63. package/package.json +32 -33
  64. package/plugins/index.d.ts +2 -4
  65. package/plugins/index.js +1 -49
  66. package/types.d.ts +25 -41
  67. package/types.js +8 -14
  68. package/types.js.map +1 -1
  69. package/definitions/settings.d.ts +0 -9
  70. package/definitions/settings.js +0 -53
  71. package/definitions/settings.js.map +0 -1
  72. package/definitions/system.d.ts +0 -9
  73. package/definitions/system.js +0 -41
  74. package/definitions/system.js.map +0 -1
  75. package/dynamoDb/path/plainObject.d.ts +0 -2
  76. package/dynamoDb/path/plainObject.js +0 -33
  77. package/dynamoDb/path/plainObject.js.map +0 -1
  78. package/dynamoDb/storage/date.d.ts +0 -3
  79. package/dynamoDb/storage/date.js +0 -91
  80. package/dynamoDb/storage/date.js.map +0 -1
  81. package/dynamoDb/storage/longText.d.ts +0 -10
  82. package/dynamoDb/storage/longText.js +0 -91
  83. package/dynamoDb/storage/longText.js.map +0 -1
  84. package/dynamoDb/storage/richText.d.ts +0 -2
  85. package/dynamoDb/storage/richText.js +0 -95
  86. package/dynamoDb/storage/richText.js.map +0 -1
  87. package/dynamoDb/transformValue/datetime.d.ts +0 -5
  88. package/dynamoDb/transformValue/datetime.js +0 -45
  89. package/dynamoDb/transformValue/datetime.js.map +0 -1
  90. package/operations/entry/filtering/createExpressions.d.ts +0 -26
  91. package/operations/entry/filtering/createExpressions.js +0 -176
  92. package/operations/entry/filtering/createExpressions.js.map +0 -1
  93. package/operations/entry/filtering/createFields.d.ts +0 -14
  94. package/operations/entry/filtering/createFields.js +0 -105
  95. package/operations/entry/filtering/createFields.js.map +0 -1
  96. package/operations/entry/filtering/extractSort.d.ts +0 -17
  97. package/operations/entry/filtering/extractSort.js +0 -67
  98. package/operations/entry/filtering/extractSort.js.map +0 -1
  99. package/operations/entry/filtering/filter.d.ts +0 -15
  100. package/operations/entry/filtering/filter.js +0 -143
  101. package/operations/entry/filtering/filter.js.map +0 -1
  102. package/operations/entry/filtering/fullTextSearch.d.ts +0 -14
  103. package/operations/entry/filtering/fullTextSearch.js +0 -48
  104. package/operations/entry/filtering/fullTextSearch.js.map +0 -1
  105. package/operations/entry/filtering/getValue.d.ts +0 -5
  106. package/operations/entry/filtering/getValue.js +0 -63
  107. package/operations/entry/filtering/getValue.js.map +0 -1
  108. package/operations/entry/filtering/index.d.ts +0 -2
  109. package/operations/entry/filtering/index.js +0 -19
  110. package/operations/entry/filtering/index.js.map +0 -1
  111. package/operations/entry/filtering/mapPlugins.d.ts +0 -8
  112. package/operations/entry/filtering/mapPlugins.js +0 -31
  113. package/operations/entry/filtering/mapPlugins.js.map +0 -1
  114. package/operations/entry/filtering/plugins/defaultFilterCreate.d.ts +0 -2
  115. package/operations/entry/filtering/plugins/defaultFilterCreate.js +0 -41
  116. package/operations/entry/filtering/plugins/defaultFilterCreate.js.map +0 -1
  117. package/operations/entry/filtering/plugins/index.d.ts +0 -1
  118. package/operations/entry/filtering/plugins/index.js +0 -13
  119. package/operations/entry/filtering/plugins/index.js.map +0 -1
  120. package/operations/entry/filtering/plugins/objectFilterCreate.d.ts +0 -2
  121. package/operations/entry/filtering/plugins/objectFilterCreate.js +0 -86
  122. package/operations/entry/filtering/plugins/objectFilterCreate.js.map +0 -1
  123. package/operations/entry/filtering/plugins/refFilterCreate.d.ts +0 -2
  124. package/operations/entry/filtering/plugins/refFilterCreate.js +0 -71
  125. package/operations/entry/filtering/plugins/refFilterCreate.js.map +0 -1
  126. package/operations/entry/filtering/sort.d.ts +0 -12
  127. package/operations/entry/filtering/sort.js +0 -69
  128. package/operations/entry/filtering/sort.js.map +0 -1
  129. package/operations/entry/filtering/systemFields.d.ts +0 -4
  130. package/operations/entry/filtering/systemFields.js +0 -70
  131. package/operations/entry/filtering/systemFields.js.map +0 -1
  132. package/operations/entry/filtering/transform.d.ts +0 -6
  133. package/operations/entry/filtering/transform.js +0 -16
  134. package/operations/entry/filtering/transform.js.map +0 -1
  135. package/operations/entry/filtering/types.d.ts +0 -40
  136. package/operations/entry/filtering/types.js +0 -5
  137. package/operations/entry/filtering/types.js.map +0 -1
  138. package/operations/entry/filtering/values.d.ts +0 -2
  139. package/operations/entry/filtering/values.js +0 -22
  140. package/operations/entry/filtering/values.js.map +0 -1
  141. package/operations/entry/filtering/where.d.ts +0 -5
  142. package/operations/entry/filtering/where.js +0 -32
  143. package/operations/entry/filtering/where.js.map +0 -1
  144. package/operations/entry/systemFields.d.ts +0 -2
  145. package/operations/entry/systemFields.js +0 -72
  146. package/operations/entry/systemFields.js.map +0 -1
  147. package/operations/settings/index.d.ts +0 -7
  148. package/operations/settings/index.js +0 -111
  149. package/operations/settings/index.js.map +0 -1
  150. package/operations/system/index.d.ts +0 -7
  151. package/operations/system/index.js +0 -82
  152. package/operations/system/index.js.map +0 -1
  153. package/plugins/CmsEntryFieldFilterPathPlugin.d.ts +0 -22
  154. package/plugins/CmsEntryFieldFilterPathPlugin.js +0 -41
  155. package/plugins/CmsEntryFieldFilterPathPlugin.js.map +0 -1
  156. package/plugins/CmsEntryFieldFilterPlugin.d.ts +0 -43
  157. package/plugins/CmsEntryFieldFilterPlugin.js +0 -24
  158. package/plugins/CmsEntryFieldFilterPlugin.js.map +0 -1
  159. package/plugins/CmsEntryFieldSortingPlugin.d.ts +0 -42
  160. package/plugins/CmsEntryFieldSortingPlugin.js +0 -28
  161. package/plugins/CmsEntryFieldSortingPlugin.js.map +0 -1
  162. package/plugins/CmsFieldFilterValueTransformPlugin.d.ts +0 -11
  163. package/plugins/CmsFieldFilterValueTransformPlugin.js +0 -24
  164. package/plugins/CmsFieldFilterValueTransformPlugin.js.map +0 -1
  165. package/plugins/index.js.map +0 -1
package/README.md CHANGED
@@ -1,25 +1,11 @@
1
1
  # @webiny/api-headless-cms-ddb
2
2
 
3
- [![](https://img.shields.io/npm/dw/@webiny/api-headless-cms-ddb.svg)](https://www.npmjs.com/package/@webiny/api-headless-cms-ddb)
4
- [![](https://img.shields.io/npm/v/@webiny/api-headless-cms-ddb.svg)](https://www.npmjs.com/package/@webiny/api-headless-cms-ddb)
5
- [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
6
- [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
3
+ > [!NOTE]
4
+ > This package is part of the [Webiny](https://www.webiny.com) monorepo.
5
+ > It’s **included in every Webiny project by default** and is not meant to be used as a standalone package.
7
6
 
8
- ## Install
7
+ 📘 **Documentation:** [https://www.webiny.com/docs](https://www.webiny.com/docs)
9
8
 
10
- ```
11
- npm install --save @webiny/api-headless-cms-ddb
12
- ```
9
+ ---
13
10
 
14
- Or if you prefer yarn:
15
-
16
- ```
17
- yarn add @webiny/api-headless-cms-ddb
18
- ```
19
-
20
- ## Testing
21
- To run the tests only for this package you must filter it with keywords.
22
- ### Command
23
- ````
24
- yarn test packages/api-headless-cms --keyword=cms:ddb --keyword=cms:base
25
- ````
11
+ _This README file is automatically generated during the publish process._
@@ -1,9 +1,8 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
1
+ import { type ITable } from "@webiny/db-dynamodb";
2
+ import type { IEntryEntity } from "./types.js";
3
3
  interface Params {
4
- table: Table;
4
+ table: ITable;
5
5
  entityName: string;
6
- attributes: Attributes;
7
6
  }
8
- export declare const createEntryEntity: (params: Params) => Entity<any>;
7
+ export declare const createEntryEntity: (params: Params) => IEntryEntity;
9
8
  export {};
@@ -1,94 +1,11 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.createEntryEntity = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
- var _dynamodbToolbox = require("dynamodb-toolbox");
10
- const createEntryEntity = params => {
11
- const {
12
- table,
13
- entityName,
14
- attributes
15
- } = params;
16
- return new _dynamodbToolbox.Entity({
17
- name: entityName,
18
- table,
19
- attributes: (0, _objectSpread2.default)({
20
- PK: {
21
- type: "string",
22
- partitionKey: true
23
- },
24
- SK: {
25
- type: "string",
26
- sortKey: true
27
- },
28
- GSI1_PK: {
29
- type: "string"
30
- },
31
- GSI1_SK: {
32
- type: "string"
33
- },
34
- TYPE: {
35
- type: "string"
36
- },
37
- __type: {
38
- type: "string"
39
- },
40
- webinyVersion: {
41
- type: "string"
42
- },
43
- tenant: {
44
- type: "string"
45
- },
46
- entryId: {
47
- type: "string"
48
- },
49
- id: {
50
- type: "string"
51
- },
52
- createdBy: {
53
- type: "map"
54
- },
55
- ownedBy: {
56
- type: "map"
57
- },
58
- modifiedBy: {
59
- type: "map"
60
- },
61
- createdOn: {
62
- type: "string"
63
- },
64
- savedOn: {
65
- type: "string"
66
- },
67
- modelId: {
68
- type: "string"
69
- },
70
- locale: {
71
- type: "string"
72
- },
73
- publishedOn: {
74
- type: "string"
75
- },
76
- version: {
77
- type: "number"
78
- },
79
- locked: {
80
- type: "boolean"
81
- },
82
- status: {
83
- type: "string"
84
- },
85
- values: {
86
- type: "map"
87
- },
88
- meta: {
89
- type: "map"
90
- }
91
- }, attributes || {})
92
- });
1
+ import { createStandardEntity } from "@webiny/db-dynamodb";
2
+ const createEntryEntity = (params)=>{
3
+ const { table, entityName } = params;
4
+ return createStandardEntity({
5
+ name: entityName,
6
+ table: table.table
7
+ });
93
8
  };
94
- exports.createEntryEntity = createEntryEntity;
9
+ export { createEntryEntity };
10
+
11
+ //# sourceMappingURL=entry.js.map
@@ -1 +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
+ {"version":3,"file":"definitions/entry.js","sources":["../../src/definitions/entry.ts"],"sourcesContent":["import { createStandardEntity, type ITable } from \"@webiny/db-dynamodb\";\nimport type { IEntryEntity, IEntryEntityAttributesData } from \"./types.js\";\n\ninterface Params {\n table: ITable;\n entityName: string;\n}\n\nexport const createEntryEntity = (params: Params): IEntryEntity => {\n const { table, entityName } = params;\n return createStandardEntity<IEntryEntityAttributesData>({\n name: entityName,\n table: table.table\n });\n};\n"],"names":["createEntryEntity","params","table","entityName","createStandardEntity"],"mappings":";AAQO,MAAMA,oBAAoB,CAACC;IAC9B,MAAM,EAAEC,KAAK,EAAEC,UAAU,EAAE,GAAGF;IAC9B,OAAOG,qBAAiD;QACpD,MAAMD;QACN,OAAOD,MAAM,KAAK;IACtB;AACJ"}
@@ -1,9 +1,8 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
1
+ import { type ITable } from "@webiny/db-dynamodb";
2
+ import type { IGroupEntity } from "./types.js";
3
3
  interface Params {
4
- table: Table;
4
+ table: ITable;
5
5
  entityName: string;
6
- attributes: Attributes;
7
6
  }
8
- export declare const createGroupEntity: (params: Params) => Entity<any>;
7
+ export declare const createGroupEntity: (params: Params) => IGroupEntity;
9
8
  export {};
@@ -1,65 +1,11 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.createGroupEntity = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
- var _dynamodbToolbox = require("dynamodb-toolbox");
10
- const createGroupEntity = params => {
11
- const {
12
- table,
13
- attributes,
14
- entityName
15
- } = params;
16
- return new _dynamodbToolbox.Entity({
17
- name: entityName,
18
- table,
19
- attributes: (0, _objectSpread2.default)({
20
- PK: {
21
- partitionKey: true
22
- },
23
- SK: {
24
- sortKey: true
25
- },
26
- TYPE: {
27
- type: "string"
28
- },
29
- webinyVersion: {
30
- type: "string"
31
- },
32
- id: {
33
- type: "string"
34
- },
35
- name: {
36
- type: "string"
37
- },
38
- slug: {
39
- type: "string"
40
- },
41
- locale: {
42
- type: "string"
43
- },
44
- description: {
45
- type: "string"
46
- },
47
- icon: {
48
- type: "string"
49
- },
50
- createdBy: {
51
- type: "map"
52
- },
53
- createdOn: {
54
- type: "string"
55
- },
56
- savedOn: {
57
- type: "string"
58
- },
59
- tenant: {
60
- type: "string"
61
- }
62
- }, attributes || {})
63
- });
1
+ import { createStandardEntity } from "@webiny/db-dynamodb";
2
+ const createGroupEntity = (params)=>{
3
+ const { table, entityName } = params;
4
+ return createStandardEntity({
5
+ table: table.table,
6
+ name: entityName
7
+ });
64
8
  };
65
- exports.createGroupEntity = createGroupEntity;
9
+ export { createGroupEntity };
10
+
11
+ //# sourceMappingURL=group.js.map
@@ -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\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
+ {"version":3,"file":"definitions/group.js","sources":["../../src/definitions/group.ts"],"sourcesContent":["import { createStandardEntity, type ITable } from \"@webiny/db-dynamodb\";\nimport type { IGroupEntity } from \"./types.js\";\nimport type { CmsGroup } from \"@webiny/api-headless-cms/types/index.js\";\n\ninterface Params {\n table: ITable;\n entityName: string;\n}\n\nexport const createGroupEntity = (params: Params): IGroupEntity => {\n const { table, entityName } = params;\n return createStandardEntity<CmsGroup>({\n table: table.table,\n name: entityName\n });\n};\n"],"names":["createGroupEntity","params","table","entityName","createStandardEntity"],"mappings":";AASO,MAAMA,oBAAoB,CAACC;IAC9B,MAAM,EAAEC,KAAK,EAAEC,UAAU,EAAE,GAAGF;IAC9B,OAAOG,qBAA+B;QAClC,OAAOF,MAAM,KAAK;QAClB,MAAMC;IACV;AACJ"}
@@ -1,9 +1,8 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
1
+ import { type ITable } from "@webiny/db-dynamodb";
2
+ import type { IModelEntity } from "./types.js";
3
3
  interface Params {
4
- table: Table;
4
+ table: ITable;
5
5
  entityName: string;
6
- attributes: Attributes;
7
6
  }
8
- export declare const createModelEntity: (params: Params) => Entity<any>;
7
+ export declare const createModelEntity: (params: Params) => IModelEntity;
9
8
  export {};
@@ -1,109 +1,11 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.createModelEntity = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
- var _dynamodbToolbox = require("dynamodb-toolbox");
10
- const createModelEntity = params => {
11
- const {
12
- table,
13
- attributes,
14
- entityName
15
- } = params;
16
- return new _dynamodbToolbox.Entity({
17
- name: entityName,
18
- table,
19
- attributes: (0, _objectSpread2.default)({
20
- PK: {
21
- partitionKey: true
22
- },
23
- SK: {
24
- sortKey: true
25
- },
26
- TYPE: {
27
- type: "string",
28
- required: true
29
- },
30
- webinyVersion: {
31
- type: "string",
32
- required: true
33
- },
34
- name: {
35
- type: "string",
36
- required: true
37
- },
38
- modelId: {
39
- type: "string",
40
- required: true
41
- },
42
- singularApiName: {
43
- type: "string",
44
- required: true
45
- },
46
- pluralApiName: {
47
- type: "string",
48
- required: true
49
- },
50
- locale: {
51
- type: "string",
52
- required: true
53
- },
54
- group: {
55
- type: "map",
56
- required: true
57
- },
58
- icon: {
59
- type: "string"
60
- },
61
- description: {
62
- type: "string"
63
- },
64
- createdOn: {
65
- type: "string",
66
- required: true
67
- },
68
- savedOn: {
69
- type: "string",
70
- required: true
71
- },
72
- createdBy: {
73
- type: "map",
74
- required: true
75
- },
76
- fields: {
77
- type: "list",
78
- required: true
79
- },
80
- layout: {
81
- type: "list",
82
- required: true
83
- },
84
- tags: {
85
- type: "list",
86
- required: false,
87
- default: []
88
- },
89
- lockedFields: {
90
- type: "list",
91
- required: true
92
- },
93
- titleFieldId: {
94
- type: "string"
95
- },
96
- descriptionFieldId: {
97
- type: "string"
98
- },
99
- imageFieldId: {
100
- type: "string"
101
- },
102
- tenant: {
103
- type: "string",
104
- required: true
105
- }
106
- }, attributes || {})
107
- });
1
+ import { createStandardEntity } from "@webiny/db-dynamodb";
2
+ const createModelEntity = (params)=>{
3
+ const { table, entityName } = params;
4
+ return createStandardEntity({
5
+ table: table.table,
6
+ name: entityName
7
+ });
108
8
  };
109
- exports.createModelEntity = createModelEntity;
9
+ export { createModelEntity };
10
+
11
+ //# sourceMappingURL=model.js.map
@@ -1 +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
+ {"version":3,"file":"definitions/model.js","sources":["../../src/definitions/model.ts"],"sourcesContent":["import { createStandardEntity, type ITable } from \"@webiny/db-dynamodb\";\nimport type { IModelEntity } from \"./types.js\";\nimport type { StorageCmsModel } from \"@webiny/api-headless-cms/types/index.js\";\n\ninterface Params {\n table: ITable;\n entityName: string;\n}\n\nexport const createModelEntity = (params: Params): IModelEntity => {\n const { table, entityName } = params;\n return createStandardEntity<StorageCmsModel>({\n table: table.table,\n name: entityName\n });\n};\n"],"names":["createModelEntity","params","table","entityName","createStandardEntity"],"mappings":";AASO,MAAMA,oBAAoB,CAACC;IAC9B,MAAM,EAAEC,KAAK,EAAEC,UAAU,EAAE,GAAGF;IAC9B,OAAOG,qBAAsC;QACzC,OAAOF,MAAM,KAAK;QAClB,MAAMC;IACV;AACJ"}
@@ -1,9 +1,7 @@
1
- import { TableModifier } from "../types";
2
- import { DocumentClient } from "aws-sdk/clients/dynamodb";
3
- import { Table } from "dynamodb-toolbox";
1
+ import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb/index.js";
4
2
  interface Params {
5
- table?: TableModifier;
6
- documentClient: DocumentClient;
3
+ name?: string;
4
+ documentClient: DynamoDBDocument;
7
5
  }
8
- export declare const createTable: ({ table, documentClient }: Params) => Table;
6
+ export declare const createTable: (params: Params) => import("@webiny/db-dynamodb").ITable<string, "PK", "SK">;
9
7
  export {};
@@ -1,27 +1,8 @@
1
- "use strict";
1
+ import { createTable } from "@webiny/db-dynamodb";
2
+ const table_createTable = (params)=>createTable({
3
+ name: params.name || process.env.DB_TABLE_HEADLESS_CMS || process.env.DB_TABLE,
4
+ documentClient: params.documentClient
5
+ });
6
+ export { table_createTable as createTable };
2
7
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createTable = void 0;
7
- var _dynamodbToolbox = require("dynamodb-toolbox");
8
- const createTable = ({
9
- table,
10
- documentClient
11
- }) => {
12
- const tableConfig = {
13
- name: process.env.DB_TABLE_HEADLESS_CMS || process.env.DB_TABLE,
14
- partitionKey: "PK",
15
- sortKey: "SK",
16
- DocumentClient: documentClient,
17
- indexes: {
18
- GSI1: {
19
- partitionKey: "GSI1_PK",
20
- sortKey: "GSI1_SK"
21
- }
22
- }
23
- };
24
- const config = typeof table === "function" ? table(tableConfig) : tableConfig;
25
- return new _dynamodbToolbox.Table(config);
26
- };
27
- exports.createTable = createTable;
8
+ //# sourceMappingURL=table.js.map
@@ -1 +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
+ {"version":3,"file":"definitions/table.js","sources":["../../src/definitions/table.ts"],"sourcesContent":["import { createTable as baseCreateTable } from \"@webiny/db-dynamodb\";\nimport type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\n\ninterface Params {\n name?: string;\n documentClient: DynamoDBDocument;\n}\n\nexport const createTable = (params: Params) => {\n return baseCreateTable({\n name: params.name || process.env.DB_TABLE_HEADLESS_CMS || (process.env.DB_TABLE as string),\n documentClient: params.documentClient\n });\n};\n"],"names":["createTable","params","baseCreateTable","process"],"mappings":";AAQO,MAAMA,oBAAc,CAACC,SACjBC,YAAgB;QACnB,MAAMD,OAAO,IAAI,IAAIE,QAAQ,GAAG,CAAC,qBAAqB,IAAKA,QAAQ,GAAG,CAAC,QAAQ;QAC/E,gBAAgBF,OAAO,cAAc;IACzC"}
@@ -0,0 +1,65 @@
1
+ import type { IEntity, IStandardEntityAttributes } from "@webiny/db-dynamodb";
2
+ import type { GenericRecord } from "@webiny/api/types.js";
3
+ import type { CmsEntryStatus, CmsGroup, CmsIdentity, ICmsEntryLive, ICmsEntryLocation, ICmsEntrySystem, StorageCmsModel } from "@webiny/api-headless-cms/types/index.js";
4
+ export interface IEntryEntityAttributesData {
5
+ id: string;
6
+ entryId: string;
7
+ modelId: string;
8
+ tenant: string;
9
+ /**
10
+ * Revision-level meta fields. 👇
11
+ */
12
+ revisionCreatedOn: string;
13
+ revisionModifiedOn: string | null;
14
+ revisionSavedOn: string;
15
+ revisionDeletedOn: string | null;
16
+ revisionRestoredOn: string | null;
17
+ revisionFirstPublishedOn: string | null;
18
+ revisionLastPublishedOn: string | null;
19
+ revisionCreatedBy: CmsIdentity;
20
+ revisionModifiedBy: CmsIdentity | null;
21
+ revisionSavedBy: CmsIdentity;
22
+ revisionDeletedBy: CmsIdentity | null;
23
+ revisionRestoredBy: CmsIdentity | null;
24
+ revisionFirstPublishedBy: CmsIdentity | null;
25
+ revisionLastPublishedBy: CmsIdentity | null;
26
+ /**
27
+ * Entry-level meta fields. 👇
28
+ */
29
+ createdOn: string;
30
+ modifiedOn: string | null;
31
+ savedOn: string;
32
+ deletedOn: string | null;
33
+ restoredOn: string | null;
34
+ firstPublishedOn: string | null;
35
+ lastPublishedOn: string | null;
36
+ createdBy: CmsIdentity;
37
+ modifiedBy: CmsIdentity | null;
38
+ savedBy: CmsIdentity;
39
+ deletedBy: CmsIdentity | null;
40
+ restoredBy: CmsIdentity | null;
41
+ firstPublishedBy: CmsIdentity | null;
42
+ lastPublishedBy: CmsIdentity | null;
43
+ /**
44
+ * The rest. 👇
45
+ */
46
+ version: number;
47
+ locked: boolean;
48
+ status: CmsEntryStatus;
49
+ location?: ICmsEntryLocation;
50
+ wbyDeleted?: boolean | null;
51
+ binOriginalFolderId?: string;
52
+ values: GenericRecord;
53
+ meta?: GenericRecord;
54
+ system?: ICmsEntrySystem;
55
+ live: ICmsEntryLive | null;
56
+ revisionDescription: string | undefined;
57
+ /**
58
+ * A timestamp of when the entry should be automatically deleted from the database.
59
+ */
60
+ expiresAt: number | null;
61
+ }
62
+ export type IEntryEntityAttributes = IStandardEntityAttributes<IEntryEntityAttributesData>;
63
+ export type IModelEntity = IEntity<IStandardEntityAttributes<StorageCmsModel>>;
64
+ export type IGroupEntity = IEntity<IStandardEntityAttributes<CmsGroup>>;
65
+ export type IEntryEntity = IEntity<IEntryEntityAttributes>;
File without changes
@@ -1,2 +1,2 @@
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
1
  export default _default;
2
+ declare function _default(): (import("@webiny/api-headless-cms-storage").CmsEntryFieldFilterPathPlugin | import("@webiny/api-headless-cms-storage").CmsFieldFilterValueTransformPlugin)[];
package/dynamoDb/index.js CHANGED
@@ -1,13 +1,9 @@
1
- "use strict";
1
+ import { createDatetimeTransformValuePlugin, createLocationFolderIdPathPlugin, createPlainObjectPathPlugin } from "@webiny/api-headless-cms-storage";
2
+ const dynamoDb = ()=>[
3
+ createPlainObjectPathPlugin(),
4
+ createLocationFolderIdPathPlugin(),
5
+ createDatetimeTransformValuePlugin()
6
+ ];
7
+ export default dynamoDb;
2
8
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
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)()];
13
- exports.default = _default;
9
+ //# sourceMappingURL=index.js.map
@@ -1 +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
+ {"version":3,"file":"dynamoDb/index.js","sources":["../../src/dynamoDb/index.ts"],"sourcesContent":["import { createPlainObjectPathPlugin } from \"@webiny/api-headless-cms-storage\";\nimport { createLocationFolderIdPathPlugin } from \"@webiny/api-headless-cms-storage\";\nimport { createDatetimeTransformValuePlugin } from \"@webiny/api-headless-cms-storage\";\n\nexport default () => [\n createPlainObjectPathPlugin(),\n createLocationFolderIdPathPlugin(),\n createDatetimeTransformValuePlugin()\n];\n"],"names":["createPlainObjectPathPlugin","createLocationFolderIdPathPlugin","createDatetimeTransformValuePlugin"],"mappings":";AAIA,iBAAgB,IAAK;QACjBA;QACAC;QACAC;KACJ"}
package/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- import { StorageOperationsFactory } from "./types";
2
- export * from "./plugins";
3
- export declare const createStorageOperations: StorageOperationsFactory;
1
+ export * from "./plugins/index.js";
2
+ export declare const registerDynamoDbStorageOperations: () => import("@webiny/handler").RegisterExtensionPlugin<import("@webiny/handler/types.js").Context>[];