@webiny/api-headless-cms-ddb-es 5.27.0-beta.0 → 5.28.0

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.
Files changed (54) hide show
  1. package/configurations.js.map +1 -1
  2. package/definitions/entry.js.map +1 -1
  3. package/definitions/entryElasticsearch.js.map +1 -1
  4. package/definitions/group.js.map +1 -1
  5. package/definitions/model.js.map +1 -1
  6. package/definitions/settings.js.map +1 -1
  7. package/definitions/system.js.map +1 -1
  8. package/definitions/table.js.map +1 -1
  9. package/definitions/tableElasticsearch.js.map +1 -1
  10. package/dynamoDb/index.js.map +1 -1
  11. package/dynamoDb/storage/date.js.map +1 -1
  12. package/dynamoDb/storage/longText.js.map +1 -1
  13. package/dynamoDb/storage/richText.js.map +1 -1
  14. package/elasticsearch/createElasticsearchIndex.js.map +1 -1
  15. package/elasticsearch/deleteElasticsearchIndex.js.map +1 -1
  16. package/elasticsearch/index.js.map +1 -1
  17. package/elasticsearch/indexing/dateTimeIndexing.js.map +1 -1
  18. package/elasticsearch/indexing/defaultFieldIndexing.js.map +1 -1
  19. package/elasticsearch/indexing/index.js.map +1 -1
  20. package/elasticsearch/indexing/longTextIndexing.js.map +1 -1
  21. package/elasticsearch/indexing/numberIndexing.js.map +1 -1
  22. package/elasticsearch/indexing/objectIndexing.js.map +1 -1
  23. package/elasticsearch/indexing/richTextIndexing.js.map +1 -1
  24. package/elasticsearch/indices/base.js.map +1 -1
  25. package/elasticsearch/indices/index.js.map +1 -1
  26. package/elasticsearch/indices/japanese.js.map +1 -1
  27. package/elasticsearch/search/index.js.map +1 -1
  28. package/elasticsearch/search/refSearch.js.map +1 -1
  29. package/elasticsearch/search/timeSearch.js.map +1 -1
  30. package/helpers/createElasticsearchQueryBody.js.map +1 -1
  31. package/helpers/entryIndexHelpers.js.map +1 -1
  32. package/helpers/fields.js.map +1 -1
  33. package/helpers/index.js.map +1 -1
  34. package/helpers/searchPluginsList.js.map +1 -1
  35. package/helpers/transformValueForSearch.js.map +1 -1
  36. package/index.js.map +1 -1
  37. package/operations/entry/dataLoaders.js.map +1 -1
  38. package/operations/entry/elasticsearchFields.js.map +1 -1
  39. package/operations/entry/fields.js.map +1 -1
  40. package/operations/entry/index.js.map +1 -1
  41. package/operations/entry/keys.js.map +1 -1
  42. package/operations/group/index.js.map +1 -1
  43. package/operations/model/index.js.map +1 -1
  44. package/operations/settings/index.js.map +1 -1
  45. package/operations/system/index.js.map +1 -1
  46. package/package.json +16 -16
  47. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +1 -1
  48. package/plugins/CmsEntryElasticsearchFieldPlugin.js.map +1 -1
  49. package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +1 -1
  50. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js.map +1 -1
  51. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +1 -1
  52. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +1 -1
  53. package/types.js.map +1 -1
  54. package/upgrades/index.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.27.0-beta.0",
3
+ "version": "5.28.0",
4
4
  "main": "index.js",
5
5
  "keywords": [
6
6
  "@webiny/api-headless-cms",
@@ -22,17 +22,17 @@
22
22
  ],
23
23
  "license": "MIT",
