@digitaldefiance/suite-core-lib 3.6.48 → 3.6.49
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/package.json +1 -1
- package/src/builders/role-builder.ts +8 -5
- package/src/enumerations/suite-core-string-key.ts +1 -0
- package/src/interfaces/bases/used-direct-login-token.ts +3 -1
- package/src/interfaces/bases/user-role.ts +4 -1
- package/src/interfaces/has-creator.ts +1 -1
- package/src/interfaces/has-id.ts +1 -1
- package/src/interfaces/has-soft-deleter.ts +1 -1
- package/src/interfaces/has-updater.ts +1 -1
- package/src/strings/de.ts +2 -0
- package/src/strings/en-GB.ts +2 -0
- package/src/strings/en-US.ts +2 -0
- package/src/strings/es.ts +2 -0
- package/src/strings/fr.ts +2 -0
- package/src/strings/ja.ts +2 -0
- package/src/strings/uk.ts +2 -0
- package/src/strings/zh-CN.ts +1 -0
package/package.json
CHANGED
|
@@ -9,7 +9,10 @@ import { IRoleBase } from '../interfaces/bases/role';
|
|
|
9
9
|
/**
|
|
10
10
|
* Builder for creating role objects with fluent API
|
|
11
11
|
*/
|
|
12
|
-
export class RoleBuilder<
|
|
12
|
+
export class RoleBuilder<
|
|
13
|
+
TID extends PlatformID = PlatformID,
|
|
14
|
+
TDate extends Date | string = Date,
|
|
15
|
+
> {
|
|
13
16
|
private data: Partial<IRoleBase<TID, TDate, Role>> = {
|
|
14
17
|
admin: false,
|
|
15
18
|
member: false,
|
|
@@ -17,10 +20,10 @@ export class RoleBuilder<TID extends PlatformID = PlatformID, TDate extends Date
|
|
|
17
20
|
system: false,
|
|
18
21
|
};
|
|
19
22
|
|
|
20
|
-
static create<
|
|
21
|
-
TID,
|
|
22
|
-
TDate
|
|
23
|
-
> {
|
|
23
|
+
static create<
|
|
24
|
+
TID extends PlatformID = PlatformID,
|
|
25
|
+
TDate extends Date | string = Date,
|
|
26
|
+
>(): RoleBuilder<TID, TDate> {
|
|
24
27
|
return new RoleBuilder<TID, TDate>();
|
|
25
28
|
}
|
|
26
29
|
|
|
@@ -37,6 +37,7 @@ export enum SuiteCoreStringKey {
|
|
|
37
37
|
Error_AccountStatus_PendingEmailVerification = 'error_accountStatus_pendingEmailVerification',
|
|
38
38
|
|
|
39
39
|
// Error messages
|
|
40
|
+
Error_ArrayLengthMismatch = 'error_arrayLengthMismatch',
|
|
40
41
|
Error_UnexpectedErrorInAuthenticateCrypto = 'error_unexpectedErrorInAuthenticateCrypto',
|
|
41
42
|
Error_EngineAlreadySet = 'error_engineAlreadySet',
|
|
42
43
|
Error_EngineNotSet = 'error_engineNotSet',
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
import type { PlatformID } from '@digitaldefiance/ecies-lib';
|
|
6
6
|
import { IHasId } from '../has-id';
|
|
7
7
|
|
|
8
|
-
export interface IUsedDirectLoginTokenBase<
|
|
8
|
+
export interface IUsedDirectLoginTokenBase<
|
|
9
|
+
TID extends PlatformID,
|
|
10
|
+
> extends IHasId<TID> {
|
|
9
11
|
/**
|
|
10
12
|
* The user ID associated with the token
|
|
11
13
|
*/
|
|
@@ -5,7 +5,10 @@ import { IHasSoftDeleter } from '../has-soft-deleter';
|
|
|
5
5
|
import { IHasTimestampOwners } from '../has-timestamp-owners';
|
|
6
6
|
import { IHasTimestamps } from '../has-timestamps';
|
|
7
7
|
|
|
8
|
-
export interface IUserRoleBase<
|
|
8
|
+
export interface IUserRoleBase<
|
|
9
|
+
TID extends PlatformID,
|
|
10
|
+
TDate extends Date | string,
|
|
11
|
+
>
|
|
9
12
|
extends
|
|
10
13
|
IHasId<TID>,
|
|
11
14
|
IHasTimestamps<TDate>,
|
package/src/interfaces/has-id.ts
CHANGED
package/src/strings/de.ts
CHANGED
|
@@ -44,6 +44,8 @@ export const germanStrings: Record<SuiteCoreStringKey, string> = {
|
|
|
44
44
|
'Express-Validierung fehlgeschlagen',
|
|
45
45
|
[SuiteCoreStringKey.Validation_MongooseValidationError]:
|
|
46
46
|
'Mongoose-Validierungsfehler aufgetreten',
|
|
47
|
+
[SuiteCoreStringKey.Error_ArrayLengthMismatch]:
|
|
48
|
+
'Arrays müssen gleich lang sein',
|
|
47
49
|
[SuiteCoreStringKey.Error_AccountStatus_Active]: 'Konto ist aktiv',
|
|
48
50
|
[SuiteCoreStringKey.Error_AccountStatus_AdminLock]:
|
|
49
51
|
'Konto ist von einem Administrator gesperrt',
|
package/src/strings/en-GB.ts
CHANGED
|
@@ -33,6 +33,8 @@ export const britishEnglishStrings: Record<SuiteCoreStringKey, string> = {
|
|
|
33
33
|
'Express validation failed',
|
|
34
34
|
[SuiteCoreStringKey.Validation_MongooseValidationError]:
|
|
35
35
|
'Mongoose validation error occurred',
|
|
36
|
+
[SuiteCoreStringKey.Error_ArrayLengthMismatch]:
|
|
37
|
+
'Arrays must be of equal length',
|
|
36
38
|
[SuiteCoreStringKey.Error_AccountStatus_Active]: 'Account is active',
|
|
37
39
|
[SuiteCoreStringKey.Error_AccountStatus_AdminLock]:
|
|
38
40
|
'Account is locked by an administrator',
|
package/src/strings/en-US.ts
CHANGED
|
@@ -59,6 +59,8 @@ export const americanEnglishStrings: Record<SuiteCoreStringKey, string> = {
|
|
|
59
59
|
[SuiteCoreStringKey.Common_SiteTemplate]: '{Site}',
|
|
60
60
|
[SuiteCoreStringKey.Common_SiteTaglineTemplate]: '{SiteTagline}',
|
|
61
61
|
[SuiteCoreStringKey.Common_SiteDescriptionTemplate]: '{SiteDescription}',
|
|
62
|
+
[SuiteCoreStringKey.Error_ArrayLengthMismatch]:
|
|
63
|
+
'Arrays must be of equal length',
|
|
62
64
|
[SuiteCoreStringKey.Error_ChildRoleCannotBeASystemRole]:
|
|
63
65
|
'A child role cannot be a system role',
|
|
64
66
|
[SuiteCoreStringKey.Error_ChildRoleCannotBeAnAdminRole]:
|
package/src/strings/es.ts
CHANGED
|
@@ -45,6 +45,8 @@ export const spanishStrings: Record<SuiteCoreStringKey, string> = {
|
|
|
45
45
|
'Express validación fallida',
|
|
46
46
|
[SuiteCoreStringKey.Validation_MongooseValidationError]:
|
|
47
47
|
'Error de validación de Mongoose',
|
|
48
|
+
[SuiteCoreStringKey.Error_ArrayLengthMismatch]:
|
|
49
|
+
'Los arrays deben tener la misma longitud',
|
|
48
50
|
[SuiteCoreStringKey.Error_AccountStatus_Active]: 'La cuenta está activa',
|
|
49
51
|
[SuiteCoreStringKey.Error_AccountStatus_AdminLock]:
|
|
50
52
|
'La cuenta está bloqueada por un administrador',
|
package/src/strings/fr.ts
CHANGED
|
@@ -45,6 +45,8 @@ export const frenchStrings: Record<SuiteCoreStringKey, string> = {
|
|
|
45
45
|
'Échec de la validation Express',
|
|
46
46
|
[SuiteCoreStringKey.Validation_MongooseValidationError]:
|
|
47
47
|
"Une erreur de validation Mongoose s'est produite",
|
|
48
|
+
[SuiteCoreStringKey.Error_ArrayLengthMismatch]:
|
|
49
|
+
'Les tableaux doivent avoir la même longueur',
|
|
48
50
|
[SuiteCoreStringKey.Error_NoPasswordOrMnemonicProvided]:
|
|
49
51
|
'Aucun mot de passe ou phrase mnémonique fourni',
|
|
50
52
|
[SuiteCoreStringKey.Error_AccountStatus_Active]: 'Le compte est actif',
|
package/src/strings/ja.ts
CHANGED
|
@@ -44,6 +44,8 @@ export const japaneseStrings: Record<SuiteCoreStringKey, string> = {
|
|
|
44
44
|
'Expressの検証に失敗しました',
|
|
45
45
|
[SuiteCoreStringKey.Validation_MongooseValidationError]:
|
|
46
46
|
'Mongooseの検証に失敗しました',
|
|
47
|
+
[SuiteCoreStringKey.Error_ArrayLengthMismatch]:
|
|
48
|
+
'配列の長さが一致している必要があります',
|
|
47
49
|
[SuiteCoreStringKey.Error_VerificationFailed]: '検証に失敗しました',
|
|
48
50
|
[SuiteCoreStringKey.Error_AccountStatus_Active]: 'アカウントはアクティブです',
|
|
49
51
|
[SuiteCoreStringKey.Error_AccountStatus_AdminLock]:
|
package/src/strings/uk.ts
CHANGED
|
@@ -46,6 +46,8 @@ export const ukrainianStrings: Record<SuiteCoreStringKey, string> = {
|
|
|
46
46
|
'Не вдалося виконати перевірку Express',
|
|
47
47
|
[SuiteCoreStringKey.Validation_MongooseValidationError]:
|
|
48
48
|
'Виникла помилка перевірки Mongoose',
|
|
49
|
+
[SuiteCoreStringKey.Error_ArrayLengthMismatch]:
|
|
50
|
+
'Довжини масивів повинні бути однаковими',
|
|
49
51
|
[SuiteCoreStringKey.Error_AccountStatus_Active]: 'Обліковий запис активний',
|
|
50
52
|
[SuiteCoreStringKey.Error_AccountStatus_AdminLock]:
|
|
51
53
|
'Обліковий запис заблоковано адміністратором',
|
package/src/strings/zh-CN.ts
CHANGED
|
@@ -32,6 +32,7 @@ export const mandarinStrings: Record<SuiteCoreStringKey, string> = {
|
|
|
32
32
|
[SuiteCoreStringKey.Validation_ExpressValidationFailed]: 'Express验证失败',
|
|
33
33
|
[SuiteCoreStringKey.Validation_MongooseValidationError]:
|
|
34
34
|
'发生了Mongoose验证错误',
|
|
35
|
+
[SuiteCoreStringKey.Error_ArrayLengthMismatch]: '数组长度必须相等',
|
|
35
36
|
[SuiteCoreStringKey.Error_VerificationFailed]: '验证失败',
|
|
36
37
|
[SuiteCoreStringKey.Error_AccountStatus_Active]: '账户处于激活状态',
|
|
37
38
|
[SuiteCoreStringKey.Error_AccountStatus_AdminLock]: '账户被管理员锁定',
|