@flusys/ng-auth 1.0.0-rc → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/fesm2022/flusys-ng-auth.mjs +622 -1272
- package/fesm2022/flusys-ng-auth.mjs.map +1 -1
- package/package.json +12 -12
- package/types/flusys-ng-auth.d.ts +70 -667
|
@@ -1,26 +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
5
|
import { Signal, Provider } from '@angular/core';
|
|
6
|
-
import { HttpClient, HttpRequest, HttpHandlerFn, HttpEvent } from '@angular/common/http';
|
|
7
6
|
import { CanActivateFn, Routes } from '@angular/router';
|
|
7
|
+
import { HttpRequest, HttpHandlerFn, HttpEvent } from '@angular/common/http';
|
|
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
11
|
import * as _flusys_ng_core from '@flusys/ng-core';
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* Login Request Interface
|
|
15
|
-
*/
|
|
16
13
|
interface ILoginRequest {
|
|
17
14
|
email: string;
|
|
18
15
|
password: string;
|
|
19
16
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Registration Request Interface
|
|
22
|
-
* Supports both simple registration and company-based registration
|
|
23
|
-
*/
|
|
24
17
|
interface IRegistrationRequest {
|
|
25
18
|
name: string;
|
|
26
19
|
email: string;
|
|
@@ -32,33 +25,19 @@ interface IRegistrationRequest {
|
|
|
32
25
|
newCompanyPhone?: string;
|
|
33
26
|
newCompanyAddress?: string;
|
|
34
27
|
}
|
|
35
|
-
/**
|
|
36
|
-
* Select Company & Branch Request Interface
|
|
37
|
-
* Used after login when user needs to select company and branch
|
|
38
|
-
*/
|
|
39
28
|
interface ISelectRequest {
|
|
40
29
|
sessionId: string;
|
|
41
30
|
companyId: string;
|
|
42
31
|
branchId: string;
|
|
43
32
|
}
|
|
44
|
-
/**
|
|
45
|
-
* Switch Company Request Interface
|
|
46
|
-
* Used to switch company/branch after login
|
|
47
|
-
*/
|
|
48
33
|
interface ISwitchCompanyRequest {
|
|
49
34
|
companyId: string;
|
|
50
35
|
branchId: string;
|
|
51
36
|
}
|
|
52
|
-
/**
|
|
53
|
-
* Change Password Request Interface
|
|
54
|
-
*/
|
|
55
37
|
interface IChangePasswordRequest {
|
|
56
38
|
currentPassword: string;
|
|
57
39
|
newPassword: string;
|
|
58
40
|
}
|
|
59
|
-
/**
|
|
60
|
-
* User Info Interface (used in responses)
|
|
61
|
-
*/
|
|
62
41
|
interface IUserInfo {
|
|
63
42
|
id: string;
|
|
64
43
|
email: string;
|
|
@@ -70,84 +49,51 @@ interface IUserInfo {
|
|
|
70
49
|
companyLogoId?: string;
|
|
71
50
|
branchLogoId?: string;
|
|
72
51
|
}
|
|
73
|
-
/**
|
|
74
|
-
* Company Info Interface (used in responses)
|
|
75
|
-
*/
|
|
76
52
|
interface ICompanyInfo {
|
|
77
53
|
id: string;
|
|
78
54
|
name: string;
|
|
79
55
|
slug?: string;
|
|
80
56
|
logoId?: string | null;
|
|
81
57
|
}
|
|
82
|
-
/**
|
|
83
|
-
* Branch Info Interface (used in responses)
|
|
84
|
-
*/
|
|
85
58
|
interface IBranchInfo {
|
|
86
59
|
id: string;
|
|
87
60
|
name: string;
|
|
88
61
|
slug?: string;
|
|
89
62
|
logoId?: string | null;
|
|
90
63
|
}
|
|
91
|
-
/**
|
|
92
|
-
* Branch Selection Info Interface (with additional fields)
|
|
93
|
-
*/
|
|
94
64
|
interface IBranchSelectionInfo {
|
|
95
65
|
id: string;
|
|
96
66
|
name: string;
|
|
97
67
|
slug: string;
|
|
98
|
-
isActive: boolean;
|
|
99
68
|
logoId?: string | null;
|
|
100
69
|
}
|
|
101
|
-
/**
|
|
102
|
-
* Company with Branches Interface (for selection response)
|
|
103
|
-
*/
|
|
104
70
|
interface ICompanyWithBranches {
|
|
105
71
|
id: string;
|
|
106
72
|
name: string;
|
|
107
73
|
slug: string;
|
|
108
|
-
isActive: boolean;
|
|
109
74
|
logoId?: string | null;
|
|
110
75
|
branches: IBranchSelectionInfo[];
|
|
111
76
|
}
|
|
112
|
-
/**
|
|
113
|
-
* Login Response Interface
|
|
114
|
-
* Returned on successful login with tokens
|
|
115
|
-
*/
|
|
116
77
|
interface ILoginResponse {
|
|
117
78
|
accessToken: string;
|
|
118
79
|
refreshToken: string;
|
|
119
80
|
user: IUserInfo;
|
|
120
81
|
company?: ICompanyInfo;
|
|
121
82
|
branch?: IBranchInfo;
|
|
122
|
-
companyFeatureEnabled?: boolean;
|
|
123
83
|
}
|
|
124
|
-
/**
|
|
125
|
-
* Me Response Interface
|
|
126
|
-
* Returned by GET /auth/me endpoint
|
|
127
|
-
* Contains only user data, no tokens
|
|
128
|
-
*/
|
|
129
84
|
interface IMeResponse {
|
|
130
85
|
user: IUserInfo;
|
|
131
86
|
company?: ICompanyInfo;
|
|
132
87
|
branch?: IBranchInfo;
|
|
133
88
|
}
|
|
134
|
-
/**
|
|
135
|
-
* Registration Response Interface
|
|
136
|
-
* Returned on successful registration
|
|
137
|
-
*/
|
|
138
89
|
interface IRegistrationResponse {
|
|
139
90
|
accessToken?: string;
|
|
140
91
|
refreshToken?: string;
|
|
141
92
|
user: IUserInfo;
|
|
142
93
|
company?: ICompanyInfo;
|
|
143
94
|
branch?: IBranchInfo;
|
|
144
|
-
companyFeatureEnabled?: boolean;
|
|
145
95
|
requiresEmailVerification?: boolean;
|
|
146
96
|
}
|
|
147
|
-
/**
|
|
148
|
-
* Company Selection Response Interface
|
|
149
|
-
* Returned when user has multiple companies/branches to choose from
|
|
150
|
-
*/
|
|
151
97
|
interface ICompanySelectionResponse {
|
|
152
98
|
requiresSelection: true;
|
|
153
99
|
sessionId: string;
|
|
@@ -155,41 +101,20 @@ interface ICompanySelectionResponse {
|
|
|
155
101
|
user: IUserInfo;
|
|
156
102
|
companies: ICompanyWithBranches[];
|
|
157
103
|
}
|
|
158
|
-
/**
|
|
159
|
-
* Refresh Token Response Interface
|
|
160
|
-
*/
|
|
161
104
|
interface IRefreshTokenResponse {
|
|
162
105
|
accessToken: string;
|
|
163
106
|
refreshToken?: string;
|
|
164
107
|
}
|
|
165
|
-
/**
|
|
166
|
-
* Login Response when email verification required
|
|
167
|
-
*/
|
|
168
108
|
interface ILoginRequiresEmailVerification {
|
|
169
109
|
requiresEmailVerification: true;
|
|
170
110
|
email: string;
|
|
171
111
|
message: string;
|
|
172
112
|
}
|
|
173
|
-
/**
|
|
174
|
-
* Auth Response Type - Can be login success, company selection, or email verification required
|
|
175
|
-
*/
|
|
176
113
|
type AuthResponse = ILoginResponse | ICompanySelectionResponse | ILoginRequiresEmailVerification;
|
|
177
|
-
/**
|
|
178
|
-
* Type guard to check if response requires email verification
|
|
179
|
-
*/
|
|
180
114
|
declare function isEmailVerificationRequired(response: AuthResponse): response is ILoginRequiresEmailVerification;
|
|
181
|
-
/**
|
|
182
|
-
* Type guard to check if response requires company selection
|
|
183
|
-
*/
|
|
184
115
|
declare function isCompanySelectionResponse(response: AuthResponse): response is ICompanySelectionResponse;
|
|
185
|
-
/**
|
|
186
|
-
* Type guard to check if response is a successful login
|
|
187
|
-
*/
|
|
188
116
|
declare function isLoginResponse(response: AuthResponse): response is ILoginResponse;
|
|
189
117
|
|
|
190
|
-
/**
|
|
191
|
-
* Create Company Branch Request Interface
|
|
192
|
-
*/
|
|
193
118
|
interface ICreateBranchRequest {
|
|
194
119
|
name: string;
|
|
195
120
|
slug: string;
|
|
@@ -203,15 +128,9 @@ interface ICreateBranchRequest {
|
|
|
203
128
|
isActive?: boolean;
|
|
204
129
|
additionalFields?: Record<string, unknown>;
|
|
205
130
|
}
|
|
206
|
-
/**
|
|
207
|
-
* Update Company Branch Request Interface
|
|
208
|
-
*/
|
|
209
131
|
interface IUpdateBranchRequest extends Partial<Omit<ICreateBranchRequest, 'companyId'>> {
|
|
210
132
|
id: string;
|
|
211
133
|
}
|
|
212
|
-
/**
|
|
213
|
-
* Company Branch Response Interface
|
|
214
|
-
*/
|
|
215
134
|
interface IBranch {
|
|
216
135
|
id: string;
|
|
217
136
|
name: string;
|
|
@@ -230,9 +149,6 @@ interface IBranch {
|
|
|
230
149
|
updatedAt: Date | string;
|
|
231
150
|
}
|
|
232
151
|
|
|
233
|
-
/**
|
|
234
|
-
* Create Company Request Interface
|
|
235
|
-
*/
|
|
236
152
|
interface ICreateCompanyRequest {
|
|
237
153
|
name: string;
|
|
238
154
|
slug: string;
|
|
@@ -246,15 +162,9 @@ interface ICreateCompanyRequest {
|
|
|
246
162
|
settings?: Record<string, unknown>;
|
|
247
163
|
additionalFields?: Record<string, unknown>;
|
|
248
164
|
}
|
|
249
|
-
/**
|
|
250
|
-
* Update Company Request Interface
|
|
251
|
-
*/
|
|
252
165
|
interface IUpdateCompanyRequest extends Partial<ICreateCompanyRequest> {
|
|
253
166
|
id: string;
|
|
254
167
|
}
|
|
255
|
-
/**
|
|
256
|
-
* Company Response Interface
|
|
257
|
-
*/
|
|
258
168
|
interface ICompany {
|
|
259
169
|
id: string;
|
|
260
170
|
name: string;
|
|
@@ -273,88 +183,48 @@ interface ICompany {
|
|
|
273
183
|
updatedAt: Date | string;
|
|
274
184
|
}
|
|
275
185
|
|
|
276
|
-
/**
|
|
277
|
-
* Permission item for batch assignment/revocation
|
|
278
|
-
*/
|
|
279
186
|
interface IPermissionItem {
|
|
280
|
-
/** Target ID (Company ID or Branch ID) */
|
|
281
187
|
targetId: string;
|
|
282
|
-
/** Action: true to add permission, false to remove permission */
|
|
283
188
|
isAdd: boolean;
|
|
284
189
|
}
|
|
285
|
-
/**
|
|
286
|
-
* Batch assign/revoke user-company permissions request
|
|
287
|
-
*/
|
|
288
190
|
interface IAssignUserCompanyRequest {
|
|
289
|
-
/** User ID to assign/revoke permissions for */
|
|
290
191
|
userId: string;
|
|
291
|
-
/** List of company permissions to add or remove */
|
|
292
192
|
items: IPermissionItem[];
|
|
293
193
|
}
|
|
294
|
-
/**
|
|
295
|
-
* Batch assign/revoke user-branch permissions request
|
|
296
|
-
*/
|
|
297
194
|
interface IAssignUserBranchRequest {
|
|
298
|
-
/** User ID to assign/revoke permissions for */
|
|
299
195
|
userId: string;
|
|
300
|
-
/** List of branch permissions to add or remove */
|
|
301
196
|
items: IPermissionItem[];
|
|
302
197
|
}
|
|
303
|
-
/**
|
|
304
|
-
* User company permission with populated company details
|
|
305
|
-
*/
|
|
306
198
|
interface IUserCompanyPermission {
|
|
307
|
-
/** Permission ID */
|
|
308
199
|
id: string;
|
|
309
|
-
/** User ID */
|
|
310
200
|
userId: string;
|
|
311
|
-
/** Company ID */
|
|
312
201
|
companyId: string;
|
|
313
|
-
/** Company name */
|
|
314
202
|
companyName: string;
|
|
315
|
-
/** Company slug */
|
|
316
203
|
companySlug: string;
|
|
317
204
|
}
|
|
318
|
-
/**
|
|
319
|
-
* User branch permission with populated branch details
|
|
320
|
-
*/
|
|
321
205
|
interface IUserBranchPermission {
|
|
322
|
-
/** Permission ID */
|
|
323
206
|
id: string;
|
|
324
|
-
/** User ID */
|
|
325
207
|
userId: string;
|
|
326
|
-
/** Branch ID */
|
|
327
208
|
branchId: string;
|
|
328
|
-
/** Branch name */
|
|
329
209
|
branchName: string;
|
|
330
|
-
/** Branch slug */
|
|
331
210
|
branchSlug: string;
|
|
332
|
-
/** Company ID this branch belongs to */
|
|
333
211
|
companyId: string;
|
|
334
212
|
}
|
|
335
|
-
/**
|
|
336
|
-
* Response for user companies
|
|
337
|
-
*/
|
|
338
213
|
interface IUserCompaniesResponse {
|
|
214
|
+
success: boolean;
|
|
215
|
+
message: string;
|
|
339
216
|
data: IUserCompanyPermission[];
|
|
340
217
|
}
|
|
341
|
-
/**
|
|
342
|
-
* Response for user branches
|
|
343
|
-
*/
|
|
344
218
|
interface IUserBranchesResponse {
|
|
219
|
+
success: boolean;
|
|
220
|
+
message: string;
|
|
345
221
|
data: IUserBranchPermission[];
|
|
346
222
|
}
|
|
347
|
-
/**
|
|
348
|
-
* Batch operation result response
|
|
349
|
-
*/
|
|
350
223
|
interface IBatchOperationResponse {
|
|
351
224
|
success: boolean;
|
|
352
225
|
message: string;
|
|
353
226
|
}
|
|
354
227
|
|
|
355
|
-
/**
|
|
356
|
-
* Create User Request Interface
|
|
357
|
-
*/
|
|
358
228
|
interface ICreateUserRequest {
|
|
359
229
|
name: string;
|
|
360
230
|
email: string;
|
|
@@ -366,14 +236,12 @@ interface ICreateUserRequest {
|
|
|
366
236
|
phoneVerified?: boolean;
|
|
367
237
|
additionalFields?: Record<string, unknown>;
|
|
368
238
|
}
|
|
369
|
-
/**
|
|
370
|
-
* Update User Request Interface
|
|
371
|
-
*/
|
|
372
239
|
interface IUpdateUserRequest {
|
|
373
240
|
id: string;
|
|
374
241
|
name?: string;
|
|
375
242
|
email?: string;
|
|
376
243
|
password?: string;
|
|
244
|
+
oldPassword?: string;
|
|
377
245
|
phone?: string;
|
|
378
246
|
profilePictureId?: string;
|
|
379
247
|
isActive?: boolean;
|
|
@@ -381,9 +249,6 @@ interface IUpdateUserRequest {
|
|
|
381
249
|
phoneVerified?: boolean;
|
|
382
250
|
additionalFields?: Record<string, unknown>;
|
|
383
251
|
}
|
|
384
|
-
/**
|
|
385
|
-
* User Response Interface
|
|
386
|
-
*/
|
|
387
252
|
interface IUser {
|
|
388
253
|
id: string;
|
|
389
254
|
name: string;
|
|
@@ -519,6 +384,7 @@ declare class AuthInitService {
|
|
|
519
384
|
declare class AuthStateService {
|
|
520
385
|
private readonly appConfig;
|
|
521
386
|
private readonly router;
|
|
387
|
+
private readonly platform;
|
|
522
388
|
private readonly _user;
|
|
523
389
|
private readonly _accessToken;
|
|
524
390
|
private readonly _tokenExpiresAt;
|
|
@@ -534,7 +400,6 @@ declare class AuthStateService {
|
|
|
534
400
|
private readonly _selectionExpiresAt;
|
|
535
401
|
readonly selectionSessionId: _angular_core.Signal<string | null>;
|
|
536
402
|
readonly availableCompanies: _angular_core.Signal<ICompanyWithBranches[]>;
|
|
537
|
-
readonly selectionExpiresAt: _angular_core.Signal<Date | null>;
|
|
538
403
|
readonly isAuthenticated: _angular_core.Signal<boolean>;
|
|
539
404
|
readonly requiresCompanySelection: _angular_core.Signal<boolean>;
|
|
540
405
|
readonly userName: _angular_core.Signal<string>;
|
|
@@ -545,10 +410,6 @@ declare class AuthStateService {
|
|
|
545
410
|
* Used to proactively refresh token before requests fail.
|
|
546
411
|
*/
|
|
547
412
|
readonly isTokenExpired: _angular_core.Signal<boolean>;
|
|
548
|
-
/**
|
|
549
|
-
* Check if we need to refresh on app load (token expired but refresh cookie may exist)
|
|
550
|
-
*/
|
|
551
|
-
readonly needsRefreshOnLoad: _angular_core.Signal<boolean>;
|
|
552
413
|
readonly tenantId: _angular_core.Signal<string | null>;
|
|
553
414
|
constructor();
|
|
554
415
|
setLoginState(response: ILoginResponse): void;
|
|
@@ -581,45 +442,11 @@ declare class AuthStateService {
|
|
|
581
442
|
/**
|
|
582
443
|
* Branch API Service
|
|
583
444
|
* Signal-based service for branch CRUD operations
|
|
584
|
-
* Branches default to current company context
|
|
585
|
-
*
|
|
586
|
-
* @example
|
|
587
|
-
* ```typescript
|
|
588
|
-
* branchService = inject(BranchApiService);
|
|
589
|
-
*
|
|
590
|
-
* // Set current company context
|
|
591
|
-
* branchService.setCurrentCompanyId('company-uuid');
|
|
592
|
-
*
|
|
593
|
-
* // Access data via signals
|
|
594
|
-
* branches = this.branchService.data;
|
|
595
|
-
* isLoading = this.branchService.isLoading;
|
|
596
|
-
*
|
|
597
|
-
* // Fetch branches (will filter by current company)
|
|
598
|
-
* this.branchService.fetchList('search');
|
|
599
|
-
*
|
|
600
|
-
* // Create branch (companyId will be auto-set if not provided)
|
|
601
|
-
* await this.branchService.insertBranch({ name: 'New Branch', slug: 'new-branch' });
|
|
602
|
-
* ```
|
|
603
445
|
*/
|
|
604
446
|
declare class BranchApiService extends ApiResourceService<ICreateBranchRequest | IUpdateBranchRequest, IBranch> {
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
/** Branches filtered by current company */
|
|
608
|
-
readonly companyBranches: _angular_core.Signal<IBranch[]>;
|
|
609
|
-
constructor(http: HttpClient);
|
|
610
|
-
/**
|
|
611
|
-
* Set the current company context for branch operations
|
|
612
|
-
*/
|
|
447
|
+
private readonly _currentCompanyId;
|
|
448
|
+
constructor();
|
|
613
449
|
setCurrentCompanyId(companyId: string | null): void;
|
|
614
|
-
/**
|
|
615
|
-
* Insert a new branch, auto-setting companyId if not provided
|
|
616
|
-
*/
|
|
617
|
-
insertBranch(data: Omit<ICreateBranchRequest, 'companyId'> & {
|
|
618
|
-
companyId?: string;
|
|
619
|
-
}): Promise<ReturnType<typeof this.insertAsync>>;
|
|
620
|
-
/**
|
|
621
|
-
* Fetch branches for a specific company
|
|
622
|
-
*/
|
|
623
450
|
fetchByCompany(companyId: string, search?: string): void;
|
|
624
451
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BranchApiService, never>;
|
|
625
452
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<BranchApiService>;
|
|
@@ -628,70 +455,25 @@ declare class BranchApiService extends ApiResourceService<ICreateBranchRequest |
|
|
|
628
455
|
/**
|
|
629
456
|
* Company API Service
|
|
630
457
|
* Signal-based service for company CRUD operations
|
|
631
|
-
*
|
|
632
|
-
* @example
|
|
633
|
-
* ```typescript
|
|
634
|
-
* companyService = inject(CompanyApiService);
|
|
635
|
-
*
|
|
636
|
-
* // Access data via signals
|
|
637
|
-
* companies = this.companyService.data;
|
|
638
|
-
* isLoading = this.companyService.isLoading;
|
|
639
|
-
*
|
|
640
|
-
* // Fetch companies
|
|
641
|
-
* this.companyService.fetchList('search', { pagination: { currentPage: 0, pageSize: 10 } });
|
|
642
|
-
*
|
|
643
|
-
* // Create company
|
|
644
|
-
* await this.companyService.insertAsync({ name: 'New Company', slug: 'new-company' });
|
|
645
|
-
* ```
|
|
646
458
|
*/
|
|
647
459
|
declare class CompanyApiService extends ApiResourceService<ICreateCompanyRequest | IUpdateCompanyRequest, ICompany> {
|
|
648
|
-
constructor(
|
|
460
|
+
constructor();
|
|
649
461
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CompanyApiService, never>;
|
|
650
462
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CompanyApiService>;
|
|
651
463
|
}
|
|
652
464
|
|
|
653
465
|
/**
|
|
654
466
|
* Token Refresh State Service
|
|
655
|
-
*
|
|
656
|
-
*
|
|
657
|
-
* Replaces module-level state that would be shared across requests in SSR.
|
|
658
|
-
*
|
|
659
|
-
* NOTE: Uses BehaviorSubject intentionally for RxJS interoperability.
|
|
660
|
-
* The HTTP interceptor needs to queue concurrent requests and have them
|
|
661
|
-
* wait for the new token via Observable subscription. This is a valid
|
|
662
|
-
* pattern that signals cannot replicate directly (no multi-subscriber
|
|
663
|
-
* async coordination). Signal is used for the boolean flag only.
|
|
664
|
-
*
|
|
665
|
-
* @example
|
|
666
|
-
* ```typescript
|
|
667
|
-
* const refreshState = inject(TokenRefreshStateService);
|
|
668
|
-
*
|
|
669
|
-
* if (refreshState.isRefreshing()) {
|
|
670
|
-
* // Queue request via refreshTokenSubject$
|
|
671
|
-
* } else {
|
|
672
|
-
* refreshState.startRefresh();
|
|
673
|
-
* // Perform refresh
|
|
674
|
-
* }
|
|
675
|
-
* ```
|
|
467
|
+
* Manages token refresh state for SSR-safe request queuing.
|
|
468
|
+
* Uses BehaviorSubject for RxJS interop (multi-subscriber async coordination).
|
|
676
469
|
*/
|
|
677
470
|
declare class TokenRefreshStateService {
|
|
678
|
-
/** Flag to track if token refresh is in progress */
|
|
679
471
|
private readonly _isRefreshing;
|
|
680
472
|
readonly isRefreshing: _angular_core.Signal<boolean>;
|
|
681
|
-
/** Subject to queue requests while refreshing */
|
|
682
473
|
private readonly _refreshTokenSubject;
|
|
683
474
|
readonly refreshTokenSubject$: rxjs.Observable<string | null>;
|
|
684
|
-
/**
|
|
685
|
-
* Mark refresh as started
|
|
686
|
-
*/
|
|
687
475
|
startRefresh(): void;
|
|
688
|
-
/**
|
|
689
|
-
* Mark refresh as completed and broadcast new token
|
|
690
|
-
*/
|
|
691
476
|
completeRefresh(newToken: string): void;
|
|
692
|
-
/**
|
|
693
|
-
* Mark refresh as failed
|
|
694
|
-
*/
|
|
695
477
|
failRefresh(): void;
|
|
696
478
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TokenRefreshStateService, never>;
|
|
697
479
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<TokenRefreshStateService>;
|
|
@@ -700,43 +482,9 @@ declare class TokenRefreshStateService {
|
|
|
700
482
|
/**
|
|
701
483
|
* User API Service
|
|
702
484
|
* Signal-based service for user CRUD operations
|
|
703
|
-
*
|
|
704
|
-
* @example
|
|
705
|
-
* ```typescript
|
|
706
|
-
* userService = inject(UserApiService);
|
|
707
|
-
*
|
|
708
|
-
* // Access data via signals
|
|
709
|
-
* users = this.userService.data;
|
|
710
|
-
* isLoading = this.userService.isLoading;
|
|
711
|
-
*
|
|
712
|
-
* // Fetch users
|
|
713
|
-
* this.userService.fetchList('search', { pagination: { currentPage: 0, pageSize: 10 } });
|
|
714
|
-
*
|
|
715
|
-
* // Create user
|
|
716
|
-
* await this.userService.insertAsync({
|
|
717
|
-
* name: 'John Doe',
|
|
718
|
-
* email: 'john@example.com',
|
|
719
|
-
* password: 'password123'
|
|
720
|
-
* });
|
|
721
|
-
* ```
|
|
722
485
|
*/
|
|
723
486
|
declare class UserApiService extends ApiResourceService<ICreateUserRequest | IUpdateUserRequest, IUser> {
|
|
724
|
-
constructor(
|
|
725
|
-
/**
|
|
726
|
-
* Verify user's email
|
|
727
|
-
*/
|
|
728
|
-
verifyEmail(userId: string): Observable<IMessageResponse>;
|
|
729
|
-
/**
|
|
730
|
-
* Verify user's phone
|
|
731
|
-
*/
|
|
732
|
-
verifyPhone(userId: string): Observable<IMessageResponse>;
|
|
733
|
-
/**
|
|
734
|
-
* Update user status (active/inactive)
|
|
735
|
-
*/
|
|
736
|
-
updateStatus(userId: string, isActive: boolean): Observable<IMessageResponse>;
|
|
737
|
-
/**
|
|
738
|
-
* Update current user's profile
|
|
739
|
-
*/
|
|
487
|
+
constructor();
|
|
740
488
|
updateProfile(data: IUpdateUserRequest): Observable<ISingleResponse<IUser>>;
|
|
741
489
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserApiService, never>;
|
|
742
490
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<UserApiService>;
|
|
@@ -744,167 +492,30 @@ declare class UserApiService extends ApiResourceService<ICreateUserRequest | IUp
|
|
|
744
492
|
|
|
745
493
|
/**
|
|
746
494
|
* User Permission API Service
|
|
747
|
-
*
|
|
748
495
|
* Handles user-company and user-branch permission assignments.
|
|
749
|
-
*
|
|
750
|
-
*
|
|
751
|
-
* Backend Endpoints (POST-only RPC):
|
|
752
|
-
* - POST /administration/permissions/user-company/assign - Batch assign/revoke company permissions
|
|
753
|
-
* - POST /administration/permissions/get-user-company - Get user's companies
|
|
754
|
-
* - POST /administration/permissions/user-branch/assign - Batch assign/revoke branch permissions
|
|
755
|
-
* - POST /administration/permissions/get-user-branch - Get user's branches
|
|
496
|
+
* Endpoint: POST /administration/permissions/*
|
|
756
497
|
*/
|
|
757
498
|
declare class UserPermissionApiService {
|
|
758
499
|
private readonly appConfig;
|
|
759
500
|
private readonly http;
|
|
760
501
|
private readonly baseUrl;
|
|
761
|
-
constructor();
|
|
762
|
-
/**
|
|
763
|
-
* Batch assign/revoke user-company permissions
|
|
764
|
-
*
|
|
765
|
-
* @example
|
|
766
|
-
* // Add company permissions
|
|
767
|
-
* service.assignUserCompanies({
|
|
768
|
-
* userId: 'user-id',
|
|
769
|
-
* items: [
|
|
770
|
-
* { targetId: 'company-1', isAdd: true },
|
|
771
|
-
* { targetId: 'company-2', isAdd: true }
|
|
772
|
-
* ]
|
|
773
|
-
* });
|
|
774
|
-
*
|
|
775
|
-
* @example
|
|
776
|
-
* // Remove company permissions
|
|
777
|
-
* service.assignUserCompanies({
|
|
778
|
-
* userId: 'user-id',
|
|
779
|
-
* items: [
|
|
780
|
-
* { targetId: 'company-1', isAdd: false }
|
|
781
|
-
* ]
|
|
782
|
-
* });
|
|
783
|
-
*/
|
|
784
502
|
assignUserCompanies(data: IAssignUserCompanyRequest): Observable<IBatchOperationResponse>;
|
|
785
|
-
/**
|
|
786
|
-
* Assign single company to user (convenience method)
|
|
787
|
-
*/
|
|
788
503
|
assignUserToCompany(userId: string, companyId: string): Observable<IBatchOperationResponse>;
|
|
789
|
-
/**
|
|
790
|
-
* Revoke single company from user (convenience method)
|
|
791
|
-
*/
|
|
792
504
|
revokeUserFromCompany(userId: string, companyId: string): Observable<IBatchOperationResponse>;
|
|
793
|
-
/**
|
|
794
|
-
* Get user's company permissions
|
|
795
|
-
*
|
|
796
|
-
* @param userId - User ID to get companies for
|
|
797
|
-
* @returns Observable with user's company permissions
|
|
798
|
-
*/
|
|
799
505
|
getUserCompanies(userId: string): Observable<IUserCompaniesResponse>;
|
|
800
|
-
/**
|
|
801
|
-
* Batch assign/revoke user-branch permissions
|
|
802
|
-
*
|
|
803
|
-
* @example
|
|
804
|
-
* // Add branch permissions
|
|
805
|
-
* service.assignUserBranches({
|
|
806
|
-
* userId: 'user-id',
|
|
807
|
-
* items: [
|
|
808
|
-
* { targetId: 'branch-1', isAdd: true },
|
|
809
|
-
* { targetId: 'branch-2', isAdd: true }
|
|
810
|
-
* ]
|
|
811
|
-
* });
|
|
812
|
-
*
|
|
813
|
-
* @example
|
|
814
|
-
* // Remove branch permissions
|
|
815
|
-
* service.assignUserBranches({
|
|
816
|
-
* userId: 'user-id',
|
|
817
|
-
* items: [
|
|
818
|
-
* { targetId: 'branch-1', isAdd: false }
|
|
819
|
-
* ]
|
|
820
|
-
* });
|
|
821
|
-
*/
|
|
822
506
|
assignUserBranches(data: IAssignUserBranchRequest): Observable<IBatchOperationResponse>;
|
|
823
|
-
/**
|
|
824
|
-
* Assign single branch to user (convenience method)
|
|
825
|
-
*/
|
|
826
507
|
assignUserToBranch(userId: string, branchId: string): Observable<IBatchOperationResponse>;
|
|
827
|
-
/**
|
|
828
|
-
* Revoke single branch from user (convenience method)
|
|
829
|
-
*/
|
|
830
508
|
revokeUserFromBranch(userId: string, branchId: string): Observable<IBatchOperationResponse>;
|
|
831
|
-
|
|
832
|
-
* Get user's branch permissions
|
|
833
|
-
*
|
|
834
|
-
* @param userId - User ID to get branches for
|
|
835
|
-
* @returns Observable with user's branch permissions
|
|
836
|
-
*/
|
|
837
|
-
getUserBranches(userId: string): Observable<IUserBranchesResponse>;
|
|
509
|
+
getUserBranches(userId: string, companyId?: string): Observable<IUserBranchesResponse>;
|
|
838
510
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserPermissionApiService, never>;
|
|
839
511
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<UserPermissionApiService>;
|
|
840
512
|
}
|
|
841
513
|
|
|
842
|
-
/**
|
|
843
|
-
* Auth Guard
|
|
844
|
-
* Protects routes that require authentication.
|
|
845
|
-
*
|
|
846
|
-
* Session restoration is handled by guestGuard. This guard assumes
|
|
847
|
-
* the session has already been restored if user accessed login page first.
|
|
848
|
-
*
|
|
849
|
-
* Handles company feature:
|
|
850
|
-
* - If company feature enabled and no company selected, redirects to login
|
|
851
|
-
* (login page handles company selection as step 2)
|
|
852
|
-
* - If not authenticated, redirects to login
|
|
853
|
-
*
|
|
854
|
-
* @example
|
|
855
|
-
* ```typescript
|
|
856
|
-
* // In routes configuration
|
|
857
|
-
* {
|
|
858
|
-
* path: 'dashboard',
|
|
859
|
-
* loadComponent: () => import('./dashboard.component'),
|
|
860
|
-
* canActivate: [authGuard]
|
|
861
|
-
* }
|
|
862
|
-
* ```
|
|
863
|
-
*/
|
|
514
|
+
/** Protects routes requiring authentication */
|
|
864
515
|
declare const authGuard: CanActivateFn;
|
|
865
|
-
/**
|
|
866
|
-
* Guest Guard
|
|
867
|
-
* Protects auth routes (login, register) from authenticated users.
|
|
868
|
-
* Redirects authenticated users to home page.
|
|
869
|
-
*
|
|
870
|
-
* CRITICAL: Unlike old implementation, this guard RESTORES the session first
|
|
871
|
-
* before checking authentication. This handles the case when users directly
|
|
872
|
-
* navigate to /auth/login via browser URL while having valid refresh token.
|
|
873
|
-
*
|
|
874
|
-
* Flow:
|
|
875
|
-
* 1. Restore session (if needed) via AuthInitService.initialize()
|
|
876
|
-
* 2. Check if user is authenticated
|
|
877
|
-
* 3. If authenticated -> redirect to dashboard
|
|
878
|
-
* 4. If not authenticated -> allow access to login page
|
|
879
|
-
*
|
|
880
|
-
* @example
|
|
881
|
-
* ```typescript
|
|
882
|
-
* // In routes configuration
|
|
883
|
-
* {
|
|
884
|
-
* path: 'auth/login',
|
|
885
|
-
* loadComponent: () => import('./login.component'),
|
|
886
|
-
* canActivate: [guestGuard]
|
|
887
|
-
* }
|
|
888
|
-
* ```
|
|
889
|
-
*/
|
|
516
|
+
/** Protects auth routes from authenticated users, restores session first */
|
|
890
517
|
declare const guestGuard: CanActivateFn;
|
|
891
|
-
/**
|
|
892
|
-
* Company Feature Guard
|
|
893
|
-
* Protects routes that require company feature to be enabled.
|
|
894
|
-
* Redirects to home if company feature is disabled.
|
|
895
|
-
*
|
|
896
|
-
* Use this guard on company/branch management routes.
|
|
897
|
-
*
|
|
898
|
-
* @example
|
|
899
|
-
* ```typescript
|
|
900
|
-
* // In routes configuration
|
|
901
|
-
* {
|
|
902
|
-
* path: 'administration/company',
|
|
903
|
-
* loadComponent: () => import('./company-list.component'),
|
|
904
|
-
* canActivate: [authGuard, companyFeatureGuard]
|
|
905
|
-
* }
|
|
906
|
-
* ```
|
|
907
|
-
*/
|
|
518
|
+
/** Protects routes requiring company feature to be enabled */
|
|
908
519
|
declare const companyFeatureGuard: CanActivateFn;
|
|
909
520
|
|
|
910
521
|
/**
|
|
@@ -912,34 +523,7 @@ declare const companyFeatureGuard: CanActivateFn;
|
|
|
912
523
|
*/
|
|
913
524
|
declare function authInterceptor(req: HttpRequest<unknown>, next: HttpHandlerFn): Observable<HttpEvent<unknown>>;
|
|
914
525
|
|
|
915
|
-
/**
|
|
916
|
-
* Token Refresh Interceptor
|
|
917
|
-
* Handles token refresh both proactively and reactively.
|
|
918
|
-
*
|
|
919
|
-
* PROACTIVE REFRESH:
|
|
920
|
-
* - Checks token expiry BEFORE making requests
|
|
921
|
-
* - Refreshes token if expired or expiring soon (within 30 seconds)
|
|
922
|
-
* - Prevents unnecessary 401 failures
|
|
923
|
-
*
|
|
924
|
-
* REACTIVE REFRESH:
|
|
925
|
-
* - Still handles 401 errors as fallback
|
|
926
|
-
* - Queues concurrent requests during refresh
|
|
927
|
-
* - Redirects to login on refresh failure
|
|
928
|
-
*
|
|
929
|
-
* SECURITY:
|
|
930
|
-
* - Token kept in memory only (not localStorage)
|
|
931
|
-
* - Uses HTTP-only refresh token cookie
|
|
932
|
-
* - SSR-safe: Uses injectable service
|
|
933
|
-
*
|
|
934
|
-
* @example
|
|
935
|
-
* ```typescript
|
|
936
|
-
* // In app.config.ts
|
|
937
|
-
* provideHttpClient(
|
|
938
|
-
* withFetch(),
|
|
939
|
-
* withInterceptors([authInterceptor, tokenRefreshInterceptor])
|
|
940
|
-
* )
|
|
941
|
-
* ```
|
|
942
|
-
*/
|
|
526
|
+
/** Token Refresh Interceptor - Proactive and reactive token refresh with request queuing */
|
|
943
527
|
declare function tokenRefreshInterceptor(req: HttpRequest<unknown>, next: HttpHandlerFn): Observable<HttpEvent<unknown>>;
|
|
944
528
|
|
|
945
529
|
/**
|
|
@@ -962,86 +546,49 @@ declare const ADMINISTRATION_ROUTES: Routes;
|
|
|
962
546
|
declare const PROFILE_ROUTES: Routes;
|
|
963
547
|
|
|
964
548
|
/**
|
|
965
|
-
* Auth Layout
|
|
966
|
-
*
|
|
967
|
-
*
|
|
549
|
+
* Auth Layout Provider Adapters
|
|
550
|
+
*
|
|
551
|
+
* Implements provider interfaces from ng-layout using ng-auth services.
|
|
552
|
+
* Bridges auth state and API to layout components.
|
|
553
|
+
*
|
|
554
|
+
* @example
|
|
555
|
+
* // In app.config.ts
|
|
556
|
+
* import { provideAuthLayoutIntegration } from '@flusys/ng-auth';
|
|
557
|
+
* providers: [...provideAuthLayoutIntegration()]
|
|
968
558
|
*/
|
|
969
559
|
declare class AuthLayoutStateAdapter implements ILayoutAuthState {
|
|
970
560
|
private readonly authState;
|
|
971
|
-
/**
|
|
972
|
-
* Maps company info to company info for layout.
|
|
973
|
-
* Falls back to app name from config when no company is selected.
|
|
974
|
-
*/
|
|
975
561
|
readonly currentCompanyInfo: Signal<ICompanyInfo$1 | null>;
|
|
976
|
-
/**
|
|
977
|
-
* Maps branch info to branch info for layout.
|
|
978
|
-
* Returns null when no branch is selected.
|
|
979
|
-
*/
|
|
980
562
|
readonly currentBranchInfo: Signal<IBranchInfo$1 | null>;
|
|
981
|
-
/**
|
|
982
|
-
* Maps user info from auth state to layout user info.
|
|
983
|
-
* Profile picture URL is managed separately by AuthLayoutSyncService via FileUrlService.
|
|
984
|
-
*/
|
|
985
563
|
readonly loginUserData: Signal<IUserInfo$1 | null>;
|
|
986
564
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthLayoutStateAdapter, never>;
|
|
987
565
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthLayoutStateAdapter>;
|
|
988
566
|
}
|
|
989
|
-
/**
|
|
990
|
-
* Auth Layout API Adapter
|
|
991
|
-
* Bridges AuthApiService to ILayoutAuthApi interface.
|
|
992
|
-
* Handles logout and navigation for layout components.
|
|
993
|
-
*/
|
|
994
567
|
declare class AuthLayoutApiAdapter implements ILayoutAuthApi {
|
|
995
568
|
private readonly authApi;
|
|
996
569
|
private readonly authState;
|
|
997
570
|
private readonly permissionApi;
|
|
998
571
|
private readonly router;
|
|
999
|
-
/**
|
|
1000
|
-
* Logout the current user.
|
|
1001
|
-
* Calls backend logout endpoint and resets local auth state.
|
|
1002
|
-
* Auth state reset handles clearing all localStorage including company/branch.
|
|
1003
|
-
*/
|
|
1004
572
|
logOut(): Observable<any>;
|
|
1005
|
-
/**
|
|
1006
|
-
* Navigate to login page.
|
|
1007
|
-
* Optionally preserves current URL as return URL.
|
|
1008
|
-
*/
|
|
1009
573
|
navigateLogin(withUrl?: boolean): void;
|
|
1010
|
-
/**
|
|
1011
|
-
* Switch to a different company and branch.
|
|
1012
|
-
* Calls backend switch endpoint, then triggers full page reload to
|
|
1013
|
-
* refresh permissions, reset component state, and re-filter all data.
|
|
1014
|
-
*/
|
|
1015
574
|
switchCompany(companyId: string, branchId: string): Observable<any>;
|
|
1016
|
-
/**
|
|
1017
|
-
* Get list of companies the logged-in user has permissions for.
|
|
1018
|
-
* Uses permission API to filter by user's actual company-level permissions.
|
|
1019
|
-
*/
|
|
1020
575
|
getUserCompanies(): Observable<ICompanyInfo$1[]>;
|
|
1021
|
-
/**
|
|
1022
|
-
* Get branches for a specific company that the logged-in user has access to.
|
|
1023
|
-
* Fetches all user branches and filters by companyId.
|
|
1024
|
-
*/
|
|
1025
576
|
getCompanyBranches(companyId: string): Observable<IBranchInfo$1[]>;
|
|
1026
577
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthLayoutApiAdapter, never>;
|
|
1027
578
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthLayoutApiAdapter>;
|
|
1028
579
|
}
|
|
1029
580
|
|
|
1030
581
|
/**
|
|
1031
|
-
* Auth
|
|
582
|
+
* Auth Shared Provider Adapters
|
|
1032
583
|
*
|
|
1033
|
-
* Implements
|
|
1034
|
-
*
|
|
584
|
+
* Implements provider interfaces from ng-shared using ng-auth services.
|
|
585
|
+
* Allows IAM, Storage, and Form-Builder packages to access auth data
|
|
586
|
+
* without depending on ng-auth directly.
|
|
1035
587
|
*
|
|
1036
588
|
* @example
|
|
1037
589
|
* // In app.config.ts
|
|
1038
|
-
*
|
|
1039
|
-
*
|
|
1040
|
-
* ]
|
|
1041
|
-
*
|
|
1042
|
-
* // In IAM component
|
|
1043
|
-
* private readonly userProvider = inject(USER_PROVIDER);
|
|
1044
|
-
* this.userProvider.getUsers({ page: 0, pageSize: 50 }).subscribe(...);
|
|
590
|
+
* import { provideAuthProviders } from '@flusys/ng-auth';
|
|
591
|
+
* providers: [...provideAuthProviders()]
|
|
1045
592
|
*/
|
|
1046
593
|
declare class AuthUserProviderAdapter implements IUserProvider {
|
|
1047
594
|
private readonly userApi;
|
|
@@ -1057,19 +604,6 @@ declare class AuthUserProviderAdapter implements IUserProvider {
|
|
|
1057
604
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthUserProviderAdapter, never>;
|
|
1058
605
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthUserProviderAdapter>;
|
|
1059
606
|
}
|
|
1060
|
-
|
|
1061
|
-
/**
|
|
1062
|
-
* Auth Company API Provider Adapter
|
|
1063
|
-
*
|
|
1064
|
-
* Implements ICompanyApiProvider interface from ng-shared using CompanyApiService.
|
|
1065
|
-
* Allows IAM package to access company data without depending on ng-auth directly.
|
|
1066
|
-
*
|
|
1067
|
-
* @example
|
|
1068
|
-
* // In app.config.ts
|
|
1069
|
-
* providers: [
|
|
1070
|
-
* { provide: COMPANY_API_PROVIDER, useClass: AuthCompanyApiProviderAdapter }
|
|
1071
|
-
* ]
|
|
1072
|
-
*/
|
|
1073
607
|
declare class AuthCompanyApiProviderAdapter implements ICompanyApiProvider {
|
|
1074
608
|
private readonly companyApi;
|
|
1075
609
|
getCompanies(filter?: {
|
|
@@ -1080,97 +614,25 @@ declare class AuthCompanyApiProviderAdapter implements ICompanyApiProvider {
|
|
|
1080
614
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthCompanyApiProviderAdapter, never>;
|
|
1081
615
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthCompanyApiProviderAdapter>;
|
|
1082
616
|
}
|
|
1083
|
-
|
|
1084
|
-
/**
|
|
1085
|
-
* Auth User Permission Provider Adapter
|
|
1086
|
-
*
|
|
1087
|
-
* Implements IUserPermissionProvider interface from ng-shared using UserPermissionApiService.
|
|
1088
|
-
* Allows IAM package to query user permissions without depending on ng-auth directly.
|
|
1089
|
-
*
|
|
1090
|
-
* @example
|
|
1091
|
-
* // In app.config.ts
|
|
1092
|
-
* providers: [
|
|
1093
|
-
* { provide: USER_PERMISSION_PROVIDER, useClass: AuthUserPermissionProviderAdapter }
|
|
1094
|
-
* ]
|
|
1095
|
-
*/
|
|
1096
617
|
declare class AuthUserPermissionProviderAdapter implements IUserPermissionProvider {
|
|
1097
618
|
private readonly userPermissionApi;
|
|
1098
|
-
getUserBranchPermissions(userId: string): Observable<ISingleResponse<any>>;
|
|
619
|
+
getUserBranchPermissions(userId: string, companyId?: string): Observable<ISingleResponse<any>>;
|
|
1099
620
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthUserPermissionProviderAdapter, never>;
|
|
1100
621
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthUserPermissionProviderAdapter>;
|
|
1101
622
|
}
|
|
1102
|
-
|
|
1103
|
-
/**
|
|
1104
|
-
* Auth State Provider Adapter
|
|
1105
|
-
*
|
|
1106
|
-
* Implements IAuthStateProvider interface from ng-shared using auth services from ng-auth.
|
|
1107
|
-
* This allows feature packages (form-builder, etc.) to check auth state without
|
|
1108
|
-
* depending on ng-auth directly.
|
|
1109
|
-
*
|
|
1110
|
-
* @example
|
|
1111
|
-
* // In app.config.ts
|
|
1112
|
-
* providers: [
|
|
1113
|
-
* { provide: AUTH_STATE_PROVIDER, useClass: AuthStateProviderAdapter }
|
|
1114
|
-
* ]
|
|
1115
|
-
*
|
|
1116
|
-
* // In form-builder component
|
|
1117
|
-
* private readonly authStateProvider = inject(AUTH_STATE_PROVIDER);
|
|
1118
|
-
* const isLoggedIn = this.authStateProvider.isAuthenticated();
|
|
1119
|
-
*/
|
|
1120
623
|
declare class AuthStateProviderAdapter implements IAuthStateProvider {
|
|
1121
624
|
private readonly authState;
|
|
1122
625
|
private readonly authInit;
|
|
1123
|
-
/**
|
|
1124
|
-
* Signal indicating if user is currently authenticated
|
|
1125
|
-
*/
|
|
1126
626
|
get isAuthenticated(): Signal<boolean>;
|
|
1127
|
-
/**
|
|
1128
|
-
* Initialize auth state (restore session from cookies/storage)
|
|
1129
|
-
* Returns Observable<void> that completes when initialization is done
|
|
1130
|
-
*/
|
|
1131
627
|
initialize(): Observable<void>;
|
|
1132
628
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthStateProviderAdapter, never>;
|
|
1133
629
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthStateProviderAdapter>;
|
|
1134
630
|
}
|
|
1135
631
|
|
|
1136
|
-
/**
|
|
1137
|
-
* Provides auth layout integration for ng-layout.
|
|
1138
|
-
* Call this in your app.config.ts to integrate ng-auth with ng-layout.
|
|
1139
|
-
*
|
|
1140
|
-
* Also registers LAYOUT_AUTH_STATE since AuthLayoutStateAdapter
|
|
1141
|
-
* implements both ILayoutAuthState and ICompanyContextProvider.
|
|
1142
|
-
*
|
|
1143
|
-
* @example
|
|
1144
|
-
* ```typescript
|
|
1145
|
-
* // In app.config.ts
|
|
1146
|
-
* export const appConfig: ApplicationConfig = {
|
|
1147
|
-
* providers: [
|
|
1148
|
-
* ...provideAuthLayoutIntegration(),
|
|
1149
|
-
* ],
|
|
1150
|
-
* };
|
|
1151
|
-
* ```
|
|
1152
|
-
*/
|
|
632
|
+
/** Provides auth integration for ng-layout */
|
|
1153
633
|
declare function provideAuthLayoutIntegration(): Provider[];
|
|
1154
634
|
|
|
1155
|
-
/**
|
|
1156
|
-
* Provide Auth Provider Adapters
|
|
1157
|
-
*
|
|
1158
|
-
* Registers auth implementations for provider interfaces from ng-shared.
|
|
1159
|
-
* This allows IAM and Storage packages to use auth services without direct dependencies.
|
|
1160
|
-
*
|
|
1161
|
-
* @example
|
|
1162
|
-
* // In app.config.ts
|
|
1163
|
-
* import { provideAuthProviders } from '@flusys/ng-auth';
|
|
1164
|
-
*
|
|
1165
|
-
* export const appConfig: ApplicationConfig = {
|
|
1166
|
-
* providers: [
|
|
1167
|
-
* provideAuthProviders(),
|
|
1168
|
-
* // ... other providers
|
|
1169
|
-
* ]
|
|
1170
|
-
* };
|
|
1171
|
-
*
|
|
1172
|
-
* @returns Array of Angular providers
|
|
1173
|
-
*/
|
|
635
|
+
/** Provides auth implementations for ng-shared provider interfaces */
|
|
1174
636
|
declare function provideAuthProviders(): Provider[];
|
|
1175
637
|
|
|
1176
638
|
/**
|
|
@@ -1178,33 +640,22 @@ declare function provideAuthProviders(): Provider[];
|
|
|
1178
640
|
*
|
|
1179
641
|
* Centralized endpoint definitions to prevent inconsistencies across interceptors
|
|
1180
642
|
* and services. All auth-related endpoints should be referenced from here.
|
|
1181
|
-
*
|
|
1182
|
-
* @example
|
|
1183
|
-
* ```typescript
|
|
1184
|
-
* if (isAuthEndpoint(req.url)) {
|
|
1185
|
-
* // Skip interceptor logic
|
|
1186
|
-
* }
|
|
1187
|
-
* ```
|
|
1188
643
|
*/
|
|
1189
644
|
declare const AUTH_ENDPOINTS: {
|
|
1190
645
|
readonly LOGIN: "/auth/login";
|
|
1191
646
|
readonly LOGOUT: "/auth/logout";
|
|
1192
647
|
readonly REFRESH: "/auth/refresh";
|
|
1193
648
|
readonly REGISTER: "/auth/register";
|
|
649
|
+
readonly ME: "/auth/me";
|
|
1194
650
|
readonly SELECT: "/auth/select";
|
|
1195
651
|
readonly SWITCH_COMPANY: "/auth/switch-company";
|
|
652
|
+
readonly CHANGE_PASSWORD: "/auth/change-password";
|
|
1196
653
|
readonly VERIFY_EMAIL: "/auth/verify-email";
|
|
1197
654
|
readonly FORGOT_PASSWORD: "/auth/forgot-password";
|
|
1198
655
|
readonly RESET_PASSWORD: "/auth/reset-password";
|
|
1199
656
|
readonly RESEND_VERIFICATION: "/auth/resend-verification";
|
|
1200
657
|
};
|
|
1201
|
-
/**
|
|
1202
|
-
* Check if a URL is an auth-related endpoint
|
|
1203
|
-
*/
|
|
1204
|
-
declare function isAuthEndpoint(url: string): boolean;
|
|
1205
|
-
/**
|
|
1206
|
-
* Check if a URL is a specific auth endpoint
|
|
1207
|
-
*/
|
|
658
|
+
/** Check if a URL matches a specific endpoint */
|
|
1208
659
|
declare function isEndpoint(url: string, endpoint: string): boolean;
|
|
1209
660
|
|
|
1210
661
|
interface ITab {
|
|
@@ -1212,6 +663,7 @@ interface ITab {
|
|
|
1212
663
|
label: string;
|
|
1213
664
|
icon: string;
|
|
1214
665
|
route: string;
|
|
666
|
+
permission: string;
|
|
1215
667
|
requiresCompanyFeature?: boolean;
|
|
1216
668
|
}
|
|
1217
669
|
/**
|
|
@@ -1223,14 +675,15 @@ interface ITab {
|
|
|
1223
675
|
*/
|
|
1224
676
|
declare class AdministrationPageComponent {
|
|
1225
677
|
private readonly appConfig;
|
|
678
|
+
private readonly permissionValidator;
|
|
1226
679
|
/** All available tabs */
|
|
1227
680
|
private readonly allTabs;
|
|
1228
681
|
/** Check if company feature is enabled */
|
|
1229
682
|
readonly companyFeatureEnabled: _angular_core.Signal<boolean>;
|
|
1230
|
-
/** Visible tabs based on config */
|
|
683
|
+
/** Visible tabs based on config and permissions */
|
|
1231
684
|
readonly visibleTabs: _angular_core.Signal<ITab[]>;
|
|
1232
|
-
/** Dynamic subtitle based on visible
|
|
1233
|
-
readonly subtitle: _angular_core.Signal<
|
|
685
|
+
/** Dynamic subtitle based on visible tabs */
|
|
686
|
+
readonly subtitle: _angular_core.Signal<string>;
|
|
1234
687
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AdministrationPageComponent, never>;
|
|
1235
688
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AdministrationPageComponent, "lib-administration-page", never, {}, {}, never, never, true, never>;
|
|
1236
689
|
}
|
|
@@ -1275,8 +728,15 @@ declare class BranchFormComponent {
|
|
|
1275
728
|
readonly isFormValid: _angular_core.Signal<boolean>;
|
|
1276
729
|
constructor();
|
|
1277
730
|
loadBranch(id: string): Promise<void>;
|
|
731
|
+
private toFormModel;
|
|
1278
732
|
generateSlug(): void;
|
|
1279
733
|
onSubmit(): Promise<void>;
|
|
734
|
+
private updateBranch;
|
|
735
|
+
private createBranch;
|
|
736
|
+
private buildOptionalFields;
|
|
737
|
+
private onSaveSuccess;
|
|
738
|
+
private getTargetCompanyId;
|
|
739
|
+
private navigateToList;
|
|
1280
740
|
onCancel(): void;
|
|
1281
741
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BranchFormComponent, never>;
|
|
1282
742
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BranchFormComponent, "lib-branch-form", never, {}, {}, never, never, true, never>;
|
|
@@ -1360,10 +820,12 @@ declare class CompanyFormComponent {
|
|
|
1360
820
|
/** Check if form is valid */
|
|
1361
821
|
readonly isFormValid: _angular_core.Signal<boolean>;
|
|
1362
822
|
constructor();
|
|
1363
|
-
loadCompany
|
|
823
|
+
private loadCompany;
|
|
1364
824
|
generateSlug(): void;
|
|
1365
825
|
onSubmit(): Promise<void>;
|
|
1366
826
|
onCancel(): void;
|
|
827
|
+
/** Build company data from form model */
|
|
828
|
+
private buildCompanyData;
|
|
1367
829
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CompanyFormComponent, never>;
|
|
1368
830
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CompanyFormComponent, "lib-company-form", never, {}, {}, never, never, true, never>;
|
|
1369
831
|
}
|
|
@@ -1396,7 +858,6 @@ declare class CompanyListComponent {
|
|
|
1396
858
|
readonly isLoading: _angular_core.Signal<boolean>;
|
|
1397
859
|
/** Total count from service */
|
|
1398
860
|
readonly total: _angular_core.Signal<number>;
|
|
1399
|
-
loadCompanies(): void;
|
|
1400
861
|
onLazyLoad(event: {
|
|
1401
862
|
first?: number | null;
|
|
1402
863
|
rows?: number | null;
|
|
@@ -1423,30 +884,23 @@ declare class ForgotPasswordPageComponent {
|
|
|
1423
884
|
readonly forgotForm: _angular_forms_signals.FieldTree<IForgotPasswordFormModel, string | number>;
|
|
1424
885
|
readonly isFormValid: _angular_core.Signal<boolean>;
|
|
1425
886
|
onSubmit(): void;
|
|
887
|
+
private showEmailSent;
|
|
1426
888
|
resetForm(): void;
|
|
1427
889
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForgotPasswordPageComponent, never>;
|
|
1428
890
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ForgotPasswordPageComponent, "lib-forgot-password-page", never, {}, {}, never, never, true, never>;
|
|
1429
891
|
}
|
|
1430
892
|
|
|
1431
|
-
/** Login form model interface */
|
|
1432
893
|
interface ILoginFormModel {
|
|
1433
894
|
email: string;
|
|
1434
895
|
password: string;
|
|
1435
896
|
rememberMe: boolean;
|
|
1436
897
|
}
|
|
1437
|
-
/** Company selection form model interface */
|
|
1438
898
|
interface ISelectionFormModel {
|
|
1439
899
|
companyId: string;
|
|
1440
900
|
branchId: string;
|
|
1441
901
|
rememberSelection: boolean;
|
|
1442
902
|
}
|
|
1443
903
|
type LoginStep = 'credentials' | 'company-selection' | 'email-verification';
|
|
1444
|
-
/**
|
|
1445
|
-
* Login Page Component
|
|
1446
|
-
* Multi-step authentication flow:
|
|
1447
|
-
* - Step 1: Email/Password credentials
|
|
1448
|
-
* - Step 2: Company/Branch selection (when company feature enabled and user has multiple)
|
|
1449
|
-
*/
|
|
1450
904
|
declare class LoginPageComponent {
|
|
1451
905
|
private readonly destroyRef;
|
|
1452
906
|
private readonly appConfig;
|
|
@@ -1457,36 +911,20 @@ declare class LoginPageComponent {
|
|
|
1457
911
|
readonly currentStep: _angular_core.WritableSignal<LoginStep>;
|
|
1458
912
|
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
1459
913
|
readonly unverifiedEmail: _angular_core.WritableSignal<string>;
|
|
1460
|
-
/** Login form model */
|
|
1461
914
|
readonly loginFormModel: _angular_core.WritableSignal<ILoginFormModel>;
|
|
1462
|
-
/** Login form with validation schema */
|
|
1463
915
|
readonly loginForm: _angular_forms_signals.FieldTree<ILoginFormModel, string | number>;
|
|
1464
|
-
/** Check if login form is valid */
|
|
1465
916
|
readonly isLoginFormValid: _angular_core.Signal<boolean>;
|
|
1466
|
-
/** Selection form model */
|
|
1467
917
|
readonly selectionFormModel: _angular_core.WritableSignal<ISelectionFormModel>;
|
|
1468
|
-
/** Selection form with validation schema */
|
|
1469
918
|
readonly selectionForm: _angular_forms_signals.FieldTree<ISelectionFormModel, string | number>;
|
|
1470
|
-
/** Check if selection form is valid */
|
|
1471
919
|
readonly isSelectionFormValid: _angular_core.Signal<boolean>;
|
|
1472
|
-
/** Whether company feature is enabled */
|
|
1473
920
|
readonly companyFeatureEnabled: _angular_core.Signal<boolean>;
|
|
1474
|
-
/** Session ID for company selection */
|
|
1475
921
|
private sessionId;
|
|
1476
|
-
/** Available companies */
|
|
1477
922
|
readonly companies: _angular_core.WritableSignal<ICompanyWithBranches[]>;
|
|
1478
|
-
/** User's name */
|
|
1479
923
|
readonly userName: _angular_core.WritableSignal<string>;
|
|
1480
|
-
/** Branches for selected company */
|
|
1481
924
|
readonly branches: _angular_core.Signal<IBranchSelectionInfo[]>;
|
|
1482
925
|
constructor();
|
|
1483
|
-
/**
|
|
1484
|
-
* Restores pending company selection state from auth service.
|
|
1485
|
-
* Called when user refreshes page during Step 2 of login flow.
|
|
1486
|
-
*/
|
|
1487
926
|
private restorePendingSelectionState;
|
|
1488
927
|
onSubmit(): void;
|
|
1489
|
-
/** Handle company selection change */
|
|
1490
928
|
onCompanyChange(): void;
|
|
1491
929
|
onSelectCompany(): void;
|
|
1492
930
|
goBackToCredentials(): void;
|
|
@@ -1551,9 +989,11 @@ declare class ProfilePageComponent {
|
|
|
1551
989
|
readonly showRoles: _angular_core.Signal<boolean>;
|
|
1552
990
|
readonly showActions: _angular_core.Signal<boolean>;
|
|
1553
991
|
readonly showBottomRow: _angular_core.Signal<boolean>;
|
|
992
|
+
private readonly originalFormModel;
|
|
1554
993
|
readonly formModel: _angular_core.WritableSignal<IProfileFormModel>;
|
|
1555
994
|
readonly formTree: _angular_forms_signals.FieldTree<IProfileFormModel, string | number>;
|
|
1556
995
|
readonly isFormValid: _angular_core.Signal<boolean>;
|
|
996
|
+
readonly isFormDirty: _angular_core.Signal<boolean>;
|
|
1557
997
|
readonly passwordModel: _angular_core.WritableSignal<IPasswordFormModel>;
|
|
1558
998
|
readonly isPasswordLoading: _angular_core.WritableSignal<boolean>;
|
|
1559
999
|
readonly isPasswordFormValid: _angular_core.Signal<boolean>;
|
|
@@ -1689,7 +1129,11 @@ declare class UserFormComponent {
|
|
|
1689
1129
|
readonly isFormValid: _angular_core.Signal<boolean>;
|
|
1690
1130
|
constructor();
|
|
1691
1131
|
loadUser(id: string): void;
|
|
1132
|
+
private toFormModel;
|
|
1692
1133
|
onSubmit(): void;
|
|
1134
|
+
private updateUser;
|
|
1135
|
+
private createUser;
|
|
1136
|
+
private onSaveSuccess;
|
|
1693
1137
|
/**
|
|
1694
1138
|
* Assign user to current company and branch
|
|
1695
1139
|
*/
|
|
@@ -1737,6 +1181,7 @@ declare class UserListComponent {
|
|
|
1737
1181
|
onEdit(user: IUser): void;
|
|
1738
1182
|
onManageCompanyPermissions(user: IUser): void;
|
|
1739
1183
|
onManageBranchPermissions(user: IUser): void;
|
|
1184
|
+
private openPermissionDialog;
|
|
1740
1185
|
onDelete(user: IUser): void;
|
|
1741
1186
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserListComponent, never>;
|
|
1742
1187
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserListComponent, "lib-user-list", never, {}, {}, never, never, true, never>;
|
|
@@ -1772,52 +1217,27 @@ declare class VerifyEmailPageComponent {
|
|
|
1772
1217
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<VerifyEmailPageComponent, "lib-verify-email-page", never, {}, {}, never, never, true, never>;
|
|
1773
1218
|
}
|
|
1774
1219
|
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
* Workflow:
|
|
1779
|
-
* 1. Dialog opens → Shows company dropdown with user's permitted companies
|
|
1780
|
-
* 2. User selects a company → Branches load for that company
|
|
1781
|
-
* 3. Branches show with checkboxes (checked = already assigned)
|
|
1782
|
-
* 4. Check to assign, uncheck to revoke
|
|
1783
|
-
*
|
|
1784
|
-
* Company dropdown only shows companies the user has company-level permissions for.
|
|
1785
|
-
* Branch permissions can only be assigned within user's permitted companies.
|
|
1786
|
-
*/
|
|
1220
|
+
interface BranchWithAssignment extends IBranch {
|
|
1221
|
+
isAssigned: boolean;
|
|
1222
|
+
}
|
|
1787
1223
|
declare class UserBranchPermissionDialogComponent {
|
|
1788
1224
|
private readonly branchApi;
|
|
1789
1225
|
private readonly permissionApi;
|
|
1790
|
-
private readonly authState;
|
|
1791
1226
|
private readonly messageService;
|
|
1792
|
-
/** Dialog visibility */
|
|
1793
1227
|
readonly visible: _angular_core.InputSignal<boolean>;
|
|
1794
|
-
/** User to manage permissions for */
|
|
1795
1228
|
readonly user: _angular_core.InputSignal<IUser | null>;
|
|
1796
|
-
/** Close event */
|
|
1797
1229
|
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
1798
|
-
/** Refresh event after changes */
|
|
1799
1230
|
readonly permissionsChanged: _angular_core.OutputEmitterRef<void>;
|
|
1800
|
-
/** Loading state */
|
|
1801
1231
|
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
1802
|
-
/** Saving state */
|
|
1803
1232
|
readonly isSaving: _angular_core.WritableSignal<boolean>;
|
|
1804
|
-
/** Branches with assignment status */
|
|
1805
1233
|
readonly branches: _angular_core.WritableSignal<BranchWithAssignment[]>;
|
|
1806
|
-
/** Available companies (filtered by user's company permissions) */
|
|
1807
1234
|
readonly companies: _angular_core.WritableSignal<{
|
|
1808
1235
|
id: string;
|
|
1809
1236
|
name: string;
|
|
1810
1237
|
}[]>;
|
|
1811
|
-
/** Selected company ID */
|
|
1812
1238
|
selectedCompanyId: string | null;
|
|
1813
|
-
/** Current company from auth state */
|
|
1814
|
-
readonly currentCompany: _angular_core.Signal<_flusys_ng_auth.ICompanyInfo | null>;
|
|
1815
|
-
/** Currently assigned branch IDs */
|
|
1816
1239
|
private assignedBranchIds;
|
|
1817
1240
|
constructor();
|
|
1818
|
-
/**
|
|
1819
|
-
* Load user's assigned companies (does not auto-select or load branches)
|
|
1820
|
-
*/
|
|
1821
1241
|
private loadUserCompaniesAndData;
|
|
1822
1242
|
private loadData;
|
|
1823
1243
|
onCompanyChange(): void;
|
|
@@ -1826,35 +1246,21 @@ declare class UserBranchPermissionDialogComponent {
|
|
|
1826
1246
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserBranchPermissionDialogComponent, never>;
|
|
1827
1247
|
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>;
|
|
1828
1248
|
}
|
|
1829
|
-
|
|
1249
|
+
|
|
1250
|
+
interface CompanyWithAssignment extends ICompany {
|
|
1830
1251
|
isAssigned: boolean;
|
|
1831
1252
|
}
|
|
1832
|
-
|
|
1833
|
-
/**
|
|
1834
|
-
* User Company Permission Dialog
|
|
1835
|
-
* Shows all companies with checkboxes
|
|
1836
|
-
* Initially assigned companies are checked
|
|
1837
|
-
* Check to assign, uncheck to revoke
|
|
1838
|
-
*/
|
|
1839
1253
|
declare class UserCompanyPermissionDialogComponent {
|
|
1840
1254
|
private readonly companyApi;
|
|
1841
1255
|
private readonly permissionApi;
|
|
1842
1256
|
private readonly messageService;
|
|
1843
|
-
/** Dialog visibility */
|
|
1844
1257
|
readonly visible: _angular_core.InputSignal<boolean>;
|
|
1845
|
-
/** User to manage permissions for */
|
|
1846
1258
|
readonly user: _angular_core.InputSignal<IUser | null>;
|
|
1847
|
-
/** Close event */
|
|
1848
1259
|
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
1849
|
-
/** Refresh event after changes */
|
|
1850
1260
|
readonly permissionsChanged: _angular_core.OutputEmitterRef<void>;
|
|
1851
|
-
/** Loading state */
|
|
1852
1261
|
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
1853
|
-
/** Saving state */
|
|
1854
1262
|
readonly isSaving: _angular_core.WritableSignal<boolean>;
|
|
1855
|
-
/** Companies with assignment status */
|
|
1856
1263
|
readonly companies: _angular_core.WritableSignal<CompanyWithAssignment[]>;
|
|
1857
|
-
/** Currently assigned company IDs */
|
|
1858
1264
|
private assignedCompanyIds;
|
|
1859
1265
|
constructor();
|
|
1860
1266
|
private loadData;
|
|
@@ -1863,9 +1269,6 @@ declare class UserCompanyPermissionDialogComponent {
|
|
|
1863
1269
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserCompanyPermissionDialogComponent, never>;
|
|
1864
1270
|
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>;
|
|
1865
1271
|
}
|
|
1866
|
-
interface CompanyWithAssignment extends ICompany {
|
|
1867
|
-
isAssigned: boolean;
|
|
1868
|
-
}
|
|
1869
1272
|
|
|
1870
|
-
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,
|
|
1273
|
+
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 };
|
|
1871
1274
|
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 };
|