24
24
  "dependencies": {
25
- "@babel/runtime": "7.16.7",
26
- "@webiny/api-elasticsearch": "5.27.0-beta.0",
27
- "@webiny/api-headless-cms": "5.27.0-beta.0",
28
- "@webiny/db-dynamodb": "5.27.0-beta.0",
29
- "@webiny/error": "5.27.0-beta.0",
30
- "@webiny/handler": "5.27.0-beta.0",
31
- "@webiny/handler-aws": "5.27.0-beta.0",
32
- "@webiny/handler-db": "5.27.0-beta.0",
33
- "@webiny/plugins": "5.27.0-beta.0",
34
- "@webiny/utils": "5.27.0-beta.0",
35
- "dataloader": "2.0.0",
25
+ "@babel/runtime": "7.18.3",
26
+ "@webiny/api-elasticsearch": "5.28.0",
27
+ "@webiny/api-headless-cms": "5.28.0",
28
+ "@webiny/db-dynamodb": "5.28.0",
29
+ "@webiny/error": "5.28.0",
30
+ "@webiny/handler": "5.28.0",
31
+ "@webiny/handler-aws": "5.28.0",
32
+ "@webiny/handler-db": "5.28.0",
33
+ "@webiny/plugins": "5.28.0",
34
+ "@webiny/utils": "5.28.0",
35
+ "dataloader": "2.1.0",
36
36
  "dynamodb-toolbox": "0.3.5",
37
37
  "jsonpack": "1.1.5",
38
38
  "lodash": "4.17.21"
@@ -44,9 +44,9 @@
44
44
  "@babel/preset-flow": "^7.16.0",
45
45
  "@elastic/elasticsearch": "7.12.0",
46
46
  "@types/jsonpack": "^1.1.0",
47
- "@webiny/api-dynamodb-to-elasticsearch": "^5.27.0-beta.0",
48
- "@webiny/cli": "^5.27.0-beta.0",
49
- "@webiny/project-utils": "^5.27.0-beta.0",
47
+ "@webiny/api-dynamodb-to-elasticsearch": "^5.28.0",
48
+ "@webiny/cli": "^5.28.0",
49
+ "@webiny/project-utils": "^5.28.0",
50
50
  "jest": "^26.6.3",
51
51
  "jest-dynalite": "^3.2.0",
52
52
  "jest-environment-node": "^26.6.2",
@@ -65,5 +65,5 @@
65
65
  "build": "yarn webiny run build",
66
66
  "watch": "yarn webiny run watch"
67
67
  },
