@webiny/api-headless-cms 0.0.0-unstable.e53eceafb5 → 0.0.0-unstable.eb196ccd2f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/crud/contentEntry/entryDataFactories/createPublishEntryData.d.ts +3 -3
- package/crud/contentEntry/entryDataFactories/createPublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.d.ts +3 -3
- package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.js.map +1 -1
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.d.ts +5 -3
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.js +6 -2
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.js.map +1 -1
- package/crud/contentEntry/useCases/GetEntriesByIds/index.d.ts +2 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/index.js +1 -1
- package/crud/contentEntry/useCases/GetEntriesByIds/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.d.ts +5 -3
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.js +6 -2
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.d.ts +2 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.js +1 -1
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.d.ts +5 -3
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.js +7 -2
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.d.ts +2 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.js +1 -1
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.d.ts +5 -3
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.js +7 -2
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.js.map +1 -1
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.d.ts +2 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.js +1 -1
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.d.ts +5 -3
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.js +6 -2
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.js.map +1 -1
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.d.ts +2 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.js +1 -1
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.d.ts +5 -3
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.js +7 -2
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.js.map +1 -1
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.d.ts +2 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.js +1 -1
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.d.ts +5 -3
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.js +7 -2
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.js.map +1 -1
- package/crud/contentEntry/useCases/GetRevisionById/index.d.ts +2 -0
- package/crud/contentEntry/useCases/GetRevisionById/index.js +1 -1
- package/crud/contentEntry/useCases/GetRevisionById/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.d.ts +5 -3
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.js +6 -2
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.js.map +1 -1
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.d.ts +2 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.js +1 -1
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.d.ts +10 -3
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.js +9 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/index.d.ts +2 -0
- package/crud/contentEntry/useCases/ListEntries/index.js +1 -1
- package/crud/contentEntry/useCases/ListEntries/index.js.map +1 -1
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.d.ts +5 -3
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.js +4 -2
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.js.map +1 -1
- package/crud/contentEntry/useCases/RestoreEntryFromBin/index.d.ts +2 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/index.js +1 -1
- package/crud/contentEntry/useCases/RestoreEntryFromBin/index.js.map +1 -1
- package/crud/contentEntry.crud.js +15 -3
- package/crud/contentEntry.crud.js.map +1 -1
- package/crud/contentModel/validation.d.ts +132 -132
- package/crud/contentModelGroup/validation.d.ts +2 -2
- package/crud/system.crud.js +10 -0
- package/crud/system.crud.js.map +1 -1
- package/graphqlFields/searchableJson.js +5 -0
- package/graphqlFields/searchableJson.js.map +1 -1
- package/package.json +21 -21
- package/types/context.d.ts +2 -2
- package/types/context.js.map +1 -1
- package/utils/entryStorage.d.ts +8 -1
- package/utils/entryStorage.js +37 -4
- package/utils/entryStorage.js.map +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { IGetRevisionById } from "../../abstractions";
|
|
2
2
|
import type { CmsEntryStorageOperations, CmsEntryStorageOperationsGetRevisionParams, CmsModel } from "../../../../types";
|
|
3
|
+
import type { ITransformEntryCallable } from "../../../../utils/entryStorage.js";
|
|
3
4
|
export declare class GetRevisionById implements IGetRevisionById {
|
|
4
|
-
private operation;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
private readonly operation;
|
|
6
|
+
private readonly transform;
|
|
7
|
+
constructor(operation: CmsEntryStorageOperations["getRevisionById"], transform: ITransformEntryCallable);
|
|
8
|
+
execute(model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams): Promise<import("../../../../types").CmsEntry<import("../../../../types").CmsEntryValues> | null>;
|
|
7
9
|
}
|
|
@@ -5,11 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.GetRevisionById = void 0;
|
|
7
7
|
class GetRevisionById {
|
|
8
|
-
constructor(operation) {
|
|
8
|
+
constructor(operation, transform) {
|
|
9
9
|
this.operation = operation;
|
|
10
|
+
this.transform = transform;
|
|
10
11
|
}
|
|
11
12
|
async execute(model, params) {
|
|
12
|
-
|
|
13
|
+
const result = await this.operation(model, params);
|
|
14
|
+
if (!result) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
return await this.transform(model, result);
|
|
13
18
|
}
|
|
14
19
|
}
|
|
15
20
|
exports.GetRevisionById = GetRevisionById;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["GetRevisionById","constructor","operation","execute","model","params","exports"],"sources":["GetRevisionById.ts"],"sourcesContent":["import type { IGetRevisionById } from \"../../abstractions\";\nimport type {\n CmsEntryStorageOperations,\n CmsEntryStorageOperationsGetRevisionParams,\n CmsModel\n} from \"~/types\";\n\nexport class GetRevisionById implements IGetRevisionById {\n private operation: CmsEntryStorageOperations[\"getRevisionById\"];\n\n constructor(operation: CmsEntryStorageOperations[\"getRevisionById\"]) {\n this.operation = operation;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams) {\n
|
|
1
|
+
{"version":3,"names":["GetRevisionById","constructor","operation","transform","execute","model","params","result","exports"],"sources":["GetRevisionById.ts"],"sourcesContent":["import type { IGetRevisionById } from \"../../abstractions\";\nimport type {\n CmsEntryStorageOperations,\n CmsEntryStorageOperationsGetRevisionParams,\n CmsModel\n} from \"~/types\";\nimport type { ITransformEntryCallable } from \"~/utils/entryStorage.js\";\n\nexport class GetRevisionById implements IGetRevisionById {\n private readonly operation: CmsEntryStorageOperations[\"getRevisionById\"];\n private readonly transform: ITransformEntryCallable;\n\n public constructor(\n operation: CmsEntryStorageOperations[\"getRevisionById\"],\n transform: ITransformEntryCallable\n ) {\n this.operation = operation;\n this.transform = transform;\n }\n\n public async execute(model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams) {\n const result = await this.operation(model, params);\n if (!result) {\n return null;\n }\n return await this.transform(model, result);\n }\n}\n"],"mappings":";;;;;;AAQO,MAAMA,eAAe,CAA6B;EAI9CC,WAAWA,CACdC,SAAuD,EACvDC,SAAkC,EACpC;IACE,IAAI,CAACD,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,SAAS,GAAGA,SAAS;EAC9B;EAEA,MAAaC,OAAOA,CAACC,KAAe,EAAEC,MAAkD,EAAE;IACtF,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACL,SAAS,CAACG,KAAK,EAAEC,MAAM,CAAC;IAClD,IAAI,CAACC,MAAM,EAAE;MACT,OAAO,IAAI;IACf;IACA,OAAO,MAAM,IAAI,CAACJ,SAAS,CAACE,KAAK,EAAEE,MAAM,CAAC;EAC9C;AACJ;AAACC,OAAA,CAAAR,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { GetRevisionByIdNotDeleted } from "./GetRevisionByIdNotDeleted";
|
|
2
2
|
import type { CmsEntryStorageOperations } from "../../../../types";
|
|
3
|
+
import type { ITransformEntryCallable } from "../../../../utils/entryStorage.js";
|
|
3
4
|
interface GetRevisionByIdUseCasesParams {
|
|
4
5
|
operation: CmsEntryStorageOperations["getRevisionById"];
|
|
6
|
+
transform: ITransformEntryCallable;
|
|
5
7
|
}
|
|
6
8
|
export declare const getRevisionByIdUseCases: (params: GetRevisionByIdUseCasesParams) => {
|
|
7
9
|
getRevisionByIdUseCase: GetRevisionByIdNotDeleted;
|
|
@@ -7,7 +7,7 @@ exports.getRevisionByIdUseCases = void 0;
|
|
|
7
7
|
var _GetRevisionById = require("./GetRevisionById");
|
|
8
8
|
var _GetRevisionByIdNotDeleted = require("./GetRevisionByIdNotDeleted");
|
|
9
9
|
const getRevisionByIdUseCases = params => {
|
|
10
|
-
const getRevisionById = new _GetRevisionById.GetRevisionById(params.operation);
|
|
10
|
+
const getRevisionById = new _GetRevisionById.GetRevisionById(params.operation, params.transform);
|
|
11
11
|
const getRevisionByIdNotDeleted = new _GetRevisionByIdNotDeleted.GetRevisionByIdNotDeleted(getRevisionById);
|
|
12
12
|
return {
|
|
13
13
|
getRevisionByIdUseCase: getRevisionByIdNotDeleted
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_GetRevisionById","require","_GetRevisionByIdNotDeleted","getRevisionByIdUseCases","params","getRevisionById","GetRevisionById","operation","getRevisionByIdNotDeleted","GetRevisionByIdNotDeleted","getRevisionByIdUseCase","exports"],"sources":["index.ts"],"sourcesContent":["import { GetRevisionById } from \"./GetRevisionById\";\nimport { GetRevisionByIdNotDeleted } from \"./GetRevisionByIdNotDeleted\";\nimport type { CmsEntryStorageOperations } from \"~/types\";\n\ninterface GetRevisionByIdUseCasesParams {\n operation: CmsEntryStorageOperations[\"getRevisionById\"];\n}\n\nexport const getRevisionByIdUseCases = (params: GetRevisionByIdUseCasesParams) => {\n const getRevisionById = new GetRevisionById(params.operation);\n const getRevisionByIdNotDeleted = new GetRevisionByIdNotDeleted(getRevisionById);\n\n return {\n getRevisionByIdUseCase: getRevisionByIdNotDeleted\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,0BAAA,GAAAD,OAAA;
|
|
1
|
+
{"version":3,"names":["_GetRevisionById","require","_GetRevisionByIdNotDeleted","getRevisionByIdUseCases","params","getRevisionById","GetRevisionById","operation","transform","getRevisionByIdNotDeleted","GetRevisionByIdNotDeleted","getRevisionByIdUseCase","exports"],"sources":["index.ts"],"sourcesContent":["import { GetRevisionById } from \"./GetRevisionById\";\nimport { GetRevisionByIdNotDeleted } from \"./GetRevisionByIdNotDeleted\";\nimport type { CmsEntryStorageOperations } from \"~/types\";\nimport type { ITransformEntryCallable } from \"~/utils/entryStorage.js\";\n\ninterface GetRevisionByIdUseCasesParams {\n operation: CmsEntryStorageOperations[\"getRevisionById\"];\n transform: ITransformEntryCallable;\n}\n\nexport const getRevisionByIdUseCases = (params: GetRevisionByIdUseCasesParams) => {\n const getRevisionById = new GetRevisionById(params.operation, params.transform);\n const getRevisionByIdNotDeleted = new GetRevisionByIdNotDeleted(getRevisionById);\n\n return {\n getRevisionByIdUseCase: getRevisionByIdNotDeleted\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,0BAAA,GAAAD,OAAA;AASO,MAAME,uBAAuB,GAAIC,MAAqC,IAAK;EAC9E,MAAMC,eAAe,GAAG,IAAIC,gCAAe,CAACF,MAAM,CAACG,SAAS,EAAEH,MAAM,CAACI,SAAS,CAAC;EAC/E,MAAMC,yBAAyB,GAAG,IAAIC,oDAAyB,CAACL,eAAe,CAAC;EAEhF,OAAO;IACHM,sBAAsB,EAAEF;EAC5B,CAAC;AACL,CAAC;AAACG,OAAA,CAAAT,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { IGetRevisionsByEntryId } from "../../abstractions";
|
|
2
2
|
import type { CmsEntryStorageOperations, CmsEntryStorageOperationsGetRevisionParams, CmsModel } from "../../../../types";
|
|
3
|
+
import type { ITransformEntryCallable } from "../../../../utils/entryStorage.js";
|
|
3
4
|
export declare class GetRevisionsByEntryId implements IGetRevisionsByEntryId {
|
|
4
|
-
private operation;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
private readonly operation;
|
|
6
|
+
private readonly transform;
|
|
7
|
+
constructor(operation: CmsEntryStorageOperations["getRevisions"], transform: ITransformEntryCallable);
|
|
8
|
+
execute(model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams): Promise<import("../../../../types").CmsEntry<import("../../../../types").CmsEntryValues>[]>;
|
|
7
9
|
}
|
|
@@ -5,11 +5,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.GetRevisionsByEntryId = void 0;
|
|
7
7
|
class GetRevisionsByEntryId {
|
|
8
|
-
constructor(operation) {
|
|
8
|
+
constructor(operation, transform) {
|
|
9
9
|
this.operation = operation;
|
|
10
|
+
this.transform = transform;
|
|
10
11
|
}
|
|
11
12
|
async execute(model, params) {
|
|
12
|
-
|
|
13
|
+
const result = await this.operation(model, params);
|
|
14
|
+
return await Promise.all(result.map(async entry => {
|
|
15
|
+
return await this.transform(model, entry);
|
|
16
|
+
}));
|
|
13
17
|
}
|
|
14
18
|
}
|
|
15
19
|
exports.GetRevisionsByEntryId = GetRevisionsByEntryId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["GetRevisionsByEntryId","constructor","operation","execute","model","params","exports"],"sources":["GetRevisionsByEntryId.ts"],"sourcesContent":["import type { IGetRevisionsByEntryId } from \"../../abstractions\";\nimport type {\n CmsEntryStorageOperations,\n CmsEntryStorageOperationsGetRevisionParams,\n CmsModel\n} from \"~/types\";\n\nexport class GetRevisionsByEntryId implements IGetRevisionsByEntryId {\n private operation: CmsEntryStorageOperations[\"getRevisions\"];\n\n constructor(operation: CmsEntryStorageOperations[\"getRevisions\"]) {\n this.operation = operation;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams) {\n
|
|
1
|
+
{"version":3,"names":["GetRevisionsByEntryId","constructor","operation","transform","execute","model","params","result","Promise","all","map","entry","exports"],"sources":["GetRevisionsByEntryId.ts"],"sourcesContent":["import type { IGetRevisionsByEntryId } from \"../../abstractions\";\nimport type {\n CmsEntryStorageOperations,\n CmsEntryStorageOperationsGetRevisionParams,\n CmsModel\n} from \"~/types\";\nimport type { ITransformEntryCallable } from \"~/utils/entryStorage.js\";\n\nexport class GetRevisionsByEntryId implements IGetRevisionsByEntryId {\n private readonly operation: CmsEntryStorageOperations[\"getRevisions\"];\n private readonly transform: ITransformEntryCallable;\n\n public constructor(\n operation: CmsEntryStorageOperations[\"getRevisions\"],\n transform: ITransformEntryCallable\n ) {\n this.operation = operation;\n this.transform = transform;\n }\n\n public async execute(model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams) {\n const result = await this.operation(model, params);\n\n return await Promise.all(\n result.map(async entry => {\n return await this.transform(model, entry);\n })\n );\n }\n}\n"],"mappings":";;;;;;AAQO,MAAMA,qBAAqB,CAAmC;EAI1DC,WAAWA,CACdC,SAAoD,EACpDC,SAAkC,EACpC;IACE,IAAI,CAACD,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,SAAS,GAAGA,SAAS;EAC9B;EAEA,MAAaC,OAAOA,CAACC,KAAe,EAAEC,MAAkD,EAAE;IACtF,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACL,SAAS,CAACG,KAAK,EAAEC,MAAM,CAAC;IAElD,OAAO,MAAME,OAAO,CAACC,GAAG,CACpBF,MAAM,CAACG,GAAG,CAAC,MAAMC,KAAK,IAAI;MACtB,OAAO,MAAM,IAAI,CAACR,SAAS,CAACE,KAAK,EAAEM,KAAK,CAAC;IAC7C,CAAC,CACL,CAAC;EACL;AACJ;AAACC,OAAA,CAAAZ,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { GetRevisionsByEntryIdNotDeleted } from "./GetRevisionsByEntryIdNotDeleted";
|
|
2
2
|
import type { CmsEntryStorageOperations } from "../../../../types";
|
|
3
3
|
import type { AccessControl } from "../../../AccessControl/AccessControl";
|
|
4
|
+
import type { ITransformEntryCallable } from "../../../../utils/entryStorage.js";
|
|
4
5
|
interface GetRevisionsByEntryIdUseCasesParams {
|
|
5
6
|
operation: CmsEntryStorageOperations["getRevisions"];
|
|
6
7
|
accessControl: AccessControl;
|
|
8
|
+
transform: ITransformEntryCallable;
|
|
7
9
|
}
|
|
8
10
|
export declare const getRevisionsByEntryIdUseCases: (params: GetRevisionsByEntryIdUseCasesParams) => {
|
|
9
11
|
getRevisionsByEntryIdUseCase: GetRevisionsByEntryIdNotDeleted;
|
|
@@ -7,7 +7,7 @@ exports.getRevisionsByEntryIdUseCases = void 0;
|
|
|
7
7
|
var _GetRevisionsByEntryId = require("./GetRevisionsByEntryId");
|
|
8
8
|
var _GetRevisionsByEntryIdNotDeleted = require("./GetRevisionsByEntryIdNotDeleted");
|
|
9
9
|
const getRevisionsByEntryIdUseCases = params => {
|
|
10
|
-
const getRevisionsByEntryId = new _GetRevisionsByEntryId.GetRevisionsByEntryId(params.operation);
|
|
10
|
+
const getRevisionsByEntryId = new _GetRevisionsByEntryId.GetRevisionsByEntryId(params.operation, params.transform);
|
|
11
11
|
const getRevisionsByEntryIdNotDeleted = new _GetRevisionsByEntryIdNotDeleted.GetRevisionsByEntryIdNotDeleted(getRevisionsByEntryId);
|
|
12
12
|
return {
|
|
13
13
|
getRevisionsByEntryIdUseCase: getRevisionsByEntryIdNotDeleted
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_GetRevisionsByEntryId","require","_GetRevisionsByEntryIdNotDeleted","getRevisionsByEntryIdUseCases","params","getRevisionsByEntryId","GetRevisionsByEntryId","operation","getRevisionsByEntryIdNotDeleted","GetRevisionsByEntryIdNotDeleted","getRevisionsByEntryIdUseCase","exports"],"sources":["index.ts"],"sourcesContent":["import { GetRevisionsByEntryId } from \"./GetRevisionsByEntryId\";\nimport { GetRevisionsByEntryIdNotDeleted } from \"./GetRevisionsByEntryIdNotDeleted\";\nimport type { CmsEntryStorageOperations } from \"~/types\";\nimport type { AccessControl } from \"~/crud/AccessControl/AccessControl\";\n\ninterface GetRevisionsByEntryIdUseCasesParams {\n operation: CmsEntryStorageOperations[\"getRevisions\"];\n accessControl: AccessControl;\n}\n\nexport const getRevisionsByEntryIdUseCases = (params: GetRevisionsByEntryIdUseCasesParams) => {\n const getRevisionsByEntryId = new GetRevisionsByEntryId(params.operation);\n const getRevisionsByEntryIdNotDeleted = new GetRevisionsByEntryIdNotDeleted(\n getRevisionsByEntryId\n );\n\n return {\n getRevisionsByEntryIdUseCase: getRevisionsByEntryIdNotDeleted\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,gCAAA,GAAAD,OAAA;
|
|
1
|
+
{"version":3,"names":["_GetRevisionsByEntryId","require","_GetRevisionsByEntryIdNotDeleted","getRevisionsByEntryIdUseCases","params","getRevisionsByEntryId","GetRevisionsByEntryId","operation","transform","getRevisionsByEntryIdNotDeleted","GetRevisionsByEntryIdNotDeleted","getRevisionsByEntryIdUseCase","exports"],"sources":["index.ts"],"sourcesContent":["import { GetRevisionsByEntryId } from \"./GetRevisionsByEntryId\";\nimport { GetRevisionsByEntryIdNotDeleted } from \"./GetRevisionsByEntryIdNotDeleted\";\nimport type { CmsEntryStorageOperations } from \"~/types\";\nimport type { AccessControl } from \"~/crud/AccessControl/AccessControl\";\nimport type { ITransformEntryCallable } from \"~/utils/entryStorage.js\";\n\ninterface GetRevisionsByEntryIdUseCasesParams {\n operation: CmsEntryStorageOperations[\"getRevisions\"];\n accessControl: AccessControl;\n transform: ITransformEntryCallable;\n}\n\nexport const getRevisionsByEntryIdUseCases = (params: GetRevisionsByEntryIdUseCasesParams) => {\n const getRevisionsByEntryId = new GetRevisionsByEntryId(params.operation, params.transform);\n const getRevisionsByEntryIdNotDeleted = new GetRevisionsByEntryIdNotDeleted(\n getRevisionsByEntryId\n );\n\n return {\n getRevisionsByEntryIdUseCase: getRevisionsByEntryIdNotDeleted\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,gCAAA,GAAAD,OAAA;AAWO,MAAME,6BAA6B,GAAIC,MAA2C,IAAK;EAC1F,MAAMC,qBAAqB,GAAG,IAAIC,4CAAqB,CAACF,MAAM,CAACG,SAAS,EAAEH,MAAM,CAACI,SAAS,CAAC;EAC3F,MAAMC,+BAA+B,GAAG,IAAIC,gEAA+B,CACvEL,qBACJ,CAAC;EAED,OAAO;IACHM,4BAA4B,EAAEF;EAClC,CAAC;AACL,CAAC;AAACG,OAAA,CAAAT,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import type { IListEntriesOperation } from "../../abstractions";
|
|
2
2
|
import type { CmsEntryStorageOperations, CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
3
|
+
import type { ITransformEntryCallable } from "../../../../utils/entryStorage.js";
|
|
3
4
|
export declare class ListEntriesOperation implements IListEntriesOperation {
|
|
4
|
-
private operation;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
private readonly operation;
|
|
6
|
+
private readonly transform;
|
|
7
|
+
constructor(operation: CmsEntryStorageOperations["list"], transform: ITransformEntryCallable);
|
|
8
|
+
execute(model: CmsModel, params: CmsEntryStorageOperationsListParams): Promise<{
|
|
9
|
+
items: import("../../../../types").CmsEntry<import("../../../../types").CmsEntryValues>[];
|
|
10
|
+
hasMoreItems: boolean;
|
|
11
|
+
cursor: string | null;
|
|
12
|
+
totalCount: number;
|
|
13
|
+
}>;
|
|
7
14
|
}
|
|
@@ -5,11 +5,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.ListEntriesOperation = void 0;
|
|
7
7
|
class ListEntriesOperation {
|
|
8
|
-
constructor(operation) {
|
|
8
|
+
constructor(operation, transform) {
|
|
9
9
|
this.operation = operation;
|
|
10
|
+
this.transform = transform;
|
|
10
11
|
}
|
|
11
12
|
async execute(model, params) {
|
|
12
|
-
|
|
13
|
+
const result = await this.operation(model, params);
|
|
14
|
+
return {
|
|
15
|
+
...result,
|
|
16
|
+
items: await Promise.all(result.items.map(async entry => {
|
|
17
|
+
return this.transform(model, entry);
|
|
18
|
+
}))
|
|
19
|
+
};
|
|
13
20
|
}
|
|
14
21
|
}
|
|
15
22
|
exports.ListEntriesOperation = ListEntriesOperation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ListEntriesOperation","constructor","operation","execute","model","params","exports"],"sources":["ListEntriesOperation.ts"],"sourcesContent":["import type { IListEntriesOperation } from \"../../abstractions\";\nimport type {\n CmsEntryStorageOperations,\n CmsEntryStorageOperationsListParams,\n CmsModel\n} from \"~/types\";\n\nexport class ListEntriesOperation implements IListEntriesOperation {\n private operation: CmsEntryStorageOperations[\"list\"];\n\n constructor(operation: CmsEntryStorageOperations[\"list\"]) {\n this.operation = operation;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n
|
|
1
|
+
{"version":3,"names":["ListEntriesOperation","constructor","operation","transform","execute","model","params","result","items","Promise","all","map","entry","exports"],"sources":["ListEntriesOperation.ts"],"sourcesContent":["import type { IListEntriesOperation } from \"../../abstractions\";\nimport type {\n CmsEntryStorageOperations,\n CmsEntryStorageOperationsListParams,\n CmsModel\n} from \"~/types\";\nimport type { ITransformEntryCallable } from \"~/utils/entryStorage.js\";\n\nexport class ListEntriesOperation implements IListEntriesOperation {\n private readonly operation: CmsEntryStorageOperations[\"list\"];\n private readonly transform: ITransformEntryCallable;\n\n public constructor(\n operation: CmsEntryStorageOperations[\"list\"],\n transform: ITransformEntryCallable\n ) {\n this.operation = operation;\n this.transform = transform;\n }\n\n public async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n const result = await this.operation(model, params);\n return {\n ...result,\n items: await Promise.all(\n result.items.map(async entry => {\n return this.transform(model, entry);\n })\n )\n };\n }\n}\n"],"mappings":";;;;;;AAQO,MAAMA,oBAAoB,CAAkC;EAIxDC,WAAWA,CACdC,SAA4C,EAC5CC,SAAkC,EACpC;IACE,IAAI,CAACD,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,SAAS,GAAGA,SAAS;EAC9B;EAEA,MAAaC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IAC/E,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACL,SAAS,CAACG,KAAK,EAAEC,MAAM,CAAC;IAClD,OAAO;MACH,GAAGC,MAAM;MACTC,KAAK,EAAE,MAAMC,OAAO,CAACC,GAAG,CACpBH,MAAM,CAACC,KAAK,CAACG,GAAG,CAAC,MAAMC,KAAK,IAAI;QAC5B,OAAO,IAAI,CAACT,SAAS,CAACE,KAAK,EAAEO,KAAK,CAAC;MACvC,CAAC,CACL;IACJ,CAAC;EACL;AACJ;AAACC,OAAA,CAAAb,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@ import type { Topic } from "@webiny/pubsub/types";
|
|
|
4
4
|
import { ListEntriesSecure } from "./ListEntriesSecure";
|
|
5
5
|
import { GetEntrySecure } from "./GetEntrySecure";
|
|
6
6
|
import type { SecurityIdentity } from "@webiny/api-security/types";
|
|
7
|
+
import type { ITransformEntryCallable } from "../../../../utils/entryStorage.js";
|
|
7
8
|
export interface ListEntriesUseCasesTopics {
|
|
8
9
|
onEntryBeforeList: Topic<EntryBeforeListTopicParams>;
|
|
9
10
|
}
|
|
@@ -13,6 +14,7 @@ interface ListEntriesUseCasesParams {
|
|
|
13
14
|
topics: ListEntriesUseCasesTopics;
|
|
14
15
|
context: CmsContext;
|
|
15
16
|
getIdentity: () => SecurityIdentity;
|
|
17
|
+
transform: ITransformEntryCallable;
|
|
16
18
|
}
|
|
17
19
|
export declare const listEntriesUseCases: (params: ListEntriesUseCasesParams) => {
|
|
18
20
|
listEntriesUseCase: ListEntriesSecure;
|
|
@@ -18,7 +18,7 @@ var _ListEntries = require("./ListEntries");
|
|
|
18
18
|
var _GetEntry = require("./GetEntry");
|
|
19
19
|
var _GetEntrySecure = require("./GetEntrySecure");
|
|
20
20
|
const listEntriesUseCases = params => {
|
|
21
|
-
const listOperation = new _ListEntriesOperation.ListEntriesOperation(params.operation);
|
|
21
|
+
const listOperation = new _ListEntriesOperation.ListEntriesOperation(params.operation, params.transform);
|
|
22
22
|
const listOperationWithEvents = new _ListEntriesOperationWithEvents.ListEntriesOperationWithEvents(params.topics, listOperation);
|
|
23
23
|
const listOperationWithEventsSort = new _ListEntriesOperationWithSort.ListEntriesOperationWithSort(listOperationWithEvents);
|
|
24
24
|
const listOperationWithEventsSortStatusCheck = new _ListEntriesOperationWithStatusCheck.ListEntriesOperationWithStatusCheck(listOperationWithEventsSort);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_ListEntriesOperationWithSearchableFields","require","_ListEntriesOperation","_ListEntriesOperationWithEvents","_ListEntriesOperationWithSort","_ListEntriesOperationWithStatusCheck","_ListEntriesSecure","_ListEntriesOperationNotDeleted","_ListEntriesOperationDeleted","_ListEntriesOperationLatest","_ListEntriesOperationPublished","_ListEntries","_GetEntry","_GetEntrySecure","listEntriesUseCases","params","listOperation","ListEntriesOperation","operation","listOperationWithEvents","ListEntriesOperationWithEvents","topics","listOperationWithEventsSort","ListEntriesOperationWithSort","listOperationWithEventsSortStatusCheck","ListEntriesOperationWithStatusCheck","listOperationWithEventsSortStatusCheckFields","ListEntriesOperationWithSearchableFields","context","listNotDeletedOperation","ListEntriesOperationNotDeleted","listDeletedOperation","ListEntriesOperationDeleted","listEntriesOperation","ListEntries","listEntriesUseCase","ListEntriesSecure","accessControl","getIdentity","listLatestOperation","ListEntriesOperationLatest","listLatestEntries","listLatestUseCase","listLatestDeletedOperation","listDeletedEntries","listDeletedUseCase","listPublishedOperation","ListEntriesOperationPublished","listPublishedEntries","listPublishedUseCase","getEntryNotDeleted","GetEntry","getEntryUseCase","GetEntrySecure","exports"],"sources":["index.ts"],"sourcesContent":["import type { CmsContext, CmsEntryStorageOperations, EntryBeforeListTopicParams } from \"~/types\";\nimport type { AccessControl } from \"~/crud/AccessControl/AccessControl\";\n\nimport type { Topic } from \"@webiny/pubsub/types\";\nimport { ListEntriesOperationWithSearchableFields } from \"./ListEntriesOperationWithSearchableFields\";\nimport { ListEntriesOperation } from \"./ListEntriesOperation\";\nimport { ListEntriesOperationWithEvents } from \"./ListEntriesOperationWithEvents\";\nimport { ListEntriesOperationWithSort } from \"./ListEntriesOperationWithSort\";\nimport { ListEntriesOperationWithStatusCheck } from \"./ListEntriesOperationWithStatusCheck\";\nimport { ListEntriesSecure } from \"~/crud/contentEntry/useCases/ListEntries/ListEntriesSecure\";\nimport { ListEntriesOperationNotDeleted } from \"./ListEntriesOperationNotDeleted\";\nimport { ListEntriesOperationDeleted } from \"./ListEntriesOperationDeleted\";\nimport { ListEntriesOperationLatest } from \"./ListEntriesOperationLatest\";\nimport { ListEntriesOperationPublished } from \"./ListEntriesOperationPublished\";\nimport { ListEntries } from \"./ListEntries\";\nimport { GetEntry } from \"./GetEntry\";\nimport { GetEntrySecure } from \"./GetEntrySecure\";\nimport type { SecurityIdentity } from \"@webiny/api-security/types\";\n\nexport interface ListEntriesUseCasesTopics {\n onEntryBeforeList: Topic<EntryBeforeListTopicParams>;\n}\n\ninterface ListEntriesUseCasesParams {\n operation: CmsEntryStorageOperations[\"list\"];\n accessControl: AccessControl;\n topics: ListEntriesUseCasesTopics;\n context: CmsContext;\n getIdentity: () => SecurityIdentity;\n}\n\nexport const listEntriesUseCases = (params: ListEntriesUseCasesParams) => {\n const listOperation = new ListEntriesOperation(params.operation);\n const listOperationWithEvents = new ListEntriesOperationWithEvents(\n params.topics,\n listOperation\n );\n const listOperationWithEventsSort = new ListEntriesOperationWithSort(listOperationWithEvents);\n const listOperationWithEventsSortStatusCheck = new ListEntriesOperationWithStatusCheck(\n listOperationWithEventsSort\n );\n const listOperationWithEventsSortStatusCheckFields =\n new ListEntriesOperationWithSearchableFields(\n params.context,\n listOperationWithEventsSortStatusCheck\n );\n\n const listNotDeletedOperation = new ListEntriesOperationNotDeleted(\n listOperationWithEventsSortStatusCheckFields\n );\n\n const listDeletedOperation = new ListEntriesOperationDeleted(\n listOperationWithEventsSortStatusCheckFields\n );\n\n // List\n const listEntriesOperation = new ListEntries(listNotDeletedOperation);\n const listEntriesUseCase = new ListEntriesSecure(\n params.accessControl,\n params.getIdentity,\n listEntriesOperation\n );\n\n // List latest\n const listLatestOperation = new ListEntriesOperationLatest(listNotDeletedOperation);\n const listLatestEntries = new ListEntries(listLatestOperation);\n const listLatestUseCase = new ListEntriesSecure(\n params.accessControl,\n params.getIdentity,\n listLatestEntries\n );\n\n // List deleted\n const listLatestDeletedOperation = new ListEntriesOperationLatest(listDeletedOperation);\n const listDeletedEntries = new ListEntries(listLatestDeletedOperation);\n const listDeletedUseCase = new ListEntriesSecure(\n params.accessControl,\n params.getIdentity,\n listDeletedEntries\n );\n\n // List published\n const listPublishedOperation = new ListEntriesOperationPublished(listNotDeletedOperation);\n const listPublishedEntries = new ListEntries(listPublishedOperation);\n const listPublishedUseCase = new ListEntriesSecure(\n params.accessControl,\n params.getIdentity,\n listPublishedEntries\n );\n\n // Get\n const getEntryNotDeleted = new GetEntry(listNotDeletedOperation);\n const getEntryUseCase = new GetEntrySecure(\n params.accessControl,\n params.getIdentity,\n getEntryNotDeleted\n );\n\n return {\n listEntriesUseCase,\n listLatestUseCase,\n listDeletedUseCase,\n listPublishedUseCase,\n getEntryUseCase\n };\n};\n"],"mappings":";;;;;;AAIA,IAAAA,yCAAA,GAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAD,OAAA;AACA,IAAAE,+BAAA,GAAAF,OAAA;AACA,IAAAG,6BAAA,GAAAH,OAAA;AACA,IAAAI,oCAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,+BAAA,GAAAN,OAAA;AACA,IAAAO,4BAAA,GAAAP,OAAA;AACA,IAAAQ,2BAAA,GAAAR,OAAA;AACA,IAAAS,8BAAA,GAAAT,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AACA,IAAAW,SAAA,GAAAX,OAAA;AACA,IAAAY,eAAA,GAAAZ,OAAA;
|
|
1
|
+
{"version":3,"names":["_ListEntriesOperationWithSearchableFields","require","_ListEntriesOperation","_ListEntriesOperationWithEvents","_ListEntriesOperationWithSort","_ListEntriesOperationWithStatusCheck","_ListEntriesSecure","_ListEntriesOperationNotDeleted","_ListEntriesOperationDeleted","_ListEntriesOperationLatest","_ListEntriesOperationPublished","_ListEntries","_GetEntry","_GetEntrySecure","listEntriesUseCases","params","listOperation","ListEntriesOperation","operation","transform","listOperationWithEvents","ListEntriesOperationWithEvents","topics","listOperationWithEventsSort","ListEntriesOperationWithSort","listOperationWithEventsSortStatusCheck","ListEntriesOperationWithStatusCheck","listOperationWithEventsSortStatusCheckFields","ListEntriesOperationWithSearchableFields","context","listNotDeletedOperation","ListEntriesOperationNotDeleted","listDeletedOperation","ListEntriesOperationDeleted","listEntriesOperation","ListEntries","listEntriesUseCase","ListEntriesSecure","accessControl","getIdentity","listLatestOperation","ListEntriesOperationLatest","listLatestEntries","listLatestUseCase","listLatestDeletedOperation","listDeletedEntries","listDeletedUseCase","listPublishedOperation","ListEntriesOperationPublished","listPublishedEntries","listPublishedUseCase","getEntryNotDeleted","GetEntry","getEntryUseCase","GetEntrySecure","exports"],"sources":["index.ts"],"sourcesContent":["import type { CmsContext, CmsEntryStorageOperations, EntryBeforeListTopicParams } from \"~/types\";\nimport type { AccessControl } from \"~/crud/AccessControl/AccessControl\";\n\nimport type { Topic } from \"@webiny/pubsub/types\";\nimport { ListEntriesOperationWithSearchableFields } from \"./ListEntriesOperationWithSearchableFields\";\nimport { ListEntriesOperation } from \"./ListEntriesOperation\";\nimport { ListEntriesOperationWithEvents } from \"./ListEntriesOperationWithEvents\";\nimport { ListEntriesOperationWithSort } from \"./ListEntriesOperationWithSort\";\nimport { ListEntriesOperationWithStatusCheck } from \"./ListEntriesOperationWithStatusCheck\";\nimport { ListEntriesSecure } from \"~/crud/contentEntry/useCases/ListEntries/ListEntriesSecure\";\nimport { ListEntriesOperationNotDeleted } from \"./ListEntriesOperationNotDeleted\";\nimport { ListEntriesOperationDeleted } from \"./ListEntriesOperationDeleted\";\nimport { ListEntriesOperationLatest } from \"./ListEntriesOperationLatest\";\nimport { ListEntriesOperationPublished } from \"./ListEntriesOperationPublished\";\nimport { ListEntries } from \"./ListEntries\";\nimport { GetEntry } from \"./GetEntry\";\nimport { GetEntrySecure } from \"./GetEntrySecure\";\nimport type { SecurityIdentity } from \"@webiny/api-security/types\";\nimport type { ITransformEntryCallable } from \"~/utils/entryStorage.js\";\n\nexport interface ListEntriesUseCasesTopics {\n onEntryBeforeList: Topic<EntryBeforeListTopicParams>;\n}\n\ninterface ListEntriesUseCasesParams {\n operation: CmsEntryStorageOperations[\"list\"];\n accessControl: AccessControl;\n topics: ListEntriesUseCasesTopics;\n context: CmsContext;\n getIdentity: () => SecurityIdentity;\n transform: ITransformEntryCallable;\n}\n\nexport const listEntriesUseCases = (params: ListEntriesUseCasesParams) => {\n const listOperation = new ListEntriesOperation(params.operation, params.transform);\n const listOperationWithEvents = new ListEntriesOperationWithEvents(\n params.topics,\n listOperation\n );\n const listOperationWithEventsSort = new ListEntriesOperationWithSort(listOperationWithEvents);\n const listOperationWithEventsSortStatusCheck = new ListEntriesOperationWithStatusCheck(\n listOperationWithEventsSort\n );\n const listOperationWithEventsSortStatusCheckFields =\n new ListEntriesOperationWithSearchableFields(\n params.context,\n listOperationWithEventsSortStatusCheck\n );\n\n const listNotDeletedOperation = new ListEntriesOperationNotDeleted(\n listOperationWithEventsSortStatusCheckFields\n );\n\n const listDeletedOperation = new ListEntriesOperationDeleted(\n listOperationWithEventsSortStatusCheckFields\n );\n\n // List\n const listEntriesOperation = new ListEntries(listNotDeletedOperation);\n const listEntriesUseCase = new ListEntriesSecure(\n params.accessControl,\n params.getIdentity,\n listEntriesOperation\n );\n\n // List latest\n const listLatestOperation = new ListEntriesOperationLatest(listNotDeletedOperation);\n const listLatestEntries = new ListEntries(listLatestOperation);\n const listLatestUseCase = new ListEntriesSecure(\n params.accessControl,\n params.getIdentity,\n listLatestEntries\n );\n\n // List deleted\n const listLatestDeletedOperation = new ListEntriesOperationLatest(listDeletedOperation);\n const listDeletedEntries = new ListEntries(listLatestDeletedOperation);\n const listDeletedUseCase = new ListEntriesSecure(\n params.accessControl,\n params.getIdentity,\n listDeletedEntries\n );\n\n // List published\n const listPublishedOperation = new ListEntriesOperationPublished(listNotDeletedOperation);\n const listPublishedEntries = new ListEntries(listPublishedOperation);\n const listPublishedUseCase = new ListEntriesSecure(\n params.accessControl,\n params.getIdentity,\n listPublishedEntries\n );\n\n // Get\n const getEntryNotDeleted = new GetEntry(listNotDeletedOperation);\n const getEntryUseCase = new GetEntrySecure(\n params.accessControl,\n params.getIdentity,\n getEntryNotDeleted\n );\n\n return {\n listEntriesUseCase,\n listLatestUseCase,\n listDeletedUseCase,\n listPublishedUseCase,\n getEntryUseCase\n };\n};\n"],"mappings":";;;;;;AAIA,IAAAA,yCAAA,GAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAD,OAAA;AACA,IAAAE,+BAAA,GAAAF,OAAA;AACA,IAAAG,6BAAA,GAAAH,OAAA;AACA,IAAAI,oCAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,+BAAA,GAAAN,OAAA;AACA,IAAAO,4BAAA,GAAAP,OAAA;AACA,IAAAQ,2BAAA,GAAAR,OAAA;AACA,IAAAS,8BAAA,GAAAT,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AACA,IAAAW,SAAA,GAAAX,OAAA;AACA,IAAAY,eAAA,GAAAZ,OAAA;AAiBO,MAAMa,mBAAmB,GAAIC,MAAiC,IAAK;EACtE,MAAMC,aAAa,GAAG,IAAIC,0CAAoB,CAACF,MAAM,CAACG,SAAS,EAAEH,MAAM,CAACI,SAAS,CAAC;EAClF,MAAMC,uBAAuB,GAAG,IAAIC,8DAA8B,CAC9DN,MAAM,CAACO,MAAM,EACbN,aACJ,CAAC;EACD,MAAMO,2BAA2B,GAAG,IAAIC,0DAA4B,CAACJ,uBAAuB,CAAC;EAC7F,MAAMK,sCAAsC,GAAG,IAAIC,wEAAmC,CAClFH,2BACJ,CAAC;EACD,MAAMI,4CAA4C,GAC9C,IAAIC,kFAAwC,CACxCb,MAAM,CAACc,OAAO,EACdJ,sCACJ,CAAC;EAEL,MAAMK,uBAAuB,GAAG,IAAIC,8DAA8B,CAC9DJ,4CACJ,CAAC;EAED,MAAMK,oBAAoB,GAAG,IAAIC,wDAA2B,CACxDN,4CACJ,CAAC;;EAED;EACA,MAAMO,oBAAoB,GAAG,IAAIC,wBAAW,CAACL,uBAAuB,CAAC;EACrE,MAAMM,kBAAkB,GAAG,IAAIC,oCAAiB,CAC5CtB,MAAM,CAACuB,aAAa,EACpBvB,MAAM,CAACwB,WAAW,EAClBL,oBACJ,CAAC;;EAED;EACA,MAAMM,mBAAmB,GAAG,IAAIC,sDAA0B,CAACX,uBAAuB,CAAC;EACnF,MAAMY,iBAAiB,GAAG,IAAIP,wBAAW,CAACK,mBAAmB,CAAC;EAC9D,MAAMG,iBAAiB,GAAG,IAAIN,oCAAiB,CAC3CtB,MAAM,CAACuB,aAAa,EACpBvB,MAAM,CAACwB,WAAW,EAClBG,iBACJ,CAAC;;EAED;EACA,MAAME,0BAA0B,GAAG,IAAIH,sDAA0B,CAACT,oBAAoB,CAAC;EACvF,MAAMa,kBAAkB,GAAG,IAAIV,wBAAW,CAACS,0BAA0B,CAAC;EACtE,MAAME,kBAAkB,GAAG,IAAIT,oCAAiB,CAC5CtB,MAAM,CAACuB,aAAa,EACpBvB,MAAM,CAACwB,WAAW,EAClBM,kBACJ,CAAC;;EAED;EACA,MAAME,sBAAsB,GAAG,IAAIC,4DAA6B,CAAClB,uBAAuB,CAAC;EACzF,MAAMmB,oBAAoB,GAAG,IAAId,wBAAW,CAACY,sBAAsB,CAAC;EACpE,MAAMG,oBAAoB,GAAG,IAAIb,oCAAiB,CAC9CtB,MAAM,CAACuB,aAAa,EACpBvB,MAAM,CAACwB,WAAW,EAClBU,oBACJ,CAAC;;EAED;EACA,MAAME,kBAAkB,GAAG,IAAIC,kBAAQ,CAACtB,uBAAuB,CAAC;EAChE,MAAMuB,eAAe,GAAG,IAAIC,8BAAc,CACtCvC,MAAM,CAACuB,aAAa,EACpBvB,MAAM,CAACwB,WAAW,EAClBY,kBACJ,CAAC;EAED,OAAO;IACHf,kBAAkB;IAClBO,iBAAiB;IACjBG,kBAAkB;IAClBI,oBAAoB;IACpBG;EACJ,CAAC;AACL,CAAC;AAACE,OAAA,CAAAzC,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { IRestoreEntryFromBinOperation } from "../../abstractions";
|
|
2
2
|
import type { CmsEntryStorageOperations, CmsEntryStorageOperationsRestoreFromBinParams, CmsModel } from "../../../../types";
|
|
3
|
+
import type { ITransformEntryCallable } from "../../../../utils/entryStorage.js";
|
|
3
4
|
export declare class RestoreEntryFromBinOperation implements IRestoreEntryFromBinOperation {
|
|
4
|
-
private operation;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
private readonly operation;
|
|
6
|
+
private readonly transform;
|
|
7
|
+
constructor(operation: CmsEntryStorageOperations["restoreFromBin"], transform: ITransformEntryCallable);
|
|
8
|
+
execute(model: CmsModel, params: CmsEntryStorageOperationsRestoreFromBinParams): Promise<import("../../../../types").CmsEntry<import("../../../../types").CmsEntryValues>>;
|
|
7
9
|
}
|
|
@@ -5,11 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.RestoreEntryFromBinOperation = void 0;
|
|
7
7
|
class RestoreEntryFromBinOperation {
|
|
8
|
-
constructor(operation) {
|
|
8
|
+
constructor(operation, transform) {
|
|
9
9
|
this.operation = operation;
|
|
10
|
+
this.transform = transform;
|
|
10
11
|
}
|
|
11
12
|
async execute(model, params) {
|
|
12
|
-
|
|
13
|
+
const result = await this.operation(model, params);
|
|
14
|
+
return await this.transform(model, result);
|
|
13
15
|
}
|
|
14
16
|
}
|
|
15
17
|
exports.RestoreEntryFromBinOperation = RestoreEntryFromBinOperation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RestoreEntryFromBinOperation","constructor","operation","execute","model","params","exports"],"sources":["RestoreEntryFromBinOperation.ts"],"sourcesContent":["import type { IRestoreEntryFromBinOperation } from \"~/crud/contentEntry/abstractions\";\nimport type {\n CmsEntryStorageOperations,\n CmsEntryStorageOperationsRestoreFromBinParams,\n CmsModel\n} from \"~/types\";\n\nexport class RestoreEntryFromBinOperation implements IRestoreEntryFromBinOperation {\n private operation: CmsEntryStorageOperations[\"restoreFromBin\"];\n\n constructor(operation: CmsEntryStorageOperations[\"restoreFromBin\"]) {\n this.operation = operation;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsRestoreFromBinParams) {\n
|
|
1
|
+
{"version":3,"names":["RestoreEntryFromBinOperation","constructor","operation","transform","execute","model","params","result","exports"],"sources":["RestoreEntryFromBinOperation.ts"],"sourcesContent":["import type { IRestoreEntryFromBinOperation } from \"~/crud/contentEntry/abstractions\";\nimport type {\n CmsEntryStorageOperations,\n CmsEntryStorageOperationsRestoreFromBinParams,\n CmsModel\n} from \"~/types\";\nimport type { ITransformEntryCallable } from \"~/utils/entryStorage.js\";\n\nexport class RestoreEntryFromBinOperation implements IRestoreEntryFromBinOperation {\n private readonly operation: CmsEntryStorageOperations[\"restoreFromBin\"];\n private readonly transform: ITransformEntryCallable;\n\n public constructor(\n operation: CmsEntryStorageOperations[\"restoreFromBin\"],\n transform: ITransformEntryCallable\n ) {\n this.operation = operation;\n this.transform = transform;\n }\n\n public async execute(model: CmsModel, params: CmsEntryStorageOperationsRestoreFromBinParams) {\n const result = await this.operation(model, params);\n\n return await this.transform(model, result);\n }\n}\n"],"mappings":";;;;;;AAQO,MAAMA,4BAA4B,CAA0C;EAIxEC,WAAWA,CACdC,SAAsD,EACtDC,SAAkC,EACpC;IACE,IAAI,CAACD,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,SAAS,GAAGA,SAAS;EAC9B;EAEA,MAAaC,OAAOA,CAACC,KAAe,EAAEC,MAAqD,EAAE;IACzF,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACL,SAAS,CAACG,KAAK,EAAEC,MAAM,CAAC;IAElD,OAAO,MAAM,IAAI,CAACH,SAAS,CAACE,KAAK,EAAEE,MAAM,CAAC;EAC9C;AACJ;AAACC,OAAA,CAAAR,4BAAA,GAAAA,4BAAA","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@ import type { IGetLatestRevisionByEntryId } from "../../abstractions";
|
|
|
4
4
|
import type { AccessControl } from "../../../AccessControl/AccessControl";
|
|
5
5
|
import type { SecurityIdentity } from "@webiny/api-security/types";
|
|
6
6
|
import { RestoreEntryFromBinSecure } from "./RestoreEntryFromBinSecure";
|
|
7
|
+
import type { ITransformEntryCallable } from "../../../../utils/entryStorage.js";
|
|
7
8
|
export interface RestoreEntryFromBinUseCasesTopics {
|
|
8
9
|
onEntryBeforeRestoreFromBin: Topic<OnEntryBeforeRestoreFromBinTopicParams>;
|
|
9
10
|
onEntryAfterRestoreFromBin: Topic<OnEntryAfterRestoreFromBinTopicParams>;
|
|
@@ -16,6 +17,7 @@ interface RestoreEntryFromBinUseCasesParams {
|
|
|
16
17
|
topics: RestoreEntryFromBinUseCasesTopics;
|
|
17
18
|
context: CmsContext;
|
|
18
19
|
getIdentity: () => SecurityIdentity;
|
|
20
|
+
transform: ITransformEntryCallable;
|
|
19
21
|
}
|
|
20
22
|
export declare const restoreEntryFromBinUseCases: (params: RestoreEntryFromBinUseCasesParams) => {
|
|
21
23
|
restoreEntryFromBinUseCase: RestoreEntryFromBinSecure;
|
|
@@ -10,7 +10,7 @@ var _TransformEntryRestoreFromBin = require("./TransformEntryRestoreFromBin");
|
|
|
10
10
|
var _RestoreEntryFromBin = require("./RestoreEntryFromBin");
|
|
11
11
|
var _RestoreEntryFromBinSecure = require("./RestoreEntryFromBinSecure");
|
|
12
12
|
const restoreEntryFromBinUseCases = params => {
|
|
13
|
-
const restoreEntryOperation = new _RestoreEntryFromBinOperation.RestoreEntryFromBinOperation(params.restoreOperation);
|
|
13
|
+
const restoreEntryOperation = new _RestoreEntryFromBinOperation.RestoreEntryFromBinOperation(params.restoreOperation, params.transform);
|
|
14
14
|
const restoreEntryOperationWithEvents = new _RestoreEntryFromBinOperationWithEvents.RestoreEntryFromBinOperationWithEvents(params.topics, restoreEntryOperation);
|
|
15
15
|
const restoreTransform = new _TransformEntryRestoreFromBin.TransformEntryRestoreFromBin(params.context, params.getIdentity);
|
|
16
16
|
const restoreEntry = new _RestoreEntryFromBin.RestoreEntryFromBin(params.getEntry, restoreTransform, restoreEntryOperationWithEvents);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_RestoreEntryFromBinOperation","require","_RestoreEntryFromBinOperationWithEvents","_TransformEntryRestoreFromBin","_RestoreEntryFromBin","_RestoreEntryFromBinSecure","restoreEntryFromBinUseCases","params","restoreEntryOperation","RestoreEntryFromBinOperation","restoreOperation","restoreEntryOperationWithEvents","RestoreEntryFromBinOperationWithEvents","topics","restoreTransform","TransformEntryRestoreFromBin","context","getIdentity","restoreEntry","RestoreEntryFromBin","getEntry","restoreEntrySecure","RestoreEntryFromBinSecure","accessControl","restoreEntryFromBinUseCase","exports"],"sources":["index.ts"],"sourcesContent":["import type { Topic } from \"@webiny/pubsub/types\";\nimport type {\n CmsContext,\n CmsEntryStorageOperations,\n OnEntryAfterRestoreFromBinTopicParams,\n OnEntryBeforeRestoreFromBinTopicParams,\n OnEntryRestoreFromBinErrorTopicParams\n} from \"~/types\";\nimport type { IGetLatestRevisionByEntryId } from \"~/crud/contentEntry/abstractions\";\nimport type { AccessControl } from \"~/crud/AccessControl/AccessControl\";\nimport type { SecurityIdentity } from \"@webiny/api-security/types\";\nimport { RestoreEntryFromBinOperation } from \"./RestoreEntryFromBinOperation\";\nimport { RestoreEntryFromBinOperationWithEvents } from \"./RestoreEntryFromBinOperationWithEvents\";\nimport { TransformEntryRestoreFromBin } from \"./TransformEntryRestoreFromBin\";\nimport { RestoreEntryFromBin } from \"./RestoreEntryFromBin\";\nimport { RestoreEntryFromBinSecure } from \"./RestoreEntryFromBinSecure\";\n\nexport interface RestoreEntryFromBinUseCasesTopics {\n onEntryBeforeRestoreFromBin: Topic<OnEntryBeforeRestoreFromBinTopicParams>;\n onEntryAfterRestoreFromBin: Topic<OnEntryAfterRestoreFromBinTopicParams>;\n onEntryRestoreFromBinError: Topic<OnEntryRestoreFromBinErrorTopicParams>;\n}\n\ninterface RestoreEntryFromBinUseCasesParams {\n restoreOperation: CmsEntryStorageOperations[\"restoreFromBin\"];\n getEntry: IGetLatestRevisionByEntryId;\n accessControl: AccessControl;\n topics: RestoreEntryFromBinUseCasesTopics;\n context: CmsContext;\n getIdentity: () => SecurityIdentity;\n}\n\nexport const restoreEntryFromBinUseCases = (params: RestoreEntryFromBinUseCasesParams) => {\n const restoreEntryOperation = new RestoreEntryFromBinOperation(params.restoreOperation);\n const restoreEntryOperationWithEvents = new RestoreEntryFromBinOperationWithEvents(\n params.topics,\n restoreEntryOperation\n );\n const restoreTransform = new TransformEntryRestoreFromBin(params.context, params.getIdentity);\n const restoreEntry = new RestoreEntryFromBin(\n params.getEntry,\n restoreTransform,\n restoreEntryOperationWithEvents\n );\n const restoreEntrySecure = new RestoreEntryFromBinSecure(params.accessControl, restoreEntry);\n\n return {\n restoreEntryFromBinUseCase: restoreEntrySecure\n };\n};\n"],"mappings":";;;;;;AAWA,IAAAA,6BAAA,GAAAC,OAAA;AACA,IAAAC,uCAAA,GAAAD,OAAA;AACA,IAAAE,6BAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AACA,IAAAI,0BAAA,GAAAJ,OAAA;
|
|
1
|
+
{"version":3,"names":["_RestoreEntryFromBinOperation","require","_RestoreEntryFromBinOperationWithEvents","_TransformEntryRestoreFromBin","_RestoreEntryFromBin","_RestoreEntryFromBinSecure","restoreEntryFromBinUseCases","params","restoreEntryOperation","RestoreEntryFromBinOperation","restoreOperation","transform","restoreEntryOperationWithEvents","RestoreEntryFromBinOperationWithEvents","topics","restoreTransform","TransformEntryRestoreFromBin","context","getIdentity","restoreEntry","RestoreEntryFromBin","getEntry","restoreEntrySecure","RestoreEntryFromBinSecure","accessControl","restoreEntryFromBinUseCase","exports"],"sources":["index.ts"],"sourcesContent":["import type { Topic } from \"@webiny/pubsub/types\";\nimport type {\n CmsContext,\n CmsEntryStorageOperations,\n OnEntryAfterRestoreFromBinTopicParams,\n OnEntryBeforeRestoreFromBinTopicParams,\n OnEntryRestoreFromBinErrorTopicParams\n} from \"~/types\";\nimport type { IGetLatestRevisionByEntryId } from \"~/crud/contentEntry/abstractions\";\nimport type { AccessControl } from \"~/crud/AccessControl/AccessControl\";\nimport type { SecurityIdentity } from \"@webiny/api-security/types\";\nimport { RestoreEntryFromBinOperation } from \"./RestoreEntryFromBinOperation\";\nimport { RestoreEntryFromBinOperationWithEvents } from \"./RestoreEntryFromBinOperationWithEvents\";\nimport { TransformEntryRestoreFromBin } from \"./TransformEntryRestoreFromBin\";\nimport { RestoreEntryFromBin } from \"./RestoreEntryFromBin\";\nimport { RestoreEntryFromBinSecure } from \"./RestoreEntryFromBinSecure\";\nimport type { ITransformEntryCallable } from \"~/utils/entryStorage.js\";\n\nexport interface RestoreEntryFromBinUseCasesTopics {\n onEntryBeforeRestoreFromBin: Topic<OnEntryBeforeRestoreFromBinTopicParams>;\n onEntryAfterRestoreFromBin: Topic<OnEntryAfterRestoreFromBinTopicParams>;\n onEntryRestoreFromBinError: Topic<OnEntryRestoreFromBinErrorTopicParams>;\n}\n\ninterface RestoreEntryFromBinUseCasesParams {\n restoreOperation: CmsEntryStorageOperations[\"restoreFromBin\"];\n getEntry: IGetLatestRevisionByEntryId;\n accessControl: AccessControl;\n topics: RestoreEntryFromBinUseCasesTopics;\n context: CmsContext;\n getIdentity: () => SecurityIdentity;\n transform: ITransformEntryCallable;\n}\n\nexport const restoreEntryFromBinUseCases = (params: RestoreEntryFromBinUseCasesParams) => {\n const restoreEntryOperation = new RestoreEntryFromBinOperation(\n params.restoreOperation,\n params.transform\n );\n const restoreEntryOperationWithEvents = new RestoreEntryFromBinOperationWithEvents(\n params.topics,\n restoreEntryOperation\n );\n const restoreTransform = new TransformEntryRestoreFromBin(params.context, params.getIdentity);\n const restoreEntry = new RestoreEntryFromBin(\n params.getEntry,\n restoreTransform,\n restoreEntryOperationWithEvents\n );\n const restoreEntrySecure = new RestoreEntryFromBinSecure(params.accessControl, restoreEntry);\n\n return {\n restoreEntryFromBinUseCase: restoreEntrySecure\n };\n};\n"],"mappings":";;;;;;AAWA,IAAAA,6BAAA,GAAAC,OAAA;AACA,IAAAC,uCAAA,GAAAD,OAAA;AACA,IAAAE,6BAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AACA,IAAAI,0BAAA,GAAAJ,OAAA;AAmBO,MAAMK,2BAA2B,GAAIC,MAAyC,IAAK;EACtF,MAAMC,qBAAqB,GAAG,IAAIC,0DAA4B,CAC1DF,MAAM,CAACG,gBAAgB,EACvBH,MAAM,CAACI,SACX,CAAC;EACD,MAAMC,+BAA+B,GAAG,IAAIC,8EAAsC,CAC9EN,MAAM,CAACO,MAAM,EACbN,qBACJ,CAAC;EACD,MAAMO,gBAAgB,GAAG,IAAIC,0DAA4B,CAACT,MAAM,CAACU,OAAO,EAAEV,MAAM,CAACW,WAAW,CAAC;EAC7F,MAAMC,YAAY,GAAG,IAAIC,wCAAmB,CACxCb,MAAM,CAACc,QAAQ,EACfN,gBAAgB,EAChBH,+BACJ,CAAC;EACD,MAAMU,kBAAkB,GAAG,IAAIC,oDAAyB,CAAChB,MAAM,CAACiB,aAAa,EAAEL,YAAY,CAAC;EAE5F,OAAO;IACHM,0BAA0B,EAAEH;EAChC,CAAC;AACL,CAAC;AAACI,OAAA,CAAApB,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
|
@@ -131,7 +131,9 @@ const createContentEntryCrud = params => {
|
|
|
131
131
|
context,
|
|
132
132
|
onEntryAfterDelete
|
|
133
133
|
});
|
|
134
|
-
|
|
134
|
+
const transformEntryFromStorageCallable = (0, _entryStorage.createTransformEntryCallable)({
|
|
135
|
+
context
|
|
136
|
+
});
|
|
135
137
|
/**
|
|
136
138
|
* List entries
|
|
137
139
|
*/
|
|
@@ -142,7 +144,8 @@ const createContentEntryCrud = params => {
|
|
|
142
144
|
listPublishedUseCase,
|
|
143
145
|
getEntryUseCase
|
|
144
146
|
} = (0, _useCases.listEntriesUseCases)({
|
|
145
|
-
|
|
147
|
+
transform: transformEntryFromStorageCallable,
|
|
148
|
+
operation: storageOperations.entries.list,
|
|
146
149
|
accessControl,
|
|
147
150
|
topics: {
|
|
148
151
|
onEntryBeforeList
|
|
@@ -157,6 +160,7 @@ const createContentEntryCrud = params => {
|
|
|
157
160
|
const {
|
|
158
161
|
getEntriesByIdsUseCase
|
|
159
162
|
} = (0, _useCases.getEntriesByIdsUseCases)({
|
|
163
|
+
transform: transformEntryFromStorageCallable,
|
|
160
164
|
operation: storageOperations.entries.getByIds,
|
|
161
165
|
accessControl
|
|
162
166
|
});
|
|
@@ -167,6 +171,7 @@ const createContentEntryCrud = params => {
|
|
|
167
171
|
const {
|
|
168
172
|
getLatestEntriesByIdsUseCase
|
|
169
173
|
} = (0, _useCases.getLatestEntriesByIdsUseCases)({
|
|
174
|
+
transform: transformEntryFromStorageCallable,
|
|
170
175
|
operation: storageOperations.entries.getLatestByIds,
|
|
171
176
|
accessControl
|
|
172
177
|
});
|
|
@@ -177,6 +182,7 @@ const createContentEntryCrud = params => {
|
|
|
177
182
|
const {
|
|
178
183
|
getPublishedEntriesByIdsUseCase
|
|
179
184
|
} = (0, _useCases.getPublishedEntriesByIdsUseCases)({
|
|
185
|
+
transform: transformEntryFromStorageCallable,
|
|
180
186
|
operation: storageOperations.entries.getPublishedByIds,
|
|
181
187
|
accessControl
|
|
182
188
|
});
|
|
@@ -187,6 +193,7 @@ const createContentEntryCrud = params => {
|
|
|
187
193
|
const {
|
|
188
194
|
getRevisionsByEntryIdUseCase
|
|
189
195
|
} = (0, _useCases.getRevisionsByEntryIdUseCases)({
|
|
196
|
+
transform: transformEntryFromStorageCallable,
|
|
190
197
|
operation: storageOperations.entries.getRevisions,
|
|
191
198
|
accessControl
|
|
192
199
|
});
|
|
@@ -197,6 +204,7 @@ const createContentEntryCrud = params => {
|
|
|
197
204
|
const {
|
|
198
205
|
getRevisionByIdUseCase
|
|
199
206
|
} = (0, _useCases.getRevisionByIdUseCases)({
|
|
207
|
+
transform: transformEntryFromStorageCallable,
|
|
200
208
|
operation: storageOperations.entries.getRevisionById
|
|
201
209
|
});
|
|
202
210
|
|
|
@@ -208,6 +216,7 @@ const createContentEntryCrud = params => {
|
|
|
208
216
|
getLatestRevisionByEntryIdWithDeletedUseCase,
|
|
209
217
|
getLatestRevisionByEntryIdDeletedUseCase
|
|
210
218
|
} = (0, _useCases.getLatestRevisionByEntryIdUseCases)({
|
|
219
|
+
transform: transformEntryFromStorageCallable,
|
|
211
220
|
operation: storageOperations.entries.getLatestRevisionByEntryId
|
|
212
221
|
});
|
|
213
222
|
|
|
@@ -217,6 +226,7 @@ const createContentEntryCrud = params => {
|
|
|
217
226
|
const {
|
|
218
227
|
getPreviousRevisionByEntryIdUseCase
|
|
219
228
|
} = (0, _useCases.getPreviousRevisionByEntryIdUseCases)({
|
|
229
|
+
transform: transformEntryFromStorageCallable,
|
|
220
230
|
operation: storageOperations.entries.getPreviousRevision
|
|
221
231
|
});
|
|
222
232
|
|
|
@@ -226,6 +236,7 @@ const createContentEntryCrud = params => {
|
|
|
226
236
|
const {
|
|
227
237
|
getPublishedRevisionByEntryIdUseCase
|
|
228
238
|
} = (0, _useCases.getPublishedRevisionByEntryIdUseCases)({
|
|
239
|
+
transform: transformEntryFromStorageCallable,
|
|
229
240
|
operation: storageOperations.entries.getPublishedRevisionByEntryId
|
|
230
241
|
});
|
|
231
242
|
|
|
@@ -257,9 +268,10 @@ const createContentEntryCrud = params => {
|
|
|
257
268
|
const {
|
|
258
269
|
restoreEntryFromBinUseCase
|
|
259
270
|
} = (0, _useCases.restoreEntryFromBinUseCases)({
|
|
260
|
-
|
|
271
|
+
transform: transformEntryFromStorageCallable,
|
|
261
272
|
getEntry: getLatestRevisionByEntryIdDeletedUseCase,
|
|
262
273
|
getIdentity: getSecurityIdentity,
|
|
274
|
+
restoreOperation: storageOperations.entries.restoreFromBin,
|
|
263
275
|
topics: {
|
|
264
276
|
onEntryBeforeRestoreFromBin,
|
|
265
277
|
onEntryAfterRestoreFromBin,
|