@webiny/api-headless-cms-ddb 0.0.0-unstable.990c3ab1b6 → 0.0.0-unstable.aa00eecd97

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 (123) hide show
  1. package/definitions/entry.js +3 -0
  2. package/definitions/entry.js.map +1 -1
  3. package/definitions/model.js +22 -0
  4. package/definitions/model.js.map +1 -1
  5. package/dynamoDb/index.d.ts +1 -1
  6. package/dynamoDb/storage/date.d.ts +2 -1
  7. package/dynamoDb/storage/date.js +10 -3
  8. package/dynamoDb/storage/date.js.map +1 -1
  9. package/dynamoDb/storage/longText.d.ts +1 -1
  10. package/dynamoDb/storage/longText.js +6 -0
  11. package/dynamoDb/storage/longText.js.map +1 -1
  12. package/dynamoDb/storage/richText.d.ts +1 -1
  13. package/dynamoDb/storage/richText.js.map +1 -1
  14. package/index.js +22 -11
  15. package/index.js.map +1 -1
  16. package/operations/entry/dataLoader/DataLoaderCache.d.ts +17 -0
  17. package/operations/entry/dataLoader/DataLoaderCache.js +43 -0
  18. package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -0
  19. package/operations/entry/dataLoader/constants.d.ts +1 -0
  20. package/operations/entry/dataLoader/constants.js +9 -0
  21. package/operations/entry/dataLoader/constants.js.map +1 -0
  22. package/operations/entry/dataLoader/createBatchScheduleFn.d.ts +8 -0
  23. package/operations/entry/dataLoader/createBatchScheduleFn.js +23 -0
  24. package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -0
  25. package/operations/entry/dataLoader/getAllEntryRevisions.d.ts +4 -0
  26. package/operations/entry/dataLoader/getAllEntryRevisions.js +43 -0
  27. package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -0
  28. package/operations/entry/dataLoader/getLatestRevisionByEntryId.d.ts +4 -0
  29. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +57 -0
  30. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -0
  31. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.d.ts +4 -0
  32. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +57 -0
  33. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -0
  34. package/operations/entry/dataLoader/getRevisionById.d.ts +4 -0
  35. package/operations/entry/dataLoader/getRevisionById.js +63 -0
  36. package/operations/entry/dataLoader/getRevisionById.js.map +1 -0
  37. package/operations/entry/dataLoader/index.d.ts +8 -0
  38. package/operations/entry/dataLoader/index.js +38 -0
  39. package/operations/entry/dataLoader/index.js.map +1 -0
  40. package/operations/entry/dataLoader/types.d.ts +6 -0
  41. package/operations/entry/dataLoader/types.js +5 -0
  42. package/operations/entry/dataLoader/types.js.map +1 -0
  43. package/operations/entry/dataLoaders.d.ts +11 -26
  44. package/operations/entry/dataLoaders.js +42 -205
  45. package/operations/entry/dataLoaders.js.map +1 -1
  46. package/operations/entry/filtering/createExpressions.d.ts +26 -0
  47. package/operations/entry/filtering/createExpressions.js +176 -0
  48. package/operations/entry/filtering/createExpressions.js.map +1 -0
  49. package/operations/entry/filtering/createFields.d.ts +14 -0
  50. package/operations/entry/filtering/createFields.js +105 -0
  51. package/operations/entry/filtering/createFields.js.map +1 -0
  52. package/operations/entry/filtering/extractSort.d.ts +17 -0
  53. package/operations/entry/filtering/extractSort.js +67 -0
  54. package/operations/entry/filtering/extractSort.js.map +1 -0
  55. package/operations/entry/filtering/filter.d.ts +15 -0
  56. package/operations/entry/filtering/filter.js +143 -0
  57. package/operations/entry/filtering/filter.js.map +1 -0
  58. package/operations/entry/filtering/fullTextSearch.d.ts +14 -0
  59. package/operations/entry/filtering/fullTextSearch.js +48 -0
  60. package/operations/entry/filtering/fullTextSearch.js.map +1 -0
  61. package/operations/entry/filtering/getValue.d.ts +5 -0
  62. package/operations/entry/filtering/getValue.js +63 -0
  63. package/operations/entry/filtering/getValue.js.map +1 -0
  64. package/operations/entry/filtering/index.d.ts +2 -0
  65. package/operations/entry/filtering/index.js +19 -0
  66. package/operations/entry/filtering/index.js.map +1 -0
  67. package/operations/entry/filtering/mapPlugins.d.ts +8 -0
  68. package/operations/entry/filtering/mapPlugins.js +31 -0
  69. package/operations/entry/filtering/mapPlugins.js.map +1 -0
  70. package/operations/entry/filtering/plugins/defaultFilterCreate.d.ts +2 -0
  71. package/operations/entry/filtering/plugins/defaultFilterCreate.js +41 -0
  72. package/operations/entry/filtering/plugins/defaultFilterCreate.js.map +1 -0
  73. package/operations/entry/filtering/plugins/index.d.ts +1 -0
  74. package/operations/entry/filtering/plugins/index.js +13 -0
  75. package/operations/entry/filtering/plugins/index.js.map +1 -0
  76. package/operations/entry/filtering/plugins/objectFilterCreate.d.ts +2 -0
  77. package/operations/entry/filtering/plugins/objectFilterCreate.js +86 -0
  78. package/operations/entry/filtering/plugins/objectFilterCreate.js.map +1 -0
  79. package/operations/entry/filtering/plugins/refFilterCreate.d.ts +2 -0
  80. package/operations/entry/filtering/plugins/refFilterCreate.js +71 -0
  81. package/operations/entry/filtering/plugins/refFilterCreate.js.map +1 -0
  82. package/operations/entry/filtering/sort.d.ts +12 -0
  83. package/operations/entry/filtering/sort.js +69 -0
  84. package/operations/entry/filtering/sort.js.map +1 -0
  85. package/operations/entry/filtering/systemFields.d.ts +4 -0
  86. package/operations/entry/filtering/systemFields.js +70 -0
  87. package/operations/entry/filtering/systemFields.js.map +1 -0
  88. package/operations/entry/filtering/transform.d.ts +6 -0
  89. package/operations/entry/filtering/transform.js +16 -0
  90. package/operations/entry/filtering/transform.js.map +1 -0
  91. package/operations/entry/filtering/types.d.ts +40 -0
  92. package/operations/entry/filtering/types.js +5 -0
  93. package/operations/entry/filtering/types.js.map +1 -0
  94. package/operations/entry/filtering/values.d.ts +2 -0
  95. package/operations/entry/filtering/values.js +22 -0
  96. package/operations/entry/filtering/values.js.map +1 -0
  97. package/operations/entry/filtering/where.d.ts +5 -0
  98. package/operations/entry/filtering/where.js +32 -0
  99. package/operations/entry/filtering/where.js.map +1 -0
  100. package/operations/entry/index.d.ts +1 -1
  101. package/operations/entry/index.js +172 -46
  102. package/operations/entry/index.js.map +1 -1
  103. package/operations/model/index.js.map +1 -1
  104. package/package.json +21 -21
  105. package/plugins/CmsEntryFieldFilterPathPlugin.d.ts +2 -2
  106. package/plugins/CmsEntryFieldFilterPathPlugin.js.map +1 -1
  107. package/plugins/CmsEntryFieldFilterPlugin.d.ts +43 -0
  108. package/plugins/CmsEntryFieldFilterPlugin.js +24 -0
  109. package/plugins/CmsEntryFieldFilterPlugin.js.map +1 -0
  110. package/plugins/CmsEntryFieldSortingPlugin.d.ts +42 -0
  111. package/plugins/CmsEntryFieldSortingPlugin.js +28 -0
  112. package/plugins/CmsEntryFieldSortingPlugin.js.map +1 -0
  113. package/plugins/CmsFieldFilterValueTransformPlugin.d.ts +11 -0
  114. package/plugins/CmsFieldFilterValueTransformPlugin.js +24 -0
  115. package/plugins/CmsFieldFilterValueTransformPlugin.js.map +1 -0
  116. package/plugins/index.d.ts +3 -0
  117. package/plugins/index.js +33 -0
  118. package/plugins/index.js.map +1 -1
  119. package/types.d.ts +11 -2
  120. package/types.js.map +1 -1
  121. package/operations/entry/utils.d.ts +0 -36
  122. package/operations/entry/utils.js +0 -566
  123. package/operations/entry/utils.js.map +0 -1
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.createGetLatestRevisionByEntryId = void 0;
8
+ var _dataloader = _interopRequireDefault(require("dataloader"));
9
+ var _batchRead = require("@webiny/db-dynamodb/utils/batchRead");
10
+ var _cleanup = require("@webiny/db-dynamodb/utils/cleanup");
11
+ var _createBatchScheduleFn = require("./createBatchScheduleFn");
12
+ var _keys = require("../keys");
13
+ var _utils = require("@webiny/utils");
14
+ const createGetLatestRevisionByEntryId = params => {
15
+ const {
16
+ entity,
17
+ locale,
18
+ tenant
19
+ } = params;
20
+ const latestKey = (0, _keys.createLatestSortKey)();
21
+ return new _dataloader.default(async ids => {
22
+ const queries = ids.reduce((collection, id) => {
23
+ const partitionKey = (0, _keys.createPartitionKey)({
24
+ tenant,
25
+ locale,
26
+ id
27
+ });
28
+ if (collection[partitionKey]) {
29
+ return collection;
30
+ }
31
+ collection[partitionKey] = entity.getBatch({
32
+ PK: partitionKey,
33
+ SK: latestKey
34
+ });
35
+ return collection;
36
+ /**
37
+ * We cast as any because there is no return type defined.
38
+ */
39
+ }, {});
40
+ const records = await (0, _batchRead.batchReadAll)({
41
+ table: entity.table,
42
+ items: Object.values(queries)
43
+ });
44
+ const items = (0, _cleanup.cleanupItems)(entity, records);
45
+ return ids.map(id => {
46
+ const {
47
+ id: entryId
48
+ } = (0, _utils.parseIdentifier)(id);
49
+ return items.filter(item => {
50
+ return entryId === item.entryId;
51
+ });
52
+ });
53
+ }, {
54
+ batchScheduleFn: (0, _createBatchScheduleFn.createBatchScheduleFn)()
55
+ });
56
+ };
57
+ exports.createGetLatestRevisionByEntryId = createGetLatestRevisionByEntryId;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createGetLatestRevisionByEntryId","params","entity","locale","tenant","latestKey","createLatestSortKey","DataLoader","ids","queries","reduce","collection","id","partitionKey","createPartitionKey","getBatch","PK","SK","records","batchReadAll","table","items","Object","values","cleanupItems","map","entryId","parseIdentifier","filter","item","batchScheduleFn","createBatchScheduleFn"],"sources":["getLatestRevisionByEntryId.ts"],"sourcesContent":["import DataLoader from \"dataloader\";\nimport { batchReadAll } from \"@webiny/db-dynamodb/utils/batchRead\";\nimport { cleanupItems } from \"@webiny/db-dynamodb/utils/cleanup\";\nimport { CmsStorageEntry } from \"@webiny/api-headless-cms/types\";\nimport { createBatchScheduleFn } from \"./createBatchScheduleFn\";\nimport { createLatestSortKey, createPartitionKey } from \"~/operations/entry/keys\";\nimport { DataLoaderParams } from \"./types\";\nimport { parseIdentifier } from \"@webiny/utils\";\n\nexport const createGetLatestRevisionByEntryId = (params: DataLoaderParams) => {\n const { entity, locale, tenant } = params;\n\n const latestKey = createLatestSortKey();\n\n return new DataLoader<string, CmsStorageEntry[]>(\n async (ids: readonly string[]) => {\n const queries = ids.reduce<Record<string, any>>((collection, id) => {\n const partitionKey = createPartitionKey({\n tenant,\n locale,\n id\n });\n if (collection[partitionKey]) {\n return collection;\n }\n collection[partitionKey] = entity.getBatch({\n PK: partitionKey,\n SK: latestKey\n });\n return collection;\n /**\n * We cast as any because there is no return type defined.\n */\n }, {});\n\n const records = await batchReadAll<CmsStorageEntry>({\n table: entity.table,\n items: Object.values(queries)\n });\n const items = cleanupItems(entity, records);\n\n return ids.map(id => {\n const { id: entryId } = parseIdentifier(id);\n return items.filter(item => {\n return entryId === item.entryId;\n });\n });\n },\n {\n batchScheduleFn: createBatchScheduleFn()\n }\n );\n};\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AAEA;AACA;AAEA;AAEO,MAAMA,gCAAgC,GAAIC,MAAwB,IAAK;EAC1E,MAAM;IAAEC,MAAM;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGH,MAAM;EAEzC,MAAMI,SAAS,GAAG,IAAAC,yBAAmB,GAAE;EAEvC,OAAO,IAAIC,mBAAU,CACjB,MAAOC,GAAsB,IAAK;IAC9B,MAAMC,OAAO,GAAGD,GAAG,CAACE,MAAM,CAAsB,CAACC,UAAU,EAAEC,EAAE,KAAK;MAChE,MAAMC,YAAY,GAAG,IAAAC,wBAAkB,EAAC;QACpCV,MAAM;QACND,MAAM;QACNS;MACJ,CAAC,CAAC;MACF,IAAID,UAAU,CAACE,YAAY,CAAC,EAAE;QAC1B,OAAOF,UAAU;MACrB;MACAA,UAAU,CAACE,YAAY,CAAC,GAAGX,MAAM,CAACa,QAAQ,CAAC;QACvCC,EAAE,EAAEH,YAAY;QAChBI,EAAE,EAAEZ;MACR,CAAC,CAAC;MACF,OAAOM,UAAU;MACjB;AAChB;AACA;IACY,CAAC,EAAE,CAAC,CAAC,CAAC;IAEN,MAAMO,OAAO,GAAG,MAAM,IAAAC,uBAAY,EAAkB;MAChDC,KAAK,EAAElB,MAAM,CAACkB,KAAK;MACnBC,KAAK,EAAEC,MAAM,CAACC,MAAM,CAACd,OAAO;IAChC,CAAC,CAAC;IACF,MAAMY,KAAK,GAAG,IAAAG,qBAAY,EAACtB,MAAM,EAAEgB,OAAO,CAAC;IAE3C,OAAOV,GAAG,CAACiB,GAAG,CAACb,EAAE,IAAI;MACjB,MAAM;QAAEA,EAAE,EAAEc;MAAQ,CAAC,GAAG,IAAAC,sBAAe,EAACf,EAAE,CAAC;MAC3C,OAAOS,KAAK,CAACO,MAAM,CAACC,IAAI,IAAI;QACxB,OAAOH,OAAO,KAAKG,IAAI,CAACH,OAAO;MACnC,CAAC,CAAC;IACN,CAAC,CAAC;EACN,CAAC,EACD;IACII,eAAe,EAAE,IAAAC,4CAAqB;EAC1C,CAAC,CACJ;AACL,CAAC;AAAC"}
@@ -0,0 +1,4 @@
1
+ import DataLoader from "dataloader";
2
+ import { CmsStorageEntry } from "@webiny/api-headless-cms/types";
3
+ import { DataLoaderParams } from "./types";
4
+ export declare const createGetPublishedRevisionByEntryId: (params: DataLoaderParams) => DataLoader<string, CmsStorageEntry[], string>;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.createGetPublishedRevisionByEntryId = void 0;
8
+ var _dataloader = _interopRequireDefault(require("dataloader"));
9
+ var _batchRead = require("@webiny/db-dynamodb/utils/batchRead");
10
+ var _cleanup = require("@webiny/db-dynamodb/utils/cleanup");
11
+ var _keys = require("../keys");
12
+ var _utils = require("@webiny/utils");
13
+ var _createBatchScheduleFn = require("./createBatchScheduleFn");
14
+ const createGetPublishedRevisionByEntryId = params => {
15
+ const {
16
+ entity,
17
+ locale,
18
+ tenant
19
+ } = params;
20
+ const publishedKey = (0, _keys.createPublishedSortKey)();
21
+ return new _dataloader.default(async ids => {
22
+ const queries = ids.reduce((collection, id) => {
23
+ const partitionKey = (0, _keys.createPartitionKey)({
24
+ tenant,
25
+ locale,
26
+ id
27
+ });
28
+ if (collection[partitionKey]) {
29
+ return collection;
30
+ }
31
+ collection[partitionKey] = entity.getBatch({
32
+ PK: partitionKey,
33
+ SK: publishedKey
34
+ });
35
+ return collection;
36
+ /**
37
+ * We cast as any because there is no return type defined.
38
+ */
39
+ }, {});
40
+ const records = await (0, _batchRead.batchReadAll)({
41
+ table: entity.table,
42
+ items: Object.values(queries)
43
+ });
44
+ const items = (0, _cleanup.cleanupItems)(entity, records);
45
+ return ids.map(id => {
46
+ const {
47
+ id: entryId
48
+ } = (0, _utils.parseIdentifier)(id);
49
+ return items.filter(item => {
50
+ return entryId === item.entryId;
51
+ });
52
+ });
53
+ }, {
54
+ batchScheduleFn: (0, _createBatchScheduleFn.createBatchScheduleFn)()
55
+ });
56
+ };
57
+ exports.createGetPublishedRevisionByEntryId = createGetPublishedRevisionByEntryId;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createGetPublishedRevisionByEntryId","params","entity","locale","tenant","publishedKey","createPublishedSortKey","DataLoader","ids","queries","reduce","collection","id","partitionKey","createPartitionKey","getBatch","PK","SK","records","batchReadAll","table","items","Object","values","cleanupItems","map","entryId","parseIdentifier","filter","item","batchScheduleFn","createBatchScheduleFn"],"sources":["getPublishedRevisionByEntryId.ts"],"sourcesContent":["import DataLoader from \"dataloader\";\nimport { batchReadAll } from \"@webiny/db-dynamodb/utils/batchRead\";\nimport { cleanupItems } from \"@webiny/db-dynamodb/utils/cleanup\";\nimport { CmsStorageEntry } from \"@webiny/api-headless-cms/types\";\nimport { createPartitionKey, createPublishedSortKey } from \"~/operations/entry/keys\";\nimport { DataLoaderParams } from \"./types\";\nimport { parseIdentifier } from \"@webiny/utils\";\nimport { createBatchScheduleFn } from \"./createBatchScheduleFn\";\n\nexport const createGetPublishedRevisionByEntryId = (params: DataLoaderParams) => {\n const { entity, locale, tenant } = params;\n\n const publishedKey = createPublishedSortKey();\n return new DataLoader<string, CmsStorageEntry[]>(\n async (ids: readonly string[]) => {\n const queries = ids.reduce((collection, id) => {\n const partitionKey = createPartitionKey({\n tenant,\n locale,\n id\n });\n if (collection[partitionKey]) {\n return collection;\n }\n collection[partitionKey] = entity.getBatch({\n PK: partitionKey,\n SK: publishedKey\n });\n return collection;\n /**\n * We cast as any because there is no return type defined.\n */\n }, {} as Record<string, any>);\n\n const records = await batchReadAll<CmsStorageEntry>({\n table: entity.table,\n items: Object.values(queries)\n });\n const items = cleanupItems(entity, records);\n\n return ids.map(id => {\n const { id: entryId } = parseIdentifier(id);\n return items.filter(item => {\n return entryId === item.entryId;\n });\n });\n },\n {\n batchScheduleFn: createBatchScheduleFn()\n }\n );\n};\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AAEA;AAEA;AACA;AAEO,MAAMA,mCAAmC,GAAIC,MAAwB,IAAK;EAC7E,MAAM;IAAEC,MAAM;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGH,MAAM;EAEzC,MAAMI,YAAY,GAAG,IAAAC,4BAAsB,GAAE;EAC7C,OAAO,IAAIC,mBAAU,CACjB,MAAOC,GAAsB,IAAK;IAC9B,MAAMC,OAAO,GAAGD,GAAG,CAACE,MAAM,CAAC,CAACC,UAAU,EAAEC,EAAE,KAAK;MAC3C,MAAMC,YAAY,GAAG,IAAAC,wBAAkB,EAAC;QACpCV,MAAM;QACND,MAAM;QACNS;MACJ,CAAC,CAAC;MACF,IAAID,UAAU,CAACE,YAAY,CAAC,EAAE;QAC1B,OAAOF,UAAU;MACrB;MACAA,UAAU,CAACE,YAAY,CAAC,GAAGX,MAAM,CAACa,QAAQ,CAAC;QACvCC,EAAE,EAAEH,YAAY;QAChBI,EAAE,EAAEZ;MACR,CAAC,CAAC;MACF,OAAOM,UAAU;MACjB;AAChB;AACA;IACY,CAAC,EAAE,CAAC,CAAC,CAAwB;IAE7B,MAAMO,OAAO,GAAG,MAAM,IAAAC,uBAAY,EAAkB;MAChDC,KAAK,EAAElB,MAAM,CAACkB,KAAK;MACnBC,KAAK,EAAEC,MAAM,CAACC,MAAM,CAACd,OAAO;IAChC,CAAC,CAAC;IACF,MAAMY,KAAK,GAAG,IAAAG,qBAAY,EAACtB,MAAM,EAAEgB,OAAO,CAAC;IAE3C,OAAOV,GAAG,CAACiB,GAAG,CAACb,EAAE,IAAI;MACjB,MAAM;QAAEA,EAAE,EAAEc;MAAQ,CAAC,GAAG,IAAAC,sBAAe,EAACf,EAAE,CAAC;MAC3C,OAAOS,KAAK,CAACO,MAAM,CAACC,IAAI,IAAI;QACxB,OAAOH,OAAO,KAAKG,IAAI,CAACH,OAAO;MACnC,CAAC,CAAC;IACN,CAAC,CAAC;EACN,CAAC,EACD;IACII,eAAe,EAAE,IAAAC,4CAAqB;EAC1C,CAAC,CACJ;AACL,CAAC;AAAC"}
@@ -0,0 +1,4 @@
1
+ import DataLoader from "dataloader";
2
+ import { CmsStorageEntry } from "@webiny/api-headless-cms/types";
3
+ import { DataLoaderParams } from "./types";
4
+ export declare const createGetRevisionById: (params: DataLoaderParams) => DataLoader<string, CmsStorageEntry[], string>;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.createGetRevisionById = void 0;
8
+ var _dataloader = _interopRequireDefault(require("dataloader"));
9
+ var _batchRead = require("@webiny/db-dynamodb/utils/batchRead");
10
+ var _cleanup = require("@webiny/db-dynamodb/utils/cleanup");
11
+ var _keys = require("../keys");
12
+ var _utils = require("@webiny/utils");
13
+ var _createBatchScheduleFn = require("./createBatchScheduleFn");
14
+ const createGetRevisionById = params => {
15
+ const {
16
+ entity,
17
+ locale,
18
+ tenant
19
+ } = params;
20
+ return new _dataloader.default(async ids => {
21
+ const queries = ids.reduce((collection, id) => {
22
+ const partitionKey = (0, _keys.createPartitionKey)({
23
+ tenant,
24
+ locale,
25
+ id
26
+ });
27
+ const {
28
+ version
29
+ } = (0, _utils.parseIdentifier)(id);
30
+ if (version === null) {
31
+ return collection;
32
+ }
33
+ const sortKey = (0, _keys.createRevisionSortKey)({
34
+ version
35
+ });
36
+ const keys = `${partitionKey}__${sortKey}`;
37
+ if (collection[keys]) {
38
+ return collection;
39
+ }
40
+ collection[keys] = entity.getBatch({
41
+ PK: partitionKey,
42
+ SK: sortKey
43
+ });
44
+ return collection;
45
+ /**
46
+ * We cast as any because there is no return type defined.
47
+ */
48
+ }, {});
49
+ const records = await (0, _batchRead.batchReadAll)({
50
+ table: entity.table,
51
+ items: Object.values(queries)
52
+ });
53
+ const items = (0, _cleanup.cleanupItems)(entity, records);
54
+ return ids.map(id => {
55
+ return items.filter(item => {
56
+ return id === item.id;
57
+ });
58
+ });
59
+ }, {
60
+ batchScheduleFn: (0, _createBatchScheduleFn.createBatchScheduleFn)()
61
+ });
62
+ };
63
+ exports.createGetRevisionById = createGetRevisionById;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createGetRevisionById","params","entity","locale","tenant","DataLoader","ids","queries","reduce","collection","id","partitionKey","createPartitionKey","version","parseIdentifier","sortKey","createRevisionSortKey","keys","getBatch","PK","SK","records","batchReadAll","table","items","Object","values","cleanupItems","map","filter","item","batchScheduleFn","createBatchScheduleFn"],"sources":["getRevisionById.ts"],"sourcesContent":["import DataLoader from \"dataloader\";\nimport { batchReadAll } from \"@webiny/db-dynamodb/utils/batchRead\";\nimport { CmsStorageEntry } from \"@webiny/api-headless-cms/types\";\nimport { cleanupItems } from \"@webiny/db-dynamodb/utils/cleanup\";\nimport { createPartitionKey, createRevisionSortKey } from \"~/operations/entry/keys\";\nimport { DataLoaderParams } from \"./types\";\nimport { parseIdentifier } from \"@webiny/utils\";\nimport { createBatchScheduleFn } from \"./createBatchScheduleFn\";\n\nexport const createGetRevisionById = (params: DataLoaderParams) => {\n const { entity, locale, tenant } = params;\n\n return new DataLoader<string, CmsStorageEntry[]>(\n async (ids: readonly string[]) => {\n const queries = ids.reduce((collection, id) => {\n const partitionKey = createPartitionKey({\n tenant,\n locale,\n id\n });\n const { version } = parseIdentifier(id);\n if (version === null) {\n return collection;\n }\n const sortKey = createRevisionSortKey({\n version\n });\n const keys = `${partitionKey}__${sortKey}`;\n if (collection[keys]) {\n return collection;\n }\n\n collection[keys] = entity.getBatch({\n PK: partitionKey,\n SK: sortKey\n });\n\n return collection;\n /**\n * We cast as any because there is no return type defined.\n */\n }, {} as Record<string, any>);\n\n const records = await batchReadAll<CmsStorageEntry>({\n table: entity.table,\n items: Object.values(queries)\n });\n const items = cleanupItems(entity, records);\n\n return ids.map(id => {\n return items.filter(item => {\n return id === item.id;\n });\n });\n },\n {\n batchScheduleFn: createBatchScheduleFn()\n }\n );\n};\n"],"mappings":";;;;;;;AAAA;AACA;AAEA;AACA;AAEA;AACA;AAEO,MAAMA,qBAAqB,GAAIC,MAAwB,IAAK;EAC/D,MAAM;IAAEC,MAAM;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGH,MAAM;EAEzC,OAAO,IAAII,mBAAU,CACjB,MAAOC,GAAsB,IAAK;IAC9B,MAAMC,OAAO,GAAGD,GAAG,CAACE,MAAM,CAAC,CAACC,UAAU,EAAEC,EAAE,KAAK;MAC3C,MAAMC,YAAY,GAAG,IAAAC,wBAAkB,EAAC;QACpCR,MAAM;QACND,MAAM;QACNO;MACJ,CAAC,CAAC;MACF,MAAM;QAAEG;MAAQ,CAAC,GAAG,IAAAC,sBAAe,EAACJ,EAAE,CAAC;MACvC,IAAIG,OAAO,KAAK,IAAI,EAAE;QAClB,OAAOJ,UAAU;MACrB;MACA,MAAMM,OAAO,GAAG,IAAAC,2BAAqB,EAAC;QAClCH;MACJ,CAAC,CAAC;MACF,MAAMI,IAAI,GAAI,GAAEN,YAAa,KAAII,OAAQ,EAAC;MAC1C,IAAIN,UAAU,CAACQ,IAAI,CAAC,EAAE;QAClB,OAAOR,UAAU;MACrB;MAEAA,UAAU,CAACQ,IAAI,CAAC,GAAGf,MAAM,CAACgB,QAAQ,CAAC;QAC/BC,EAAE,EAAER,YAAY;QAChBS,EAAE,EAAEL;MACR,CAAC,CAAC;MAEF,OAAON,UAAU;MACjB;AAChB;AACA;IACY,CAAC,EAAE,CAAC,CAAC,CAAwB;IAE7B,MAAMY,OAAO,GAAG,MAAM,IAAAC,uBAAY,EAAkB;MAChDC,KAAK,EAAErB,MAAM,CAACqB,KAAK;MACnBC,KAAK,EAAEC,MAAM,CAACC,MAAM,CAACnB,OAAO;IAChC,CAAC,CAAC;IACF,MAAMiB,KAAK,GAAG,IAAAG,qBAAY,EAACzB,MAAM,EAAEmB,OAAO,CAAC;IAE3C,OAAOf,GAAG,CAACsB,GAAG,CAAClB,EAAE,IAAI;MACjB,OAAOc,KAAK,CAACK,MAAM,CAACC,IAAI,IAAI;QACxB,OAAOpB,EAAE,KAAKoB,IAAI,CAACpB,EAAE;MACzB,CAAC,CAAC;IACN,CAAC,CAAC;EACN,CAAC,EACD;IACIqB,eAAe,EAAE,IAAAC,4CAAqB;EAC1C,CAAC,CACJ;AACL,CAAC;AAAC"}
@@ -0,0 +1,8 @@
1
+ import DataLoader from "dataloader";
2
+ import { DataLoaderParams } from "./types";
3
+ export * from "./DataLoaderCache";
4
+ interface Callable {
5
+ (params: DataLoaderParams): DataLoader<any, any>;
6
+ }
7
+ export declare type DataLoaders = "getAllEntryRevisions" | "getRevisionById" | "getPublishedRevisionByEntryId" | "getLatestRevisionByEntryId";
8
+ export declare const getDataLoaderFactory: (name: string) => Callable;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ getDataLoaderFactory: true
8
+ };
9
+ exports.getDataLoaderFactory = void 0;
10
+ var _getAllEntryRevisions = require("./getAllEntryRevisions");
11
+ var _getLatestRevisionByEntryId = require("./getLatestRevisionByEntryId");
12
+ var _getPublishedRevisionByEntryId = require("./getPublishedRevisionByEntryId");
13
+ var _getRevisionById = require("./getRevisionById");
14
+ var _DataLoaderCache = require("./DataLoaderCache");
15
+ Object.keys(_DataLoaderCache).forEach(function (key) {
16
+ if (key === "default" || key === "__esModule") return;
17
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
18
+ if (key in exports && exports[key] === _DataLoaderCache[key]) return;
19
+ Object.defineProperty(exports, key, {
20
+ enumerable: true,
21
+ get: function () {
22
+ return _DataLoaderCache[key];
23
+ }
24
+ });
25
+ });
26
+ const dataLoaders = {
27
+ getAllEntryRevisions: _getAllEntryRevisions.createGetAllEntryRevisions,
28
+ getLatestRevisionByEntryId: _getLatestRevisionByEntryId.createGetLatestRevisionByEntryId,
29
+ getPublishedRevisionByEntryId: _getPublishedRevisionByEntryId.createGetPublishedRevisionByEntryId,
30
+ getRevisionById: _getRevisionById.createGetRevisionById
31
+ };
32
+ const getDataLoaderFactory = name => {
33
+ if (!dataLoaders[name]) {
34
+ throw new Error(`Missing data loader "${name}".`);
35
+ }
36
+ return dataLoaders[name];
37
+ };
38
+ exports.getDataLoaderFactory = getDataLoaderFactory;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["dataLoaders","getAllEntryRevisions","createGetAllEntryRevisions","getLatestRevisionByEntryId","createGetLatestRevisionByEntryId","getPublishedRevisionByEntryId","createGetPublishedRevisionByEntryId","getRevisionById","createGetRevisionById","getDataLoaderFactory","name","Error"],"sources":["index.ts"],"sourcesContent":["import DataLoader from \"dataloader\";\nimport { DataLoaderParams } from \"./types\";\nimport { createGetAllEntryRevisions } from \"./getAllEntryRevisions\";\nimport { createGetLatestRevisionByEntryId } from \"./getLatestRevisionByEntryId\";\nimport { createGetPublishedRevisionByEntryId } from \"./getPublishedRevisionByEntryId\";\nimport { createGetRevisionById } from \"./getRevisionById\";\n\nexport * from \"./DataLoaderCache\";\n\ninterface Callable {\n (params: DataLoaderParams): DataLoader<any, any>;\n}\n\nconst dataLoaders: Record<string, Callable> = {\n getAllEntryRevisions: createGetAllEntryRevisions,\n getLatestRevisionByEntryId: createGetLatestRevisionByEntryId,\n getPublishedRevisionByEntryId: createGetPublishedRevisionByEntryId,\n getRevisionById: createGetRevisionById\n};\n\nexport type DataLoaders =\n | \"getAllEntryRevisions\"\n | \"getRevisionById\"\n | \"getPublishedRevisionByEntryId\"\n | \"getLatestRevisionByEntryId\";\n\nexport const getDataLoaderFactory = (name: string) => {\n if (!dataLoaders[name]) {\n throw new Error(`Missing data loader \"${name}\".`);\n }\n return dataLoaders[name];\n};\n"],"mappings":";;;;;;;;;AAEA;AACA;AACA;AACA;AAEA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAMA,MAAMA,WAAqC,GAAG;EAC1CC,oBAAoB,EAAEC,gDAA0B;EAChDC,0BAA0B,EAAEC,4DAAgC;EAC5DC,6BAA6B,EAAEC,kEAAmC;EAClEC,eAAe,EAAEC;AACrB,CAAC;AAQM,MAAMC,oBAAoB,GAAIC,IAAY,IAAK;EAClD,IAAI,CAACV,WAAW,CAACU,IAAI,CAAC,EAAE;IACpB,MAAM,IAAIC,KAAK,CAAE,wBAAuBD,IAAK,IAAG,CAAC;EACrD;EACA,OAAOV,WAAW,CAACU,IAAI,CAAC;AAC5B,CAAC;AAAC"}
@@ -0,0 +1,6 @@
1
+ import { Entity } from "dynamodb-toolbox";
2
+ export interface DataLoaderParams {
3
+ entity: Entity<any>;
4
+ tenant: string;
5
+ locale: string;
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import { Entity } from \"dynamodb-toolbox\";\n\nexport interface DataLoaderParams {\n entity: Entity<any>;\n tenant: string;\n locale: string;\n}\n"],"mappings":""}
@@ -1,42 +1,27 @@
1
- import { CmsStorageEntry, CmsModel } from "@webiny/api-headless-cms/types";
1
+ import { CmsModel, CmsStorageEntry } from "@webiny/api-headless-cms/types";
2
2
  import { Entity } from "dynamodb-toolbox";
