@webiny/api-form-builder-so-ddb 5.23.1-beta.0 → 5.24.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.
- package/definitions/form.d.ts +2 -1
- package/definitions/settings.d.ts +2 -1
- package/definitions/submission.d.ts +2 -1
- package/definitions/system.d.ts +2 -1
- package/definitions/table.d.ts +2 -1
- package/index.js +5 -5
- package/operations/form/index.js +1 -1
- package/operations/submission/index.js +1 -1
- package/package.json +10 -10
package/definitions/form.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Entity, Table } from "dynamodb-toolbox";
|
|
2
2
|
import { Attributes } from "../types";
|
|
3
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 {};
|
package/definitions/system.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Entity, Table } from "dynamodb-toolbox";
|
|
2
2
|
import { Attributes } from "../types";
|
|
3
|
-
|
|
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 {};
|
package/definitions/table.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DocumentClient } from "aws-sdk/clients/dynamodb";
|
|
2
2
|
import { Table } from "dynamodb-toolbox";
|
|
3
|
-
|
|
3
|
+
interface Params {
|
|
4
4
|
tableName: string;
|
|
5
5
|
documentClient: DocumentClient;
|
|
6
6
|
}
|
|
7
7
|
export declare const createTable: (params: Params) => Table;
|
|
8
|
+
export {};
|
package/index.js
CHANGED
|
@@ -57,7 +57,7 @@ const isReserved = name => {
|
|
|
57
57
|
|
|
58
58
|
const createFormBuilderStorageOperations = params => {
|
|
59
59
|
const {
|
|
60
|
-
attributes
|
|
60
|
+
attributes,
|
|
61
61
|
table: tableName,
|
|
62
62
|
documentClient,
|
|
63
63
|
plugins: pluginsInput
|
|
@@ -97,22 +97,22 @@ const createFormBuilderStorageOperations = params => {
|
|
|
97
97
|
form: (0, _form.createFormEntity)({
|
|
98
98
|
entityName: _types.ENTITIES.FORM,
|
|
99
99
|
table,
|
|
100
|
-
attributes: attributes[_types.ENTITIES.FORM]
|
|
100
|
+
attributes: attributes ? attributes[_types.ENTITIES.FORM] : {}
|
|
101
101
|
}),
|
|
102
102
|
submission: (0, _submission.createSubmissionEntity)({
|
|
103
103
|
entityName: _types.ENTITIES.SUBMISSION,
|
|
104
104
|
table,
|
|
105
|
-
attributes: attributes[_types.ENTITIES.SUBMISSION]
|
|
105
|
+
attributes: attributes ? attributes[_types.ENTITIES.SUBMISSION] : {}
|
|
106
106
|
}),
|
|
107
107
|
system: (0, _system.createSystemEntity)({
|
|
108
108
|
entityName: _types.ENTITIES.SYSTEM,
|
|
109
109
|
table,
|
|
110
|
-
attributes: attributes[_types.ENTITIES.SYSTEM]
|
|
110
|
+
attributes: attributes ? attributes[_types.ENTITIES.SYSTEM] : {}
|
|
111
111
|
}),
|
|
112
112
|
settings: (0, _settings.createSettingsEntity)({
|
|
113
113
|
entityName: _types.ENTITIES.SETTINGS,
|
|
114
114
|
table,
|
|
115
|
-
attributes: attributes[_types.ENTITIES.SETTINGS]
|
|
115
|
+
attributes: attributes ? attributes[_types.ENTITIES.SETTINGS] : {}
|
|
116
116
|
})
|
|
117
117
|
};
|
|
118
118
|
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
package/operations/form/index.js
CHANGED
|
@@ -353,7 +353,7 @@ const createFormStorageOperations = params => {
|
|
|
353
353
|
sort,
|
|
354
354
|
fields: formDynamoDbFields
|
|
355
355
|
});
|
|
356
|
-
const start = (0, _cursor.decodeCursor)(after) || 0;
|
|
356
|
+
const start = parseInt((0, _cursor.decodeCursor)(after)) || 0;
|
|
357
357
|
const hasMoreItems = totalCount > start + limit;
|
|
358
358
|
const end = limit > totalCount + start + limit ? undefined : start + limit;
|
|
359
359
|
const items = sortedItems.slice(start, end);
|
|
@@ -189,7 +189,7 @@ const createSubmissionStorageOperations = params => {
|
|
|
189
189
|
fields
|
|
190
190
|
});
|
|
191
191
|
const totalCount = sortedSubmissions.length;
|
|
192
|
-
const start = (0, _cursor.decodeCursor)(after) || 0;
|
|
192
|
+
const start = parseInt((0, _cursor.decodeCursor)(after)) || 0;
|
|
193
193
|
const hasMoreItems = totalCount > start + limit;
|
|
194
194
|
const end = limit > totalCount + start + limit ? undefined : start + limit;
|
|
195
195
|
const items = sortedSubmissions.slice(start, end);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-form-builder-so-ddb",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.24.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"@webiny/api-form-builder",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@babel/runtime": "7.16.7",
|
|
24
|
-
"@webiny/api-form-builder": "5.
|
|
25
|
-
"@webiny/db-dynamodb": "5.
|
|
26
|
-
"@webiny/error": "5.
|
|
27
|
-
"@webiny/plugins": "5.
|
|
28
|
-
"@webiny/utils": "5.
|
|
24
|
+
"@webiny/api-form-builder": "5.24.0",
|
|
25
|
+
"@webiny/db-dynamodb": "5.24.0",
|
|
26
|
+
"@webiny/error": "5.24.0",
|
|
27
|
+
"@webiny/plugins": "5.24.0",
|
|
28
|
+
"@webiny/utils": "5.24.0",
|
|
29
29
|
"dynamodb-toolbox": "0.3.5"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"@babel/core": "^7.16.0",
|
|
34
34
|
"@babel/preset-env": "^7.16.4",
|
|
35
35
|
"@babel/preset-typescript": "^7.16.0",
|
|
36
|
-
"@webiny/cli": "^5.
|
|
37
|
-
"@webiny/handler-db": "^5.
|
|
38
|
-
"@webiny/project-utils": "^5.
|
|
36
|
+
"@webiny/cli": "^5.24.0",
|
|
37
|
+
"@webiny/handler-db": "^5.24.0",
|
|
38
|
+
"@webiny/project-utils": "^5.24.0",
|
|
39
39
|
"csvtojson": "^2.0.10",
|
|
40
40
|
"jest": "^26.6.3",
|
|
41
41
|
"jest-dynalite": "^3.2.0",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"build": "yarn webiny run build",
|
|
53
53
|
"watch": "yarn webiny run watch"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "be0cbfcaa9247c658c44179af7943cc5d6d71bc7"
|
|
56
56
|
}
|