@chevre/domain 23.1.0-alpha.7 → 23.1.0-alpha.8
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.
|
@@ -30,7 +30,7 @@ class MemberRepo {
|
|
|
30
30
|
}
|
|
31
31
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
32
32
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
33
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
33
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
|
|
34
34
|
const andConditions = [];
|
|
35
35
|
const idEq = (_a = params.id) === null || _a === void 0 ? void 0 : _a.$eq;
|
|
36
36
|
if (typeof idEq === 'string') {
|
|
@@ -64,7 +64,11 @@ class MemberRepo {
|
|
|
64
64
|
if (Array.isArray(memberIdIn)) {
|
|
65
65
|
andConditions.push({ 'member.id': { $in: memberIdIn } });
|
|
66
66
|
}
|
|
67
|
-
const
|
|
67
|
+
const memberIdentifierEq = (_u = (_t = params.member) === null || _t === void 0 ? void 0 : _t.identifier) === null || _u === void 0 ? void 0 : _u.$eq;
|
|
68
|
+
if (typeof memberIdentifierEq === 'string') {
|
|
69
|
+
andConditions.push({ 'member.identifier': { $exists: true, $eq: memberIdentifierEq } });
|
|
70
|
+
}
|
|
71
|
+
const memberNameRegex = (_w = (_v = params.member) === null || _v === void 0 ? void 0 : _v.name) === null || _w === void 0 ? void 0 : _w.$regex;
|
|
68
72
|
if (typeof memberNameRegex === 'string' && memberNameRegex.length > 0) {
|
|
69
73
|
andConditions.push({
|
|
70
74
|
'member.name': {
|
|
@@ -73,7 +77,7 @@ class MemberRepo {
|
|
|
73
77
|
}
|
|
74
78
|
});
|
|
75
79
|
}
|
|
76
|
-
const memberHasRoleRoleNameEq = (
|
|
80
|
+
const memberHasRoleRoleNameEq = (_z = (_y = (_x = params.member) === null || _x === void 0 ? void 0 : _x.hasRole) === null || _y === void 0 ? void 0 : _y.roleName) === null || _z === void 0 ? void 0 : _z.$eq;
|
|
77
81
|
if (typeof memberHasRoleRoleNameEq === 'string') {
|
|
78
82
|
andConditions.push({
|
|
79
83
|
'member.hasRole.roleName': {
|
|
@@ -82,7 +86,7 @@ class MemberRepo {
|
|
|
82
86
|
}
|
|
83
87
|
});
|
|
84
88
|
}
|
|
85
|
-
const memberHasRoleRoleNameIn = (
|
|
89
|
+
const memberHasRoleRoleNameIn = (_2 = (_1 = (_0 = params.member) === null || _0 === void 0 ? void 0 : _0.hasRole) === null || _1 === void 0 ? void 0 : _1.roleName) === null || _2 === void 0 ? void 0 : _2.$in;
|
|
86
90
|
if (Array.isArray(memberHasRoleRoleNameIn)) {
|
|
87
91
|
andConditions.push({
|
|
88
92
|
'member.hasRole.roleName': {
|
|
@@ -110,7 +114,7 @@ class MemberRepo {
|
|
|
110
114
|
*/
|
|
111
115
|
searchCustomerMembers(params) {
|
|
112
116
|
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
117
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
114
118
|
if (typeof params.project.id !== 'string' || params.project.id === '') {
|
|
115
119
|
throw new factory.errors.ArgumentNull('project.id');
|
|
116
120
|
}
|
|
@@ -128,7 +132,8 @@ class MemberRepo {
|
|
|
128
132
|
}
|
|
129
133
|
},
|
|
130
134
|
id: Object.assign(Object.assign({}, (typeof ((_b = (_a = params.member) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$eq) === 'string') ? { $eq: params.member.id.$eq } : undefined), (Array.isArray((_d = (_c = params.member) === null || _c === void 0 ? void 0 : _c.id) === null || _d === void 0 ? void 0 : _d.$in)) ? { $in: params.member.id.$in } : undefined),
|
|
131
|
-
|
|
135
|
+
identifier: Object.assign({}, (typeof ((_f = (_e = params.member) === null || _e === void 0 ? void 0 : _e.identifier) === null || _f === void 0 ? void 0 : _f.$eq) === 'string') ? { $eq: params.member.identifier.$eq } : undefined),
|
|
136
|
+
name: Object.assign({}, (typeof ((_h = (_g = params.member) === null || _g === void 0 ? void 0 : _g.name) === null || _h === void 0 ? void 0 : _h.$regex) === 'string') ? { $regex: params.member.name.$regex } : undefined)
|
|
132
137
|
}
|
|
133
138
|
});
|
|
134
139
|
const projection = {
|
|
@@ -155,7 +160,7 @@ class MemberRepo {
|
|
|
155
160
|
},
|
|
156
161
|
{ $project: projection }
|
|
157
162
|
]);
|
|
158
|
-
if (typeof ((
|
|
163
|
+
if (typeof ((_j = params.sort) === null || _j === void 0 ? void 0 : _j['member.id']) === 'number') {
|
|
159
164
|
aggregate.sort(params.sort);
|
|
160
165
|
}
|
|
161
166
|
if (typeof params.limit === 'number' && params.limit > 0) {
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/client-cognito-identity-provider": "3.600.0",
|
|
13
13
|
"@aws-sdk/credential-providers": "3.600.0",
|
|
14
|
-
"@chevre/factory": "5.2.0-alpha.
|
|
14
|
+
"@chevre/factory": "5.2.0-alpha.11",
|
|
15
15
|
"@cinerino/sdk": "12.7.0-alpha.4",
|
|
16
16
|
"@motionpicture/coa-service": "9.6.0",
|
|
17
17
|
"@motionpicture/gmo-service": "5.4.0-alpha.1",
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"postversion": "git push origin --tags",
|
|
116
116
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
117
117
|
},
|
|
118
|
-
"version": "23.1.0-alpha.
|
|
118
|
+
"version": "23.1.0-alpha.8"
|
|
119
119
|
}
|