@goplusvn/core 0.1.1 → 0.1.3
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 +31 -175
- package/dist/audit/index.d.mts +0 -115
- package/dist/audit/index.d.ts +0 -115
- package/dist/audit/index.js +0 -204
- package/dist/audit/index.js.map +0 -1
- package/dist/audit/index.mjs +0 -200
- package/dist/audit/index.mjs.map +0 -1
- package/dist/auth/index.d.mts +0 -86
- package/dist/auth/index.d.ts +0 -86
- package/dist/auth/index.js +0 -210
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/index.mjs +0 -198
- package/dist/auth/index.mjs.map +0 -1
- package/dist/button-1dWvP9Ib.d.mts +0 -30
- package/dist/button-1dWvP9Ib.d.ts +0 -30
- package/dist/calendar-2QzdEo1z.d.mts +0 -20
- package/dist/calendar-2QzdEo1z.d.ts +0 -20
- package/dist/code-generation/index.d.mts +0 -30
- package/dist/code-generation/index.d.ts +0 -30
- package/dist/code-generation/index.js +0 -31
- package/dist/code-generation/index.js.map +0 -1
- package/dist/code-generation/index.mjs +0 -28
- package/dist/code-generation/index.mjs.map +0 -1
- package/dist/configs/index.d.mts +0 -175
- package/dist/configs/index.d.ts +0 -175
- package/dist/configs/index.js +0 -254
- package/dist/configs/index.js.map +0 -1
- package/dist/configs/index.mjs +0 -233
- package/dist/configs/index.mjs.map +0 -1
- package/dist/crud/index.d.mts +0 -646
- package/dist/crud/index.d.ts +0 -646
- package/dist/crud/index.js +0 -11772
- package/dist/crud/index.js.map +0 -1
- package/dist/crud/index.mjs +0 -11665
- package/dist/crud/index.mjs.map +0 -1
- package/dist/crud/server.d.mts +0 -20
- package/dist/crud/server.d.ts +0 -20
- package/dist/crud/server.js +0 -123
- package/dist/crud/server.js.map +0 -1
- package/dist/crud/server.mjs +0 -120
- package/dist/crud/server.mjs.map +0 -1
- package/dist/data-table-skeleton-12NA8Mjx.d.mts +0 -39
- package/dist/data-table-skeleton-12NA8Mjx.d.ts +0 -39
- package/dist/dialog-bKfjZMTd.d.mts +0 -22
- package/dist/dialog-bKfjZMTd.d.ts +0 -22
- package/dist/dynamic-icon-DrGIiu2N.d.mts +0 -10
- package/dist/dynamic-icon-DrGIiu2N.d.ts +0 -10
- package/dist/home/index.d.mts +0 -269
- package/dist/home/index.d.ts +0 -269
- package/dist/home/index.js +0 -1678
- package/dist/home/index.js.map +0 -1
- package/dist/home/index.mjs +0 -1635
- package/dist/home/index.mjs.map +0 -1
- package/dist/hooks/index.d.mts +0 -7
- package/dist/hooks/index.d.ts +0 -7
- package/dist/hooks/index.js +0 -8316
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/index.mjs +0 -8255
- package/dist/hooks/index.mjs.map +0 -1
- package/dist/index-50hpiPrV.d.ts +0 -116
- package/dist/index-B9zQVEVi.d.mts +0 -116
- package/dist/index.d.mts +0 -5
- package/dist/index.d.ts +0 -5
- package/dist/index.js +0 -123
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -118
- package/dist/index.mjs.map +0 -1
- package/dist/infrastructure/index.d.mts +0 -423
- package/dist/infrastructure/index.d.ts +0 -423
- package/dist/infrastructure/index.js +0 -633
- package/dist/infrastructure/index.js.map +0 -1
- package/dist/infrastructure/index.mjs +0 -619
- package/dist/infrastructure/index.mjs.map +0 -1
- package/dist/label-DWTEkNPo.d.ts +0 -226
- package/dist/label-LPpdcoBx.d.mts +0 -226
- package/dist/layout/index.d.mts +0 -48
- package/dist/layout/index.d.ts +0 -48
- package/dist/layout/index.js +0 -117
- package/dist/layout/index.js.map +0 -1
- package/dist/layout/index.mjs +0 -90
- package/dist/layout/index.mjs.map +0 -1
- package/dist/navigation/index.d.mts +0 -16
- package/dist/navigation/index.d.ts +0 -16
- package/dist/navigation/index.js +0 -53
- package/dist/navigation/index.js.map +0 -1
- package/dist/navigation/index.mjs +0 -50
- package/dist/navigation/index.mjs.map +0 -1
- package/dist/notification/index.d.mts +0 -105
- package/dist/notification/index.d.ts +0 -105
- package/dist/notification/index.js +0 -278
- package/dist/notification/index.js.map +0 -1
- package/dist/notification/index.mjs +0 -274
- package/dist/notification/index.mjs.map +0 -1
- package/dist/organization/index.d.mts +0 -99
- package/dist/organization/index.d.ts +0 -99
- package/dist/organization/index.js +0 -360
- package/dist/organization/index.js.map +0 -1
- package/dist/organization/index.mjs +0 -352
- package/dist/organization/index.mjs.map +0 -1
- package/dist/plugin/index.d.mts +0 -83
- package/dist/plugin/index.d.ts +0 -83
- package/dist/plugin/index.js +0 -86
- package/dist/plugin/index.js.map +0 -1
- package/dist/plugin/index.mjs +0 -84
- package/dist/plugin/index.mjs.map +0 -1
- package/dist/providers/index.d.mts +0 -25
- package/dist/providers/index.d.ts +0 -25
- package/dist/providers/index.js +0 -84
- package/dist/providers/index.js.map +0 -1
- package/dist/providers/index.mjs +0 -77
- package/dist/providers/index.mjs.map +0 -1
- package/dist/rbac/index.d.mts +0 -226
- package/dist/rbac/index.d.ts +0 -226
- package/dist/rbac/index.js +0 -4784
- package/dist/rbac/index.js.map +0 -1
- package/dist/rbac/index.mjs +0 -4722
- package/dist/rbac/index.mjs.map +0 -1
- package/dist/rbac/permissions.d.mts +0 -26
- package/dist/rbac/permissions.d.ts +0 -26
- package/dist/rbac/permissions.js +0 -94
- package/dist/rbac/permissions.js.map +0 -1
- package/dist/rbac/permissions.mjs +0 -90
- package/dist/rbac/permissions.mjs.map +0 -1
- package/dist/rbac/server.d.mts +0 -1
- package/dist/rbac/server.d.ts +0 -1
- package/dist/rbac/server.js +0 -128
- package/dist/rbac/server.js.map +0 -1
- package/dist/rbac/server.mjs +0 -124
- package/dist/rbac/server.mjs.map +0 -1
- package/dist/schemas/index.d.mts +0 -1257
- package/dist/schemas/index.d.ts +0 -1257
- package/dist/schemas/index.js +0 -572
- package/dist/schemas/index.js.map +0 -1
- package/dist/schemas/index.mjs +0 -523
- package/dist/schemas/index.mjs.map +0 -1
- package/dist/server-QuYCTa89.d.mts +0 -83
- package/dist/server-QuYCTa89.d.ts +0 -83
- package/dist/sonner-C74GlRDQ.d.mts +0 -71
- package/dist/sonner-C74GlRDQ.d.ts +0 -71
- package/dist/status-BOXZgIqX.d.mts +0 -12
- package/dist/status-BOXZgIqX.d.ts +0 -12
- package/dist/system/index.d.mts +0 -77
- package/dist/system/index.d.ts +0 -77
- package/dist/system/index.js +0 -102
- package/dist/system/index.js.map +0 -1
- package/dist/system/index.mjs +0 -100
- package/dist/system/index.mjs.map +0 -1
- package/dist/tabs-C6FfBwPY.d.mts +0 -18
- package/dist/tabs-C6FfBwPY.d.ts +0 -18
- package/dist/tenant-provider-B8eC_Wpb.d.mts +0 -27
- package/dist/tenant-provider-B8eC_Wpb.d.ts +0 -27
- package/dist/types/index.d.mts +0 -469
- package/dist/types/index.d.ts +0 -469
- package/dist/types/index.js +0 -25
- package/dist/types/index.js.map +0 -1
- package/dist/types/index.mjs +0 -21
- package/dist/types/index.mjs.map +0 -1
- package/dist/ui/auth.d.mts +0 -39
- package/dist/ui/auth.d.ts +0 -39
- package/dist/ui/auth.js +0 -4941
- package/dist/ui/auth.js.map +0 -1
- package/dist/ui/auth.mjs +0 -4896
- package/dist/ui/auth.mjs.map +0 -1
- package/dist/ui/crud.d.mts +0 -2
- package/dist/ui/crud.d.ts +0 -2
- package/dist/ui/crud.js +0 -4
- package/dist/ui/crud.js.map +0 -1
- package/dist/ui/crud.mjs +0 -3
- package/dist/ui/crud.mjs.map +0 -1
- package/dist/ui/data-display.d.mts +0 -596
- package/dist/ui/data-display.d.ts +0 -596
- package/dist/ui/data-display.js +0 -5307
- package/dist/ui/data-display.js.map +0 -1
- package/dist/ui/data-display.mjs +0 -5212
- package/dist/ui/data-display.mjs.map +0 -1
- package/dist/ui/feedback.d.mts +0 -55
- package/dist/ui/feedback.d.ts +0 -55
- package/dist/ui/feedback.js +0 -2608
- package/dist/ui/feedback.js.map +0 -1
- package/dist/ui/feedback.mjs +0 -2526
- package/dist/ui/feedback.mjs.map +0 -1
- package/dist/ui/forms.d.mts +0 -309
- package/dist/ui/forms.d.ts +0 -309
- package/dist/ui/forms.js +0 -4656
- package/dist/ui/forms.js.map +0 -1
- package/dist/ui/forms.mjs +0 -4571
- package/dist/ui/forms.mjs.map +0 -1
- package/dist/ui/index.d.mts +0 -331
- package/dist/ui/index.d.ts +0 -331
- package/dist/ui/index.js +0 -16953
- package/dist/ui/index.js.map +0 -1
- package/dist/ui/index.mjs +0 -16598
- package/dist/ui/index.mjs.map +0 -1
- package/dist/ui/primitives/client.d.mts +0 -61
- package/dist/ui/primitives/client.d.ts +0 -61
- package/dist/ui/primitives/client.js +0 -3408
- package/dist/ui/primitives/client.js.map +0 -1
- package/dist/ui/primitives/client.mjs +0 -3256
- package/dist/ui/primitives/client.mjs.map +0 -1
- package/dist/ui/primitives.d.mts +0 -113
- package/dist/ui/primitives.d.ts +0 -113
- package/dist/ui/primitives.js +0 -3356
- package/dist/ui/primitives.js.map +0 -1
- package/dist/ui/primitives.mjs +0 -3227
- package/dist/ui/primitives.mjs.map +0 -1
- package/dist/user/index.d.mts +0 -228
- package/dist/user/index.d.ts +0 -228
- package/dist/user/index.js +0 -4306
- package/dist/user/index.js.map +0 -1
- package/dist/user/index.mjs +0 -4260
- package/dist/user/index.mjs.map +0 -1
- package/dist/utils/index.d.mts +0 -205
- package/dist/utils/index.d.ts +0 -205
- package/dist/utils/index.js +0 -574
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/index.mjs +0 -514
- package/dist/utils/index.mjs.map +0 -1
- package/dist/workflow/index.d.mts +0 -40
- package/dist/workflow/index.d.ts +0 -40
- package/dist/workflow/index.js +0 -3710
- package/dist/workflow/index.js.map +0 -1
- package/dist/workflow/index.mjs +0 -3677
- package/dist/workflow/index.mjs.map +0 -1
package/dist/user/index.d.mts
DELETED
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { a as DictionaryType } from '../index-B9zQVEVi.mjs';
|
|
4
|
-
import { CrudResponse } from '../types/index.mjs';
|
|
5
|
-
import 'react';
|
|
6
|
-
import '../tenant-provider-B8eC_Wpb.mjs';
|
|
7
|
-
import 'lucide-react';
|
|
8
|
-
|
|
9
|
-
declare const MAX_AVATAR_SIZE = 50000000;
|
|
10
|
-
declare const fomratedAvatarSize: string;
|
|
11
|
-
declare const ProfileInfoSchema: z.ZodObject<{
|
|
12
|
-
firstName: z.ZodString;
|
|
13
|
-
lastName: z.ZodString;
|
|
14
|
-
username: z.ZodString;
|
|
15
|
-
email: z.ZodString;
|
|
16
|
-
phoneNumber: z.ZodString;
|
|
17
|
-
state: z.ZodString;
|
|
18
|
-
country: z.ZodString;
|
|
19
|
-
address: z.ZodString;
|
|
20
|
-
zipCode: z.ZodString;
|
|
21
|
-
language: z.ZodString;
|
|
22
|
-
timeZone: z.ZodString;
|
|
23
|
-
currency: z.ZodString;
|
|
24
|
-
organization: z.ZodOptional<z.ZodString>;
|
|
25
|
-
avatar: z.ZodOptional<z.ZodEffects<z.ZodType<File, z.ZodTypeDef, File>, File, File>>;
|
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
email: string;
|
|
28
|
-
currency: string;
|
|
29
|
-
timeZone: string;
|
|
30
|
-
firstName: string;
|
|
31
|
-
lastName: string;
|
|
32
|
-
username: string;
|
|
33
|
-
phoneNumber: string;
|
|
34
|
-
state: string;
|
|
35
|
-
country: string;
|
|
36
|
-
address: string;
|
|
37
|
-
zipCode: string;
|
|
38
|
-
language: string;
|
|
39
|
-
organization?: string | undefined;
|
|
40
|
-
avatar?: File | undefined;
|
|
41
|
-
}, {
|
|
42
|
-
email: string;
|
|
43
|
-
currency: string;
|
|
44
|
-
timeZone: string;
|
|
45
|
-
firstName: string;
|
|
46
|
-
lastName: string;
|
|
47
|
-
username: string;
|
|
48
|
-
phoneNumber: string;
|
|
49
|
-
state: string;
|
|
50
|
-
country: string;
|
|
51
|
-
address: string;
|
|
52
|
-
zipCode: string;
|
|
53
|
-
language: string;
|
|
54
|
-
organization?: string | undefined;
|
|
55
|
-
avatar?: File | undefined;
|
|
56
|
-
}>;
|
|
57
|
-
declare const DeleteAccountSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
58
|
-
|
|
59
|
-
interface UserType {
|
|
60
|
-
id: string;
|
|
61
|
-
firstName: string;
|
|
62
|
-
lastName: string;
|
|
63
|
-
name: string;
|
|
64
|
-
username: string;
|
|
65
|
-
role: string;
|
|
66
|
-
avatar: string;
|
|
67
|
-
background: string;
|
|
68
|
-
status: string;
|
|
69
|
-
phoneNumber: string;
|
|
70
|
-
email: string;
|
|
71
|
-
state: string;
|
|
72
|
-
country: string;
|
|
73
|
-
address: string;
|
|
74
|
-
zipCode: string;
|
|
75
|
-
language: string;
|
|
76
|
-
timeZone: string;
|
|
77
|
-
currency: string;
|
|
78
|
-
organization: string;
|
|
79
|
-
twoFactorAuth: boolean;
|
|
80
|
-
loginAlerts: boolean;
|
|
81
|
-
accountReoveryOption?: "email" | "sms" | "codes";
|
|
82
|
-
connections: number;
|
|
83
|
-
followers: number;
|
|
84
|
-
}
|
|
85
|
-
type DeleteAccountFormType = z.infer<typeof DeleteAccountSchema>;
|
|
86
|
-
type ProfileInfoFormType = z.infer<typeof ProfileInfoSchema>;
|
|
87
|
-
|
|
88
|
-
interface ProfilePageProps {
|
|
89
|
-
user: UserType;
|
|
90
|
-
dictionary?: DictionaryType;
|
|
91
|
-
}
|
|
92
|
-
declare function ProfilePage({ user, dictionary }: ProfilePageProps): react_jsx_runtime.JSX.Element;
|
|
93
|
-
|
|
94
|
-
interface ProfileInfoProps {
|
|
95
|
-
user: UserType;
|
|
96
|
-
dictionary?: DictionaryType;
|
|
97
|
-
}
|
|
98
|
-
declare function ProfileInfo({ user, dictionary }: ProfileInfoProps): react_jsx_runtime.JSX.Element;
|
|
99
|
-
|
|
100
|
-
interface DangerousZoneProps {
|
|
101
|
-
user: UserType;
|
|
102
|
-
dictionary?: DictionaryType;
|
|
103
|
-
}
|
|
104
|
-
declare function DangerousZone({ user, dictionary }: DangerousZoneProps): react_jsx_runtime.JSX.Element;
|
|
105
|
-
|
|
106
|
-
interface ProfileInfoFormProps {
|
|
107
|
-
user: UserType;
|
|
108
|
-
dictionary?: DictionaryType;
|
|
109
|
-
}
|
|
110
|
-
declare function ProfileInfoForm({ user, dictionary }: ProfileInfoFormProps): react_jsx_runtime.JSX.Element;
|
|
111
|
-
|
|
112
|
-
interface DeleteAccountFormProps {
|
|
113
|
-
user: UserType;
|
|
114
|
-
dictionary?: DictionaryType;
|
|
115
|
-
}
|
|
116
|
-
declare function DeleteAccountForm({ user, dictionary }: DeleteAccountFormProps): react_jsx_runtime.JSX.Element;
|
|
117
|
-
|
|
118
|
-
interface UserPrismaClient {
|
|
119
|
-
user: any;
|
|
120
|
-
role: any;
|
|
121
|
-
department: any;
|
|
122
|
-
$transaction: (args: any) => Promise<any>;
|
|
123
|
-
}
|
|
124
|
-
interface GetUsersParams {
|
|
125
|
-
page?: number;
|
|
126
|
-
pageSize?: number;
|
|
127
|
-
search?: string;
|
|
128
|
-
status?: string;
|
|
129
|
-
roleCode?: string;
|
|
130
|
-
departmentId?: string;
|
|
131
|
-
}
|
|
132
|
-
interface UserWithDetails {
|
|
133
|
-
id: string;
|
|
134
|
-
name: string | null;
|
|
135
|
-
email: string;
|
|
136
|
-
image: string | null;
|
|
137
|
-
isActive: boolean;
|
|
138
|
-
createdAt: Date;
|
|
139
|
-
updatedAt: Date;
|
|
140
|
-
roles: {
|
|
141
|
-
code: string;
|
|
142
|
-
name: string;
|
|
143
|
-
}[];
|
|
144
|
-
department: {
|
|
145
|
-
id: string;
|
|
146
|
-
name: string;
|
|
147
|
-
code: string;
|
|
148
|
-
} | null;
|
|
149
|
-
jobTitle: {
|
|
150
|
-
id: string;
|
|
151
|
-
name: string;
|
|
152
|
-
code: string;
|
|
153
|
-
level: number;
|
|
154
|
-
} | null;
|
|
155
|
-
branches: {
|
|
156
|
-
id: string;
|
|
157
|
-
name: string;
|
|
158
|
-
isDefault: boolean;
|
|
159
|
-
}[];
|
|
160
|
-
branchIds: string[];
|
|
161
|
-
}
|
|
162
|
-
interface UsersStats {
|
|
163
|
-
totalUsers: number;
|
|
164
|
-
activeUsers: number;
|
|
165
|
-
inactiveUsers: number;
|
|
166
|
-
totalRoles: number;
|
|
167
|
-
employees: number;
|
|
168
|
-
customers: number;
|
|
169
|
-
suppliers: number;
|
|
170
|
-
}
|
|
171
|
-
interface UsersDataResponse extends CrudResponse<UserWithDetails> {
|
|
172
|
-
stats: UsersStats;
|
|
173
|
-
}
|
|
174
|
-
declare function getUsersData(db: UserPrismaClient, params: GetUsersParams): Promise<CrudResponse<any>>;
|
|
175
|
-
/**
|
|
176
|
-
* Get users with extended details including roles, department, and job title
|
|
177
|
-
*/
|
|
178
|
-
declare function getUsersWithDetails(db: UserPrismaClient, params: GetUsersParams): Promise<UsersDataResponse>;
|
|
179
|
-
/**
|
|
180
|
-
* Get all active roles for filter dropdown
|
|
181
|
-
*/
|
|
182
|
-
declare function getActiveRoles(db: UserPrismaClient): Promise<any>;
|
|
183
|
-
/**
|
|
184
|
-
* Get all active departments for filter dropdown
|
|
185
|
-
*/
|
|
186
|
-
declare function getActiveDepartments(db: UserPrismaClient): Promise<any>;
|
|
187
|
-
/**
|
|
188
|
-
* Get user statistics
|
|
189
|
-
*/
|
|
190
|
-
declare function getUserStats(db: UserPrismaClient): Promise<{
|
|
191
|
-
totalUsers: any;
|
|
192
|
-
activeUsers: any;
|
|
193
|
-
inactiveUsers: number;
|
|
194
|
-
totalRoles: any;
|
|
195
|
-
employees: number;
|
|
196
|
-
customers: any;
|
|
197
|
-
suppliers: any;
|
|
198
|
-
}>;
|
|
199
|
-
/**
|
|
200
|
-
* Get user profile by ID
|
|
201
|
-
*/
|
|
202
|
-
declare function getUserProfile(db: UserPrismaClient, userId: string): Promise<{
|
|
203
|
-
id: any;
|
|
204
|
-
firstName: any;
|
|
205
|
-
lastName: any;
|
|
206
|
-
name: any;
|
|
207
|
-
username: any;
|
|
208
|
-
email: any;
|
|
209
|
-
avatar: any;
|
|
210
|
-
role: any;
|
|
211
|
-
background: string;
|
|
212
|
-
status: string;
|
|
213
|
-
phoneNumber: any;
|
|
214
|
-
state: string;
|
|
215
|
-
country: string;
|
|
216
|
-
address: any;
|
|
217
|
-
zipCode: string;
|
|
218
|
-
language: string;
|
|
219
|
-
timeZone: string;
|
|
220
|
-
currency: string;
|
|
221
|
-
organization: string;
|
|
222
|
-
twoFactorAuth: boolean;
|
|
223
|
-
loginAlerts: boolean;
|
|
224
|
-
connections: number;
|
|
225
|
-
followers: number;
|
|
226
|
-
} | null>;
|
|
227
|
-
|
|
228
|
-
export { DangerousZone, DeleteAccountForm, type DeleteAccountFormType, DeleteAccountSchema, type GetUsersParams, MAX_AVATAR_SIZE, ProfileInfo, ProfileInfoForm, type ProfileInfoFormType, ProfileInfoSchema, ProfilePage, type ProfilePageProps, type UserPrismaClient, type UserType, type UserWithDetails, type UsersDataResponse, type UsersStats, fomratedAvatarSize, getActiveDepartments, getActiveRoles, getUserProfile, getUserStats, getUsersData, getUsersWithDetails };
|
package/dist/user/index.d.ts
DELETED
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { a as DictionaryType } from '../index-50hpiPrV.js';
|
|
4
|
-
import { CrudResponse } from '../types/index.js';
|
|
5
|
-
import 'react';
|
|
6
|
-
import '../tenant-provider-B8eC_Wpb.js';
|
|
7
|
-
import 'lucide-react';
|
|
8
|
-
|
|
9
|
-
declare const MAX_AVATAR_SIZE = 50000000;
|
|
10
|
-
declare const fomratedAvatarSize: string;
|
|
11
|
-
declare const ProfileInfoSchema: z.ZodObject<{
|
|
12
|
-
firstName: z.ZodString;
|
|
13
|
-
lastName: z.ZodString;
|
|
14
|
-
username: z.ZodString;
|
|
15
|
-
email: z.ZodString;
|
|
16
|
-
phoneNumber: z.ZodString;
|
|
17
|
-
state: z.ZodString;
|
|
18
|
-
country: z.ZodString;
|
|
19
|
-
address: z.ZodString;
|
|
20
|
-
zipCode: z.ZodString;
|
|
21
|
-
language: z.ZodString;
|
|
22
|
-
timeZone: z.ZodString;
|
|
23
|
-
currency: z.ZodString;
|
|
24
|
-
organization: z.ZodOptional<z.ZodString>;
|
|
25
|
-
avatar: z.ZodOptional<z.ZodEffects<z.ZodType<File, z.ZodTypeDef, File>, File, File>>;
|
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
email: string;
|
|
28
|
-
currency: string;
|
|
29
|
-
timeZone: string;
|
|
30
|
-
firstName: string;
|
|
31
|
-
lastName: string;
|
|
32
|
-
username: string;
|
|
33
|
-
phoneNumber: string;
|
|
34
|
-
state: string;
|
|
35
|
-
country: string;
|
|
36
|
-
address: string;
|
|
37
|
-
zipCode: string;
|
|
38
|
-
language: string;
|
|
39
|
-
organization?: string | undefined;
|
|
40
|
-
avatar?: File | undefined;
|
|
41
|
-
}, {
|
|
42
|
-
email: string;
|
|
43
|
-
currency: string;
|
|
44
|
-
timeZone: string;
|
|
45
|
-
firstName: string;
|
|
46
|
-
lastName: string;
|
|
47
|
-
username: string;
|
|
48
|
-
phoneNumber: string;
|
|
49
|
-
state: string;
|
|
50
|
-
country: string;
|
|
51
|
-
address: string;
|
|
52
|
-
zipCode: string;
|
|
53
|
-
language: string;
|
|
54
|
-
organization?: string | undefined;
|
|
55
|
-
avatar?: File | undefined;
|
|
56
|
-
}>;
|
|
57
|
-
declare const DeleteAccountSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
58
|
-
|
|
59
|
-
interface UserType {
|
|
60
|
-
id: string;
|
|
61
|
-
firstName: string;
|
|
62
|
-
lastName: string;
|
|
63
|
-
name: string;
|
|
64
|
-
username: string;
|
|
65
|
-
role: string;
|
|
66
|
-
avatar: string;
|
|
67
|
-
background: string;
|
|
68
|
-
status: string;
|
|
69
|
-
phoneNumber: string;
|
|
70
|
-
email: string;
|
|
71
|
-
state: string;
|
|
72
|
-
country: string;
|
|
73
|
-
address: string;
|
|
74
|
-
zipCode: string;
|
|
75
|
-
language: string;
|
|
76
|
-
timeZone: string;
|
|
77
|
-
currency: string;
|
|
78
|
-
organization: string;
|
|
79
|
-
twoFactorAuth: boolean;
|
|
80
|
-
loginAlerts: boolean;
|
|
81
|
-
accountReoveryOption?: "email" | "sms" | "codes";
|
|
82
|
-
connections: number;
|
|
83
|
-
followers: number;
|
|
84
|
-
}
|
|
85
|
-
type DeleteAccountFormType = z.infer<typeof DeleteAccountSchema>;
|
|
86
|
-
type ProfileInfoFormType = z.infer<typeof ProfileInfoSchema>;
|
|
87
|
-
|
|
88
|
-
interface ProfilePageProps {
|
|
89
|
-
user: UserType;
|
|
90
|
-
dictionary?: DictionaryType;
|
|
91
|
-
}
|
|
92
|
-
declare function ProfilePage({ user, dictionary }: ProfilePageProps): react_jsx_runtime.JSX.Element;
|
|
93
|
-
|
|
94
|
-
interface ProfileInfoProps {
|
|
95
|
-
user: UserType;
|
|
96
|
-
dictionary?: DictionaryType;
|
|
97
|
-
}
|
|
98
|
-
declare function ProfileInfo({ user, dictionary }: ProfileInfoProps): react_jsx_runtime.JSX.Element;
|
|
99
|
-
|
|
100
|
-
interface DangerousZoneProps {
|
|
101
|
-
user: UserType;
|
|
102
|
-
dictionary?: DictionaryType;
|
|
103
|
-
}
|
|
104
|
-
declare function DangerousZone({ user, dictionary }: DangerousZoneProps): react_jsx_runtime.JSX.Element;
|
|
105
|
-
|
|
106
|
-
interface ProfileInfoFormProps {
|
|
107
|
-
user: UserType;
|
|
108
|
-
dictionary?: DictionaryType;
|
|
109
|
-
}
|
|
110
|
-
declare function ProfileInfoForm({ user, dictionary }: ProfileInfoFormProps): react_jsx_runtime.JSX.Element;
|
|
111
|
-
|
|
112
|
-
interface DeleteAccountFormProps {
|
|
113
|
-
user: UserType;
|
|
114
|
-
dictionary?: DictionaryType;
|
|
115
|
-
}
|
|
116
|
-
declare function DeleteAccountForm({ user, dictionary }: DeleteAccountFormProps): react_jsx_runtime.JSX.Element;
|
|
117
|
-
|
|
118
|
-
interface UserPrismaClient {
|
|
119
|
-
user: any;
|
|
120
|
-
role: any;
|
|
121
|
-
department: any;
|
|
122
|
-
$transaction: (args: any) => Promise<any>;
|
|
123
|
-
}
|
|
124
|
-
interface GetUsersParams {
|
|
125
|
-
page?: number;
|
|
126
|
-
pageSize?: number;
|
|
127
|
-
search?: string;
|
|
128
|
-
status?: string;
|
|
129
|
-
roleCode?: string;
|
|
130
|
-
departmentId?: string;
|
|
131
|
-
}
|
|
132
|
-
interface UserWithDetails {
|
|
133
|
-
id: string;
|
|
134
|
-
name: string | null;
|
|
135
|
-
email: string;
|
|
136
|
-
image: string | null;
|
|
137
|
-
isActive: boolean;
|
|
138
|
-
createdAt: Date;
|
|
139
|
-
updatedAt: Date;
|
|
140
|
-
roles: {
|
|
141
|
-
code: string;
|
|
142
|
-
name: string;
|
|
143
|
-
}[];
|
|
144
|
-
department: {
|
|
145
|
-
id: string;
|
|
146
|
-
name: string;
|
|
147
|
-
code: string;
|
|
148
|
-
} | null;
|
|
149
|
-
jobTitle: {
|
|
150
|
-
id: string;
|
|
151
|
-
name: string;
|
|
152
|
-
code: string;
|
|
153
|
-
level: number;
|
|
154
|
-
} | null;
|
|
155
|
-
branches: {
|
|
156
|
-
id: string;
|
|
157
|
-
name: string;
|
|
158
|
-
isDefault: boolean;
|
|
159
|
-
}[];
|
|
160
|
-
branchIds: string[];
|
|
161
|
-
}
|
|
162
|
-
interface UsersStats {
|
|
163
|
-
totalUsers: number;
|
|
164
|
-
activeUsers: number;
|
|
165
|
-
inactiveUsers: number;
|
|
166
|
-
totalRoles: number;
|
|
167
|
-
employees: number;
|
|
168
|
-
customers: number;
|
|
169
|
-
suppliers: number;
|
|
170
|
-
}
|
|
171
|
-
interface UsersDataResponse extends CrudResponse<UserWithDetails> {
|
|
172
|
-
stats: UsersStats;
|
|
173
|
-
}
|
|
174
|
-
declare function getUsersData(db: UserPrismaClient, params: GetUsersParams): Promise<CrudResponse<any>>;
|
|
175
|
-
/**
|
|
176
|
-
* Get users with extended details including roles, department, and job title
|
|
177
|
-
*/
|
|
178
|
-
declare function getUsersWithDetails(db: UserPrismaClient, params: GetUsersParams): Promise<UsersDataResponse>;
|
|
179
|
-
/**
|
|
180
|
-
* Get all active roles for filter dropdown
|
|
181
|
-
*/
|
|
182
|
-
declare function getActiveRoles(db: UserPrismaClient): Promise<any>;
|
|
183
|
-
/**
|
|
184
|
-
* Get all active departments for filter dropdown
|
|
185
|
-
*/
|
|
186
|
-
declare function getActiveDepartments(db: UserPrismaClient): Promise<any>;
|
|
187
|
-
/**
|
|
188
|
-
* Get user statistics
|
|
189
|
-
*/
|
|
190
|
-
declare function getUserStats(db: UserPrismaClient): Promise<{
|
|
191
|
-
totalUsers: any;
|
|
192
|
-
activeUsers: any;
|
|
193
|
-
inactiveUsers: number;
|
|
194
|
-
totalRoles: any;
|
|
195
|
-
employees: number;
|
|
196
|
-
customers: any;
|
|
197
|
-
suppliers: any;
|
|
198
|
-
}>;
|
|
199
|
-
/**
|
|
200
|
-
* Get user profile by ID
|
|
201
|
-
*/
|
|
202
|
-
declare function getUserProfile(db: UserPrismaClient, userId: string): Promise<{
|
|
203
|
-
id: any;
|
|
204
|
-
firstName: any;
|
|
205
|
-
lastName: any;
|
|
206
|
-
name: any;
|
|
207
|
-
username: any;
|
|
208
|
-
email: any;
|
|
209
|
-
avatar: any;
|
|
210
|
-
role: any;
|
|
211
|
-
background: string;
|
|
212
|
-
status: string;
|
|
213
|
-
phoneNumber: any;
|
|
214
|
-
state: string;
|
|
215
|
-
country: string;
|
|
216
|
-
address: any;
|
|
217
|
-
zipCode: string;
|
|
218
|
-
language: string;
|
|
219
|
-
timeZone: string;
|
|
220
|
-
currency: string;
|
|
221
|
-
organization: string;
|
|
222
|
-
twoFactorAuth: boolean;
|
|
223
|
-
loginAlerts: boolean;
|
|
224
|
-
connections: number;
|
|
225
|
-
followers: number;
|
|
226
|
-
} | null>;
|
|
227
|
-
|
|
228
|
-
export { DangerousZone, DeleteAccountForm, type DeleteAccountFormType, DeleteAccountSchema, type GetUsersParams, MAX_AVATAR_SIZE, ProfileInfo, ProfileInfoForm, type ProfileInfoFormType, ProfileInfoSchema, ProfilePage, type ProfilePageProps, type UserPrismaClient, type UserType, type UserWithDetails, type UsersDataResponse, type UsersStats, fomratedAvatarSize, getActiveDepartments, getActiveRoles, getUserProfile, getUserStats, getUsersData, getUsersWithDetails };
|