@webiny/api-page-builder-so-ddb-es 6.0.0-alpha.0 → 6.0.0-alpha.2

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 (82) hide show
  1. package/configurations.d.ts +2 -2
  2. package/configurations.js.map +1 -1
  3. package/definitions/blockCategoryEntity.d.ts +3 -2
  4. package/definitions/blockCategoryEntity.js.map +1 -1
  5. package/definitions/categoryEntity.d.ts +3 -2
  6. package/definitions/categoryEntity.js.map +1 -1
  7. package/definitions/menuEntity.d.ts +3 -2
  8. package/definitions/menuEntity.js.map +1 -1
  9. package/definitions/pageBlockEntity.d.ts +3 -2
  10. package/definitions/pageBlockEntity.js.map +1 -1
  11. package/definitions/pageElasticsearchEntity.d.ts +3 -2
  12. package/definitions/pageElasticsearchEntity.js.map +1 -1
  13. package/definitions/pageElementEntity.d.ts +3 -2
  14. package/definitions/pageElementEntity.js.map +1 -1
  15. package/definitions/pageEntity.d.ts +3 -2
  16. package/definitions/pageEntity.js.map +1 -1
  17. package/definitions/pageTemplateEntity.d.ts +3 -2
  18. package/definitions/pageTemplateEntity.js.map +1 -1
  19. package/definitions/settingsEntity.d.ts +2 -1
  20. package/definitions/settingsEntity.js.map +1 -1
  21. package/definitions/systemEntity.d.ts +3 -2
  22. package/definitions/systemEntity.js.map +1 -1
  23. package/definitions/table.d.ts +2 -2
  24. package/definitions/table.js.map +1 -1
  25. package/definitions/tableElasticsearch.d.ts +2 -2
  26. package/definitions/tableElasticsearch.js.map +1 -1
  27. package/elasticsearch/createElasticsearchIndex.d.ts +2 -2
  28. package/elasticsearch/createElasticsearchIndex.js.map +1 -1
  29. package/index.d.ts +1 -1
  30. package/index.js.map +1 -1
  31. package/operations/blockCategory/dataLoader.d.ts +3 -3
  32. package/operations/blockCategory/dataLoader.js.map +1 -1
  33. package/operations/blockCategory/index.d.ts +3 -3
  34. package/operations/blockCategory/index.js.map +1 -1
  35. package/operations/category/dataLoader.d.ts +3 -3
  36. package/operations/category/dataLoader.js.map +1 -1
  37. package/operations/category/index.d.ts +3 -3
  38. package/operations/category/index.js.map +1 -1
  39. package/operations/menu/index.d.ts +3 -3
  40. package/operations/menu/index.js.map +1 -1
  41. package/operations/pageBlock/compression.d.ts +1 -1
  42. package/operations/pageBlock/compression.js.map +1 -1
  43. package/operations/pageBlock/dataLoader.d.ts +3 -3
  44. package/operations/pageBlock/dataLoader.js.map +1 -1
  45. package/operations/pageBlock/index.d.ts +3 -3
  46. package/operations/pageBlock/index.js.map +1 -1
  47. package/operations/pageElement/index.d.ts +3 -3
  48. package/operations/pageElement/index.js.map +1 -1
  49. package/operations/pageTemplate/dataLoader.d.ts +3 -3
  50. package/operations/pageTemplate/dataLoader.js.map +1 -1
  51. package/operations/pageTemplate/index.d.ts +3 -3
  52. package/operations/pageTemplate/index.js.map +1 -1
  53. package/operations/pageTemplate/keys.d.ts +1 -1
  54. package/operations/pageTemplate/keys.js.map +1 -1
  55. package/operations/pages/elasticsearchQueryBody.d.ts +3 -3
  56. package/operations/pages/elasticsearchQueryBody.js.map +1 -1
  57. package/operations/pages/helpers.d.ts +2 -2
  58. package/operations/pages/helpers.js.map +1 -1
  59. package/operations/pages/index.js.map +1 -1
  60. package/operations/pages/logIgnoredEsResponseError.d.ts +1 -1
  61. package/operations/pages/logIgnoredEsResponseError.js.map +1 -1
  62. package/operations/pages/shouldIgnoreEsResponseError.d.ts +1 -1
  63. package/operations/pages/shouldIgnoreEsResponseError.js.map +1 -1
  64. package/operations/settings/index.d.ts +2 -2
  65. package/operations/settings/index.js.map +1 -1
  66. package/operations/system/index.d.ts +2 -2
  67. package/operations/system/index.js.map +1 -1
  68. package/package.json +29 -29
  69. package/plugins/definitions/IndexPageDataPlugin.d.ts +3 -2
  70. package/plugins/definitions/IndexPageDataPlugin.js.map +1 -1
  71. package/plugins/definitions/PageElasticsearchBodyModifierPlugin.d.ts +2 -1
  72. package/plugins/definitions/PageElasticsearchBodyModifierPlugin.js.map +1 -1
  73. package/plugins/definitions/PageElasticsearchQueryModifierPlugin.d.ts +3 -2
  74. package/plugins/definitions/PageElasticsearchQueryModifierPlugin.js.map +1 -1
  75. package/plugins/definitions/PageElasticsearchSortModifierPlugin.d.ts +2 -1
  76. package/plugins/definitions/PageElasticsearchSortModifierPlugin.js.map +1 -1
  77. package/plugins/definitions/SearchPagesPlugin.d.ts +3 -2
  78. package/plugins/definitions/SearchPagesPlugin.js.map +1 -1
  79. package/tasks/createIndexTaskPlugin.d.ts +1 -1
  80. package/tasks/createIndexTaskPlugin.js.map +1 -1
  81. package/types.d.ts +5 -5
  82. package/types.js.map +1 -1
@@ -1,5 +1,5 @@
1
- import { PbContext } from "./types";
2
- import { ElasticsearchIndexRequestBody } from "@webiny/api-elasticsearch/types";
1
+ import type { PbContext } from "./types";
2
+ import type { ElasticsearchIndexRequestBody } from "@webiny/api-elasticsearch/types";
3
3
  export interface ConfigurationsElasticsearch {
4
4
  index: string;
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_error","_interopRequireDefault","require","_apiElasticsearch","_plugins","configurations","exports","es","params","tenant","locale","WebinyError","sharedIndex","isSharedElasticsearchIndex","tenantId","localeCode","process","env","WEBINY_ELASTICSEARCH_INDEX_LOCALE","index","filter","Boolean","join","toLowerCase","prefix","getElasticsearchIndexPrefix","indexSettings","context","plugin","getLastAddedIndexPlugin","container","plugins","type","PageElasticsearchIndexPlugin","body"],"sources":["configurations.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport {\n getElasticsearchIndexPrefix,\n getLastAddedIndexPlugin,\n isSharedElasticsearchIndex\n} from \"@webiny/api-elasticsearch\";\nimport { PageElasticsearchIndexPlugin } from \"~/plugins\";\nimport { PbContext } from \"~/types\";\nimport { ElasticsearchIndexRequestBody } from \"@webiny/api-elasticsearch/types\";\n\nexport interface ConfigurationsElasticsearch {\n index: string;\n}\n\nexport interface ConfigurationsElasticsearchParams {\n tenant: string;\n locale: string;\n}\n\nexport interface ConfigurationsIndexSettingsParams {\n context: PbContext;\n locale: string;\n}\n\nexport interface Configurations {\n es: (params: ConfigurationsElasticsearchParams) => ConfigurationsElasticsearch;\n indexSettings: (\n params: ConfigurationsIndexSettingsParams\n ) => Partial<ElasticsearchIndexRequestBody>;\n}\n\nexport const configurations: Configurations = {\n es: params => {\n const { tenant, locale } = params;\n if (!tenant) {\n throw new WebinyError(\n `Missing \"tenant\" parameter when trying to create Elasticsearch index name.`,\n \"TENANT_ERROR\"\n );\n }\n const sharedIndex = isSharedElasticsearchIndex();\n\n const tenantId = sharedIndex ? \"root\" : tenant;\n let localeCode: string | null = null;\n if (process.env.WEBINY_ELASTICSEARCH_INDEX_LOCALE === \"true\") {\n if (!locale) {\n throw new WebinyError(\n `Missing \"locale\" parameter when trying to create Elasticsearch index name.`,\n \"LOCALE_ERROR\"\n );\n }\n localeCode = locale;\n }\n\n const index = [tenantId, localeCode, \"page-builder\"]\n .filter(Boolean)\n .join(\"-\")\n .toLowerCase();\n\n const prefix = getElasticsearchIndexPrefix();\n if (!prefix) {\n return {\n index\n };\n }\n return {\n index: prefix + index\n };\n },\n indexSettings: ({ context, locale }) => {\n const plugin = getLastAddedIndexPlugin<PageElasticsearchIndexPlugin>({\n container: context.plugins,\n type: PageElasticsearchIndexPlugin.type,\n locale\n });\n\n return plugin ? plugin.body : {};\n }\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAKA,IAAAE,QAAA,GAAAF,OAAA;AAyBO,MAAMG,cAA8B,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC1CE,EAAE,EAAEC,MAAM,IAAI;IACV,MAAM;MAAEC,MAAM;MAAEC;IAAO,CAAC,GAAGF,MAAM;IACjC,IAAI,CAACC,MAAM,EAAE;MACT,MAAM,IAAIE,cAAW,CACjB,4EAA4E,EAC5E,cACJ,CAAC;IACL;IACA,MAAMC,WAAW,GAAG,IAAAC,4CAA0B,EAAC,CAAC;IAEhD,MAAMC,QAAQ,GAAGF,WAAW,GAAG,MAAM,GAAGH,MAAM;IAC9C,IAAIM,UAAyB,GAAG,IAAI;IACpC,IAAIC,OAAO,CAACC,GAAG,CAACC,iCAAiC,KAAK,MAAM,EAAE;MAC1D,IAAI,CAACR,MAAM,EAAE;QACT,MAAM,IAAIC,cAAW,CACjB,4EAA4E,EAC5E,cACJ,CAAC;MACL;MACAI,UAAU,GAAGL,MAAM;IACvB;IAEA,MAAMS,KAAK,GAAG,CAACL,QAAQ,EAAEC,UAAU,EAAE,cAAc,CAAC,CAC/CK,MAAM,CAACC,OAAO,CAAC,CACfC,IAAI,CAAC,GAAG,CAAC,CACTC,WAAW,CAAC,CAAC;IAElB,MAAMC,MAAM,GAAG,IAAAC,6CAA2B,EAAC,CAAC;IAC5C,IAAI,CAACD,MAAM,EAAE;MACT,OAAO;QACHL;MACJ,CAAC;IACL;IACA,OAAO;MACHA,KAAK,EAAEK,MAAM,GAAGL;IACpB,CAAC;EACL,CAAC;EACDO,aAAa,EAAEA,CAAC;IAAEC,OAAO;IAAEjB;EAAO,CAAC,KAAK;IACpC,MAAMkB,MAAM,GAAG,IAAAC,yCAAuB,EAA+B;MACjEC,SAAS,EAAEH,OAAO,CAACI,OAAO;MAC1BC,IAAI,EAAEC,qCAA4B,CAACD,IAAI;MACvCtB;IACJ,CAAC,CAAC;IAEF,OAAOkB,MAAM,GAAGA,MAAM,CAACM,IAAI,GAAG,CAAC,CAAC;EACpC;AACJ,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_error","_interopRequireDefault","require","_apiElasticsearch","_plugins","configurations","exports","es","params","tenant","locale","WebinyError","sharedIndex","isSharedElasticsearchIndex","tenantId","localeCode","process","env","WEBINY_ELASTICSEARCH_INDEX_LOCALE","index","filter","Boolean","join","toLowerCase","prefix","getElasticsearchIndexPrefix","indexSettings","context","plugin","getLastAddedIndexPlugin","container","plugins","type","PageElasticsearchIndexPlugin","body"],"sources":["configurations.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport {\n getElasticsearchIndexPrefix,\n getLastAddedIndexPlugin,\n isSharedElasticsearchIndex\n} from \"@webiny/api-elasticsearch\";\nimport { PageElasticsearchIndexPlugin } from \"~/plugins\";\nimport type { PbContext } from \"~/types\";\nimport type { ElasticsearchIndexRequestBody } from \"@webiny/api-elasticsearch/types\";\n\nexport interface ConfigurationsElasticsearch {\n index: string;\n}\n\nexport interface ConfigurationsElasticsearchParams {\n tenant: string;\n locale: string;\n}\n\nexport interface ConfigurationsIndexSettingsParams {\n context: PbContext;\n locale: string;\n}\n\nexport interface Configurations {\n es: (params: ConfigurationsElasticsearchParams) => ConfigurationsElasticsearch;\n indexSettings: (\n params: ConfigurationsIndexSettingsParams\n ) => Partial<ElasticsearchIndexRequestBody>;\n}\n\nexport const configurations: Configurations = {\n es: params => {\n const { tenant, locale } = params;\n if (!tenant) {\n throw new WebinyError(\n `Missing \"tenant\" parameter when trying to create Elasticsearch index name.`,\n \"TENANT_ERROR\"\n );\n }\n const sharedIndex = isSharedElasticsearchIndex();\n\n const tenantId = sharedIndex ? \"root\" : tenant;\n let localeCode: string | null = null;\n if (process.env.WEBINY_ELASTICSEARCH_INDEX_LOCALE === \"true\") {\n if (!locale) {\n throw new WebinyError(\n `Missing \"locale\" parameter when trying to create Elasticsearch index name.`,\n \"LOCALE_ERROR\"\n );\n }\n localeCode = locale;\n }\n\n const index = [tenantId, localeCode, \"page-builder\"]\n .filter(Boolean)\n .join(\"-\")\n .toLowerCase();\n\n const prefix = getElasticsearchIndexPrefix();\n if (!prefix) {\n return {\n index\n };\n }\n return {\n index: prefix + index\n };\n },\n indexSettings: ({ context, locale }) => {\n const plugin = getLastAddedIndexPlugin<PageElasticsearchIndexPlugin>({\n container: context.plugins,\n type: PageElasticsearchIndexPlugin.type,\n locale\n });\n\n return plugin ? plugin.body : {};\n }\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OA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AM,CAACM,IAAI,GAAG,CAAC,CAAC;EACpC;AACJ,CAAC","ignoreList":[]}
@@ -1,5 +1,6 @@
1
- import { Entity, Table } from "@webiny/db-dynamodb/toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  interface Params {
4
5
  table: Table<string, string, string>;
