@mostajs/rbac 2.1.0 → 2.2.1
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.schema.d.ts","sourceRoot":"","sources":["../../schemas/user.schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"user.schema.d.ts","sourceRoot":"","sources":["../../schemas/user.schema.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAEhD,eAAO,MAAM,UAAU,EAAE,YAuCxB,CAAA"}
|
|
@@ -3,13 +3,26 @@ export const UserSchema = {
|
|
|
3
3
|
collection: 'users',
|
|
4
4
|
timestamps: true,
|
|
5
5
|
fields: {
|
|
6
|
+
// Identity
|
|
6
7
|
email: { type: 'string', required: true, unique: true, lowercase: true, trim: true },
|
|
7
8
|
password: { type: 'string', required: true },
|
|
8
9
|
firstName: { type: 'string', required: true, trim: true },
|
|
9
10
|
lastName: { type: 'string', required: true, trim: true },
|
|
10
11
|
phone: { type: 'string', trim: true },
|
|
12
|
+
// Status & auth
|
|
11
13
|
status: { type: 'string', enum: ['active', 'locked', 'disabled'], default: 'active' },
|
|
12
14
|
lastLoginAt: { type: 'date' },
|
|
15
|
+
// Email verification
|
|
16
|
+
verified: { type: 'boolean', default: false },
|
|
17
|
+
verifyToken: { type: 'string' },
|
|
18
|
+
verifyTokenExpiresAt: { type: 'string' },
|
|
19
|
+
// Password reset
|
|
20
|
+
resetToken: { type: 'string' },
|
|
21
|
+
resetTokenExpiresAt: { type: 'string' },
|
|
22
|
+
// SaaS / Cloud
|
|
23
|
+
stripeCustomerId: { type: 'string' },
|
|
24
|
+
avatar: { type: 'string' },
|
|
25
|
+
locale: { type: 'string', default: 'fr' },
|
|
13
26
|
},
|
|
14
27
|
relations: {
|
|
15
28
|
roles: { target: 'Role', type: 'many-to-many', through: 'user_roles' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.schema.js","sourceRoot":"","sources":["../../schemas/user.schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"user.schema.js","sourceRoot":"","sources":["../../schemas/user.schema.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,UAAU,GAAiB;IACtC,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,IAAI;IAEhB,MAAM,EAAE;QACN,WAAW;QACX,KAAK,EAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;QAC1F,QAAQ,EAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC/C,SAAS,EAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;QAC3D,QAAQ,EAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;QAC3D,KAAK,EAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE;QAE3C,gBAAgB;QAChB,MAAM,EAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC1F,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QAE7B,qBAAqB;QACrB,QAAQ,EAAe,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE;QAC1D,WAAW,EAAY,EAAE,IAAI,EAAE,QAAQ,EAAE;QACzC,oBAAoB,EAAG,EAAE,IAAI,EAAE,QAAQ,EAAE;QAEzC,iBAAiB;QACjB,UAAU,EAAa,EAAE,IAAI,EAAE,QAAQ,EAAE;QACzC,mBAAmB,EAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;QAEzC,eAAe;QACf,gBAAgB,EAAO,EAAE,IAAI,EAAE,QAAQ,EAAE;QACzC,MAAM,EAAiB,EAAE,IAAI,EAAE,QAAQ,EAAE;QACzC,MAAM,EAAiB,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE;KACzD;IAED,SAAS,EAAE;QACT,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY,EAAE;KACvE;IAED,OAAO,EAAE;QACP,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE;KAC9B;CACF,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mostajs/rbac",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "RBAC — User/Role/Permission schemas, repos, management UI, API handlers",
|
|
5
5
|
"author": "Dr Hamid MADANI <drmdh@msn.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -234,5 +234,9 @@
|
|
|
234
234
|
"@mostajs/menu": {
|
|
235
235
|
"optional": true
|
|
236
236
|
}
|
|
237
|
+
},
|
|
238
|
+
"funding": {
|
|
239
|
+
"type": "github",
|
|
240
|
+
"url": "https://github.com/sponsors/apolocine"
|
|
237
241
|
}
|
|
238
242
|
}
|