@hed-hog/core 0.0.360 → 0.0.362
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/dist/access-log/access-log.controller.d.ts +1 -1
- package/dist/access-log/access-log.service.d.ts +1 -1
- package/dist/access-log/access-log.service.d.ts.map +1 -1
- package/dist/access-log/access-log.service.js +43 -1
- package/dist/access-log/access-log.service.js.map +1 -1
- package/dist/ai/ai.service.d.ts +1 -1
- package/dist/auth/auth.controller.d.ts +27 -26
- package/dist/auth/auth.controller.d.ts.map +1 -1
- package/dist/auth/auth.controller.js +6 -2
- package/dist/auth/auth.controller.js.map +1 -1
- package/dist/auth/auth.service.d.ts +35 -34
- package/dist/auth/auth.service.d.ts.map +1 -1
- package/dist/auth/auth.service.js +15 -5
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/auth/guards/auth.guard.d.ts +1 -0
- package/dist/auth/guards/auth.guard.d.ts.map +1 -1
- package/dist/auth/guards/auth.guard.js +11 -4
- package/dist/auth/guards/auth.guard.js.map +1 -1
- package/dist/challenge/challenge.service.d.ts +12 -12
- package/dist/core/system.controller.d.ts +2 -2
- package/dist/core/system.service.d.ts +2 -2
- package/dist/dashboard/dashboard/dashboard.controller.d.ts +66 -66
- package/dist/dashboard/dashboard/dashboard.service.d.ts +66 -66
- package/dist/dashboard/dashboard-component/dashboard-component.controller.d.ts +26 -26
- package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts +26 -26
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.controller.d.ts +34 -34
- package/dist/dashboard/dashboard-component-role/dashboard-component-role.service.d.ts +34 -34
- package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts +8 -8
- package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts +8 -8
- package/dist/dashboard/dashboard-item/dashboard-item.controller.d.ts +5 -5
- package/dist/dashboard/dashboard-item/dashboard-item.service.d.ts +5 -5
- package/dist/dashboard/dashboard-role/dashboard-role.controller.d.ts +25 -25
- package/dist/dashboard/dashboard-role/dashboard-role.service.d.ts +25 -25
- package/dist/file/file.controller.d.ts +6 -6
- package/dist/file/file.module.d.ts.map +1 -1
- package/dist/file/file.module.js +3 -2
- package/dist/file/file.module.js.map +1 -1
- package/dist/file/file.service.d.ts +121 -25
- package/dist/file/file.service.d.ts.map +1 -1
- package/dist/file/file.service.js +217 -32
- package/dist/file/file.service.js.map +1 -1
- package/dist/file/image-optimization.service.d.ts +20 -0
- package/dist/file/image-optimization.service.d.ts.map +1 -0
- package/dist/file/image-optimization.service.js +126 -0
- package/dist/file/image-optimization.service.js.map +1 -0
- package/dist/file/provider/local.provider.d.ts +1 -1
- package/dist/file/provider/local.provider.d.ts.map +1 -1
- package/dist/file/provider/local.provider.js +2 -9
- package/dist/file/provider/local.provider.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/integration-profile/integration-profile.controller.d.ts +15 -15
- package/dist/integration-profile/integration-profile.service.d.ts +15 -15
- package/dist/locale/locale.controller.d.ts +4 -4
- package/dist/locale/locale.service.d.ts +4 -4
- package/dist/mail/mail.controller.d.ts +7 -7
- package/dist/mail/mail.service.d.ts +7 -7
- package/dist/mail-sent/mail-sent.controller.d.ts +12 -12
- package/dist/mail-sent/mail-sent.service.d.ts +12 -12
- package/dist/mcp/mcp-api-key.controller.d.ts +2 -2
- package/dist/mcp/mcp-api-key.service.d.ts +2 -2
- package/dist/mcp/tools/core-users.mcp-tools.d.ts +1 -1
- package/dist/mcp/tools/core-users.mcp-tools.d.ts.map +1 -1
- package/dist/mcp/tools/core-users.mcp-tools.js +2 -2
- package/dist/mcp/tools/core-users.mcp-tools.js.map +1 -1
- package/dist/mcp-chat/mcp-chat.controller.d.ts +8 -8
- package/dist/mcp-chat/mcp-chat.service.d.ts +8 -8
- package/dist/menu/menu.controller.d.ts +10 -10
- package/dist/menu/menu.service.d.ts +10 -10
- package/dist/notification/notification.controller.d.ts +36 -36
- package/dist/notification/notification.service.d.ts +36 -36
- package/dist/profile/profile.controller.d.ts +16 -16
- package/dist/profile/profile.service.d.ts +16 -16
- package/dist/profile/profile.service.d.ts.map +1 -1
- package/dist/profile/profile.service.js +44 -23
- package/dist/profile/profile.service.js.map +1 -1
- package/dist/role/role.controller.d.ts +6 -6
- package/dist/role/role.service.d.ts +6 -6
- package/dist/screen/screen.controller.d.ts +3 -3
- package/dist/screen/screen.service.d.ts +3 -3
- package/dist/session/session.controller.d.ts +2 -2
- package/dist/session/session.service.d.ts +6 -6
- package/dist/session/session.service.d.ts.map +1 -1
- package/dist/session/session.service.js +7 -2
- package/dist/session/session.service.js.map +1 -1
- package/dist/setting/setting.controller.d.ts +18 -18
- package/dist/setting/setting.service.d.ts +18 -18
- package/dist/setting/setting.service.d.ts.map +1 -1
- package/dist/setting/setting.service.js +0 -1
- package/dist/setting/setting.service.js.map +1 -1
- package/dist/token/token.service.d.ts +1 -0
- package/dist/token/token.service.d.ts.map +1 -1
- package/dist/token/token.service.js +23 -6
- package/dist/token/token.service.js.map +1 -1
- package/dist/user/user.controller.d.ts +30 -30
- package/dist/user/user.controller.d.ts.map +1 -1
- package/dist/user/user.controller.js +4 -3
- package/dist/user/user.controller.js.map +1 -1
- package/dist/user/user.service.d.ts +68 -68
- package/dist/user/user.service.d.ts.map +1 -1
- package/dist/user/user.service.js +6 -6
- package/dist/user/user.service.js.map +1 -1
- package/dist/webhook-integration/webhook-integration.controller.d.ts +2 -2
- package/dist/webhook-integration/webhook-integration.service.d.ts +2 -2
- package/hedhog/data/route.yaml +2 -0
- package/hedhog/data/setting_group.yaml +117 -26
- package/hedhog/data/setting_subgroup.yaml +8 -0
- package/hedhog/frontend/app/access-log/page.tsx.ejs +170 -11
- package/hedhog/frontend/app/account/components/remove-mfa-dialog.tsx.ejs +1 -1
- package/hedhog/frontend/app/account/components/verify-before-add-dialog.tsx.ejs +1 -1
- package/hedhog/frontend/app/configurations/[slug]/components/setting-field.tsx.ejs +113 -38
- package/hedhog/frontend/app/users/page.tsx.ejs +7 -7
- package/hedhog/frontend/app/users/permissions.tsx.ejs +137 -83
- package/hedhog/frontend/app/users/user-access-sheet.tsx.ejs +28 -26
- package/hedhog/frontend/app/users/user-sheet.tsx.ejs +207 -75
- package/hedhog/frontend/messages/en.json +9 -2
- package/hedhog/frontend/messages/pt.json +9 -2
- package/hedhog/table/setting_runtime_state.yaml +9 -0
- package/package.json +12 -6
- package/src/access-log/access-log.service.ts +19 -1
- package/src/auth/auth.controller.ts +5 -0
- package/src/auth/auth.service.ts +14 -4
- package/src/auth/guards/auth.guard.ts +10 -3
- package/src/file/file.module.ts +3 -2
- package/src/file/file.service.ts +448 -46
- package/src/file/image-optimization.service.ts +123 -0
- package/src/file/provider/local.provider.ts +2 -9
- package/src/index.ts +1 -0
- package/src/mcp/tools/core-users.mcp-tools.ts +267 -267
- package/src/profile/profile.service.ts +40 -22
- package/src/session/session.service.ts +10 -2
- package/src/setting/setting.service.ts +0 -1
- package/src/token/token.service.ts +26 -6
- package/src/user/user.controller.ts +5 -2
- package/src/user/user.service.ts +11 -8
- package/dist/menu/menu.service.spec.d.ts +0 -1
- package/dist/menu/menu.service.spec.d.ts.map +0 -1
- package/dist/menu/menu.service.spec.js +0 -208
- package/dist/menu/menu.service.spec.js.map +0 -1
- package/dist/route/route.service.spec.d.ts +0 -1
- package/dist/route/route.service.spec.d.ts.map +0 -1
- package/dist/route/route.service.spec.js +0 -262
- package/dist/route/route.service.spec.js.map +0 -1
- package/dist/screen/screen.service.spec.d.ts +0 -1
- package/dist/screen/screen.service.spec.d.ts.map +0 -1
- package/dist/screen/screen.service.spec.js +0 -259
- package/dist/screen/screen.service.spec.js.map +0 -1
- package/dist/user/user.service.spec.d.ts +0 -1
- package/dist/user/user.service.spec.d.ts.map +0 -1
- package/dist/user/user.service.spec.js +0 -261
- package/dist/user/user.service.spec.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token.service.js","sourceRoot":"","sources":["../../src/token/token.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"token.service.js","sourceRoot":"","sources":["../../src/token/token.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAoD;AACpD,oDAAoD;AACpD,2CAAmH;AACnH,qCAAyC;AACzC,mEAA+D;AAC/D,gEAA4D;AAGrD,IAAM,YAAY,oBAAlB,MAAM,YAAY;IAGvB,YACmB,MAAqB,EAEtC,GAAgC,EAEhC,QAA0C,EAE1C,OAAwC;QANvB,WAAM,GAAN,MAAM,CAAe;QAErB,QAAG,GAAH,GAAG,CAAY;QAEf,aAAQ,GAAR,QAAQ,CAAiB;QAEzB,YAAO,GAAP,OAAO,CAAgB;QATzB,WAAM,GAAG,IAAI,eAAM,CAAC,cAAY,CAAC,IAAI,CAAC,CAAC;IAUpD,CAAC;IAEL,KAAK,CAAC,MAAM,CAAC,MAAc,EAAE,KAAa;;QACxC,IAAI,CAAC;YAEH,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,EAAE;gBAChD,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE;aACrC,CAAC,CAAC;YAEH,8DAA8D;YAC9D,IAAI,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gBACrC,IAAI,CAAC;oBACH,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC;wBACxD,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,SAAS,EAAE;wBAChC,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;qBAC/C,CAAC,CAAC;oBAEH,IAAI,CAAC,OAAO,EAAE,CAAC;wBACb,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,OAAO,CAAC,SAAS,WAAW,OAAO,CAAC,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AAK,EAAE;gBACvC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE;gBACpC,gBAAgB,EAAE,IAAI;aACvB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,8BAAqB,CAAC,eAAe,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;CACF,CAAA;AArLY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;IAMR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,gBAAU,CAAC,CAAC,CAAA;IAEpC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,kCAAe,CAAC,CAAC,CAAA;IAEzC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,gCAAc,CAAC,CAAC,CAAA;qCALhB,0BAAa;QAEhB,gBAAU;QAEL,kCAAe;QAEhB,gCAAc;GAV/B,YAAY,CAqLxB"}
|
|
@@ -22,16 +22,6 @@ export declare class UserController {
|
|
|
22
22
|
};
|
|
23
23
|
}>;
|
|
24
24
|
get(userId: number, locale: string): Promise<{
|
|
25
|
-
user_identifier: {
|
|
26
|
-
type: import("@prisma/client").$Enums.user_identifier_type_e66d505520_enum;
|
|
27
|
-
id: number;
|
|
28
|
-
value: string;
|
|
29
|
-
enabled: boolean;
|
|
30
|
-
user_id: number;
|
|
31
|
-
created_at: Date;
|
|
32
|
-
updated_at: Date;
|
|
33
|
-
verified_at: Date | null;
|
|
34
|
-
}[];
|
|
35
25
|
role_user: ({
|
|
36
26
|
role: {
|
|
37
27
|
id: number;
|
|
@@ -48,83 +38,93 @@ export declare class UserController {
|
|
|
48
38
|
})[];
|
|
49
39
|
user_account: {
|
|
50
40
|
id: number;
|
|
51
|
-
email: string | null;
|
|
52
|
-
provider: import("@prisma/client").$Enums.user_account_provider_52222e2ecb_enum;
|
|
53
41
|
user_id: number;
|
|
54
42
|
created_at: Date;
|
|
55
43
|
updated_at: Date;
|
|
56
|
-
|
|
57
|
-
scopes: string | null;
|
|
44
|
+
email: string | null;
|
|
58
45
|
refresh_token: import("@prisma/client/runtime/library").Bytes | null;
|
|
46
|
+
provider: import("@prisma/client").$Enums.user_account_provider_52222e2ecb_enum;
|
|
47
|
+
scopes: string | null;
|
|
48
|
+
provider_user_id: string;
|
|
59
49
|
token_expires_at: Date | null;
|
|
60
50
|
}[];
|
|
61
51
|
user_activity: {
|
|
62
52
|
id: number;
|
|
63
|
-
action: string;
|
|
64
53
|
user_id: number;
|
|
65
54
|
created_at: Date;
|
|
66
55
|
updated_at: Date;
|
|
56
|
+
action: string;
|
|
67
57
|
}[];
|
|
68
58
|
user_credential: {
|
|
69
|
-
type: import("@prisma/client").$Enums.user_credential_type_4466d7f008_enum;
|
|
70
59
|
id: number;
|
|
71
|
-
hash: string;
|
|
72
60
|
user_id: number;
|
|
73
61
|
created_at: Date;
|
|
74
62
|
updated_at: Date;
|
|
75
|
-
|
|
63
|
+
type: import("@prisma/client").$Enums.user_credential_type_4466d7f008_enum;
|
|
64
|
+
hash: string;
|
|
76
65
|
revoked_at: Date | null;
|
|
66
|
+
expires_at: Date | null;
|
|
77
67
|
requires_reset: boolean;
|
|
78
68
|
}[];
|
|
69
|
+
user_identifier: {
|
|
70
|
+
id: number;
|
|
71
|
+
user_id: number;
|
|
72
|
+
created_at: Date;
|
|
73
|
+
updated_at: Date;
|
|
74
|
+
type: import("@prisma/client").$Enums.user_identifier_type_e66d505520_enum;
|
|
75
|
+
value: string;
|
|
76
|
+
enabled: boolean;
|
|
77
|
+
verified_at: Date | null;
|
|
78
|
+
}[];
|
|
79
79
|
user_session: {
|
|
80
80
|
id: number;
|
|
81
|
-
hash: string;
|
|
82
81
|
user_id: number;
|
|
83
82
|
user_agent: string;
|
|
84
83
|
created_at: Date;
|
|
85
84
|
updated_at: Date;
|
|
85
|
+
hash: string;
|
|
86
86
|
ip_address: string;
|
|
87
|
-
expires_at: Date;
|
|
88
87
|
revoked_at: Date | null;
|
|
88
|
+
expires_at: Date;
|
|
89
89
|
}[];
|
|
90
90
|
} & {
|
|
91
|
-
name: string;
|
|
92
91
|
id: number;
|
|
93
92
|
created_at: Date;
|
|
94
|
-
|
|
93
|
+
name: string;
|
|
95
94
|
photo_id: number | null;
|
|
96
95
|
suspended_until: Date | null;
|
|
97
96
|
last_login_at: Date | null;
|
|
98
97
|
suspended_reason: string | null;
|
|
99
98
|
deactivated_at: Date | null;
|
|
99
|
+
updated_at: Date;
|
|
100
100
|
}>;
|
|
101
101
|
openPublicAvatar(fileId: number, locale: string, req: Request, res: any): Promise<void>;
|
|
102
102
|
create(data: CreateWithEmailAndPasswordDTO, locale: string): Promise<{
|
|
103
103
|
user: {
|
|
104
|
-
name: string;
|
|
105
104
|
id: number;
|
|
106
105
|
created_at: Date;
|
|
107
|
-
|
|
106
|
+
name: string;
|
|
108
107
|
photo_id: number | null;
|
|
109
108
|
suspended_until: Date | null;
|
|
110
109
|
last_login_at: Date | null;
|
|
111
110
|
suspended_reason: string | null;
|
|
112
111
|
deactivated_at: Date | null;
|
|
112
|
+
updated_at: Date;
|
|
113
113
|
};
|
|
114
114
|
challenge: {
|
|
115
115
|
challengeId: number;
|
|
116
116
|
};
|
|
117
117
|
}>;
|
|
118
118
|
update(userId: number, data: UpdateDTO, locale: string): Promise<{
|
|
119
|
-
name: string;
|
|
120
119
|
id: number;
|
|
121
120
|
created_at: Date;
|
|
122
|
-
|
|
121
|
+
name: string;
|
|
123
122
|
photo_id: number | null;
|
|
124
123
|
suspended_until: Date | null;
|
|
125
124
|
last_login_at: Date | null;
|
|
126
125
|
suspended_reason: string | null;
|
|
127
126
|
deactivated_at: Date | null;
|
|
127
|
+
updated_at: Date;
|
|
128
128
|
}>;
|
|
129
129
|
resetPassword(userId: number, data: ResetPasswordDTO, locale: string): Promise<{
|
|
130
130
|
password: string;
|
|
@@ -135,17 +135,17 @@ export declare class UserController {
|
|
|
135
135
|
path: string;
|
|
136
136
|
}>;
|
|
137
137
|
verifyIdentifier(locale: string, userId: number, identifierId: number): Promise<{
|
|
138
|
-
type: import("@prisma/client").$Enums.user_identifier_type_e66d505520_enum;
|
|
139
138
|
id: number;
|
|
140
|
-
value: string;
|
|
141
|
-
enabled: boolean;
|
|
142
139
|
user_id: number;
|
|
143
140
|
created_at: Date;
|
|
144
141
|
updated_at: Date;
|
|
142
|
+
type: import("@prisma/client").$Enums.user_identifier_type_e66d505520_enum;
|
|
143
|
+
value: string;
|
|
144
|
+
enabled: boolean;
|
|
145
145
|
verified_at: Date | null;
|
|
146
146
|
}>;
|
|
147
147
|
delete(data: DeleteDTO, locale: string): Promise<import("@prisma/client").Prisma.BatchPayload>;
|
|
148
|
-
getUserRoles(userId: number): Promise<{
|
|
148
|
+
getUserRoles(userId: number, locale: string): Promise<{
|
|
149
149
|
id: any;
|
|
150
150
|
slug: any;
|
|
151
151
|
name: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.controller.d.ts","sourceRoot":"","sources":["../../src/user/user.controller.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBAEa,cAAc;IAGvB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,WAAW;IAIrC,IAAI,CAAe,gBAAgB,KAAA;;;;;;;;;;;;;;IAKnC,GAAG,CAAgC,MAAM,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;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AAM,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAM3E,gBAAgB,CACW,MAAM,EAAE,MAAM,EACnC,MAAM,EAAE,MAAM,EACjB,GAAG,EAAE,OAAO,EACZ,GAAG,KAAA;IAMN,MAAM,CAAS,IAAI,EAAE,6BAA6B,EAAY,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;IAK5E,MAAM,CACqB,MAAM,EAAE,MAAM,EACrC,IAAI,EAAE,SAAS,EACb,MAAM,EAAE,MAAM;;;;;;;;;;;IAMpB,aAAa,CACc,MAAM,EAAE,MAAM,EACrC,IAAI,EAAE,gBAAgB,EACpB,MAAM,EAAE,MAAM;;;;IAgBpB,YAAY,CACN,MAAM,EAAE,MAAM,EACO,MAAM,EAAE,MAAM,EAC7B,MAAM,EAAE,UAAU;;;;IAM9B,gBAAgB,CACV,MAAM,EAAE,MAAM,EACO,MAAM,EAAE,MAAM,EACR,YAAY,EAAE,MAAM;;;;;;;;;;IAMrD,MAAM,CAAS,IAAI,EAAE,SAAS,EAAY,MAAM,EAAE,MAAM;IAKtD,YAAY,CACe,MAAM,EAAE,MAAM,EACnC,MAAM,EAAE,MAAM;;;;;;;IAMtB,YAAY,CACe,MAAM,EAAE,MAAM,EACnC,MAAM,EAAE,MAAM;;;;;;;;;IAMpB,aAAa,CAAgC,MAAM,EAAE,MAAM,EAAY,MAAM,EAAE,MAAM;;;;;;IAKrF,gBAAgB,CACW,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACnC,MAAM,EAAE,MAAM;;;;;;;IAMpB,kBAAkB,CACS,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACnC,MAAM,EAAE,MAAM;;;CAI3B"}
|
|
@@ -54,8 +54,8 @@ let UserController = class UserController {
|
|
|
54
54
|
async delete(data, locale) {
|
|
55
55
|
return this.userService.delete(locale, data);
|
|
56
56
|
}
|
|
57
|
-
async getUserRoles(userId) {
|
|
58
|
-
return this.userService.getUserRoles(userId);
|
|
57
|
+
async getUserRoles(userId, locale) {
|
|
58
|
+
return this.userService.getUserRoles(locale, userId);
|
|
59
59
|
}
|
|
60
60
|
async getUserMenus(userId, locale) {
|
|
61
61
|
return this.userService.getUserMenus(locale, userId);
|
|
@@ -160,8 +160,9 @@ __decorate([
|
|
|
160
160
|
__decorate([
|
|
161
161
|
(0, common_1.Get)(':userId/role'),
|
|
162
162
|
__param(0, (0, common_1.Param)('userId', common_1.ParseIntPipe)),
|
|
163
|
+
__param(1, (0, api_locale_1.Locale)()),
|
|
163
164
|
__metadata("design:type", Function),
|
|
164
|
-
__metadata("design:paramtypes", [Number]),
|
|
165
|
+
__metadata("design:paramtypes", [Number, String]),
|
|
165
166
|
__metadata("design:returntype", Promise)
|
|
166
167
|
], UserController.prototype, "getUserRoles", null);
|
|
167
168
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.controller.js","sourceRoot":"","sources":["../../src/user/user.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA4C;AAC5C,oDAA6C;AAC7C,4DAAqD;AACrD,2CAgBwB;AACxB,+DAA2D;AAE3D,kDAA8C;AAC9C,iGAAyF;AACzF,iEAA4D;AAC5D,iDAA6C;AAC7C,iDAA6C;AAItC,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,YAEmB,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;IACvC,CAAC;IAGC,AAAN,KAAK,CAAC,IAAI,CAAe,gBAAgB;QACvC,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACjD,CAAC;IAGK,AAAN,KAAK,CAAC,GAAG,CAAgC,MAAc,EAAY,MAAc;QAC/E,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IA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qBAAY,CAAC,CAAA;IAAkB,WAAA,IAAA,mBAAM,GAAE,CAAA;;;;mDAE3E;AAGK;IADL,IAAA,aAAI,EAAC,sBAAsB,CAAC;IAE1B,WAAA,IAAA,cAAK,EAAC,QAAQ,EAAE,qBAAY,CAAC,CAAA;IAC7B,WAAA,IAAA,cAAK,EAAC,QAAQ,EAAE,qBAAY,CAAC,CAAA;IAC7B,WAAA,IAAA,mBAAM,GAAE,CAAA;;;;sDAGV;AAGK;IADL,IAAA,eAAM,EAAC,sBAAsB,CAAC;IAE5B,WAAA,IAAA,cAAK,EAAC,QAAQ,EAAE,qBAAY,CAAC,CAAA;IAC7B,WAAA,IAAA,cAAK,EAAC,QAAQ,EAAE,qBAAY,CAAC,CAAA;IAC7B,WAAA,IAAA,mBAAM,GAAE,CAAA;;;;wDAGV;yBAxHU,cAAc;IAF1B,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,MAAM,CAAC;IAGd,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAW,CAAC,CAAC,CAAA;qCACR,0BAAW;GAHhC,cAAc,CAyH1B"}
|
|
@@ -22,13 +22,13 @@ export declare class UserService {
|
|
|
22
22
|
private validateRoleExists;
|
|
23
23
|
private validateEmailAvailable;
|
|
24
24
|
verifyIdentifier(locale: string, userId: number, identifierId: number): Promise<{
|
|
25
|
-
type: import("@prisma/client").$Enums.user_identifier_type_e66d505520_enum;
|
|
26
25
|
id: number;
|
|
27
|
-
value: string;
|
|
28
|
-
enabled: boolean;
|
|
29
26
|
user_id: number;
|
|
30
27
|
created_at: Date;
|
|
31
28
|
updated_at: Date;
|
|
29
|
+
type: import("@prisma/client").$Enums.user_identifier_type_e66d505520_enum;
|
|
30
|
+
value: string;
|
|
31
|
+
enabled: boolean;
|
|
32
32
|
verified_at: Date | null;
|
|
33
33
|
}>;
|
|
34
34
|
list(paginationParams: any): Promise<{
|
|
@@ -46,16 +46,6 @@ export declare class UserService {
|
|
|
46
46
|
};
|
|
47
47
|
}>;
|
|
48
48
|
get(locale: string, userId: number): Promise<{
|
|
49
|
-
user_identifier: {
|
|
50
|
-
type: import("@prisma/client").$Enums.user_identifier_type_e66d505520_enum;
|
|
51
|
-
id: number;
|
|
52
|
-
value: string;
|
|
53
|
-
enabled: boolean;
|
|
54
|
-
user_id: number;
|
|
55
|
-
created_at: Date;
|
|
56
|
-
updated_at: Date;
|
|
57
|
-
verified_at: Date | null;
|
|
58
|
-
}[];
|
|
59
49
|
role_user: ({
|
|
60
50
|
role: {
|
|
61
51
|
id: number;
|
|
@@ -72,82 +62,92 @@ export declare class UserService {
|
|
|
72
62
|
})[];
|
|
73
63
|
user_account: {
|
|
74
64
|
id: number;
|
|
75
|
-
email: string | null;
|
|
76
|
-
provider: import("@prisma/client").$Enums.user_account_provider_52222e2ecb_enum;
|
|
77
65
|
user_id: number;
|
|
78
66
|
created_at: Date;
|
|
79
67
|
updated_at: Date;
|
|
80
|
-
|
|
81
|
-
scopes: string | null;
|
|
68
|
+
email: string | null;
|
|
82
69
|
refresh_token: import("@prisma/client/runtime/library").Bytes | null;
|
|
70
|
+
provider: import("@prisma/client").$Enums.user_account_provider_52222e2ecb_enum;
|
|
71
|
+
scopes: string | null;
|
|
72
|
+
provider_user_id: string;
|
|
83
73
|
token_expires_at: Date | null;
|
|
84
74
|
}[];
|
|
85
75
|
user_activity: {
|
|
86
76
|
id: number;
|
|
87
|
-
action: string;
|
|
88
77
|
user_id: number;
|
|
89
78
|
created_at: Date;
|
|
90
79
|
updated_at: Date;
|
|
80
|
+
action: string;
|
|
91
81
|
}[];
|
|
92
82
|
user_credential: {
|
|
93
|
-
type: import("@prisma/client").$Enums.user_credential_type_4466d7f008_enum;
|
|
94
83
|
id: number;
|
|
95
|
-
hash: string;
|
|
96
84
|
user_id: number;
|
|
97
85
|
created_at: Date;
|
|
98
86
|
updated_at: Date;
|
|
99
|
-
|
|
87
|
+
type: import("@prisma/client").$Enums.user_credential_type_4466d7f008_enum;
|
|
88
|
+
hash: string;
|
|
100
89
|
revoked_at: Date | null;
|
|
90
|
+
expires_at: Date | null;
|
|
101
91
|
requires_reset: boolean;
|
|
102
92
|
}[];
|
|
93
|
+
user_identifier: {
|
|
94
|
+
id: number;
|
|
95
|
+
user_id: number;
|
|
96
|
+
created_at: Date;
|
|
97
|
+
updated_at: Date;
|
|
98
|
+
type: import("@prisma/client").$Enums.user_identifier_type_e66d505520_enum;
|
|
99
|
+
value: string;
|
|
100
|
+
enabled: boolean;
|
|
101
|
+
verified_at: Date | null;
|
|
102
|
+
}[];
|
|
103
103
|
user_session: {
|
|
104
104
|
id: number;
|
|
105
|
-
hash: string;
|
|
106
105
|
user_id: number;
|
|
107
106
|
user_agent: string;
|
|
108
107
|
created_at: Date;
|
|
109
108
|
updated_at: Date;
|
|
109
|
+
hash: string;
|
|
110
110
|
ip_address: string;
|
|
111
|
-
expires_at: Date;
|
|
112
111
|
revoked_at: Date | null;
|
|
112
|
+
expires_at: Date;
|
|
113
113
|
}[];
|
|
114
114
|
} & {
|
|
115
|
-
name: string;
|
|
116
115
|
id: number;
|
|
117
116
|
created_at: Date;
|
|
118
|
-
|
|
117
|
+
name: string;
|
|
119
118
|
photo_id: number | null;
|
|
120
119
|
suspended_until: Date | null;
|
|
121
120
|
last_login_at: Date | null;
|
|
122
121
|
suspended_reason: string | null;
|
|
123
122
|
deactivated_at: Date | null;
|
|
123
|
+
updated_at: Date;
|
|
124
124
|
}>;
|
|
125
125
|
createWithEmailAndPassword(locale: string, { email, name, password }: CreateWithEmailAndPasswordDTO): Promise<{
|
|
126
126
|
user: {
|
|
127
|
-
name: string;
|
|
128
127
|
id: number;
|
|
129
128
|
created_at: Date;
|
|
130
|
-
|
|
129
|
+
name: string;
|
|
131
130
|
photo_id: number | null;
|
|
132
131
|
suspended_until: Date | null;
|
|
133
132
|
last_login_at: Date | null;
|
|
134
133
|
suspended_reason: string | null;
|
|
135
134
|
deactivated_at: Date | null;
|
|
135
|
+
updated_at: Date;
|
|
136
136
|
};
|
|
137
137
|
challenge: {
|
|
138
138
|
challengeId: number;
|
|
139
139
|
};
|
|
140
140
|
}>;
|
|
141
141
|
update(locale: string, userId: number, { name }: UpdateDTO): Promise<{
|
|
142
|
-
name: string;
|
|
143
142
|
id: number;
|
|
144
143
|
created_at: Date;
|
|
145
|
-
|
|
144
|
+
name: string;
|
|
146
145
|
photo_id: number | null;
|
|
147
146
|
suspended_until: Date | null;
|
|
148
147
|
last_login_at: Date | null;
|
|
149
148
|
suspended_reason: string | null;
|
|
150
149
|
deactivated_at: Date | null;
|
|
150
|
+
updated_at: Date;
|
|
151
151
|
}>;
|
|
152
152
|
resetPassword(locale: string, userId: number, { password }: ResetPasswordDTO): Promise<{
|
|
153
153
|
password: string;
|
|
@@ -160,16 +160,6 @@ export declare class UserService {
|
|
|
160
160
|
}>;
|
|
161
161
|
openPublicAvatar(locale: string, fileId: number, ifNoneMatch: string | undefined, res: any): Promise<void>;
|
|
162
162
|
findUserById(locale: string, id: number): Promise<{
|
|
163
|
-
user_identifier: {
|
|
164
|
-
type: import("@prisma/client").$Enums.user_identifier_type_e66d505520_enum;
|
|
165
|
-
id: number;
|
|
166
|
-
value: string;
|
|
167
|
-
enabled: boolean;
|
|
168
|
-
user_id: number;
|
|
169
|
-
created_at: Date;
|
|
170
|
-
updated_at: Date;
|
|
171
|
-
verified_at: Date | null;
|
|
172
|
-
}[];
|
|
173
163
|
role_user: ({
|
|
174
164
|
role: {
|
|
175
165
|
id: number;
|
|
@@ -186,101 +176,111 @@ export declare class UserService {
|
|
|
186
176
|
})[];
|
|
187
177
|
user_account: {
|
|
188
178
|
id: number;
|
|
189
|
-
email: string | null;
|
|
190
|
-
provider: import("@prisma/client").$Enums.user_account_provider_52222e2ecb_enum;
|
|
191
179
|
user_id: number;
|
|
192
180
|
created_at: Date;
|
|
193
181
|
updated_at: Date;
|
|
194
|
-
|
|
195
|
-
scopes: string | null;
|
|
182
|
+
email: string | null;
|
|
196
183
|
refresh_token: import("@prisma/client/runtime/library").Bytes | null;
|
|
184
|
+
provider: import("@prisma/client").$Enums.user_account_provider_52222e2ecb_enum;
|
|
185
|
+
scopes: string | null;
|
|
186
|
+
provider_user_id: string;
|
|
197
187
|
token_expires_at: Date | null;
|
|
198
188
|
}[];
|
|
199
189
|
user_activity: {
|
|
200
190
|
id: number;
|
|
201
|
-
action: string;
|
|
202
191
|
user_id: number;
|
|
203
192
|
created_at: Date;
|
|
204
193
|
updated_at: Date;
|
|
194
|
+
action: string;
|
|
205
195
|
}[];
|
|
206
196
|
user_credential: {
|
|
207
|
-
type: import("@prisma/client").$Enums.user_credential_type_4466d7f008_enum;
|
|
208
197
|
id: number;
|
|
209
|
-
hash: string;
|
|
210
198
|
user_id: number;
|
|
211
199
|
created_at: Date;
|
|
212
200
|
updated_at: Date;
|
|
213
|
-
|
|
201
|
+
type: import("@prisma/client").$Enums.user_credential_type_4466d7f008_enum;
|
|
202
|
+
hash: string;
|
|
214
203
|
revoked_at: Date | null;
|
|
204
|
+
expires_at: Date | null;
|
|
215
205
|
requires_reset: boolean;
|
|
216
206
|
}[];
|
|
207
|
+
user_identifier: {
|
|
208
|
+
id: number;
|
|
209
|
+
user_id: number;
|
|
210
|
+
created_at: Date;
|
|
211
|
+
updated_at: Date;
|
|
212
|
+
type: import("@prisma/client").$Enums.user_identifier_type_e66d505520_enum;
|
|
213
|
+
value: string;
|
|
214
|
+
enabled: boolean;
|
|
215
|
+
verified_at: Date | null;
|
|
216
|
+
}[];
|
|
217
217
|
user_session: {
|
|
218
218
|
id: number;
|
|
219
|
-
hash: string;
|
|
220
219
|
user_id: number;
|
|
221
220
|
user_agent: string;
|
|
222
221
|
created_at: Date;
|
|
223
222
|
updated_at: Date;
|
|
223
|
+
hash: string;
|
|
224
224
|
ip_address: string;
|
|
225
|
-
expires_at: Date;
|
|
226
225
|
revoked_at: Date | null;
|
|
226
|
+
expires_at: Date;
|
|
227
227
|
}[];
|
|
228
228
|
} & {
|
|
229
|
-
name: string;
|
|
230
229
|
id: number;
|
|
231
230
|
created_at: Date;
|
|
232
|
-
|
|
231
|
+
name: string;
|
|
233
232
|
photo_id: number | null;
|
|
234
233
|
suspended_until: Date | null;
|
|
235
234
|
last_login_at: Date | null;
|
|
236
235
|
suspended_reason: string | null;
|
|
237
236
|
deactivated_at: Date | null;
|
|
237
|
+
updated_at: Date;
|
|
238
238
|
}>;
|
|
239
239
|
findUserByEmail(_locale: string, email: string): Promise<{
|
|
240
|
-
|
|
241
|
-
type: import("@prisma/client").$Enums.user_identifier_type_e66d505520_enum;
|
|
240
|
+
user_credential: {
|
|
242
241
|
id: number;
|
|
243
|
-
value: string;
|
|
244
|
-
enabled: boolean;
|
|
245
242
|
user_id: number;
|
|
246
243
|
created_at: Date;
|
|
247
244
|
updated_at: Date;
|
|
248
|
-
verified_at: Date | null;
|
|
249
|
-
}[];
|
|
250
|
-
user_credential: {
|
|
251
245
|
type: import("@prisma/client").$Enums.user_credential_type_4466d7f008_enum;
|
|
252
|
-
id: number;
|
|
253
246
|
hash: string;
|
|
247
|
+
revoked_at: Date | null;
|
|
248
|
+
expires_at: Date | null;
|
|
249
|
+
requires_reset: boolean;
|
|
250
|
+
}[];
|
|
251
|
+
user_identifier: {
|
|
252
|
+
id: number;
|
|
254
253
|
user_id: number;
|
|
255
254
|
created_at: Date;
|
|
256
255
|
updated_at: Date;
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
256
|
+
type: import("@prisma/client").$Enums.user_identifier_type_e66d505520_enum;
|
|
257
|
+
value: string;
|
|
258
|
+
enabled: boolean;
|
|
259
|
+
verified_at: Date | null;
|
|
260
260
|
}[];
|
|
261
261
|
user_session: {
|
|
262
262
|
id: number;
|
|
263
|
-
hash: string;
|
|
264
263
|
user_id: number;
|
|
265
264
|
user_agent: string;
|
|
266
265
|
created_at: Date;
|
|
267
266
|
updated_at: Date;
|
|
267
|
+
hash: string;
|
|
268
268
|
ip_address: string;
|
|
269
|
-
expires_at: Date;
|
|
270
269
|
revoked_at: Date | null;
|
|
270
|
+
expires_at: Date;
|
|
271
271
|
}[];
|
|
272
272
|
} & {
|
|
273
|
-
name: string;
|
|
274
273
|
id: number;
|
|
275
274
|
created_at: Date;
|
|
276
|
-
|
|
275
|
+
name: string;
|
|
277
276
|
photo_id: number | null;
|
|
278
277
|
suspended_until: Date | null;
|
|
279
278
|
last_login_at: Date | null;
|
|
280
279
|
suspended_reason: string | null;
|
|
281
280
|
deactivated_at: Date | null;
|
|
281
|
+
updated_at: Date;
|
|
282
282
|
}>;
|
|
283
|
-
getUserRoles(userId: number): Promise<{
|
|
283
|
+
getUserRoles(locale: string, userId: number): Promise<{
|
|
284
284
|
id: any;
|
|
285
285
|
slug: any;
|
|
286
286
|
name: any;
|
|
@@ -314,10 +314,10 @@ export declare class UserService {
|
|
|
314
314
|
}>;
|
|
315
315
|
registerUserActivity(userId: number | null | undefined, action: string): Promise<{
|
|
316
316
|
id: number;
|
|
317
|
-
action: string;
|
|
318
317
|
user_id: number;
|
|
319
318
|
created_at: Date;
|
|
320
319
|
updated_at: Date;
|
|
320
|
+
action: string;
|
|
321
321
|
}>;
|
|
322
322
|
private validateDeleteIds;
|
|
323
323
|
private deleteOldAvatar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.service.d.ts","sourceRoot":"","sources":["../../src/user/user.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"user.service.d.ts","sourceRoot":"","sources":["../../src/user/user.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AASpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,8BAA8B,EAAE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S,EAAE,MAAM,EAAE,MAAM;;;;;;;IAiB5E,OAAO,CAAC,iBAAiB;YAYX,eAAe;YAef,kBAAkB;IAmBhC,OAAO,CAAC,sBAAsB;IAmC9B,OAAO,CAAC,oBAAoB;YAuBd,iBAAiB;YAsBjB,qBAAqB;YAUrB,oBAAoB;IAelC,OAAO,CAAC,sBAAsB;YAwBhB,YAAY;CAQ3B"}
|
|
@@ -13,11 +13,11 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.UserService = void 0;
|
|
16
|
-
const crypto_1 = require("crypto");
|
|
17
16
|
const api_locale_1 = require("@hed-hog/api-locale");
|
|
18
17
|
const api_pagination_1 = require("@hed-hog/api-pagination");
|
|
19
18
|
const api_prisma_1 = require("@hed-hog/api-prisma");
|
|
20
19
|
const common_1 = require("@nestjs/common");
|
|
20
|
+
const crypto_1 = require("crypto");
|
|
21
21
|
const challenge_service_1 = require("../challenge/challenge.service");
|
|
22
22
|
const file_service_1 = require("../file/file.service");
|
|
23
23
|
const integration_developer_api_service_1 = require("../integration/services/integration-developer-api.service");
|
|
@@ -33,7 +33,6 @@ const CREDENTIAL_TYPE = {
|
|
|
33
33
|
};
|
|
34
34
|
const USER_AVATAR_CACHE_MAX_AGE_SETTING = 'user-avatar-cache-max-age';
|
|
35
35
|
const DEFAULT_ROLE_SLUG = 'user';
|
|
36
|
-
const DEFAULT_LOCALE = 'en';
|
|
37
36
|
const DAYS_IN_MS = 24 * 60 * 60 * 1000;
|
|
38
37
|
const NEW_USERS_PERIOD_DAYS = 7;
|
|
39
38
|
const RANDOM_PASSWORD_LENGTH = 16;
|
|
@@ -314,12 +313,12 @@ let UserService = class UserService {
|
|
|
314
313
|
// ==========================================
|
|
315
314
|
// Role Management
|
|
316
315
|
// ==========================================
|
|
317
|
-
async getUserRoles(userId) {
|
|
316
|
+
async getUserRoles(locale, userId) {
|
|
318
317
|
const [allRoles, userRoles] = await Promise.all([
|
|
319
318
|
this.getAllRolesWithLocale(),
|
|
320
319
|
this.getUserAssignedRoles(userId),
|
|
321
320
|
]);
|
|
322
|
-
return this.mapRolesWithAssignment(allRoles, userRoles);
|
|
321
|
+
return this.mapRolesWithAssignment(locale, allRoles, userRoles);
|
|
323
322
|
}
|
|
324
323
|
async getUserMenus(locale, userId) {
|
|
325
324
|
const roleUsers = await this.prismaService.role_user.findMany({
|
|
@@ -588,10 +587,11 @@ let UserService = class UserService {
|
|
|
588
587
|
},
|
|
589
588
|
});
|
|
590
589
|
}
|
|
591
|
-
mapRolesWithAssignment(allRoles, userRoles) {
|
|
590
|
+
mapRolesWithAssignment(locale, allRoles, userRoles) {
|
|
592
591
|
return allRoles.map((role) => {
|
|
592
|
+
var _a;
|
|
593
593
|
const isAssigned = userRoles.some((userRole) => userRole.role_id === role.id);
|
|
594
|
-
const localeData = role.role_locale.find((
|
|
594
|
+
const localeData = (_a = role.role_locale.find((roleLocale) => roleLocale.locale.code === locale)) !== null && _a !== void 0 ? _a : role.role_locale[0];
|
|
595
595
|
return {
|
|
596
596
|
id: role.id,
|
|
597
597
|
slug: role.slug,
|