3
- export interface GetAllEntryRevisionsParams {
3
+ import { DataLoadersHandlerInterface, DataLoadersHandlerInterfaceClearAllParams } from "../../types";
4
+ interface DataLoaderParams {
5
+ model: Pick<CmsModel, "tenant" | "locale" | "modelId">;
4
6
  ids: readonly string[];
5
- model: CmsModel;
6
- }
7
- export interface GetRevisionByIdParams {
8
- ids: readonly string[];
9
- model: CmsModel;
10
- }
11
- export interface GetPublishedRevisionByEntryIdParams {
12
- ids: readonly string[];
13
- model: CmsModel;
14
- }
15
- export interface GetLatestRevisionByEntryIdParams {
16
- ids: readonly string[];
17
- model: CmsModel;
18
- }
19
- interface ClearLoaderParams {
20
- model: CmsModel;
21
- entry?: CmsStorageEntry;
22
7
  }
23
8
  interface DataLoadersHandlerParams {
24
9
  entity: Entity<any>;
25
10
  }
26
- export declare class DataLoadersHandler {
27
- private readonly loaders;
11
+ export declare class DataLoadersHandler implements DataLoadersHandlerInterface {
28
12
  private readonly entity;
13
+ private readonly cache;
29
14
  constructor(params: DataLoadersHandlerParams);
30
- getAllEntryRevisions(params: GetAllEntryRevisionsParams): Promise<CmsStorageEntry[]>;
31
- getRevisionById(params: GetRevisionByIdParams): Promise<CmsStorageEntry[]>;
32
- getPublishedRevisionByEntryId(params: GetPublishedRevisionByEntryIdParams): Promise<CmsStorageEntry[]>;
33
- getLatestRevisionByEntryId(params: GetLatestRevisionByEntryIdParams): Promise<CmsStorageEntry[]>;
15
+ getAllEntryRevisions(params: DataLoaderParams): Promise<CmsStorageEntry[]>;
16
+ getRevisionById(params: DataLoaderParams): Promise<CmsStorageEntry[]>;
17
+ getPublishedRevisionByEntryId(params: DataLoaderParams): Promise<CmsStorageEntry[]>;
18
+ getLatestRevisionByEntryId(params: DataLoaderParams): Promise<CmsStorageEntry[]>;
34
19
  /**
35
20
  * TODO @ts-refactor
36
21
  * Maybe pass on the generics to DataLoader definition?
37
22
  */
38
23
  private getLoader;
39
24
  private loadMany;
40
- clearAll(params: Omit<ClearLoaderParams, "entry">): void;
25
+ clearAll(params?: DataLoadersHandlerInterfaceClearAllParams): void;
41
26
  }
42
27
  export {};
@@ -7,206 +7,45 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.DataLoadersHandler = void 0;
8
8
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
- var _dataloader = _interopRequireDefault(require("dataloader"));
11
10
  var _error = _interopRequireDefault(require("@webiny/error"));
12
- var _query = require("@webiny/db-dynamodb/utils/query");
13
- var _keys = require("./keys");
14
- var _cleanup = require("@webiny/db-dynamodb/utils/cleanup");
11
+ var _DataLoaderCache = require("./dataLoader/DataLoaderCache");
12
+ var _dataLoader = require("./dataLoader");
15
13
  var _utils = require("@webiny/utils");
16
- var _batchRead = require("@webiny/db-dynamodb/utils/batchRead");
17
- const getAllEntryRevisions = params => {
18
- const {
19
- entity,
20
- model
21
- } = params;
22
- const {
23
- tenant,
24
- locale
25
- } = model;
26
- return new _dataloader.default(async ids => {
27
- const results = {};
28
- for (const id of ids) {
29
- const queryAllParams = {
30
- entity,
31
- partitionKey: (0, _keys.createPartitionKey)({
32
- tenant,
33
- locale,
34
- id
35
- }),
36
- options: {
37
- beginsWith: "REV#"
38
- }
39
- };
40
- const items = await (0, _query.queryAll)(queryAllParams);
41
- results[id] = (0, _cleanup.cleanupItems)(entity, items);
42
- }
43
- return ids.map(id => {
44
- return results[id] || [];
45
- });
46
- });
47
- };
48
- const getRevisionById = params => {
49
- const {
50
- entity,
51
- model
52
- } = params;
53
- const {
54
- locale,
55
- tenant
56
- } = model;
57
- return new _dataloader.default(async ids => {
58
- const queries = ids.reduce((collection, id) => {
59
- const partitionKey = (0, _keys.createPartitionKey)({
60
- tenant,
61
- locale,
62
- id
63
- });
64
- const {
65
- version
66
- } = (0, _utils.parseIdentifier)(id);
67
- if (version === null) {
68
- return collection;
69
- }
70
- const sortKey = (0, _keys.createRevisionSortKey)({
71
- version
72
- });
73
- const keys = `${partitionKey}__${sortKey}`;
74
- if (collection[keys]) {
75
- return collection;
76
- }
77
- collection[keys] = entity.getBatch({
78
- PK: partitionKey,
79
- SK: sortKey
80
- });
81
- return collection;
82
- /**
83
- * We cast as any because there is no return type defined.
84
- */
85
- }, {});
86
- const records = await (0, _batchRead.batchReadAll)({
87
- table: entity.table,
88
- items: Object.values(queries)
89
- });
90
- const items = (0, _cleanup.cleanupItems)(entity, records);
91
- return ids.map(id => {
92
- return items.filter(item => {
93
- return id === item.id;
94
- });
95
- });
96
- });
97
- };
98
- const getPublishedRevisionByEntryId = params => {
99
- const {
100
- entity,
101
- model
102
- } = params;
103
- const {
104
- locale,
105
- tenant
106
- } = model;
107
- const publishedKey = (0, _keys.createPublishedSortKey)();
108
- return new _dataloader.default(async ids => {
109
- const queries = ids.reduce((collection, id) => {
110
- const partitionKey = (0, _keys.createPartitionKey)({
111
- tenant,
112
- locale,
113
- id
114
- });
115
- if (collection[partitionKey]) {
116
- return collection;
117
- }
118
- collection[partitionKey] = entity.getBatch({
119
- PK: partitionKey,
120
- SK: publishedKey
121
- });
122
- return collection;
123
- /**
124
- * We cast as any because there is no return type defined.
125
- */
126
- }, {});
127
- const records = await (0, _batchRead.batchReadAll)({
128
- table: entity.table,
129
- items: Object.values(queries)
130
- });
131
- const items = (0, _cleanup.cleanupItems)(entity, records);
132
- return ids.map(id => {
133
- const {
134
- id: entryId
135
- } = (0, _utils.parseIdentifier)(id);
136
- return items.filter(item => {
137
- return entryId === item.entryId;
138
- });
139
- });
140
- });
141
- };
142
- const getLatestRevisionByEntryId = params => {
143
- const {
144
- entity,
145
- model
146
- } = params;
147
- const {
148
- locale,
149
- tenant
150
- } = model;
151
- const latestKey = (0, _keys.createLatestSortKey)();
152
- return new _dataloader.default(async ids => {
153
- const queries = ids.reduce((collection, id) => {
154
- const partitionKey = (0, _keys.createPartitionKey)({
155
- tenant,
156
- locale,
157
- id
158
- });
159
- if (collection[partitionKey]) {
160
- return collection;
161
- }
162
- collection[partitionKey] = entity.getBatch({
163
- PK: partitionKey,
164
- SK: latestKey
165
- });
166
- return collection;
167
- /**
168
- * We cast as any because there is no return type defined.
169
- */
170
- }, {});
171
- const records = await (0, _batchRead.batchReadAll)({
172
- table: entity.table,
173
- items: Object.values(queries)
174
- });
175
- const items = (0, _cleanup.cleanupItems)(entity, records);
176
- return ids.map(id => {
177
- const {
178
- id: entryId
179
- } = (0, _utils.parseIdentifier)(id);
180
- return items.filter(item => {
181
- return entryId === item.entryId;
182
- });
183
- });
184
- });
185
- };
186
- const dataLoaders = {
187
- getAllEntryRevisions,
188
- getRevisionById,
189
- getPublishedRevisionByEntryId,
190
- getLatestRevisionByEntryId
191
- };
192
- const loaderNames = Object.keys(dataLoaders);
193
14
  class DataLoadersHandler {
194
15
  constructor(params) {
195
- (0, _defineProperty2.default)(this, "loaders", new Map());
196
16
  (0, _defineProperty2.default)(this, "entity", void 0);
17
+ (0, _defineProperty2.default)(this, "cache", new _DataLoaderCache.DataLoaderCache());
197
18
  this.entity = params.entity;
198
19
  }
199
20
  async getAllEntryRevisions(params) {
200
- return await this.loadMany("getAllEntryRevisions", params, params.ids);
21
+ const ids = params.ids.map(id => {
22
+ const {
23
+ id: entryId
24
+ } = (0, _utils.parseIdentifier)(id);
25
+ return entryId;
26
+ });
27
+ return await this.loadMany("getAllEntryRevisions", params, ids);
201
28
  }
202
29
  async getRevisionById(params) {
203
30
  return await this.loadMany("getRevisionById", params, params.ids);
204
31
  }
205
32
  async getPublishedRevisionByEntryId(params) {
206
- return await this.loadMany("getPublishedRevisionByEntryId", params, params.ids);
33
+ const ids = params.ids.map(id => {
34
+ const {
35
+ id: entryId
36
+ } = (0, _utils.parseIdentifier)(id);
37
+ return entryId;
38
+ });
39
+ return await this.loadMany("getPublishedRevisionByEntryId", params, ids);
207
40
  }
208
41
  async getLatestRevisionByEntryId(params) {
209
- return await this.loadMany("getLatestRevisionByEntryId", params, params.ids);
42
+ const ids = params.ids.map(id => {
43
+ const {
44
+ id: entryId
45
+ } = (0, _utils.parseIdentifier)(id);
46
+ return entryId;
47
+ });
48
+ return await this.loadMany("getLatestRevisionByEntryId", params, ids);
210
49
  }
211
50
 
212
51
  /**
@@ -214,28 +53,29 @@ class DataLoadersHandler {
214
53
  * Maybe pass on the generics to DataLoader definition?
215
54
  */
216
55
  getLoader(name, params) {
217
- if (!dataLoaders[name]) {
218
- throw new _error.default("Unknown data loader.", "UNKNOWN_DATA_LOADER", {
219
- name
220
- });
221
- }
222
56
  const {
223
57
  model
224
58
  } = params;
225
- const {
226
- tenant,
227
- locale
228
- } = model;
229
- const loaderKey = `${name}-${tenant}-${locale}-${model.modelId}`;
230
- if (!this.loaders.has(loaderKey)) {
231
- this.loaders.set(loaderKey, dataLoaders[name]((0, _objectSpread2.default)((0, _objectSpread2.default)({}, params), {}, {
232
- entity: this.entity
233
- })));
59
+ const cacheParams = {
60
+ tenant: model.tenant,
61
+ locale: model.locale,
62
+ name
63
+ };
64
+ let loader = this.cache.getDataLoader(cacheParams);
65
+ if (loader) {
66
+ return loader;
234
67
  }
235
- return this.loaders.get(loaderKey);
68
+ const factory = (0, _dataLoader.getDataLoaderFactory)(name);
69
+ loader = factory({
70
+ entity: this.entity,
71
+ tenant: model.tenant,
72
+ locale: model.locale
73
+ });
74
+ this.cache.setDataLoader(cacheParams, loader);
75
+ return loader;
236
76
  }
237
77
  async loadMany(loader, params, ids) {
238
- let results;
78
+ let results = [];
239
79
  try {
240
80
  results = await this.getLoader(loader, params).loadMany(ids);
241
81
  if (Array.isArray(results) === true) {
@@ -269,10 +109,7 @@ class DataLoadersHandler {
269
109
  });
270
110
  }
271
111
  clearAll(params) {
272
- for (const name of loaderNames) {
273
- const loader = this.getLoader(name, params);
274
- loader.clearAll();
275
- }
112
+ this.cache.clearAll(params === null || params === void 0 ? void 0 : params.model);
276
113
  }
277
114
  }
278
115
  exports.DataLoadersHandler = DataLoadersHandler;