@webiny/api-headless-cms-ddb-es 6.6.0-alpha.12 → 6.6.0-alpha.14

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 (114) hide show
  1. package/feature.d.ts +4 -4
  2. package/feature.js +4 -60
  3. package/feature.js.map +1 -1
  4. package/index.d.ts +2 -0
  5. package/index.js +2 -0
  6. package/operations/entry/DdbEsCreateEntry.d.ts +3 -1
  7. package/operations/entry/DdbEsCreateEntry.js +18 -8
  8. package/operations/entry/DdbEsCreateEntry.js.map +1 -1
  9. package/operations/entry/DdbEsCreateEntryRevisionFrom.d.ts +3 -1
  10. package/operations/entry/DdbEsCreateEntryRevisionFrom.js +23 -10
  11. package/operations/entry/DdbEsCreateEntryRevisionFrom.js.map +1 -1
  12. package/operations/entry/DdbEsDeleteEntry.d.ts +3 -3
  13. package/operations/entry/DdbEsDeleteEntry.js +7 -7
  14. package/operations/entry/DdbEsDeleteEntry.js.map +1 -1
  15. package/operations/entry/DdbEsDeleteEntryRevision.d.ts +3 -1
  16. package/operations/entry/DdbEsDeleteEntryRevision.js +27 -11
  17. package/operations/entry/DdbEsDeleteEntryRevision.js.map +1 -1
  18. package/operations/entry/DdbEsDeleteMultipleEntries.d.ts +3 -1
  19. package/operations/entry/DdbEsDeleteMultipleEntries.js +14 -7
  20. package/operations/entry/DdbEsDeleteMultipleEntries.js.map +1 -1
  21. package/operations/entry/DdbEsGetEntriesByIds.d.ts +3 -1
  22. package/operations/entry/DdbEsGetEntriesByIds.js +10 -3
  23. package/operations/entry/DdbEsGetEntriesByIds.js.map +1 -1
  24. package/operations/entry/DdbEsGetEntry.d.ts +3 -1
  25. package/operations/entry/DdbEsGetEntry.js +6 -2
  26. package/operations/entry/DdbEsGetEntry.js.map +1 -1
  27. package/operations/entry/DdbEsGetLatestEntriesByIds.d.ts +3 -1
  28. package/operations/entry/DdbEsGetLatestEntriesByIds.js +10 -3
  29. package/operations/entry/DdbEsGetLatestEntriesByIds.js.map +1 -1
  30. package/operations/entry/DdbEsGetLatestRevisionByEntryId.d.ts +3 -1
  31. package/operations/entry/DdbEsGetLatestRevisionByEntryId.js +10 -3
  32. package/operations/entry/DdbEsGetLatestRevisionByEntryId.js.map +1 -1
  33. package/operations/entry/DdbEsGetPreviousRevision.d.ts +3 -1
  34. package/operations/entry/DdbEsGetPreviousRevision.js +6 -3
  35. package/operations/entry/DdbEsGetPreviousRevision.js.map +1 -1
  36. package/operations/entry/DdbEsGetPublishedEntriesByIds.d.ts +3 -1
  37. package/operations/entry/DdbEsGetPublishedEntriesByIds.js +10 -3
  38. package/operations/entry/DdbEsGetPublishedEntriesByIds.js.map +1 -1
  39. package/operations/entry/DdbEsGetPublishedRevisionByEntryId.d.ts +3 -1
  40. package/operations/entry/DdbEsGetPublishedRevisionByEntryId.js +10 -3
  41. package/operations/entry/DdbEsGetPublishedRevisionByEntryId.js.map +1 -1
  42. package/operations/entry/DdbEsGetRevisionById.d.ts +3 -1
  43. package/operations/entry/DdbEsGetRevisionById.js +10 -3
  44. package/operations/entry/DdbEsGetRevisionById.js.map +1 -1
  45. package/operations/entry/DdbEsGetRevisions.d.ts +3 -1
  46. package/operations/entry/DdbEsGetRevisions.js +10 -3
  47. package/operations/entry/DdbEsGetRevisions.js.map +1 -1
  48. package/operations/entry/DdbEsGetUniqueFieldValues.d.ts +3 -1
  49. package/operations/entry/DdbEsGetUniqueFieldValues.js +6 -2
  50. package/operations/entry/DdbEsGetUniqueFieldValues.js.map +1 -1
  51. package/operations/entry/DdbEsListEntries.d.ts +3 -1
  52. package/operations/entry/DdbEsListEntries.js +6 -2
  53. package/operations/entry/DdbEsListEntries.js.map +1 -1
  54. package/operations/entry/DdbEsMoveEntry.d.ts +3 -3
  55. package/operations/entry/DdbEsMoveEntry.js +8 -8
  56. package/operations/entry/DdbEsMoveEntry.js.map +1 -1
  57. package/operations/entry/DdbEsMoveToBin.d.ts +3 -1
  58. package/operations/entry/DdbEsMoveToBin.js +8 -4
  59. package/operations/entry/DdbEsMoveToBin.js.map +1 -1
  60. package/operations/entry/DdbEsPublishEntry.d.ts +3 -1
  61. package/operations/entry/DdbEsPublishEntry.js +31 -15
  62. package/operations/entry/DdbEsPublishEntry.js.map +1 -1
  63. package/operations/entry/DdbEsRestoreFromBin.d.ts +3 -1
  64. package/operations/entry/DdbEsRestoreFromBin.js +8 -4
  65. package/operations/entry/DdbEsRestoreFromBin.js.map +1 -1
  66. package/operations/entry/DdbEsUnpublishEntry.d.ts +3 -1
  67. package/operations/entry/DdbEsUnpublishEntry.js +22 -9
  68. package/operations/entry/DdbEsUnpublishEntry.js.map +1 -1
  69. package/operations/entry/DdbEsUpdateEntry.d.ts +3 -1
  70. package/operations/entry/DdbEsUpdateEntry.js +27 -11
  71. package/operations/entry/DdbEsUpdateEntry.js.map +1 -1
  72. package/operations/entry/keys.d.ts +7 -6
  73. package/operations/entry/keys.js +6 -6
  74. package/operations/entry/keys.js.map +1 -1
  75. package/operations/group/DdbEsCreateGroup.d.ts +3 -1
  76. package/operations/group/DdbEsCreateGroup.js +14 -4
  77. package/operations/group/DdbEsCreateGroup.js.map +1 -1
  78. package/operations/group/DdbEsDeleteGroup.d.ts +3 -1
  79. package/operations/group/DdbEsDeleteGroup.js +10 -3
  80. package/operations/group/DdbEsDeleteGroup.js.map +1 -1
  81. package/operations/group/DdbEsGetGroup.d.ts +3 -1
  82. package/operations/group/DdbEsGetGroup.js +10 -3
  83. package/operations/group/DdbEsGetGroup.js.map +1 -1
  84. package/operations/group/DdbEsListGroups.d.ts +3 -1
  85. package/operations/group/DdbEsListGroups.js +9 -3
  86. package/operations/group/DdbEsListGroups.js.map +1 -1
  87. package/operations/group/DdbEsUpdateGroup.d.ts +3 -1
  88. package/operations/group/DdbEsUpdateGroup.js +14 -4
  89. package/operations/group/DdbEsUpdateGroup.js.map +1 -1
  90. package/operations/model/DdbEsCreateModel.d.ts +3 -1
  91. package/operations/model/DdbEsCreateModel.js +14 -4
  92. package/operations/model/DdbEsCreateModel.js.map +1 -1
  93. package/operations/model/DdbEsDeleteModel.d.ts +3 -1
  94. package/operations/model/DdbEsDeleteModel.js +10 -3
  95. package/operations/model/DdbEsDeleteModel.js.map +1 -1
  96. package/operations/model/DdbEsGetModel.d.ts +3 -1
  97. package/operations/model/DdbEsGetModel.js +10 -3
  98. package/operations/model/DdbEsGetModel.js.map +1 -1
  99. package/operations/model/DdbEsListModels.d.ts +4 -2
  100. package/operations/model/DdbEsListModels.js +10 -5
  101. package/operations/model/DdbEsListModels.js.map +1 -1
  102. package/operations/model/DdbEsUpdateModel.d.ts +3 -1
  103. package/operations/model/DdbEsUpdateModel.js +14 -4
  104. package/operations/model/DdbEsUpdateModel.js.map +1 -1
  105. package/package.json +26 -26
  106. package/registry/CmsEntitiesDbRegistryDecorator.d.ts +4 -4
  107. package/registry/CmsEntitiesDbRegistryDecorator.js.map +1 -1
  108. package/storageFeature.d.ts +12 -0
  109. package/storageFeature.js +25 -0
  110. package/storageFeature.js.map +1 -0
  111. package/tablesFeature.d.ts +8 -0
  112. package/tablesFeature.js +53 -0
  113. package/tablesFeature.js.map +1 -0
  114. package/types.js.map +1 -1
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The DynamoDB+OpenSearch CMS storage of a tenant scope: the storage operations, the per-scope state
3
+ * (the entry DataLoaders, the filter registries, the OpenSearch field indexes and model index cache),
4
+ * the index creation task and the decorator that adds the CMS entities to the scope's `DbRegistry`
5
+ * for the DDB to OpenSearch sync. They run on the tables and entities the root holds
6
+ * (`HeadlessCmsDdbEsTablesFeature`) and the OpenSearch core. Registered in each scope on this storage,
7
+ * so a scope on another storage gets none of them.
8
+ */
9
+ export declare const HeadlessCmsDdbEsStorageFeature: {
10
+ name: string;
11
+ register(container: import("@webiny/di").Container): void;
12
+ };
@@ -0,0 +1,25 @@
1
+ import { createFeature } from "@webiny/feature/api/index.js";
2
+ import { FilterUtilFeature } from "@webiny/db-dynamodb/feature/FilterUtil/feature.js";
3
+ import { CmsEntryOpenSearchUtilsFeature } from "@webiny/api-headless-cms-utils-os";
4
+ import { FilterRegistriesFeature } from "@webiny/api-headless-cms-storage";
5
+ import { CreateElasticsearchIndexTask } from "./tasks/CreateElasticsearchIndexTask.js";
6
+ import { CmsEntitiesDbRegistryDecorator } from "./registry/CmsEntitiesDbRegistryDecorator.js";
7
+ import { DdbEsGroupStorageOpsFeature } from "./operations/group/feature.js";
8
+ import { DdbEsModelStorageOpsFeature } from "./operations/model/feature.js";
9
+ import { DdbEsEntryStorageOpsFeature } from "./operations/entry/feature.js";
10
+ const HeadlessCmsDdbEsStorageFeature = createFeature({
11
+ name: "cms.storageOperations.openSearch.storage",
12
+ register: (container)=>{
13
+ FilterUtilFeature.register(container);
14
+ CmsEntryOpenSearchUtilsFeature.register(container);
15
+ FilterRegistriesFeature.register(container);
16
+ container.register(CreateElasticsearchIndexTask);
17
+ container.registerDecorator(CmsEntitiesDbRegistryDecorator);
18
+ DdbEsGroupStorageOpsFeature.register(container);
19
+ DdbEsModelStorageOpsFeature.register(container);
20
+ DdbEsEntryStorageOpsFeature.register(container);
21
+ }
22
+ });
23
+ export { HeadlessCmsDdbEsStorageFeature };
24
+
25
+ //# sourceMappingURL=storageFeature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageFeature.js","sources":["../src/storageFeature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api/index.js\";\nimport { FilterUtilFeature } from \"@webiny/db-dynamodb/feature/FilterUtil/feature.js\";\nimport { CmsEntryOpenSearchUtilsFeature } from \"@webiny/api-headless-cms-utils-os\";\nimport { FilterRegistriesFeature } from \"@webiny/api-headless-cms-storage\";\nimport { CreateElasticsearchIndexTask } from \"~/tasks/CreateElasticsearchIndexTask.js\";\nimport { CmsEntitiesDbRegistryDecorator } from \"~/registry/CmsEntitiesDbRegistryDecorator.js\";\nimport { DdbEsGroupStorageOpsFeature } from \"~/operations/group/feature.js\";\nimport { DdbEsModelStorageOpsFeature } from \"~/operations/model/feature.js\";\nimport { DdbEsEntryStorageOpsFeature } from \"~/operations/entry/feature.js\";\n\n/**\n * The DynamoDB+OpenSearch CMS storage of a tenant scope: the storage operations, the per-scope state\n * (the entry DataLoaders, the filter registries, the OpenSearch field indexes and model index cache),\n * the index creation task and the decorator that adds the CMS entities to the scope's `DbRegistry`\n * for the DDB to OpenSearch sync. They run on the tables and entities the root holds\n * (`HeadlessCmsDdbEsTablesFeature`) and the OpenSearch core. Registered in each scope on this storage,\n * so a scope on another storage gets none of them.\n */\nexport const HeadlessCmsDdbEsStorageFeature = createFeature({\n name: \"cms.storageOperations.openSearch.storage\",\n register: container => {\n FilterUtilFeature.register(container);\n CmsEntryOpenSearchUtilsFeature.register(container);\n FilterRegistriesFeature.register(container);\n\n container.register(CreateElasticsearchIndexTask);\n\n // Adds the CMS entities to the scope's DbRegistry, for the DDB to OpenSearch sync.\n container.registerDecorator(CmsEntitiesDbRegistryDecorator);\n\n DdbEsGroupStorageOpsFeature.register(container);\n DdbEsModelStorageOpsFeature.register(container);\n DdbEsEntryStorageOpsFeature.register(container);\n }\n});\n"],"names":["HeadlessCmsDdbEsStorageFeature","createFeature","container","FilterUtilFeature","CmsEntryOpenSearchUtilsFeature","FilterRegistriesFeature","CreateElasticsearchIndexTask","CmsEntitiesDbRegistryDecorator","DdbEsGroupStorageOpsFeature","DdbEsModelStorageOpsFeature","DdbEsEntryStorageOpsFeature"],"mappings":";;;;;;;;;AAkBO,MAAMA,iCAAiCC,cAAc;IACxD,MAAM;IACN,UAAUC,CAAAA;QACNC,kBAAkB,QAAQ,CAACD;QAC3BE,+BAA+B,QAAQ,CAACF;QACxCG,wBAAwB,QAAQ,CAACH;QAEjCA,UAAU,QAAQ,CAACI;QAGnBJ,UAAU,iBAAiB,CAACK;QAE5BC,4BAA4B,QAAQ,CAACN;QACrCO,4BAA4B,QAAQ,CAACP;QACrCQ,4BAA4B,QAAQ,CAACR;IACzC;AACJ"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The DynamoDB+OpenSearch CMS storage's tables and entities: built once per process, in the root
3
+ * container. Requires DynamoDBClient to be registered there first.
4
+ */
5
+ export declare const HeadlessCmsDdbEsTablesFeature: {
6
+ name: string;
7
+ register(container: import("@webiny/di").Container): void;
8
+ };
@@ -0,0 +1,53 @@
1
+ import { DynamoDBClient, createTable } from "@webiny/db-dynamodb";
2
+ import { createFeature } from "@webiny/feature/api/index.js";
3
+ import { createOpenSearchEntity, createOpenSearchTable } from "@webiny/api-opensearch-aws";
4
+ import { ENTITIES } from "./types.js";
5
+ import { createGroupEntity } from "./definitions/group.js";
6
+ import { createModelEntity } from "./definitions/model.js";
7
+ import { createEntryEntity } from "./definitions/entry.js";
8
+ import { CmsDdbEsTable } from "./abstractions/CmsDdbEsTable.js";
9
+ import { CmsDdbEsOsTable } from "./abstractions/CmsDdbEsOsTable.js";
10
+ import { CmsDdbEsGroupEntity } from "./abstractions/CmsDdbEsGroupEntity.js";
11
+ import { CmsDdbEsModelEntity } from "./abstractions/CmsDdbEsModelEntity.js";
12
+ import { CmsDdbEsEntryEntity } from "./abstractions/CmsDdbEsEntryEntity.js";
13
+ import { CmsDdbEsEntriesEsEntity } from "./abstractions/CmsDdbEsEntriesEsEntity.js";
14
+ const HeadlessCmsDdbEsTablesFeature = createFeature({
15
+ name: "cms.storageOperations.openSearch.tables",
16
+ register: (container)=>{
17
+ const db = container.resolve(DynamoDBClient);
18
+ const documentClient = db.client;
19
+ const tableInstance = createTable({
20
+ name: process.env.DB_TABLE,
21
+ documentClient
22
+ });
23
+ const tableElasticsearchInstance = createOpenSearchTable({
24
+ name: process.env.DB_TABLE_OPENSEARCH,
25
+ documentClient
26
+ });
27
+ const groupEntity = createGroupEntity({
28
+ entityName: ENTITIES.GROUPS,
29
+ table: tableInstance
30
+ });
31
+ const modelEntity = createModelEntity({
32
+ entityName: ENTITIES.MODELS,
33
+ table: tableInstance
34
+ });
35
+ const entryEntity = createEntryEntity({
36
+ entityName: ENTITIES.ENTRIES,
37
+ table: tableInstance
38
+ });
39
+ const entriesEsEntity = createOpenSearchEntity({
40
+ entityName: ENTITIES.ENTRIES_ES,
41
+ table: tableElasticsearchInstance
42
+ });
43
+ container.registerInstance(CmsDdbEsTable, tableInstance);
44
+ container.registerInstance(CmsDdbEsOsTable, tableElasticsearchInstance);
45
+ container.registerInstance(CmsDdbEsGroupEntity, groupEntity);
46
+ container.registerInstance(CmsDdbEsModelEntity, modelEntity);
47
+ container.registerInstance(CmsDdbEsEntryEntity, entryEntity);
48
+ container.registerInstance(CmsDdbEsEntriesEsEntity, entriesEsEntity);
49
+ }
50
+ });
51
+ export { HeadlessCmsDdbEsTablesFeature };
52
+
53
+ //# sourceMappingURL=tablesFeature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tablesFeature.js","sources":["../src/tablesFeature.ts"],"sourcesContent":["import { createTable, DynamoDBClient } from \"@webiny/db-dynamodb\";\nimport { createFeature } from \"@webiny/feature/api/index.js\";\nimport { createOpenSearchEntity, createOpenSearchTable } from \"@webiny/api-opensearch-aws\";\nimport { ENTITIES } from \"~/types.js\";\nimport { createGroupEntity } from \"~/definitions/group.js\";\nimport { createModelEntity } from \"~/definitions/model.js\";\nimport { createEntryEntity } from \"~/definitions/entry.js\";\nimport { CmsDdbEsTable } from \"~/abstractions/CmsDdbEsTable.js\";\nimport { CmsDdbEsOsTable } from \"~/abstractions/CmsDdbEsOsTable.js\";\nimport { CmsDdbEsGroupEntity } from \"~/abstractions/CmsDdbEsGroupEntity.js\";\nimport { CmsDdbEsModelEntity } from \"~/abstractions/CmsDdbEsModelEntity.js\";\nimport { CmsDdbEsEntryEntity } from \"~/abstractions/CmsDdbEsEntryEntity.js\";\nimport { CmsDdbEsEntriesEsEntity } from \"~/abstractions/CmsDdbEsEntriesEsEntity.js\";\n\n/**\n * The DynamoDB+OpenSearch CMS storage's tables and entities: built once per process, in the root\n * container. Requires DynamoDBClient to be registered there first.\n */\nexport const HeadlessCmsDdbEsTablesFeature = createFeature({\n name: \"cms.storageOperations.openSearch.tables\",\n register: container => {\n const db = container.resolve(DynamoDBClient);\n const documentClient = db.client;\n\n const tableInstance = createTable({\n name: process.env.DB_TABLE as string,\n documentClient\n });\n const tableElasticsearchInstance = createOpenSearchTable({\n name: process.env.DB_TABLE_OPENSEARCH as string,\n documentClient\n });\n\n const groupEntity = createGroupEntity({\n entityName: ENTITIES.GROUPS,\n table: tableInstance\n });\n const modelEntity = createModelEntity({\n entityName: ENTITIES.MODELS,\n table: tableInstance\n });\n const entryEntity = createEntryEntity({\n entityName: ENTITIES.ENTRIES,\n table: tableInstance\n });\n const entriesEsEntity = createOpenSearchEntity({\n entityName: ENTITIES.ENTRIES_ES,\n table: tableElasticsearchInstance\n });\n\n container.registerInstance(CmsDdbEsTable, tableInstance);\n container.registerInstance(CmsDdbEsOsTable, tableElasticsearchInstance);\n container.registerInstance(CmsDdbEsGroupEntity, groupEntity);\n container.registerInstance(CmsDdbEsModelEntity, modelEntity);\n container.registerInstance(CmsDdbEsEntryEntity, entryEntity);\n container.registerInstance(CmsDdbEsEntriesEsEntity, entriesEsEntity);\n }\n});\n"],"names":["HeadlessCmsDdbEsTablesFeature","createFeature","container","db","DynamoDBClient","documentClient","tableInstance","createTable","process","tableElasticsearchInstance","createOpenSearchTable","groupEntity","createGroupEntity","ENTITIES","modelEntity","createModelEntity","entryEntity","createEntryEntity","entriesEsEntity","createOpenSearchEntity","CmsDdbEsTable","CmsDdbEsOsTable","CmsDdbEsGroupEntity","CmsDdbEsModelEntity","CmsDdbEsEntryEntity","CmsDdbEsEntriesEsEntity"],"mappings":";;;;;;;;;;;;;AAkBO,MAAMA,gCAAgCC,cAAc;IACvD,MAAM;IACN,UAAUC,CAAAA;QACN,MAAMC,KAAKD,UAAU,OAAO,CAACE;QAC7B,MAAMC,iBAAiBF,GAAG,MAAM;QAEhC,MAAMG,gBAAgBC,YAAY;YAC9B,MAAMC,QAAQ,GAAG,CAAC,QAAQ;YAC1BH;QACJ;QACA,MAAMI,6BAA6BC,sBAAsB;YACrD,MAAMF,QAAQ,GAAG,CAAC,mBAAmB;YACrCH;QACJ;QAEA,MAAMM,cAAcC,kBAAkB;YAClC,YAAYC,SAAS,MAAM;YAC3B,OAAOP;QACX;QACA,MAAMQ,cAAcC,kBAAkB;YAClC,YAAYF,SAAS,MAAM;YAC3B,OAAOP;QACX;QACA,MAAMU,cAAcC,kBAAkB;YAClC,YAAYJ,SAAS,OAAO;YAC5B,OAAOP;QACX;QACA,MAAMY,kBAAkBC,uBAAuB;YAC3C,YAAYN,SAAS,UAAU;YAC/B,OAAOJ;QACX;QAEAP,UAAU,gBAAgB,CAACkB,eAAed;QAC1CJ,UAAU,gBAAgB,CAACmB,iBAAiBZ;QAC5CP,UAAU,gBAAgB,CAACoB,qBAAqBX;QAChDT,UAAU,gBAAgB,CAACqB,qBAAqBT;QAChDZ,UAAU,gBAAgB,CAACsB,qBAAqBR;QAChDd,UAAU,gBAAgB,CAACuB,yBAAyBP;IACxD;AACJ"}
package/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":["import type {\n CmsContext,\n CmsEntryValues,\n CmsModel,\n CmsStorageEntry\n} from \"@webiny/api-headless-cms/types/index.js\";\n\nexport { CmsContext };\n\nexport enum ENTITIES {\n GROUPS = \"CmsGroups\",\n MODELS = \"CmsModels\",\n ENTRIES = \"CmsEntries\",\n ENTRIES_ES = \"CmsEntriesElasticsearch\"\n}\n\nexport interface DataLoadersHandlerInterfaceClearAllParams {\n tenant: string;\n}\n\nexport interface DataLoadersHandlerDataLoaderParams {\n model: Pick<CmsModel, \"tenant\" | \"modelId\">;\n ids: readonly string[];\n}\n\nexport interface IDataLoadersHandler {\n getAllEntryRevisions<T extends CmsEntryValues = CmsEntryValues>(\n params: DataLoadersHandlerDataLoaderParams\n ): Promise<CmsStorageEntry<T>[]>;\n getRevisionById<T extends CmsEntryValues = CmsEntryValues>(\n params: DataLoadersHandlerDataLoaderParams\n ): Promise<CmsStorageEntry<T>[]>;\n getPublishedRevisionByEntryId<T extends CmsEntryValues = CmsEntryValues>(\n params: DataLoadersHandlerDataLoaderParams\n ): Promise<CmsStorageEntry<T>[]>;\n getLatestRevisionByEntryId<T extends CmsEntryValues = CmsEntryValues>(\n params: DataLoadersHandlerDataLoaderParams\n ): Promise<CmsStorageEntry<T>[]>;\n clearAll: (params?: DataLoadersHandlerInterfaceClearAllParams) => void;\n}\n"],"names":["ENTITIES"],"mappings":"AASO,IAAKA,iBAAQA,WAAAA,GAAAA,SAARA,QAAQ;;;;;WAARA"}
1
+ {"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":["import type {\n CmsContext,\n CmsEntryValues,\n CmsModel,\n CmsStorageEntry\n} from \"@webiny/api-headless-cms/types/index.js\";\n\nexport { CmsContext };\n\nexport enum ENTITIES {\n GROUPS = \"CmsGroups\",\n MODELS = \"CmsModels\",\n ENTRIES = \"CmsEntries\",\n ENTRIES_ES = \"CmsEntriesElasticsearch\"\n}\n\nexport interface DataLoadersHandlerInterfaceClearAllParams {\n tenant: string;\n}\n\nexport interface DataLoadersHandlerDataLoaderParams {\n model: Pick<CmsModel, \"tenant\" | \"modelId\">;\n ids: readonly string[];\n}\n\nexport interface IDataLoadersHandler {\n getAllEntryRevisions<T extends CmsEntryValues = CmsEntryValues>(\n params: DataLoadersHandlerDataLoaderParams\n ): Promise<CmsStorageEntry<T>[]>;\n getRevisionById<T extends CmsEntryValues = CmsEntryValues>(\n params: DataLoadersHandlerDataLoaderParams\n ): Promise<CmsStorageEntry<T>[]>;\n getPublishedRevisionByEntryId<T extends CmsEntryValues = CmsEntryValues>(\n params: DataLoadersHandlerDataLoaderParams\n ): Promise<CmsStorageEntry<T>[]>;\n getLatestRevisionByEntryId<T extends CmsEntryValues = CmsEntryValues>(\n params: DataLoadersHandlerDataLoaderParams\n ): Promise<CmsStorageEntry<T>[]>;\n clearAll: (params?: DataLoadersHandlerInterfaceClearAllParams) => void;\n}\n"],"names":["ENTITIES"],"mappings":"AASO,IAAKA,iBAAQA,WAAAA,GAAAA,SAAAA,QAAAA"}