@webiny/api-headless-cms-ddb 0.0.0-unstable.99666aeb00 → 0.0.0-unstable.9bd236cf5e
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/definitions/entry.d.ts +4 -3
- package/definitions/entry.js +104 -13
- package/definitions/entry.js.map +1 -1
- package/definitions/group.d.ts +4 -3
- package/definitions/group.js +9 -8
- package/definitions/group.js.map +1 -1
- package/definitions/model.d.ts +4 -3
- package/definitions/model.js +9 -8
- package/definitions/model.js.map +1 -1
- package/definitions/system.d.ts +4 -3
- package/definitions/system.js +9 -8
- package/definitions/system.js.map +1 -1
- package/definitions/table.d.ts +5 -5
- package/definitions/table.js +8 -4
- package/definitions/table.js.map +1 -1
- package/dynamoDb/index.js +4 -3
- package/dynamoDb/index.js.map +1 -1
- package/dynamoDb/path/locationFolderId.js +4 -2
- package/dynamoDb/path/locationFolderId.js.map +1 -1
- package/dynamoDb/path/plainObject.js +3 -1
- package/dynamoDb/path/plainObject.js.map +1 -1
- package/dynamoDb/storage/longText.js +4 -1
- package/dynamoDb/storage/longText.js.map +1 -1
- package/dynamoDb/storage/richText.js +24 -58
- package/dynamoDb/storage/richText.js.map +1 -1
- package/dynamoDb/transformValue/datetime.d.ts +1 -1
- package/dynamoDb/transformValue/datetime.js +3 -1
- package/dynamoDb/transformValue/datetime.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +5 -12
- package/index.js.map +1 -1
- package/operations/entry/dataLoader/DataLoaderCache.d.ts +1 -1
- package/operations/entry/dataLoader/DataLoaderCache.js +7 -9
- package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -1
- package/operations/entry/dataLoader/constants.js +3 -2
- package/operations/entry/dataLoader/constants.js.map +1 -1
- package/operations/entry/dataLoader/createBatchScheduleFn.js +3 -1
- package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -1
- package/operations/entry/dataLoader/getAllEntryRevisions.d.ts +2 -2
- package/operations/entry/dataLoader/getAllEntryRevisions.js +3 -1
- package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -1
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.d.ts +2 -2
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +5 -6
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -1
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.d.ts +2 -2
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +5 -6
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -1
- package/operations/entry/dataLoader/getRevisionById.d.ts +2 -2
- package/operations/entry/dataLoader/getRevisionById.js +5 -6
- package/operations/entry/dataLoader/getRevisionById.js.map +1 -1
- package/operations/entry/dataLoader/index.d.ts +3 -3
- package/operations/entry/dataLoader/index.js +3 -1
- package/operations/entry/dataLoader/index.js.map +1 -1
- package/operations/entry/dataLoader/types.d.ts +1 -1
- package/operations/entry/dataLoader/types.js +3 -1
- package/operations/entry/dataLoader/types.js.map +1 -1
- package/operations/entry/dataLoaders.d.ts +3 -3
- package/operations/entry/dataLoaders.js +15 -14
- package/operations/entry/dataLoaders.js.map +1 -1
- package/operations/entry/filtering/createExpressions.d.ts +4 -4
- package/operations/entry/filtering/createExpressions.js +3 -1
- package/operations/entry/filtering/createExpressions.js.map +1 -1
- package/operations/entry/filtering/createFields.d.ts +3 -3
- package/operations/entry/filtering/createFields.js +12 -9
- package/operations/entry/filtering/createFields.js.map +1 -1
- package/operations/entry/filtering/extractSort.d.ts +3 -3
- package/operations/entry/filtering/extractSort.js +3 -1
- package/operations/entry/filtering/extractSort.js.map +1 -1
- package/operations/entry/filtering/filter.d.ts +3 -3
- package/operations/entry/filtering/filter.js +24 -9
- package/operations/entry/filtering/filter.js.map +1 -1
- package/operations/entry/filtering/fullTextSearch.d.ts +3 -3
- package/operations/entry/filtering/fullTextSearch.js +3 -1
- package/operations/entry/filtering/fullTextSearch.js.map +1 -1
- package/operations/entry/filtering/getValue.js +6 -3
- package/operations/entry/filtering/getValue.js.map +1 -1
- package/operations/entry/filtering/index.js +3 -1
- package/operations/entry/filtering/index.js.map +1 -1
- package/operations/entry/filtering/mapPlugins.d.ts +2 -2
- package/operations/entry/filtering/mapPlugins.js +3 -1
- package/operations/entry/filtering/mapPlugins.js.map +1 -1
- package/operations/entry/filtering/plugins/defaultFilterCreate.d.ts +1 -1
- package/operations/entry/filtering/plugins/defaultFilterCreate.js +3 -1
- package/operations/entry/filtering/plugins/defaultFilterCreate.js.map +1 -1
- package/operations/entry/filtering/plugins/index.d.ts +1 -1
- package/operations/entry/filtering/plugins/index.js +5 -2
- package/operations/entry/filtering/plugins/index.js.map +1 -1
- package/operations/entry/filtering/plugins/objectFilterCreate.d.ts +1 -1
- package/operations/entry/filtering/plugins/objectFilterCreate.js +3 -1
- package/operations/entry/filtering/plugins/objectFilterCreate.js.map +1 -1
- package/operations/entry/filtering/plugins/refFilterCreate.d.ts +2 -1
- package/operations/entry/filtering/plugins/refFilterCreate.js +9 -2
- package/operations/entry/filtering/plugins/refFilterCreate.js.map +1 -1
- package/operations/entry/filtering/plugins/searchableJsonFilterCreate.d.ts +2 -0
- package/operations/entry/filtering/plugins/searchableJsonFilterCreate.js +65 -0
- package/operations/entry/filtering/plugins/searchableJsonFilterCreate.js.map +1 -0
- package/operations/entry/filtering/sort.d.ts +3 -3
- package/operations/entry/filtering/sort.js +5 -3
- package/operations/entry/filtering/sort.js.map +1 -1
- package/operations/entry/filtering/systemFields.d.ts +2 -2
- package/operations/entry/filtering/systemFields.js +34 -32
- package/operations/entry/filtering/systemFields.js.map +1 -1
- package/operations/entry/filtering/transform.d.ts +1 -1
- package/operations/entry/filtering/transform.js +3 -1
- package/operations/entry/filtering/transform.js.map +1 -1
- package/operations/entry/filtering/types.d.ts +2 -2
- package/operations/entry/filtering/types.js +3 -1
- package/operations/entry/filtering/types.js.map +1 -1
- package/operations/entry/filtering/values.d.ts +1 -1
- package/operations/entry/filtering/values.js +3 -1
- package/operations/entry/filtering/values.js.map +1 -1
- package/operations/entry/filtering/where.js +3 -1
- package/operations/entry/filtering/where.js.map +1 -1
- package/operations/entry/index.d.ts +3 -3
- package/operations/entry/index.js +585 -197
- package/operations/entry/index.js.map +1 -1
- package/operations/entry/keys.js +3 -1
- package/operations/entry/keys.js.map +1 -1
- package/operations/group/index.d.ts +3 -3
- package/operations/group/index.js +33 -21
- package/operations/group/index.js.map +1 -1
- package/operations/model/index.d.ts +2 -2
- package/operations/model/index.js +26 -13
- package/operations/model/index.js.map +1 -1
- package/operations/system/index.d.ts +2 -2
- package/operations/system/index.js +19 -7
- package/operations/system/index.js.map +1 -1
- package/package.json +19 -24
- package/plugins/CmsEntryFieldFilterPathPlugin.d.ts +1 -1
- package/plugins/CmsEntryFieldFilterPathPlugin.js +8 -3
- package/plugins/CmsEntryFieldFilterPathPlugin.js.map +1 -1
- package/plugins/CmsEntryFieldFilterPlugin.d.ts +10 -10
- package/plugins/CmsEntryFieldFilterPlugin.js +9 -6
- package/plugins/CmsEntryFieldFilterPlugin.js.map +1 -1
- package/plugins/CmsEntryFieldSortingPlugin.d.ts +2 -2
- package/plugins/CmsEntryFieldSortingPlugin.js +4 -5
- package/plugins/CmsEntryFieldSortingPlugin.js.map +1 -1
- package/plugins/CmsFieldFilterValueTransformPlugin.d.ts +2 -2
- package/plugins/CmsFieldFilterValueTransformPlugin.js +3 -4
- package/plugins/CmsFieldFilterValueTransformPlugin.js.map +1 -1
- package/plugins/index.js +3 -1
- package/plugins/index.js.map +1 -1
- package/types.d.ts +11 -13
- package/types.js +5 -5
- package/types.js.map +1 -1
- package/definitions/settings.d.ts +0 -9
- package/definitions/settings.js +0 -53
- package/definitions/settings.js.map +0 -1
- package/dynamoDb/storage/date.d.ts +0 -3
- package/dynamoDb/storage/date.js +0 -82
- package/dynamoDb/storage/date.js.map +0 -1
- package/operations/settings/index.d.ts +0 -7
- package/operations/settings/index.js +0 -111
- package/operations/settings/index.js.map +0 -1
package/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Plugin } from "@webiny/plugins/types";
|
|
2
|
-
import { CmsEntryStorageOperations as BaseCmsEntryStorageOperations, CmsModel, CmsModelField, HeadlessCmsStorageOperations as BaseHeadlessCmsStorageOperations } from "@webiny/api-headless-cms/types";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Entity, Table } from "dynamodb
|
|
1
|
+
import type { Plugin } from "@webiny/plugins/types";
|
|
2
|
+
import type { CmsEntryStorageOperations as BaseCmsEntryStorageOperations, CmsModel, CmsModelField, HeadlessCmsStorageOperations as BaseHeadlessCmsStorageOperations } from "@webiny/api-headless-cms/types";
|
|
3
|
+
import type { TableConstructor } from "@webiny/db-dynamodb/toolbox";
|
|
4
|
+
import type { AttributeDefinition } from "@webiny/db-dynamodb/toolbox";
|
|
5
|
+
import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
|
|
6
|
+
import type { Entity, Table } from "@webiny/db-dynamodb/toolbox";
|
|
7
7
|
interface CmsFieldFilterValueTransformParams {
|
|
8
8
|
/**
|
|
9
9
|
* A field which value we are transforming.
|
|
@@ -25,27 +25,25 @@ export interface CmsFieldFilterValueTransformPlugin extends Plugin {
|
|
|
25
25
|
*/
|
|
26
26
|
transform: (params: CmsFieldFilterValueTransformParams) => any;
|
|
27
27
|
}
|
|
28
|
-
export
|
|
29
|
-
export declare type Attributes = Record<string, AttributeDefinition>;
|
|
28
|
+
export type Attributes = Record<string, AttributeDefinition>;
|
|
30
29
|
export declare enum ENTITIES {
|
|
31
30
|
SYSTEM = "CmsSystem",
|
|
32
|
-
SETTINGS = "CmsSettings",
|
|
33
31
|
GROUPS = "CmsGroups",
|
|
34
32
|
MODELS = "CmsModels",
|
|
35
33
|
ENTRIES = "CmsEntries"
|
|
36
34
|
}
|
|
37
35
|
export interface TableModifier {
|
|
38
|
-
(table: TableConstructor): TableConstructor
|
|
36
|
+
(table: TableConstructor<string, string, string>): TableConstructor<string, string, string>;
|
|
39
37
|
}
|
|
40
38
|
export interface StorageOperationsFactoryParams {
|
|
41
|
-
documentClient:
|
|
39
|
+
documentClient: DynamoDBDocument;
|
|
42
40
|
table?: TableModifier;
|
|
43
41
|
attributes?: Record<ENTITIES, Attributes>;
|
|
44
42
|
plugins?: Plugin[] | Plugin[][];
|
|
45
43
|
}
|
|
46
44
|
export interface HeadlessCmsStorageOperations extends BaseHeadlessCmsStorageOperations {
|
|
47
|
-
getTable: () => Table
|
|
48
|
-
getEntities: () => Record<"system" | "
|
|
45
|
+
getTable: () => Table<string, string, string>;
|
|
46
|
+
getEntities: () => Record<"system" | "groups" | "models" | "entries", Entity<any>>;
|
|
49
47
|
}
|
|
50
48
|
export interface StorageOperationsFactory {
|
|
51
49
|
(params: StorageOperationsFactoryParams): HeadlessCmsStorageOperations;
|
package/types.js
CHANGED
|
@@ -4,12 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ENTITIES = void 0;
|
|
7
|
-
let ENTITIES
|
|
8
|
-
exports.ENTITIES = ENTITIES;
|
|
9
|
-
(function (ENTITIES) {
|
|
7
|
+
let ENTITIES = exports.ENTITIES = /*#__PURE__*/function (ENTITIES) {
|
|
10
8
|
ENTITIES["SYSTEM"] = "CmsSystem";
|
|
11
|
-
ENTITIES["SETTINGS"] = "CmsSettings";
|
|
12
9
|
ENTITIES["GROUPS"] = "CmsGroups";
|
|
13
10
|
ENTITIES["MODELS"] = "CmsModels";
|
|
14
11
|
ENTITIES["ENTRIES"] = "CmsEntries";
|
|
15
|
-
|
|
12
|
+
return ENTITIES;
|
|
13
|
+
}({});
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=types.js.map
|
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ENTITIES"],"sources":["types.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins/types\";\nimport {\n CmsEntryStorageOperations as BaseCmsEntryStorageOperations,\n CmsModel,\n CmsModelField,\n HeadlessCmsStorageOperations as BaseHeadlessCmsStorageOperations\n} from \"@webiny/api-headless-cms/types\";\nimport {
|
|
1
|
+
{"version":3,"names":["ENTITIES","exports"],"sources":["types.ts"],"sourcesContent":["import type { Plugin } from \"@webiny/plugins/types\";\nimport type {\n CmsEntryStorageOperations as BaseCmsEntryStorageOperations,\n CmsModel,\n CmsModelField,\n HeadlessCmsStorageOperations as BaseHeadlessCmsStorageOperations\n} from \"@webiny/api-headless-cms/types\";\nimport type { TableConstructor } from \"@webiny/db-dynamodb/toolbox\";\nimport type { AttributeDefinition } from \"@webiny/db-dynamodb/toolbox\";\nimport type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb\";\nimport type { Entity, Table } from \"@webiny/db-dynamodb/toolbox\";\n\ninterface CmsFieldFilterValueTransformParams {\n /**\n * A field which value we are transforming.\n */\n field: Partial<CmsModelField> &\n Pick<CmsModelField, \"id\" | \"storageId\" | \"fieldId\" | \"settings\">;\n value: any;\n}\n\nexport interface CmsFieldFilterValueTransformPlugin extends Plugin {\n /**\n * A plugin type.\n */\n type: \"cms-field-filter-value-transform\";\n /**\n * A field type this plugin is for.\n */\n fieldType: string;\n /**\n * Transform method which expect field definition and value to transform.\n */\n transform: (params: CmsFieldFilterValueTransformParams) => any;\n}\n\nexport type Attributes = Record<string, AttributeDefinition>;\n\nexport enum ENTITIES {\n SYSTEM = \"CmsSystem\",\n GROUPS = \"CmsGroups\",\n MODELS = \"CmsModels\",\n ENTRIES = \"CmsEntries\"\n}\n\nexport interface TableModifier {\n (table: TableConstructor<string, string, string>): TableConstructor<string, string, string>;\n}\n\nexport interface StorageOperationsFactoryParams {\n documentClient: DynamoDBDocument;\n table?: TableModifier;\n attributes?: Record<ENTITIES, Attributes>;\n plugins?: Plugin[] | Plugin[][];\n}\n\nexport interface HeadlessCmsStorageOperations extends BaseHeadlessCmsStorageOperations {\n getTable: () => Table<string, string, string>;\n getEntities: () => Record<\"system\" | \"groups\" | \"models\" | \"entries\", Entity<any>>;\n}\n\nexport interface StorageOperationsFactory {\n (params: StorageOperationsFactoryParams): HeadlessCmsStorageOperations;\n}\n\nexport interface CmsEntryStorageOperations extends BaseCmsEntryStorageOperations {\n dataLoaders: DataLoadersHandlerInterface;\n}\n\nexport interface DataLoadersHandlerInterfaceClearAllParams {\n model: Pick<CmsModel, \"tenant\" | \"locale\">;\n}\nexport interface DataLoadersHandlerInterface {\n clearAll: (params?: DataLoadersHandlerInterfaceClearAllParams) => void;\n}\n"],"mappings":";;;;;;IAsCYA,QAAQ,GAAAC,OAAA,CAAAD,QAAA,0BAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA","ignoreList":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Entity, Table } from "dynamodb-toolbox";
|
|
2
|
-
import { Attributes } from "../types";
|
|
3
|
-
interface Params {
|
|
4
|
-
table: Table;
|
|
5
|
-
entityName: string;
|
|
6
|
-
attributes: Attributes;
|
|
7
|
-
}
|
|
8
|
-
export declare const createSettingsEntity: (params: Params) => Entity<any>;
|
|
9
|
-
export {};
|
package/definitions/settings.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.createSettingsEntity = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
-
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
10
|
-
const createSettingsEntity = params => {
|
|
11
|
-
const {
|
|
12
|
-
entityName,
|
|
13
|
-
table,
|
|
14
|
-
attributes
|
|
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
|
-
key: {
|
|
30
|
-
type: "string"
|
|
31
|
-
},
|
|
32
|
-
uploadMinFileSize: {
|
|
33
|
-
type: "number"
|
|
34
|
-
},
|
|
35
|
-
uploadMaxFileSize: {
|
|
36
|
-
type: "number"
|
|
37
|
-
},
|
|
38
|
-
srcPrefix: {
|
|
39
|
-
type: "string"
|
|
40
|
-
},
|
|
41
|
-
contentModelLastChange: {
|
|
42
|
-
type: "string"
|
|
43
|
-
},
|
|
44
|
-
tenant: {
|
|
45
|
-
type: "string"
|
|
46
|
-
},
|
|
47
|
-
locale: {
|
|
48
|
-
type: "string"
|
|
49
|
-
}
|
|
50
|
-
}, attributes || {})
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
exports.createSettingsEntity = createSettingsEntity;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["createSettingsEntity","params","entityName","table","attributes","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","key","uploadMinFileSize","uploadMaxFileSize","srcPrefix","contentModelLastChange","tenant","locale"],"sources":["settings.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSettingsEntity = (params: Params): Entity<any> => {\n const { entityName, table, attributes } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n key: {\n type: \"string\"\n },\n uploadMinFileSize: {\n type: \"number\"\n },\n uploadMaxFileSize: {\n type: \"number\"\n },\n srcPrefix: {\n type: \"string\"\n },\n contentModelLastChange: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;AAAA;AASO,MAAMA,oBAAoB,GAAIC,MAAc,IAAkB;EACjE,MAAM;IAAEC,UAAU;IAAEC,KAAK;IAAEC;EAAW,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBC,KAAK;IACLC,UAAU;MACNG,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,GAAG,EAAE;QACDD,IAAI,EAAE;MACV,CAAC;MACDE,iBAAiB,EAAE;QACfF,IAAI,EAAE;MACV,CAAC;MACDG,iBAAiB,EAAE;QACfH,IAAI,EAAE;MACV,CAAC;MACDI,SAAS,EAAE;QACPJ,IAAI,EAAE;MACV,CAAC;MACDK,sBAAsB,EAAE;QACpBL,IAAI,EAAE;MACV,CAAC;MACDM,MAAM,EAAE;QACJN,IAAI,EAAE;MACV,CAAC;MACDO,MAAM,EAAE;QACJP,IAAI,EAAE;MACV;IAAC,GACGR,UAAU,IAAI,CAAC,CAAC;EAE5B,CAAC,CAAC;AACN,CAAC;AAAC"}
|
package/dynamoDb/storage/date.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.createDateStorageTransformPlugin = void 0;
|
|
8
|
-
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
9
|
-
var _apiHeadlessCms = require("@webiny/api-headless-cms");
|
|
10
|
-
/**
|
|
11
|
-
* File is @internal
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
const excludeTypes = ["time", "dateTimeWithTimezone"];
|
|
15
|
-
const convertFromStorage = (field, value) => {
|
|
16
|
-
try {
|
|
17
|
-
if (field.multipleValues) {
|
|
18
|
-
const result = [];
|
|
19
|
-
for (const v of value) {
|
|
20
|
-
if (!v) {
|
|
21
|
-
continue;
|
|
22
|
-
}
|
|
23
|
-
try {
|
|
24
|
-
result.push(new Date(v));
|
|
25
|
-
} catch {}
|
|
26
|
-
}
|
|
27
|
-
return result;
|
|
28
|
-
}
|
|
29
|
-
return new Date(value);
|
|
30
|
-
} catch {
|
|
31
|
-
console.log(`Could not transform from storage for field type`);
|
|
32
|
-
return value;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
const convertValueToStorage = (field, value) => {
|
|
36
|
-
if (value instanceof Date || value.toISOString) {
|
|
37
|
-
return value.toISOString();
|
|
38
|
-
} else if (typeof value === "string") {
|
|
39
|
-
return value;
|
|
40
|
-
}
|
|
41
|
-
throw new _error.default("Error converting value to a storage type.", "TO_STORAGE_ERROR", {
|
|
42
|
-
value: value,
|
|
43
|
-
fieldId: field.fieldId,
|
|
44
|
-
storageId: field.storageId
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
const createDateStorageTransformPlugin = () => {
|
|
48
|
-
return new _apiHeadlessCms.StorageTransformPlugin({
|
|
49
|
-
fieldType: "datetime",
|
|
50
|
-
fromStorage: async ({
|
|
51
|
-
value,
|
|
52
|
-
field
|
|
53
|
-
}) => {
|
|
54
|
-
const {
|
|
55
|
-
type
|
|
56
|
-
} = field.settings || {};
|
|
57
|
-
if (!value || !type || excludeTypes.includes(type)) {
|
|
58
|
-
return value;
|
|
59
|
-
}
|
|
60
|
-
return convertFromStorage(field, value);
|
|
61
|
-
},
|
|
62
|
-
toStorage: async ({
|
|
63
|
-
value,
|
|
64
|
-
field
|
|
65
|
-
}) => {
|
|
66
|
-
const {
|
|
67
|
-
type
|
|
68
|
-
} = field.settings || {};
|
|
69
|
-
if (!value || !type || excludeTypes.includes(type)) {
|
|
70
|
-
return value;
|
|
71
|
-
}
|
|
72
|
-
if (field.multipleValues) {
|
|
73
|
-
const multipleValues = value;
|
|
74
|
-
return (multipleValues || []).filter(v => !!v).map(v => {
|
|
75
|
-
return convertValueToStorage(field, v);
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
return convertValueToStorage(field, value);
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
exports.createDateStorageTransformPlugin = createDateStorageTransformPlugin;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["excludeTypes","convertFromStorage","field","value","multipleValues","result","v","push","Date","console","log","convertValueToStorage","toISOString","WebinyError","fieldId","storageId","createDateStorageTransformPlugin","StorageTransformPlugin","fieldType","fromStorage","type","settings","includes","toStorage","filter","map"],"sources":["date.ts"],"sourcesContent":["/**\n * File is @internal\n */\nimport WebinyError from \"@webiny/error\";\nimport { StorageTransformPlugin } from \"@webiny/api-headless-cms\";\nimport { CmsModelField } from \"@webiny/api-headless-cms/types\";\n\nconst excludeTypes = [\"time\", \"dateTimeWithTimezone\"];\n\nconst convertFromStorage = (\n field: Pick<CmsModelField, \"multipleValues\">,\n value: string | string[]\n) => {\n try {\n if (field.multipleValues) {\n const result: Date[] = [];\n for (const v of value) {\n if (!v) {\n continue;\n }\n try {\n result.push(new Date(v));\n } catch {}\n }\n return result;\n }\n return new Date(value as string);\n } catch {\n console.log(`Could not transform from storage for field type`);\n return value;\n }\n};\n\nconst convertValueToStorage = (field: CmsModelField, value: any): any => {\n if (value instanceof Date || (value as any).toISOString) {\n return (value as Date).toISOString();\n } else if (typeof value === \"string\") {\n return value as string;\n }\n throw new WebinyError(\"Error converting value to a storage type.\", \"TO_STORAGE_ERROR\", {\n value: value,\n fieldId: field.fieldId,\n storageId: field.storageId\n });\n};\n\nexport const createDateStorageTransformPlugin = () => {\n return new StorageTransformPlugin({\n fieldType: \"datetime\",\n fromStorage: async ({ value, field }) => {\n const { type } = field.settings || {};\n if (!value || !type || excludeTypes.includes(type)) {\n return value;\n }\n return convertFromStorage(field, value);\n },\n toStorage: async ({ value, field }) => {\n const { type } = field.settings || {};\n if (!value || !type || excludeTypes.includes(type)) {\n return value;\n }\n if (field.multipleValues) {\n const multipleValues = value as (string | Date | null | undefined)[];\n return (multipleValues || [])\n .filter(v => !!v)\n .map(v => {\n return convertValueToStorage(field, v);\n });\n }\n return convertValueToStorage(field, value);\n }\n });\n};\n"],"mappings":";;;;;;;AAGA;AACA;AAJA;AACA;AACA;;AAKA,MAAMA,YAAY,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC;AAErD,MAAMC,kBAAkB,GAAG,CACvBC,KAA4C,EAC5CC,KAAwB,KACvB;EACD,IAAI;IACA,IAAID,KAAK,CAACE,cAAc,EAAE;MACtB,MAAMC,MAAc,GAAG,EAAE;MACzB,KAAK,MAAMC,CAAC,IAAIH,KAAK,EAAE;QACnB,IAAI,CAACG,CAAC,EAAE;UACJ;QACJ;QACA,IAAI;UACAD,MAAM,CAACE,IAAI,CAAC,IAAIC,IAAI,CAACF,CAAC,CAAC,CAAC;QAC5B,CAAC,CAAC,MAAM,CAAC;MACb;MACA,OAAOD,MAAM;IACjB;IACA,OAAO,IAAIG,IAAI,CAACL,KAAK,CAAW;EACpC,CAAC,CAAC,MAAM;IACJM,OAAO,CAACC,GAAG,CAAE,iDAAgD,CAAC;IAC9D,OAAOP,KAAK;EAChB;AACJ,CAAC;AAED,MAAMQ,qBAAqB,GAAG,CAACT,KAAoB,EAAEC,KAAU,KAAU;EACrE,IAAIA,KAAK,YAAYK,IAAI,IAAKL,KAAK,CAASS,WAAW,EAAE;IACrD,OAAQT,KAAK,CAAUS,WAAW,EAAE;EACxC,CAAC,MAAM,IAAI,OAAOT,KAAK,KAAK,QAAQ,EAAE;IA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EACJ,CAAC,CAAC;AACN,CAAC;AAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CmsSettingsStorageOperations } from "@webiny/api-headless-cms/types";
|
|
2
|
-
import { Entity } from "dynamodb-toolbox";
|
|
3
|
-
interface CreateSettingsStorageOperationsParams {
|
|
4
|
-
entity: Entity<any>;
|
|
5
|
-
}
|
|
6
|
-
export declare const createSettingsStorageOperations: (params: CreateSettingsStorageOperationsParams) => CmsSettingsStorageOperations;
|
|
7
|
-
export {};
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.createSettingsStorageOperations = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
-
var _get = require("@webiny/db-dynamodb/utils/get");
|
|
10
|
-
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
11
|
-
var _cleanup = require("@webiny/db-dynamodb/utils/cleanup");
|
|
12
|
-
const convertToDbData = settings => {
|
|
13
|
-
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, settings), {}, {
|
|
14
|
-
contentModelLastChange: settings.contentModelLastChange.toISOString()
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
const convertFromDbData = settings => {
|
|
18
|
-
if (!settings) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
let contentModelLastChange;
|
|
22
|
-
try {
|
|
23
|
-
contentModelLastChange = new Date(settings.contentModelLastChange);
|
|
24
|
-
} catch {
|
|
25
|
-
contentModelLastChange = new Date();
|
|
26
|
-
}
|
|
27
|
-
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, settings), {}, {
|
|
28
|
-
contentModelLastChange
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
const createPartitionKey = ({
|
|
32
|
-
tenant,
|
|
33
|
-
locale
|
|
34
|
-
}) => {
|
|
35
|
-
return `T#${tenant}#L#${locale}#CMS#SETTINGS`;
|
|
36
|
-
};
|
|
37
|
-
const createSortKey = () => {
|
|
38
|
-
return "settings";
|
|
39
|
-
};
|
|
40
|
-
const createKeys = params => {
|
|
41
|
-
return {
|
|
42
|
-
PK: createPartitionKey(params),
|
|
43
|
-
SK: createSortKey()
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
const createSettingsStorageOperations = params => {
|
|
47
|
-
const {
|
|
48
|
-
entity
|
|
49
|
-
} = params;
|
|
50
|
-
const create = async params => {
|
|
51
|
-
const {
|
|
52
|
-
settings
|
|
53
|
-
} = params;
|
|
54
|
-
const keys = createKeys(settings);
|
|
55
|
-
const dbSettings = convertToDbData(settings);
|
|
56
|
-
try {
|
|
57
|
-
await entity.put((0, _objectSpread2.default)((0, _objectSpread2.default)({}, dbSettings), keys));
|
|
58
|
-
return settings;
|
|
59
|
-
} catch (ex) {
|
|
60
|
-
throw new _error.default(ex.message || "Could not create settings.", ex.code || "CREATE_SETTINGS_ERROR", {
|
|
61
|
-
error: ex,
|
|
62
|
-
settings,
|
|
63
|
-
dbSettings,
|
|
64
|
-
keys
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
const update = async params => {
|
|
69
|
-
const {
|
|
70
|
-
settings
|
|
71
|
-
} = params;
|
|
72
|
-
const keys = createKeys(settings);
|
|
73
|
-
const dbSettings = convertToDbData(settings);
|
|
74
|
-
try {
|
|
75
|
-
await entity.put((0, _objectSpread2.default)((0, _objectSpread2.default)({}, dbSettings), keys));
|
|
76
|
-
return settings;
|
|
77
|
-
} catch (ex) {
|
|
78
|
-
throw new _error.default(ex.message || "Could not update settings.", ex.code || "UPDATE_SETTINGS_ERROR", {
|
|
79
|
-
error: ex,
|
|
80
|
-
settings,
|
|
81
|
-
dbSettings,
|
|
82
|
-
keys
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
const get = async params => {
|
|
87
|
-
const keys = createKeys(params);
|
|
88
|
-
try {
|
|
89
|
-
const record = await (0, _get.get)({
|
|
90
|
-
entity,
|
|
91
|
-
keys
|
|
92
|
-
});
|
|
93
|
-
if (!record) {
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
const settings = (0, _cleanup.cleanupItem)(entity, record);
|
|
97
|
-
return convertFromDbData(settings);
|
|
98
|
-
} catch (ex) {
|
|
99
|
-
throw new _error.default(ex.message || "Could not get settings.", ex.code || "GET_SETTINGS_ERROR", {
|
|
100
|
-
error: ex,
|
|
101
|
-
keys
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
return {
|
|
106
|
-
create,
|
|
107
|
-
get,
|
|
108
|
-
update
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
exports.createSettingsStorageOperations = createSettingsStorageOperations;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["convertToDbData","settings","contentModelLastChange","toISOString","convertFromDbData","Date","createPartitionKey","tenant","locale","createSortKey","createKeys","params","PK","SK","createSettingsStorageOperations","entity","create","keys","dbSettings","put","ex","WebinyError","message","code","error","update","get","record","getRecord","cleanupItem"],"sources":["index.ts"],"sourcesContent":["import {\n CmsSettings,\n CmsSettingsStorageOperations,\n CmsSettingsStorageOperationsCreateParams,\n CmsSettingsStorageOperationsGetParams,\n CmsSettingsStorageOperationsUpdateParams\n} from \"@webiny/api-headless-cms/types\";\nimport { Entity } from \"dynamodb-toolbox\";\nimport { get as getRecord } from \"@webiny/db-dynamodb/utils/get\";\nimport WebinyError from \"@webiny/error\";\nimport { cleanupItem } from \"@webiny/db-dynamodb/utils/cleanup\";\n\ninterface CmsSettingsDb extends Omit<CmsSettings, \"contentModelLastChange\"> {\n contentModelLastChange: string;\n}\n\nconst convertToDbData = (settings: CmsSettings): CmsSettingsDb => {\n return {\n ...settings,\n contentModelLastChange: settings.contentModelLastChange.toISOString()\n };\n};\n\nconst convertFromDbData = (settings?: CmsSettingsDb): CmsSettings | null => {\n if (!settings) {\n return null;\n }\n let contentModelLastChange;\n try {\n contentModelLastChange = new Date(settings.contentModelLastChange);\n } catch {\n contentModelLastChange = new Date();\n }\n return {\n ...settings,\n contentModelLastChange\n };\n};\n\ninterface PartitionKeyParams {\n tenant: string;\n locale: string;\n}\n\nconst createPartitionKey = ({ tenant, locale }: PartitionKeyParams): string => {\n return `T#${tenant}#L#${locale}#CMS#SETTINGS`;\n};\n\nconst createSortKey = (): string => {\n return \"settings\";\n};\n\ninterface Keys {\n PK: string;\n SK: string;\n}\nconst createKeys = (params: PartitionKeyParams): Keys => {\n return {\n PK: createPartitionKey(params),\n SK: createSortKey()\n };\n};\n\ninterface CreateSettingsStorageOperationsParams {\n entity: Entity<any>;\n}\n\nexport const createSettingsStorageOperations = (\n params: CreateSettingsStorageOperationsParams\n): CmsSettingsStorageOperations => {\n const { entity } = params;\n\n const create = async (params: CmsSettingsStorageOperationsCreateParams) => {\n const { settings } = params;\n const keys = createKeys(settings);\n\n const dbSettings: CmsSettingsDb = convertToDbData(settings);\n\n try {\n await entity.put({\n ...dbSettings,\n ...keys\n });\n return settings;\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not create settings.\",\n ex.code || \"CREATE_SETTINGS_ERROR\",\n {\n error: ex,\n settings,\n dbSettings,\n keys\n }\n );\n }\n };\n\n const update = async (params: CmsSettingsStorageOperationsUpdateParams) => {\n const { settings } = params;\n\n const keys = createKeys(settings);\n\n const dbSettings: CmsSettingsDb = convertToDbData(settings);\n\n try {\n await entity.put({\n ...dbSettings,\n ...keys\n });\n return settings;\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not update settings.\",\n ex.code || \"UPDATE_SETTINGS_ERROR\",\n {\n error: ex,\n settings,\n dbSettings,\n keys\n }\n );\n }\n };\n\n const get = async (params: CmsSettingsStorageOperationsGetParams) => {\n const keys = createKeys(params);\n try {\n const record = await getRecord<CmsSettingsDb>({\n entity,\n keys\n });\n if (!record) {\n return null;\n }\n const settings = cleanupItem(entity, record) as CmsSettingsDb;\n return convertFromDbData(settings);\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not get settings.\",\n ex.code || \"GET_SETTINGS_ERROR\",\n {\n error: ex,\n keys\n }\n );\n }\n };\n\n return {\n create,\n get,\n update\n };\n};\n"],"mappings":";;;;;;;;AAQA;AACA;AACA;AAMA,MAAMA,eAAe,GAAIC,QAAqB,IAAoB;EAC9D,mEACOA,QAAQ;IACXC,sBAAsB,EAAED,QAAQ,CAACC,sBAAsB,CAACC,WAAW;EAAE;AAE7E,CAAC;AAED,MAAMC,iBAAiB,GAAIH,QAAwB,IAAyB;EACxE,IAAI,CAACA,QAAQ,EAAE;IACX,OAAO,IAAI;EACf;EACA,IAAIC,sBAAsB;EAC1B,IAAI;IACAA,sBAAsB,GAAG,IAAIG,IAAI,CAACJ,QAAQ,CAACC,sBAAsB,CAAC;EACtE,CAAC,CAAC,MAAM;IACJA,sBAAsB,GAAG,IAAIG,IAAI,EAAE;EACvC;EACA,mEACOJ,QAAQ;IACXC;EAAsB;AAE9B,CAAC;AAOD,MAAMI,kBAAkB,GAAG,CAAC;EAAEC,MAAM;EAAEC;AAA2B,CAAC,KAAa;EAC3E,OAAQ,KAAID,MAAO,MAAKC,MAAO,eAAc;AACjD,CAAC;AAED,MAAMC,aAAa,GAAG,MAAc;EAChC,OAAO,UAAU;AACrB,CAAC;AAMD,MAAMC,UAAU,GAAIC,MAA0B,IAAW;EACrD,OAAO;IACHC,EAAE,EAAEN,kBAAkB,CAACK,MAAM,CAAC;IAC9BE,EAAE,EAAEJ,aAAa;EACrB,CAAC;AACL,CAAC;AAMM,MAAMK,+BAA+B,GACxCH,MAA6C,IACd;EAC/B,MAAM;IAAEI;EAAO,CAAC,GAAGJ,MAAM;EAEzB,MAAMK,MAAM,GAAG,MAAOL,MAAgD,IA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