5
6
  entityName: string;
@@ -1 +1 @@
1
- {"version":3,"names":["_toolbox","require","createBlockCategoryEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","slug","icon","description","createdOn","createdBy","tenant","locale","exports"],"sources":["blockCategoryEntity.ts"],"sourcesContent":["import { Entity, Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createBlockCategoryEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n slug: {\n type: \"string\"\n },\n icon: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n createdOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,yBAAyB,GAAIC,MAAc,IAAkB;EACtE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDN,IAAI,EAAE;QACFM,IAAI,EAAE;MACV,CAAC;MACDC,IAAI,EAAE;QACFD,IAAI,EAAE;MACV,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV,CAAC;MACDG,WAAW,EAAE;QACTH,IAAI,EAAE;MACV,CAAC;MACDI,SAAS,EAAE;QACPJ,IAAI,EAAE;MACV,CAAC;MACDK,SAAS,EAAE;QACPL,IAAI,EAAE;MACV,CAAC;MACDM,MAAM,EAAE;QACJN,IAAI,EAAE;MACV,CAAC;MACDO,MAAM,EAAE;QACJP,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACiB,OAAA,CAAApB,yBAAA,GAAAA,yBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_toolbox","require","createBlockCategoryEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","slug","icon","description","createdOn","createdBy","tenant","locale","exports"],"sources":["blockCategoryEntity.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createBlockCategoryEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n slug: {\n type: \"string\"\n },\n icon: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n createdOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,yBAAyB,GAAIC,MAAc,IAAkB;EACtE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDN,IAAI,EAAE;QACFM,IAAI,EAAE;MACV,CAAC;MACDC,IAAI,EAAE;QACFD,IAAI,EAAE;MACV,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV,CAAC;MACDG,WAAW,EAAE;QACTH,IAAI,EAAE;MACV,CAAC;MACDI,SAAS,EAAE;QACPJ,IAAI,EAAE;MACV,CAAC;MACDK,SAAS,EAAE;QACPL,IAAI,EAAE;MACV,CAAC;MACDM,MAAM,EAAE;QACJN,IAAI,EAAE;MACV,CAAC;MACDO,MAAM,EAAE;QACJP,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACiB,OAAA,CAAApB,yBAAA,GAAAA,yBAAA","ignoreList":[]}
@@ -1,5 +1,6 @@
1
- import { Entity, Table } from "@webiny/db-dynamodb/toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  interface Params {
4
5
  table: Table<string, string, string>;
5
6
  entityName: string;
@@ -1 +1 @@
1
- {"version":3,"names":["_toolbox","require","createCategoryEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","slug","url","layout","createdOn","createdBy","tenant","locale","exports"],"sources":["categoryEntity.ts"],"sourcesContent":["import { Entity, Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createCategoryEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n slug: {\n type: \"string\"\n },\n url: {\n type: \"string\"\n },\n layout: {\n type: \"string\"\n },\n createdOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,oBAAoB,GAAIC,MAAc,IAAkB;EACjE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDN,IAAI,EAAE;QACFM,IAAI,EAAE;MACV,CAAC;MACDC,IAAI,EAAE;QACFD,IAAI,EAAE;MACV,CAAC;MACDE,GAAG,EAAE;QACDF,IAAI,EAAE;MACV,CAAC;MACDG,MAAM,EAAE;QACJH,IAAI,EAAE;MACV,CAAC;MACDI,SAAS,EAAE;QACPJ,IAAI,EAAE;MACV,CAAC;MACDK,SAAS,EAAE;QACPL,IAAI,EAAE;MACV,CAAC;MACDM,MAAM,EAAE;QACJN,IAAI,EAAE;MACV,CAAC;MACDO,MAAM,EAAE;QACJP,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACiB,OAAA,CAAApB,oBAAA,GAAAA,oBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_toolbox","require","createCategoryEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","slug","url","layout","createdOn","createdBy","tenant","locale","exports"],"sources":["categoryEntity.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createCategoryEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n slug: {\n type: \"string\"\n },\n url: {\n type: \"string\"\n },\n layout: {\n type: \"string\"\n },\n createdOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,oBAAoB,GAAIC,MAAc,IAAkB;EACjE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDN,IAAI,EAAE;QACFM,IAAI,EAAE;MACV,CAAC;MACDC,IAAI,EAAE;QACFD,IAAI,EAAE;MACV,CAAC;MACDE,GAAG,EAAE;QACDF,IAAI,EAAE;MACV,CAAC;MACDG,MAAM,EAAE;QACJH,IAAI,EAAE;MACV,CAAC;MACDI,SAAS,EAAE;QACPJ,IAAI,EAAE;MACV,CAAC;MACDK,SAAS,EAAE;QACPL,IAAI,EAAE;MACV,CAAC;MACDM,MAAM,EAAE;QACJN,IAAI,EAAE;MACV,CAAC;MACDO,MAAM,EAAE;QACJP,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACiB,OAAA,CAAApB,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -1,5 +1,6 @@
1
- import { Entity, Table } from "@webiny/db-dynamodb/toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  interface Params {
4
5
  table: Table<string, string, string>;
5
6
  entityName: string;
@@ -1 +1 @@
1
- {"version":3,"names":["_toolbox","require","createMenuEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","title","slug","description","items","createdOn","createdBy","tenant","locale","exports"],"sources":["menuEntity.ts"],"sourcesContent":["import { Entity, Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createMenuEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n title: {\n type: \"string\"\n },\n slug: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n items: {\n type: \"list\"\n },\n createdOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,gBAAgB,GAAIC,MAAc,IAAkB;EAC7D,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,KAAK,EAAE;QACHD,IAAI,EAAE;MACV,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV,CAAC;MACDG,WAAW,EAAE;QACTH,IAAI,EAAE;MACV,CAAC;MACDI,KAAK,EAAE;QACHJ,IAAI,EAAE;MACV,CAAC;MACDK,SAAS,EAAE;QACPL,IAAI,EAAE;MACV,CAAC;MACDM,SAAS,EAAE;QACPN,IAAI,EAAE;MACV,CAAC;MACDO,MAAM,EAAE;QACJP,IAAI,EAAE;MACV,CAAC;MACDQ,MAAM,EAAE;QACJR,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACkB,OAAA,CAAArB,gBAAA,GAAAA,gBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_toolbox","require","createMenuEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","title","slug","description","items","createdOn","createdBy","tenant","locale","exports"],"sources":["menuEntity.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createMenuEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n title: {\n type: \"string\"\n },\n slug: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n items: {\n type: \"list\"\n },\n createdOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,gBAAgB,GAAIC,MAAc,IAAkB;EAC7D,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,KAAK,EAAE;QACHD,IAAI,EAAE;MACV,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV,CAAC;MACDG,WAAW,EAAE;QACTH,IAAI,EAAE;MACV,CAAC;MACDI,KAAK,EAAE;QACHJ,IAAI,EAAE;MACV,CAAC;MACDK,SAAS,EAAE;QACPL,IAAI,EAAE;MACV,CAAC;MACDM,SAAS,EAAE;QACPN,IAAI,EAAE;MACV,CAAC;MACDO,MAAM,EAAE;QACJP,IAAI,EAAE;MACV,CAAC;MACDQ,MAAM,EAAE;QACJR,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACkB,OAAA,CAAArB,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -1,5 +1,6 @@
1
- import { Entity, Table } from "@webiny/db-dynamodb/toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  interface Params {
4
5
  table: Table<string, string, string>;
5
6
  entityName: string;
@@ -1 +1 @@
1
- {"version":3,"names":["_toolbox","require","createPageBlockEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","GSI1_PK","type","GSI1_SK","TYPE","id","blockCategory","content","preview","createdOn","createdBy","tenant","locale","dataSources","default","dataBindings","exports"],"sources":["pageBlockEntity.ts"],"sourcesContent":["import { Entity, Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createPageBlockEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n GSI1_PK: {\n type: \"string\"\n },\n GSI1_SK: {\n type: \"string\"\n },\n TYPE: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n blockCategory: {\n type: \"string\"\n },\n content: {\n type: \"map\"\n },\n preview: {\n type: \"map\"\n },\n createdOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n dataSources: {\n type: \"list\",\n default: []\n },\n dataBindings: {\n type: \"list\",\n default: []\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,qBAAqB,GAAIC,MAAc,IAAkB;EAClE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,OAAO,EAAE;QACLC,IAAI,EAAE;MACV,CAAC;MACDC,OAAO,EAAE;QACLD,IAAI,EAAE;MACV,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV,CAAC;MACDG,EAAE,EAAE;QACAH,IAAI,EAAE;MACV,CAAC;MACDN,IAAI,EAAE;QACFM,IAAI,EAAE;MACV,CAAC;MACDI,aAAa,EAAE;QACXJ,IAAI,EAAE;MACV,CAAC;MACDK,OAAO,EAAE;QACLL,IAAI,EAAE;MACV,CAAC;MACDM,OAAO,EAAE;QACLN,IAAI,EAAE;MACV,CAAC;MACDO,SAAS,EAAE;QACPP,IAAI,EAAE;MACV,CAAC;MACDQ,SAAS,EAAE;QACPR,IAAI,EAAE;MACV,CAAC;MACDS,MAAM,EAAE;QACJT,IAAI,EAAE;MACV,CAAC;MACDU,MAAM,EAAE;QACJV,IAAI,EAAE;MACV,CAAC;MACDW,WAAW,EAAE;QACTX,IAAI,EAAE,MAAM;QACZY,OAAO,EAAE;MACb,CAAC;MACDC,YAAY,EAAE;QACVb,IAAI,EAAE,MAAM;QACZY,OAAO,EAAE;MACb,CAAC;MACD,IAAIrB,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACuB,OAAA,CAAA1B,qBAAA,GAAAA,qBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_toolbox","require","createPageBlockEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","GSI1_PK","type","GSI1_SK","TYPE","id","blockCategory","content","preview","createdOn","createdBy","tenant","locale","dataSources","default","dataBindings","exports"],"sources":["pageBlockEntity.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createPageBlockEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n GSI1_PK: {\n type: \"string\"\n },\n GSI1_SK: {\n type: \"string\"\n },\n TYPE: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n blockCategory: {\n type: \"string\"\n },\n content: {\n type: \"map\"\n },\n preview: {\n type: \"map\"\n },\n createdOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n dataSources: {\n type: \"list\",\n default: []\n },\n dataBindings: {\n type: \"list\",\n default: []\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,qBAAqB,GAAIC,MAAc,IAAkB;EAClE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,OAAO,EAAE;QACLC,IAAI,EAAE;MACV,CAAC;MACDC,OAAO,EAAE;QACLD,IAAI,EAAE;MACV,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV,CAAC;MACDG,EAAE,EAAE;QACAH,IAAI,EAAE;MACV,CAAC;MACDN,IAAI,EAAE;QACFM,IAAI,EAAE;MACV,CAAC;MACDI,aAAa,EAAE;QACXJ,IAAI,EAAE;MACV,CAAC;MACDK,OAAO,EAAE;QACLL,IAAI,EAAE;MACV,CAAC;MACDM,OAAO,EAAE;QACLN,IAAI,EAAE;MACV,CAAC;MACDO,SAAS,EAAE;QACPP,IAAI,EAAE;MACV,CAAC;MACDQ,SAAS,EAAE;QACPR,IAAI,EAAE;MACV,CAAC;MACDS,MAAM,EAAE;QACJT,IAAI,EAAE;MACV,CAAC;MACDU,MAAM,EAAE;QACJV,IAAI,EAAE;MACV,CAAC;MACDW,WAAW,EAAE;QACTX,IAAI,EAAE,MAAM;QACZY,OAAO,EAAE;MACb,CAAC;MACDC,YAAY,EAAE;QACVb,IAAI,EAAE,MAAM;QACZY,OAAO,EAAE;MACb,CAAC;MACD,IAAIrB,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACuB,OAAA,CAAA1B,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -1,5 +1,6 @@
1
- import { Entity, Table } from "@webiny/db-dynamodb/toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  interface Params {
4
5
  table: Table<string, string, string>;
5
6
  entityName: string;
@@ -1 +1 @@
1
- {"version":3,"names":["_toolbox","require","createPageElasticsearchEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","index","type","data","TYPE","exports"],"sources":["pageElasticsearchEntity.ts"],"sourcesContent":["import { Entity, Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createPageElasticsearchEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n index: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n TYPE: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,6BAA6B,GAAIC,MAAc,IAAkB;EAC1E,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,KAAK,EAAE;QACHC,IAAI,EAAE;MACV,CAAC;MACDC,IAAI,EAAE;QACFD,IAAI,EAAE;MACV,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACY,OAAA,CAAAf,6BAAA,GAAAA,6BAAA","ignoreList":[]}
1
+ {"version":3,"names":["_toolbox","require","createPageElasticsearchEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","index","type","data","TYPE","exports"],"sources":["pageElasticsearchEntity.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createPageElasticsearchEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n index: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n TYPE: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,6BAA6B,GAAIC,MAAc,IAAkB;EAC1E,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,KAAK,EAAE;QACHC,IAAI,EAAE;MACV,CAAC;MACDC,IAAI,EAAE;QACFD,IAAI,EAAE;MACV,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACY,OAAA,CAAAf,6BAAA,GAAAA,6BAAA","ignoreList":[]}
@@ -1,5 +1,6 @@
1
- import { Entity, Table } from "@webiny/db-dynamodb/toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  interface Params {
4
5
  table: Table<string, string, string>;
5
6
  entityName: string;
@@ -1 +1 @@
1
- {"version":3,"names":["_toolbox","require","createPageElementEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","id","category","content","preview","createdOn","createdBy","tenant","locale","exports"],"sources":["pageElementEntity.ts"],"sourcesContent":["import { Entity, Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createPageElementEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n type: {\n type: \"string\"\n },\n category: {\n type: \"string\"\n },\n content: {\n type: \"map\"\n },\n preview: {\n type: \"map\"\n },\n createdOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,uBAAuB,GAAIC,MAAc,IAAkB;EACpE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,EAAE,EAAE;QACAD,IAAI,EAAE;MACV,CAAC;MACDN,IAAI,EAAE;QACFM,IAAI,EAAE;MACV,CAAC;MACDA,IAAI,EAAE;QACFA,IAAI,EAAE;MACV,CAAC;MACDE,QAAQ,EAAE;QACNF,IAAI,EAAE;MACV,CAAC;MACDG,OAAO,EAAE;QACLH,IAAI,EAAE;MACV,CAAC;MACDI,OAAO,EAAE;QACLJ,IAAI,EAAE;MACV,CAAC;MACDK,SAAS,EAAE;QACPL,IAAI,EAAE;MACV,CAAC;MACDM,SAAS,EAAE;QACPN,IAAI,EAAE;MACV,CAAC;MACDO,MAAM,EAAE;QACJP,IAAI,EAAE;MACV,CAAC;MACDQ,MAAM,EAAE;QACJR,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACkB,OAAA,CAAArB,uBAAA,GAAAA,uBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_toolbox","require","createPageElementEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","id","category","content","preview","createdOn","createdBy","tenant","locale","exports"],"sources":["pageElementEntity.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createPageElementEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n type: {\n type: \"string\"\n },\n category: {\n type: \"string\"\n },\n content: {\n type: \"map\"\n },\n preview: {\n type: \"map\"\n },\n createdOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,uBAAuB,GAAIC,MAAc,IAAkB;EACpE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,EAAE,EAAE;QACAD,IAAI,EAAE;MACV,CAAC;MACDN,IAAI,EAAE;QACFM,IAAI,EAAE;MACV,CAAC;MACDA,IAAI,EAAE;QACFA,IAAI,EAAE;MACV,CAAC;MACDE,QAAQ,EAAE;QACNF,IAAI,EAAE;MACV,CAAC;MACDG,OAAO,EAAE;QACLH,IAAI,EAAE;MACV,CAAC;MACDI,OAAO,EAAE;QACLJ,IAAI,EAAE;MACV,CAAC;MACDK,SAAS,EAAE;QACPL,IAAI,EAAE;MACV,CAAC;MACDM,SAAS,EAAE;QACPN,IAAI,EAAE;MACV,CAAC;MACDO,MAAM,EAAE;QACJP,IAAI,EAAE;MACV,CAAC;MACDQ,MAAM,EAAE;QACJR,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACkB,OAAA,CAAArB,uBAAA,GAAAA,uBAAA","ignoreList":[]}
@@ -1,5 +1,6 @@
1
- import { Entity, Table } from "@webiny/db-dynamodb/toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  interface Params {
4
5
  table: Table<string, string, string>;
5
6
  entityName: string;
@@ -1 +1 @@
1
- {"version":3,"names":["_toolbox","require","createPageEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","id","pid","tenant","locale","title","editor","createdFrom","path","category","content","publishedOn","version","settings","locked","status","createdOn","savedOn","createdBy","ownedBy","webinyVersion","dataSources","default","dataBindings","exports"],"sources":["pageEntity.ts"],"sourcesContent":["import { Entity, Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createPageEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n pid: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n title: {\n type: \"string\"\n },\n editor: {\n type: \"string\"\n },\n createdFrom: {\n type: \"string\"\n },\n path: {\n type: \"string\"\n },\n category: {\n type: \"string\"\n },\n content: {\n type: \"map\"\n },\n publishedOn: {\n type: \"string\"\n },\n version: {\n type: \"number\"\n },\n settings: {\n type: \"map\"\n },\n locked: {\n type: \"boolean\"\n },\n status: {\n type: \"string\"\n },\n createdOn: {\n type: \"string\"\n },\n savedOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n ownedBy: {\n type: \"map\"\n },\n webinyVersion: {\n type: \"string\"\n },\n dataSources: {\n type: \"list\",\n default: []\n },\n dataBindings: {\n type: \"list\",\n default: []\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,gBAAgB,GAAIC,MAAc,IAAkB;EAC7D,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,EAAE,EAAE;QACAD,IAAI,EAAE;MACV,CAAC;MACDE,GAAG,EAAE;QACDF,IAAI,EAAE;MACV,CAAC;MACDG,MAAM,EAAE;QACJH,IAAI,EAAE;MACV,CAAC;MACDI,MAAM,EAAE;QACJJ,IAAI,EAAE;MACV,CAAC;MACDK,KAAK,EAAE;QACHL,IAAI,EAAE;MACV,CAAC;MACDM,MAAM,EAAE;QACJN,IAAI,EAAE;MACV,CAAC;MACDO,WAAW,EAAE;QACTP,IAAI,EAAE;MACV,CAAC;MACDQ,IAAI,EAAE;QACFR,IAAI,EAAE;MACV,CAAC;MACDS,QAAQ,EAAE;QACNT,IAAI,EAAE;MACV,CAAC;MACDU,OAAO,EAAE;QACLV,IAAI,EAAE;MACV,CAAC;MACDW,WAAW,EAAE;QACTX,IAAI,EAAE;MACV,CAAC;MACDY,OAAO,EAAE;QACLZ,IAAI,EAAE;MACV,CAAC;MACDa,QAAQ,EAAE;QACNb,IAAI,EAAE;MACV,CAAC;MACDc,MAAM,EAAE;QACJd,IAAI,EAAE;MACV,CAAC;MACDe,MAAM,EAAE;QACJf,IAAI,EAAE;MACV,CAAC;MACDgB,SAAS,EAAE;QACPhB,IAAI,EAAE;MACV,CAAC;MACDiB,OAAO,EAAE;QACLjB,IAAI,EAAE;MACV,CAAC;MACDkB,SAAS,EAAE;QACPlB,IAAI,EAAE;MACV,CAAC;MACDmB,OAAO,EAAE;QACLnB,IAAI,EAAE;MACV,CAAC;MACDoB,aAAa,EAAE;QACXpB,IAAI,EAAE;MACV,CAAC;MACDqB,WAAW,EAAE;QACTrB,IAAI,EAAE,MAAM;QACZsB,OAAO,EAAE;MACb,CAAC;MACDC,YAAY,EAAE;QACVvB,IAAI,EAAE,MAAM;QACZsB,OAAO,EAAE;MACb,CAAC;MACD,IAAI/B,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACiC,OAAA,CAAApC,gBAAA,GAAAA,gBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_toolbox","require","createPageEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","id","pid","tenant","locale","title","editor","createdFrom","path","category","content","publishedOn","version","settings","locked","status","createdOn","savedOn","createdBy","ownedBy","webinyVersion","dataSources","default","dataBindings","exports"],"sources":["pageEntity.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createPageEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n pid: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n title: {\n type: \"string\"\n },\n editor: {\n type: \"string\"\n },\n createdFrom: {\n type: \"string\"\n },\n path: {\n type: \"string\"\n },\n category: {\n type: \"string\"\n },\n content: {\n type: \"map\"\n },\n publishedOn: {\n type: \"string\"\n },\n version: {\n type: \"number\"\n },\n settings: {\n type: \"map\"\n },\n locked: {\n type: \"boolean\"\n },\n status: {\n type: \"string\"\n },\n createdOn: {\n type: \"string\"\n },\n savedOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n ownedBy: {\n type: \"map\"\n },\n webinyVersion: {\n type: \"string\"\n },\n dataSources: {\n type: \"list\",\n default: []\n },\n dataBindings: {\n type: \"list\",\n default: []\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,gBAAgB,GAAIC,MAAc,IAAkB;EAC7D,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,EAAE,EAAE;QAC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- import { Entity, Table } from "@webiny/db-dynamodb/toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  interface Params {
4
5
  table: Table<string, string, string>;
5
6
  entityName: string;
@@ -1 +1 @@
1
- {"version":3,"names":["_toolbox","require","createPageTemplateEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","GSI1_PK","type","GSI1_SK","TYPE","data","exports"],"sources":["pageTemplateEntity.ts"],"sourcesContent":["import { Entity, Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createPageTemplateEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n GSI1_PK: {\n type: \"string\"\n },\n GSI1_SK: {\n type: \"string\"\n },\n TYPE: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,wBAAwB,GAAIC,MAAc,IAAkB;EACrE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,OAAO,EAAE;QACLC,IAAI,EAAE;MACV,CAAC;MACDC,OAAO,EAAE;QACLD,IAAI,EAAE;MACV,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV,CAAC;MACDG,IAAI,EAAE;QACFH,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACa,OAAA,CAAAhB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_toolbox","require","createPageTemplateEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","GSI1_PK","type","GSI1_SK","TYPE","data","exports"],"sources":["pageTemplateEntity.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createPageTemplateEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n GSI1_PK: {\n type: \"string\"\n },\n GSI1_SK: {\n type: \"string\"\n },\n TYPE: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,wBAAwB,GAAIC,MAAc,IAAkB;EACrE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,OAAO,EAAE;QACLC,IAAI,EAAE;MACV,CAAC;MACDC,OAAO,EAAE;QACLD,IAAI,EAAE;MACV,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV,CAAC;MACDG,IAAI,EAAE;QACFH,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACa,OAAA,CAAAhB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -1,4 +1,5 @@
1
- import { Entity, Table } from "@webiny/db-dynamodb/toolbox";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
2
3
  interface Params {
3
4
  table: Table<string, string, string>;
4
5
  entityName: string;
@@ -1 +1 @@
1
- {"version":3,"names":["_toolbox","require","createSettingsEntity","params","entityName","table","Entity","name","attributes","PK","partitionKey","SK","sortKey","TYPE","type","data","exports"],"sources":["settingsEntity.ts"],"sourcesContent":["import { Entity, Table } from \"@webiny/db-dynamodb/toolbox\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n}\n\nexport const createSettingsEntity = (params: Params): Entity<any> => {\n const { entityName, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n }\n }\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAOO,MAAMC,oBAAoB,GAAIC,MAAc,IAAkB;EACjE,MAAM;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGF,MAAM;EACpC,OAAO,IAAIG,eAAM,CAAC;IACdC,IAAI,EAAEH,UAAU;IAChBC,KAAK;IACLG,UAAU,EAAE;MACRC,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,IAAI,EAAE;QACFD,IAAI,EAAE;MACV;IACJ;EACJ,CAAC,CAAC;AACN,CAAC;AAACE,OAAA,CAAAd,oBAAA,GAAAA,oBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_toolbox","require","createSettingsEntity","params","entityName","table","Entity","name","attributes","PK","partitionKey","SK","sortKey","TYPE","type","data","exports"],"sources":["settingsEntity.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n}\n\nexport const createSettingsEntity = (params: Params): Entity<any> => {\n const { entityName, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n }\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAOO,MAAMC,oBAAoB,GAAIC,MAAc,IAAkB;EACjE,MAAM;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGF,MAAM;EACpC,OAAO,IAAIG,eAAM,CAAC;IACdC,IAAI,EAAEH,UAAU;IAChBC,KAAK;IACLG,UAAU,EAAE;MACRC,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,IAAI,EAAE;QACFD,IAAI,EAAE;MACV;IACJ;EACJ,CAAC,CAAC;AACN,CAAC;AAACE,OAAA,CAAAd,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -1,5 +1,6 @@
1
- import { Entity, Table } from "@webiny/db-dynamodb/toolbox";
2
- import { Attributes } from "../types";
1
+ import type { Table } from "@webiny/db-dynamodb/toolbox";
2
+ import { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { Attributes } from "../types";
3
4
  interface Params {
4
5
  table: Table<string, string, string>;
5
6
  entityName: string;
@@ -1 +1 @@
1
- {"version":3,"names":["_toolbox","require","createSystemEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","version","type","tenant","exports"],"sources":["systemEntity.ts"],"sourcesContent":["import { Entity, Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSystemEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n version: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,kBAAkB,GAAIC,MAAc,IAAkB;EAC/D,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,OAAO,EAAE;QACLC,IAAI,EAAE;MACV,CAAC;MACDC,MAAM,EAAE;QACJD,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACW,OAAA,CAAAd,kBAAA,GAAAA,kBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_toolbox","require","createSystemEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","version","type","tenant","exports"],"sources":["systemEntity.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSystemEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n version: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,kBAAkB,GAAIC,MAAc,IAAkB;EAC/D,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,OAAO,EAAE;QACLC,IAAI,EAAE;MACV,CAAC;MACDC,MAAM,EAAE;QACJD,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACW,OAAA,CAAAd,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import { Table } from "@webiny/db-dynamodb/toolbox";
2
- import { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
3
- import { TableModifier } from "../types";
2
+ import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
3
+ import type { TableModifier } from "../types";
4
4
  interface Params {
5
5
  table?: TableModifier;
6
6
  documentClient: DynamoDBDocument;
@@ -1 +1 @@
1
- {"version":3,"names":["_toolbox","require","createTable","table","documentClient","tableConfig","name","process","env","DB_PAGE_BUILDER","DB_TABLE","partitionKey","sortKey","DocumentClient","indexes","GSI1","autoExecute","autoParse","config","Table","exports"],"sources":["table.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb\";\nimport { TableConstructor } from \"@webiny/db-dynamodb/toolbox\";\nimport { TableModifier } from \"~/types\";\n\ninterface Params {\n table?: TableModifier;\n documentClient: DynamoDBDocument;\n}\nexport const createTable = ({ table, documentClient }: Params): Table<string, string, string> => {\n const tableConfig: TableConstructor<string, string, string> = {\n name: process.env.DB_PAGE_BUILDER || (process.env.DB_TABLE as string),\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient,\n indexes: {\n GSI1: {\n partitionKey: \"GSI1_PK\",\n sortKey: \"GSI1_SK\"\n }\n },\n autoExecute: true,\n autoParse: true\n };\n\n const config = typeof table === \"function\" ? table(tableConfig) : tableConfig;\n\n return new Table(config);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,WAAW,GAAGA,CAAC;EAAEC,KAAK;EAAEC;AAAuB,CAAC,KAAoC;EAC7F,MAAMC,WAAqD,GAAG;IAC1DC,IAAI,EAAEC,OAAO,CAACC,GAAG,CAACC,eAAe,IAAKF,OAAO,CAACC,GAAG,CAACE,QAAmB;IACrEC,YAAY,EAAE,IAAI;IAClBC,OAAO,EAAE,IAAI;IACbC,cAAc,EAAET,cAAc;IAC9BU,OAAO,EAAE;MACLC,IAAI,EAAE;QACFJ,YAAY,EAAE,SAAS;QACvBC,OAAO,EAAE;MACb;IACJ,CAAC;IACDI,WAAW,EAAE,IAAI;IACjBC,SAAS,EAAE;EACf,CAAC;EAED,MAAMC,MAAM,GAAG,OAAOf,KAAK,KAAK,UAAU,GAAGA,KAAK,CAACE,WAAW,CAAC,GAAGA,WAAW;EAE7E,OAAO,IAAIc,cAAK,CAACD,MAAM,CAAC;AAC5B,CAAC;AAACE,OAAA,CAAAlB,WAAA,GAAAA,WAAA","ignoreList":[]}
1
+ {"version":3,"names":["_toolbox","require","createTable","table","documentClient","tableConfig","name","process","env","DB_PAGE_BUILDER","DB_TABLE","partitionKey","sortKey","DocumentClient","indexes","GSI1","autoExecute","autoParse","config","Table","exports"],"sources":["table.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb\";\nimport type { TableConstructor } from \"@webiny/db-dynamodb/toolbox\";\nimport type { TableModifier } from \"~/types\";\n\ninterface Params {\n table?: TableModifier;\n documentClient: DynamoDBDocument;\n}\nexport const createTable = ({ table, documentClient }: Params): Table<string, string, string> => {\n const tableConfig: TableConstructor<string, string, string> = {\n name: process.env.DB_PAGE_BUILDER || (process.env.DB_TABLE as string),\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient,\n indexes: {\n GSI1: {\n partitionKey: \"GSI1_PK\",\n sortKey: \"GSI1_SK\"\n }\n },\n autoExecute: true,\n autoParse: true\n };\n\n const config = typeof table === \"function\" ? table(tableConfig) : tableConfig;\n\n return new Table(config);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,WAAW,GAAGA,CAAC;EAAEC,KAAK;EAAEC;AAAuB,CAAC,KAAoC;EAC7F,MAAMC,WAAqD,GAAG;IAC1DC,IAAI,EAAEC,OAAO,CAACC,GAAG,CAACC,eAAe,IAAKF,OAAO,CAACC,GAAG,CAACE,QAAmB;IACrEC,YAAY,EAAE,IAAI;IAClBC,OAAO,EAAE,IAAI;IACbC,cAAc,EAAET,cAAc;IAC9BU,OAAO,EAAE;MACLC,IAAI,EAAE;QACFJ,YAAY,EAAE,SAAS;QACvBC,OAAO,EAAE;MACb;IACJ,CAAC;IACDI,WAAW,EAAE,IAAI;IACjBC,SAAS,EAAE;EACf,CAAC;EAED,MAAMC,MAAM,GAAG,OAAOf,KAAK,KAAK,UAAU,GAAGA,KAAK,CAACE,WAAW,CAAC,GAAGA,WAAW;EAE7E,OAAO,IAAIc,cAAK,CAACD,MAAM,CAAC;AAC5B,CAAC;AAACE,OAAA,CAAAlB,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import { TableModifier } from "../types";
2
- import { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
1
+ import type { TableModifier } from "../types";
2
+ import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
3
3
  import { Table } from "@webiny/db-dynamodb/toolbox";
4
4
  interface Params {
5
5
  table?: TableModifier;
@@ -1 +1 @@
1
- {"version":3,"names":["_toolbox","require","createElasticsearchTable","table","documentClient","tableConfig","name","process","env","DB_TABLE_ELASTICSEARCH","partitionKey","sortKey","DocumentClient","autoExecute","autoParse","config","Table","exports"],"sources":["tableElasticsearch.ts"],"sourcesContent":["import { TableModifier } from \"~/types\";\nimport { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb\";\nimport { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { TableConstructor } from \"@webiny/db-dynamodb/toolbox\";\n\ninterface Params {\n table?: TableModifier;\n documentClient: DynamoDBDocument;\n}\nexport const createElasticsearchTable = ({\n table,\n documentClient\n}: Params): Table<string, string, string> => {\n const tableConfig: TableConstructor<string, string, string> = {\n name: process.env.DB_TABLE_ELASTICSEARCH as string,\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient,\n autoExecute: true,\n autoParse: true\n };\n\n const config = typeof table === \"function\" ? table(tableConfig) : tableConfig;\n\n return new Table(config);\n};\n"],"mappings":";;;;;;AAEA,IAAAA,QAAA,GAAAC,OAAA;AAOO,MAAMC,wBAAwB,GAAGA,CAAC;EACrCC,KAAK;EACLC;AACI,CAAC,KAAoC;EACzC,MAAMC,WAAqD,GAAG;IAC1DC,IAAI,EAAEC,OAAO,CAACC,GAAG,CAACC,sBAAgC;IAClDC,YAAY,EAAE,IAAI;IAClBC,OAAO,EAAE,IAAI;IACbC,cAAc,EAAER,cAAc;IAC9BS,WAAW,EAAE,IAAI;IACjBC,SAAS,EAAE;EACf,CAAC;EAED,MAAMC,MAAM,GAAG,OAAOZ,KAAK,KAAK,UAAU,GAAGA,KAAK,CAACE,WAAW,CAAC,GAAGA,WAAW;EAE7E,OAAO,IAAIW,cAAK,CAACD,MAAM,CAAC;AAC5B,CAAC;AAACE,OAAA,CAAAf,wBAAA,GAAAA,wBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_toolbox","require","createElasticsearchTable","table","documentClient","tableConfig","name","process","env","DB_TABLE_ELASTICSEARCH","partitionKey","sortKey","DocumentClient","autoExecute","autoParse","config","Table","exports"],"sources":["tableElasticsearch.ts"],"sourcesContent":["import type { TableModifier } from \"~/types\";\nimport type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb\";\nimport { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport type { TableConstructor } from \"@webiny/db-dynamodb/toolbox\";\n\ninterface Params {\n table?: TableModifier;\n documentClient: DynamoDBDocument;\n}\nexport const createElasticsearchTable = ({\n table,\n documentClient\n}: Params): Table<string, string, string> => {\n const tableConfig: TableConstructor<string, string, string> = {\n name: process.env.DB_TABLE_ELASTICSEARCH as string,\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient,\n autoExecute: true,\n autoParse: true\n };\n\n const config = typeof table === \"function\" ? table(tableConfig) : tableConfig;\n\n return new Table(config);\n};\n"],"mappings":";;;;;;AAEA,IAAAA,QAAA,GAAAC,OAAA;AAOO,MAAMC,wBAAwB,GAAGA,CAAC;EACrCC,KAAK;EACLC;AACI,CAAC,KAAoC;EACzC,MAAMC,WAAqD,GAAG;IAC1DC,IAAI,EAAEC,OAAO,CAACC,GAAG,CAACC,sBAAgC;IAClDC,YAAY,EAAE,IAAI;IAClBC,OAAO,EAAE,IAAI;IACbC,cAAc,EAAER,cAAc;IAC9BS,WAAW,EAAE,IAAI;IACjBC,SAAS,EAAE;EACf,CAAC;EAED,MAAMC,MAAM,GAAG,OAAOZ,KAAK,KAAK,UAAU,GAAGA,KAAK,CAACE,WAAW,CAAC,GAAGA,WAAW;EAE7E,OAAO,IAAIW,cAAK,CAACD,MAAM,CAAC;AAC5B,CAAC;AAACE,OAAA,CAAAf,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import { Client } from "@elastic/elasticsearch";
2
- import { PluginsContainer } from "@webiny/plugins";
1
+ import type { Client } from "@elastic/elasticsearch";
2
+ import type { PluginsContainer } from "@webiny/plugins";
3
3
  export interface ExecOnBeforeInstallParams {
4
4
  elasticsearch: Client;
5
5
  plugins: PluginsContainer;
@@ -1 +1 @@
1
- {"version":3,"names":["_apiElasticsearch","require","_PageElasticsearchIndexPlugin","_configurations","createElasticsearchIndex","params","elasticsearch","plugins","locale","tenant","index","configurations","es","createIndex","client","type","PageElasticsearchIndexPlugin","onExists","console","log","onError","ex","error","exports"],"sources":["createElasticsearchIndex.ts"],"sourcesContent":["import { Client } from \"@elastic/elasticsearch\";\nimport { createIndex } from \"@webiny/api-elasticsearch\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport { PageElasticsearchIndexPlugin } from \"~/plugins/definitions/PageElasticsearchIndexPlugin\";\nimport { configurations } from \"~/configurations\";\n\nexport interface ExecOnBeforeInstallParams {\n elasticsearch: Client;\n plugins: PluginsContainer;\n tenant: string;\n locale: string;\n}\n\nexport const createElasticsearchIndex = async (\n params: ExecOnBeforeInstallParams\n): Promise<void> => {\n const { elasticsearch, plugins, locale, tenant } = params;\n\n const { index } = configurations.es({\n locale,\n tenant\n });\n await createIndex({\n plugins,\n client: elasticsearch,\n type: PageElasticsearchIndexPlugin.type,\n index,\n tenant,\n locale,\n onExists: () => {\n console.log(\n `Elasticsearch index \"${index}\" for the Page Builder Pages already exists.`\n );\n },\n onError: (ex: Error) => {\n console.error(\n `Could not create the Page Builder Pages Elasticsearch index \"${index}\".`,\n ex\n );\n return ex;\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AAEA,IAAAC,6BAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AASO,MAAMG,wBAAwB,GAAG,MACpCC,MAAiC,IACjB;EAChB,MAAM;IAAEC,aAAa;IAAEC,OAAO;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGJ,MAAM;EAEzD,MAAM;IAAEK;EAAM,CAAC,GAAGC,8BAAc,CAACC,EAAE,CAAC;IAChCJ,MAAM;IACNC;EACJ,CAAC,CAAC;EACF,MAAM,IAAAI,6BAAW,EAAC;IACdN,OAAO;IACPO,MAAM,EAAER,aAAa;IACrBS,IAAI,EAAEC,0DAA4B,CAACD,IAAI;IACvCL,KAAK;IACLD,MAAM;IACND,MAAM;IACNS,QAAQ,EAAEA,CAAA,KAAM;MACZC,OAAO,CAACC,GAAG,CACP,wBAAwBT,KAAK,8CACjC,CAAC;IACL,CAAC;IACDU,OAAO,EAAGC,EAAS,IAAK;MACpBH,OAAO,CAACI,KAAK,CACT,gEAAgEZ,KAAK,IAAI,EACzEW,EACJ,CAAC;MACD,OAAOA,EAAE;IACb;EACJ,CAAC,CAAC;AACN,CAAC;AAACE,OAAA,CAAAnB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_apiElasticsearch","require","_PageElasticsearchIndexPlugin","_configurations","createElasticsearchIndex","params","elasticsearch","plugins","locale","tenant","index","configurations","es","createIndex","client","type","PageElasticsearchIndexPlugin","onExists","console","log","onError","ex","error","exports"],"sources":["createElasticsearchIndex.ts"],"sourcesContent":["import type { Client } from \"@elastic/elasticsearch\";\nimport { createIndex } from \"@webiny/api-elasticsearch\";\nimport type { PluginsContainer } from \"@webiny/plugins\";\nimport { PageElasticsearchIndexPlugin } from \"~/plugins/definitions/PageElasticsearchIndexPlugin\";\nimport { configurations } from \"~/configurations\";\n\nexport interface ExecOnBeforeInstallParams {\n elasticsearch: Client;\n plugins: PluginsContainer;\n tenant: string;\n locale: string;\n}\n\nexport const createElasticsearchIndex = async (\n params: ExecOnBeforeInstallParams\n): Promise<void> => {\n const { elasticsearch, plugins, locale, tenant } = params;\n\n const { index } = configurations.es({\n locale,\n tenant\n });\n await createIndex({\n plugins,\n client: elasticsearch,\n type: PageElasticsearchIndexPlugin.type,\n index,\n tenant,\n locale,\n onExists: () => {\n console.log(\n `Elasticsearch index \"${index}\" for the Page Builder Pages already exists.`\n );\n },\n onError: (ex: Error) => {\n console.error(\n `Could not create the Page Builder Pages Elasticsearch index \"${index}\".`,\n ex\n );\n return ex;\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AAEA,IAAAC,6BAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AASO,MAAMG,wBAAwB,GAAG,MACpCC,MAAiC,IACjB;EAChB,MAAM;IAAEC,aAAa;IAAEC,OAAO;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGJ,MAAM;EAEzD,MAAM;IAAEK;EAAM,CAAC,GAAGC,8BAAc,CAACC,EAAE,CAAC;IAChCJ,MAAM;IACNC;EACJ,CAAC,CAAC;EACF,MAAM,IAAAI,6BAAW,EAAC;IACdN,OAAO;IACPO,MAAM,EAAER,aAAa;IACrBS,IAAI,EAAEC,0DAA4B,CAACD,IAAI;IACvCL,KAAK;IACLD,MAAM;IACND,MAAM;IACNS,QAAQ,EAAEA,CAAA,KAAM;MACZC,OAAO,CAACC,GAAG,CACP,wBAAwBT,KAAK,8CACjC,CAAC;IACL,CAAC;IACDU,OAAO,EAAGC,EAAS,IAAK;MACpBH,OAAO,CAACI,KAAK,CACT,gEAAgEZ,KAAK,IAAI,EACzEW,EACJ,CAAC;MACD,OAAOA,EAAE;IACb;EACJ,CAAC,CAAC;AACN,CAAC;AAACE,OAAA,CAAAnB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
package/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { StorageOperationsFactory } from "./types";
1
+ import type { StorageOperationsFactory } from "./types";
2
2
  export * from "./plugins";
3
3
  export declare const createStorageOperations: StorageOperationsFactory;
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["_filters","_interopRequireDefault","require","_plugins","_apiElasticsearch","_types","_table","_tableElasticsearch","_indices","_createElasticsearchIndex","_categoryEntity","_fields","_category","_menuEntity","_fields2","_menu","_pageElementEntity","_fields3","_pageElement","_settingsEntity","_settings","_systemEntity","_system","_pageEntity","_fields4","_pages","_pageElasticsearchEntity","_blockCategoryEntity","_fields5","_blockCategory","_pageBlockEntity","_fields6","_pageBlock","_pageTemplateEntity","_fields7","_pageTemplate","_plugins2","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_createIndexTaskPlugin","_api","createStorageOperations","params","documentClient","elasticsearch","table","esTable","attributes","plugins","userPlugins","tableInstance","createTable","tableElasticsearchInstance","createElasticsearchTable","PluginsContainer","dynamoDbValueFilters","createCategoryDynamoDbFields","createMenuDynamoDbFields","createPageElementDynamoDbFields","createPagesElasticsearchFields","createPagesDynamoDbFields","elasticsearchIndexPlugins","createBlockCategoryDynamoDbFields","createPageBlockDynamoDbFields","createPageTemplateDynamoDbFields","entities","settings","createSettingsEntity","entityName","ENTITIES","SETTINGS","system","createSystemEntity","SYSTEM","categories","createCategoryEntity","CATEGORIES","menus","createMenuEntity","MENUS","pageElements","createPageElementEntity","PAGE_ELEMENTS","pages","createPageEntity","PAGES","pagesEs","createPageElasticsearchEntity","PAGES_ES","blockCategories","createBlockCategoryEntity","BLOCK_CATEGORIES","pageBlocks","createPageBlockEntity","PAGE_BLOCKS","pageTemplates","createPageTemplateEntity","PAGE_TEMPLATES","createCategoryStorageOperations","entity","createBlockCategoryStorageOperations","createPageBlockStorageOperations","createPageTemplateStorageOperations","beforeInit","context","db","registry","register","item","app","tags","name","types","ElasticsearchQueryBuilderOperatorPlugin","type","BlockCategoryDynamoDbElasticFieldPlugin","CategoryDynamoDbElasticFieldPlugin","IndexPageDataPlugin","MenuDynamoDbElasticFieldPlugin","PageBlockDynamoDbFieldPlugin","PageDynamoDbElasticsearchFieldPlugin","PageElasticsearchBodyModifierPlugin","PageElasticsearchFieldPlugin","PageElasticsearchIndexPlugin","PageElasticsearchQueryModifierPlugin","PageElasticsearchSortModifierPlugin","PageElementDynamoDbElasticFieldPlugin","SearchLatestPagesPlugin","SearchPagesPlugin","SearchPublishedPagesPlugin","CompressorPlugin","mergeByType","dataLoader","clear","createIndexTaskPlugin","init","i18n","locales","onLocaleBeforeCreate","subscribe","locale","tenant","createElasticsearchIndex","code","getEntities","getTable","getEsTable","createSystemStorageOperations","createSettingsStorageOperations","createMenuStorageOperations","createPageElementStorageOperations","createPageStorageOperations","esEntity"],"sources":["index.ts"],"sourcesContent":["import dynamoDbValueFilters from \"@webiny/db-dynamodb/plugins/filters\";\nimport { PluginsContainer } from \"@webiny/plugins\";\n\nimport { ElasticsearchQueryBuilderOperatorPlugin } from \"@webiny/api-elasticsearch\";\n\nimport { ENTITIES, StorageOperationsFactory } from \"~/types\";\nimport { createTable } from \"~/definitions/table\";\nimport { createElasticsearchTable } from \"~/definitions/tableElasticsearch\";\n\nimport { elasticsearchIndexPlugins } from \"~/elasticsearch/indices\";\nimport { createElasticsearchIndex } from \"~/elasticsearch/createElasticsearchIndex\";\n\nimport { createCategoryEntity } from \"~/definitions/categoryEntity\";\nimport { createCategoryDynamoDbFields } from \"~/operations/category/fields\";\nimport { createCategoryStorageOperations } from \"~/operations/category\";\n\nimport { createMenuEntity } from \"~/definitions/menuEntity\";\nimport { createMenuDynamoDbFields } from \"~/operations/menu/fields\";\nimport { createMenuStorageOperations } from \"~/operations/menu\";\n\nimport { createPageElementEntity } from \"~/definitions/pageElementEntity\";\nimport { createPageElementDynamoDbFields } from \"~/operations/pageElement/fields\";\nimport { createPageElementStorageOperations } from \"~/operations/pageElement\";\n\nimport { createSettingsEntity } from \"~/definitions/settingsEntity\";\nimport { createSettingsStorageOperations } from \"~/operations/settings\";\n\nimport { createSystemEntity } from \"~/definitions/systemEntity\";\nimport { createSystemStorageOperations } from \"~/operations/system\";\n\nimport { createPageEntity } from \"~/definitions/pageEntity\";\nimport {\n createPagesDynamoDbFields,\n createPagesElasticsearchFields\n} from \"~/operations/pages/fields\";\nimport { createPageStorageOperations } from \"~/operations/pages\";\nimport { createPageElasticsearchEntity } from \"~/definitions/pageElasticsearchEntity\";\n\nimport { createBlockCategoryEntity } from \"~/definitions/blockCategoryEntity\";\nimport { createBlockCategoryDynamoDbFields } from \"~/operations/blockCategory/fields\";\nimport { createBlockCategoryStorageOperations } from \"~/operations/blockCategory\";\n\nimport { createPageBlockEntity } from \"~/definitions/pageBlockEntity\";\nimport { createPageBlockDynamoDbFields } from \"~/operations/pageBlock/fields\";\nimport { createPageBlockStorageOperations } from \"~/operations/pageBlock\";\n\nimport { createPageTemplateEntity } from \"~/definitions/pageTemplateEntity\";\nimport { createPageTemplateDynamoDbFields } from \"~/operations/pageTemplate/fields\";\nimport { createPageTemplateStorageOperations } from \"~/operations/pageTemplate\";\n\nimport { PbContext } from \"@webiny/api-page-builder/types\";\nimport {\n BlockCategoryDynamoDbElasticFieldPlugin,\n CategoryDynamoDbElasticFieldPlugin,\n IndexPageDataPlugin,\n MenuDynamoDbElasticFieldPlugin,\n PageBlockDynamoDbFieldPlugin,\n PageDynamoDbElasticsearchFieldPlugin,\n PageElasticsearchBodyModifierPlugin,\n PageElasticsearchFieldPlugin,\n PageElasticsearchIndexPlugin,\n PageElasticsearchQueryModifierPlugin,\n PageElasticsearchSortModifierPlugin,\n PageElementDynamoDbElasticFieldPlugin,\n SearchLatestPagesPlugin,\n SearchPagesPlugin,\n SearchPublishedPagesPlugin\n} from \"./plugins\";\nimport { createIndexTaskPlugin } from \"~/tasks/createIndexTaskPlugin\";\nimport { CompressorPlugin } from \"@webiny/api\";\n\nexport * from \"./plugins\";\n\nexport const createStorageOperations: StorageOperationsFactory = params => {\n const {\n documentClient,\n elasticsearch,\n table,\n esTable,\n attributes,\n plugins: userPlugins\n } = params;\n\n const tableInstance = createTable({\n table,\n documentClient\n });\n const tableElasticsearchInstance = createElasticsearchTable({\n table: esTable,\n documentClient\n });\n\n const plugins = new PluginsContainer([\n /**\n * User defined custom plugins.\n */\n ...(userPlugins || []),\n /**\n * DynamoDB filter plugins for the where conditions.\n */\n dynamoDbValueFilters(),\n /**\n * Category fields required for filtering/sorting.\n */\n createCategoryDynamoDbFields(),\n /**\n * Menu fields required for filtering/sorting.\n */\n createMenuDynamoDbFields(),\n /**\n * Page element fields required for filtering/sorting.\n */\n createPageElementDynamoDbFields(),\n /**\n * Page fields required for filtering/sorting.\n */\n createPagesElasticsearchFields(),\n /**\n * Page fields required for filtering/sorting when using dynamodb.\n */\n createPagesDynamoDbFields(),\n /**\n * Built-in Elasticsearch index templates\n */\n elasticsearchIndexPlugins(),\n /**\n * Block Category fields required for filtering/sorting.\n */\n createBlockCategoryDynamoDbFields(),\n /**\n * Page Block fields required for filtering/sorting.\n */\n createPageBlockDynamoDbFields(),\n /**\n * Page Template fields required for filtering/sorting.\n */\n createPageTemplateDynamoDbFields()\n ]);\n\n const entities = {\n settings: createSettingsEntity({\n entityName: ENTITIES.SETTINGS,\n table: tableInstance\n }),\n system: createSystemEntity({\n entityName: ENTITIES.SYSTEM,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.SYSTEM] : {}\n }),\n categories: createCategoryEntity({\n entityName: ENTITIES.CATEGORIES,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.CATEGORIES] : {}\n }),\n menus: createMenuEntity({\n entityName: ENTITIES.MENUS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.MENUS] : {}\n }),\n pageElements: createPageElementEntity({\n entityName: ENTITIES.PAGE_ELEMENTS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.PAGE_ELEMENTS] : {}\n }),\n pages: createPageEntity({\n entityName: ENTITIES.PAGES,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.PAGES] : {}\n }),\n pagesEs: createPageElasticsearchEntity({\n entityName: ENTITIES.PAGES_ES,\n table: tableElasticsearchInstance,\n attributes: attributes ? attributes[ENTITIES.PAGES_ES] : {}\n }),\n blockCategories: createBlockCategoryEntity({\n entityName: ENTITIES.BLOCK_CATEGORIES,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.BLOCK_CATEGORIES] : {}\n }),\n pageBlocks: createPageBlockEntity({\n entityName: ENTITIES.PAGE_BLOCKS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.PAGE_BLOCKS] : {}\n }),\n pageTemplates: createPageTemplateEntity({\n entityName: ENTITIES.PAGE_TEMPLATES,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.PAGE_TEMPLATES] : {}\n })\n };\n\n const categories = createCategoryStorageOperations({\n entity: entities.categories,\n plugins\n });\n const blockCategories = createBlockCategoryStorageOperations({\n entity: entities.blockCategories,\n plugins\n });\n const pageBlocks = createPageBlockStorageOperations({\n entity: entities.pageBlocks,\n plugins\n });\n const pageTemplates = createPageTemplateStorageOperations({\n entity: entities.pageTemplates,\n plugins\n });\n\n return {\n beforeInit: async (context: PbContext) => {\n context.db.registry.register({\n item: entities.pages,\n app: \"pb\",\n tags: [\"regular\", entities.pages.name]\n });\n context.db.registry.register({\n item: entities.pagesEs,\n app: \"pb\",\n tags: [\"es\", entities.pagesEs.name]\n });\n const types: string[] = [\n ElasticsearchQueryBuilderOperatorPlugin.type,\n // Page Builder\n BlockCategoryDynamoDbElasticFieldPlugin.type,\n CategoryDynamoDbElasticFieldPlugin.type,\n IndexPageDataPlugin.type,\n MenuDynamoDbElasticFieldPlugin.type,\n PageBlockDynamoDbFieldPlugin.type,\n PageDynamoDbElasticsearchFieldPlugin.type,\n PageElasticsearchBodyModifierPlugin.type,\n PageElasticsearchFieldPlugin.type,\n PageElasticsearchIndexPlugin.type,\n PageElasticsearchQueryModifierPlugin.type,\n PageElasticsearchSortModifierPlugin.type,\n PageElementDynamoDbElasticFieldPlugin.type,\n SearchLatestPagesPlugin.type,\n SearchPagesPlugin.type,\n SearchPublishedPagesPlugin.type,\n CompressorPlugin.type\n ];\n for (const type of types) {\n plugins.mergeByType(context.plugins, type);\n }\n pageTemplates.dataLoader.clear();\n pageBlocks.dataLoader.clear();\n blockCategories.dataLoader.clear();\n categories.dataLoader.clear();\n\n context.plugins.register([createIndexTaskPlugin(), elasticsearchIndexPlugins()]);\n },\n init: async (context: PbContext) => {\n context.i18n.locales.onLocaleBeforeCreate.subscribe(async ({ locale, tenant }) => {\n await createElasticsearchIndex({\n elasticsearch,\n plugins,\n locale: locale.code,\n tenant\n });\n });\n },\n getEntities: () => entities,\n getTable: () => tableInstance,\n getEsTable: () => tableElasticsearchInstance,\n system: createSystemStorageOperations({\n entity: entities.system\n }),\n settings: createSettingsStorageOperations({\n entity: entities.settings\n }),\n menus: createMenuStorageOperations({\n entity: entities.menus,\n plugins\n }),\n pageElements: createPageElementStorageOperations({\n entity: entities.pageElements,\n plugins\n }),\n pages: createPageStorageOperations({\n entity: entities.pages,\n esEntity: entities.pagesEs,\n elasticsearch,\n plugins\n }),\n categories,\n blockCategories,\n pageBlocks,\n pageTemplates\n };\n};\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AAEA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,yBAAA,GAAAP,OAAA;AAEA,IAAAQ,eAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AAEA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,QAAA,GAAAZ,OAAA;AACA,IAAAa,KAAA,GAAAb,OAAA;AAEA,IAAAc,kBAAA,GAAAd,OAAA;AACA,IAAAe,QAAA,GAAAf,OAAA;AACA,IAAAgB,YAAA,GAAAhB,OAAA;AAEA,IAAAiB,eAAA,GA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oB,CAACC,SAAS,CAAC,OAAO;QAAEC,MAAM;QAAEC;MAAO,CAAC,KAAK;QAC9E,MAAM,IAAAC,kDAAwB,EAAC;UAC3BlG,aAAa;UACbI,OAAO;UACP4F,MAAM,EAAEA,MAAM,CAACG,IAAI;UACnBF;QACJ,CAAC,CAAC;MACN,CAAC,CAAC;IACN,CAAC;IACDG,WAAW,EAAEA,CAAA,KAAM/E,QAAQ;IAC3BgF,QAAQ,EAAEA,CAAA,KAAM/F,aAAa;IAC7BgG,UAAU,EAAEA,CAAA,KAAM9F,0BAA0B;IAC5CmB,MAAM,EAAE,IAAA4E,qCAA6B,EAAC;MAClChD,MAAM,EAAElC,QAAQ,CAACM;IACrB,CAAC,CAAC;IACFL,QAAQ,EAAE,IAAAkF,yCAA+B,EAAC;MACtCjD,MAAM,EAAElC,QAAQ,CAACC;IACrB,CAAC,CAAC;IACFW,KAAK,EAAE,IAAAwE,iCAA2B,EAAC;MAC/BlD,MAAM,EAAElC,QAAQ,CAACY,KAAK;MACtB7B;IACJ,CAAC,CAAC;IACFgC,YAAY,EAAE,IAAAsE,+CAAkC,EAAC;MAC7CnD,MAAM,EAAElC,QAAQ,CAACe,YAAY;MAC7BhC;IACJ,CAAC,CAAC;IACFmC,KAAK,EAAE,IAAAoE,kCAA2B,EAAC;MAC/BpD,MAAM,EAAElC,QAAQ,CAACkB,KAAK;MACtBqE,QAAQ,EAAEvF,QAAQ,CAACqB,OAAO;MAC1B1C,aAAa;MACbI;IACJ,CAAC,CAAC;IACF0B,UAAU;IACVe,eAAe;IACfG,UAAU;IACVG;EACJ,CAAC;AACL,CAAC;AAAC5D,OAAA,CAAAM,uBAAA,GAAAA,uBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_filters","_interopRequireDefault","require","_plugins","_apiElasticsearch","_types","_table","_tableElasticsearch","_indices","_createElasticsearchIndex","_categoryEntity","_fields","_category","_menuEntity","_fields2","_menu","_pageElementEntity","_fields3","_pageElement","_settingsEntity","_settings","_systemEntity","_system","_pageEntity","_fields4","_pages","_pageElasticsearchEntity","_blockCategoryEntity","_fields5","_blockCategory","_pageBlockEntity","_fields6","_pageBlock","_pageTemplateEntity","_fields7","_pageTemplate","_plugins2","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_createIndexTaskPlugin","_api","createStorageOperations","params","documentClient","elasticsearch","table","esTable","attributes","plugins","userPlugins","tableInstance","createTable","tableElasticsearchInstance","createElasticsearchTable","PluginsContainer","dynamoDbValueFilters","createCategoryDynamoDbFields","createMenuDynamoDbFields","createPageElementDynamoDbFields","createPagesElasticsearchFields","createPagesDynamoDbFields","elasticsearchIndexPlugins","createBlockCategoryDynamoDbFields","createPageBlockDynamoDbFields","createPageTemplateDynamoDbFields","entities","settings","createSettingsEntity","entityName","ENTITIES","SETTINGS","system","createSystemEntity","SYSTEM","categories","createCategoryEntity","CATEGORIES","menus","createMenuEntity","MENUS","pageElements","createPageElementEntity","PAGE_ELEMENTS","pages","createPageEntity","PAGES","pagesEs","createPageElasticsearchEntity","PAGES_ES","blockCategories","createBlockCategoryEntity","BLOCK_CATEGORIES","pageBlocks","createPageBlockEntity","PAGE_BLOCKS","pageTemplates","createPageTemplateEntity","PAGE_TEMPLATES","createCategoryStorageOperations","entity","createBlockCategoryStorageOperations","createPageBlockStorageOperations","createPageTemplateStorageOperations","beforeInit","context","db","registry","register","item","app","tags","name","types","ElasticsearchQueryBuilderOperatorPlugin","type","BlockCategoryDynamoDbElasticFieldPlugin","CategoryDynamoDbElasticFieldPlugin","IndexPageDataPlugin","MenuDynamoDbElasticFieldPlugin","PageBlockDynamoDbFieldPlugin","PageDynamoDbElasticsearchFieldPlugin","PageElasticsearchBodyModifierPlugin","PageElasticsearchFieldPlugin","PageElasticsearchIndexPlugin","PageElasticsearchQueryModifierPlugin","PageElasticsearchSortModifierPlugin","PageElementDynamoDbElasticFieldPlugin","SearchLatestPagesPlugin","SearchPagesPlugin","SearchPublishedPagesPlugin","CompressorPlugin","mergeByType","dataLoader","clear","createIndexTaskPlugin","init","i18n","locales","onLocaleBeforeCreate","subscribe","locale","tenant","createElasticsearchIndex","code","getEntities","getTable","getEsTable","createSystemStorageOperations","createSettingsStorageOperations","createMenuStorageOperations","createPageElementStorageOperations","createPageStorageOperations","esEntity"],"sources":["index.ts"],"sourcesContent":["import dynamoDbValueFilters from \"@webiny/db-dynamodb/plugins/filters\";\nimport { PluginsContainer } from \"@webiny/plugins\";\n\nimport { ElasticsearchQueryBuilderOperatorPlugin } from \"@webiny/api-elasticsearch\";\n\nimport type { StorageOperationsFactory } from \"~/types\";\nimport { ENTITIES } from \"~/types\";\nimport { createTable } from \"~/definitions/table\";\nimport { createElasticsearchTable } from \"~/definitions/tableElasticsearch\";\n\nimport { elasticsearchIndexPlugins } from \"~/elasticsearch/indices\";\nimport { createElasticsearchIndex } from \"~/elasticsearch/createElasticsearchIndex\";\n\nimport { createCategoryEntity } from \"~/definitions/categoryEntity\";\nimport { createCategoryDynamoDbFields } from \"~/operations/category/fields\";\nimport { createCategoryStorageOperations } from \"~/operations/category\";\n\nimport { createMenuEntity } from \"~/definitions/menuEntity\";\nimport { createMenuDynamoDbFields } from \"~/operations/menu/fields\";\nimport { createMenuStorageOperations } from \"~/operations/menu\";\n\nimport { createPageElementEntity } from \"~/definitions/pageElementEntity\";\nimport { createPageElementDynamoDbFields } from \"~/operations/pageElement/fields\";\nimport { createPageElementStorageOperations } from \"~/operations/pageElement\";\n\nimport { createSettingsEntity } from \"~/definitions/settingsEntity\";\nimport { createSettingsStorageOperations } from \"~/operations/settings\";\n\nimport { createSystemEntity } from \"~/definitions/systemEntity\";\nimport { createSystemStorageOperations } from \"~/operations/system\";\n\nimport { createPageEntity } from \"~/definitions/pageEntity\";\nimport {\n createPagesDynamoDbFields,\n createPagesElasticsearchFields\n} from \"~/operations/pages/fields\";\nimport { createPageStorageOperations } from \"~/operations/pages\";\nimport { createPageElasticsearchEntity } from \"~/definitions/pageElasticsearchEntity\";\n\nimport { createBlockCategoryEntity } from \"~/definitions/blockCategoryEntity\";\nimport { createBlockCategoryDynamoDbFields } from \"~/operations/blockCategory/fields\";\nimport { createBlockCategoryStorageOperations } from \"~/operations/blockCategory\";\n\nimport { createPageBlockEntity } from \"~/definitions/pageBlockEntity\";\nimport { createPageBlockDynamoDbFields } from \"~/operations/pageBlock/fields\";\nimport { createPageBlockStorageOperations } from \"~/operations/pageBlock\";\n\nimport { createPageTemplateEntity } from \"~/definitions/pageTemplateEntity\";\nimport { createPageTemplateDynamoDbFields } from \"~/operations/pageTemplate/fields\";\nimport { createPageTemplateStorageOperations } from \"~/operations/pageTemplate\";\n\nimport type { PbContext } from \"@webiny/api-page-builder/types\";\nimport {\n BlockCategoryDynamoDbElasticFieldPlugin,\n CategoryDynamoDbElasticFieldPlugin,\n IndexPageDataPlugin,\n MenuDynamoDbElasticFieldPlugin,\n PageBlockDynamoDbFieldPlugin,\n PageDynamoDbElasticsearchFieldPlugin,\n PageElasticsearchBodyModifierPlugin,\n PageElasticsearchFieldPlugin,\n PageElasticsearchIndexPlugin,\n PageElasticsearchQueryModifierPlugin,\n PageElasticsearchSortModifierPlugin,\n PageElementDynamoDbElasticFieldPlugin,\n SearchLatestPagesPlugin,\n SearchPagesPlugin,\n SearchPublishedPagesPlugin\n} from \"./plugins\";\nimport { createIndexTaskPlugin } from \"~/tasks/createIndexTaskPlugin\";\nimport { CompressorPlugin } from \"@webiny/api\";\n\nexport * from \"./plugins\";\n\nexport const createStorageOperations: StorageOperationsFactory = params => {\n const {\n documentClient,\n elasticsearch,\n table,\n esTable,\n attributes,\n plugins: userPlugins\n } = params;\n\n const tableInstance = createTable({\n table,\n documentClient\n });\n const tableElasticsearchInstance = createElasticsearchTable({\n table: esTable,\n documentClient\n });\n\n const plugins = new PluginsContainer([\n /**\n * User defined custom plugins.\n */\n ...(userPlugins || []),\n /**\n * DynamoDB filter plugins for the where conditions.\n */\n dynamoDbValueFilters(),\n /**\n * Category fields required for filtering/sorting.\n */\n createCategoryDynamoDbFields(),\n /**\n * Menu fields required for filtering/sorting.\n */\n createMenuDynamoDbFields(),\n /**\n * Page element fields required for filtering/sorting.\n */\n createPageElementDynamoDbFields(),\n /**\n * Page fields required for filtering/sorting.\n */\n createPagesElasticsearchFields(),\n /**\n * Page fields required for filtering/sorting when using dynamodb.\n */\n createPagesDynamoDbFields(),\n /**\n * Built-in Elasticsearch index templates\n */\n elasticsearchIndexPlugins(),\n /**\n * Block Category fields required for filtering/sorting.\n */\n createBlockCategoryDynamoDbFields(),\n /**\n * Page Block fields required for filtering/sorting.\n */\n createPageBlockDynamoDbFields(),\n /**\n * Page Template fields required for filtering/sorting.\n */\n createPageTemplateDynamoDbFields()\n ]);\n\n const entities = {\n settings: createSettingsEntity({\n entityName: ENTITIES.SETTINGS,\n table: tableInstance\n }),\n system: createSystemEntity({\n entityName: ENTITIES.SYSTEM,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.SYSTEM] : {}\n }),\n categories: createCategoryEntity({\n entityName: ENTITIES.CATEGORIES,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.CATEGORIES] : {}\n }),\n menus: createMenuEntity({\n entityName: ENTITIES.MENUS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.MENUS] : {}\n }),\n pageElements: createPageElementEntity({\n entityName: ENTITIES.PAGE_ELEMENTS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.PAGE_ELEMENTS] : {}\n }),\n pages: createPageEntity({\n entityName: ENTITIES.PAGES,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.PAGES] : {}\n }),\n pagesEs: createPageElasticsearchEntity({\n entityName: ENTITIES.PAGES_ES,\n table: tableElasticsearchInstance,\n attributes: attributes ? attributes[ENTITIES.PAGES_ES] : {}\n }),\n blockCategories: createBlockCategoryEntity({\n entityName: ENTITIES.BLOCK_CATEGORIES,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.BLOCK_CATEGORIES] : {}\n }),\n pageBlocks: createPageBlockEntity({\n entityName: ENTITIES.PAGE_BLOCKS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.PAGE_BLOCKS] : {}\n }),\n pageTemplates: createPageTemplateEntity({\n entityName: ENTITIES.PAGE_TEMPLATES,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.PAGE_TEMPLATES] : {}\n })\n };\n\n const categories = createCategoryStorageOperations({\n entity: entities.categories,\n plugins\n });\n const blockCategories = createBlockCategoryStorageOperations({\n entity: entities.blockCategories,\n plugins\n });\n const pageBlocks = createPageBlockStorageOperations({\n entity: entities.pageBlocks,\n plugins\n });\n const pageTemplates = createPageTemplateStorageOperations({\n entity: entities.pageTemplates,\n plugins\n });\n\n return {\n beforeInit: async (context: PbContext) => {\n context.db.registry.register({\n item: entities.pages,\n app: \"pb\",\n tags: [\"regular\", entities.pages.name]\n });\n context.db.registry.register({\n item: entities.pagesEs,\n app: \"pb\",\n tags: [\"es\", entities.pagesEs.name]\n });\n const types: string[] = [\n ElasticsearchQueryBuilderOperatorPlugin.type,\n // Page Builder\n BlockCategoryDynamoDbElasticFieldPlugin.type,\n CategoryDynamoDbElasticFieldPlugin.type,\n IndexPageDataPlugin.type,\n MenuDynamoDbElasticFieldPlugin.type,\n PageBlockDynamoDbFieldPlugin.type,\n PageDynamoDbElasticsearchFieldPlugin.type,\n PageElasticsearchBodyModifierPlugin.type,\n PageElasticsearchFieldPlugin.type,\n PageElasticsearchIndexPlugin.type,\n PageElasticsearchQueryModifierPlugin.type,\n PageElasticsearchSortModifierPlugin.type,\n PageElementDynamoDbElasticFieldPlugin.type,\n SearchLatestPagesPlugin.type,\n SearchPagesPlugin.type,\n SearchPublishedPagesPlugin.type,\n CompressorPlugin.type\n ];\n for (const type of types) {\n plugins.mergeByType(context.plugins, type);\n }\n pageTemplates.dataLoader.clear();\n pageBlocks.dataLoader.clear();\n blockCategories.dataLoader.clear();\n categories.dataLoader.clear();\n\n context.plugins.register([createIndexTaskPlugin(), elasticsearchIndexPlugins()]);\n },\n init: async (context: PbContext) => {\n context.i18n.locales.onLocaleBeforeCreate.subscribe(async ({ locale, tenant }) => {\n await createElasticsearchIndex({\n elasticsearch,\n plugins,\n locale: locale.code,\n tenant\n });\n });\n },\n getEntities: () => entities,\n getTable: () => tableInstance,\n getEsTable: () => tableElasticsearchInstance,\n system: createSystemStorageOperations({\n entity: entities.system\n }),\n settings: createSettingsStorageOperations({\n entity: entities.settings\n }),\n menus: createMenuStorageOperations({\n entity: entities.menus,\n plugins\n }),\n pageElements: createPageElementStorageOperations({\n entity: entities.pageElements,\n plugins\n }),\n pages: createPageStorageOperations({\n entity: entities.pages,\n esEntity: entities.pagesEs,\n elasticsearch,\n plugins\n }),\n categories,\n blockCategories,\n pageBlocks,\n pageTemplates\n };\n};\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAF,OAAA;AAGA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AAEA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,yBAAA,GAAAP,OAAA;AAEA,IAAAQ,eAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AAEA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,QAAA,GAAAZ,OAAA;AACA,IAAAa,KAAA,GAAAb,OAAA;AAEA,IAAAc,kBAAA,GAAAd,OAAA;AACA,IAAAe,QAAA,GAAAf,OAAA;AACA,IAAAgB,YAAA,GAAAhB,OAAA;AAEA,IAAAiB,eAAA,GAAAjB,OAAA;AACA,IAAAkB,SAAA,GAAAlB,OAAA;AAEA,IAAAmB,aAAA,GAAAnB,OAAA;AACA,IAAAoB,OAAA,GAAApB,OAAA;AAEA,IAAAqB,WAAA,G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,MAAM,EAAEA,MAAM,CAACG,IAAI;UACnBF;QACJ,CAAC,CAAC;MACN,CAAC,CAAC;IACN,CAAC;IACDG,WAAW,EAAEA,CAAA,KAAM/E,QAAQ;IAC3BgF,QAAQ,EAAEA,CAAA,KAAM/F,aAAa;IAC7BgG,UAAU,EAAEA,CAAA,KAAM9F,0BAA0B;IAC5CmB,MAAM,EAAE,IAAA4E,qCAA6B,EAAC;MAClChD,MAAM,EAAElC,QAAQ,CAACM;IACrB,CAAC,CAAC;IACFL,QAAQ,EAAE,IAAAkF,yCAA+B,EAAC;MACtCjD,MAAM,EAAElC,QAAQ,CAACC;IACrB,CAAC,CAAC;IACFW,KAAK,EAAE,IAAAwE,iCAA2B,EAAC;MAC/BlD,MAAM,EAAElC,QAAQ,CAACY,KAAK;MACtB7B;IACJ,CAAC,CAAC;IACFgC,YAAY,EAAE,IAAAsE,+CAAkC,EAAC;MAC7CnD,MAAM,EAAElC,QAAQ,CAACe,YAAY;MAC7BhC;IACJ,CAAC,CAAC;IACFmC,KAAK,EAAE,IAAAoE,kCAA2B,EAAC;MAC/BpD,MAAM,EAAElC,QAAQ,CAACkB,KAAK;MACtBqE,QAAQ,EAAEvF,QAAQ,CAACqB,OAAO;MAC1B1C,aAAa;MACbI;IACJ,CAAC,CAAC;IACF0B,UAAU;IACVe,eAAe;IACfG,UAAU;IACVG;EACJ,CAAC;AACL,CAAC;AAAC5D,OAAA,CAAAM,uBAAA,GAAAA,uBAAA","ignoreList":[]}
@@ -1,6 +1,6 @@
1
- import { BlockCategory } from "@webiny/api-page-builder/types";
2
- import { Entity } from "@webiny/db-dynamodb/toolbox";
3
- import { DataLoaderInterface } from "../../types";
1
+ import type { BlockCategory } from "@webiny/api-page-builder/types";
2
+ import type { Entity } from "@webiny/db-dynamodb/toolbox";
3
+ import type { DataLoaderInterface } from "../../types";
4
4
  interface Params {
5
5
  entity: Entity<any>;
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_dataloader","_interopRequireDefault","require","_dbDynamodb","_cleanup","_keys","BlockCategoryDataLoader","_getDataLoader","undefined","constructor","params","entity","getOne","item","getDataLoader","load","getAll","items","loadMany","clear","clearAll","cacheKeyFn","key","tenant","locale","slug","DataLoader","batched","map","getBatch","PK","createPartitionKey","SK","createSortKey","records","batchReadAll","table","results","reduce","collection","result","cleanupItem","exports"],"sources":["dataLoader.ts"],"sourcesContent":["import DataLoader from \"dataloader\";\nimport { batchReadAll } from \"@webiny/db-dynamodb\";\nimport { BlockCategory } from \"@webiny/api-page-builder/types\";\nimport { cleanupItem } from \"@webiny/db-dynamodb/utils/cleanup\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport { createPartitionKey, createSortKey } from \"./keys\";\nimport { DataLoaderInterface } from \"~/types\";\n\ninterface Params {\n entity: Entity<any>;\n}\n\ntype DataLoaderGetItem = Pick<BlockCategory, \"slug\" | \"tenant\" | \"locale\">;\n\nexport class BlockCategoryDataLoader implements DataLoaderInterface {\n private _getDataLoader: DataLoader<any, any> | undefined = undefined;\n\n private readonly entity: Entity<any>;\n\n constructor(params: Params) {\n this.entity = params.entity;\n }\n\n public async getOne(item: DataLoaderGetItem): Promise<BlockCategory> {\n return await this.getDataLoader().load(item);\n }\n\n public async getAll(items: DataLoaderGetItem[]): Promise<BlockCategory[]> {\n return await this.getDataLoader().loadMany(items);\n }\n\n public clear(): void {\n this.getDataLoader().clearAll();\n }\n\n private getDataLoader(): DataLoader<any, any> {\n if (!this._getDataLoader) {\n const cacheKeyFn = (key: DataLoaderGetItem) => {\n return `T#${key.tenant}#L#${key.locale}#${key.slug}`;\n };\n this._getDataLoader = new DataLoader(\n async items => {\n const batched = items.map(item => {\n return this.entity.getBatch({\n PK: createPartitionKey(item),\n SK: createSortKey(item)\n });\n });\n\n const records = await batchReadAll<BlockCategory>({\n table: this.entity.table,\n items: batched\n });\n\n const results = records.reduce((collection, result) => {\n if (!result) {\n return collection;\n }\n const key = cacheKeyFn(result);\n collection[key] = cleanupItem(this.entity, result) as BlockCategory;\n return collection;\n }, {} as Record<string, BlockCategory>);\n return items.map(item => {\n const key = cacheKeyFn(item);\n return results[key] || null;\n });\n },\n {\n cacheKeyFn\n }\n );\n }\n return this._getDataLoader;\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAH,OAAA;AASO,MAAMI,uBAAuB,CAAgC;EACxDC,cAAc,GAAqCC,SAAS;EAIpEC,WAAWA,CAACC,MAAc,EAAE;IACxB,IAAI,CAACC,MAAM,GAAGD,MAAM,CAACC,MAAM;EAC/B;EAEA,MAAaC,MAAMA,CAACC,IAAuB,EAA0B;IACjE,OAAO,MAAM,IAAI,CAACC,aAAa,CAAC,CAAC,CAACC,IAAI,CAACF,IAAI,CAAC;EAChD;EAEA,MAAaG,MAAMA,CAACC,KAA0B,EAA4B;IACtE,OAAO,MAAM,IAAI,CAACH,aAAa,CAAC,CAAC,CAACI,QAAQ,CAACD,KAAK,CAAC;EACrD;EAEOE,KAAKA,CAAA,EAAS;IACjB,IAAI,CAACL,aAAa,CAAC,CAAC,CAACM,QAAQ,CAAC,CAAC;EACnC;EAEQN,aAAaA,CAAA,EAAyB;IAC1C,IAAI,CAAC,IAAI,CAACP,cAAc,EAAE;MACtB,MAAMc,UAAU,GAAIC,GAAsB,IAAK;QAC3C,OAAO,KAAKA,GAAG,CAACC,MAAM,MAAMD,GAAG,CAACE,MAAM,IAAIF,GAAG,CAACG,IAAI,EAAE;MACxD,CAAC;MACD,IAAI,CAAClB,cAAc,GAAG,IAAImB,mBAAU,CAChC,MAAMT,KAAK,IAAI;QACX,MAAMU,OAAO,GAAGV,KAAK,CAACW,GAAG,CAACf,IAAI,IAAI;UAC9B,OAAO,IAAI,CAACF,MAAM,CAACkB,QAAQ,CAAC;YACxBC,EAAE,EAAE,IAAAC,wBAAkB,EAAClB,IAAI,CAAC;YAC5BmB,EAAE,EAAE,IAAAC,mBAAa,EAACpB,IAAI;UAC1B,CAAC,CAAC;QACN,CAAC,CAAC;QAEF,MAAMqB,OAAO,GAAG,MAAM,IAAAC,wBAAY,EAAgB;UAC9CC,KAAK,EAAE,IAAI,CAACzB,MAAM,CAACyB,KAAK;UACxBnB,KAAK,EAAEU;QACX,CAAC,CAAC;QAEF,MAAMU,OAAO,GAAGH,OAAO,CAACI,MAAM,CAAC,CAACC,UAAU,EAAEC,MAAM,KAAK;UACnD,IAAI,CAACA,MAAM,EAAE;YACT,OAAOD,UAAU;UACrB;UACA,MAAMjB,GAAG,GAAGD,UAAU,CAACmB,MAAM,CAAC;UAC9BD,UAAU,CAACjB,GAAG,CAAC,GAAG,IAAAmB,oBAAW,EAAC,IAAI,CAAC9B,MAAM,EAAE6B,MAAM,CAAkB;UACnE,OAAOD,UAAU;QACrB,CAAC,EAAE,CAAC,CAAkC,CAAC;QACvC,OAAOtB,KAAK,CAACW,GAAG,CAACf,IAAI,IAAI;UACrB,MAAMS,GAAG,GAAGD,UAAU,CAACR,IAAI,CAAC;UAC5B,OAAOwB,OAAO,CAACf,GAAG,CAAC,IAAI,IAAI;QAC/B,CAAC,CAAC;MACN,CAAC,EACD;QACID;MACJ,CACJ,CAAC;IACL;IACA,OAAO,IAAI,CAACd,cAAc;EAC9B;AACJ;AAACmC,OAAA,CAAApC,uBAAA,GAAAA,uBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_dataloader","_interopRequireDefault","require","_dbDynamodb","_cleanup","_keys","BlockCategoryDataLoader","_getDataLoader","undefined","constructor","params","entity","getOne","item","getDataLoader","load","getAll","items","loadMany","clear","clearAll","cacheKeyFn","key","tenant","locale","slug","DataLoader","batched","map","getBatch","PK","createPartitionKey","SK","createSortKey","records","batchReadAll","table","results","reduce","collection","result","cleanupItem","exports"],"sources":["dataLoader.ts"],"sourcesContent":["import DataLoader from \"dataloader\";\nimport { batchReadAll } from \"@webiny/db-dynamodb\";\nimport type { BlockCategory } from \"@webiny/api-page-builder/types\";\nimport { cleanupItem } from \"@webiny/db-dynamodb/utils/cleanup\";\nimport type { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport { createPartitionKey, createSortKey } from \"./keys\";\nimport type { DataLoaderInterface } from \"~/types\";\n\ninterface Params {\n entity: Entity<any>;\n}\n\ntype DataLoaderGetItem = Pick<BlockCategory, \"slug\" | \"tenant\" | \"locale\">;\n\nexport class BlockCategoryDataLoader implements DataLoaderInterface {\n private _getDataLoader: DataLoader<any, any> | undefined = undefined;\n\n private readonly entity: Entity<any>;\n\n constructor(params: Params) {\n this.entity = params.entity;\n }\n\n public async getOne(item: DataLoaderGetItem): Promise<BlockCategory> {\n return await this.getDataLoader().load(item);\n }\n\n public async getAll(items: DataLoaderGetItem[]): Promise<BlockCategory[]> {\n return await this.getDataLoader().loadMany(items);\n }\n\n public clear(): void {\n this.getDataLoader().clearAll();\n }\n\n private getDataLoader(): DataLoader<any, any> {\n if (!this._getDataLoader) {\n const cacheKeyFn = (key: DataLoaderGetItem) => {\n return `T#${key.tenant}#L#${key.locale}#${key.slug}`;\n };\n this._getDataLoader = new DataLoader(\n async items => {\n const batched = items.map(item => {\n return this.entity.getBatch({\n PK: createPartitionKey(item),\n SK: createSortKey(item)\n });\n });\n\n const records = await batchReadAll<BlockCategory>({\n table: this.entity.table,\n items: batched\n });\n\n const results = records.reduce((collection, result) => {\n if (!result) {\n return collection;\n }\n const key = cacheKeyFn(result);\n collection[key] = cleanupItem(this.entity, result) as BlockCategory;\n return collection;\n }, {} as Record<string, BlockCategory>);\n return items.map(item => {\n const key = cacheKeyFn(item);\n return results[key] || null;\n });\n },\n {\n cacheKeyFn\n }\n );\n }\n return this._getDataLoader;\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,QAAA,GAAAF,OAAA;AAEA,I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O,CAACI,MAAM,CAAC,CAACC,UAAU,EAAEC,MAAM,KAAK;UACnD,IAAI,CAACA,MAAM,EAAE;YACT,OAAOD,UAAU;UACrB;UACA,MAAMjB,GAAG,GAAGD,UAAU,CAACmB,MAAM,CAAC;UAC9BD,UAAU,CAACjB,GAAG,CAAC,GAAG,IAAAmB,oBAAW,EAAC,IAAI,CAAC9B,MAAM,EAAE6B,MAAM,CAAkB;UACnE,OAAOD,UAAU;QACrB,CAAC,EAAE,CAAC,CAAkC,CAAC;QACvC,OAAOtB,KAAK,CAACW,GAAG,CAACf,IAAI,IAAI;UACrB,MAAMS,GAAG,GAAGD,UAAU,CAACR,IAAI,CAAC;UAC5B,OAAOwB,OAAO,CAACf,GAAG,CAAC,IAAI,IAAI;QAC/B,CAAC,CAAC;MACN,CAAC,EACD;QACID;MACJ,CACJ,CAAC;IACL;IACA,OAAO,IAAI,CAACd,cAAc;EAC9B;AACJ;AAACmC,OAAA,CAAApC,uBAAA,GAAAA,uBAAA","ignoreList":[]}
@@ -1,6 +1,6 @@
1
- import { Entity } from "@webiny/db-dynamodb/toolbox";
2
- import { PluginsContainer } from "@webiny/plugins";
3
- import { BlockCategoryStorageOperations } from "../../types";
1
+ import type { Entity } from "@webiny/db-dynamodb/toolbox";
2
+ import type { PluginsContainer } from "@webiny/plugins";
3
+ import type { BlockCategoryStorageOperations } from "../../types";
4
4
  export interface CreateBlockCategoryStorageOperationsParams {
5
5
  entity: Entity<any>;
6
6
  plugins: PluginsContainer;