@webiny/api-headless-cms-ddb-es 5.41.3-beta.1 → 5.41.3
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/package.json +23 -23
- package/types.d.ts +3 -6
- package/types.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-headless-cms-ddb-es",
|
|
3
|
-
"version": "5.41.3
|
|
3
|
+
"version": "5.41.3",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"@webiny/api-headless-cms",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/runtime": "7.24.1",
|
|
30
|
-
"@webiny/api": "5.41.3
|
|
31
|
-
"@webiny/api-elasticsearch": "5.41.3
|
|
32
|
-
"@webiny/api-elasticsearch-tasks": "5.41.3
|
|
33
|
-
"@webiny/api-headless-cms": "5.41.3
|
|
34
|
-
"@webiny/aws-sdk": "5.41.3
|
|
35
|
-
"@webiny/db-dynamodb": "5.41.3
|
|
36
|
-
"@webiny/error": "5.41.3
|
|
37
|
-
"@webiny/handler-db": "5.41.3
|
|
38
|
-
"@webiny/plugins": "5.41.3
|
|
39
|
-
"@webiny/utils": "5.41.3
|
|
30
|
+
"@webiny/api": "5.41.3",
|
|
31
|
+
"@webiny/api-elasticsearch": "5.41.3",
|
|
32
|
+
"@webiny/api-elasticsearch-tasks": "5.41.3",
|
|
33
|
+
"@webiny/api-headless-cms": "5.41.3",
|
|
34
|
+
"@webiny/aws-sdk": "5.41.3",
|
|
35
|
+
"@webiny/db-dynamodb": "5.41.3",
|
|
36
|
+
"@webiny/error": "5.41.3",
|
|
37
|
+
"@webiny/handler-db": "5.41.3",
|
|
38
|
+
"@webiny/plugins": "5.41.3",
|
|
39
|
+
"@webiny/utils": "5.41.3",
|
|
40
40
|
"dataloader": "2.2.1",
|
|
41
41
|
"jsonpack": "1.1.5",
|
|
42
42
|
"lodash": "4.17.21"
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
"@babel/preset-env": "7.24.3",
|
|
48
48
|
"@elastic/elasticsearch": "7.12.0",
|
|
49
49
|
"@types/jsonpack": "1.1.2",
|
|
50
|
-
"@webiny/api-dynamodb-to-elasticsearch": "5.41.3
|
|
51
|
-
"@webiny/api-i18n": "5.41.3
|
|
52
|
-
"@webiny/api-security": "5.41.3
|
|
53
|
-
"@webiny/api-tenancy": "5.41.3
|
|
54
|
-
"@webiny/api-wcp": "5.41.3
|
|
55
|
-
"@webiny/cli": "5.41.3
|
|
56
|
-
"@webiny/handler": "5.41.3
|
|
57
|
-
"@webiny/handler-aws": "5.41.3
|
|
58
|
-
"@webiny/handler-graphql": "5.41.3
|
|
59
|
-
"@webiny/project-utils": "5.41.3
|
|
60
|
-
"@webiny/tasks": "5.41.3
|
|
50
|
+
"@webiny/api-dynamodb-to-elasticsearch": "5.41.3",
|
|
51
|
+
"@webiny/api-i18n": "5.41.3",
|
|
52
|
+
"@webiny/api-security": "5.41.3",
|
|
53
|
+
"@webiny/api-tenancy": "5.41.3",
|
|
54
|
+
"@webiny/api-wcp": "5.41.3",
|
|
55
|
+
"@webiny/cli": "5.41.3",
|
|
56
|
+
"@webiny/handler": "5.41.3",
|
|
57
|
+
"@webiny/handler-aws": "5.41.3",
|
|
58
|
+
"@webiny/handler-graphql": "5.41.3",
|
|
59
|
+
"@webiny/project-utils": "5.41.3",
|
|
60
|
+
"@webiny/tasks": "5.41.3",
|
|
61
61
|
"jest": "29.7.0",
|
|
62
62
|
"jest-dynalite": "3.6.1",
|
|
63
63
|
"prettier": "2.8.8",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"build": "yarn webiny run build",
|
|
75
75
|
"watch": "yarn webiny run watch"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "45c9aa7d2685b2654e69529ff7005ce234c321a0"
|
|
78
78
|
}
|
package/types.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Plugin, PluginCollection } from "@webiny/plugins/types";
|
|
2
|
-
import { CmsContext as BaseCmsContext, CmsEntry, CmsEntryStorageOperations as BaseCmsEntryStorageOperations, CmsModel, CmsModelField, CmsModelFieldToGraphQLPlugin, CmsModelFieldType,
|
|
2
|
+
import { CmsContext as BaseCmsContext, CmsEntry, CmsEntryStorageOperations as BaseCmsEntryStorageOperations, CmsModel, CmsModelField, CmsModelFieldToGraphQLPlugin, CmsModelFieldType, HeadlessCmsStorageOperations as BaseHeadlessCmsStorageOperations } from "@webiny/api-headless-cms/types";
|
|
3
3
|
import { AttributeDefinition, Entity, Table, TableConstructor } from "@webiny/db-dynamodb/toolbox";
|
|
4
4
|
import { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
|
|
5
5
|
import { Client } from "@elastic/elasticsearch";
|
|
6
6
|
import { PluginsContainer } from "@webiny/plugins";
|
|
7
|
-
import { ElasticsearchContext } from "@webiny/api-elasticsearch/types";
|
|
8
7
|
/**
|
|
9
8
|
* A definition of the entry that is being prepared for the Elasticsearch.
|
|
10
9
|
*
|
|
@@ -147,10 +146,8 @@ export interface StorageOperationsFactoryParams {
|
|
|
147
146
|
attributes?: Record<ENTITIES, Attributes>;
|
|
148
147
|
plugins?: PluginCollection;
|
|
149
148
|
}
|
|
150
|
-
export interface CmsContext extends BaseCmsContext
|
|
151
|
-
|
|
152
|
-
storageOperations: HeadlessCmsStorageOperations;
|
|
153
|
-
};
|
|
149
|
+
export interface CmsContext extends BaseCmsContext {
|
|
150
|
+
[key: string]: any;
|
|
154
151
|
}
|
|
155
152
|
export interface HeadlessCmsStorageOperations extends BaseHeadlessCmsStorageOperations<CmsContext> {
|
|
156
153
|
getTable: () => Table<string, string, string>;
|
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ENTITIES","exports"],"sources":["types.ts"],"sourcesContent":["import { Plugin, PluginCollection } from \"@webiny/plugins/types\";\nimport {\n CmsContext as BaseCmsContext,\n CmsEntry,\n CmsEntryStorageOperations as BaseCmsEntryStorageOperations,\n CmsModel,\n CmsModelField,\n CmsModelFieldToGraphQLPlugin,\n CmsModelFieldType,\n
|
|
1
|
+
{"version":3,"names":["ENTITIES","exports"],"sources":["types.ts"],"sourcesContent":["import { Plugin, PluginCollection } from \"@webiny/plugins/types\";\nimport {\n CmsContext as BaseCmsContext,\n CmsEntry,\n CmsEntryStorageOperations as BaseCmsEntryStorageOperations,\n CmsModel,\n CmsModelField,\n CmsModelFieldToGraphQLPlugin,\n CmsModelFieldType,\n HeadlessCmsStorageOperations as BaseHeadlessCmsStorageOperations\n} from \"@webiny/api-headless-cms/types\";\nimport { AttributeDefinition, Entity, Table, TableConstructor } from \"@webiny/db-dynamodb/toolbox\";\nimport { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb\";\nimport { Client } from \"@elastic/elasticsearch\";\nimport { PluginsContainer } from \"@webiny/plugins\";\n\n/**\n * A definition of the entry that is being prepared for the Elasticsearch.\n *\n * @category Elasticsearch\n * @category CmsEntry\n */\nexport interface CmsIndexEntry extends CmsEntry {\n /**\n * Values that are not going to be indexed.\n */\n rawValues: Record<string, any>;\n /**\n * A first part of the ID, without the revision.\n * For example, we can search for all the revisions of the given entry.\n */\n primaryId: string;\n /**\n * Dev can add what ever keys they want and need. Just need to be careful not to break the entry.\n */\n [key: string]: any;\n}\n\n/**\n * Arguments for the method that is transforming content entry in its original form to the one we are storing to the Elasticsearch.\n *\n * @category Elasticsearch\n * @category CmsEntry\n */\nexport interface CmsModelFieldToElasticsearchToParams {\n plugins: PluginsContainer;\n model: CmsModel;\n field: CmsModelField;\n /**\n * Raw value on the entry - before prepare for storage.\n */\n rawValue: any;\n /**\n * Value prepared for storage received from base api-headless-cms package.\n */\n value: any;\n getFieldIndexPlugin(fieldType: string): CmsModelFieldToElasticsearchPlugin;\n getFieldTypePlugin(fieldType: string): CmsModelFieldToGraphQLPlugin;\n}\n\n/**\n * Arguments for the method that is transforming content entry from Elasticsearch into the original one.\n *\n * @category Elasticsearch\n * @category CmsEntry\n */\nexport interface CmsModelFieldToElasticsearchFromParams {\n plugins: PluginsContainer;\n model: CmsModel;\n field: CmsModelField;\n value: any;\n rawValue: any;\n getFieldIndexPlugin(fieldType: string): CmsModelFieldToElasticsearchPlugin;\n getFieldTypePlugin(fieldType: string): CmsModelFieldToGraphQLPlugin;\n}\n\ninterface ToIndexValue {\n /**\n * Use this key to store value for indexing.\n */\n value?: any;\n /**\n * Use this key to tell ES that this value should not be indexed.\n */\n rawValue?: any;\n}\n\n/**\n * A plugin defining transformation of entry for Elasticsearch.\n *\n * @category Plugin\n * @category ContentModelField\n * @category CmsEntry\n * @category Elasticsearch\n */\nexport interface CmsModelFieldToElasticsearchPlugin extends Plugin {\n /**\n * A plugin type\n */\n type: \"cms-model-field-to-elastic-search\";\n /**\n * A unique identifier of the field type (text, number, json, myField, ...).\n *\n * ```ts\n * fieldType: \"myField\"\n * ```\n */\n fieldType: CmsModelFieldType;\n /**\n * If you need to define a type when building an Elasticsearch query.\n * Check [dateTimeIndexing](https://github.com/webiny/webiny-js/blob/3074165701b8b45e5fc6ac2444caace7d04ada66/packages/api-headless-cms/src/content/plugins/es/indexing/dateTimeIndexing.ts) plugin for usage example.\n *\n * ```ts\n * unmappedType: \"date\"\n * ```\n */\n unmappedType?: (field: Pick<CmsModelField, \"fieldId\" | \"type\">) => string;\n /**\n * This is meant to do some transformation of the entry, preferably only to fieldType it was defined for. Nothing is stopping you to do anything you want to other fields, but try to separate field transformations.\n * It returns `Partial<CmsContentIndexEntryType>`. Always return a top-level property of the entry since it is merged via spread operator.\n *\n * ```ts\n * toIndex({ value }) {\n * return {\n * value: value, // This will be stored and indexed\n * rawValue: JSON.stringify(value) // This will be stored but excluded from indexing\n * };\n * }\n * ```\n */\n toIndex?: (params: CmsModelFieldToElasticsearchToParams) => ToIndexValue;\n /**\n * This is meant to revert a transformation done in the `toIndex` method.\n * You have access to \"value\" or a \"rawValue\", depending on what you returned from `toIndex`.\n *\n * ```ts\n * fromIndex({ value, rawValue }) {\n * return JSON.parse(rawValue);\n * }\n * ```\n */\n fromIndex?: (params: CmsModelFieldToElasticsearchFromParams) => 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 ENTRIES_ES = \"CmsEntriesElasticsearch\"\n}\n\nexport interface TableModifier {\n (table: TableConstructor<string, string, string>): TableConstructor<string, string, string>;\n}\n\nexport interface StorageOperationsFactoryParams {\n documentClient: DynamoDBDocument;\n elasticsearch: Client;\n table?: TableModifier;\n esTable?: TableModifier;\n attributes?: Record<ENTITIES, Attributes>;\n plugins?: PluginCollection;\n}\n\nexport interface CmsContext extends BaseCmsContext {\n [key: string]: any;\n}\n\nexport interface HeadlessCmsStorageOperations extends BaseHeadlessCmsStorageOperations<CmsContext> {\n getTable: () => Table<string, string, string>;\n getEsTable: () => Table<string, string, string>;\n getEntities: () => Record<\n \"system\" | \"groups\" | \"models\" | \"entries\" | \"entriesEs\",\n Entity<any>\n >;\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":";;;;;;AAgBA;AACA;AACA;AACA;AACA;AACA;AAiBA;AACA;AACA;AACA;AACA;AACA;AAiBA;AACA;AACA;AACA;AACA;AACA;AAsBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,IA2DYA,QAAQ,GAAAC,OAAA,CAAAD,QAAA,0BAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA","ignoreList":[]}
|