@rolatech/angular-auth 19.1.0-beta.3 → 20.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -4
- package/lib/auth.routes.d.ts +0 -2
- package/lib/auth.store.d.ts +0 -16
- package/lib/components/address/address.component.d.ts +0 -13
- package/lib/components/auth-dialog/auth-dialog.component.d.ts +0 -7
- package/lib/components/faceid-detect-dialog/faceid-detect-dialog.component.d.ts +0 -25
- package/lib/components/forbidden/forbidden.component.d.ts +0 -5
- package/lib/components/index.d.ts +0 -2
- package/lib/components/unauthorized/unauthorized.component.d.ts +0 -5
- package/lib/guards/auth-dialog.guard.d.ts +0 -2
- package/lib/guards/auth.guard.d.ts +0 -2
- package/lib/guards/index.d.ts +0 -4
- package/lib/guards/permission.guard.d.ts +0 -2
- package/lib/guards/role.guard.d.ts +0 -2
- package/lib/interceptors/auth.interceptor.d.ts +0 -15
- package/lib/interceptors/error.interceptor.d.ts +0 -23
- package/lib/interceptors/index.d.ts +0 -2
- package/lib/interfaces/auth.interface.d.ts +0 -54
- package/lib/services/auth-agent.service.d.ts +0 -17
- package/lib/services/auth-user.service.d.ts +0 -40
- package/lib/services/auth.service.d.ts +0 -34
- package/lib/services/auth.user.service.d.ts +0 -41
- package/lib/services/index.d.ts +0 -4
- package/lib/services/storage.service.d.ts +0 -15
- package/provider.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rolatech/angular-auth",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0-beta.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@angular/common": "^
|
|
7
|
-
"@angular/core": "^
|
|
6
|
+
"@angular/common": "^20.0.0",
|
|
7
|
+
"@angular/core": "^20.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"
|
|
10
|
+
"@rolatech/angular-common": "20.0.0-beta.2",
|
|
11
|
+
"@rolatech/angular-components": "20.0.0-beta.2",
|
|
12
|
+
"@rolatech/angular-services": "20.0.0-beta.2",
|
|
13
|
+
"tslib": "^2.3.0"
|
|
11
14
|
},
|
|
12
15
|
"repository": {
|
|
13
16
|
"type": "git",
|
package/lib/auth.routes.d.ts
DELETED
package/lib/auth.store.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { User } from './interfaces/auth.interface';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class AuthStore {
|
|
4
|
-
private _state;
|
|
5
|
-
userId: import("@angular/core").Signal<string>;
|
|
6
|
-
user: import("@angular/core").Signal<User | null>;
|
|
7
|
-
roles: import("@angular/core").Signal<string[]>;
|
|
8
|
-
authenticated: import("@angular/core").Signal<boolean | null>;
|
|
9
|
-
loaded: import("@angular/core").Signal<boolean>;
|
|
10
|
-
update(data: any): void;
|
|
11
|
-
updateAuthenticated(authenticated: boolean): void;
|
|
12
|
-
updateUser(user: User): void;
|
|
13
|
-
updateEmail(email: string): void;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthStore, never>;
|
|
15
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AuthStore>;
|
|
16
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DoCheck, OnInit } from '@angular/core';
|
|
2
|
-
import { AddressType } from '../../interfaces/auth.interface';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class AddressComponent implements OnInit, DoCheck {
|
|
5
|
-
addressType: typeof AddressType;
|
|
6
|
-
enumKeys: string[];
|
|
7
|
-
address: import("@angular/core").ModelSignal<any>;
|
|
8
|
-
output: import("@angular/core").OutputEmitterRef<any>;
|
|
9
|
-
ngOnInit(): void;
|
|
10
|
-
ngDoCheck(): void;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AddressComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AddressComponent, "rolatech-address", never, { "address": { "alias": "address"; "required": false; "isSignal": true; }; }, { "address": "addressChange"; "output": "output"; }, never, never, true, never>;
|
|
13
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class AuthDialogComponent {
|
|
4
|
-
dialogRef: MatDialogRef<any, any>;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthDialogComponent, never>;
|
|
6
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AuthDialogComponent, "rolatech-auth-dialog", never, {}, {}, never, never, true, never>;
|
|
7
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { OnDestroy } from '@angular/core';
|
|
2
|
-
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
|
-
import { SnackBarService } from '@rolatech/angular-services';
|
|
4
|
-
import { AuthService } from '../../services/auth.service';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class FaceidDetectDialogComponent implements OnDestroy {
|
|
7
|
-
dialogRef: MatDialogRef<any, any>;
|
|
8
|
-
environment: any;
|
|
9
|
-
data: any;
|
|
10
|
-
authService: AuthService;
|
|
11
|
-
snackBarService: SnackBarService;
|
|
12
|
-
output: import("@angular/core").OutputEmitterRef<any>;
|
|
13
|
-
loading: boolean;
|
|
14
|
-
qrcodeUrl: string;
|
|
15
|
-
verified: boolean;
|
|
16
|
-
interval: any;
|
|
17
|
-
constructor();
|
|
18
|
-
ngOnDestroy(): void;
|
|
19
|
-
request(): void;
|
|
20
|
-
cancel(): void;
|
|
21
|
-
loop(): void;
|
|
22
|
-
genQRCode(url: string): Promise<void>;
|
|
23
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FaceidDetectDialogComponent, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FaceidDetectDialogComponent, "rolatech-faceid-detect-dialog", never, {}, { "output": "output"; }, never, never, true, never>;
|
|
25
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class ForbiddenComponent {
|
|
3
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ForbiddenComponent, never>;
|
|
4
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ForbiddenComponent, "rolatech-forbidden", never, {}, {}, never, never, true, never>;
|
|
5
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class UnauthorizedComponent {
|
|
3
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<UnauthorizedComponent, never>;
|
|
4
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UnauthorizedComponent, "rolatech-unauthorized", never, {}, {}, never, never, true, never>;
|
|
5
|
-
}
|
package/lib/guards/index.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { AuthService } from '../services/auth.service';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class AuthInterceptor implements HttpInterceptor {
|
|
6
|
-
environment: any;
|
|
7
|
-
platformId: Object;
|
|
8
|
-
authService: AuthService;
|
|
9
|
-
constructor();
|
|
10
|
-
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
11
|
-
addClientIdHeader(request: HttpRequest<any>): HttpRequest<any>;
|
|
12
|
-
addCookieHeader(request: HttpRequest<any>, cookie: string): HttpRequest<any>;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthInterceptor, never>;
|
|
14
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AuthInterceptor>;
|
|
15
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
|
2
|
-
import { AuthService } from '../services/auth.service';
|
|
3
|
-
import { BehaviorSubject, Observable } from 'rxjs';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class ErrorInterceptor implements HttpInterceptor {
|
|
6
|
-
tokenSubject: BehaviorSubject<string>;
|
|
7
|
-
isRefreshingToken: boolean;
|
|
8
|
-
authService: AuthService;
|
|
9
|
-
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
10
|
-
private hand400Error;
|
|
11
|
-
private hand401Error;
|
|
12
|
-
private hand403Error;
|
|
13
|
-
private hand404Error;
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* @param error SMS code sent too many
|
|
17
|
-
* @returns
|
|
18
|
-
*/
|
|
19
|
-
private hand429Error;
|
|
20
|
-
private handleDefaultError;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorInterceptor, never>;
|
|
22
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ErrorInterceptor>;
|
|
23
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
export interface User {
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
firstName: string;
|
|
5
|
-
lastName: string;
|
|
6
|
-
username: string;
|
|
7
|
-
avatar: string;
|
|
8
|
-
phone: string;
|
|
9
|
-
email: string;
|
|
10
|
-
bio: string;
|
|
11
|
-
roles: Role[];
|
|
12
|
-
gender: string;
|
|
13
|
-
}
|
|
14
|
-
export interface Role {
|
|
15
|
-
name: string;
|
|
16
|
-
}
|
|
17
|
-
export interface PasswordChange {
|
|
18
|
-
oldPassword: string;
|
|
19
|
-
newPassword: string;
|
|
20
|
-
ne2Password: string;
|
|
21
|
-
}
|
|
22
|
-
export declare enum UserStatus {
|
|
23
|
-
ACTIVE = "\u6B63\u5E38",
|
|
24
|
-
AWAITING = "\u5BA1\u6838\u4E2D",
|
|
25
|
-
DELETED = "\u5DF2\u5220\u9664"
|
|
26
|
-
}
|
|
27
|
-
export interface IntrospectResponse {
|
|
28
|
-
userId: string;
|
|
29
|
-
roles: string[];
|
|
30
|
-
authenticated: boolean;
|
|
31
|
-
}
|
|
32
|
-
export interface Address {
|
|
33
|
-
id: string;
|
|
34
|
-
name: string;
|
|
35
|
-
phone: string;
|
|
36
|
-
email: string;
|
|
37
|
-
type: AddressType;
|
|
38
|
-
country: string;
|
|
39
|
-
province: string;
|
|
40
|
-
city: string;
|
|
41
|
-
district: string;
|
|
42
|
-
street: string;
|
|
43
|
-
detail: string;
|
|
44
|
-
latitude: string;
|
|
45
|
-
longitude: string;
|
|
46
|
-
userId: string;
|
|
47
|
-
}
|
|
48
|
-
export declare enum AddressType {
|
|
49
|
-
HOME = "\u4F4F\u5B85\u5730\u5740",
|
|
50
|
-
WORK = "\u5DE5\u4F5C\u5730\u5740",
|
|
51
|
-
BILLING = "\u8D26\u5355\u5730\u5740",
|
|
52
|
-
SHIPPING = "\u8D2D\u7269\u5730\u5740",
|
|
53
|
-
OTHER = "\u5176\u4ED6"
|
|
54
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class AuthAgentService {
|
|
5
|
-
environment: any;
|
|
6
|
-
http: HttpClient;
|
|
7
|
-
baseUrl: string;
|
|
8
|
-
findAllApplications(options: any): Observable<any>;
|
|
9
|
-
getApplication(id: string): Observable<any>;
|
|
10
|
-
myApplication(): Observable<any>;
|
|
11
|
-
apply(data: any): Observable<any>;
|
|
12
|
-
approve(id: string): Observable<any>;
|
|
13
|
-
reject(id: any, data: any): Observable<any>;
|
|
14
|
-
findRejections(id: string): Observable<any>;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthAgentService, never>;
|
|
16
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AuthAgentService>;
|
|
17
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { User } from '../interfaces/auth.interface';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class AuthUserService {
|
|
6
|
-
environment: any;
|
|
7
|
-
http: HttpClient;
|
|
8
|
-
private userSubject;
|
|
9
|
-
userInfo$: Observable<User | null>;
|
|
10
|
-
updateUserInfo(userInfo: User | null): void;
|
|
11
|
-
findAll(options: any): Observable<any>;
|
|
12
|
-
findOne(userId: any): Observable<any>;
|
|
13
|
-
me(): Observable<any>;
|
|
14
|
-
getPublicUserInfo(id: string): Observable<any>;
|
|
15
|
-
findPublicInfoByIds(ids: Array<string>): Observable<any>;
|
|
16
|
-
sendSMSCode(countryCode: string, phone: string): Observable<any>;
|
|
17
|
-
findByUsername(username: string): Observable<any>;
|
|
18
|
-
findUserInfoByUsername(username: string): Observable<any>;
|
|
19
|
-
findPublicInfoByRole(role: string): Observable<any>;
|
|
20
|
-
changeUsername(username: string): Observable<any>;
|
|
21
|
-
changeName(name: any): Observable<any>;
|
|
22
|
-
update(data: any): Observable<any>;
|
|
23
|
-
uploadAvatar(data: any): Observable<any>;
|
|
24
|
-
changePhone(phone: any, code: any): Observable<any>;
|
|
25
|
-
follow(username: string): Observable<any>;
|
|
26
|
-
unfollow(username: string): Observable<any>;
|
|
27
|
-
listFollowingByUsername(username: string): Observable<any>;
|
|
28
|
-
listFollowersByUsername(username: string): Observable<any>;
|
|
29
|
-
checkIfFollowingSomeone(username: string, target: string): Observable<any>;
|
|
30
|
-
isFollowing(username: string): Observable<any>;
|
|
31
|
-
friendships(ids: string[]): Observable<any>;
|
|
32
|
-
followersStats(username: string): Observable<any>;
|
|
33
|
-
addAddress(data: any): Observable<any>;
|
|
34
|
-
updateAddress(id: string, data: any): Observable<any>;
|
|
35
|
-
findAllAddress(options: any): Observable<any>;
|
|
36
|
-
getAddress(id: string): Observable<any>;
|
|
37
|
-
deleteAddressById(id: string): Observable<any>;
|
|
38
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthUserService, never>;
|
|
39
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AuthUserService>;
|
|
40
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { PasswordChange } from '@rolatech/angular-common';
|
|
4
|
-
import { ActivatedRoute } from '@angular/router';
|
|
5
|
-
import { IntrospectResponse, User } from '../interfaces/auth.interface';
|
|
6
|
-
import { AuthStore } from '../auth.store';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class AuthService {
|
|
9
|
-
environment: any;
|
|
10
|
-
http: HttpClient;
|
|
11
|
-
route: ActivatedRoute;
|
|
12
|
-
authStore: AuthStore;
|
|
13
|
-
authenticated: import("@angular/core").Signal<boolean | null>;
|
|
14
|
-
userId: import("@angular/core").Signal<string>;
|
|
15
|
-
user: import("@angular/core").Signal<User | null>;
|
|
16
|
-
roles: import("@angular/core").Signal<string[]>;
|
|
17
|
-
loaded: import("@angular/core").Signal<boolean>;
|
|
18
|
-
introspect(): Observable<IntrospectResponse | never>;
|
|
19
|
-
me(): Observable<any>;
|
|
20
|
-
wechatLogin(code: string, state: string): Observable<any>;
|
|
21
|
-
wechatDisconnect(): Observable<any>;
|
|
22
|
-
requestFaceIdDetect(): Observable<any>;
|
|
23
|
-
faceIdStatus(): Observable<any>;
|
|
24
|
-
faceIdStatusByToken(token: any): Observable<any>;
|
|
25
|
-
wechatStatus(options: any): Observable<any>;
|
|
26
|
-
login(data: any): Observable<any>;
|
|
27
|
-
signup(data: any): Observable<any>;
|
|
28
|
-
logout(): Observable<any>;
|
|
29
|
-
changePassword(data: PasswordChange): Observable<any>;
|
|
30
|
-
lookup(account: string, next: string): Observable<any>;
|
|
31
|
-
challenge(username: string, password: string, next: string): Observable<any>;
|
|
32
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
|
|
33
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
|
|
34
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { User } from '../interfaces/auth.interface';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class AuthUserService {
|
|
6
|
-
environment: any;
|
|
7
|
-
http: HttpClient;
|
|
8
|
-
private userSubject;
|
|
9
|
-
userInfo$: Observable<User | null>;
|
|
10
|
-
updateUserInfo(userInfo: User | null): void;
|
|
11
|
-
findAll(options: any): Observable<any>;
|
|
12
|
-
findOne(userId: any): Observable<any>;
|
|
13
|
-
me(): Observable<any>;
|
|
14
|
-
getPublicUserInfo(id: string): Observable<any>;
|
|
15
|
-
findPublicInfoByIds(ids: Array<string>): Observable<any>;
|
|
16
|
-
sendSMSCode(countryCode: string, phone: string): Observable<any>;
|
|
17
|
-
signup(data: any): Observable<any>;
|
|
18
|
-
findByUsername(username: string): Observable<any>;
|
|
19
|
-
findUserInfoByUsername(username: string): Observable<any>;
|
|
20
|
-
findPublicInfoByRole(role: string): Observable<any>;
|
|
21
|
-
changeUsername(username: string): Observable<any>;
|
|
22
|
-
changeName(name: any): Observable<any>;
|
|
23
|
-
update(data: any): Observable<any>;
|
|
24
|
-
uploadAvatar(data: any): Observable<any>;
|
|
25
|
-
changePhone(phone: any, code: any): Observable<any>;
|
|
26
|
-
follow(username: string): Observable<any>;
|
|
27
|
-
unfollow(username: string): Observable<any>;
|
|
28
|
-
listFollowingByUsername(username: string): Observable<any>;
|
|
29
|
-
listFollowersByUsername(username: string): Observable<any>;
|
|
30
|
-
checkIfFollowingSomeone(username: string, target: string): Observable<any>;
|
|
31
|
-
isFollowing(username: string): Observable<any>;
|
|
32
|
-
friendships(ids: string[]): Observable<any>;
|
|
33
|
-
followersStats(username: string): Observable<any>;
|
|
34
|
-
addAddress(data: any): Observable<any>;
|
|
35
|
-
updateAddress(id: string, data: any): Observable<any>;
|
|
36
|
-
findAllAddress(options: any): Observable<any>;
|
|
37
|
-
getAddress(id: string): Observable<any>;
|
|
38
|
-
deleteAddressById(id: string): Observable<any>;
|
|
39
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthUserService, never>;
|
|
40
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AuthUserService>;
|
|
41
|
-
}
|
package/lib/services/index.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class LocalStorageService implements Storage {
|
|
3
|
-
private storage;
|
|
4
|
-
platformId: Object;
|
|
5
|
-
constructor();
|
|
6
|
-
[name: string]: any;
|
|
7
|
-
length: number;
|
|
8
|
-
clear(): void;
|
|
9
|
-
getItem(key: string): string | null;
|
|
10
|
-
key(index: number): string | null;
|
|
11
|
-
removeItem(key: string): void;
|
|
12
|
-
setItem(key: string, value: string): void;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LocalStorageService, never>;
|
|
14
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<LocalStorageService>;
|
|
15
|
-
}
|
package/provider.d.ts
DELETED