@webiny/api-headless-cms-ddb 0.0.0-unstable.8c4d9f045a → 0.0.0-unstable.9609e4e0c9
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.
- package/README.md +6 -20
- package/abstractions/CmsDdbDataLoaders.d.ts +5 -0
- package/abstractions/CmsDdbDataLoaders.js +5 -0
- package/abstractions/CmsDdbDataLoaders.js.map +1 -0
- package/abstractions/CmsDdbEntryEntity.d.ts +5 -0
- package/abstractions/CmsDdbEntryEntity.js +5 -0
- package/abstractions/CmsDdbEntryEntity.js.map +1 -0
- package/abstractions/CmsDdbGroupEntity.d.ts +5 -0
- package/abstractions/CmsDdbGroupEntity.js +5 -0
- package/abstractions/CmsDdbGroupEntity.js.map +1 -0
- package/abstractions/CmsDdbModelEntity.d.ts +5 -0
- package/abstractions/CmsDdbModelEntity.js +5 -0
- package/abstractions/CmsDdbModelEntity.js.map +1 -0
- package/abstractions/CmsDdbTable.d.ts +5 -0
- package/abstractions/CmsDdbTable.js +5 -0
- package/abstractions/CmsDdbTable.js.map +1 -0
- package/definitions/entry.d.ts +4 -5
- package/definitions/entry.js +9 -98
- package/definitions/entry.js.map +1 -1
- package/definitions/group.d.ts +4 -5
- package/definitions/group.js +9 -72
- package/definitions/group.js.map +1 -1
- package/definitions/model.d.ts +4 -5
- package/definitions/model.js +9 -94
- package/definitions/model.js.map +1 -1
- package/definitions/table.d.ts +4 -6
- package/definitions/table.js +8 -30
- package/definitions/table.js.map +1 -1
- package/definitions/types.d.ts +65 -0
- package/definitions/types.js +0 -0
- package/index.d.ts +10 -2
- package/index.js +45 -124
- package/index.js.map +1 -1
- package/operations/entry/DdbCreateEntry.d.ts +16 -0
- package/operations/entry/DdbCreateEntry.js +77 -0
- package/operations/entry/DdbCreateEntry.js.map +1 -0
- package/operations/entry/DdbCreateEntryRevisionFrom.d.ts +16 -0
- package/operations/entry/DdbCreateEntryRevisionFrom.js +85 -0
- package/operations/entry/DdbCreateEntryRevisionFrom.js.map +1 -0
- package/operations/entry/DdbDeleteEntry.d.ts +16 -0
- package/operations/entry/DdbDeleteEntry.js +65 -0
- package/operations/entry/DdbDeleteEntry.js.map +1 -0
- package/operations/entry/DdbDeleteEntryRevision.d.ts +17 -0
- package/operations/entry/DdbDeleteEntryRevision.js +91 -0
- package/operations/entry/DdbDeleteEntryRevision.js.map +1 -0
- package/operations/entry/DdbDeleteMultipleEntries.d.ts +16 -0
- package/operations/entry/DdbDeleteMultipleEntries.js +59 -0
- package/operations/entry/DdbDeleteMultipleEntries.js.map +1 -0
- package/operations/entry/DdbGetEntriesByIds.d.ts +14 -0
- package/operations/entry/DdbGetEntriesByIds.js +31 -0
- package/operations/entry/DdbGetEntriesByIds.js.map +1 -0
- package/operations/entry/DdbGetEntry.d.ts +14 -0
- package/operations/entry/DdbGetEntry.js +27 -0
- package/operations/entry/DdbGetEntry.js.map +1 -0
- package/operations/entry/DdbGetLatestEntriesByIds.d.ts +14 -0
- package/operations/entry/DdbGetLatestEntriesByIds.js +31 -0
- package/operations/entry/DdbGetLatestEntriesByIds.js.map +1 -0
- package/operations/entry/DdbGetLatestRevisionByEntryId.d.ts +14 -0
- package/operations/entry/DdbGetLatestRevisionByEntryId.js +35 -0
- package/operations/entry/DdbGetLatestRevisionByEntryId.js.map +1 -0
- package/operations/entry/DdbGetPreviousRevision.d.ts +14 -0
- package/operations/entry/DdbGetPreviousRevision.js +53 -0
- package/operations/entry/DdbGetPreviousRevision.js.map +1 -0
- package/operations/entry/DdbGetPublishedEntriesByIds.d.ts +14 -0
- package/operations/entry/DdbGetPublishedEntriesByIds.js +31 -0
- package/operations/entry/DdbGetPublishedEntriesByIds.js.map +1 -0
- package/operations/entry/DdbGetPublishedRevisionByEntryId.d.ts +14 -0
- package/operations/entry/DdbGetPublishedRevisionByEntryId.js +35 -0
- package/operations/entry/DdbGetPublishedRevisionByEntryId.js.map +1 -0
- package/operations/entry/DdbGetRevisionById.d.ts +14 -0
- package/operations/entry/DdbGetRevisionById.js +34 -0
- package/operations/entry/DdbGetRevisionById.js.map +1 -0
- package/operations/entry/DdbGetRevisions.d.ts +14 -0
- package/operations/entry/DdbGetRevisions.js +33 -0
- package/operations/entry/DdbGetRevisions.js.map +1 -0
- package/operations/entry/DdbGetUniqueFieldValues.d.ts +12 -0
- package/operations/entry/DdbGetUniqueFieldValues.js +31 -0
- package/operations/entry/DdbGetUniqueFieldValues.js.map +1 -0
- package/operations/entry/DdbListEntries.d.ts +30 -0
- package/operations/entry/DdbListEntries.js +133 -0
- package/operations/entry/DdbListEntries.js.map +1 -0
- package/operations/entry/DdbMoveEntry.d.ts +16 -0
- package/operations/entry/DdbMoveEntry.js +63 -0
- package/operations/entry/DdbMoveEntry.js.map +1 -0
- package/operations/entry/DdbMoveToBin.d.ts +16 -0
- package/operations/entry/DdbMoveToBin.js +77 -0
- package/operations/entry/DdbMoveToBin.js.map +1 -0
- package/operations/entry/DdbPublishEntry.d.ts +18 -0
- package/operations/entry/DdbPublishEntry.js +162 -0
- package/operations/entry/DdbPublishEntry.js.map +1 -0
- package/operations/entry/DdbRestoreFromBin.d.ts +16 -0
- package/operations/entry/DdbRestoreFromBin.js +78 -0
- package/operations/entry/DdbRestoreFromBin.js.map +1 -0
- package/operations/entry/DdbUnpublishEntry.d.ts +17 -0
- package/operations/entry/DdbUnpublishEntry.js +112 -0
- package/operations/entry/DdbUnpublishEntry.js.map +1 -0
- package/operations/entry/DdbUpdateEntry.d.ts +17 -0
- package/operations/entry/DdbUpdateEntry.js +105 -0
- package/operations/entry/DdbUpdateEntry.js.map +1 -0
- package/operations/entry/dataLoader/DataLoaderCache.d.ts +16 -0
- package/operations/entry/dataLoader/DataLoaderCache.js +27 -0
- package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -0
- package/operations/entry/dataLoader/constants.d.ts +1 -0
- package/operations/entry/dataLoader/constants.js +5 -0
- package/operations/entry/dataLoader/constants.js.map +1 -0
- package/operations/entry/dataLoader/createBatchScheduleFn.d.ts +8 -0
- package/operations/entry/dataLoader/createBatchScheduleFn.js +10 -0
- package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -0
- package/operations/entry/dataLoader/getAllEntryRevisions.d.ts +4 -0
- package/operations/entry/dataLoader/getAllEntryRevisions.js +24 -0
- package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -0
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.d.ts +4 -0
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +40 -0
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -0
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.d.ts +4 -0
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +40 -0
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -0
- package/operations/entry/dataLoader/getRevisionById.d.ts +4 -0
- package/operations/entry/dataLoader/getRevisionById.js +42 -0
- package/operations/entry/dataLoader/getRevisionById.js.map +1 -0
- package/operations/entry/dataLoader/index.d.ts +8 -0
- package/operations/entry/dataLoader/index.js +18 -0
- package/operations/entry/dataLoader/index.js.map +1 -0
- package/operations/entry/dataLoader/types.d.ts +6 -0
- package/operations/entry/dataLoader/types.js +0 -0
- package/operations/entry/dataLoaders.d.ts +16 -31
- package/operations/entry/dataLoaders.js +91 -316
- package/operations/entry/dataLoaders.js.map +1 -1
- package/operations/entry/feature.d.ts +4 -0
- package/operations/entry/feature.js +55 -0
- package/operations/entry/feature.js.map +1 -0
- package/operations/entry/keys.d.ts +46 -2
- package/operations/entry/keys.js +53 -66
- package/operations/entry/keys.js.map +1 -1
- package/operations/entry/storageEntryUtils.d.ts +8 -0
- package/operations/entry/storageEntryUtils.js +25 -0
- package/operations/entry/storageEntryUtils.js.map +1 -0
- package/operations/group/DdbCreateGroup.d.ts +12 -0
- package/operations/group/DdbCreateGroup.js +35 -0
- package/operations/group/DdbCreateGroup.js.map +1 -0
- package/operations/group/DdbDeleteGroup.d.ts +12 -0
- package/operations/group/DdbDeleteGroup.js +31 -0
- package/operations/group/DdbDeleteGroup.js.map +1 -0
- package/operations/group/DdbGetGroup.d.ts +12 -0
- package/operations/group/DdbGetGroup.js +31 -0
- package/operations/group/DdbGetGroup.js.map +1 -0
- package/operations/group/DdbListGroups.d.ts +14 -0
- package/operations/group/DdbListGroups.js +52 -0
- package/operations/group/DdbListGroups.js.map +1 -0
- package/operations/group/DdbUpdateGroup.d.ts +12 -0
- package/operations/group/DdbUpdateGroup.js +35 -0
- package/operations/group/DdbUpdateGroup.js.map +1 -0
- package/operations/group/feature.d.ts +4 -0
- package/operations/group/feature.js +19 -0
- package/operations/group/feature.js.map +1 -0
- package/operations/group/keys.d.ts +15 -0
- package/operations/group/keys.js +17 -0
- package/operations/group/keys.js.map +1 -0
- package/operations/model/DdbCreateModel.d.ts +12 -0
- package/operations/model/DdbCreateModel.js +37 -0
- package/operations/model/DdbCreateModel.js.map +1 -0
- package/operations/model/DdbDeleteModel.d.ts +12 -0
- package/operations/model/DdbDeleteModel.js +31 -0
- package/operations/model/DdbDeleteModel.js.map +1 -0
- package/operations/model/DdbGetModel.d.ts +12 -0
- package/operations/model/DdbGetModel.js +30 -0
- package/operations/model/DdbGetModel.js.map +1 -0
- package/operations/model/DdbListModels.d.ts +12 -0
- package/operations/model/DdbListModels.js +36 -0
- package/operations/model/DdbListModels.js.map +1 -0
- package/operations/model/DdbUpdateModel.d.ts +12 -0
- package/operations/model/DdbUpdateModel.js +36 -0
- package/operations/model/DdbUpdateModel.js.map +1 -0
- package/operations/model/feature.d.ts +4 -0
- package/operations/model/feature.js +19 -0
- package/operations/model/feature.js.map +1 -0
- package/operations/model/keys.d.ts +15 -0
- package/operations/model/keys.js +16 -0
- package/operations/model/keys.js.map +1 -0
- package/package.json +30 -34
- package/types.d.ts +12 -45
- package/types.js +8 -15
- package/types.js.map +1 -1
- package/definitions/settings.d.ts +0 -9
- package/definitions/settings.js +0 -62
- package/definitions/settings.js.map +0 -1
- package/definitions/system.d.ts +0 -9
- package/definitions/system.js +0 -50
- package/definitions/system.js.map +0 -1
- package/dynamoDb/index.d.ts +0 -2
- package/dynamoDb/index.js +0 -20
- package/dynamoDb/index.js.map +0 -1
- package/dynamoDb/path/plainObject.d.ts +0 -2
- package/dynamoDb/path/plainObject.js +0 -40
- package/dynamoDb/path/plainObject.js.map +0 -1
- package/dynamoDb/storage/date.d.ts +0 -2
- package/dynamoDb/storage/date.js +0 -99
- package/dynamoDb/storage/date.js.map +0 -1
- package/dynamoDb/storage/longText.d.ts +0 -10
- package/dynamoDb/storage/longText.js +0 -101
- package/dynamoDb/storage/longText.js.map +0 -1
- package/dynamoDb/storage/richText.d.ts +0 -2
- package/dynamoDb/storage/richText.js +0 -113
- package/dynamoDb/storage/richText.js.map +0 -1
- package/dynamoDb/transformValue/datetime.d.ts +0 -5
- package/dynamoDb/transformValue/datetime.js +0 -52
- package/dynamoDb/transformValue/datetime.js.map +0 -1
- package/operations/entry/index.d.ts +0 -8
- package/operations/entry/index.js +0 -984
- package/operations/entry/index.js.map +0 -1
- package/operations/entry/systemFields.d.ts +0 -2
- package/operations/entry/systemFields.js +0 -68
- package/operations/entry/systemFields.js.map +0 -1
- package/operations/entry/utils.d.ts +0 -36
- package/operations/entry/utils.js +0 -684
- package/operations/entry/utils.js.map +0 -1
- package/operations/group/index.d.ts +0 -9
- package/operations/group/index.js +0 -196
- package/operations/group/index.js.map +0 -1
- package/operations/model/index.d.ts +0 -7
- package/operations/model/index.js +0 -166
- package/operations/model/index.js.map +0 -1
- package/operations/settings/index.d.ts +0 -7
- package/operations/settings/index.js +0 -139
- package/operations/settings/index.js.map +0 -1
- package/operations/system/index.d.ts +0 -7
- package/operations/system/index.js +0 -103
- package/operations/system/index.js.map +0 -1
- package/plugins/CmsEntryFieldFilterPathPlugin.d.ts +0 -22
- package/plugins/CmsEntryFieldFilterPathPlugin.js +0 -55
- package/plugins/CmsEntryFieldFilterPathPlugin.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,25 +1,11 @@
|
|
|
1
1
|
# @webiny/api-headless-cms-ddb
|
|
2
2
|
|
|
3
|
-
[!
|
|
4
|
-
[
|
|
5
|
-
|
|
6
|
-
[](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
|
-
|
|
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
|
-
|
|
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._
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstractions/CmsDdbDataLoaders.js","sources":["../../src/abstractions/CmsDdbDataLoaders.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { IDataLoadersHandler } from \"~/types.js\";\n\nexport const CmsDdbDataLoaders = createAbstraction<IDataLoadersHandler>(\"Cms/Ddb/DataLoaders\");\n\nexport namespace CmsDdbDataLoaders {\n export type Interface = IDataLoadersHandler;\n}\n"],"names":["CmsDdbDataLoaders","createAbstraction"],"mappings":";AAGO,MAAMA,oBAAoBC,kBAAuC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstractions/CmsDdbEntryEntity.js","sources":["../../src/abstractions/CmsDdbEntryEntity.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { IEntryEntity } from \"~/definitions/types.js\";\n\nexport const CmsDdbEntryEntity = createAbstraction<IEntryEntity>(\"Cms/Ddb/EntryEntity\");\n\nexport namespace CmsDdbEntryEntity {\n export type Interface = IEntryEntity;\n}\n"],"names":["CmsDdbEntryEntity","createAbstraction"],"mappings":";AAGO,MAAMA,oBAAoBC,kBAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstractions/CmsDdbGroupEntity.js","sources":["../../src/abstractions/CmsDdbGroupEntity.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { IGroupEntity } from \"~/definitions/types.js\";\n\nexport const CmsDdbGroupEntity = createAbstraction<IGroupEntity>(\"Cms/Ddb/GroupEntity\");\n\nexport namespace CmsDdbGroupEntity {\n export type Interface = IGroupEntity;\n}\n"],"names":["CmsDdbGroupEntity","createAbstraction"],"mappings":";AAGO,MAAMA,oBAAoBC,kBAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstractions/CmsDdbModelEntity.js","sources":["../../src/abstractions/CmsDdbModelEntity.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { IModelEntity } from \"~/definitions/types.js\";\n\nexport const CmsDdbModelEntity = createAbstraction<IModelEntity>(\"Cms/Ddb/ModelEntity\");\n\nexport namespace CmsDdbModelEntity {\n export type Interface = IModelEntity;\n}\n"],"names":["CmsDdbModelEntity","createAbstraction"],"mappings":";AAGO,MAAMA,oBAAoBC,kBAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstractions/CmsDdbTable.js","sources":["../../src/abstractions/CmsDdbTable.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { ITable } from \"@webiny/db-dynamodb\";\n\nexport const CmsDdbTable = createAbstraction<ITable>(\"Cms/Ddb/Table\");\n\nexport namespace CmsDdbTable {\n export type Interface = ITable;\n}\n"],"names":["CmsDdbTable","createAbstraction"],"mappings":";AAGO,MAAMA,cAAcC,kBAA0B"}
|
package/definitions/entry.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { type ITable } from "@webiny/db-dynamodb";
|
|
2
|
+
import type { IEntryEntity } from "./types.js";
|
|
3
3
|
interface Params {
|
|
4
|
-
table:
|
|
4
|
+
table: ITable;
|
|
5
5
|
entityName: string;
|
|
6
|
-
attributes: Attributes;
|
|
7
6
|
}
|
|
8
|
-
export declare const createEntryEntity: (params: Params) =>
|
|
7
|
+
export declare const createEntryEntity: (params: Params) => IEntryEntity;
|
|
9
8
|
export {};
|
package/definitions/entry.js
CHANGED
|
@@ -1,100 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
exports.createEntryEntity = void 0;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
|
-
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
13
|
-
|
|
14
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
|
-
|
|
18
|
-
const createEntryEntity = params => {
|
|
19
|
-
const {
|
|
20
|
-
table,
|
|
21
|
-
entityName,
|
|
22
|
-
attributes
|
|
23
|
-
} = params;
|
|
24
|
-
return new _dynamodbToolbox.Entity({
|
|
25
|
-
name: entityName,
|
|
26
|
-
table,
|
|
27
|
-
attributes: _objectSpread({
|
|
28
|
-
PK: {
|
|
29
|
-
type: "string",
|
|
30
|
-
partitionKey: true
|
|
31
|
-
},
|
|
32
|
-
SK: {
|
|
33
|
-
type: "string",
|
|
34
|
-
sortKey: true
|
|
35
|
-
},
|
|
36
|
-
GSI1_PK: {
|
|
37
|
-
type: "string"
|
|
38
|
-
},
|
|
39
|
-
GSI1_SK: {
|
|
40
|
-
type: "string"
|
|
41
|
-
},
|
|
42
|
-
TYPE: {
|
|
43
|
-
type: "string"
|
|
44
|
-
},
|
|
45
|
-
__type: {
|
|
46
|
-
type: "string"
|
|
47
|
-
},
|
|
48
|
-
webinyVersion: {
|
|
49
|
-
type: "string"
|
|
50
|
-
},
|
|
51
|
-
tenant: {
|
|
52
|
-
type: "string"
|
|
53
|
-
},
|
|
54
|
-
entryId: {
|
|
55
|
-
type: "string"
|
|
56
|
-
},
|
|
57
|
-
id: {
|
|
58
|
-
type: "string"
|
|
59
|
-
},
|
|
60
|
-
createdBy: {
|
|
61
|
-
type: "map"
|
|
62
|
-
},
|
|
63
|
-
ownedBy: {
|
|
64
|
-
type: "map"
|
|
65
|
-
},
|
|
66
|
-
createdOn: {
|
|
67
|
-
type: "string"
|
|
68
|
-
},
|
|
69
|
-
savedOn: {
|
|
70
|
-
type: "string"
|
|
71
|
-
},
|
|
72
|
-
modelId: {
|
|
73
|
-
type: "string"
|
|
74
|
-
},
|
|
75
|
-
locale: {
|
|
76
|
-
type: "string"
|
|
77
|
-
},
|
|
78
|
-
publishedOn: {
|
|
79
|
-
type: "string"
|
|
80
|
-
},
|
|
81
|
-
version: {
|
|
82
|
-
type: "number"
|
|
83
|
-
},
|
|
84
|
-
locked: {
|
|
85
|
-
type: "boolean"
|
|
86
|
-
},
|
|
87
|
-
status: {
|
|
88
|
-
type: "string"
|
|
89
|
-
},
|
|
90
|
-
values: {
|
|
91
|
-
type: "map"
|
|
92
|
-
},
|
|
93
|
-
meta: {
|
|
94
|
-
type: "map"
|
|
95
|
-
}
|
|
96
|
-
}, attributes || {})
|
|
97
|
-
});
|
|
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
|
+
});
|
|
98
8
|
};
|
|
9
|
+
export { createEntryEntity };
|
|
99
10
|
|
|
100
|
-
|
|
11
|
+
//# sourceMappingURL=entry.js.map
|
package/definitions/entry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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"}
|
package/definitions/group.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { type ITable } from "@webiny/db-dynamodb";
|
|
2
|
+
import type { IGroupEntity } from "./types.js";
|
|
3
3
|
interface Params {
|
|
4
|
-
table:
|
|
4
|
+
table: ITable;
|
|
5
5
|
entityName: string;
|
|
6
|
-
attributes: Attributes;
|
|
7
6
|
}
|
|
8
|
-
export declare const createGroupEntity: (params: Params) =>
|
|
7
|
+
export declare const createGroupEntity: (params: Params) => IGroupEntity;
|
|
9
8
|
export {};
|
package/definitions/group.js
CHANGED
|
@@ -1,74 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
exports.createGroupEntity = void 0;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
|
-
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
13
|
-
|
|
14
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
|
-
|
|
18
|
-
const createGroupEntity = params => {
|
|
19
|
-
const {
|
|
20
|
-
table,
|
|
21
|
-
attributes,
|
|
22
|
-
entityName
|
|
23
|
-
} = params;
|
|
24
|
-
return new _dynamodbToolbox.Entity({
|
|
25
|
-
name: entityName,
|
|
26
|
-
table,
|
|
27
|
-
attributes: _objectSpread({
|
|
28
|
-
PK: {
|
|
29
|
-
partitionKey: true
|
|
30
|
-
},
|
|
31
|
-
SK: {
|
|
32
|
-
sortKey: true
|
|
33
|
-
},
|
|
34
|
-
TYPE: {
|
|
35
|
-
type: "string"
|
|
36
|
-
},
|
|
37
|
-
webinyVersion: {
|
|
38
|
-
type: "string"
|
|
39
|
-
},
|
|
40
|
-
id: {
|
|
41
|
-
type: "string"
|
|
42
|
-
},
|
|
43
|
-
name: {
|
|
44
|
-
type: "string"
|
|
45
|
-
},
|
|
46
|
-
slug: {
|
|
47
|
-
type: "string"
|
|
48
|
-
},
|
|
49
|
-
locale: {
|
|
50
|
-
type: "string"
|
|
51
|
-
},
|
|
52
|
-
description: {
|
|
53
|
-
type: "string"
|
|
54
|
-
},
|
|
55
|
-
icon: {
|
|
56
|
-
type: "string"
|
|
57
|
-
},
|
|
58
|
-
createdBy: {
|
|
59
|
-
type: "map"
|
|
60
|
-
},
|
|
61
|
-
createdOn: {
|
|
62
|
-
type: "string"
|
|
63
|
-
},
|
|
64
|
-
savedOn: {
|
|
65
|
-
type: "string"
|
|
66
|
-
},
|
|
67
|
-
tenant: {
|
|
68
|
-
type: "string"
|
|
69
|
-
}
|
|
70
|
-
}, attributes || {})
|
|
71
|
-
});
|
|
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
|
+
});
|
|
72
8
|
};
|
|
9
|
+
export { createGroupEntity };
|
|
73
10
|
|
|
74
|
-
|
|
11
|
+
//# sourceMappingURL=group.js.map
|
package/definitions/group.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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"}
|
package/definitions/model.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { type ITable } from "@webiny/db-dynamodb";
|
|
2
|
+
import type { IModelEntity } from "./types.js";
|
|
3
3
|
interface Params {
|
|
4
|
-
table:
|
|
4
|
+
table: ITable;
|
|
5
5
|
entityName: string;
|
|
6
|
-
attributes: Attributes;
|
|
7
6
|
}
|
|
8
|
-
export declare const createModelEntity: (params: Params) =>
|
|
7
|
+
export declare const createModelEntity: (params: Params) => IModelEntity;
|
|
9
8
|
export {};
|
package/definitions/model.js
CHANGED
|
@@ -1,96 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
exports.createModelEntity = void 0;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
|
-
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
13
|
-
|
|
14
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
|
-
|
|
18
|
-
const createModelEntity = params => {
|
|
19
|
-
const {
|
|
20
|
-
table,
|
|
21
|
-
attributes,
|
|
22
|
-
entityName
|
|
23
|
-
} = params;
|
|
24
|
-
return new _dynamodbToolbox.Entity({
|
|
25
|
-
name: entityName,
|
|
26
|
-
table,
|
|
27
|
-
attributes: _objectSpread({
|
|
28
|
-
PK: {
|
|
29
|
-
partitionKey: true
|
|
30
|
-
},
|
|
31
|
-
SK: {
|
|
32
|
-
sortKey: true
|
|
33
|
-
},
|
|
34
|
-
TYPE: {
|
|
35
|
-
type: "string",
|
|
36
|
-
required: true
|
|
37
|
-
},
|
|
38
|
-
webinyVersion: {
|
|
39
|
-
type: "string",
|
|
40
|
-
required: true
|
|
41
|
-
},
|
|
42
|
-
name: {
|
|
43
|
-
type: "string",
|
|
44
|
-
required: true
|
|
45
|
-
},
|
|
46
|
-
modelId: {
|
|
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
|
-
description: {
|
|
59
|
-
type: "string"
|
|
60
|
-
},
|
|
61
|
-
createdOn: {
|
|
62
|
-
type: "string",
|
|
63
|
-
required: true
|
|
64
|
-
},
|
|
65
|
-
savedOn: {
|
|
66
|
-
type: "string",
|
|
67
|
-
required: true
|
|
68
|
-
},
|
|
69
|
-
createdBy: {
|
|
70
|
-
type: "map",
|
|
71
|
-
required: true
|
|
72
|
-
},
|
|
73
|
-
fields: {
|
|
74
|
-
type: "list",
|
|
75
|
-
required: true
|
|
76
|
-
},
|
|
77
|
-
layout: {
|
|
78
|
-
type: "list",
|
|
79
|
-
required: true
|
|
80
|
-
},
|
|
81
|
-
lockedFields: {
|
|
82
|
-
type: "list",
|
|
83
|
-
required: true
|
|
84
|
-
},
|
|
85
|
-
titleFieldId: {
|
|
86
|
-
type: "string"
|
|
87
|
-
},
|
|
88
|
-
tenant: {
|
|
89
|
-
type: "string",
|
|
90
|
-
required: true
|
|
91
|
-
}
|
|
92
|
-
}, attributes || {})
|
|
93
|
-
});
|
|
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
|
+
});
|
|
94
8
|
};
|
|
9
|
+
export { createModelEntity };
|
|
95
10
|
|
|
96
|
-
|
|
11
|
+
//# sourceMappingURL=model.js.map
|
package/definitions/model.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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"}
|
package/definitions/table.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
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
|
-
|
|
6
|
-
documentClient:
|
|
3
|
+
name?: string;
|
|
4
|
+
documentClient: DynamoDBDocument;
|
|
7
5
|
}
|
|
8
|
-
export declare const createTable: (
|
|
6
|
+
export declare const createTable: (params: Params) => import("@webiny/db-dynamodb").ITable<string, "PK", "SK">;
|
|
9
7
|
export {};
|
package/definitions/table.js
CHANGED
|
@@ -1,30 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const createTable = ({
|
|
11
|
-
table,
|
|
12
|
-
documentClient
|
|
13
|
-
}) => {
|
|
14
|
-
const tableConfig = {
|
|
15
|
-
name: process.env.DB_TABLE_HEADLESS_CMS || process.env.DB_TABLE,
|
|
16
|
-
partitionKey: "PK",
|
|
17
|
-
sortKey: "SK",
|
|
18
|
-
DocumentClient: documentClient,
|
|
19
|
-
indexes: {
|
|
20
|
-
GSI1: {
|
|
21
|
-
partitionKey: "GSI1_PK",
|
|
22
|
-
sortKey: "GSI1_SK"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
const config = typeof table === "function" ? table(tableConfig) : tableConfig;
|
|
27
|
-
return new _dynamodbToolbox.Table(config);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
exports.createTable = createTable;
|
|
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 };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=table.js.map
|
package/definitions/table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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"}
|