remult 0.14.2 → 0.14.5
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/assign.js +1 -5
- package/classType.js +1 -2
- package/graphql.js +84 -146
- package/index.d.ts +13 -0
- package/index.js +25 -55
- package/inputTypes.js +9 -16
- package/package.json +6 -1
- package/postgres/index.js +1 -4
- package/postgres/postgres-data-provider.js +165 -364
- package/postgres/postgresColumnSyntax.js +4 -8
- package/remult-express.js +6 -10
- package/remult-knex/index.js +300 -720
- package/remult-middleware.js +24 -30
- package/remult-mongo.js +172 -406
- package/server/JsonEntityFileStorage.js +10 -15
- package/server/expressBridge.js +383 -569
- package/server/index.js +4 -11
- package/server/register-actions-on-server.js +12 -38
- package/server/register-entities-on-server.js +9 -13
- package/src/__EntityValueProvider.js +1 -2
- package/src/__RowsOfDataForTesting.js +1 -2
- package/src/backend-tests/backend-database-test-setup.backend-spec.js +72 -190
- package/src/backend-tests/my-test.backend-spec.js +45 -114
- package/src/column-interfaces.js +2 -6
- package/src/column.js +71 -113
- package/src/context.js +174 -330
- package/src/data-api.js +162 -326
- package/src/data-interfaces.js +7 -11
- package/src/data-providers/array-entity-data-provider.js +171 -286
- package/src/data-providers/in-memory-database.js +12 -27
- package/src/data-providers/json-data-provider.js +41 -77
- package/src/data-providers/rest-data-provider.js +102 -189
- package/src/data-providers/sql-database.js +223 -403
- package/src/data-providers/web-sql-data-provider.js +78 -139
- package/src/entity.js +1 -2
- package/src/filter/filter-consumer-bridge-to-sql-request.js +106 -248
- package/src/filter/filter-consumer-bridge-to-url-builder.js +1 -2
- package/src/filter/filter-interfaces.js +277 -440
- package/src/id-entity.js +8 -17
- package/src/remult3/RepositoryImplementation.js +1191 -2367
- package/src/remult3/index.js +2 -5
- package/src/remult3/remult3.js +1 -2
- package/src/server-action.js +294 -528
- package/src/shared-tests/db-tests-setup.js +49 -153
- package/src/shared-tests/db-tests.db-tests.js +660 -1566
- package/src/shared-tests/deleteAll.js +3 -20
- package/src/shared-tests/entityWithValidations.js +52 -79
- package/src/shared-tests/index.js +4 -6
- package/src/shared-tests/test-custom-id-column.spec.js +37 -85
- package/src/shared-tests/test-special-value.spec.js +64 -104
- package/src/shared-tests/test-update-with-null.spec.js +28 -49
- package/src/sort.js +38 -95
- package/src/sql-command.js +1 -2
- package/src/tests/Done.js +7 -13
- package/src/tests/TestDataApiResponse.js +15 -22
- package/src/tests/c.js +21 -27
- package/src/tests/createData.js +20 -48
- package/src/tests/d.js +19 -27
- package/src/tests/dWithPrefilter.js +31 -44
- package/src/tests/entityForCustomFilter.js +42 -66
- package/src/tests/entityWithValidationsOnColumn.js +21 -29
- package/src/tests/frontend-database-tests-setup.spec.js +35 -98
- package/src/tests/h.js +35 -44
- package/src/tests/remult-3-entities.js +71 -80
- package/src/tests/tasks.js +23 -29
- package/src/tests/testHelper.spec.js +170 -322
- package/src/tests/testModel/models.js +25 -33
- package/src/validators.js +32 -59
- package/urlBuilder.js +8 -14
- package/valueConverters.js +161 -160
|
@@ -1,29 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
tslib_1.__metadata("design:type", String)
|
|
23
|
-
], entityWithValidationsOnColumn.prototype, "name", void 0);
|
|
24
|
-
entityWithValidationsOnColumn = tslib_1.__decorate([
|
|
25
|
-
remult3_1.Entity('', { allowApiCrud: true })
|
|
26
|
-
], entityWithValidationsOnColumn);
|
|
27
|
-
return entityWithValidationsOnColumn;
|
|
28
|
-
}(remult3_1.EntityBase));
|
|
29
|
-
exports.entityWithValidationsOnColumn = entityWithValidationsOnColumn;
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { Entity, EntityBase, Fields } from '../remult3';
|
|
3
|
+
let entityWithValidationsOnColumn = class entityWithValidationsOnColumn extends EntityBase {
|
|
4
|
+
};
|
|
5
|
+
__decorate([
|
|
6
|
+
Fields.integer(),
|
|
7
|
+
__metadata("design:type", Number)
|
|
8
|
+
], entityWithValidationsOnColumn.prototype, "myId", void 0);
|
|
9
|
+
__decorate([
|
|
10
|
+
Fields.string({
|
|
11
|
+
validate: (t, c) => {
|
|
12
|
+
if (!t.name || t.name.length < 3)
|
|
13
|
+
c.error = 'invalid on column';
|
|
14
|
+
}
|
|
15
|
+
}),
|
|
16
|
+
__metadata("design:type", String)
|
|
17
|
+
], entityWithValidationsOnColumn.prototype, "name", void 0);
|
|
18
|
+
entityWithValidationsOnColumn = __decorate([
|
|
19
|
+
Entity('', { allowApiCrud: true })
|
|
20
|
+
], entityWithValidationsOnColumn);
|
|
21
|
+
export { entityWithValidationsOnColumn };
|
|
@@ -1,101 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
switch (_e.label) {
|
|
20
|
-
case 0:
|
|
21
|
-
webSql = new web_sql_data_provider_1.WebSqlDataProvider('test');
|
|
22
|
-
sql = new sql_database_1.SqlDatabase(webSql);
|
|
23
|
-
_e.label = 1;
|
|
24
|
-
case 1:
|
|
25
|
-
_e.trys.push([1, 11, 12, 13]);
|
|
26
|
-
return [4 /*yield*/, sql.execute("select name from sqlite_master where type='table'")];
|
|
27
|
-
case 2: return [4 /*yield*/, (_e.sent()).rows];
|
|
28
|
-
case 3:
|
|
29
|
-
_a = tslib_1.__values.apply(void 0, [_e.sent()]), _b = _a.next();
|
|
30
|
-
_e.label = 4;
|
|
31
|
-
case 4:
|
|
32
|
-
if (!!_b.done) return [3 /*break*/, 10];
|
|
33
|
-
r = _b.value;
|
|
34
|
-
_c = r.name;
|
|
35
|
-
switch (_c) {
|
|
36
|
-
case "__WebKitDatabaseInfoTable__": return [3 /*break*/, 5];
|
|
37
|
-
case "sqlite_sequence": return [3 /*break*/, 6];
|
|
38
|
-
}
|
|
39
|
-
return [3 /*break*/, 7];
|
|
40
|
-
case 5: return [3 /*break*/, 9];
|
|
41
|
-
case 6: return [3 /*break*/, 9];
|
|
42
|
-
case 7: return [4 /*yield*/, sql.execute("drop table if exists " + r.name)];
|
|
43
|
-
case 8:
|
|
44
|
-
_e.sent();
|
|
45
|
-
_e.label = 9;
|
|
46
|
-
case 9:
|
|
47
|
-
_b = _a.next();
|
|
48
|
-
return [3 /*break*/, 4];
|
|
49
|
-
case 10: return [3 /*break*/, 13];
|
|
50
|
-
case 11:
|
|
51
|
-
e_1_1 = _e.sent();
|
|
52
|
-
e_1 = { error: e_1_1 };
|
|
53
|
-
return [3 /*break*/, 13];
|
|
54
|
-
case 12:
|
|
55
|
-
try {
|
|
56
|
-
if (_b && !_b.done && (_d = _a.return)) _d.call(_a);
|
|
57
|
-
}
|
|
58
|
-
finally { if (e_1) throw e_1.error; }
|
|
59
|
-
return [7 /*endfinally*/];
|
|
60
|
-
case 13:
|
|
61
|
-
remult = new context_1.Remult();
|
|
62
|
-
remult.setDataProvider(sql);
|
|
63
|
-
return [4 /*yield*/, what({ db: sql, remult: remult, createEntity: function (x) { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
|
|
64
|
-
return [2 /*return*/, remult.repo(x)];
|
|
65
|
-
}); }); } })];
|
|
66
|
-
case 14:
|
|
67
|
-
_e.sent();
|
|
68
|
-
return [2 /*return*/];
|
|
1
|
+
import { addDatabaseToTest, itWithFocus } from "../shared-tests/db-tests-setup";
|
|
2
|
+
import { InMemoryDataProvider } from "../..";
|
|
3
|
+
import { Remult } from "../context";
|
|
4
|
+
import { SqlDatabase } from "../data-providers/sql-database";
|
|
5
|
+
import { WebSqlDataProvider } from "../data-providers/web-sql-data-provider";
|
|
6
|
+
import { MockRestDataProvider } from "./testHelper.spec";
|
|
7
|
+
export function testWebSqlImpl(key, what, focus = false) {
|
|
8
|
+
itWithFocus(key + " - WebSql", async () => {
|
|
9
|
+
let webSql = new WebSqlDataProvider('test');
|
|
10
|
+
const sql = new SqlDatabase(webSql);
|
|
11
|
+
for (const r of await (await sql.execute("select name from sqlite_master where type='table'")).rows) {
|
|
12
|
+
switch (r.name) {
|
|
13
|
+
case "__WebKitDatabaseInfoTable__":
|
|
14
|
+
break;
|
|
15
|
+
case "sqlite_sequence":
|
|
16
|
+
break;
|
|
17
|
+
default:
|
|
18
|
+
await sql.execute("drop table if exists " + r.name);
|
|
69
19
|
}
|
|
70
|
-
}
|
|
71
|
-
|
|
20
|
+
}
|
|
21
|
+
let remult = new Remult();
|
|
22
|
+
remult.setDataProvider(sql);
|
|
23
|
+
await what({ db: sql, remult, createEntity: async (x) => remult.repo(x) });
|
|
24
|
+
}, focus);
|
|
72
25
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
case 0:
|
|
84
|
-
r = new context_1.Remult();
|
|
85
|
-
r.setDataProvider(new __1.InMemoryDataProvider());
|
|
86
|
-
remult = new context_1.Remult();
|
|
87
|
-
db = new testHelper_spec_1.MockRestDataProvider(r);
|
|
88
|
-
remult.setDataProvider(db);
|
|
89
|
-
return [4 /*yield*/, what({ db: db, remult: remult, createEntity: function (x) { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
|
|
90
|
-
return [2 /*return*/, remult.repo(x)];
|
|
91
|
-
}); }); } })];
|
|
92
|
-
case 1:
|
|
93
|
-
_a.sent();
|
|
94
|
-
return [2 /*return*/];
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}); }, focus);
|
|
26
|
+
addDatabaseToTest(testWebSqlImpl);
|
|
27
|
+
export function testRest(key, what, focus = false) {
|
|
28
|
+
itWithFocus(key + " - Rest Provider", async () => {
|
|
29
|
+
let r = new Remult();
|
|
30
|
+
r.setDataProvider(new InMemoryDataProvider());
|
|
31
|
+
let remult = new Remult();
|
|
32
|
+
let db = new MockRestDataProvider(r);
|
|
33
|
+
remult.setDataProvider(db);
|
|
34
|
+
await what({ db, remult, createEntity: async (x) => remult.repo(x) });
|
|
35
|
+
}, focus);
|
|
98
36
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
require("../shared-tests/");
|
|
37
|
+
addDatabaseToTest(testRest);
|
|
38
|
+
import '../shared-tests/';
|
package/src/tests/h.js
CHANGED
|
@@ -1,44 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
h
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
else
|
|
37
|
-
self.refHId = '';
|
|
38
|
-
},
|
|
39
|
-
allowApiCrud: true
|
|
40
|
-
})
|
|
41
|
-
], h);
|
|
42
|
-
return h;
|
|
43
|
-
}(remult3_1.EntityBase));
|
|
44
|
-
exports.h = h;
|
|
1
|
+
var h_1;
|
|
2
|
+
import { __decorate, __metadata } from "tslib";
|
|
3
|
+
import { Field, Entity, EntityBase, FieldType, Fields } from '../remult3';
|
|
4
|
+
let h = h_1 = class h extends EntityBase {
|
|
5
|
+
};
|
|
6
|
+
__decorate([
|
|
7
|
+
Fields.string(),
|
|
8
|
+
__metadata("design:type", String)
|
|
9
|
+
], h.prototype, "id", void 0);
|
|
10
|
+
__decorate([
|
|
11
|
+
Field(() => h_1),
|
|
12
|
+
__metadata("design:type", h)
|
|
13
|
+
], h.prototype, "refH", void 0);
|
|
14
|
+
__decorate([
|
|
15
|
+
Fields.string(),
|
|
16
|
+
__metadata("design:type", String)
|
|
17
|
+
], h.prototype, "refHId", void 0);
|
|
18
|
+
h = h_1 = __decorate([
|
|
19
|
+
FieldType({
|
|
20
|
+
valueConverter: {
|
|
21
|
+
toJson: x => x != undefined ? x : '',
|
|
22
|
+
fromJson: x => x ? x : null
|
|
23
|
+
},
|
|
24
|
+
}),
|
|
25
|
+
Entity('h', {
|
|
26
|
+
saving: self => {
|
|
27
|
+
if (self.refH)
|
|
28
|
+
self.refHId = self.refH.id;
|
|
29
|
+
else
|
|
30
|
+
self.refHId = '';
|
|
31
|
+
},
|
|
32
|
+
allowApiCrud: true
|
|
33
|
+
})
|
|
34
|
+
], h);
|
|
35
|
+
export { h };
|
|
@@ -1,81 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { EntityBase, Field, Entity, Fields } from "../remult3";
|
|
3
|
+
import { Status } from "./testModel/models";
|
|
4
|
+
let Products = class Products {
|
|
5
|
+
};
|
|
6
|
+
__decorate([
|
|
7
|
+
Fields.integer(),
|
|
8
|
+
__metadata("design:type", Number)
|
|
9
|
+
], Products.prototype, "id", void 0);
|
|
10
|
+
__decorate([
|
|
11
|
+
Fields.string(),
|
|
12
|
+
__metadata("design:type", String)
|
|
13
|
+
], Products.prototype, "name", void 0);
|
|
14
|
+
__decorate([
|
|
15
|
+
Fields.number(),
|
|
16
|
+
__metadata("design:type", Number)
|
|
17
|
+
], Products.prototype, "price", void 0);
|
|
18
|
+
__decorate([
|
|
19
|
+
Fields.boolean(),
|
|
20
|
+
__metadata("design:type", Boolean)
|
|
21
|
+
], Products.prototype, "archived", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
Fields.date(),
|
|
24
|
+
__metadata("design:type", Date)
|
|
25
|
+
], Products.prototype, "availableFrom", void 0);
|
|
26
|
+
Products = __decorate([
|
|
27
|
+
Entity('Products')
|
|
28
|
+
], Products);
|
|
29
|
+
export { Products };
|
|
30
|
+
let r;
|
|
31
|
+
let Categories = class Categories extends EntityBase {
|
|
32
|
+
constructor() {
|
|
33
|
+
super(...arguments);
|
|
34
|
+
this.id = 0;
|
|
9
35
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}),
|
|
48
|
-
tslib_1.__metadata("design:type", Number)
|
|
49
|
-
], Categories.prototype, "id", void 0);
|
|
50
|
-
tslib_1.__decorate([
|
|
51
|
-
remult3_1.Fields.string({ allowNull: true }),
|
|
52
|
-
tslib_1.__metadata("design:type", String)
|
|
53
|
-
], Categories.prototype, "categoryName", void 0);
|
|
54
|
-
tslib_1.__decorate([
|
|
55
|
-
remult3_1.Fields.string(),
|
|
56
|
-
tslib_1.__metadata("design:type", String)
|
|
57
|
-
], Categories.prototype, "description", void 0);
|
|
58
|
-
tslib_1.__decorate([
|
|
59
|
-
remult3_1.Fields.number({
|
|
60
|
-
serverExpression: function (c) { return c.categoryName ? c.categoryName.length : undefined; }
|
|
61
|
-
}),
|
|
62
|
-
tslib_1.__metadata("design:type", Number)
|
|
63
|
-
], Categories.prototype, "categoryNameLength", void 0);
|
|
64
|
-
tslib_1.__decorate([
|
|
65
|
-
remult3_1.Fields.number({
|
|
66
|
-
serverExpression: function (c) { return Promise.resolve(c.categoryName ? c.categoryName.length : undefined); }
|
|
67
|
-
}),
|
|
68
|
-
tslib_1.__metadata("design:type", Number)
|
|
69
|
-
], Categories.prototype, "categoryNameLengthAsync", void 0);
|
|
70
|
-
tslib_1.__decorate([
|
|
71
|
-
remult3_1.Field(function () { return models_1.Status; }),
|
|
72
|
-
tslib_1.__metadata("design:type", models_1.Status)
|
|
73
|
-
], Categories.prototype, "status", void 0);
|
|
74
|
-
Categories = tslib_1.__decorate([
|
|
75
|
-
remult3_1.Entity('Categories', {
|
|
76
|
-
allowApiCrud: true
|
|
77
|
-
})
|
|
78
|
-
], Categories);
|
|
79
|
-
return Categories;
|
|
80
|
-
}(remult3_1.EntityBase));
|
|
81
|
-
exports.Categories = Categories;
|
|
36
|
+
};
|
|
37
|
+
__decorate([
|
|
38
|
+
Fields.number({
|
|
39
|
+
dbName: 'CategoryID'
|
|
40
|
+
}),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], Categories.prototype, "id", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
Fields.string({ allowNull: true }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], Categories.prototype, "categoryName", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
Fields.string(),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], Categories.prototype, "description", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
Fields.number({
|
|
53
|
+
serverExpression: c => c.categoryName ? c.categoryName.length : undefined
|
|
54
|
+
}),
|
|
55
|
+
__metadata("design:type", Number)
|
|
56
|
+
], Categories.prototype, "categoryNameLength", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
Fields.number({
|
|
59
|
+
serverExpression: (c) => Promise.resolve(c.categoryName ? c.categoryName.length : undefined)
|
|
60
|
+
}),
|
|
61
|
+
__metadata("design:type", Number)
|
|
62
|
+
], Categories.prototype, "categoryNameLengthAsync", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
Field(() => Status),
|
|
65
|
+
__metadata("design:type", Status)
|
|
66
|
+
], Categories.prototype, "status", void 0);
|
|
67
|
+
Categories = __decorate([
|
|
68
|
+
Entity('Categories', {
|
|
69
|
+
allowApiCrud: true
|
|
70
|
+
})
|
|
71
|
+
], Categories);
|
|
72
|
+
export { Categories };
|
package/src/tests/tasks.js
CHANGED
|
@@ -1,30 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
tslib_1.__extends(tasks, _super);
|
|
8
|
-
function tasks() {
|
|
9
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
10
|
-
_this.completed = false;
|
|
11
|
-
return _this;
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { Entity, EntityBase, Fields } from '../remult3';
|
|
3
|
+
let tasks = class tasks extends EntityBase {
|
|
4
|
+
constructor() {
|
|
5
|
+
super(...arguments);
|
|
6
|
+
this.completed = false;
|
|
12
7
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
exports.tasks = tasks;
|
|
8
|
+
};
|
|
9
|
+
__decorate([
|
|
10
|
+
Fields.integer(),
|
|
11
|
+
__metadata("design:type", Number)
|
|
12
|
+
], tasks.prototype, "id", void 0);
|
|
13
|
+
__decorate([
|
|
14
|
+
Fields.string(),
|
|
15
|
+
__metadata("design:type", String)
|
|
16
|
+
], tasks.prototype, "name", void 0);
|
|
17
|
+
__decorate([
|
|
18
|
+
Fields.boolean(),
|
|
19
|
+
__metadata("design:type", Boolean)
|
|
20
|
+
], tasks.prototype, "completed", void 0);
|
|
21
|
+
tasks = __decorate([
|
|
22
|
+
Entity('tasks', { allowApiCrud: true })
|
|
23
|
+
], tasks);
|
|
24
|
+
export { tasks };
|