@quatrain/core 1.0.0-beta1 → 1.0.0-beta10
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/lib/Auth.d.ts +25 -0
- package/lib/Auth.js +9 -0
- package/lib/Backend.d.ts +34 -1
- package/lib/Backend.js +1 -0
- package/lib/Core.d.ts +8 -8
- package/lib/Core.js +6 -5
- package/lib/authentication/AbstractAuthAdapter.d.ts +18 -0
- package/lib/authentication/AbstractAuthAdapter.js +23 -0
- package/lib/authentication/AuthenticationError.d.ts +2 -0
- package/lib/authentication/AuthenticationError.js +6 -0
- package/lib/authentication/index.d.ts +4 -0
- package/lib/authentication/index.js +7 -0
- package/lib/authentication/middlewares/AbstractAuthMiddleware.d.ts +0 -0
- package/lib/authentication/middlewares/AbstractAuthMiddleware.js +1 -0
- package/lib/authentication/middlewares/AuthMiddleware.d.ts +5 -0
- package/lib/authentication/middlewares/Middleware.d.ts +5 -0
- package/lib/authentication/middlewares/Middleware.js +2 -0
- package/lib/authentication/types/AuthInterface.d.ts +9 -0
- package/lib/authentication/types/AuthInterface.js +2 -0
- package/lib/backends/AbstractAdapter.d.ts +19 -44
- package/lib/backends/AbstractAdapter.js +27 -9
- package/lib/backends/Filters.d.ts +2 -1
- package/lib/backends/MockAdapter.d.ts +6 -4
- package/lib/backends/MockAdapter.js +15 -6
- package/lib/backends/Query.d.ts +27 -12
- package/lib/backends/Query.js +20 -9
- package/lib/backends/index.d.ts +5 -3
- package/lib/backends/index.js +26 -1
- package/lib/backends/middlewares/InjectKeywordsMiddleware.d.ts +9 -0
- package/lib/backends/middlewares/InjectKeywordsMiddleware.js +47 -0
- package/lib/backends/middlewares/InjectMetaMiddleware.d.ts +7 -6
- package/lib/backends/middlewares/InjectMetaMiddleware.js +7 -4
- package/lib/backends/middlewares/Middleware.d.ts +2 -2
- package/lib/backends/middlewares/types/MiddlewareParams.d.ts +3 -0
- package/lib/backends/middlewares/types/MiddlewareParams.js +2 -0
- package/lib/backends/types/BackendInterface.d.ts +13 -0
- package/lib/backends/types/BackendInterface.js +2 -0
- package/lib/backends/types/CollectionHierarchy.d.ts +3 -0
- package/lib/backends/types/CollectionHierarchy.js +6 -0
- package/lib/common/statuses.d.ts +2 -0
- package/lib/common/statuses.js +3 -1
- package/lib/components/AbstractObject.d.ts +3 -1
- package/lib/components/AbstractObject.js +1 -0
- package/lib/components/BaseObject.d.ts +3 -3
- package/lib/components/BaseObject.js +1 -0
- package/lib/components/BaseObjectCore.d.ts +10 -1
- package/lib/components/BaseObjectCore.js +16 -5
- package/lib/components/BaseRepository.d.ts +10 -8
- package/lib/components/BaseRepository.js +28 -13
- package/lib/components/DataObject.d.ts +13 -2
- package/lib/components/DataObject.js +52 -10
- package/lib/components/Entity.d.ts +4 -21
- package/lib/components/Entity.js +34 -32
- package/lib/components/EntityRepository.d.ts +3 -3
- package/lib/components/EntityRepository.js +1 -1
- package/lib/components/ObjectUri.js +1 -2
- package/lib/components/User.d.ts +4 -5
- package/lib/components/User.js +19 -10
- package/lib/components/UserRepository.d.ts +4 -4
- package/lib/components/UserRepository.js +2 -2
- package/lib/components/index.d.ts +2 -2
- package/lib/components/index.js +4 -2
- package/lib/components/types/DataObjectClass.d.ts +6 -1
- package/lib/components/types/RepositoryClass.d.ts +1 -1
- package/lib/components/types/toJSONParams.d.ts +8 -0
- package/lib/components/types/toJSONParams.js +2 -0
- package/lib/index.d.ts +9 -4
- package/lib/index.js +16 -1
- package/lib/properties/ArrayProperty.d.ts +1 -1
- package/lib/properties/ArrayProperty.js +2 -2
- package/lib/properties/BaseProperty.d.ts +4 -1
- package/lib/properties/BaseProperty.js +15 -3
- package/lib/properties/BooleanProperty.d.ts +1 -1
- package/lib/properties/BooleanProperty.js +2 -2
- package/lib/properties/CollectionProperty.d.ts +3 -3
- package/lib/properties/CollectionProperty.js +4 -3
- package/lib/properties/DateTimeProperty.d.ts +1 -1
- package/lib/properties/DateTimeProperty.js +2 -2
- package/lib/properties/EnumProperty.d.ts +1 -1
- package/lib/properties/EnumProperty.js +2 -2
- package/lib/properties/HashProperty.d.ts +7 -1
- package/lib/properties/HashProperty.js +10 -2
- package/lib/properties/MapProperty.d.ts +1 -1
- package/lib/properties/MapProperty.js +2 -2
- package/lib/properties/NumberProperty.d.ts +1 -1
- package/lib/properties/NumberProperty.js +2 -2
- package/lib/properties/ObjectProperty.d.ts +1 -1
- package/lib/properties/ObjectProperty.js +5 -6
- package/lib/properties/StringProperty.d.ts +1 -1
- package/lib/properties/StringProperty.js +2 -2
- package/lib/properties/types/AbstractPropertyType.d.ts +1 -0
- package/lib/properties/types/PropertyClassType.d.ts +4 -1
- package/lib/utils/DataGenerator.d.ts +2 -3
- package/lib/utils/DataGenerator.js +2 -1
- package/lib/wrappers/cloud/AbstractCloudWrapper.d.ts +4 -0
- package/lib/wrappers/cloud/AbstractCloudWrapper.js +9 -0
- package/package.json +2 -2
- package/README.md +0 -124
- package/lib/components/BaseObjectProperties.d.ts +0 -13
- package/lib/components/BaseObjectProperties.js +0 -87
- package/lib/components/EntityProperties.d.ts +0 -1
- package/lib/components/EntityProperties.js +0 -54
- package/lib/components/UserProperties.d.ts +0 -1
- package/lib/components/UserProperties.js +0 -103
- package/lib/components/types/UserClass.d.ts +0 -3
- /package/lib/{components/types/UserClass.js → authentication/middlewares/AuthMiddleware.js} +0 -0
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.EntityProperties = void 0;
|
|
27
|
-
const CollectionProperty_1 = require("../properties/CollectionProperty");
|
|
28
|
-
const StringProperty_1 = require("../properties/StringProperty");
|
|
29
|
-
const htmlType = __importStar(require("../properties/types/PropertyHTMLType"));
|
|
30
|
-
const User_1 = require("./User");
|
|
31
|
-
exports.EntityProperties = [
|
|
32
|
-
{
|
|
33
|
-
// surcharge property minLength and htmlType
|
|
34
|
-
name: 'name',
|
|
35
|
-
type: StringProperty_1.StringProperty.TYPE,
|
|
36
|
-
mandatory: true,
|
|
37
|
-
minLength: 1,
|
|
38
|
-
htmlType: htmlType.ORG,
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: 'bogus',
|
|
42
|
-
type: StringProperty_1.StringProperty.TYPE,
|
|
43
|
-
mandatory: true,
|
|
44
|
-
minLength: 1,
|
|
45
|
-
htmlType: htmlType.ORG,
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
name: 'users',
|
|
49
|
-
mandatory: true,
|
|
50
|
-
type: CollectionProperty_1.CollectionProperty.TYPE,
|
|
51
|
-
instanceOf: User_1.User,
|
|
52
|
-
parentKey: 'entity',
|
|
53
|
-
},
|
|
54
|
-
];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const UserProperties: any;
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.UserProperties = void 0;
|
|
27
|
-
const properties_1 = require("../properties");
|
|
28
|
-
const HashProperty_1 = require("../properties/HashProperty");
|
|
29
|
-
const StringProperty_1 = require("../properties/StringProperty");
|
|
30
|
-
const Entity_1 = require("./Entity");
|
|
31
|
-
const htmlType = __importStar(require("../properties/types/PropertyHTMLType"));
|
|
32
|
-
/**
|
|
33
|
-
* Callback function to populate the 'name' property
|
|
34
|
-
* @param dao DataObject
|
|
35
|
-
* @returns
|
|
36
|
-
*/
|
|
37
|
-
const onChange = (dao) => dao.set('name', `${dao.val('firstname')} ${dao.val('lastname')}`);
|
|
38
|
-
exports.UserProperties = [
|
|
39
|
-
{
|
|
40
|
-
// change name property minLength
|
|
41
|
-
name: 'name',
|
|
42
|
-
type: StringProperty_1.StringProperty.TYPE,
|
|
43
|
-
minLength: 0,
|
|
44
|
-
fullSearch: true,
|
|
45
|
-
htmlType: htmlType.NAME,
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
name: 'firstname',
|
|
49
|
-
mandatory: true,
|
|
50
|
-
type: StringProperty_1.StringProperty.TYPE,
|
|
51
|
-
minLength: 1,
|
|
52
|
-
maxLength: 100,
|
|
53
|
-
htmlType: htmlType.GIVEN_NAME,
|
|
54
|
-
onChange,
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: 'lastname',
|
|
58
|
-
mandatory: true,
|
|
59
|
-
type: StringProperty_1.StringProperty.TYPE,
|
|
60
|
-
minLength: 1,
|
|
61
|
-
maxLength: 100,
|
|
62
|
-
htmlType: htmlType.FAMILY_NAME,
|
|
63
|
-
onChange,
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
name: 'gender',
|
|
67
|
-
mandatory: false,
|
|
68
|
-
type: properties_1.EnumProperty.TYPE,
|
|
69
|
-
values: ['male', 'female', 'nonbinary'],
|
|
70
|
-
htmlType: htmlType.GENDER,
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
name: 'birthday',
|
|
74
|
-
mandatory: false,
|
|
75
|
-
type: properties_1.DateTimeProperty.TYPE,
|
|
76
|
-
htmlType: htmlType.BIRTHDAY,
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
name: 'email',
|
|
80
|
-
mandatory: true,
|
|
81
|
-
type: StringProperty_1.StringProperty.TYPE,
|
|
82
|
-
minLength: 1,
|
|
83
|
-
maxLength: 100,
|
|
84
|
-
fullSearch: true,
|
|
85
|
-
htmlType: htmlType.EMAIL,
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
name: 'password',
|
|
89
|
-
mandatory: true,
|
|
90
|
-
type: HashProperty_1.HashProperty.TYPE,
|
|
91
|
-
algorithm: HashProperty_1.HashProperty.ALGORITHM_SHA256,
|
|
92
|
-
salt: '',
|
|
93
|
-
minLength: 5,
|
|
94
|
-
maxLength: 20,
|
|
95
|
-
htmlType: htmlType.PASSWORD,
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
name: 'entity',
|
|
99
|
-
mandatory: false,
|
|
100
|
-
type: properties_1.ObjectProperty.TYPE,
|
|
101
|
-
instanceof: Entity_1.Entity,
|
|
102
|
-
},
|
|
103
|
-
];
|
|
File without changes
|