@webiny/api-form-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,9 +1,10 @@
1
1
  export interface ElasticsearchConfigParams {
2
2
  tenant: string;
3
3
  }
4
+ interface ElasticsearchConfig {
5
+ index: string;
6
+ }
4
7
  declare const _default: {
5
- es(params: ElasticsearchConfigParams): {
6
- index: string;
7
- };
8
+ es(params: ElasticsearchConfigParams): ElasticsearchConfig;
8
9
  };
9
10
  export default _default;
@@ -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 createElasticsearchEntity: (params: Params) => Entity<{}>;
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 createFormEntity: (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 createSubmissionEntity: (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,7 +1,8 @@
1
1
  import { DocumentClient } from "aws-sdk/clients/dynamodb";
2
2
  import { Table } from "dynamodb-toolbox";
3
- export interface Params {
3
+ interface Params {
4
4
  tableName: string;
5
5
  documentClient: DocumentClient;
6
6
  }
7
7
  export declare const createTable: (params: Params) => Table;
8
+ export {};
@@ -1,7 +1,8 @@
1
1
  import { Table } from "dynamodb-toolbox";
2
2
  import { DocumentClient } from "aws-sdk/clients/dynamodb";
3
- export interface Params {
3
+ interface Params {
4
4
  documentClient: DocumentClient;
5
5
  tableName?: string;
6
6
  }
7
7
  export declare const createElasticsearchTable: (params: Params) => Table;
8
+ export {};
package/index.js CHANGED
@@ -67,7 +67,7 @@ const isReserved = name => {
67
67
 
68
68
  const createFormBuilderStorageOperations = params => {
69
69
  const {
70
- attributes = {},
70
+ attributes,
71
71
  table: tableName,
72
72
  esTable: esTableName,
73
73
  documentClient,
@@ -117,22 +117,22 @@ const createFormBuilderStorageOperations = params => {
117
117
  form: (0, _form.createFormEntity)({
118
118
  entityName: _types.ENTITIES.FORM,
119
119
  table,
120
- attributes: attributes[_types.ENTITIES.FORM]
120
+ attributes: attributes ? attributes[_types.ENTITIES.FORM] : {}
121
121
  }),
122
122
  submission: (0, _submission.createSubmissionEntity)({
123
123
  entityName: _types.ENTITIES.SUBMISSION,
124
124
  table,
125
- attributes: attributes[_types.ENTITIES.SUBMISSION]
125
+ attributes: attributes ? attributes[_types.ENTITIES.SUBMISSION] : {}
126
126
  }),
127
127
  system: (0, _system.createSystemEntity)({
128
128
  entityName: _types.ENTITIES.SYSTEM,
129
129
  table,
130
- attributes: attributes[_types.ENTITIES.SYSTEM]
130
+ attributes: attributes ? attributes[_types.ENTITIES.SYSTEM] : {}
131
131
  }),
132
132
  settings: (0, _settings.createSettingsEntity)({
133
133
  entityName: _types.ENTITIES.SETTINGS,
134
134
  table,
135
- attributes: attributes[_types.ENTITIES.SETTINGS]
135
+ attributes: attributes ? attributes[_types.ENTITIES.SETTINGS] : {}
136
136
  }),
137
137
 
138
138
  /**
@@ -141,12 +141,12 @@ const createFormBuilderStorageOperations = params => {
141
141
  esForm: (0, _elasticsearch.createElasticsearchEntity)({
142
142
  entityName: _types.ENTITIES.ES_FORM,
143
143
  table: esTable,
144
- attributes: attributes[_types.ENTITIES.ES_FORM]
144
+ attributes: attributes ? attributes[_types.ENTITIES.ES_FORM] : {}
145
145
  }),
146
146
  esSubmission: (0, _elasticsearch.createElasticsearchEntity)({
147
147
  entityName: _types.ENTITIES.ES_SUBMISSION,
148
148
  table: esTable,
149
- attributes: attributes[_types.ENTITIES.ES_SUBMISSION]
149
+ attributes: attributes ? attributes[_types.ENTITIES.ES_SUBMISSION] : {}
150
150
  })
151
151
  };
152
152
  return _objectSpread(_objectSpread(_objectSpread(_objectSpread({
@@ -1,6 +1,7 @@
1
1
  import { Client } from "@elastic/elasticsearch";
2
- export interface Params {
2
+ interface Params {
3
3
  elasticsearch: Client;
4
4
  tenant: string;
5
5
  }
6
6
  export declare const createElasticsearchIndex: (params: Params) => Promise<void>;
7
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-form-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-form-builder",
@@ -23,17 +23,17 @@
23
23
  "dependencies": {
24
24
  "@babel/runtime": "7.16.7",
25
25
  "@elastic/elasticsearch": "7.12.0",
26
- "@webiny/api-elasticsearch": "5.23.0",
27
- "@webiny/api-form-builder": "5.23.0",
28
- "@webiny/api-i18n": "5.23.0",
29
- "@webiny/api-tenancy": "5.23.0",
30
- "@webiny/api-upgrade": "5.23.0",
31
- "@webiny/db-dynamodb": "5.23.0",
32
- "@webiny/error": "5.23.0",
33
- "@webiny/handler": "5.23.0",
34
- "@webiny/handler-aws": "5.23.0",
35
- "@webiny/plugins": "5.23.0",
36
- "@webiny/utils": "5.23.0",
26
+ "@webiny/api-elasticsearch": "5.24.0-beta.0",
27
+ "@webiny/api-form-builder": "5.24.0-beta.0",
28
+ "@webiny/api-i18n": "5.24.0-beta.0",
29
+ "@webiny/api-tenancy": "5.24.0-beta.0",
30
+ "@webiny/api-upgrade": "5.24.0-beta.0",
31
+ "@webiny/db-dynamodb": "5.24.0-beta.0",
32
+ "@webiny/error": "5.24.0-beta.0",
33
+ "@webiny/handler": "5.24.0-beta.0",
34
+ "@webiny/handler-aws": "5.24.0-beta.0",
35
+ "@webiny/plugins": "5.24.0-beta.0",
36
+ "@webiny/utils": "5.24.0-beta.0",
37
37
  "dynamodb-toolbox": "0.3.5",
38
38
  "elastic-ts": "0.7.0"
39
39
  },
@@ -43,10 +43,10 @@
43
43
  "@babel/preset-env": "^7.16.4",
44
44
  "@babel/preset-typescript": "^7.16.0",
45
45
  "@shelf/jest-elasticsearch": "^1.0.0",
46
- "@webiny/api-dynamodb-to-elasticsearch": "^5.23.0",
47
- "@webiny/cli": "^5.23.0",
48
- "@webiny/handler-db": "^5.23.0",
49
- "@webiny/project-utils": "^5.23.0",
46
+ "@webiny/api-dynamodb-to-elasticsearch": "^5.24.0-beta.0",
47
+ "@webiny/cli": "^5.24.0-beta.0",
48
+ "@webiny/handler-db": "^5.24.0-beta.0",
49
+ "@webiny/project-utils": "^5.24.0-beta.0",
50
50
  "csvtojson": "^2.0.10",
51
51
  "jest": "^26.6.3",
52
52
  "jest-dynalite": "^3.2.0",
@@ -63,5 +63,5 @@
63
63
  "build": "yarn webiny run build",
64
64
  "watch": "yarn webiny run watch"
65
65
  },
66
- "gitHead": "eaa0003e39194d687ab5397c08eeccdb3557fb28"
66
+ "gitHead": "05b90b92bbaf2ef3adf275d008c4641580cf5f42"
67
67
  }