68
- "gitHead": "9e557dd294ae37cf84f17e0e8158c2ed16e2d415"
68
+ "gitHead": "9fd082a2e4a0e0116ee5a07e2a9ca385e8ac0173"
69
69
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["CmsEntryElasticsearchBodyModifierPlugin.ts"],"names":["CmsEntryElasticsearchBodyModifierPlugin","ElasticsearchBodyModifierPlugin","constructor","config","modifyBody","modelId"],"mappings":";;;;;;;;;;;AAAA;;AAmBO,MAAMA,uCAAN,SAAsDC,gEAAtD,CAAwG;AAKpGC,EAAAA,WAAW,CAACC,MAAD,EAAwD;AACtE,UAAMA,MAAM,CAACC,UAAb;AADsE;AAGtE,SAAKC,OAAL,GAAeF,MAAM,CAACE,OAAtB;AACH;;AAT0G;;;8BAAlGL,uC,UACsC,uC","sourcesContent":["import {\n ElasticsearchBodyModifierPlugin,\n ModifyBodyCallable,\n ModifyBodyParams as BaseModifyBodyParams\n} from \"@webiny/api-elasticsearch/plugins/definition/ElasticsearchBodyModifierPlugin\";\nimport { CmsModel } from \"@webiny/api-headless-cms/types\";\n\nexport interface ModifyBodyParams extends BaseModifyBodyParams {\n model: CmsModel;\n}\n\nexport interface CmsEntryElasticsearchBodyModifierPluginConfig {\n modifyBody: ModifyBodyCallable<ModifyBodyParams>;\n /**\n * If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.\n */\n modelId?: string;\n}\n\nexport class CmsEntryElasticsearchBodyModifierPlugin extends ElasticsearchBodyModifierPlugin<ModifyBodyParams> {\n public static override readonly type: string = \"cms.elasticsearch.modifier.body.entry\";\n\n public readonly modelId?: string;\n\n public constructor(config: CmsEntryElasticsearchBodyModifierPluginConfig) {\n super(config.modifyBody);\n\n this.modelId = config.modelId;\n }\n}\n"]}
1
+ {"version":3,"names":["CmsEntryElasticsearchBodyModifierPlugin","ElasticsearchBodyModifierPlugin","constructor","config","modifyBody","modelId"],"sources":["CmsEntryElasticsearchBodyModifierPlugin.ts"],"sourcesContent":["import {\n ElasticsearchBodyModifierPlugin,\n ModifyBodyCallable,\n ModifyBodyParams as BaseModifyBodyParams\n} from \"@webiny/api-elasticsearch/plugins/definition/ElasticsearchBodyModifierPlugin\";\nimport { CmsModel } from \"@webiny/api-headless-cms/types\";\n\nexport interface ModifyBodyParams extends BaseModifyBodyParams {\n model: CmsModel;\n}\n\nexport interface CmsEntryElasticsearchBodyModifierPluginConfig {\n modifyBody: ModifyBodyCallable<ModifyBodyParams>;\n /**\n * If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.\n */\n modelId?: string;\n}\n\nexport class CmsEntryElasticsearchBodyModifierPlugin extends ElasticsearchBodyModifierPlugin<ModifyBodyParams> {\n public static override readonly type: string = \"cms.elasticsearch.modifier.body.entry\";\n\n public readonly modelId?: string;\n\n public constructor(config: CmsEntryElasticsearchBodyModifierPluginConfig) {\n super(config.modifyBody);\n\n this.modelId = config.modelId;\n }\n}\n"],"mappings":";;;;;;;;;;;AAAA;;AAmBO,MAAMA,uCAAN,SAAsDC,gEAAtD,CAAwG;EAKpGC,WAAW,CAACC,MAAD,EAAwD;IACtE,MAAMA,MAAM,CAACC,UAAb;IADsE;IAGtE,KAAKC,OAAL,GAAeF,MAAM,CAACE,OAAtB;EACH;;AAT0G;;;8BAAlGL,uC,UACsC,uC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["CmsEntryElasticsearchFieldPlugin.ts"],"names":["CmsEntryElasticsearchFieldPlugin","ElasticsearchFieldPlugin","constructor","params","modelId"],"mappings":";;;;;;;;;;;AAAA;;AAYO,MAAMA,gCAAN,SAA+CC,kDAA/C,CAAwE;AAKpEC,EAAAA,WAAW,CAACC,MAAD,EAAiD;AAC/D,UAAMA,MAAN;AAD+D;AAG/D,SAAKC,OAAL,GAAeD,MAAM,CAACC,OAAtB;AACH;;AAT0E;;;8BAAlEJ,gC,UACsC,yC","sourcesContent":["import {\n ElasticsearchFieldPlugin,\n ElasticsearchFieldPluginParams as ElasticsearchFieldPluginParamsBaseParams\n} from \"@webiny/api-elasticsearch/plugins/definition/ElasticsearchFieldPlugin\";\n\nexport interface CmsEntryElasticsearchFieldPluginParams\n extends ElasticsearchFieldPluginParamsBaseParams {\n /**\n * If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.\n */\n modelId?: string;\n}\nexport class CmsEntryElasticsearchFieldPlugin extends ElasticsearchFieldPlugin {\n public static override readonly type: string = \"elasticsearch.fieldDefinition.cms.entry\";\n\n public readonly modelId?: string;\n\n public constructor(params: CmsEntryElasticsearchFieldPluginParams) {\n super(params);\n\n this.modelId = params.modelId;\n }\n}\n"]}
1
+ {"version":3,"names":["CmsEntryElasticsearchFieldPlugin","ElasticsearchFieldPlugin","constructor","params","modelId"],"sources":["CmsEntryElasticsearchFieldPlugin.ts"],"sourcesContent":["import {\n ElasticsearchFieldPlugin,\n ElasticsearchFieldPluginParams as ElasticsearchFieldPluginParamsBaseParams\n} from \"@webiny/api-elasticsearch/plugins/definition/ElasticsearchFieldPlugin\";\n\nexport interface CmsEntryElasticsearchFieldPluginParams\n extends ElasticsearchFieldPluginParamsBaseParams {\n /**\n * If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.\n */\n modelId?: string;\n}\nexport class CmsEntryElasticsearchFieldPlugin extends ElasticsearchFieldPlugin {\n public static override readonly type: string = \"elasticsearch.fieldDefinition.cms.entry\";\n\n public readonly modelId?: string;\n\n public constructor(params: CmsEntryElasticsearchFieldPluginParams) {\n super(params);\n\n this.modelId = params.modelId;\n }\n}\n"],"mappings":";;;;;;;;;;;AAAA;;AAYO,MAAMA,gCAAN,SAA+CC,kDAA/C,CAAwE;EAKpEC,WAAW,CAACC,MAAD,EAAiD;IAC/D,MAAMA,MAAN;IAD+D;IAG/D,KAAKC,OAAL,GAAeD,MAAM,CAACC,OAAtB;EACH;;AAT0E;;;8BAAlEJ,gC,UACsC,yC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["CmsEntryElasticsearchIndexPlugin.ts"],"names":["CmsEntryElasticsearchIndexPlugin","ElasticsearchIndexPlugin"],"mappings":";;;;;;;;;;;AAAA;;AAEO,MAAMA,gCAAN,SAA+CC,kDAA/C,CAAwE;;;8BAAlED,gC,UACsC,+B","sourcesContent":["import { ElasticsearchIndexPlugin } from \"@webiny/api-elasticsearch/plugins/definition/ElasticsearchIndexPlugin\";\n\nexport class CmsEntryElasticsearchIndexPlugin extends ElasticsearchIndexPlugin {\n public static override readonly type: string = \"cms.entry.elasticsearch.index\";\n}\n"]}
1
+ {"version":3,"names":["CmsEntryElasticsearchIndexPlugin","ElasticsearchIndexPlugin"],"sources":["CmsEntryElasticsearchIndexPlugin.ts"],"sourcesContent":["import { ElasticsearchIndexPlugin } from \"@webiny/api-elasticsearch/plugins/definition/ElasticsearchIndexPlugin\";\n\nexport class CmsEntryElasticsearchIndexPlugin extends ElasticsearchIndexPlugin {\n public static override readonly type: string = \"cms.entry.elasticsearch.index\";\n}\n"],"mappings":";;;;;;;;;;;AAAA;;AAEO,MAAMA,gCAAN,SAA+CC,kDAA/C,CAAwE;;;8BAAlED,gC,UACsC,+B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["CmsEntryElasticsearchQueryBuilderValueSearchPlugin.ts"],"names":["CmsEntryElasticsearchQueryBuilderValueSearchPlugin","Plugin","fieldType","config","constructor","params","name","type","transform","createPath","path"],"mappings":";;;;;;;;;;;AAAA;;AA0BO,MAAMA,kDAAN,SAAiEC,cAAjE,CAAwE;AAKvD,MAATC,SAAS,GAAW;AAC3B,WAAO,KAAKC,MAAL,CAAYD,SAAnB;AACH;;AAEME,EAAAA,WAAW,CAACC,MAAD,EAAmE;AACjF;AADiF;AAGjF,SAAKF,MAAL,GAAcE,MAAd;AACA,SAAKC,IAAL,GAAa,GAAG,KAAKF,WAAN,CAA0BG,IAAK,IAAG,KAAKJ,MAAL,CAAYD,SAAU,EAAvE;AACH;;AAEMM,EAAAA,SAAS,CAACH,MAAD,EAAuC;AACnD,WAAO,KAAKF,MAAL,CAAYK,SAAZ,CAAsBH,MAAtB,CAAP;AACH;;AAEMI,EAAAA,UAAU,CAACJ,MAAD,EAAkD;AAC/D,QAAI,OAAO,KAAKF,MAAL,CAAYO,IAAnB,KAA4B,UAAhC,EAA4C;AACxC,aAAO,KAAKP,MAAL,CAAYO,IAAZ,CAAiBL,MAAjB,CAAP;AACH,KAFD,MAEO,IAAI,OAAO,KAAKF,MAAL,CAAYO,IAAnB,KAA4B,QAAhC,EAA0C;AAC7C,aAAO,KAAKP,MAAL,CAAYO,IAAnB;AACH;;AACD,WAAO,IAAP;AACH;;AA3B0E;;;8BAAlEV,kD,UACsC,+C","sourcesContent":["import { Plugin } from \"@webiny/plugins/Plugin\";\nimport { CmsModelField } from \"@webiny/api-headless-cms/types\";\n\nexport interface CreatePathCallableParams<T = any> {\n field: CmsModelField;\n key: string;\n value: T;\n}\n\nexport interface CreatePathCallable<T = any> {\n (params: CreatePathCallableParams<T>): string;\n}\n\nexport interface TransformCallableParams<T = any> {\n field: CmsModelField;\n value: T;\n}\nexport interface TransformCallable<T = any> {\n (params: TransformCallableParams<T>): string;\n}\n\nexport interface CmsEntryElasticsearchQueryBuilderValueSearchPluginParams {\n fieldType: string;\n path?: string | CreatePathCallable;\n transform: TransformCallable;\n}\nexport class CmsEntryElasticsearchQueryBuilderValueSearchPlugin extends Plugin {\n public static override readonly type: string = \"cms-elastic-search-query-builder-value-search\";\n\n private readonly config: CmsEntryElasticsearchQueryBuilderValueSearchPluginParams;\n\n public get fieldType(): string {\n return this.config.fieldType;\n }\n\n public constructor(params: CmsEntryElasticsearchQueryBuilderValueSearchPluginParams) {\n super();\n\n this.config = params;\n this.name = `${(this.constructor as any).type}-${this.config.fieldType}`;\n }\n\n public transform(params: TransformCallableParams): any {\n return this.config.transform(params);\n }\n\n public createPath(params: CreatePathCallableParams): string | null {\n if (typeof this.config.path === \"function\") {\n return this.config.path(params);\n } else if (typeof this.config.path === \"string\") {\n return this.config.path;\n }\n return null;\n }\n}\n"]}
1
+ {"version":3,"names":["CmsEntryElasticsearchQueryBuilderValueSearchPlugin","Plugin","fieldType","config","constructor","params","name","type","transform","createPath","path"],"sources":["CmsEntryElasticsearchQueryBuilderValueSearchPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins/Plugin\";\nimport { CmsModelField } from \"@webiny/api-headless-cms/types\";\n\nexport interface CreatePathCallableParams<T = any> {\n field: CmsModelField;\n key: string;\n value: T;\n}\n\nexport interface CreatePathCallable<T = any> {\n (params: CreatePathCallableParams<T>): string;\n}\n\nexport interface TransformCallableParams<T = any> {\n field: CmsModelField;\n value: T;\n}\nexport interface TransformCallable<T = any> {\n (params: TransformCallableParams<T>): string;\n}\n\nexport interface CmsEntryElasticsearchQueryBuilderValueSearchPluginParams {\n fieldType: string;\n path?: string | CreatePathCallable;\n transform: TransformCallable;\n}\nexport class CmsEntryElasticsearchQueryBuilderValueSearchPlugin extends Plugin {\n public static override readonly type: string = \"cms-elastic-search-query-builder-value-search\";\n\n private readonly config: CmsEntryElasticsearchQueryBuilderValueSearchPluginParams;\n\n public get fieldType(): string {\n return this.config.fieldType;\n }\n\n public constructor(params: CmsEntryElasticsearchQueryBuilderValueSearchPluginParams) {\n super();\n\n this.config = params;\n this.name = `${(this.constructor as any).type}-${this.config.fieldType}`;\n }\n\n public transform(params: TransformCallableParams): any {\n return this.config.transform(params);\n }\n\n public createPath(params: CreatePathCallableParams): string | null {\n if (typeof this.config.path === \"function\") {\n return this.config.path(params);\n } else if (typeof this.config.path === \"string\") {\n return this.config.path;\n }\n return null;\n }\n}\n"],"mappings":";;;;;;;;;;;AAAA;;AA0BO,MAAMA,kDAAN,SAAiEC,cAAjE,CAAwE;EAKvD,IAATC,SAAS,GAAW;IAC3B,OAAO,KAAKC,MAAL,CAAYD,SAAnB;EACH;;EAEME,WAAW,CAACC,MAAD,EAAmE;IACjF;IADiF;IAGjF,KAAKF,MAAL,GAAcE,MAAd;IACA,KAAKC,IAAL,GAAa,GAAG,KAAKF,WAAN,CAA0BG,IAAK,IAAG,KAAKJ,MAAL,CAAYD,SAAU,EAAvE;EACH;;EAEMM,SAAS,CAACH,MAAD,EAAuC;IACnD,OAAO,KAAKF,MAAL,CAAYK,SAAZ,CAAsBH,MAAtB,CAAP;EACH;;EAEMI,UAAU,CAACJ,MAAD,EAAkD;IAC/D,IAAI,OAAO,KAAKF,MAAL,CAAYO,IAAnB,KAA4B,UAAhC,EAA4C;MACxC,OAAO,KAAKP,MAAL,CAAYO,IAAZ,CAAiBL,MAAjB,CAAP;IACH,CAFD,MAEO,IAAI,OAAO,KAAKF,MAAL,CAAYO,IAAnB,KAA4B,QAAhC,EAA0C;MAC7C,OAAO,KAAKP,MAAL,CAAYO,IAAnB;IACH;;IACD,OAAO,IAAP;EACH;;AA3B0E;;;8BAAlEV,kD,UACsC,+C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["CmsEntryElasticsearchQueryModifierPlugin.ts"],"names":["CmsEntryElasticsearchQueryModifierPlugin","ElasticsearchQueryModifierPlugin","constructor","config","modifyQuery","modelId"],"mappings":";;;;;;;;;;;AAAA;;AAmBO,MAAMA,wCAAN,SAAuDC,kEAAvD,CAA2G;AAKvGC,EAAAA,WAAW,CAACC,MAAD,EAAyD;AACvE,UAAMA,MAAM,CAACC,WAAb;AADuE;AAGvE,SAAKC,OAAL,GAAeF,MAAM,CAACE,OAAtB;AACH;;AAT6G;;;8BAArGL,wC,UACsC,wC","sourcesContent":["import {\n ElasticsearchQueryModifierPlugin,\n ModifyQueryCallable,\n ModifyQueryParams as BaseModifyQueryParams\n} from \"@webiny/api-elasticsearch/plugins/definition/ElasticsearchQueryModifierPlugin\";\nimport { CmsModel } from \"@webiny/api-headless-cms/types\";\n\nexport interface ModifyQueryParams extends BaseModifyQueryParams {\n model: CmsModel;\n}\n\nexport interface CmsEntryElasticsearchQueryModifierPluginConfig {\n modifyQuery: ModifyQueryCallable<ModifyQueryParams>;\n /**\n * If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.\n */\n modelId?: string;\n}\n\nexport class CmsEntryElasticsearchQueryModifierPlugin extends ElasticsearchQueryModifierPlugin<ModifyQueryParams> {\n public static override readonly type: string = \"cms.elasticsearch.modifier.query.entry\";\n\n public readonly modelId?: string;\n\n public constructor(config: CmsEntryElasticsearchQueryModifierPluginConfig) {\n super(config.modifyQuery);\n\n this.modelId = config.modelId;\n }\n}\n"]}
1
+ {"version":3,"names":["CmsEntryElasticsearchQueryModifierPlugin","ElasticsearchQueryModifierPlugin","constructor","config","modifyQuery","modelId"],"sources":["CmsEntryElasticsearchQueryModifierPlugin.ts"],"sourcesContent":["import {\n ElasticsearchQueryModifierPlugin,\n ModifyQueryCallable,\n ModifyQueryParams as BaseModifyQueryParams\n} from \"@webiny/api-elasticsearch/plugins/definition/ElasticsearchQueryModifierPlugin\";\nimport { CmsModel } from \"@webiny/api-headless-cms/types\";\n\nexport interface ModifyQueryParams extends BaseModifyQueryParams {\n model: CmsModel;\n}\n\nexport interface CmsEntryElasticsearchQueryModifierPluginConfig {\n modifyQuery: ModifyQueryCallable<ModifyQueryParams>;\n /**\n * If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.\n */\n modelId?: string;\n}\n\nexport class CmsEntryElasticsearchQueryModifierPlugin extends ElasticsearchQueryModifierPlugin<ModifyQueryParams> {\n public static override readonly type: string = \"cms.elasticsearch.modifier.query.entry\";\n\n public readonly modelId?: string;\n\n public constructor(config: CmsEntryElasticsearchQueryModifierPluginConfig) {\n super(config.modifyQuery);\n\n this.modelId = config.modelId;\n }\n}\n"],"mappings":";;;;;;;;;;;AAAA;;AAmBO,MAAMA,wCAAN,SAAuDC,kEAAvD,CAA2G;EAKvGC,WAAW,CAACC,MAAD,EAAyD;IACvE,MAAMA,MAAM,CAACC,WAAb;IADuE;IAGvE,KAAKC,OAAL,GAAeF,MAAM,CAACE,OAAtB;EACH;;AAT6G;;;8BAArGL,wC,UACsC,wC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["CmsEntryElasticsearchSortModifierPlugin.ts"],"names":["CmsEntryElasticsearchSortModifierPlugin","ElasticsearchSortModifierPlugin","constructor","config","modifySort","modelId"],"mappings":";;;;;;;;;;;AAAA;;AAmBO,MAAMA,uCAAN,SAAsDC,gEAAtD,CAAwG;AAKpGC,EAAAA,WAAW,CAACC,MAAD,EAAwD;AACtE,UAAMA,MAAM,CAACC,UAAb;AADsE;AAEtE,SAAKC,OAAL,GAAeF,MAAM,CAACE,OAAtB;AACH;;AAR0G;;;8BAAlGL,uC,UACsC,uC","sourcesContent":["import {\n ElasticsearchSortModifierPlugin,\n ModifySortCallable,\n ModifySortParams as BaseModifySortParams\n} from \"@webiny/api-elasticsearch/plugins/definition/ElasticsearchSortModifierPlugin\";\nimport { CmsModel } from \"@webiny/api-headless-cms/types\";\n\nexport interface ModifySortParams extends BaseModifySortParams {\n model: CmsModel;\n}\n\nexport interface CmsEntryElasticsearchSortModifierPluginConfig {\n modifySort: ModifySortCallable<ModifySortParams>;\n /**\n * If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.\n */\n modelId?: string;\n}\n\nexport class CmsEntryElasticsearchSortModifierPlugin extends ElasticsearchSortModifierPlugin<ModifySortParams> {\n public static override readonly type: string = \"cms.elasticsearch.modifier.sort.entry\";\n\n public readonly modelId?: string;\n\n public constructor(config: CmsEntryElasticsearchSortModifierPluginConfig) {\n super(config.modifySort);\n this.modelId = config.modelId;\n }\n}\n"]}
1
+ {"version":3,"names":["CmsEntryElasticsearchSortModifierPlugin","ElasticsearchSortModifierPlugin","constructor","config","modifySort","modelId"],"sources":["CmsEntryElasticsearchSortModifierPlugin.ts"],"sourcesContent":["import {\n ElasticsearchSortModifierPlugin,\n ModifySortCallable,\n ModifySortParams as BaseModifySortParams\n} from \"@webiny/api-elasticsearch/plugins/definition/ElasticsearchSortModifierPlugin\";\nimport { CmsModel } from \"@webiny/api-headless-cms/types\";\n\nexport interface ModifySortParams extends BaseModifySortParams {\n model: CmsModel;\n}\n\nexport interface CmsEntryElasticsearchSortModifierPluginConfig {\n modifySort: ModifySortCallable<ModifySortParams>;\n /**\n * If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.\n */\n modelId?: string;\n}\n\nexport class CmsEntryElasticsearchSortModifierPlugin extends ElasticsearchSortModifierPlugin<ModifySortParams> {\n public static override readonly type: string = \"cms.elasticsearch.modifier.sort.entry\";\n\n public readonly modelId?: string;\n\n public constructor(config: CmsEntryElasticsearchSortModifierPluginConfig) {\n super(config.modifySort);\n this.modelId = config.modelId;\n }\n}\n"],"mappings":";;;;;;;;;;;AAAA;;AAmBO,MAAMA,uCAAN,SAAsDC,gEAAtD,CAAwG;EAKpGC,WAAW,CAACC,MAAD,EAAwD;IACtE,MAAMA,MAAM,CAACC,UAAb;IADsE;IAEtE,KAAKC,OAAL,GAAeF,MAAM,CAACE,OAAtB;EACH;;AAR0G;;;8BAAlGL,uC,UACsC,uC"}
package/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["types.ts"],"names":["ENTITIES"],"mappings":";;;;;;;AAkBA;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;IAsDYA,Q;;;WAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;AAAAA,EAAAA,Q;GAAAA,Q,wBAAAA,Q","sourcesContent":["import { Plugin, PluginCollection } from \"@webiny/plugins/types\";\nimport {\n CmsEntry,\n CmsModel,\n CmsModelField,\n CmsModelFieldToGraphQLPlugin,\n HeadlessCmsStorageOperations as BaseHeadlessCmsStorageOperations\n} from \"@webiny/api-headless-cms/types\";\nimport { DynamoDBTypes, TableConstructor } from \"dynamodb-toolbox/dist/classes/Table\";\nimport { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport {\n EntityAttributeConfig,\n EntityCompositeAttributes\n} from \"dynamodb-toolbox/dist/classes/Entity\";\nimport { Client } from \"@elastic/elasticsearch\";\nimport { Entity, Table } from \"dynamodb-toolbox\";\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 */\ninterface 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 */\ninterface 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: string;\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: CmsModelField) => 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 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 ENTRIES_ES = \"CmsEntriesElasticsearch\"\n}\n\nexport interface TableModifier {\n (table: TableConstructor): TableConstructor;\n}\n\nexport interface StorageOperationsFactoryParams {\n documentClient: DocumentClient;\n elasticsearch: Client;\n table?: TableModifier;\n esTable?: TableModifier;\n modelFieldToGraphQLPlugins: CmsModelFieldToGraphQLPlugin[];\n attributes?: Record<ENTITIES, Attributes>;\n plugins?: PluginCollection;\n}\n\nexport interface HeadlessCmsStorageOperations extends BaseHeadlessCmsStorageOperations {\n getTable: () => Table;\n getEsTable: () => Table;\n getEntities: () => Record<\n \"system\" | \"settings\" | \"groups\" | \"models\" | \"entries\" | \"entriesEs\",\n Entity<any>\n >;\n}\n\nexport interface StorageOperationsFactory {\n (params: StorageOperationsFactoryParams): HeadlessCmsStorageOperations;\n}\n"]}
1
+ {"version":3,"names":["ENTITIES"],"sources":["types.ts"],"sourcesContent":["import { Plugin, PluginCollection } from \"@webiny/plugins/types\";\nimport {\n CmsEntry,\n CmsModel,\n CmsModelField,\n CmsModelFieldToGraphQLPlugin,\n HeadlessCmsStorageOperations as BaseHeadlessCmsStorageOperations\n} from \"@webiny/api-headless-cms/types\";\nimport { DynamoDBTypes, TableConstructor } from \"dynamodb-toolbox/dist/classes/Table\";\nimport { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport {\n EntityAttributeConfig,\n EntityCompositeAttributes\n} from \"dynamodb-toolbox/dist/classes/Entity\";\nimport { Client } from \"@elastic/elasticsearch\";\nimport { Entity, Table } from \"dynamodb-toolbox\";\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 */\ninterface 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 */\ninterface 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: string;\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: CmsModelField) => 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 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 ENTRIES_ES = \"CmsEntriesElasticsearch\"\n}\n\nexport interface TableModifier {\n (table: TableConstructor): TableConstructor;\n}\n\nexport interface StorageOperationsFactoryParams {\n documentClient: DocumentClient;\n elasticsearch: Client;\n table?: TableModifier;\n esTable?: TableModifier;\n modelFieldToGraphQLPlugins: CmsModelFieldToGraphQLPlugin[];\n attributes?: Record<ENTITIES, Attributes>;\n plugins?: PluginCollection;\n}\n\nexport interface HeadlessCmsStorageOperations extends BaseHeadlessCmsStorageOperations {\n getTable: () => Table;\n getEsTable: () => Table;\n getEntities: () => Record<\n \"system\" | \"settings\" | \"groups\" | \"models\" | \"entries\" | \"entriesEs\",\n Entity<any>\n >;\n}\n\nexport interface StorageOperationsFactory {\n (params: StorageOperationsFactoryParams): HeadlessCmsStorageOperations;\n}\n"],"mappings":";;;;;;;AAkBA;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;IAsDYA,Q;;;WAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;GAAAA,Q,wBAAAA,Q"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;eAAe,MAAM,E","sourcesContent":["export default () => [];\n"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export default () => [];\n"],"mappings":";;;;;;;eAAe,MAAM,E"}