@webiny/api-headless-cms-ddb 0.0.0-mt-3 → 0.0.0-unstable.5e7233243f
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 +2 -1
- package/definitions/entry.js +5 -2
- package/definitions/entry.js.map +1 -0
- package/definitions/group.d.ts +2 -1
- package/definitions/group.js +2 -2
- package/definitions/group.js.map +1 -0
- package/definitions/model.d.ts +2 -1
- package/definitions/model.js +2 -2
- package/definitions/model.js.map +1 -0
- package/definitions/settings.d.ts +2 -1
- package/definitions/settings.js +2 -2
- package/definitions/settings.js.map +1 -0
- package/definitions/system.d.ts +2 -1
- package/definitions/system.js +2 -2
- package/definitions/system.js.map +1 -0
- package/definitions/table.d.ts +2 -1
- package/definitions/table.js.map +1 -0
- package/dynamoDb/index.d.ts +1 -1
- package/dynamoDb/index.js +6 -10
- package/dynamoDb/index.js.map +1 -0
- package/dynamoDb/path/plainObject.d.ts +2 -3
- package/dynamoDb/path/plainObject.js +28 -21
- package/dynamoDb/path/plainObject.js.map +1 -0
- package/dynamoDb/storage/date.d.ts +2 -3
- package/dynamoDb/storage/date.js +79 -45
- package/dynamoDb/storage/date.js.map +1 -0
- package/dynamoDb/storage/longText.d.ts +7 -4
- package/dynamoDb/storage/longText.js +71 -53
- package/dynamoDb/storage/longText.js.map +1 -0
- package/dynamoDb/storage/richText.d.ts +2 -8
- package/dynamoDb/storage/richText.js +69 -66
- package/dynamoDb/storage/richText.js.map +1 -0
- package/dynamoDb/transformValue/datetime.d.ts +4 -2
- package/dynamoDb/transformValue/datetime.js +31 -26
- package/dynamoDb/transformValue/datetime.js.map +1 -0
- package/index.js +20 -19
- package/index.js.map +1 -0
- package/operations/entry/dataLoaders.d.ts +12 -8
- package/operations/entry/dataLoaders.js +26 -6
- package/operations/entry/dataLoaders.js.map +1 -0
- package/operations/entry/index.d.ts +2 -2
- package/operations/entry/index.js +264 -103
- package/operations/entry/index.js.map +1 -0
- package/operations/entry/keys.js +11 -0
- package/operations/entry/keys.js.map +1 -0
- package/operations/entry/systemFields.js +18 -0
- package/operations/entry/systemFields.js.map +1 -0
- package/operations/entry/utils.d.ts +10 -5
- package/operations/entry/utils.js +373 -95
- package/operations/entry/utils.js.map +1 -0
- package/operations/group/index.d.ts +3 -2
- package/operations/group/index.js +3 -5
- package/operations/group/index.js.map +1 -0
- package/operations/model/index.d.ts +3 -2
- package/operations/model/index.js +15 -10
- package/operations/model/index.js.map +1 -0
- package/operations/settings/index.d.ts +3 -2
- package/operations/settings/index.js +3 -5
- package/operations/settings/index.js.map +1 -0
- package/operations/system/index.d.ts +3 -2
- package/operations/system/index.js +3 -5
- package/operations/system/index.js.map +1 -0
- package/package.json +23 -23
- package/plugins/CmsEntryFieldFilterPathPlugin.d.ts +22 -0
- package/plugins/CmsEntryFieldFilterPathPlugin.js +55 -0
- package/plugins/CmsEntryFieldFilterPathPlugin.js.map +1 -0
- package/types.d.ts +1 -32
- package/types.js.map +1 -0
- package/dynamoDb/path/ref.d.ts +0 -3
- package/dynamoDb/path/ref.js +0 -27
package/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ENTITIES"],"sources":["types.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins/types\";\nimport {\n CmsModelField,\n HeadlessCmsStorageOperations as BaseHeadlessCmsStorageOperations\n} from \"@webiny/api-headless-cms/types\";\nimport { DynamoDBTypes, TableConstructor } from \"dynamodb-toolbox/dist/classes/Table\";\nimport {\n EntityAttributeConfig,\n EntityCompositeAttributes\n} from \"dynamodb-toolbox/dist/classes/Entity\";\nimport { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport { Entity, Table } from \"dynamodb-toolbox\";\n\ninterface CmsFieldFilterValueTransformParams {\n /**\n * A field which value we are transforming.\n */\n field: CmsModelField;\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 AttributeDefinition = DynamoDBTypes | EntityAttributeConfig | EntityCompositeAttributes;\n\nexport type Attributes = Record<string, AttributeDefinition>;\n\nexport enum ENTITIES {\n SYSTEM = \"CmsSystem\",\n SETTINGS = \"CmsSettings\",\n GROUPS = \"CmsGroups\",\n MODELS = \"CmsModels\",\n ENTRIES = \"CmsEntries\"\n}\n\nexport interface TableModifier {\n (table: TableConstructor): TableConstructor;\n}\n\nexport interface StorageOperationsFactoryParams {\n documentClient: DocumentClient;\n table?: TableModifier;\n attributes?: Record<ENTITIES, Attributes>;\n plugins?: Plugin[] | Plugin[][];\n}\n\nexport interface HeadlessCmsStorageOperations extends BaseHeadlessCmsStorageOperations {\n getTable: () => Table;\n getEntities: () => Record<\"system\" | \"settings\" | \"groups\" | \"models\" | \"entries\", Entity<any>>;\n}\n\nexport interface StorageOperationsFactory {\n (params: StorageOperationsFactoryParams): HeadlessCmsStorageOperations;\n}\n"],"mappings":";;;;;;IAwCYA,Q;;;WAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;GAAAA,Q,wBAAAA,Q"}
|
package/dynamoDb/path/ref.d.ts
DELETED
package/dynamoDb/path/ref.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _default = () => ({
|
|
9
|
-
type: "cms-field-filter-path",
|
|
10
|
-
name: "cms-field-filter-path-ref",
|
|
11
|
-
fieldType: "ref",
|
|
12
|
-
createPath: ({
|
|
13
|
-
field,
|
|
14
|
-
index
|
|
15
|
-
}) => {
|
|
16
|
-
const paths = [field.fieldId];
|
|
17
|
-
|
|
18
|
-
if (index !== undefined) {
|
|
19
|
-
paths.push(String(index));
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
paths.push("entryId");
|
|
23
|
-
return paths.join(".");
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
exports.default = _default;
|