@esolve/ng-esolve-connect 0.62.0 → 0.63.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/esm2022/lib/auth/esolve-auth.service.mjs +4 -1
- package/esm2022/lib/auth/esolve-otp.service.mjs +73 -0
- package/esm2022/lib/auth/index.mjs +3 -1
- package/esm2022/lib/auth/interfaces/esolve-login-post-response-item.interface.mjs +1 -1
- package/esm2022/lib/auth/interfaces/esolve-otp-record.interface.mjs +2 -0
- package/esm2022/lib/auth/interfaces/esolve-otp-validation-record.interface.mjs +2 -0
- package/esm2022/lib/auth/interfaces/index.mjs +3 -1
- package/esm2022/lib/auth/models/esolve-otp-validation.model.mjs +20 -0
- package/esm2022/lib/auth/models/esolve-otp.model.mjs +14 -0
- package/esm2022/lib/auth/models/index.mjs +3 -0
- package/esm2022/lib/auth/types/esolve-otp-action.type.mjs +2 -0
- package/esm2022/lib/auth/types/esolve-validate-otp-response.type.mjs +2 -0
- package/esm2022/lib/auth/types/index.mjs +3 -1
- package/esm2022/media/lib/classes/esolve-media-article.model.mjs +4 -1
- package/fesm2022/esolve-ng-esolve-connect-media.mjs +3 -0
- package/fesm2022/esolve-ng-esolve-connect-media.mjs.map +1 -1
- package/fesm2022/esolve-ng-esolve-connect.mjs +103 -1
- package/fesm2022/esolve-ng-esolve-connect.mjs.map +1 -1
- package/lib/auth/esolve-auth.service.d.ts +2 -1
- package/lib/auth/esolve-otp.service.d.ts +13 -0
- package/lib/auth/index.d.ts +2 -0
- package/lib/auth/interfaces/esolve-login-post-response-item.interface.d.ts +1 -1
- package/lib/auth/interfaces/esolve-otp-record.interface.d.ts +7 -0
- package/lib/auth/interfaces/esolve-otp-validation-record.interface.d.ts +8 -0
- package/lib/auth/interfaces/index.d.ts +2 -0
- package/lib/auth/models/esolve-otp-validation.model.d.ts +11 -0
- package/lib/auth/models/esolve-otp.model.d.ts +9 -0
- package/lib/auth/models/index.d.ts +2 -0
- package/lib/auth/types/esolve-otp-action.type.d.ts +1 -0
- package/lib/auth/types/esolve-validate-otp-response.type.d.ts +4 -0
- package/lib/auth/types/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { EsolveAuthGetResponse } from './types';
|
|
2
|
+
import { EsolveAuthGetResponse, EsolveAuthResult } from './types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class EsolveAuthService {
|
|
5
5
|
private readonly config;
|
|
@@ -15,6 +15,7 @@ export declare class EsolveAuthService {
|
|
|
15
15
|
validateCachedTokens(): Promise<boolean>;
|
|
16
16
|
private checkAccessToken;
|
|
17
17
|
private restore;
|
|
18
|
+
handleExternalAuthentication(result: EsolveAuthResult): void;
|
|
18
19
|
private handleAuthentication;
|
|
19
20
|
private handleError;
|
|
20
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<EsolveAuthService, never>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { EsolveOtpAction } from './types';
|
|
3
|
+
import { EsolveOtp, EsolveOtpValidation } from './models';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class EsolveOtpService {
|
|
6
|
+
private readonly config;
|
|
7
|
+
private readonly http;
|
|
8
|
+
private readonly auth;
|
|
9
|
+
getOtp(recipient_number?: string): Observable<EsolveOtp>;
|
|
10
|
+
getValidateOtp(otp_key: string, otp_code: string, otp_action?: EsolveOtpAction, email?: string, cellnumber?: string): Observable<EsolveOtpValidation>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EsolveOtpService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EsolveOtpService>;
|
|
13
|
+
}
|
package/lib/auth/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EsolvePostResponseItem } from '../../shared
|
|
1
|
+
import { EsolvePostResponseItem } from '../../shared';
|
|
2
2
|
import { EsolveSessionData } from '../../session';
|
|
3
3
|
export interface EsolveLoginPostResponseItem extends EsolvePostResponseItem {
|
|
4
4
|
esolve_id: number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EsolveLoginPostResponseItem } from './esolve-login-post-response-item.interface';
|
|
2
|
+
export interface EsolveOtpValidationRecord {
|
|
3
|
+
otp_action?: string;
|
|
4
|
+
otp_valid: boolean;
|
|
5
|
+
otp_deleted?: boolean;
|
|
6
|
+
login_success?: boolean;
|
|
7
|
+
login_response?: EsolveLoginPostResponseItem;
|
|
8
|
+
}
|
|
@@ -3,3 +3,5 @@ export * from './esolve-auth-data.interface';
|
|
|
3
3
|
export * from './esolve-auth-get-data.interface';
|
|
4
4
|
export * from './esolve-auth-response.interface';
|
|
5
5
|
export * from './esolve-login-post-response-item.interface';
|
|
6
|
+
export * from './esolve-otp-record.interface';
|
|
7
|
+
export * from './esolve-otp-validation-record.interface';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EsolveLoginPostResponseItem, EsolveOtpValidationRecord } from '../interfaces';
|
|
2
|
+
import { EsolveOtpAction } from '../types';
|
|
3
|
+
export declare class EsolveOtpValidation {
|
|
4
|
+
otp_action: EsolveOtpAction;
|
|
5
|
+
otp_valid?: boolean;
|
|
6
|
+
otp_deleted?: boolean;
|
|
7
|
+
login_success?: boolean;
|
|
8
|
+
login_response?: EsolveLoginPostResponseItem;
|
|
9
|
+
constructor(record: EsolveOtpValidationRecord);
|
|
10
|
+
private getAction;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type EsolveOtpAction = '' | 'login';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { EsolveGetResponse } from '../../shared';
|
|
2
|
+
import { EsolveOtpValidationRecord } from '../interfaces';
|
|
3
|
+
import { EsolveAuthResult } from './esolve-auth-result.type';
|
|
4
|
+
export type EsolveValidateOtpResponse = EsolveGetResponse<EsolveOtpValidationRecord, EsolveAuthResult>;
|
|
@@ -3,3 +3,5 @@ export * from './esolve-auth-get-response.type';
|
|
|
3
3
|
export * from './esolve-auth-response-data.type';
|
|
4
4
|
export * from './esolve-auth-result.type';
|
|
5
5
|
export * from './esolve-login-response.type';
|
|
6
|
+
export * from './esolve-otp-action.type';
|
|
7
|
+
export * from './esolve-validate-otp-response.type';
|