UNPKG

@webiny/api-page-builder-so-ddb

Version:

The DynamoDB storage operations Webiny Page Builder API.

37 lines (35 loc) 879 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createSortKey = exports.createPartitionKey = exports.createGSISortKey = exports.createGSIPartitionKey = void 0; const createPartitionKey = params => { const { tenant, locale, id } = params; return `T#${tenant}#L#${locale}#PB#BLOCK#${id}`; }; exports.createPartitionKey = createPartitionKey; const createGSIPartitionKey = params => { const { tenant, locale } = params; return `T#${tenant}#L#${locale}#PB#BLOCKS`; }; exports.createGSIPartitionKey = createGSIPartitionKey; const createGSISortKey = params => { const { id, blockCategory } = params; return `${blockCategory}#${id}`; }; exports.createGSISortKey = createGSISortKey; const createSortKey = () => { return "A"; }; exports.createSortKey = createSortKey; //# sourceMappingURL=keys.js.map