@webiny/api-page-builder-so-ddb-es 5.23.0 → 5.24.0-beta.0

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.
@@ -1,8 +1,9 @@
1
1
  import { Entity, Table } from "dynamodb-toolbox";
2
2
  import { Attributes } from "../types";
3
- export interface Params {
3
+ interface Params {
4
4
  table: Table;
5
5
  entityName: string;
6
6
  attributes: Attributes;
7
7
  }
8
8
  export declare const createCategoryEntity: (params: Params) => Entity<any>;
9
+ export {};
@@ -1,8 +1,9 @@
1
1
  import { Entity, Table } from "dynamodb-toolbox";
2
2
  import { Attributes } from "../types";
3
- export interface Params {
3
+ interface Params {
4
4
  table: Table;
5
5
  entityName: string;
6
6
  attributes: Attributes;
7
7
  }
8
8
  export declare const createMenuEntity: (params: Params) => Entity<any>;
9
+ export {};
@@ -1,8 +1,9 @@
1
1
  import { Entity, Table } from "dynamodb-toolbox";
2
2
  import { Attributes } from "../types";
3
- export interface Params {
3
+ interface Params {
4
4
  table: Table;
5
5
  entityName: string;
6
6
  attributes: Attributes;
7
7
  }
8
8
  export declare const createPageElasticsearchEntity: (params: Params) => Entity<any>;
9
+ export {};
@@ -1,8 +1,9 @@
1
1
  import { Entity, Table } from "dynamodb-toolbox";
2
2
  import { Attributes } from "../types";
3
- export interface Params {
3
+ interface Params {
4
4
  table: Table;
5
5
  entityName: string;
6
6
  attributes: Attributes;
7
7
  }
8
8
  export declare const createPageElementEntity: (params: Params) => Entity<any>;
9
+ export {};
@@ -1,8 +1,9 @@
1
1
  import { Entity, Table } from "dynamodb-toolbox";
2
2
  import { Attributes } from "../types";
3
- export interface Params {
3
+ interface Params {
4
4
  table: Table;
5
5
  entityName: string;
6
6
  attributes: Attributes;
7
7
  }
8
8
  export declare const createPageEntity: (params: Params) => Entity<any>;
9
+ export {};
@@ -1,8 +1,9 @@
1
1
  import { Entity, Table } from "dynamodb-toolbox";
2
2
  import { Attributes } from "../types";
3
- export interface Params {
3
+ interface Params {
4
4
  table: Table;
5
5
  entityName: string;
6
6
  attributes: Attributes;
7
7
  }
8
8
  export declare const createSettingsEntity: (params: Params) => Entity<any>;
9
+ export {};
@@ -1,8 +1,9 @@
1
1
  import { Entity, Table } from "dynamodb-toolbox";
2
2
  import { Attributes } from "../types";
3
- export interface Params {
3
+ interface Params {
4
4
  table: Table;
5
5
  entityName: string;
6
6
  attributes: Attributes;
7
7
  }
8
8
  export declare const createSystemEntity: (params: Params) => Entity<any>;
9
+ export {};
@@ -1,8 +1,9 @@
1
1
  import { TableModifier } from "../types";
2
2
  import { DocumentClient } from "aws-sdk/clients/dynamodb";
3
3
  import { Table } from "dynamodb-toolbox";
4
- export interface Params {
4
+ interface Params {
5
5
  table?: TableModifier;
6
6
  documentClient: DocumentClient;
7
7
  }
8
8
  export declare const createTable: ({ table, documentClient }: Params) => Table;
9
+ export {};
@@ -1,8 +1,9 @@
1
1
  import { TableModifier } from "../types";
2
2
  import { DocumentClient } from "aws-sdk/clients/dynamodb";
3
3
  import { Table } from "dynamodb-toolbox";
4
- export interface Params {
4
+ interface Params {
5
5
  table?: TableModifier;
6
6
  documentClient: DocumentClient;
7
7
  }
8
8
  export declare const createElasticsearchTable: ({ table, documentClient }: Params) => Table;
9
+ export {};
package/index.js CHANGED
@@ -61,7 +61,7 @@ const createStorageOperations = params => {
61
61
  elasticsearch,
62
62
  table,
63
63
  esTable,
64
- attributes = {},
64
+ attributes,
65
65
  plugins: customPlugins
66
66
  } = params;
67
67
  const tableInstance = (0, _table.createTable)({
@@ -105,37 +105,37 @@ const createStorageOperations = params => {
105
105
  settings: (0, _settingsEntity.createSettingsEntity)({
106
106
  entityName: _types.ENTITIES.SETTINGS,
107
107
  table: tableInstance,
108
- attributes: attributes[_types.ENTITIES.SETTINGS]
108
+ attributes: attributes ? attributes[_types.ENTITIES.SETTINGS] : {}
109
109
  }),
110
110
  system: (0, _systemEntity.createSystemEntity)({
111
111
  entityName: _types.ENTITIES.SYSTEM,
112
112
  table: tableInstance,
113
- attributes: attributes[_types.ENTITIES.SYSTEM]
113
+ attributes: attributes ? attributes[_types.ENTITIES.SYSTEM] : {}
114
114
  }),
115
115
  categories: (0, _categoryEntity.createCategoryEntity)({
116
116
  entityName: _types.ENTITIES.CATEGORIES,
117
117
  table: tableInstance,
118
- attributes: attributes[_types.ENTITIES.CATEGORIES]
118
+ attributes: attributes ? attributes[_types.ENTITIES.CATEGORIES] : {}
119
119
  }),
120
120
  menus: (0, _menuEntity.createMenuEntity)({
121
121
  entityName: _types.ENTITIES.MENUS,
122
122
  table: tableInstance,
123
- attributes: attributes[_types.ENTITIES.MENUS]
123
+ attributes: attributes ? attributes[_types.ENTITIES.MENUS] : {}
124
124
  }),
125
125
  pageElements: (0, _pageElementEntity.createPageElementEntity)({
126
126
  entityName: _types.ENTITIES.PAGE_ELEMENTS,
127
127
  table: tableInstance,
128
- attributes: attributes[_types.ENTITIES.PAGE_ELEMENTS]
128
+ attributes: attributes ? attributes[_types.ENTITIES.PAGE_ELEMENTS] : {}
129
129
  }),
130
130
  pages: (0, _pageEntity.createPageEntity)({
131
131
  entityName: _types.ENTITIES.PAGES,
132
132
  table: tableInstance,
133
- attributes: attributes[_types.ENTITIES.PAGES]
133
+ attributes: attributes ? attributes[_types.ENTITIES.PAGES] : {}
134
134
  }),
135
135
  pagesEs: (0, _pageElasticsearchEntity.createPageElasticsearchEntity)({
136
136
  entityName: _types.ENTITIES.PAGES_ES,
137
137
  table: tableElasticsearchInstance,
138
- attributes: attributes[_types.ENTITIES.PAGES_ES]
138
+ attributes: attributes ? attributes[_types.ENTITIES.PAGES_ES] : {}
139
139
  })
140
140
  };
141
141
  return {
@@ -7,8 +7,6 @@ exports.createSortKey = exports.createPublishedType = exports.createPublishedSor
7
7
 
8
8
  var _utils = require("@webiny/utils");
9
9
 
10
- var _zeroPaddedVersionNumber = require("@webiny/api-page-builder/utils/zeroPaddedVersionNumber");
11
-
12
10
  const createBasePartitionKey = params => {
13
11
  const {
14
12
  tenant,
@@ -27,7 +25,7 @@ const createPartitionKey = params => {
27
25
  exports.createPartitionKey = createPartitionKey;
28
26
 
29
27
  const createSortKey = params => {
30
- return `REV#${(0, _zeroPaddedVersionNumber.getZeroPaddedVersionNumber)(params.version)}`;
28
+ return `REV#${(0, _utils.zeroPad)(params.version)}`;
31
29
  };
32
30
 
33
31
  exports.createSortKey = createSortKey;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-page-builder-so-ddb-es",
3
- "version": "5.23.0",
3
+ "version": "5.24.0-beta.0",
4
4
  "main": "index.js",
5
5
  "keywords": [
6
6
  "@webiny/api-page-builder",
@@ -18,14 +18,14 @@
18
18
  "license": "MIT",
19
19
  "dependencies": {
20
20
  "@babel/runtime": "7.16.7",
21
- "@webiny/api-elasticsearch": "5.23.0",
22
- "@webiny/api-page-builder": "5.23.0",
23
- "@webiny/api-upgrade": "5.23.0",
24
- "@webiny/db-dynamodb": "5.23.0",
25
- "@webiny/error": "5.23.0",
26
- "@webiny/handler-db": "5.23.0",
27
- "@webiny/plugins": "5.23.0",
28
- "@webiny/utils": "5.23.0",
21
+ "@webiny/api-elasticsearch": "5.24.0-beta.0",
22
+ "@webiny/api-page-builder": "5.24.0-beta.0",
23
+ "@webiny/api-upgrade": "5.24.0-beta.0",
24
+ "@webiny/db-dynamodb": "5.24.0-beta.0",
25
+ "@webiny/error": "5.24.0-beta.0",
26
+ "@webiny/handler-db": "5.24.0-beta.0",
27
+ "@webiny/plugins": "5.24.0-beta.0",
28
+ "@webiny/utils": "5.24.0-beta.0",
29
29
  "dataloader": "2.0.0",
30
30
  "dynamodb-toolbox": "0.3.5",
31
31
  "elastic-ts": "0.7.0",
@@ -39,14 +39,14 @@
39
39
  "@elastic/elasticsearch": "7.12.0",
40
40
  "@elastic/elasticsearch-mock": "0.3.0",
41
41
  "@shelf/jest-elasticsearch": "^1.0.0",
42
- "@webiny/api-dynamodb-to-elasticsearch": "^5.23.0",
43
- "@webiny/api-security": "^5.23.0",
44
- "@webiny/api-tenancy": "^5.23.0",
45
- "@webiny/cli": "^5.23.0",
46
- "@webiny/handler": "^5.23.0",
47
- "@webiny/handler-aws": "^5.23.0",
48
- "@webiny/handler-graphql": "^5.23.0",
49
- "@webiny/project-utils": "^5.23.0",
42
+ "@webiny/api-dynamodb-to-elasticsearch": "^5.24.0-beta.0",
43
+ "@webiny/api-security": "^5.24.0-beta.0",
44
+ "@webiny/api-tenancy": "^5.24.0-beta.0",
45
+ "@webiny/cli": "^5.24.0-beta.0",
46
+ "@webiny/handler": "^5.24.0-beta.0",
47
+ "@webiny/handler-aws": "^5.24.0-beta.0",
48
+ "@webiny/handler-graphql": "^5.24.0-beta.0",
49
+ "@webiny/project-utils": "^5.24.0-beta.0",
50
50
  "jest": "^26.6.3",
51
51
  "jest-dynalite": "^3.2.0",
52
52
  "jest-environment-node": "^27.0.6",
@@ -62,5 +62,5 @@
62
62
  "build": "yarn webiny run build",
63
63
  "watch": "yarn webiny run watch"
64
64
  },
65
- "gitHead": "eaa0003e39194d687ab5397c08eeccdb3557fb28"
65
+ "gitHead": "05b90b92bbaf2ef3adf275d008c4641580cf5f42"
66
66
  }