@webiny/api-headless-cms-ddb-es 0.0.0-unstable.d7f521b032 → 0.0.0-unstable.dbdf5d6258
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 -30
- package/configurations.d.ts +12 -6
- package/configurations.js +20 -18
- package/configurations.js.map +1 -1
- package/definitions/entry.d.ts +4 -5
- package/definitions/entry.js +7 -79
- package/definitions/entry.js.map +1 -1
- package/definitions/group.d.ts +6 -6
- package/definitions/group.js +7 -59
- package/definitions/group.js.map +1 -1
- package/definitions/model.d.ts +6 -6
- package/definitions/model.js +7 -86
- package/definitions/model.js.map +1 -1
- package/definitions/types.d.ts +60 -0
- package/definitions/types.js +3 -0
- package/definitions/types.js.map +1 -0
- package/dynamoDb/index.d.ts +2 -1
- package/dynamoDb/index.js +7 -10
- package/dynamoDb/index.js.map +1 -1
- package/dynamoDb/storage/longText.js +15 -18
- package/dynamoDb/storage/longText.js.map +1 -1
- package/dynamoDb/storage/richText.d.ts +0 -5
- package/dynamoDb/storage/richText.js +29 -86
- package/dynamoDb/storage/richText.js.map +1 -1
- package/elasticsearch/createElasticsearchIndex.d.ts +4 -4
- package/elasticsearch/createElasticsearchIndex.js +23 -40
- package/elasticsearch/createElasticsearchIndex.js.map +1 -1
- package/elasticsearch/deleteElasticsearchIndex.d.ts +3 -3
- package/elasticsearch/deleteElasticsearchIndex.js +8 -13
- package/elasticsearch/deleteElasticsearchIndex.js.map +1 -1
- package/elasticsearch/index.d.ts +1 -1
- package/elasticsearch/index.js +4 -10
- package/elasticsearch/index.js.map +1 -1
- package/elasticsearch/indexing/dateTimeIndexing.d.ts +1 -1
- package/elasticsearch/indexing/dateTimeIndexing.js +5 -10
- package/elasticsearch/indexing/dateTimeIndexing.js.map +1 -1
- package/elasticsearch/indexing/defaultFieldIndexing.d.ts +1 -1
- package/elasticsearch/indexing/defaultFieldIndexing.js +3 -8
- package/elasticsearch/indexing/defaultFieldIndexing.js.map +1 -1
- package/elasticsearch/indexing/index.d.ts +1 -1
- package/elasticsearch/indexing/index.js +9 -14
- package/elasticsearch/indexing/index.js.map +1 -1
- package/elasticsearch/indexing/jsonIndexing.d.ts +2 -0
- package/elasticsearch/indexing/jsonIndexing.js +21 -0
- package/elasticsearch/indexing/jsonIndexing.js.map +1 -0
- package/elasticsearch/indexing/longTextIndexing.d.ts +1 -1
- package/elasticsearch/indexing/longTextIndexing.js +5 -16
- package/elasticsearch/indexing/longTextIndexing.js.map +1 -1
- package/elasticsearch/indexing/numberIndexing.d.ts +1 -1
- package/elasticsearch/indexing/numberIndexing.js +3 -8
- package/elasticsearch/indexing/numberIndexing.js.map +1 -1
- package/elasticsearch/indexing/objectIndexing.d.ts +1 -1
- package/elasticsearch/indexing/objectIndexing.js +25 -27
- package/elasticsearch/indexing/objectIndexing.js.map +1 -1
- package/elasticsearch/indexing/richTextIndexing.d.ts +1 -1
- package/elasticsearch/indexing/richTextIndexing.js +3 -8
- package/elasticsearch/indexing/richTextIndexing.js.map +1 -1
- package/elasticsearch/indices/base.d.ts +1 -1
- package/elasticsearch/indices/base.js +6 -11
- package/elasticsearch/indices/base.js.map +1 -1
- package/elasticsearch/indices/index.d.ts +1 -1
- package/elasticsearch/indices/index.js +5 -11
- package/elasticsearch/indices/index.js.map +1 -1
- package/elasticsearch/search/index.d.ts +1 -1
- package/elasticsearch/search/index.js +5 -9
- package/elasticsearch/search/index.js.map +1 -1
- package/elasticsearch/search/refSearch.d.ts +1 -1
- package/elasticsearch/search/refSearch.js +5 -10
- package/elasticsearch/search/refSearch.js.map +1 -1
- package/elasticsearch/search/searchableJson.d.ts +2 -0
- package/elasticsearch/search/searchableJson.js +53 -0
- package/elasticsearch/search/searchableJson.js.map +1 -0
- package/elasticsearch/search/timeSearch.d.ts +1 -1
- package/elasticsearch/search/timeSearch.js +6 -12
- package/elasticsearch/search/timeSearch.js.map +1 -1
- package/helpers/entryIndexHelpers.d.ts +10 -10
- package/helpers/entryIndexHelpers.js +61 -40
- package/helpers/entryIndexHelpers.js.map +1 -1
- package/helpers/fieldIdentifier.d.ts +6 -0
- package/helpers/fieldIdentifier.js +35 -0
- package/helpers/fieldIdentifier.js.map +1 -0
- package/helpers/index.d.ts +2 -1
- package/helpers/index.js +3 -15
- package/helpers/index.js.map +1 -1
- package/index.d.ts +2 -2
- package/index.js +119 -147
- package/index.js.map +1 -1
- package/operations/entry/dataLoader/DataLoaderCache.d.ts +15 -0
- package/operations/entry/dataLoader/DataLoaderCache.js +34 -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 +4 -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 +19 -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 +32 -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 +50 -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 +19 -0
- package/operations/entry/dataLoader/index.js.map +1 -0
- package/operations/entry/dataLoader/types.d.ts +5 -0
- package/operations/entry/dataLoader/types.js +3 -0
- package/operations/entry/dataLoader/types.js.map +1 -0
- package/operations/entry/dataLoaders.d.ts +17 -38
- package/operations/entry/dataLoaders.js +57 -264
- package/operations/entry/dataLoaders.js.map +1 -1
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +1 -1
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +3 -8
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +1 -1
- package/operations/entry/elasticsearch/body.d.ts +3 -3
- package/operations/entry/elasticsearch/body.js +24 -29
- package/operations/entry/elasticsearch/body.js.map +1 -1
- package/operations/entry/elasticsearch/fields/createSystemField.d.ts +4 -0
- package/operations/entry/elasticsearch/fields/createSystemField.js +10 -0
- package/operations/entry/elasticsearch/fields/createSystemField.js.map +1 -0
- package/operations/entry/elasticsearch/fields/live.d.ts +2 -0
- package/operations/entry/elasticsearch/fields/live.js +45 -0
- package/operations/entry/elasticsearch/fields/live.js.map +1 -0
- package/operations/entry/elasticsearch/fields/location.d.ts +2 -0
- package/operations/entry/elasticsearch/fields/location.js +45 -0
- package/operations/entry/elasticsearch/fields/location.js.map +1 -0
- package/operations/entry/elasticsearch/fields/state.d.ts +2 -0
- package/operations/entry/elasticsearch/fields/state.js +93 -0
- package/operations/entry/elasticsearch/fields/state.js.map +1 -0
- package/operations/entry/elasticsearch/fields.d.ts +6 -5
- package/operations/entry/elasticsearch/fields.js +161 -116
- package/operations/entry/elasticsearch/fields.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +2 -2
- package/operations/entry/elasticsearch/filtering/applyFiltering.js +12 -17
- package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/exec.d.ts +7 -6
- package/operations/entry/elasticsearch/filtering/exec.js +50 -44
- package/operations/entry/elasticsearch/filtering/exec.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/index.d.ts +1 -1
- package/operations/entry/elasticsearch/filtering/index.js +2 -15
- package/operations/entry/elasticsearch/filtering/index.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/path.d.ts +2 -1
- package/operations/entry/elasticsearch/filtering/path.js +11 -17
- package/operations/entry/elasticsearch/filtering/path.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.d.ts +1 -1
- package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js +9 -15
- package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/plugins/index.d.ts +1 -1
- package/operations/entry/elasticsearch/filtering/plugins/index.js +7 -12
- package/operations/entry/elasticsearch/filtering/plugins/index.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.d.ts +1 -1
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js +11 -15
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.d.ts +1 -1
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js +17 -16
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/populated.d.ts +1 -1
- package/operations/entry/elasticsearch/filtering/populated.js +4 -9
- package/operations/entry/elasticsearch/filtering/populated.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/values.d.ts +1 -1
- package/operations/entry/elasticsearch/filtering/values.js +6 -12
- package/operations/entry/elasticsearch/filtering/values.js.map +1 -1
- package/operations/entry/elasticsearch/fullTextSearch.d.ts +3 -3
- package/operations/entry/elasticsearch/fullTextSearch.js +8 -12
- package/operations/entry/elasticsearch/fullTextSearch.js.map +1 -1
- package/operations/entry/elasticsearch/fullTextSearchFields.d.ts +1 -1
- package/operations/entry/elasticsearch/fullTextSearchFields.js +3 -8
- package/operations/entry/elasticsearch/fullTextSearchFields.js.map +1 -1
- package/operations/entry/elasticsearch/initialQuery.d.ts +2 -2
- package/operations/entry/elasticsearch/initialQuery.js +11 -26
- package/operations/entry/elasticsearch/initialQuery.js.map +1 -1
- package/operations/entry/elasticsearch/keyword.d.ts +1 -1
- package/operations/entry/elasticsearch/keyword.js +6 -9
- package/operations/entry/elasticsearch/keyword.js.map +1 -1
- package/operations/entry/elasticsearch/plugins/bodyModifier.d.ts +4 -4
- package/operations/entry/elasticsearch/plugins/bodyModifier.js +5 -10
- package/operations/entry/elasticsearch/plugins/bodyModifier.js.map +1 -1
- package/operations/entry/elasticsearch/plugins/operator.d.ts +2 -3
- package/operations/entry/elasticsearch/plugins/operator.js +6 -19
- package/operations/entry/elasticsearch/plugins/operator.js.map +1 -1
- package/operations/entry/elasticsearch/plugins/queryModifier.d.ts +4 -4
- package/operations/entry/elasticsearch/plugins/queryModifier.js +5 -10
- package/operations/entry/elasticsearch/plugins/queryModifier.js.map +1 -1
- package/operations/entry/elasticsearch/plugins/search.d.ts +2 -2
- package/operations/entry/elasticsearch/plugins/search.js +7 -13
- package/operations/entry/elasticsearch/plugins/search.js.map +1 -1
- package/operations/entry/elasticsearch/plugins/sortModifier.d.ts +4 -4
- package/operations/entry/elasticsearch/plugins/sortModifier.js +5 -10
- package/operations/entry/elasticsearch/plugins/sortModifier.js.map +1 -1
- package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.d.ts +2 -0
- package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js +6 -0
- package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js.map +1 -0
- package/operations/entry/elasticsearch/sort.d.ts +4 -4
- package/operations/entry/elasticsearch/sort.js +61 -36
- package/operations/entry/elasticsearch/sort.js.map +1 -1
- package/operations/entry/elasticsearch/transformValueForSearch.d.ts +2 -2
- package/operations/entry/elasticsearch/transformValueForSearch.js +6 -9
- package/operations/entry/elasticsearch/transformValueForSearch.js.map +1 -1
- package/operations/entry/elasticsearch/types.d.ts +8 -8
- package/operations/entry/elasticsearch/types.js +2 -4
- package/operations/entry/elasticsearch/types.js.map +1 -1
- package/operations/entry/index.d.ts +7 -6
- package/operations/entry/index.js +1193 -622
- package/operations/entry/index.js.map +1 -1
- package/operations/entry/keys.d.ts +31 -1
- package/operations/entry/keys.js +58 -19
- package/operations/entry/keys.js.map +1 -1
- package/operations/entry/recordType.js +5 -12
- package/operations/entry/recordType.js.map +1 -1
- package/operations/entry/transformations/convertEntryKeys.d.ts +8 -0
- package/operations/entry/transformations/convertEntryKeys.js +30 -0
- package/operations/entry/transformations/convertEntryKeys.js.map +1 -0
- package/operations/entry/transformations/index.d.ts +29 -0
- package/operations/entry/transformations/index.js +119 -0
- package/operations/entry/transformations/index.js.map +1 -0
- package/operations/entry/transformations/modifyEntryValues.d.ts +52 -0
- package/operations/entry/transformations/modifyEntryValues.js +21 -0
- package/operations/entry/transformations/modifyEntryValues.js.map +1 -0
- package/operations/entry/transformations/transformEntryKeys.d.ts +11 -0
- package/operations/entry/transformations/transformEntryKeys.js +20 -0
- package/operations/entry/transformations/transformEntryKeys.js.map +1 -0
- package/operations/entry/transformations/transformEntryToIndex.d.ts +10 -0
- package/operations/entry/transformations/transformEntryToIndex.js +24 -0
- package/operations/entry/transformations/transformEntryToIndex.js.map +1 -0
- package/operations/group/index.d.ts +6 -5
- package/operations/group/index.js +47 -67
- package/operations/group/index.js.map +1 -1
- package/operations/model/index.d.ts +4 -4
- package/operations/model/index.js +39 -46
- package/operations/model/index.js.map +1 -1
- package/package.json +35 -37
- package/plugins/CmsElasticsearchModelFieldPlugin.d.ts +69 -0
- package/plugins/CmsElasticsearchModelFieldPlugin.js +46 -0
- package/plugins/CmsElasticsearchModelFieldPlugin.js.map +1 -0
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +3 -2
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +6 -15
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.d.ts +2 -2
- package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js +6 -15
- package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchIndexPlugin.js +5 -11
- package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.d.ts +3 -2
- package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +10 -15
- package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +3 -2
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +6 -15
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +3 -2
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +6 -15
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchValuesModifier.d.ts +33 -0
- package/plugins/CmsEntryElasticsearchValuesModifier.js +42 -0
- package/plugins/CmsEntryElasticsearchValuesModifier.js.map +1 -0
- package/plugins/CmsEntryFilterPlugin.d.ts +3 -3
- package/plugins/CmsEntryFilterPlugin.js +6 -15
- package/plugins/CmsEntryFilterPlugin.js.map +1 -1
- package/plugins/index.d.ts +8 -7
- package/plugins/index.js +9 -81
- package/plugins/index.js.map +1 -1
- package/tasks/createIndexTaskPlugin.d.ts +2 -0
- package/tasks/createIndexTaskPlugin.js +41 -0
- package/tasks/createIndexTaskPlugin.js.map +1 -0
- package/types.d.ts +38 -36
- package/types.js +9 -12
- package/types.js.map +1 -1
- package/values/NoValueContainer.d.ts +5 -0
- package/values/NoValueContainer.js +13 -0
- package/values/NoValueContainer.js.map +1 -0
- package/definitions/entryElasticsearch.d.ts +0 -8
- package/definitions/entryElasticsearch.js +0 -37
- package/definitions/entryElasticsearch.js.map +0 -1
- package/definitions/settings.d.ts +0 -8
- package/definitions/settings.js +0 -53
- package/definitions/settings.js.map +0 -1
- package/definitions/system.d.ts +0 -8
- package/definitions/system.js +0 -41
- package/definitions/system.js.map +0 -1
- package/definitions/table.d.ts +0 -8
- package/definitions/table.js +0 -21
- package/definitions/table.js.map +0 -1
- package/definitions/tableElasticsearch.d.ts +0 -8
- package/definitions/tableElasticsearch.js +0 -21
- package/definitions/tableElasticsearch.js.map +0 -1
- package/dynamoDb/storage/date.d.ts +0 -3
- package/dynamoDb/storage/date.js +0 -84
- package/dynamoDb/storage/date.js.map +0 -1
- package/elasticsearch/indices/japanese.d.ts +0 -2
- package/elasticsearch/indices/japanese.js +0 -13
- package/elasticsearch/indices/japanese.js.map +0 -1
- package/operations/settings/index.d.ts +0 -6
- package/operations/settings/index.js +0 -111
- package/operations/settings/index.js.map +0 -1
- package/operations/system/index.d.ts +0 -6
- package/operations/system/index.js +0 -82
- package/operations/system/index.js.map +0 -1
- package/plugins/CmsEntryElasticsearchFieldPlugin.d.ts +0 -12
- package/plugins/CmsEntryElasticsearchFieldPlugin.js +0 -18
- package/plugins/CmsEntryElasticsearchFieldPlugin.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,35 +1,11 @@
|
|
|
1
1
|
# @webiny/api-headless-cms-ddb-es
|
|
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-es
|
|
12
|
-
```
|
|
9
|
+
---
|
|
13
10
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
yarn add @webiny/api-headless-cms-ddb-es
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
## Testing
|
|
22
|
-
To run the tests only for this package you must filter it with keywords.
|
|
23
|
-
|
|
24
|
-
### Env variables
|
|
25
|
-
|
|
26
|
-
###### LOCAL_ELASTICSEARCH
|
|
27
|
-
If set, does not run Elasticsearch when starting the tests, use local one. You must install it and run if, of course.
|
|
28
|
-
|
|
29
|
-
###### ELASTICSEARCH_PORT
|
|
30
|
-
Custom port for local elasticsearch.
|
|
31
|
-
|
|
32
|
-
### Command
|
|
33
|
-
````
|
|
34
|
-
ELASTICSEARCH_PORT=9200 LOCAL_ELASTICSEARCH=true yarn test packages/api-headless-cms --keyword=cms:ddb-es --keyword=cms:base
|
|
35
|
-
````
|
|
11
|
+
_This README file is automatically generated during the publish process._
|
package/configurations.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import { CmsModel } from "@webiny/api-headless-cms/types";
|
|
2
|
-
|
|
1
|
+
import type { CmsModel } from "@webiny/api-headless-cms/types/index.js";
|
|
2
|
+
import type { CmsContext } from "./types.js";
|
|
3
|
+
import type { ElasticsearchIndexRequestBody } from "@webiny/api-elasticsearch/types.js";
|
|
4
|
+
interface ConfigurationsElasticsearch {
|
|
3
5
|
index: string;
|
|
4
6
|
}
|
|
5
|
-
interface CmsElasticsearchParams {
|
|
6
|
-
model: CmsModel
|
|
7
|
+
export interface CmsElasticsearchParams {
|
|
8
|
+
model: Pick<CmsModel, "tenant" | "modelId">;
|
|
7
9
|
}
|
|
8
|
-
interface
|
|
9
|
-
|
|
10
|
+
export interface ConfigurationsIndexSettingsParams {
|
|
11
|
+
context: CmsContext;
|
|
12
|
+
}
|
|
13
|
+
export interface Configurations {
|
|
14
|
+
es: (params: CmsElasticsearchParams) => ConfigurationsElasticsearch;
|
|
15
|
+
indexSettings: (params: ConfigurationsIndexSettingsParams) => Partial<ElasticsearchIndexRequestBody>;
|
|
10
16
|
}
|
|
11
17
|
export declare const configurations: Configurations;
|
|
12
18
|
export {};
|
package/configurations.js
CHANGED
|
@@ -1,27 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.configurations = void 0;
|
|
8
|
-
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
9
|
-
const configurations = {
|
|
1
|
+
import WebinyError from "@webiny/error";
|
|
2
|
+
import { getElasticsearchIndexPrefix, getLastAddedIndexPlugin, isSharedElasticsearchIndex } from "@webiny/api-elasticsearch";
|
|
3
|
+
import { CmsEntryElasticsearchIndexPlugin } from "./plugins/index.js";
|
|
4
|
+
export const configurations = {
|
|
10
5
|
es({
|
|
11
6
|
model
|
|
12
7
|
}) {
|
|
13
8
|
const {
|
|
14
|
-
tenant
|
|
15
|
-
locale
|
|
9
|
+
tenant
|
|
16
10
|
} = model;
|
|
17
11
|
if (!tenant) {
|
|
18
|
-
throw new
|
|
19
|
-
} else if (!locale) {
|
|
20
|
-
throw new _error.default(`Missing "locale" parameter when trying to create Elasticsearch index name.`, "LOCALE_ERROR");
|
|
12
|
+
throw new WebinyError(`Missing "tenant" parameter when trying to create Elasticsearch index name.`, "TENANT_ERROR");
|
|
21
13
|
}
|
|
22
|
-
const sharedIndex =
|
|
23
|
-
const index = [sharedIndex ? "root" : tenant, "headless-cms",
|
|
24
|
-
const prefix =
|
|
14
|
+
const sharedIndex = isSharedElasticsearchIndex();
|
|
15
|
+
const index = [sharedIndex ? "root" : tenant, "headless-cms", model.modelId].join("-").toLowerCase();
|
|
16
|
+
const prefix = getElasticsearchIndexPrefix();
|
|
25
17
|
if (!prefix) {
|
|
26
18
|
return {
|
|
27
19
|
index
|
|
@@ -30,6 +22,16 @@ const configurations = {
|
|
|
30
22
|
return {
|
|
31
23
|
index: prefix + index
|
|
32
24
|
};
|
|
25
|
+
},
|
|
26
|
+
indexSettings: ({
|
|
27
|
+
context
|
|
28
|
+
}) => {
|
|
29
|
+
const plugin = getLastAddedIndexPlugin({
|
|
30
|
+
container: context.plugins,
|
|
31
|
+
type: CmsEntryElasticsearchIndexPlugin.type
|
|
32
|
+
});
|
|
33
|
+
return plugin ? plugin.body : {};
|
|
33
34
|
}
|
|
34
35
|
};
|
|
35
|
-
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=configurations.js.map
|
package/configurations.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["WebinyError","getElasticsearchIndexPrefix","getLastAddedIndexPlugin","isSharedElasticsearchIndex","CmsEntryElasticsearchIndexPlugin","configurations","es","model","tenant","sharedIndex","index","modelId","join","toLowerCase","prefix","indexSettings","context","plugin","container","plugins","type","body"],"sources":["configurations.ts"],"sourcesContent":["import type { CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport WebinyError from \"@webiny/error\";\nimport type { CmsContext } from \"~/types.js\";\nimport {\n getElasticsearchIndexPrefix,\n getLastAddedIndexPlugin,\n isSharedElasticsearchIndex\n} from \"@webiny/api-elasticsearch\";\nimport type { ElasticsearchIndexRequestBody } from \"@webiny/api-elasticsearch/types.js\";\nimport { CmsEntryElasticsearchIndexPlugin } from \"~/plugins/index.js\";\n\ninterface ConfigurationsElasticsearch {\n index: string;\n}\n\nexport interface CmsElasticsearchParams {\n model: Pick<CmsModel, \"tenant\" | \"modelId\">;\n}\n\nexport interface ConfigurationsIndexSettingsParams {\n context: CmsContext;\n}\n\nexport interface Configurations {\n es: (params: CmsElasticsearchParams) => ConfigurationsElasticsearch;\n indexSettings: (\n params: ConfigurationsIndexSettingsParams\n ) => Partial<ElasticsearchIndexRequestBody>;\n}\n\nexport const configurations: Configurations = {\n es({ model }) {\n const { tenant } = model;\n\n if (!tenant) {\n throw new WebinyError(\n `Missing \"tenant\" parameter when trying to create Elasticsearch index name.`,\n \"TENANT_ERROR\"\n );\n }\n\n const sharedIndex = isSharedElasticsearchIndex();\n const index = [sharedIndex ? \"root\" : tenant, \"headless-cms\", model.modelId]\n .join(\"-\")\n .toLowerCase();\n\n const prefix = getElasticsearchIndexPrefix();\n\n if (!prefix) {\n return {\n index\n };\n }\n return {\n index: prefix + index\n };\n },\n indexSettings: ({ context }) => {\n const plugin = getLastAddedIndexPlugin<CmsEntryElasticsearchIndexPlugin>({\n container: context.plugins,\n type: CmsEntryElasticsearchIndexPlugin.type\n });\n\n return plugin ? plugin.body : {};\n }\n};\n"],"mappings":"AACA,OAAOA,WAAW,MAAM,eAAe;AAEvC,SACIC,2BAA2B,EAC3BC,uBAAuB,EACvBC,0BAA0B,QACvB,2BAA2B;AAElC,SAASC,gCAAgC;AAqBzC,OAAO,MAAMC,cAA8B,GAAG;EAC1CC,EAAEA,CAAC;IAAEC;EAAM,CAAC,EAAE;IACV,MAAM;MAAEC;IAAO,CAAC,GAAGD,KAAK;IAExB,IAAI,CAACC,MAAM,EAAE;MACT,MAAM,IAAIR,WAAW,CACjB,4EAA4E,EAC5E,cACJ,CAAC;IACL;IAEA,MAAMS,WAAW,GAAGN,0BAA0B,CAAC,CAAC;IAChD,MAAMO,KAAK,GAAG,CAACD,WAAW,GAAG,MAAM,GAAGD,MAAM,EAAE,cAAc,EAAED,KAAK,CAACI,OAAO,CAAC,CACvEC,IAAI,CAAC,GAAG,CAAC,CACTC,WAAW,CAAC,CAAC;IAElB,MAAMC,MAAM,GAAGb,2BAA2B,CAAC,CAAC;IAE5C,IAAI,CAACa,MAAM,EAAE;MACT,OAAO;QACHJ;MACJ,CAAC;IACL;IACA,OAAO;MACHA,KAAK,EAAEI,MAAM,GAAGJ;IACpB,CAAC;EACL,CAAC;EACDK,aAAa,EAAEA,CAAC;IAAEC;EAAQ,CAAC,KAAK;IAC5B,MAAMC,MAAM,GAAGf,uBAAuB,CAAmC;MACrEgB,SAAS,EAAEF,OAAO,CAACG,OAAO;MAC1BC,IAAI,EAAEhB,gCAAgC,CAACgB;IAC3C,CAAC,CAAC;IAEF,OAAOH,MAAM,GAAGA,MAAM,CAACI,IAAI,GAAG,CAAC,CAAC;EACpC;AACJ,CAAC","ignoreList":[]}
|
package/definitions/entry.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { type ITable } from "@webiny/db-dynamodb";
|
|
2
|
+
import type { IEntryEntity } from "../definitions/types.js";
|
|
3
3
|
export interface CreateEntryEntityParams {
|
|
4
|
-
table:
|
|
4
|
+
table: ITable;
|
|
5
5
|
entityName: string;
|
|
6
|
-
attributes: Attributes;
|
|
7
6
|
}
|
|
8
|
-
export declare const createEntryEntity: (params: CreateEntryEntityParams) =>
|
|
7
|
+
export declare const createEntryEntity: (params: CreateEntryEntityParams) => IEntryEntity;
|
package/definitions/entry.js
CHANGED
|
@@ -1,85 +1,13 @@
|
|
|
1
|
-
|
|
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 => {
|
|
1
|
+
import { createStandardEntity } from "@webiny/db-dynamodb";
|
|
2
|
+
export const createEntryEntity = params => {
|
|
11
3
|
const {
|
|
12
4
|
table,
|
|
13
|
-
entityName
|
|
14
|
-
attributes
|
|
5
|
+
entityName
|
|
15
6
|
} = params;
|
|
16
|
-
return
|
|
7
|
+
return createStandardEntity({
|
|
17
8
|
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
|
-
TYPE: {
|
|
29
|
-
type: "string"
|
|
30
|
-
},
|
|
31
|
-
__type: {
|
|
32
|
-
type: "string"
|
|
33
|
-
},
|
|
34
|
-
webinyVersion: {
|
|
35
|
-
type: "string"
|
|
36
|
-
},
|
|
37
|
-
tenant: {
|
|
38
|
-
type: "string"
|
|
39
|
-
},
|
|
40
|
-
entryId: {
|
|
41
|
-
type: "string"
|
|
42
|
-
},
|
|
43
|
-
id: {
|
|
44
|
-
type: "string"
|
|
45
|
-
},
|
|
46
|
-
createdBy: {
|
|
47
|
-
type: "map"
|
|
48
|
-
},
|
|
49
|
-
ownedBy: {
|
|
50
|
-
type: "map"
|
|
51
|
-
},
|
|
52
|
-
createdOn: {
|
|
53
|
-
type: "string"
|
|
54
|
-
},
|
|
55
|
-
savedOn: {
|
|
56
|
-
type: "string"
|
|
57
|
-
},
|
|
58
|
-
modelId: {
|
|
59
|
-
type: "string"
|
|
60
|
-
},
|
|
61
|
-
locale: {
|
|
62
|
-
type: "string"
|
|
63
|
-
},
|
|
64
|
-
publishedOn: {
|
|
65
|
-
type: "string"
|
|
66
|
-
},
|
|
67
|
-
version: {
|
|
68
|
-
type: "number"
|
|
69
|
-
},
|
|
70
|
-
locked: {
|
|
71
|
-
type: "boolean"
|
|
72
|
-
},
|
|
73
|
-
status: {
|
|
74
|
-
type: "string"
|
|
75
|
-
},
|
|
76
|
-
values: {
|
|
77
|
-
type: "map"
|
|
78
|
-
},
|
|
79
|
-
meta: {
|
|
80
|
-
type: "map"
|
|
81
|
-
}
|
|
82
|
-
}, attributes || {})
|
|
9
|
+
table: table.table
|
|
83
10
|
});
|
|
84
11
|
};
|
|
85
|
-
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=entry.js.map
|
package/definitions/entry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createEntryEntity","params","table","entityName","
|
|
1
|
+
{"version":3,"names":["createStandardEntity","createEntryEntity","params","table","entityName","name"],"sources":["entry.ts"],"sourcesContent":["import { createStandardEntity, type ITable } from \"@webiny/db-dynamodb\";\nimport type { IEntryEntity, IEntryEntityAttributesData } from \"~/definitions/types.js\";\n\nexport interface CreateEntryEntityParams {\n table: ITable;\n entityName: string;\n}\nexport const createEntryEntity = (params: CreateEntryEntityParams): IEntryEntity => {\n const { table, entityName } = params;\n return createStandardEntity<IEntryEntityAttributesData>({\n name: entityName,\n table: table.table\n });\n};\n"],"mappings":"AAAA,SAASA,oBAAoB,QAAqB,qBAAqB;AAOvE,OAAO,MAAMC,iBAAiB,GAAIC,MAA+B,IAAmB;EAChF,MAAM;IAAEC,KAAK;IAAEC;EAAW,CAAC,GAAGF,MAAM;EACpC,OAAOF,oBAAoB,CAA6B;IACpDK,IAAI,EAAED,UAAU;IAChBD,KAAK,EAAEA,KAAK,CAACA;EACjB,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
|
package/definitions/group.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
table:
|
|
1
|
+
import { type ITable } from "@webiny/db-dynamodb";
|
|
2
|
+
import type { IGroupEntity } from "../definitions/types.js";
|
|
3
|
+
interface Params {
|
|
4
|
+
table: ITable;
|
|
5
5
|
entityName: string;
|
|
6
|
-
attributes: Attributes;
|
|
7
6
|
}
|
|
8
|
-
export declare const createGroupEntity: (params:
|
|
7
|
+
export declare const createGroupEntity: (params: Params) => IGroupEntity;
|
|
8
|
+
export {};
|
package/definitions/group.js
CHANGED
|
@@ -1,65 +1,13 @@
|
|
|
1
|
-
|
|
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 => {
|
|
1
|
+
import { createStandardEntity } from "@webiny/db-dynamodb";
|
|
2
|
+
export const createGroupEntity = params => {
|
|
11
3
|
const {
|
|
12
4
|
table,
|
|
13
|
-
attributes,
|
|
14
5
|
entityName
|
|
15
6
|
} = params;
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
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 || {})
|
|
7
|
+
return createStandardEntity({
|
|
8
|
+
table: table.table,
|
|
9
|
+
name: entityName
|
|
63
10
|
});
|
|
64
11
|
};
|
|
65
|
-
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=group.js.map
|
package/definitions/group.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createGroupEntity","params","table","
|
|
1
|
+
{"version":3,"names":["createStandardEntity","createGroupEntity","params","table","entityName","name"],"sources":["group.ts"],"sourcesContent":["import { createStandardEntity, type ITable } from \"@webiny/db-dynamodb\";\nimport type { IGroupEntity } from \"~/definitions/types.js\";\nimport type { CmsGroup } from \"@webiny/api-headless-cms/types/index.js\";\n\ninterface Params {\n table: ITable;\n entityName: string;\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"],"mappings":"AAAA,SAASA,oBAAoB,QAAqB,qBAAqB;AAQvE,OAAO,MAAMC,iBAAiB,GAAIC,MAAc,IAAmB;EAC/D,MAAM;IAAEC,KAAK;IAAEC;EAAW,CAAC,GAAGF,MAAM;EACpC,OAAOF,oBAAoB,CAAW;IAClCG,KAAK,EAAEA,KAAK,CAACA,KAAK;IAClBE,IAAI,EAAED;EACV,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
|
package/definitions/model.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
table:
|
|
1
|
+
import { type ITable } from "@webiny/db-dynamodb";
|
|
2
|
+
import type { IModelEntity } from "../definitions/types.js";
|
|
3
|
+
interface Params {
|
|
4
|
+
table: ITable;
|
|
5
5
|
entityName: string;
|
|
6
|
-
attributes: Attributes;
|
|
7
6
|
}
|
|
8
|
-
export declare const createModelEntity: (params:
|
|
7
|
+
export declare const createModelEntity: (params: Params) => IModelEntity;
|
|
8
|
+
export {};
|
package/definitions/model.js
CHANGED
|
@@ -1,92 +1,13 @@
|
|
|
1
|
-
|
|
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 => {
|
|
1
|
+
import { createStandardEntity } from "@webiny/db-dynamodb";
|
|
2
|
+
export const createModelEntity = params => {
|
|
11
3
|
const {
|
|
12
4
|
table,
|
|
13
|
-
attributes,
|
|
14
5
|
entityName
|
|
15
6
|
} = params;
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
locale: {
|
|
43
|
-
type: "string",
|
|
44
|
-
required: true
|
|
45
|
-
},
|
|
46
|
-
group: {
|
|
47
|
-
type: "map",
|
|
48
|
-
required: true
|
|
49
|
-
},
|
|
50
|
-
description: {
|
|
51
|
-
type: "string"
|
|
52
|
-
},
|
|
53
|
-
createdOn: {
|
|
54
|
-
type: "string",
|
|
55
|
-
required: true
|
|
56
|
-
},
|
|
57
|
-
savedOn: {
|
|
58
|
-
type: "string",
|
|
59
|
-
required: true
|
|
60
|
-
},
|
|
61
|
-
createdBy: {
|
|
62
|
-
type: "map",
|
|
63
|
-
required: true
|
|
64
|
-
},
|
|
65
|
-
fields: {
|
|
66
|
-
type: "list",
|
|
67
|
-
required: true
|
|
68
|
-
},
|
|
69
|
-
layout: {
|
|
70
|
-
type: "list",
|
|
71
|
-
required: true
|
|
72
|
-
},
|
|
73
|
-
tags: {
|
|
74
|
-
type: "list",
|
|
75
|
-
required: false,
|
|
76
|
-
default: []
|
|
77
|
-
},
|
|
78
|
-
lockedFields: {
|
|
79
|
-
type: "list",
|
|
80
|
-
required: true
|
|
81
|
-
},
|
|
82
|
-
titleFieldId: {
|
|
83
|
-
type: "string"
|
|
84
|
-
},
|
|
85
|
-
tenant: {
|
|
86
|
-
type: "string",
|
|
87
|
-
required: true
|
|
88
|
-
}
|
|
89
|
-
}, attributes || {})
|
|
7
|
+
return createStandardEntity({
|
|
8
|
+
table: table.table,
|
|
9
|
+
name: entityName
|
|
90
10
|
});
|
|
91
11
|
};
|
|
92
|
-
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=model.js.map
|
package/definitions/model.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createModelEntity","params","table","
|
|
1
|
+
{"version":3,"names":["createStandardEntity","createModelEntity","params","table","entityName","name"],"sources":["model.ts"],"sourcesContent":["import { createStandardEntity, type ITable } from \"@webiny/db-dynamodb\";\nimport type { IModelEntity } from \"~/definitions/types.js\";\nimport type { CmsModel } 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<CmsModel>({\n table: table.table,\n name: entityName\n });\n};\n"],"mappings":"AAAA,SAASA,oBAAoB,QAAqB,qBAAqB;AASvE,OAAO,MAAMC,iBAAiB,GAAIC,MAAc,IAAmB;EAC/D,MAAM;IAAEC,KAAK;IAAEC;EAAW,CAAC,GAAGF,MAAM;EACpC,OAAOF,oBAAoB,CAAW;IAClCG,KAAK,EAAEA,KAAK,CAACA,KAAK;IAClBE,IAAI,EAAED;EACV,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { IEntity, IStandardEntityAttributes } from "@webiny/db-dynamodb";
|
|
2
|
+
import type { GenericRecord } from "@webiny/api/types.js";
|
|
3
|
+
import type { CmsEntryStatus, CmsGroup, CmsIdentity, CmsModel, ICmsEntryLive, ICmsEntryLocation, ICmsEntrySystem } from "@webiny/api-headless-cms/types/index.js";
|
|
4
|
+
export interface IEntryEntityAttributesData {
|
|
5
|
+
tenant: string;
|
|
6
|
+
entryId: string;
|
|
7
|
+
id: string;
|
|
8
|
+
modelId: 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
|
+
}
|
|
57
|
+
export type IEntryEntityAttributes = IStandardEntityAttributes<IEntryEntityAttributesData>;
|
|
58
|
+
export type IModelEntity = IEntity<IStandardEntityAttributes<CmsModel>>;
|
|
59
|
+
export type IGroupEntity = IEntity<IStandardEntityAttributes<CmsGroup>>;
|
|
60
|
+
export type IEntryEntity = IEntity<IEntryEntityAttributes>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { IEntity, IStandardEntityAttributes } from \"@webiny/db-dynamodb\";\nimport type { GenericRecord } from \"@webiny/api/types.js\";\nimport type {\n CmsEntryStatus,\n CmsGroup,\n CmsIdentity,\n CmsModel,\n ICmsEntryLive,\n ICmsEntryLocation,\n ICmsEntrySystem\n} from \"@webiny/api-headless-cms/types/index.js\";\n\nexport interface IEntryEntityAttributesData {\n tenant: string;\n entryId: string;\n id: string;\n modelId: string;\n\n /**\n * Revision-level meta fields. 👇\n */\n revisionCreatedOn: string;\n revisionModifiedOn: string | null;\n revisionSavedOn: string;\n revisionDeletedOn: string | null;\n revisionRestoredOn: string | null;\n revisionFirstPublishedOn: string | null;\n revisionLastPublishedOn: string | null;\n revisionCreatedBy: CmsIdentity;\n revisionModifiedBy: CmsIdentity | null;\n revisionSavedBy: CmsIdentity;\n revisionDeletedBy: CmsIdentity | null;\n revisionRestoredBy: CmsIdentity | null;\n revisionFirstPublishedBy: CmsIdentity | null;\n revisionLastPublishedBy: CmsIdentity | null;\n\n /**\n * Entry-level meta fields. 👇\n */\n createdOn: string;\n modifiedOn: string | null;\n savedOn: string;\n deletedOn: string | null;\n restoredOn: string | null;\n firstPublishedOn: string | null;\n lastPublishedOn: string | null;\n createdBy: CmsIdentity;\n modifiedBy: CmsIdentity | null;\n savedBy: CmsIdentity;\n deletedBy: CmsIdentity | null;\n restoredBy: CmsIdentity | null;\n firstPublishedBy: CmsIdentity | null;\n lastPublishedBy: CmsIdentity | null;\n\n /**\n * The rest. 👇\n */\n version: number;\n locked: boolean;\n status: CmsEntryStatus;\n location?: ICmsEntryLocation;\n wbyDeleted?: boolean | null;\n binOriginalFolderId?: string;\n values: GenericRecord;\n meta?: GenericRecord;\n system?: ICmsEntrySystem;\n live: ICmsEntryLive | null;\n}\n\nexport type IEntryEntityAttributes = IStandardEntityAttributes<IEntryEntityAttributesData>;\n\nexport type IModelEntity = IEntity<IStandardEntityAttributes<CmsModel>>;\nexport type IGroupEntity = IEntity<IStandardEntityAttributes<CmsGroup>>;\nexport type IEntryEntity = IEntity<IEntryEntityAttributes>;\n"],"mappings":"","ignoreList":[]}
|
package/dynamoDb/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const _default: () => import("@webiny/api-headless-cms").StorageTransformPlugin<any, any, import("@webiny/api-headless-cms/types").CmsModelField>[];
|
|
1
|
+
declare const _default: () => import("@webiny/api-headless-cms/index.js").StorageTransformPlugin<any, any, import("@webiny/api-headless-cms/types/modelField.js").CmsModelField>[];
|
|
2
2
|
export default _default;
|
|
3
|
+
export declare const createDynamoDbPlugins: () => import("@webiny/api-headless-cms/index.js").StorageTransformPlugin<any, any, import("@webiny/api-headless-cms/types/modelField.js").CmsModelField>[];
|
package/dynamoDb/index.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { createRichTextStorageTransformPlugin } from "./storage/richText.js";
|
|
2
|
+
import { createLongTextStorageTransformPlugin } from "./storage/longText.js";
|
|
3
|
+
export default () => createDynamoDbPlugins();
|
|
4
|
+
export const createDynamoDbPlugins = () => {
|
|
5
|
+
return [createRichTextStorageTransformPlugin(), createLongTextStorageTransformPlugin()];
|
|
6
|
+
};
|
|
2
7
|
|
|
3
|
-
|
|
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 _default = () => [(0, _richText.createRichTextStorageTransformPlugin)(), (0, _longText.createLongTextStorageTransformPlugin)(), (0, _date.createDateStorageTransformPlugin)()];
|
|
11
|
-
exports.default = _default;
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
package/dynamoDb/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createRichTextStorageTransformPlugin","createLongTextStorageTransformPlugin","
|
|
1
|
+
{"version":3,"names":["createRichTextStorageTransformPlugin","createLongTextStorageTransformPlugin","createDynamoDbPlugins"],"sources":["index.ts"],"sourcesContent":["import { createRichTextStorageTransformPlugin } from \"./storage/richText.js\";\nimport { createLongTextStorageTransformPlugin } from \"./storage/longText.js\";\n\nexport default () => createDynamoDbPlugins();\n\nexport const createDynamoDbPlugins = () => {\n return [createRichTextStorageTransformPlugin(), createLongTextStorageTransformPlugin()];\n};\n"],"mappings":"AAAA,SAASA,oCAAoC;AAC7C,SAASC,oCAAoC;AAE7C,eAAe,MAAMC,qBAAqB,CAAC,CAAC;AAE5C,OAAO,MAAMA,qBAAqB,GAAGA,CAAA,KAAM;EACvC,OAAO,CAACF,oCAAoC,CAAC,CAAC,EAAEC,oCAAoC,CAAC,CAAC,CAAC;AAC3F,CAAC","ignoreList":[]}
|