@flusys/ng-auth 1.0.0-beta → 1.0.0
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/README.md +362 -21
- package/fesm2022/flusys-ng-auth.mjs +3011 -1746
- package/fesm2022/flusys-ng-auth.mjs.map +1 -1
- package/package.json +11 -11
- package/types/flusys-ng-auth.d.ts +348 -674
|
@@ -1,25 +1,19 @@
|
|
|
1
|
-
import { IMessageResponse, ApiResourceService, ISingleResponse,
|
|
1
|
+
import { IMessageResponse, ApiResourceService, ISingleResponse, ICompanyApiProvider, IListResponse, ICompanyBasicInfo, IAuthStateProvider, IUserPermissionProvider, IUserProvider, IUserBasicInfo, IProfileRoleInfo, IProfileActionInfo, UploadFileFn } from '@flusys/ng-shared';
|
|
2
2
|
import * as rxjs from 'rxjs';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import * as _angular_core from '@angular/core';
|
|
5
|
-
import { Signal, Provider
|
|
5
|
+
import { Signal, Provider } from '@angular/core';
|
|
6
6
|
import { HttpClient, HttpRequest, HttpHandlerFn, HttpEvent } from '@angular/common/http';
|
|
7
7
|
import { CanActivateFn, Routes } from '@angular/router';
|
|
8
8
|
import { ILayoutAuthApi, ICompanyInfo as ICompanyInfo$1, IBranchInfo as IBranchInfo$1, ILayoutAuthState, IUserInfo as IUserInfo$1 } from '@flusys/ng-layout';
|
|
9
9
|
import * as _angular_forms_signals from '@angular/forms/signals';
|
|
10
10
|
import * as _flusys_ng_auth from '@flusys/ng-auth';
|
|
11
|
+
import * as _flusys_ng_core from '@flusys/ng-core';
|
|
11
12
|
|
|
12
|
-
/**
|
|
13
|
-
* Login Request Interface
|
|
14
|
-
*/
|
|
15
13
|
interface ILoginRequest {
|
|
16
14
|
email: string;
|
|
17
15
|
password: string;
|
|
18
16
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Registration Request Interface
|
|
21
|
-
* Supports both simple registration and company-based registration
|
|
22
|
-
*/
|
|
23
17
|
interface IRegistrationRequest {
|
|
24
18
|
name: string;
|
|
25
19
|
email: string;
|
|
@@ -31,120 +25,75 @@ interface IRegistrationRequest {
|
|
|
31
25
|
newCompanyPhone?: string;
|
|
32
26
|
newCompanyAddress?: string;
|
|
33
27
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Select Company & Branch Request Interface
|
|
36
|
-
* Used after login when user needs to select company and branch
|
|
37
|
-
*/
|
|
38
28
|
interface ISelectRequest {
|
|
39
29
|
sessionId: string;
|
|
40
30
|
companyId: string;
|
|
41
31
|
branchId: string;
|
|
42
32
|
}
|
|
43
|
-
/**
|
|
44
|
-
* Switch Company Request Interface
|
|
45
|
-
* Used to switch company/branch after login
|
|
46
|
-
*/
|
|
47
33
|
interface ISwitchCompanyRequest {
|
|
48
34
|
companyId: string;
|
|
49
35
|
branchId: string;
|
|
50
36
|
}
|
|
51
|
-
/**
|
|
52
|
-
* Change Password Request Interface
|
|
53
|
-
*/
|
|
54
37
|
interface IChangePasswordRequest {
|
|
55
38
|
currentPassword: string;
|
|
56
39
|
newPassword: string;
|
|
57
40
|
}
|
|
58
|
-
/**
|
|
59
|
-
* User Info Interface (used in responses)
|
|
60
|
-
*/
|
|
61
41
|
interface IUserInfo {
|
|
62
42
|
id: string;
|
|
63
43
|
email: string;
|
|
64
44
|
name?: string;
|
|
45
|
+
phone?: string | null;
|
|
65
46
|
profilePictureId?: string | null;
|
|
66
47
|
companyId?: string;
|
|
67
48
|
branchId?: string;
|
|
68
49
|
companyLogoId?: string;
|
|
69
50
|
branchLogoId?: string;
|
|
70
51
|
}
|
|
71
|
-
/**
|
|
72
|
-
* Company Info Interface (used in responses)
|
|
73
|
-
*/
|
|
74
52
|
interface ICompanyInfo {
|
|
75
53
|
id: string;
|
|
76
54
|
name: string;
|
|
77
55
|
slug?: string;
|
|
78
56
|
logoId?: string | null;
|
|
79
57
|
}
|
|
80
|
-
/**
|
|
81
|
-
* Branch Info Interface (used in responses)
|
|
82
|
-
*/
|
|
83
58
|
interface IBranchInfo {
|
|
84
59
|
id: string;
|
|
85
60
|
name: string;
|
|
86
61
|
slug?: string;
|
|
87
62
|
logoId?: string | null;
|
|
88
63
|
}
|
|
89
|
-
/**
|
|
90
|
-
* Branch Selection Info Interface (with additional fields)
|
|
91
|
-
*/
|
|
92
64
|
interface IBranchSelectionInfo {
|
|
93
65
|
id: string;
|
|
94
66
|
name: string;
|
|
95
67
|
slug: string;
|
|
96
|
-
isActive: boolean;
|
|
97
68
|
logoId?: string | null;
|
|
98
69
|
}
|
|
99
|
-
/**
|
|
100
|
-
* Company with Branches Interface (for selection response)
|
|
101
|
-
*/
|
|
102
70
|
interface ICompanyWithBranches {
|
|
103
71
|
id: string;
|
|
104
72
|
name: string;
|
|
105
73
|
slug: string;
|
|
106
|
-
isActive: boolean;
|
|
107
74
|
logoId?: string | null;
|
|
108
75
|
branches: IBranchSelectionInfo[];
|
|
109
76
|
}
|
|
110
|
-
/**
|
|
111
|
-
* Login Response Interface
|
|
112
|
-
* Returned on successful login with tokens
|
|
113
|
-
*/
|
|
114
77
|
interface ILoginResponse {
|
|
115
78
|
accessToken: string;
|
|
116
79
|
refreshToken: string;
|
|
117
80
|
user: IUserInfo;
|
|
118
81
|
company?: ICompanyInfo;
|
|
119
82
|
branch?: IBranchInfo;
|
|
120
|
-
companyFeatureEnabled?: boolean;
|
|
121
83
|
}
|
|
122
|
-
/**
|
|
123
|
-
* Me Response Interface
|
|
124
|
-
* Returned by GET /auth/me endpoint
|
|
125
|
-
* Contains only user data, no tokens
|
|
126
|
-
*/
|
|
127
84
|
interface IMeResponse {
|
|
128
85
|
user: IUserInfo;
|
|
129
86
|
company?: ICompanyInfo;
|
|
130
87
|
branch?: IBranchInfo;
|
|
131
88
|
}
|
|
132
|
-
/**
|
|
133
|
-
* Registration Response Interface
|
|
134
|
-
* Returned on successful registration
|
|
135
|
-
*/
|
|
136
89
|
interface IRegistrationResponse {
|
|
137
|
-
accessToken
|
|
138
|
-
refreshToken
|
|
90
|
+
accessToken?: string;
|
|
91
|
+
refreshToken?: string;
|
|
139
92
|
user: IUserInfo;
|
|
140
93
|
company?: ICompanyInfo;
|
|
141
94
|
branch?: IBranchInfo;
|
|
142
|
-
|
|
95
|
+
requiresEmailVerification?: boolean;
|
|
143
96
|
}
|
|
144
|
-
/**
|
|
145
|
-
* Company Selection Response Interface
|
|
146
|
-
* Returned when user has multiple companies/branches to choose from
|
|
147
|
-
*/
|
|
148
97
|
interface ICompanySelectionResponse {
|
|
149
98
|
requiresSelection: true;
|
|
150
99
|
sessionId: string;
|
|
@@ -152,29 +101,20 @@ interface ICompanySelectionResponse {
|
|
|
152
101
|
user: IUserInfo;
|
|
153
102
|
companies: ICompanyWithBranches[];
|
|
154
103
|
}
|
|
155
|
-
/**
|
|
156
|
-
* Refresh Token Response Interface
|
|
157
|
-
*/
|
|
158
104
|
interface IRefreshTokenResponse {
|
|
159
105
|
accessToken: string;
|
|
160
106
|
refreshToken?: string;
|
|
161
107
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
108
|
+
interface ILoginRequiresEmailVerification {
|
|
109
|
+
requiresEmailVerification: true;
|
|
110
|
+
email: string;
|
|
111
|
+
message: string;
|
|
112
|
+
}
|
|
113
|
+
type AuthResponse = ILoginResponse | ICompanySelectionResponse | ILoginRequiresEmailVerification;
|
|
114
|
+
declare function isEmailVerificationRequired(response: AuthResponse): response is ILoginRequiresEmailVerification;
|
|
169
115
|
declare function isCompanySelectionResponse(response: AuthResponse): response is ICompanySelectionResponse;
|
|
170
|
-
/**
|
|
171
|
-
* Type guard to check if response is a successful login
|
|
172
|
-
*/
|
|
173
116
|
declare function isLoginResponse(response: AuthResponse): response is ILoginResponse;
|
|
174
117
|
|
|
175
|
-
/**
|
|
176
|
-
* Create Company Branch Request Interface
|
|
177
|
-
*/
|
|
178
118
|
interface ICreateBranchRequest {
|
|
179
119
|
name: string;
|
|
180
120
|
slug: string;
|
|
@@ -188,15 +128,9 @@ interface ICreateBranchRequest {
|
|
|
188
128
|
isActive?: boolean;
|
|
189
129
|
additionalFields?: Record<string, unknown>;
|
|
190
130
|
}
|
|
191
|
-
/**
|
|
192
|
-
* Update Company Branch Request Interface
|
|
193
|
-
*/
|
|
194
131
|
interface IUpdateBranchRequest extends Partial<Omit<ICreateBranchRequest, 'companyId'>> {
|
|
195
132
|
id: string;
|
|
196
133
|
}
|
|
197
|
-
/**
|
|
198
|
-
* Company Branch Response Interface
|
|
199
|
-
*/
|
|
200
134
|
interface IBranch {
|
|
201
135
|
id: string;
|
|
202
136
|
name: string;
|
|
@@ -215,9 +149,6 @@ interface IBranch {
|
|
|
215
149
|
updatedAt: Date | string;
|
|
216
150
|
}
|
|
217
151
|
|
|
218
|
-
/**
|
|
219
|
-
* Create Company Request Interface
|
|
220
|
-
*/
|
|
221
152
|
interface ICreateCompanyRequest {
|
|
222
153
|
name: string;
|
|
223
154
|
slug: string;
|
|
@@ -231,15 +162,9 @@ interface ICreateCompanyRequest {
|
|
|
231
162
|
settings?: Record<string, unknown>;
|
|
232
163
|
additionalFields?: Record<string, unknown>;
|
|
233
164
|
}
|
|
234
|
-
/**
|
|
235
|
-
* Update Company Request Interface
|
|
236
|
-
*/
|
|
237
165
|
interface IUpdateCompanyRequest extends Partial<ICreateCompanyRequest> {
|
|
238
166
|
id: string;
|
|
239
167
|
}
|
|
240
|
-
/**
|
|
241
|
-
* Company Response Interface
|
|
242
|
-
*/
|
|
243
168
|
interface ICompany {
|
|
244
169
|
id: string;
|
|
245
170
|
name: string;
|
|
@@ -258,88 +183,48 @@ interface ICompany {
|
|
|
258
183
|
updatedAt: Date | string;
|
|
259
184
|
}
|
|
260
185
|
|
|
261
|
-
/**
|
|
262
|
-
* Permission item for batch assignment/revocation
|
|
263
|
-
*/
|
|
264
186
|
interface IPermissionItem {
|
|
265
|
-
/** Target ID (Company ID or Branch ID) */
|
|
266
187
|
targetId: string;
|
|
267
|
-
/** Action: true to add permission, false to remove permission */
|
|
268
188
|
isAdd: boolean;
|
|
269
189
|
}
|
|
270
|
-
/**
|
|
271
|
-
* Batch assign/revoke user-company permissions request
|
|
272
|
-
*/
|
|
273
190
|
interface IAssignUserCompanyRequest {
|
|
274
|
-
/** User ID to assign/revoke permissions for */
|
|
275
191
|
userId: string;
|
|
276
|
-
/** List of company permissions to add or remove */
|
|
277
192
|
items: IPermissionItem[];
|
|
278
193
|
}
|
|
279
|
-
/**
|
|
280
|
-
* Batch assign/revoke user-branch permissions request
|
|
281
|
-
*/
|
|
282
194
|
interface IAssignUserBranchRequest {
|
|
283
|
-
/** User ID to assign/revoke permissions for */
|
|
284
195
|
userId: string;
|
|
285
|
-
/** List of branch permissions to add or remove */
|
|
286
196
|
items: IPermissionItem[];
|
|
287
197
|
}
|
|
288
|
-
/**
|
|
289
|
-
* User company permission with populated company details
|
|
290
|
-
*/
|
|
291
198
|
interface IUserCompanyPermission {
|
|
292
|
-
/** Permission ID */
|
|
293
199
|
id: string;
|
|
294
|
-
/** User ID */
|
|
295
200
|
userId: string;
|
|
296
|
-
/** Company ID */
|
|
297
201
|
companyId: string;
|
|
298
|
-
/** Company name */
|
|
299
202
|
companyName: string;
|
|
300
|
-
/** Company slug */
|
|
301
203
|
companySlug: string;
|
|
302
204
|
}
|
|
303
|
-
/**
|
|
304
|
-
* User branch permission with populated branch details
|
|
305
|
-
*/
|
|
306
205
|
interface IUserBranchPermission {
|
|
307
|
-
/** Permission ID */
|
|
308
206
|
id: string;
|
|
309
|
-
/** User ID */
|
|
310
207
|
userId: string;
|
|
311
|
-
/** Branch ID */
|
|
312
208
|
branchId: string;
|
|
313
|
-
/** Branch name */
|
|
314
209
|
branchName: string;
|
|
315
|
-
/** Branch slug */
|
|
316
210
|
branchSlug: string;
|
|
317
|
-
/** Company ID this branch belongs to */
|
|
318
211
|
companyId: string;
|
|
319
212
|
}
|
|
320
|
-
/**
|
|
321
|
-
* Response for user companies
|
|
322
|
-
*/
|
|
323
213
|
interface IUserCompaniesResponse {
|
|
214
|
+
success: boolean;
|
|
215
|
+
message: string;
|
|
324
216
|
data: IUserCompanyPermission[];
|
|
325
217
|
}
|
|
326
|
-
/**
|
|
327
|
-
* Response for user branches
|
|
328
|
-
*/
|
|
329
218
|
interface IUserBranchesResponse {
|
|
219
|
+
success: boolean;
|
|
220
|
+
message: string;
|
|
330
221
|
data: IUserBranchPermission[];
|
|
331
222
|
}
|
|
332
|
-
/**
|
|
333
|
-
* Batch operation result response
|
|
334
|
-
*/
|
|
335
223
|
interface IBatchOperationResponse {
|
|
336
224
|
success: boolean;
|
|
337
225
|
message: string;
|
|
338
226
|
}
|
|
339
227
|
|
|
340
|
-
/**
|
|
341
|
-
* Create User Request Interface
|
|
342
|
-
*/
|
|
343
228
|
interface ICreateUserRequest {
|
|
344
229
|
name: string;
|
|
345
230
|
email: string;
|
|
@@ -351,14 +236,12 @@ interface ICreateUserRequest {
|
|
|
351
236
|
phoneVerified?: boolean;
|
|
352
237
|
additionalFields?: Record<string, unknown>;
|
|
353
238
|
}
|
|
354
|
-
/**
|
|
355
|
-
* Update User Request Interface
|
|
356
|
-
*/
|
|
357
239
|
interface IUpdateUserRequest {
|
|
358
240
|
id: string;
|
|
359
241
|
name?: string;
|
|
360
242
|
email?: string;
|
|
361
243
|
password?: string;
|
|
244
|
+
oldPassword?: string;
|
|
362
245
|
phone?: string;
|
|
363
246
|
profilePictureId?: string;
|
|
364
247
|
isActive?: boolean;
|
|
@@ -366,9 +249,6 @@ interface IUpdateUserRequest {
|
|
|
366
249
|
phoneVerified?: boolean;
|
|
367
250
|
additionalFields?: Record<string, unknown>;
|
|
368
251
|
}
|
|
369
|
-
/**
|
|
370
|
-
* User Response Interface
|
|
371
|
-
*/
|
|
372
252
|
interface IUser {
|
|
373
253
|
id: string;
|
|
374
254
|
name: string;
|
|
@@ -445,6 +325,16 @@ declare class AuthApiService {
|
|
|
445
325
|
* Reset password with token
|
|
446
326
|
*/
|
|
447
327
|
resetPassword(token: string, newPassword: string): Observable<IMessageResponse>;
|
|
328
|
+
/**
|
|
329
|
+
* Resend verification email (unauthenticated)
|
|
330
|
+
*/
|
|
331
|
+
resendVerification(email: string): Observable<IMessageResponse>;
|
|
332
|
+
/**
|
|
333
|
+
* Verify email with token
|
|
334
|
+
* Returns IMessageResponse for existing user verification
|
|
335
|
+
* Returns IRegistrationResponse for pending registration completion
|
|
336
|
+
*/
|
|
337
|
+
verifyEmail(token: string): Observable<IMessageResponse | IRegistrationResponse>;
|
|
448
338
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthApiService, never>;
|
|
449
339
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthApiService>;
|
|
450
340
|
}
|
|
@@ -494,29 +384,54 @@ declare class AuthInitService {
|
|
|
494
384
|
declare class AuthStateService {
|
|
495
385
|
private readonly appConfig;
|
|
496
386
|
private readonly router;
|
|
497
|
-
readonly
|
|
498
|
-
readonly
|
|
499
|
-
readonly
|
|
500
|
-
readonly
|
|
501
|
-
readonly
|
|
502
|
-
readonly
|
|
503
|
-
readonly
|
|
387
|
+
private readonly platform;
|
|
388
|
+
private readonly _user;
|
|
389
|
+
private readonly _accessToken;
|
|
390
|
+
private readonly _tokenExpiresAt;
|
|
391
|
+
private readonly _company;
|
|
392
|
+
private readonly _branch;
|
|
393
|
+
readonly user: _angular_core.Signal<IUserInfo | null>;
|
|
394
|
+
readonly accessToken: _angular_core.Signal<string>;
|
|
395
|
+
readonly tokenExpiresAt: _angular_core.Signal<number | null>;
|
|
396
|
+
readonly company: _angular_core.Signal<ICompanyInfo | null>;
|
|
397
|
+
readonly branch: _angular_core.Signal<IBranchInfo | null>;
|
|
398
|
+
private readonly _selectionSessionId;
|
|
399
|
+
private readonly _availableCompanies;
|
|
400
|
+
private readonly _selectionExpiresAt;
|
|
401
|
+
readonly selectionSessionId: _angular_core.Signal<string | null>;
|
|
402
|
+
readonly availableCompanies: _angular_core.Signal<ICompanyWithBranches[]>;
|
|
504
403
|
readonly isAuthenticated: _angular_core.Signal<boolean>;
|
|
505
404
|
readonly requiresCompanySelection: _angular_core.Signal<boolean>;
|
|
506
405
|
readonly userName: _angular_core.Signal<string>;
|
|
507
406
|
readonly companyName: _angular_core.Signal<string>;
|
|
508
407
|
readonly branchName: _angular_core.Signal<string>;
|
|
408
|
+
/**
|
|
409
|
+
* Check if token is expired or will expire soon (within 30 seconds).
|
|
410
|
+
* Used to proactively refresh token before requests fail.
|
|
411
|
+
*/
|
|
412
|
+
readonly isTokenExpired: _angular_core.Signal<boolean>;
|
|
509
413
|
readonly tenantId: _angular_core.Signal<string | null>;
|
|
510
414
|
constructor();
|
|
511
415
|
setLoginState(response: ILoginResponse): void;
|
|
512
416
|
setSelectionState(response: ICompanySelectionResponse): void;
|
|
513
417
|
clearSelectionState(): void;
|
|
514
418
|
resetState(): void;
|
|
419
|
+
setUser(user: IUserInfo | null): void;
|
|
420
|
+
setAccessToken(token: string): void;
|
|
421
|
+
setCompany(company: ICompanyInfo | null): void;
|
|
422
|
+
setBranch(branch: IBranchInfo | null): void;
|
|
515
423
|
navigateToLogin(returnUrl?: string): void;
|
|
516
424
|
navigateAfterLogin(returnUrl?: string): void;
|
|
425
|
+
/** Validates a return URL to prevent open redirect attacks */
|
|
426
|
+
private isValidReturnUrl;
|
|
517
427
|
getStoredCompanyId(): string | null;
|
|
518
428
|
getStoredBranchId(): string | null;
|
|
519
429
|
private loadFromStorage;
|
|
430
|
+
/**
|
|
431
|
+
* Decode JWT expiry without verification (client-side only).
|
|
432
|
+
* Returns expiry timestamp in milliseconds.
|
|
433
|
+
*/
|
|
434
|
+
private decodeTokenExpiry;
|
|
520
435
|
private store;
|
|
521
436
|
private get;
|
|
522
437
|
private remove;
|
|
@@ -527,45 +442,11 @@ declare class AuthStateService {
|
|
|
527
442
|
/**
|
|
528
443
|
* Branch API Service
|
|
529
444
|
* Signal-based service for branch CRUD operations
|
|
530
|
-
* Branches default to current company context
|
|
531
|
-
*
|
|
532
|
-
* @example
|
|
533
|
-
* ```typescript
|
|
534
|
-
* branchService = inject(BranchApiService);
|
|
535
|
-
*
|
|
536
|
-
* // Set current company context
|
|
537
|
-
* branchService.setCurrentCompanyId('company-uuid');
|
|
538
|
-
*
|
|
539
|
-
* // Access data via signals
|
|
540
|
-
* branches = this.branchService.data;
|
|
541
|
-
* isLoading = this.branchService.isLoading;
|
|
542
|
-
*
|
|
543
|
-
* // Fetch branches (will filter by current company)
|
|
544
|
-
* this.branchService.fetchList('search');
|
|
545
|
-
*
|
|
546
|
-
* // Create branch (companyId will be auto-set if not provided)
|
|
547
|
-
* await this.branchService.insertBranch({ name: 'New Branch', slug: 'new-branch' });
|
|
548
|
-
* ```
|
|
549
445
|
*/
|
|
550
446
|
declare class BranchApiService extends ApiResourceService<ICreateBranchRequest | IUpdateBranchRequest, IBranch> {
|
|
551
|
-
|
|
552
|
-
readonly currentCompanyId: _angular_core.WritableSignal<string | null>;
|
|
553
|
-
/** Branches filtered by current company */
|
|
554
|
-
readonly companyBranches: _angular_core.Signal<IBranch[]>;
|
|
447
|
+
private readonly _currentCompanyId;
|
|
555
448
|
constructor(http: HttpClient);
|
|
556
|
-
/**
|
|
557
|
-
* Set the current company context for branch operations
|
|
558
|
-
*/
|
|
559
449
|
setCurrentCompanyId(companyId: string | null): void;
|
|
560
|
-
/**
|
|
561
|
-
* Insert a new branch, auto-setting companyId if not provided
|
|
562
|
-
*/
|
|
563
|
-
insertBranch(data: Omit<ICreateBranchRequest, 'companyId'> & {
|
|
564
|
-
companyId?: string;
|
|
565
|
-
}): Promise<ReturnType<typeof this.insertAsync>>;
|
|
566
|
-
/**
|
|
567
|
-
* Fetch branches for a specific company
|
|
568
|
-
*/
|
|
569
450
|
fetchByCompany(companyId: string, search?: string): void;
|
|
570
451
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BranchApiService, never>;
|
|
571
452
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<BranchApiService>;
|
|
@@ -574,21 +455,6 @@ declare class BranchApiService extends ApiResourceService<ICreateBranchRequest |
|
|
|
574
455
|
/**
|
|
575
456
|
* Company API Service
|
|
576
457
|
* Signal-based service for company CRUD operations
|
|
577
|
-
*
|
|
578
|
-
* @example
|
|
579
|
-
* ```typescript
|
|
580
|
-
* companyService = inject(CompanyApiService);
|
|
581
|
-
*
|
|
582
|
-
* // Access data via signals
|
|
583
|
-
* companies = this.companyService.data;
|
|
584
|
-
* isLoading = this.companyService.isLoading;
|
|
585
|
-
*
|
|
586
|
-
* // Fetch companies
|
|
587
|
-
* this.companyService.fetchList('search', { pagination: { currentPage: 0, pageSize: 10 } });
|
|
588
|
-
*
|
|
589
|
-
* // Create company
|
|
590
|
-
* await this.companyService.insertAsync({ name: 'New Company', slug: 'new-company' });
|
|
591
|
-
* ```
|
|
592
458
|
*/
|
|
593
459
|
declare class CompanyApiService extends ApiResourceService<ICreateCompanyRequest | IUpdateCompanyRequest, ICompany> {
|
|
594
460
|
constructor(http: HttpClient);
|
|
@@ -598,40 +464,16 @@ declare class CompanyApiService extends ApiResourceService<ICreateCompanyRequest
|
|
|
598
464
|
|
|
599
465
|
/**
|
|
600
466
|
* Token Refresh State Service
|
|
601
|
-
*
|
|
602
|
-
*
|
|
603
|
-
* Replaces module-level state that would be shared across requests in SSR.
|
|
604
|
-
*
|
|
605
|
-
* @example
|
|
606
|
-
* ```typescript
|
|
607
|
-
* const refreshState = inject(TokenRefreshStateService);
|
|
608
|
-
*
|
|
609
|
-
* if (refreshState.isRefreshing()) {
|
|
610
|
-
* // Queue request
|
|
611
|
-
* } else {
|
|
612
|
-
* refreshState.startRefresh();
|
|
613
|
-
* // Perform refresh
|
|
614
|
-
* }
|
|
615
|
-
* ```
|
|
467
|
+
* Manages token refresh state for SSR-safe request queuing.
|
|
468
|
+
* Uses BehaviorSubject for RxJS interop (multi-subscriber async coordination).
|
|
616
469
|
*/
|
|
617
470
|
declare class TokenRefreshStateService {
|
|
618
|
-
/** Flag to track if token refresh is in progress */
|
|
619
471
|
private readonly _isRefreshing;
|
|
620
472
|
readonly isRefreshing: _angular_core.Signal<boolean>;
|
|
621
|
-
/** Subject to queue requests while refreshing */
|
|
622
473
|
private readonly _refreshTokenSubject;
|
|
623
474
|
readonly refreshTokenSubject$: rxjs.Observable<string | null>;
|
|
624
|
-
/**
|
|
625
|
-
* Mark refresh as started
|
|
626
|
-
*/
|
|
627
475
|
startRefresh(): void;
|
|
628
|
-
/**
|
|
629
|
-
* Mark refresh as completed and broadcast new token
|
|
630
|
-
*/
|
|
631
476
|
completeRefresh(newToken: string): void;
|
|
632
|
-
/**
|
|
633
|
-
* Mark refresh as failed
|
|
634
|
-
*/
|
|
635
477
|
failRefresh(): void;
|
|
636
478
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TokenRefreshStateService, never>;
|
|
637
479
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<TokenRefreshStateService>;
|
|
@@ -640,43 +482,9 @@ declare class TokenRefreshStateService {
|
|
|
640
482
|
/**
|
|
641
483
|
* User API Service
|
|
642
484
|
* Signal-based service for user CRUD operations
|
|
643
|
-
*
|
|
644
|
-
* @example
|
|
645
|
-
* ```typescript
|
|
646
|
-
* userService = inject(UserApiService);
|
|
647
|
-
*
|
|
648
|
-
* // Access data via signals
|
|
649
|
-
* users = this.userService.data;
|
|
650
|
-
* isLoading = this.userService.isLoading;
|
|
651
|
-
*
|
|
652
|
-
* // Fetch users
|
|
653
|
-
* this.userService.fetchList('search', { pagination: { currentPage: 0, pageSize: 10 } });
|
|
654
|
-
*
|
|
655
|
-
* // Create user
|
|
656
|
-
* await this.userService.insertAsync({
|
|
657
|
-
* name: 'John Doe',
|
|
658
|
-
* email: 'john@example.com',
|
|
659
|
-
* password: 'password123'
|
|
660
|
-
* });
|
|
661
|
-
* ```
|
|
662
485
|
*/
|
|
663
486
|
declare class UserApiService extends ApiResourceService<ICreateUserRequest | IUpdateUserRequest, IUser> {
|
|
664
487
|
constructor(http: HttpClient);
|
|
665
|
-
/**
|
|
666
|
-
* Verify user's email
|
|
667
|
-
*/
|
|
668
|
-
verifyEmail(userId: string): Observable<IMessageResponse>;
|
|
669
|
-
/**
|
|
670
|
-
* Verify user's phone
|
|
671
|
-
*/
|
|
672
|
-
verifyPhone(userId: string): Observable<IMessageResponse>;
|
|
673
|
-
/**
|
|
674
|
-
* Update user status (active/inactive)
|
|
675
|
-
*/
|
|
676
|
-
updateStatus(userId: string, isActive: boolean): Observable<IMessageResponse>;
|
|
677
|
-
/**
|
|
678
|
-
* Update current user's profile
|
|
679
|
-
*/
|
|
680
488
|
updateProfile(data: IUpdateUserRequest): Observable<ISingleResponse<IUser>>;
|
|
681
489
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserApiService, never>;
|
|
682
490
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<UserApiService>;
|
|
@@ -684,208 +492,37 @@ declare class UserApiService extends ApiResourceService<ICreateUserRequest | IUp
|
|
|
684
492
|
|
|
685
493
|
/**
|
|
686
494
|
* User Permission API Service
|
|
687
|
-
*
|
|
688
495
|
* Handles user-company and user-branch permission assignments.
|
|
689
|
-
* Uses batch operations for efficient permission management.
|
|
690
|
-
*
|
|
691
|
-
* Backend Endpoints:
|
|
692
|
-
* - POST /administration/permissions/user-company/assign - Batch assign/revoke company permissions
|
|
693
|
-
* - GET /administration/permissions/user-company?userId=xxx - Get user's companies
|
|
694
|
-
* - POST /administration/permissions/user-branch/assign - Batch assign/revoke branch permissions
|
|
695
|
-
* - GET /administration/permissions/user-branch?userId=xxx - Get user's branches
|
|
696
496
|
*/
|
|
697
497
|
declare class UserPermissionApiService {
|
|
698
498
|
private readonly appConfig;
|
|
699
499
|
private readonly http;
|
|
700
500
|
private readonly baseUrl;
|
|
701
|
-
constructor();
|
|
702
|
-
/**
|
|
703
|
-
* Batch assign/revoke user-company permissions
|
|
704
|
-
*
|
|
705
|
-
* @example
|
|
706
|
-
* // Add company permissions
|
|
707
|
-
* service.assignUserCompanies({
|
|
708
|
-
* userId: 'user-id',
|
|
709
|
-
* items: [
|
|
710
|
-
* { targetId: 'company-1', isAdd: true },
|
|
711
|
-
* { targetId: 'company-2', isAdd: true }
|
|
712
|
-
* ]
|
|
713
|
-
* });
|
|
714
|
-
*
|
|
715
|
-
* @example
|
|
716
|
-
* // Remove company permissions
|
|
717
|
-
* service.assignUserCompanies({
|
|
718
|
-
* userId: 'user-id',
|
|
719
|
-
* items: [
|
|
720
|
-
* { targetId: 'company-1', isAdd: false }
|
|
721
|
-
* ]
|
|
722
|
-
* });
|
|
723
|
-
*/
|
|
724
501
|
assignUserCompanies(data: IAssignUserCompanyRequest): Observable<IBatchOperationResponse>;
|
|
725
|
-
/**
|
|
726
|
-
* Assign single company to user (convenience method)
|
|
727
|
-
*/
|
|
728
502
|
assignUserToCompany(userId: string, companyId: string): Observable<IBatchOperationResponse>;
|
|
729
|
-
/**
|
|
730
|
-
* Revoke single company from user (convenience method)
|
|
731
|
-
*/
|
|
732
503
|
revokeUserFromCompany(userId: string, companyId: string): Observable<IBatchOperationResponse>;
|
|
733
|
-
/**
|
|
734
|
-
* Get user's company permissions
|
|
735
|
-
*
|
|
736
|
-
* @param userId - User ID to get companies for
|
|
737
|
-
* @returns Observable with user's company permissions
|
|
738
|
-
*/
|
|
739
504
|
getUserCompanies(userId: string): Observable<IUserCompaniesResponse>;
|
|
740
|
-
/**
|
|
741
|
-
* Batch assign/revoke user-branch permissions
|
|
742
|
-
*
|
|
743
|
-
* @example
|
|
744
|
-
* // Add branch permissions
|
|
745
|
-
* service.assignUserBranches({
|
|
746
|
-
* userId: 'user-id',
|
|
747
|
-
* items: [
|
|
748
|
-
* { targetId: 'branch-1', isAdd: true },
|
|
749
|
-
* { targetId: 'branch-2', isAdd: true }
|
|
750
|
-
* ]
|
|
751
|
-
* });
|
|
752
|
-
*
|
|
753
|
-
* @example
|
|
754
|
-
* // Remove branch permissions
|
|
755
|
-
* service.assignUserBranches({
|
|
756
|
-
* userId: 'user-id',
|
|
757
|
-
* items: [
|
|
758
|
-
* { targetId: 'branch-1', isAdd: false }
|
|
759
|
-
* ]
|
|
760
|
-
* });
|
|
761
|
-
*/
|
|
762
505
|
assignUserBranches(data: IAssignUserBranchRequest): Observable<IBatchOperationResponse>;
|
|
763
|
-
/**
|
|
764
|
-
* Assign single branch to user (convenience method)
|
|
765
|
-
*/
|
|
766
506
|
assignUserToBranch(userId: string, branchId: string): Observable<IBatchOperationResponse>;
|
|
767
|
-
/**
|
|
768
|
-
* Revoke single branch from user (convenience method)
|
|
769
|
-
*/
|
|
770
507
|
revokeUserFromBranch(userId: string, branchId: string): Observable<IBatchOperationResponse>;
|
|
771
|
-
|
|
772
|
-
* Get user's branch permissions
|
|
773
|
-
*
|
|
774
|
-
* @param userId - User ID to get branches for
|
|
775
|
-
* @returns Observable with user's branch permissions
|
|
776
|
-
*/
|
|
777
|
-
getUserBranches(userId: string): Observable<IUserBranchesResponse>;
|
|
508
|
+
getUserBranches(userId: string, companyId?: string): Observable<IUserBranchesResponse>;
|
|
778
509
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserPermissionApiService, never>;
|
|
779
510
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<UserPermissionApiService>;
|
|
780
511
|
}
|
|
781
512
|
|
|
782
|
-
/**
|
|
783
|
-
* Auth Guard
|
|
784
|
-
* Protects routes that require authentication.
|
|
785
|
-
*
|
|
786
|
-
* Session restoration is handled by guestGuard. This guard assumes
|
|
787
|
-
* the session has already been restored if user accessed login page first.
|
|
788
|
-
*
|
|
789
|
-
* Handles company feature:
|
|
790
|
-
* - If company feature enabled and no company selected, redirects to login
|
|
791
|
-
* (login page handles company selection as step 2)
|
|
792
|
-
* - If not authenticated, redirects to login
|
|
793
|
-
*
|
|
794
|
-
* @example
|
|
795
|
-
* ```typescript
|
|
796
|
-
* // In routes configuration
|
|
797
|
-
* {
|
|
798
|
-
* path: 'dashboard',
|
|
799
|
-
* loadComponent: () => import('./dashboard.component'),
|
|
800
|
-
* canActivate: [authGuard]
|
|
801
|
-
* }
|
|
802
|
-
* ```
|
|
803
|
-
*/
|
|
513
|
+
/** Protects routes requiring authentication */
|
|
804
514
|
declare const authGuard: CanActivateFn;
|
|
805
|
-
/**
|
|
806
|
-
* Guest Guard
|
|
807
|
-
* Protects auth routes (login, register) from authenticated users.
|
|
808
|
-
* Redirects authenticated users to home page.
|
|
809
|
-
*
|
|
810
|
-
* CRITICAL: Unlike old implementation, this guard RESTORES the session first
|
|
811
|
-
* before checking authentication. This handles the case when users directly
|
|
812
|
-
* navigate to /auth/login via browser URL while having valid refresh token.
|
|
813
|
-
*
|
|
814
|
-
* Flow:
|
|
815
|
-
* 1. Restore session (if needed) via AuthInitService.initialize()
|
|
816
|
-
* 2. Check if user is authenticated
|
|
817
|
-
* 3. If authenticated -> redirect to dashboard
|
|
818
|
-
* 4. If not authenticated -> allow access to login page
|
|
819
|
-
*
|
|
820
|
-
* @example
|
|
821
|
-
* ```typescript
|
|
822
|
-
* // In routes configuration
|
|
823
|
-
* {
|
|
824
|
-
* path: 'auth/login',
|
|
825
|
-
* loadComponent: () => import('./login.component'),
|
|
826
|
-
* canActivate: [guestGuard]
|
|
827
|
-
* }
|
|
828
|
-
* ```
|
|
829
|
-
*/
|
|
515
|
+
/** Protects auth routes from authenticated users, restores session first */
|
|
830
516
|
declare const guestGuard: CanActivateFn;
|
|
831
|
-
/**
|
|
832
|
-
* Company Feature Guard
|
|
833
|
-
* Protects routes that require company feature to be enabled.
|
|
834
|
-
* Redirects to home if company feature is disabled.
|
|
835
|
-
*
|
|
836
|
-
* Use this guard on company/branch management routes.
|
|
837
|
-
*
|
|
838
|
-
* @example
|
|
839
|
-
* ```typescript
|
|
840
|
-
* // In routes configuration
|
|
841
|
-
* {
|
|
842
|
-
* path: 'administration/company',
|
|
843
|
-
* loadComponent: () => import('./company-list.component'),
|
|
844
|
-
* canActivate: [authGuard, companyFeatureGuard]
|
|
845
|
-
* }
|
|
846
|
-
* ```
|
|
847
|
-
*/
|
|
517
|
+
/** Protects routes requiring company feature to be enabled */
|
|
848
518
|
declare const companyFeatureGuard: CanActivateFn;
|
|
849
519
|
|
|
850
520
|
/**
|
|
851
|
-
* Auth Interceptor
|
|
852
|
-
* Adds Authorization header and tenant header to HTTP requests.
|
|
853
|
-
*
|
|
854
|
-
* - Adds Bearer token for authenticated requests (including /auth/me)
|
|
855
|
-
* - Adds tenant header for multi-tenant mode
|
|
856
|
-
* - Adds withCredentials for auth endpoints (cookies)
|
|
857
|
-
*
|
|
858
|
-
* @example
|
|
859
|
-
* ```typescript
|
|
860
|
-
* // In app.config.ts
|
|
861
|
-
* provideHttpClient(
|
|
862
|
-
* withFetch(),
|
|
863
|
-
* withInterceptors([authInterceptor, tokenRefreshInterceptor])
|
|
864
|
-
* )
|
|
865
|
-
* ```
|
|
521
|
+
* Auth Interceptor - Adds auth headers and cookie credentials to requests
|
|
866
522
|
*/
|
|
867
523
|
declare function authInterceptor(req: HttpRequest<unknown>, next: HttpHandlerFn): Observable<HttpEvent<unknown>>;
|
|
868
524
|
|
|
869
|
-
/**
|
|
870
|
-
* Token Refresh Interceptor
|
|
871
|
-
* Handles 401 errors by refreshing the access token.
|
|
872
|
-
*
|
|
873
|
-
* - Intercepts 401 Unauthorized responses
|
|
874
|
-
* - Calls refresh token endpoint
|
|
875
|
-
* - Retries failed request with new token
|
|
876
|
-
* - Queues concurrent requests during refresh
|
|
877
|
-
* - Redirects to login on refresh failure
|
|
878
|
-
* - SSR-safe: Uses injectable service instead of module-level state
|
|
879
|
-
*
|
|
880
|
-
* @example
|
|
881
|
-
* ```typescript
|
|
882
|
-
* // In app.config.ts
|
|
883
|
-
* provideHttpClient(
|
|
884
|
-
* withFetch(),
|
|
885
|
-
* withInterceptors([authInterceptor, tokenRefreshInterceptor])
|
|
886
|
-
* )
|
|
887
|
-
* ```
|
|
888
|
-
*/
|
|
525
|
+
/** Token Refresh Interceptor - Proactive and reactive token refresh with request queuing */
|
|
889
526
|
declare function tokenRefreshInterceptor(req: HttpRequest<unknown>, next: HttpHandlerFn): Observable<HttpEvent<unknown>>;
|
|
890
527
|
|
|
891
528
|
/**
|
|
@@ -901,88 +538,56 @@ declare const AUTH_ROUTES: Routes;
|
|
|
901
538
|
* Uses tabbed interface - all under /administration with child routes
|
|
902
539
|
*/
|
|
903
540
|
declare const ADMINISTRATION_ROUTES: Routes;
|
|
541
|
+
/**
|
|
542
|
+
* Profile Routes Configuration
|
|
543
|
+
* Protected route for user profile management
|
|
544
|
+
*/
|
|
545
|
+
declare const PROFILE_ROUTES: Routes;
|
|
904
546
|
|
|
905
547
|
/**
|
|
906
|
-
* Auth Layout
|
|
907
|
-
*
|
|
908
|
-
*
|
|
548
|
+
* Auth Layout Provider Adapters
|
|
549
|
+
*
|
|
550
|
+
* Implements provider interfaces from ng-layout using ng-auth services.
|
|
551
|
+
* Bridges auth state and API to layout components.
|
|
552
|
+
*
|
|
553
|
+
* @example
|
|
554
|
+
* // In app.config.ts
|
|
555
|
+
* import { provideAuthLayoutIntegration } from '@flusys/ng-auth';
|
|
556
|
+
* providers: [...provideAuthLayoutIntegration()]
|
|
909
557
|
*/
|
|
910
558
|
declare class AuthLayoutStateAdapter implements ILayoutAuthState {
|
|
911
559
|
private readonly authState;
|
|
912
|
-
/**
|
|
913
|
-
* Maps company info to company info for layout.
|
|
914
|
-
* Falls back to app name from config when no company is selected.
|
|
915
|
-
*/
|
|
916
560
|
readonly currentCompanyInfo: Signal<ICompanyInfo$1 | null>;
|
|
917
|
-
/**
|
|
918
|
-
* Maps branch info to branch info for layout.
|
|
919
|
-
* Returns null when no branch is selected.
|
|
920
|
-
*/
|
|
921
561
|
readonly currentBranchInfo: Signal<IBranchInfo$1 | null>;
|
|
922
|
-
/**
|
|
923
|
-
* Maps user info from auth state to layout user info.
|
|
924
|
-
* Profile picture URL is managed separately by AuthLayoutSyncService via FileUrlService.
|
|
925
|
-
*/
|
|
926
562
|
readonly loginUserData: Signal<IUserInfo$1 | null>;
|
|
927
563
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthLayoutStateAdapter, never>;
|
|
928
564
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthLayoutStateAdapter>;
|
|
929
565
|
}
|
|
930
|
-
/**
|
|
931
|
-
* Auth Layout API Adapter
|
|
932
|
-
* Bridges AuthApiService to ILayoutAuthApi interface.
|
|
933
|
-
* Handles logout and navigation for layout components.
|
|
934
|
-
*/
|
|
935
566
|
declare class AuthLayoutApiAdapter implements ILayoutAuthApi {
|
|
936
567
|
private readonly authApi;
|
|
937
568
|
private readonly authState;
|
|
938
569
|
private readonly permissionApi;
|
|
939
570
|
private readonly router;
|
|
940
|
-
/**
|
|
941
|
-
* Logout the current user.
|
|
942
|
-
* Calls backend logout endpoint and resets local auth state.
|
|
943
|
-
* Auth state reset handles clearing all localStorage including company/branch.
|
|
944
|
-
*/
|
|
945
571
|
logOut(): Observable<any>;
|
|
946
|
-
/**
|
|
947
|
-
* Navigate to login page.
|
|
948
|
-
* Optionally preserves current URL as return URL.
|
|
949
|
-
*/
|
|
950
572
|
navigateLogin(withUrl?: boolean): void;
|
|
951
|
-
/**
|
|
952
|
-
* Switch to a different company and branch.
|
|
953
|
-
* Calls backend switch endpoint, then triggers full page reload to
|
|
954
|
-
* refresh permissions, reset component state, and re-filter all data.
|
|
955
|
-
*/
|
|
956
573
|
switchCompany(companyId: string, branchId: string): Observable<any>;
|
|
957
|
-
/**
|
|
958
|
-
* Get list of companies the logged-in user has permissions for.
|
|
959
|
-
* Uses permission API to filter by user's actual company-level permissions.
|
|
960
|
-
*/
|
|
961
574
|
getUserCompanies(): Observable<ICompanyInfo$1[]>;
|
|
962
|
-
/**
|
|
963
|
-
* Get branches for a specific company that the logged-in user has access to.
|
|
964
|
-
* Fetches all user branches and filters by companyId.
|
|
965
|
-
*/
|
|
966
575
|
getCompanyBranches(companyId: string): Observable<IBranchInfo$1[]>;
|
|
967
576
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthLayoutApiAdapter, never>;
|
|
968
577
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthLayoutApiAdapter>;
|
|
969
578
|
}
|
|
970
579
|
|
|
971
580
|
/**
|
|
972
|
-
* Auth
|
|
581
|
+
* Auth Shared Provider Adapters
|
|
973
582
|
*
|
|
974
|
-
* Implements
|
|
975
|
-
*
|
|
583
|
+
* Implements provider interfaces from ng-shared using ng-auth services.
|
|
584
|
+
* Allows IAM, Storage, and Form-Builder packages to access auth data
|
|
585
|
+
* without depending on ng-auth directly.
|
|
976
586
|
*
|
|
977
587
|
* @example
|
|
978
588
|
* // In app.config.ts
|
|
979
|
-
*
|
|
980
|
-
*
|
|
981
|
-
* ]
|
|
982
|
-
*
|
|
983
|
-
* // In IAM component
|
|
984
|
-
* private readonly userProvider = inject(USER_PROVIDER);
|
|
985
|
-
* this.userProvider.getUsers({ page: 0, pageSize: 50 }).subscribe(...);
|
|
589
|
+
* import { provideAuthProviders } from '@flusys/ng-auth';
|
|
590
|
+
* providers: [...provideAuthProviders()]
|
|
986
591
|
*/
|
|
987
592
|
declare class AuthUserProviderAdapter implements IUserProvider {
|
|
988
593
|
private readonly userApi;
|
|
@@ -998,19 +603,6 @@ declare class AuthUserProviderAdapter implements IUserProvider {
|
|
|
998
603
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthUserProviderAdapter, never>;
|
|
999
604
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthUserProviderAdapter>;
|
|
1000
605
|
}
|
|
1001
|
-
|
|
1002
|
-
/**
|
|
1003
|
-
* Auth Company API Provider Adapter
|
|
1004
|
-
*
|
|
1005
|
-
* Implements ICompanyApiProvider interface from ng-shared using CompanyApiService.
|
|
1006
|
-
* Allows IAM package to access company data without depending on ng-auth directly.
|
|
1007
|
-
*
|
|
1008
|
-
* @example
|
|
1009
|
-
* // In app.config.ts
|
|
1010
|
-
* providers: [
|
|
1011
|
-
* { provide: COMPANY_API_PROVIDER, useClass: AuthCompanyApiProviderAdapter }
|
|
1012
|
-
* ]
|
|
1013
|
-
*/
|
|
1014
606
|
declare class AuthCompanyApiProviderAdapter implements ICompanyApiProvider {
|
|
1015
607
|
private readonly companyApi;
|
|
1016
608
|
getCompanies(filter?: {
|
|
@@ -1021,64 +613,25 @@ declare class AuthCompanyApiProviderAdapter implements ICompanyApiProvider {
|
|
|
1021
613
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthCompanyApiProviderAdapter, never>;
|
|
1022
614
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthCompanyApiProviderAdapter>;
|
|
1023
615
|
}
|
|
1024
|
-
|
|
1025
|
-
/**
|
|
1026
|
-
* Auth User Permission Provider Adapter
|
|
1027
|
-
*
|
|
1028
|
-
* Implements IUserPermissionProvider interface from ng-shared using UserPermissionApiService.
|
|
1029
|
-
* Allows IAM package to query user permissions without depending on ng-auth directly.
|
|
1030
|
-
*
|
|
1031
|
-
* @example
|
|
1032
|
-
* // In app.config.ts
|
|
1033
|
-
* providers: [
|
|
1034
|
-
* { provide: USER_PERMISSION_PROVIDER, useClass: AuthUserPermissionProviderAdapter }
|
|
1035
|
-
* ]
|
|
1036
|
-
*/
|
|
1037
616
|
declare class AuthUserPermissionProviderAdapter implements IUserPermissionProvider {
|
|
1038
617
|
private readonly userPermissionApi;
|
|
1039
|
-
getUserBranchPermissions(userId: string): Observable<ISingleResponse<any>>;
|
|
618
|
+
getUserBranchPermissions(userId: string, companyId?: string): Observable<ISingleResponse<any>>;
|
|
1040
619
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthUserPermissionProviderAdapter, never>;
|
|
1041
620
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthUserPermissionProviderAdapter>;
|
|
1042
621
|
}
|
|
622
|
+
declare class AuthStateProviderAdapter implements IAuthStateProvider {
|
|
623
|
+
private readonly authState;
|
|
624
|
+
private readonly authInit;
|
|
625
|
+
get isAuthenticated(): Signal<boolean>;
|
|
626
|
+
initialize(): Observable<void>;
|
|
627
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthStateProviderAdapter, never>;
|
|
628
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthStateProviderAdapter>;
|
|
629
|
+
}
|
|
1043
630
|
|
|
1044
|
-
/**
|
|
1045
|
-
* Provides auth layout integration for ng-layout.
|
|
1046
|
-
* Call this in your app.config.ts to integrate ng-auth with ng-layout.
|
|
1047
|
-
*
|
|
1048
|
-
* Also registers LAYOUT_AUTH_STATE since AuthLayoutStateAdapter
|
|
1049
|
-
* implements both ILayoutAuthState and ICompanyContextProvider.
|
|
1050
|
-
*
|
|
1051
|
-
* @example
|
|
1052
|
-
* ```typescript
|
|
1053
|
-
* // In app.config.ts
|
|
1054
|
-
* export const appConfig: ApplicationConfig = {
|
|
1055
|
-
* providers: [
|
|
1056
|
-
* ...provideAuthLayoutIntegration(),
|
|
1057
|
-
* ],
|
|
1058
|
-
* };
|
|
1059
|
-
* ```
|
|
1060
|
-
*/
|
|
631
|
+
/** Provides auth integration for ng-layout */
|
|
1061
632
|
declare function provideAuthLayoutIntegration(): Provider[];
|
|
1062
633
|
|
|
1063
|
-
/**
|
|
1064
|
-
* Provide Auth Provider Adapters
|
|
1065
|
-
*
|
|
1066
|
-
* Registers auth implementations for provider interfaces from ng-shared.
|
|
1067
|
-
* This allows IAM and Storage packages to use auth services without direct dependencies.
|
|
1068
|
-
*
|
|
1069
|
-
* @example
|
|
1070
|
-
* // In app.config.ts
|
|
1071
|
-
* import { provideAuthProviders } from '@flusys/ng-auth';
|
|
1072
|
-
*
|
|
1073
|
-
* export const appConfig: ApplicationConfig = {
|
|
1074
|
-
* providers: [
|
|
1075
|
-
* provideAuthProviders(),
|
|
1076
|
-
* // ... other providers
|
|
1077
|
-
* ]
|
|
1078
|
-
* };
|
|
1079
|
-
*
|
|
1080
|
-
* @returns Array of Angular providers
|
|
1081
|
-
*/
|
|
634
|
+
/** Provides auth implementations for ng-shared provider interfaces */
|
|
1082
635
|
declare function provideAuthProviders(): Provider[];
|
|
1083
636
|
|
|
1084
637
|
/**
|
|
@@ -1086,29 +639,22 @@ declare function provideAuthProviders(): Provider[];
|
|
|
1086
639
|
*
|
|
1087
640
|
* Centralized endpoint definitions to prevent inconsistencies across interceptors
|
|
1088
641
|
* and services. All auth-related endpoints should be referenced from here.
|
|
1089
|
-
*
|
|
1090
|
-
* @example
|
|
1091
|
-
* ```typescript
|
|
1092
|
-
* if (isAuthEndpoint(req.url)) {
|
|
1093
|
-
* // Skip interceptor logic
|
|
1094
|
-
* }
|
|
1095
|
-
* ```
|
|
1096
642
|
*/
|
|
1097
643
|
declare const AUTH_ENDPOINTS: {
|
|
1098
644
|
readonly LOGIN: "/auth/login";
|
|
1099
645
|
readonly LOGOUT: "/auth/logout";
|
|
1100
646
|
readonly REFRESH: "/auth/refresh";
|
|
1101
647
|
readonly REGISTER: "/auth/register";
|
|
648
|
+
readonly ME: "/auth/me";
|
|
1102
649
|
readonly SELECT: "/auth/select";
|
|
1103
650
|
readonly SWITCH_COMPANY: "/auth/switch-company";
|
|
651
|
+
readonly CHANGE_PASSWORD: "/auth/change-password";
|
|
652
|
+
readonly VERIFY_EMAIL: "/auth/verify-email";
|
|
653
|
+
readonly FORGOT_PASSWORD: "/auth/forgot-password";
|
|
654
|
+
readonly RESET_PASSWORD: "/auth/reset-password";
|
|
655
|
+
readonly RESEND_VERIFICATION: "/auth/resend-verification";
|
|
1104
656
|
};
|
|
1105
|
-
/**
|
|
1106
|
-
* Check if a URL is an auth-related endpoint
|
|
1107
|
-
*/
|
|
1108
|
-
declare function isAuthEndpoint(url: string): boolean;
|
|
1109
|
-
/**
|
|
1110
|
-
* Check if a URL is a specific auth endpoint
|
|
1111
|
-
*/
|
|
657
|
+
/** Check if a URL matches a specific endpoint */
|
|
1112
658
|
declare function isEndpoint(url: string, endpoint: string): boolean;
|
|
1113
659
|
|
|
1114
660
|
interface ITab {
|
|
@@ -1116,6 +662,7 @@ interface ITab {
|
|
|
1116
662
|
label: string;
|
|
1117
663
|
icon: string;
|
|
1118
664
|
route: string;
|
|
665
|
+
permission: string;
|
|
1119
666
|
requiresCompanyFeature?: boolean;
|
|
1120
667
|
}
|
|
1121
668
|
/**
|
|
@@ -1127,14 +674,15 @@ interface ITab {
|
|
|
1127
674
|
*/
|
|
1128
675
|
declare class AdministrationPageComponent {
|
|
1129
676
|
private readonly appConfig;
|
|
677
|
+
private readonly permissionValidator;
|
|
1130
678
|
/** All available tabs */
|
|
1131
679
|
private readonly allTabs;
|
|
1132
680
|
/** Check if company feature is enabled */
|
|
1133
681
|
readonly companyFeatureEnabled: _angular_core.Signal<boolean>;
|
|
1134
|
-
/** Visible tabs based on config */
|
|
682
|
+
/** Visible tabs based on config and permissions */
|
|
1135
683
|
readonly visibleTabs: _angular_core.Signal<ITab[]>;
|
|
1136
|
-
/** Dynamic subtitle based on visible
|
|
1137
|
-
readonly subtitle: _angular_core.Signal<
|
|
684
|
+
/** Dynamic subtitle based on visible tabs */
|
|
685
|
+
readonly subtitle: _angular_core.Signal<string>;
|
|
1138
686
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AdministrationPageComponent, never>;
|
|
1139
687
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AdministrationPageComponent, "lib-administration-page", never, {}, {}, never, never, true, never>;
|
|
1140
688
|
}
|
|
@@ -1154,13 +702,15 @@ interface IBranchFormModel {
|
|
|
1154
702
|
* Handles creating and editing branches.
|
|
1155
703
|
* Defaults to current company context.
|
|
1156
704
|
*/
|
|
1157
|
-
declare class BranchFormComponent
|
|
705
|
+
declare class BranchFormComponent {
|
|
1158
706
|
private readonly router;
|
|
1159
707
|
private readonly route;
|
|
1160
708
|
private readonly messageService;
|
|
1161
709
|
private readonly branchService;
|
|
1162
710
|
private readonly companyService;
|
|
1163
711
|
private readonly authState;
|
|
712
|
+
private readonly routeParams;
|
|
713
|
+
private readonly queryParams;
|
|
1164
714
|
/** Loading state */
|
|
1165
715
|
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
1166
716
|
/** Existing branch data when editing */
|
|
@@ -1175,10 +725,17 @@ declare class BranchFormComponent implements OnInit {
|
|
|
1175
725
|
readonly branchForm: _angular_forms_signals.FieldTree<IBranchFormModel, string | number>;
|
|
1176
726
|
/** Check if form is valid */
|
|
1177
727
|
readonly isFormValid: _angular_core.Signal<boolean>;
|
|
1178
|
-
|
|
728
|
+
constructor();
|
|
1179
729
|
loadBranch(id: string): Promise<void>;
|
|
730
|
+
private toFormModel;
|
|
1180
731
|
generateSlug(): void;
|
|
1181
732
|
onSubmit(): Promise<void>;
|
|
733
|
+
private updateBranch;
|
|
734
|
+
private createBranch;
|
|
735
|
+
private buildOptionalFields;
|
|
736
|
+
private onSaveSuccess;
|
|
737
|
+
private getTargetCompanyId;
|
|
738
|
+
private navigateToList;
|
|
1182
739
|
onCancel(): void;
|
|
1183
740
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BranchFormComponent, never>;
|
|
1184
741
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BranchFormComponent, "lib-branch-form", never, {}, {}, never, never, true, never>;
|
|
@@ -1189,7 +746,13 @@ declare class BranchFormComponent implements OnInit {
|
|
|
1189
746
|
* Displays a list of branches for a company with CRUD operations.
|
|
1190
747
|
* Defaults to current company context.
|
|
1191
748
|
*/
|
|
1192
|
-
declare class BranchListComponent
|
|
749
|
+
declare class BranchListComponent {
|
|
750
|
+
readonly BRANCH_PERMISSIONS: {
|
|
751
|
+
readonly CREATE: "branch.create";
|
|
752
|
+
readonly READ: "branch.read";
|
|
753
|
+
readonly UPDATE: "branch.update";
|
|
754
|
+
readonly DELETE: "branch.delete";
|
|
755
|
+
};
|
|
1193
756
|
private readonly router;
|
|
1194
757
|
private readonly route;
|
|
1195
758
|
private readonly messageService;
|
|
@@ -1197,8 +760,10 @@ declare class BranchListComponent implements OnInit {
|
|
|
1197
760
|
private readonly branchService;
|
|
1198
761
|
private readonly companyService;
|
|
1199
762
|
private readonly authState;
|
|
1200
|
-
|
|
1201
|
-
|
|
763
|
+
private readonly queryParamMap;
|
|
764
|
+
private initialized;
|
|
765
|
+
/** Selected company ID (signal for zoneless change detection) */
|
|
766
|
+
readonly selectedCompanyId: _angular_core.WritableSignal<string | null>;
|
|
1202
767
|
/** Companies list for dropdown */
|
|
1203
768
|
readonly companies: _angular_core.Signal<_flusys_ng_auth.ICompany[]>;
|
|
1204
769
|
/** Branches from service */
|
|
@@ -1207,7 +772,7 @@ declare class BranchListComponent implements OnInit {
|
|
|
1207
772
|
readonly isLoading: _angular_core.Signal<boolean>;
|
|
1208
773
|
/** Total count from service */
|
|
1209
774
|
readonly total: _angular_core.Signal<number>;
|
|
1210
|
-
|
|
775
|
+
constructor();
|
|
1211
776
|
loadBranches(): void;
|
|
1212
777
|
onCompanyChange(): void;
|
|
1213
778
|
onLazyLoad(event: {
|
|
@@ -1235,11 +800,12 @@ interface ICompanyFormModel$1 {
|
|
|
1235
800
|
* Company Form Component
|
|
1236
801
|
* Handles creating and editing companies.
|
|
1237
802
|
*/
|
|
1238
|
-
declare class CompanyFormComponent
|
|
803
|
+
declare class CompanyFormComponent {
|
|
1239
804
|
private readonly router;
|
|
1240
805
|
private readonly route;
|
|
1241
806
|
private readonly messageService;
|
|
1242
807
|
private readonly companyService;
|
|
808
|
+
private readonly routeParams;
|
|
1243
809
|
/** Loading state */
|
|
1244
810
|
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
1245
811
|
/** Existing company data when editing */
|
|
@@ -1252,11 +818,13 @@ declare class CompanyFormComponent implements OnInit {
|
|
|
1252
818
|
readonly companyForm: _angular_forms_signals.FieldTree<ICompanyFormModel$1, string | number>;
|
|
1253
819
|
/** Check if form is valid */
|
|
1254
820
|
readonly isFormValid: _angular_core.Signal<boolean>;
|
|
1255
|
-
|
|
1256
|
-
loadCompany
|
|
821
|
+
constructor();
|
|
822
|
+
private loadCompany;
|
|
1257
823
|
generateSlug(): void;
|
|
1258
824
|
onSubmit(): Promise<void>;
|
|
1259
825
|
onCancel(): void;
|
|
826
|
+
/** Build company data from form model */
|
|
827
|
+
private buildCompanyData;
|
|
1260
828
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CompanyFormComponent, never>;
|
|
1261
829
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CompanyFormComponent, "lib-company-form", never, {}, {}, never, never, true, never>;
|
|
1262
830
|
}
|
|
@@ -1266,7 +834,19 @@ declare class CompanyFormComponent implements OnInit {
|
|
|
1266
834
|
* Displays a list of companies with CRUD operations.
|
|
1267
835
|
* Only visible when company feature is enabled.
|
|
1268
836
|
*/
|
|
1269
|
-
declare class CompanyListComponent
|
|
837
|
+
declare class CompanyListComponent {
|
|
838
|
+
readonly COMPANY_PERMISSIONS: {
|
|
839
|
+
readonly CREATE: "company.create";
|
|
840
|
+
readonly READ: "company.read";
|
|
841
|
+
readonly UPDATE: "company.update";
|
|
842
|
+
readonly DELETE: "company.delete";
|
|
843
|
+
};
|
|
844
|
+
readonly BRANCH_PERMISSIONS: {
|
|
845
|
+
readonly CREATE: "branch.create";
|
|
846
|
+
readonly READ: "branch.read";
|
|
847
|
+
readonly UPDATE: "branch.update";
|
|
848
|
+
readonly DELETE: "branch.delete";
|
|
849
|
+
};
|
|
1270
850
|
private readonly router;
|
|
1271
851
|
private readonly messageService;
|
|
1272
852
|
private readonly confirmationService;
|
|
@@ -1277,8 +857,6 @@ declare class CompanyListComponent implements OnInit {
|
|
|
1277
857
|
readonly isLoading: _angular_core.Signal<boolean>;
|
|
1278
858
|
/** Total count from service */
|
|
1279
859
|
readonly total: _angular_core.Signal<number>;
|
|
1280
|
-
ngOnInit(): void;
|
|
1281
|
-
loadCompanies(): void;
|
|
1282
860
|
onLazyLoad(event: {
|
|
1283
861
|
first?: number | null;
|
|
1284
862
|
rows?: number | null;
|
|
@@ -1291,71 +869,154 @@ declare class CompanyListComponent implements OnInit {
|
|
|
1291
869
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CompanyListComponent, "lib-company-list", never, {}, {}, never, never, true, never>;
|
|
1292
870
|
}
|
|
1293
871
|
|
|
1294
|
-
|
|
872
|
+
interface IForgotPasswordFormModel {
|
|
873
|
+
email: string;
|
|
874
|
+
}
|
|
875
|
+
declare class ForgotPasswordPageComponent {
|
|
876
|
+
private readonly destroyRef;
|
|
877
|
+
private readonly messageService;
|
|
878
|
+
private readonly authApi;
|
|
879
|
+
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
880
|
+
readonly emailSent: _angular_core.WritableSignal<boolean>;
|
|
881
|
+
readonly submittedEmail: _angular_core.WritableSignal<string>;
|
|
882
|
+
readonly formModel: _angular_core.WritableSignal<IForgotPasswordFormModel>;
|
|
883
|
+
readonly forgotForm: _angular_forms_signals.FieldTree<IForgotPasswordFormModel, string | number>;
|
|
884
|
+
readonly isFormValid: _angular_core.Signal<boolean>;
|
|
885
|
+
onSubmit(): void;
|
|
886
|
+
private showEmailSent;
|
|
887
|
+
resetForm(): void;
|
|
888
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForgotPasswordPageComponent, never>;
|
|
889
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ForgotPasswordPageComponent, "lib-forgot-password-page", never, {}, {}, never, never, true, never>;
|
|
890
|
+
}
|
|
891
|
+
|
|
1295
892
|
interface ILoginFormModel {
|
|
1296
893
|
email: string;
|
|
1297
894
|
password: string;
|
|
1298
895
|
rememberMe: boolean;
|
|
1299
896
|
}
|
|
1300
|
-
/** Company selection form model interface */
|
|
1301
897
|
interface ISelectionFormModel {
|
|
1302
898
|
companyId: string;
|
|
1303
899
|
branchId: string;
|
|
1304
900
|
rememberSelection: boolean;
|
|
1305
901
|
}
|
|
1306
|
-
type LoginStep = 'credentials' | 'company-selection';
|
|
1307
|
-
|
|
1308
|
-
* Login Page Component
|
|
1309
|
-
* Multi-step authentication flow:
|
|
1310
|
-
* - Step 1: Email/Password credentials
|
|
1311
|
-
* - Step 2: Company/Branch selection (when company feature enabled and user has multiple)
|
|
1312
|
-
*/
|
|
1313
|
-
declare class LoginPageComponent implements OnInit {
|
|
902
|
+
type LoginStep = 'credentials' | 'company-selection' | 'email-verification';
|
|
903
|
+
declare class LoginPageComponent {
|
|
1314
904
|
private readonly destroyRef;
|
|
1315
905
|
private readonly appConfig;
|
|
1316
906
|
private readonly messageService;
|
|
1317
907
|
private readonly authApi;
|
|
1318
908
|
private readonly authState;
|
|
1319
|
-
/** Return URL after successful login */
|
|
1320
909
|
readonly returnUrl: _angular_core.InputSignal<string>;
|
|
1321
|
-
/** Current step in login flow */
|
|
1322
910
|
readonly currentStep: _angular_core.WritableSignal<LoginStep>;
|
|
1323
|
-
/** Loading state */
|
|
1324
911
|
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
1325
|
-
|
|
912
|
+
readonly unverifiedEmail: _angular_core.WritableSignal<string>;
|
|
1326
913
|
readonly loginFormModel: _angular_core.WritableSignal<ILoginFormModel>;
|
|
1327
|
-
/** Login form with validation schema */
|
|
1328
914
|
readonly loginForm: _angular_forms_signals.FieldTree<ILoginFormModel, string | number>;
|
|
1329
|
-
/** Check if login form is valid */
|
|
1330
915
|
readonly isLoginFormValid: _angular_core.Signal<boolean>;
|
|
1331
|
-
/** Selection form model */
|
|
1332
916
|
readonly selectionFormModel: _angular_core.WritableSignal<ISelectionFormModel>;
|
|
1333
|
-
/** Selection form with validation schema */
|
|
1334
917
|
readonly selectionForm: _angular_forms_signals.FieldTree<ISelectionFormModel, string | number>;
|
|
1335
|
-
/** Check if selection form is valid */
|
|
1336
918
|
readonly isSelectionFormValid: _angular_core.Signal<boolean>;
|
|
1337
|
-
/** Whether company feature is enabled */
|
|
1338
919
|
readonly companyFeatureEnabled: _angular_core.Signal<boolean>;
|
|
1339
|
-
/** Session ID for company selection */
|
|
1340
920
|
private sessionId;
|
|
1341
|
-
/** Available companies */
|
|
1342
921
|
readonly companies: _angular_core.WritableSignal<ICompanyWithBranches[]>;
|
|
1343
|
-
/** User's name */
|
|
1344
922
|
readonly userName: _angular_core.WritableSignal<string>;
|
|
1345
|
-
/** Branches for selected company */
|
|
1346
923
|
readonly branches: _angular_core.Signal<IBranchSelectionInfo[]>;
|
|
1347
|
-
|
|
924
|
+
constructor();
|
|
925
|
+
private restorePendingSelectionState;
|
|
1348
926
|
onSubmit(): void;
|
|
1349
|
-
/** Handle company selection change */
|
|
1350
927
|
onCompanyChange(): void;
|
|
1351
928
|
onSelectCompany(): void;
|
|
1352
929
|
goBackToCredentials(): void;
|
|
930
|
+
onResendVerification(): void;
|
|
1353
931
|
private autoSelectIfSingle;
|
|
1354
932
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LoginPageComponent, never>;
|
|
1355
933
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LoginPageComponent, "lib-login-page", never, { "returnUrl": { "alias": "returnUrl"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1356
934
|
}
|
|
1357
935
|
|
|
1358
|
-
/**
|
|
936
|
+
/** Profile form model */
|
|
937
|
+
interface IProfileFormModel {
|
|
938
|
+
name: string;
|
|
939
|
+
phone: string;
|
|
940
|
+
}
|
|
941
|
+
/** Password form model */
|
|
942
|
+
interface IPasswordFormModel {
|
|
943
|
+
currentPassword: string;
|
|
944
|
+
newPassword: string;
|
|
945
|
+
confirmPassword: string;
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* Profile Page Component
|
|
949
|
+
*
|
|
950
|
+
* Allows users to view and update their profile information.
|
|
951
|
+
* Features:
|
|
952
|
+
* - Update name, phone, profile picture (if storage enabled)
|
|
953
|
+
* - View company/branch info (read-only, if company feature enabled)
|
|
954
|
+
* - View roles/actions (read-only, if IAM enabled via optional injection)
|
|
955
|
+
*
|
|
956
|
+
* Package Independence:
|
|
957
|
+
* - Uses PROFILE_UPLOAD_PROVIDER (optional) for storage functionality
|
|
958
|
+
* - Uses PROFILE_PERMISSION_PROVIDER (optional) for IAM functionality
|
|
959
|
+
* - No direct imports from ng-storage or ng-iam
|
|
960
|
+
*/
|
|
961
|
+
declare class ProfilePageComponent {
|
|
962
|
+
private readonly destroyRef;
|
|
963
|
+
private readonly appConfig;
|
|
964
|
+
private readonly messageService;
|
|
965
|
+
private readonly authState;
|
|
966
|
+
private readonly userService;
|
|
967
|
+
private readonly authApiService;
|
|
968
|
+
private readonly fileUrlService;
|
|
969
|
+
private readonly uploadProvider;
|
|
970
|
+
private readonly permissionProvider;
|
|
971
|
+
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
972
|
+
readonly isLoadingPermissions: _angular_core.WritableSignal<boolean>;
|
|
973
|
+
private readonly _profilePictureUrl;
|
|
974
|
+
readonly profilePictureUrl: _angular_core.Signal<string | null>;
|
|
975
|
+
private readonly _userRoles;
|
|
976
|
+
readonly userRoles: _angular_core.Signal<IProfileRoleInfo[]>;
|
|
977
|
+
private readonly _userActions;
|
|
978
|
+
readonly userActions: _angular_core.Signal<IProfileActionInfo[]>;
|
|
979
|
+
readonly userEmail: _angular_core.Signal<string>;
|
|
980
|
+
readonly userName: _angular_core.Signal<string>;
|
|
981
|
+
readonly userInitials: _angular_core.Signal<string>;
|
|
982
|
+
readonly companyName: _angular_core.Signal<string>;
|
|
983
|
+
readonly branchName: _angular_core.Signal<string>;
|
|
984
|
+
readonly showUploadSection: _angular_core.Signal<boolean>;
|
|
985
|
+
readonly showCompanySection: _angular_core.Signal<boolean>;
|
|
986
|
+
readonly showPermissionsSection: _angular_core.Signal<boolean>;
|
|
987
|
+
readonly permissionMode: _angular_core.Signal<_flusys_ng_core.PermissionMode>;
|
|
988
|
+
readonly showRoles: _angular_core.Signal<boolean>;
|
|
989
|
+
readonly showActions: _angular_core.Signal<boolean>;
|
|
990
|
+
readonly showBottomRow: _angular_core.Signal<boolean>;
|
|
991
|
+
private readonly originalFormModel;
|
|
992
|
+
readonly formModel: _angular_core.WritableSignal<IProfileFormModel>;
|
|
993
|
+
readonly formTree: _angular_forms_signals.FieldTree<IProfileFormModel, string | number>;
|
|
994
|
+
readonly isFormValid: _angular_core.Signal<boolean>;
|
|
995
|
+
readonly isFormDirty: _angular_core.Signal<boolean>;
|
|
996
|
+
readonly passwordModel: _angular_core.WritableSignal<IPasswordFormModel>;
|
|
997
|
+
readonly isPasswordLoading: _angular_core.WritableSignal<boolean>;
|
|
998
|
+
readonly isPasswordFormValid: _angular_core.Signal<boolean>;
|
|
999
|
+
readonly passwordsMatch: _angular_core.Signal<boolean>;
|
|
1000
|
+
readonly uploadFileFn: UploadFileFn;
|
|
1001
|
+
/** Map upload result to IUploadedFile format */
|
|
1002
|
+
private mapUploadResultToUploadedFile;
|
|
1003
|
+
constructor();
|
|
1004
|
+
private loadUserData;
|
|
1005
|
+
private loadPermissions;
|
|
1006
|
+
onProfilePictureUploaded(file: {
|
|
1007
|
+
id?: string;
|
|
1008
|
+
name: string;
|
|
1009
|
+
key: string;
|
|
1010
|
+
size: number;
|
|
1011
|
+
contentType: string;
|
|
1012
|
+
}): void;
|
|
1013
|
+
onSubmit(): void;
|
|
1014
|
+
updatePasswordField(field: keyof IPasswordFormModel, value: string): void;
|
|
1015
|
+
onChangePassword(): void;
|
|
1016
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ProfilePageComponent, never>;
|
|
1017
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ProfilePageComponent, "lib-profile-page", never, {}, {}, never, never, true, never>;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1359
1020
|
interface IUserFormModel$1 {
|
|
1360
1021
|
name: string;
|
|
1361
1022
|
email: string;
|
|
@@ -1363,7 +1024,6 @@ interface IUserFormModel$1 {
|
|
|
1363
1024
|
confirmPassword: string;
|
|
1364
1025
|
phone: string;
|
|
1365
1026
|
}
|
|
1366
|
-
/** Company form model */
|
|
1367
1027
|
interface ICompanyFormModel {
|
|
1368
1028
|
createNewCompany: boolean;
|
|
1369
1029
|
companySlug: string;
|
|
@@ -1372,43 +1032,57 @@ interface ICompanyFormModel {
|
|
|
1372
1032
|
newCompanyPhone: string;
|
|
1373
1033
|
newCompanyAddress: string;
|
|
1374
1034
|
}
|
|
1375
|
-
|
|
1376
|
-
* Registration Page Component
|
|
1377
|
-
* Handles user registration with optional company creation
|
|
1378
|
-
* Adapts UI based on company feature configuration
|
|
1379
|
-
*/
|
|
1380
|
-
declare class RegisterPageComponent implements OnInit {
|
|
1035
|
+
declare class RegisterPageComponent {
|
|
1381
1036
|
private readonly destroyRef;
|
|
1382
1037
|
private readonly appConfig;
|
|
1383
1038
|
private readonly messageService;
|
|
1384
1039
|
private readonly authApi;
|
|
1385
1040
|
private readonly authState;
|
|
1386
1041
|
private readonly route;
|
|
1387
|
-
|
|
1042
|
+
private readonly router;
|
|
1043
|
+
private readonly queryParamMap;
|
|
1044
|
+
private companySlugInitialized;
|
|
1388
1045
|
readonly returnUrl: _angular_core.InputSignal<string>;
|
|
1389
|
-
/** Loading state */
|
|
1390
1046
|
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
1391
|
-
/** Whether company feature is enabled */
|
|
1392
1047
|
readonly companyFeatureEnabled: _angular_core.Signal<boolean>;
|
|
1393
|
-
/** User form model */
|
|
1394
1048
|
readonly userFormModel: _angular_core.WritableSignal<IUserFormModel$1>;
|
|
1395
|
-
/** User form with validation schema */
|
|
1396
1049
|
readonly userForm: _angular_forms_signals.FieldTree<IUserFormModel$1, string | number>;
|
|
1397
|
-
/** Company form model */
|
|
1398
1050
|
readonly companyFormModel: _angular_core.WritableSignal<ICompanyFormModel>;
|
|
1399
|
-
/** Company form with conditional validation schema */
|
|
1400
1051
|
readonly companyForm: _angular_forms_signals.FieldTree<ICompanyFormModel, string | number>;
|
|
1401
|
-
ngOnInit(): void;
|
|
1402
|
-
/** Check if passwords match */
|
|
1403
1052
|
readonly passwordsMatch: _angular_core.Signal<boolean>;
|
|
1404
|
-
/** Check if form is valid */
|
|
1405
1053
|
readonly isFormValid: _angular_core.Signal<boolean>;
|
|
1054
|
+
constructor();
|
|
1406
1055
|
onCreateCompanyToggle(): void;
|
|
1407
1056
|
onSubmit(): void;
|
|
1408
1057
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RegisterPageComponent, never>;
|
|
1409
1058
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RegisterPageComponent, "lib-register-page", never, { "returnUrl": { "alias": "returnUrl"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1410
1059
|
}
|
|
1411
1060
|
|
|
1061
|
+
interface IResetPasswordFormModel {
|
|
1062
|
+
newPassword: string;
|
|
1063
|
+
confirmPassword: string;
|
|
1064
|
+
}
|
|
1065
|
+
type PageState$1 = 'form' | 'success' | 'invalid-token';
|
|
1066
|
+
declare class ResetPasswordPageComponent {
|
|
1067
|
+
private readonly destroyRef;
|
|
1068
|
+
private readonly route;
|
|
1069
|
+
private readonly messageService;
|
|
1070
|
+
private readonly authApi;
|
|
1071
|
+
private readonly queryParams;
|
|
1072
|
+
private tokenInitialized;
|
|
1073
|
+
private token;
|
|
1074
|
+
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
1075
|
+
readonly pageState: _angular_core.WritableSignal<PageState$1>;
|
|
1076
|
+
readonly formModel: _angular_core.WritableSignal<IResetPasswordFormModel>;
|
|
1077
|
+
readonly resetForm: _angular_forms_signals.FieldTree<IResetPasswordFormModel, string | number>;
|
|
1078
|
+
readonly passwordMismatch: _angular_core.Signal<boolean>;
|
|
1079
|
+
readonly canSubmit: _angular_core.Signal<boolean>;
|
|
1080
|
+
constructor();
|
|
1081
|
+
onSubmit(): void;
|
|
1082
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ResetPasswordPageComponent, never>;
|
|
1083
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ResetPasswordPageComponent, "lib-reset-password-page", never, {}, {}, never, never, true, never>;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1412
1086
|
/** User form model interface */
|
|
1413
1087
|
interface IUserFormModel {
|
|
1414
1088
|
name: string;
|
|
@@ -1423,7 +1097,7 @@ interface IUserFormModel {
|
|
|
1423
1097
|
* Handles creating and editing users.
|
|
1424
1098
|
* When company feature is enabled, automatically assigns new users to current company/branch.
|
|
1425
1099
|
*/
|
|
1426
|
-
declare class UserFormComponent
|
|
1100
|
+
declare class UserFormComponent {
|
|
1427
1101
|
private readonly destroyRef;
|
|
1428
1102
|
private readonly router;
|
|
1429
1103
|
private readonly route;
|
|
@@ -1432,6 +1106,8 @@ declare class UserFormComponent implements OnInit {
|
|
|
1432
1106
|
private readonly userService;
|
|
1433
1107
|
private readonly permissionService;
|
|
1434
1108
|
private readonly authState;
|
|
1109
|
+
private readonly routeParams;
|
|
1110
|
+
private userLoadTriggered;
|
|
1435
1111
|
/** Loading state */
|
|
1436
1112
|
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
1437
1113
|
/** Existing user data when editing */
|
|
@@ -1450,9 +1126,13 @@ declare class UserFormComponent implements OnInit {
|
|
|
1450
1126
|
readonly formTree: _angular_forms_signals.FieldTree<IUserFormModel, string | number>;
|
|
1451
1127
|
/** Check if form is valid */
|
|
1452
1128
|
readonly isFormValid: _angular_core.Signal<boolean>;
|
|
1453
|
-
|
|
1129
|
+
constructor();
|
|
1454
1130
|
loadUser(id: string): void;
|
|
1131
|
+
private toFormModel;
|
|
1455
1132
|
onSubmit(): void;
|
|
1133
|
+
private updateUser;
|
|
1134
|
+
private createUser;
|
|
1135
|
+
private onSaveSuccess;
|
|
1456
1136
|
/**
|
|
1457
1137
|
* Assign user to current company and branch
|
|
1458
1138
|
*/
|
|
@@ -1466,7 +1146,13 @@ declare class UserFormComponent implements OnInit {
|
|
|
1466
1146
|
* User List Component
|
|
1467
1147
|
* Displays a list of users with CRUD operations.
|
|
1468
1148
|
*/
|
|
1469
|
-
declare class UserListComponent
|
|
1149
|
+
declare class UserListComponent {
|
|
1150
|
+
readonly USER_PERMISSIONS: {
|
|
1151
|
+
readonly CREATE: "user.create";
|
|
1152
|
+
readonly READ: "user.read";
|
|
1153
|
+
readonly UPDATE: "user.update";
|
|
1154
|
+
readonly DELETE: "user.delete";
|
|
1155
|
+
};
|
|
1470
1156
|
private readonly router;
|
|
1471
1157
|
private readonly appConfig;
|
|
1472
1158
|
private readonly messageService;
|
|
@@ -1485,7 +1171,6 @@ declare class UserListComponent implements OnInit {
|
|
|
1485
1171
|
readonly showBranchDialog: _angular_core.WritableSignal<boolean>;
|
|
1486
1172
|
/** Selected user for permission management */
|
|
1487
1173
|
readonly selectedUser: _angular_core.WritableSignal<IUser | null>;
|
|
1488
|
-
ngOnInit(): void;
|
|
1489
1174
|
loadUsers(): void;
|
|
1490
1175
|
onLazyLoad(event: {
|
|
1491
1176
|
first?: number | null;
|
|
@@ -1495,57 +1180,63 @@ declare class UserListComponent implements OnInit {
|
|
|
1495
1180
|
onEdit(user: IUser): void;
|
|
1496
1181
|
onManageCompanyPermissions(user: IUser): void;
|
|
1497
1182
|
onManageBranchPermissions(user: IUser): void;
|
|
1183
|
+
private openPermissionDialog;
|
|
1498
1184
|
onDelete(user: IUser): void;
|
|
1499
1185
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserListComponent, never>;
|
|
1500
1186
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserListComponent, "lib-user-list", never, {}, {}, never, never, true, never>;
|
|
1501
1187
|
}
|
|
1502
1188
|
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1189
|
+
interface IResendFormModel {
|
|
1190
|
+
email: string;
|
|
1191
|
+
}
|
|
1192
|
+
type PageState = 'verifying' | 'success' | 'invalid-token' | 'resend';
|
|
1193
|
+
declare class VerifyEmailPageComponent {
|
|
1194
|
+
private readonly platformId;
|
|
1195
|
+
private readonly transferState;
|
|
1196
|
+
private readonly destroyRef;
|
|
1197
|
+
private readonly route;
|
|
1198
|
+
private readonly messageService;
|
|
1199
|
+
private readonly authApi;
|
|
1200
|
+
private readonly queryParams;
|
|
1201
|
+
private verificationTriggered;
|
|
1202
|
+
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
1203
|
+
readonly pageState: _angular_core.WritableSignal<PageState>;
|
|
1204
|
+
readonly resendSuccess: _angular_core.WritableSignal<boolean>;
|
|
1205
|
+
readonly submittedEmail: _angular_core.WritableSignal<string>;
|
|
1206
|
+
readonly resendFormModel: _angular_core.WritableSignal<IResendFormModel>;
|
|
1207
|
+
readonly resendForm: _angular_forms_signals.FieldTree<IResendFormModel, string | number>;
|
|
1208
|
+
readonly isResendFormValid: _angular_core.Signal<boolean>;
|
|
1209
|
+
constructor();
|
|
1210
|
+
private verifyEmail;
|
|
1211
|
+
private handleVerificationResult;
|
|
1212
|
+
showResendForm(): void;
|
|
1213
|
+
onResend(): void;
|
|
1214
|
+
private handleResendComplete;
|
|
1215
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<VerifyEmailPageComponent, never>;
|
|
1216
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<VerifyEmailPageComponent, "lib-verify-email-page", never, {}, {}, never, never, true, never>;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
interface BranchWithAssignment extends IBranch {
|
|
1220
|
+
isAssigned: boolean;
|
|
1221
|
+
}
|
|
1515
1222
|
declare class UserBranchPermissionDialogComponent {
|
|
1516
1223
|
private readonly branchApi;
|
|
1517
1224
|
private readonly permissionApi;
|
|
1518
|
-
private readonly authState;
|
|
1519
1225
|
private readonly messageService;
|
|
1520
|
-
/** Dialog visibility */
|
|
1521
1226
|
readonly visible: _angular_core.InputSignal<boolean>;
|
|
1522
|
-
/** User to manage permissions for */
|
|
1523
1227
|
readonly user: _angular_core.InputSignal<IUser | null>;
|
|
1524
|
-
/** Close event */
|
|
1525
1228
|
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
1526
|
-
/** Refresh event after changes */
|
|
1527
1229
|
readonly permissionsChanged: _angular_core.OutputEmitterRef<void>;
|
|
1528
|
-
/** Loading state */
|
|
1529
1230
|
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
1530
|
-
/** Saving state */
|
|
1531
1231
|
readonly isSaving: _angular_core.WritableSignal<boolean>;
|
|
1532
|
-
/** Branches with assignment status */
|
|
1533
1232
|
readonly branches: _angular_core.WritableSignal<BranchWithAssignment[]>;
|
|
1534
|
-
/** Available companies (filtered by user's company permissions) */
|
|
1535
1233
|
readonly companies: _angular_core.WritableSignal<{
|
|
1536
1234
|
id: string;
|
|
1537
1235
|
name: string;
|
|
1538
1236
|
}[]>;
|
|
1539
|
-
/** Selected company ID */
|
|
1540
1237
|
selectedCompanyId: string | null;
|
|
1541
|
-
/** Current company from auth state */
|
|
1542
|
-
readonly currentCompany: _angular_core.Signal<_flusys_ng_auth.ICompanyInfo | null>;
|
|
1543
|
-
/** Currently assigned branch IDs */
|
|
1544
1238
|
private assignedBranchIds;
|
|
1545
1239
|
constructor();
|
|
1546
|
-
/**
|
|
1547
|
-
* Load user's assigned companies (does not auto-select or load branches)
|
|
1548
|
-
*/
|
|
1549
1240
|
private loadUserCompaniesAndData;
|
|
1550
1241
|
private loadData;
|
|
1551
1242
|
onCompanyChange(): void;
|
|
@@ -1554,35 +1245,21 @@ declare class UserBranchPermissionDialogComponent {
|
|
|
1554
1245
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserBranchPermissionDialogComponent, never>;
|
|
1555
1246
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserBranchPermissionDialogComponent, "lib-user-branch-permission-dialog", never, { "visible": { "alias": "visible"; "required": true; "isSignal": true; }; "user": { "alias": "user"; "required": true; "isSignal": true; }; }, { "closed": "closed"; "permissionsChanged": "permissionsChanged"; }, never, never, true, never>;
|
|
1556
1247
|
}
|
|
1557
|
-
|
|
1248
|
+
|
|
1249
|
+
interface CompanyWithAssignment extends ICompany {
|
|
1558
1250
|
isAssigned: boolean;
|
|
1559
1251
|
}
|
|
1560
|
-
|
|
1561
|
-
/**
|
|
1562
|
-
* User Company Permission Dialog
|
|
1563
|
-
* Shows all companies with checkboxes
|
|
1564
|
-
* Initially assigned companies are checked
|
|
1565
|
-
* Check to assign, uncheck to revoke
|
|
1566
|
-
*/
|
|
1567
1252
|
declare class UserCompanyPermissionDialogComponent {
|
|
1568
1253
|
private readonly companyApi;
|
|
1569
1254
|
private readonly permissionApi;
|
|
1570
1255
|
private readonly messageService;
|
|
1571
|
-
/** Dialog visibility */
|
|
1572
1256
|
readonly visible: _angular_core.InputSignal<boolean>;
|
|
1573
|
-
/** User to manage permissions for */
|
|
1574
1257
|
readonly user: _angular_core.InputSignal<IUser | null>;
|
|
1575
|
-
/** Close event */
|
|
1576
1258
|
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
1577
|
-
/** Refresh event after changes */
|
|
1578
1259
|
readonly permissionsChanged: _angular_core.OutputEmitterRef<void>;
|
|
1579
|
-
/** Loading state */
|
|
1580
1260
|
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
1581
|
-
/** Saving state */
|
|
1582
1261
|
readonly isSaving: _angular_core.WritableSignal<boolean>;
|
|
1583
|
-
/** Companies with assignment status */
|
|
1584
1262
|
readonly companies: _angular_core.WritableSignal<CompanyWithAssignment[]>;
|
|
1585
|
-
/** Currently assigned company IDs */
|
|
1586
1263
|
private assignedCompanyIds;
|
|
1587
1264
|
constructor();
|
|
1588
1265
|
private loadData;
|
|
@@ -1591,9 +1268,6 @@ declare class UserCompanyPermissionDialogComponent {
|
|
|
1591
1268
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserCompanyPermissionDialogComponent, never>;
|
|
1592
1269
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserCompanyPermissionDialogComponent, "lib-user-company-permission-dialog", never, { "visible": { "alias": "visible"; "required": true; "isSignal": true; }; "user": { "alias": "user"; "required": true; "isSignal": true; }; }, { "closed": "closed"; "permissionsChanged": "permissionsChanged"; }, never, never, true, never>;
|
|
1593
1270
|
}
|
|
1594
|
-
interface CompanyWithAssignment extends ICompany {
|
|
1595
|
-
isAssigned: boolean;
|
|
1596
|
-
}
|
|
1597
1271
|
|
|
1598
|
-
export { ADMINISTRATION_ROUTES, AUTH_ENDPOINTS, AUTH_ROUTES, AdministrationPageComponent, AuthApiService, AuthCompanyApiProviderAdapter, AuthInitService, AuthLayoutApiAdapter, AuthLayoutStateAdapter, AuthStateService, AuthUserPermissionProviderAdapter, AuthUserProviderAdapter, BranchApiService, BranchFormComponent, BranchListComponent, CompanyApiService, CompanyFormComponent, CompanyListComponent, LoginPageComponent, RegisterPageComponent, TokenRefreshStateService, UserApiService, UserBranchPermissionDialogComponent, UserCompanyPermissionDialogComponent, UserFormComponent, UserListComponent, UserPermissionApiService, authGuard, authInterceptor, companyFeatureGuard, guestGuard,
|
|
1599
|
-
export type { AuthResponse, IAssignUserBranchRequest, IAssignUserCompanyRequest, IBatchOperationResponse, IBranch, IBranchInfo, IBranchSelectionInfo, IChangePasswordRequest, ICompany, ICompanyInfo, ICompanySelectionResponse, ICompanyWithBranches, ICreateBranchRequest, ICreateCompanyRequest, ICreateUserRequest, ILoginRequest, ILoginResponse, IMeResponse, IPermissionItem, IRefreshTokenResponse, IRegistrationRequest, IRegistrationResponse, ISelectRequest, ISwitchCompanyRequest, IUpdateBranchRequest, IUpdateCompanyRequest, IUpdateUserRequest, IUser, IUserBranchPermission, IUserBranchesResponse, IUserCompaniesResponse, IUserCompanyPermission, IUserInfo };
|
|
1272
|
+
export { ADMINISTRATION_ROUTES, AUTH_ENDPOINTS, AUTH_ROUTES, AdministrationPageComponent, AuthApiService, AuthCompanyApiProviderAdapter, AuthInitService, AuthLayoutApiAdapter, AuthLayoutStateAdapter, AuthStateProviderAdapter, AuthStateService, AuthUserPermissionProviderAdapter, AuthUserProviderAdapter, BranchApiService, BranchFormComponent, BranchListComponent, CompanyApiService, CompanyFormComponent, CompanyListComponent, ForgotPasswordPageComponent, LoginPageComponent, PROFILE_ROUTES, ProfilePageComponent, RegisterPageComponent, ResetPasswordPageComponent, TokenRefreshStateService, UserApiService, UserBranchPermissionDialogComponent, UserCompanyPermissionDialogComponent, UserFormComponent, UserListComponent, UserPermissionApiService, VerifyEmailPageComponent, authGuard, authInterceptor, companyFeatureGuard, guestGuard, isCompanySelectionResponse, isEmailVerificationRequired, isEndpoint, isLoginResponse, provideAuthLayoutIntegration, provideAuthProviders, tokenRefreshInterceptor };
|
|
1273
|
+
export type { AuthResponse, IAssignUserBranchRequest, IAssignUserCompanyRequest, IBatchOperationResponse, IBranch, IBranchInfo, IBranchSelectionInfo, IChangePasswordRequest, ICompany, ICompanyInfo, ICompanySelectionResponse, ICompanyWithBranches, ICreateBranchRequest, ICreateCompanyRequest, ICreateUserRequest, ILoginRequest, ILoginRequiresEmailVerification, ILoginResponse, IMeResponse, IPermissionItem, IRefreshTokenResponse, IRegistrationRequest, IRegistrationResponse, ISelectRequest, ISwitchCompanyRequest, IUpdateBranchRequest, IUpdateCompanyRequest, IUpdateUserRequest, IUser, IUserBranchPermission, IUserBranchesResponse, IUserCompaniesResponse, IUserCompanyPermission, IUserInfo };
|