@daffodil/auth 0.88.1 → 0.89.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/driver/in-memory/index.d.ts +84 -1
- package/driver/index.d.ts +135 -1
- package/driver/magento/index.d.ts +132 -1
- package/driver/testing/index.d.ts +49 -1
- package/fesm2022/daffodil-auth-driver-in-memory.mjs +19 -19
- package/fesm2022/daffodil-auth-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-auth-driver-magento.mjs +22 -22
- package/fesm2022/daffodil-auth-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-auth-driver-testing.mjs +16 -16
- package/fesm2022/daffodil-auth-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-auth-driver.mjs +3 -3
- package/fesm2022/daffodil-auth-driver.mjs.map +1 -1
- package/fesm2022/daffodil-auth-routing.mjs +20 -20
- package/fesm2022/daffodil-auth-routing.mjs.map +1 -1
- package/fesm2022/daffodil-auth-state-testing.mjs +16 -16
- package/fesm2022/daffodil-auth-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-auth-state.mjs +28 -28
- package/fesm2022/daffodil-auth-state.mjs.map +1 -1
- package/fesm2022/daffodil-auth-testing.mjs +9 -9
- package/fesm2022/daffodil-auth-testing.mjs.map +1 -1
- package/fesm2022/daffodil-auth.mjs +3 -3
- package/fesm2022/daffodil-auth.mjs.map +1 -1
- package/index.d.ts +76 -1
- package/package.json +1 -1
- package/routing/index.d.ts +104 -1
- package/state/index.d.ts +424 -1
- package/state/testing/index.d.ts +59 -1
- package/testing/index.d.ts +38 -1
- package/driver/constants/public_api.d.ts +0 -1
- package/driver/constants/unauthenticated-error-codes.d.ts +0 -10
- package/driver/errors/authentication-failed.d.ts +0 -6
- package/driver/errors/codes.enum.d.ts +0 -6
- package/driver/errors/invalid-api-response.d.ts +0 -6
- package/driver/errors/map.d.ts +0 -13
- package/driver/errors/public_api.d.ts +0 -6
- package/driver/errors/registration-failed.d.ts +0 -9
- package/driver/errors/unauthorized.d.ts +0 -6
- package/driver/in-memory/backend/auth.service.d.ts +0 -24
- package/driver/in-memory/collection-name.const.d.ts +0 -1
- package/driver/in-memory/drivers/auth/auth.service.d.ts +0 -16
- package/driver/in-memory/drivers/auth-driver.module.d.ts +0 -9
- package/driver/in-memory/drivers/login/login.service.d.ts +0 -18
- package/driver/in-memory/drivers/public_api.d.ts +0 -4
- package/driver/in-memory/drivers/register/register.service.d.ts +0 -20
- package/driver/in-memory/drivers/reset-password/service.d.ts +0 -21
- package/driver/in-memory/models/db-customer.type.d.ts +0 -8
- package/driver/in-memory/public_api.d.ts +0 -2
- package/driver/interfaces/auth-service.interface.d.ts +0 -8
- package/driver/interfaces/login-service.interface.d.ts +0 -15
- package/driver/interfaces/public_api.d.ts +0 -4
- package/driver/interfaces/register-service.interface.d.ts +0 -18
- package/driver/interfaces/reset-password-service.interface.d.ts +0 -17
- package/driver/magento/apollo-bearer-token-link-generator.d.ts +0 -16
- package/driver/magento/auth-driver.module.d.ts +0 -9
- package/driver/magento/auth.service.d.ts +0 -14
- package/driver/magento/errors/codes.d.ts +0 -5
- package/driver/magento/errors/map.d.ts +0 -2
- package/driver/magento/errors/transform.d.ts +0 -1
- package/driver/magento/login.service.d.ts +0 -18
- package/driver/magento/models/public_api.d.ts +0 -4
- package/driver/magento/models/response/auth.d.ts +0 -3
- package/driver/magento/models/response/register.type.d.ts +0 -7
- package/driver/magento/models/response/reset-password.type.d.ts +0 -3
- package/driver/magento/models/response/send-reset-email.type.d.ts +0 -3
- package/driver/magento/public_api.d.ts +0 -8
- package/driver/magento/queries/check-token.d.ts +0 -1
- package/driver/magento/queries/create-customer.d.ts +0 -1
- package/driver/magento/queries/generate-token.d.ts +0 -1
- package/driver/magento/queries/public_api.d.ts +0 -7
- package/driver/magento/queries/reset-password.d.ts +0 -1
- package/driver/magento/queries/responses/check-token-response.d.ts +0 -5
- package/driver/magento/queries/responses/generate-token-response.d.ts +0 -4
- package/driver/magento/queries/responses/public_api.d.ts +0 -3
- package/driver/magento/queries/responses/revoke-customer-token-response.d.ts +0 -5
- package/driver/magento/queries/revoke-customer-token.d.ts +0 -1
- package/driver/magento/queries/send-reset-email.d.ts +0 -1
- package/driver/magento/register.service.d.ts +0 -18
- package/driver/magento/reset-password.service.d.ts +0 -19
- package/driver/magento/transforms/auth-transformer.service.d.ts +0 -16
- package/driver/magento/validators/check-token.d.ts +0 -3
- package/driver/magento/validators/generate-token.d.ts +0 -3
- package/driver/magento/validators/public_api.d.ts +0 -5
- package/driver/magento/validators/reset-password.d.ts +0 -3
- package/driver/magento/validators/revoke-token.d.ts +0 -3
- package/driver/magento/validators/send-reset-email.d.ts +0 -3
- package/driver/public_api.d.ts +0 -4
- package/driver/services/auth-check.service.d.ts +0 -17
- package/driver/services/public_api.d.ts +0 -1
- package/driver/testing/drivers/auth/auth.service.d.ts +0 -11
- package/driver/testing/drivers/auth-driver.module.d.ts +0 -9
- package/driver/testing/drivers/login/login.service.d.ts +0 -16
- package/driver/testing/drivers/public_api.d.ts +0 -4
- package/driver/testing/drivers/register/register.service.d.ts +0 -16
- package/driver/testing/drivers/reset-password/service.d.ts +0 -17
- package/driver/testing/public_api.d.ts +0 -1
- package/errors/codes.enum.d.ts +0 -3
- package/errors/map.d.ts +0 -7
- package/errors/missing-token.d.ts +0 -10
- package/errors/public_api.d.ts +0 -3
- package/models/account-registration.d.ts +0 -15
- package/models/auth-token.d.ts +0 -3
- package/models/login-info.d.ts +0 -4
- package/models/public_api.d.ts +0 -4
- package/models/reset-password-info.type.d.ts +0 -14
- package/public_api.d.ts +0 -3
- package/routing/config/default.d.ts +0 -2
- package/routing/config/interface.d.ts +0 -29
- package/routing/config/public_api.d.ts +0 -3
- package/routing/config/token.d.ts +0 -2
- package/routing/effects/redirect.effects.d.ts +0 -18
- package/routing/guards/guest-only-guard-redirect.token.d.ts +0 -1
- package/routing/guards/guest-only.guard.d.ts +0 -20
- package/routing/guards/member-only-guard-redirect.token.d.ts +0 -1
- package/routing/guards/member-only.guard.d.ts +0 -20
- package/routing/guards/public_api.d.ts +0 -5
- package/routing/guards/reset-password.guard.d.ts +0 -13
- package/routing/helpers/public_api.d.ts +0 -1
- package/routing/helpers/redirect-unauthenticated-hook-factory.d.ts +0 -4
- package/routing/module.d.ts +0 -9
- package/routing/public_api.d.ts +0 -5
- package/routing/redirect.module.d.ts +0 -7
- package/state/actions/auth.actions.d.ts +0 -56
- package/state/actions/login.actions.d.ts +0 -64
- package/state/actions/public_api.d.ts +0 -4
- package/state/actions/register.actions.d.ts +0 -40
- package/state/actions/reset-password.actions.d.ts +0 -74
- package/state/auth-state.module.d.ts +0 -11
- package/state/config/default.d.ts +0 -2
- package/state/config/public_api.d.ts +0 -3
- package/state/config/token.d.ts +0 -2
- package/state/config/type.d.ts +0 -7
- package/state/effects/auth.effects.d.ts +0 -28
- package/state/effects/login.effects.d.ts +0 -17
- package/state/effects/register.effects.d.ts +0 -17
- package/state/effects/reset-password.effects.d.ts +0 -18
- package/state/facades/auth/facade.d.ts +0 -19
- package/state/facades/auth/facade.interface.d.ts +0 -11
- package/state/facades/auth/public_api.d.ts +0 -2
- package/state/facades/login/facade.d.ts +0 -18
- package/state/facades/login/facade.interface.d.ts +0 -7
- package/state/facades/login/public_api.d.ts +0 -2
- package/state/facades/public_api.d.ts +0 -4
- package/state/facades/register/facade.d.ts +0 -18
- package/state/facades/register/facade.interface.d.ts +0 -7
- package/state/facades/register/public_api.d.ts +0 -2
- package/state/facades/reset-password/facade.d.ts +0 -20
- package/state/facades/reset-password/facade.interface.d.ts +0 -9
- package/state/facades/reset-password/public_api.d.ts +0 -2
- package/state/injection-tokens/error-matcher.token.d.ts +0 -2
- package/state/injection-tokens/public_api.d.ts +0 -2
- package/state/injection-tokens/unauthenticated/hook.token.d.ts +0 -2
- package/state/injection-tokens/unauthenticated/hook.type.d.ts +0 -9
- package/state/injection-tokens/unauthenticated/hooks.token.d.ts +0 -2
- package/state/injection-tokens/unauthenticated/public_api.d.ts +0 -2
- package/state/public_api.d.ts +0 -7
- package/state/reducers/auth/auth-initial-state.d.ts +0 -2
- package/state/reducers/auth/auth-reducer-state.interface.d.ts +0 -4
- package/state/reducers/auth/auth.reducer.d.ts +0 -3
- package/state/reducers/auth/public_api.d.ts +0 -3
- package/state/reducers/auth-feature-state.interface.d.ts +0 -14
- package/state/reducers/auth-reducers.d.ts +0 -3
- package/state/reducers/auth-store-feature-key.d.ts +0 -1
- package/state/reducers/login/login-initial-state.d.ts +0 -2
- package/state/reducers/login/login-reducer-state.interface.d.ts +0 -2
- package/state/reducers/login/login.reducer.d.ts +0 -4
- package/state/reducers/login/public_api.d.ts +0 -3
- package/state/reducers/public_api.d.ts +0 -8
- package/state/reducers/register/public_api.d.ts +0 -3
- package/state/reducers/register/register-initial-state.d.ts +0 -2
- package/state/reducers/register/register-reducer-state.interface.d.ts +0 -2
- package/state/reducers/register/register.reducer.d.ts +0 -4
- package/state/reducers/reset-password/initial-state.d.ts +0 -2
- package/state/reducers/reset-password/public_api.d.ts +0 -3
- package/state/reducers/reset-password/reducer.d.ts +0 -4
- package/state/reducers/reset-password/state.interface.d.ts +0 -5
- package/state/reducers/token/extra.token.d.ts +0 -3
- package/state/reducers/token/public_api.d.ts +0 -1
- package/state/reducers/token/reducers.token.d.ts +0 -3
- package/state/selectors/auth/auth.selector.d.ts +0 -8
- package/state/selectors/auth-all.selector.d.ts +0 -10
- package/state/selectors/auth-feature.selector.d.ts +0 -6
- package/state/selectors/login/login.selector.d.ts +0 -7
- package/state/selectors/public_api.d.ts +0 -5
- package/state/selectors/register/register.selector.d.ts +0 -7
- package/state/selectors/reset-password/selector.d.ts +0 -9
- package/state/testing/auth-testing.module.d.ts +0 -6
- package/state/testing/mock-auth-facade.d.ts +0 -16
- package/state/testing/mock-login-facade.d.ts +0 -15
- package/state/testing/mock-register-facade.d.ts +0 -15
- package/state/testing/mock-reset-password-facade.d.ts +0 -16
- package/state/testing/public_api.d.ts +0 -5
- package/storage/auth-storage.service.d.ts +0 -12
- package/testing/factories/account-registration.factory.d.ts +0 -15
- package/testing/factories/auth-token.factory.d.ts +0 -11
- package/testing/factories/public_api.d.ts +0 -3
- package/testing/factories/reset-password-info.factory.d.ts +0 -13
- package/testing/public_api.d.ts +0 -1
package/driver/errors/map.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DaffAuthenticationFailedError } from './authentication-failed';
|
|
2
|
-
import { DaffAuthInvalidAPIResponseError } from './invalid-api-response';
|
|
3
|
-
import { DaffRegistrationFailedError } from './registration-failed';
|
|
4
|
-
import { DaffUnauthorizedError } from './unauthorized';
|
|
5
|
-
/**
|
|
6
|
-
* A mapping from error codes to error class constructors.
|
|
7
|
-
*/
|
|
8
|
-
export declare const DaffAuthDriverErrorMap: {
|
|
9
|
-
DAFF_AUTH_AUTHENTICATION_FAILED: typeof DaffAuthenticationFailedError;
|
|
10
|
-
DAFF_AUTH_INVALID_API_RESPONSE: typeof DaffAuthInvalidAPIResponseError;
|
|
11
|
-
DAFF_AUTH_REGISTRATION_FAILED: typeof DaffRegistrationFailedError;
|
|
12
|
-
DAFF_AUTH_UNAUTHORIZED: typeof DaffUnauthorizedError;
|
|
13
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { DaffUnauthorizedError } from './unauthorized';
|
|
2
|
-
export { DaffAuthenticationFailedError } from './authentication-failed';
|
|
3
|
-
export { DaffRegistrationFailedError } from './registration-failed';
|
|
4
|
-
export { DaffAuthInvalidAPIResponseError } from './invalid-api-response';
|
|
5
|
-
export { DaffAuthDriverErrorCodes } from './codes.enum';
|
|
6
|
-
export { DaffAuthDriverErrorMap } from './map';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* An error thrown when registration failed.
|
|
4
|
-
*/
|
|
5
|
-
export declare class DaffRegistrationFailedError extends DaffInheritableError implements DaffError {
|
|
6
|
-
message: string;
|
|
7
|
-
readonly code: string;
|
|
8
|
-
constructor(message: string);
|
|
9
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { InMemoryDbService } from 'angular-in-memory-web-api';
|
|
2
|
-
import { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';
|
|
3
|
-
import { DaffInMemoryDbCustomer } from '../models/db-customer.type';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* @inheritdoc DaffInMemorySingleRouteableBackend
|
|
7
|
-
*/
|
|
8
|
-
export declare class DaffInMemoryBackendAuthService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {
|
|
9
|
-
readonly collectionName = "auth";
|
|
10
|
-
customers: Record<DaffInMemoryDbCustomer['email'], DaffInMemoryDbCustomer>;
|
|
11
|
-
private generateToken;
|
|
12
|
-
createDb(): {
|
|
13
|
-
auth: Record<string, DaffInMemoryDbCustomer>;
|
|
14
|
-
};
|
|
15
|
-
post(reqInfo: any): any;
|
|
16
|
-
private login;
|
|
17
|
-
private register;
|
|
18
|
-
private logout;
|
|
19
|
-
private check;
|
|
20
|
-
private resetPassword;
|
|
21
|
-
private sendResetEmail;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendAuthService, never>;
|
|
23
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryBackendAuthService>;
|
|
24
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DAFF_AUTH_IN_MEMORY_COLLECTION_NAME = "auth";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { InMemoryBackendConfig } from 'angular-in-memory-web-api';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { DaffAuthServiceInterface } from '@daffodil/auth/driver';
|
|
5
|
-
import { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* @inheritdoc DaffAuthServiceInterface
|
|
9
|
-
*/
|
|
10
|
-
export declare class DaffInMemoryAuthService extends DaffInMemoryDriverBase implements DaffAuthServiceInterface {
|
|
11
|
-
private http;
|
|
12
|
-
constructor(http: HttpClient, config: InMemoryBackendConfig);
|
|
13
|
-
check(): Observable<void>;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryAuthService, never>;
|
|
15
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryAuthService>;
|
|
16
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/common";
|
|
4
|
-
export declare class DaffAuthInMemoryDriverModule {
|
|
5
|
-
static forRoot(): ModuleWithProviders<DaffAuthInMemoryDriverModule>;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthInMemoryDriverModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffAuthInMemoryDriverModule, never, [typeof i1.CommonModule], never>;
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffAuthInMemoryDriverModule>;
|
|
9
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { InMemoryBackendConfig } from 'angular-in-memory-web-api';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { DaffLoginInfo, DaffAuthToken } from '@daffodil/auth';
|
|
5
|
-
import { DaffLoginServiceInterface } from '@daffodil/auth/driver';
|
|
6
|
-
import { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* @inheritdoc
|
|
10
|
-
*/
|
|
11
|
-
export declare class DaffInMemoryLoginService extends DaffInMemoryDriverBase implements DaffLoginServiceInterface {
|
|
12
|
-
private http;
|
|
13
|
-
constructor(http: HttpClient, config: InMemoryBackendConfig);
|
|
14
|
-
login(request: DaffLoginInfo): Observable<DaffAuthToken>;
|
|
15
|
-
logout(): Observable<void>;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryLoginService, never>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryLoginService>;
|
|
18
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { DaffAuthInMemoryDriverModule } from './auth-driver.module';
|
|
2
|
-
export { DaffInMemoryAuthService } from './auth/auth.service';
|
|
3
|
-
export { DaffInMemoryLoginService } from './login/login.service';
|
|
4
|
-
export { DaffInMemoryRegisterService } from './register/register.service';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { InMemoryBackendConfig } from 'angular-in-memory-web-api';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { DaffAccountRegistration } from '@daffodil/auth';
|
|
5
|
-
import { DaffRegisterServiceInterface } from '@daffodil/auth/driver';
|
|
6
|
-
import { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';
|
|
7
|
-
import { DaffInMemoryLoginService } from '../login/login.service';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
/**
|
|
10
|
-
* @inheritdoc
|
|
11
|
-
*/
|
|
12
|
-
export declare class DaffInMemoryRegisterService extends DaffInMemoryDriverBase implements DaffRegisterServiceInterface {
|
|
13
|
-
private http;
|
|
14
|
-
private loginService;
|
|
15
|
-
constructor(http: HttpClient, loginService: DaffInMemoryLoginService, config: InMemoryBackendConfig);
|
|
16
|
-
register(registration: DaffAccountRegistration): Observable<string>;
|
|
17
|
-
registerOnly(registration: DaffAccountRegistration): Observable<void>;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryRegisterService, never>;
|
|
19
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryRegisterService>;
|
|
20
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { InMemoryBackendConfig } from 'angular-in-memory-web-api';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { DaffAuthResetPasswordInfo } from '@daffodil/auth';
|
|
5
|
-
import { DaffResetPasswordServiceInterface } from '@daffodil/auth/driver';
|
|
6
|
-
import { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';
|
|
7
|
-
import { DaffInMemoryLoginService } from '../login/login.service';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
/**
|
|
10
|
-
* @inheritdoc
|
|
11
|
-
*/
|
|
12
|
-
export declare class DaffInMemoryResetPasswordService extends DaffInMemoryDriverBase implements DaffResetPasswordServiceInterface {
|
|
13
|
-
private http;
|
|
14
|
-
private loginService;
|
|
15
|
-
constructor(http: HttpClient, loginService: DaffInMemoryLoginService, config: InMemoryBackendConfig);
|
|
16
|
-
resetPassword(info: DaffAuthResetPasswordInfo): Observable<string>;
|
|
17
|
-
resetPasswordOnly(info: DaffAuthResetPasswordInfo): Observable<void>;
|
|
18
|
-
sendResetEmail(email: string): Observable<void>;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryResetPasswordService, never>;
|
|
20
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryResetPasswordService>;
|
|
21
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
export interface DaffAuthServiceInterface {
|
|
3
|
-
/**
|
|
4
|
-
* Checks the validity of an auth token.
|
|
5
|
-
*/
|
|
6
|
-
check(): Observable<void>;
|
|
7
|
-
}
|
|
8
|
-
export declare const DaffAuthDriver: import("@angular/core").InjectionToken<DaffAuthServiceInterface>, provideDaffAuthDriver: <R extends DaffAuthServiceInterface = DaffAuthServiceInterface>(klass: import("@angular/core").Type<R>) => import("@angular/core").ExistingProvider;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DaffLoginInfo, DaffAuthToken } from '@daffodil/auth';
|
|
3
|
-
export interface DaffLoginServiceInterface<TRequest extends DaffLoginInfo = DaffLoginInfo, TResponse extends DaffAuthToken = DaffAuthToken> {
|
|
4
|
-
/**
|
|
5
|
-
* Logs the user in.
|
|
6
|
-
*
|
|
7
|
-
* @returns An access token.
|
|
8
|
-
*/
|
|
9
|
-
login(loginInfo: TRequest): Observable<TResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* Logs the user out by revoking their access token.
|
|
12
|
-
*/
|
|
13
|
-
logout(): Observable<void>;
|
|
14
|
-
}
|
|
15
|
-
export declare const DaffLoginDriver: import("@angular/core").InjectionToken<DaffLoginServiceInterface<DaffLoginInfo, DaffAuthToken>>, provideDaffLoginDriver: <R extends DaffLoginServiceInterface<DaffLoginInfo, DaffAuthToken> = DaffLoginServiceInterface<DaffLoginInfo, DaffAuthToken>>(klass: import("@angular/core").Type<R>) => import("@angular/core").ExistingProvider;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DaffAccountRegistration } from '@daffodil/auth';
|
|
3
|
-
export interface DaffRegisterServiceInterface<TRequest extends DaffAccountRegistration = DaffAccountRegistration> {
|
|
4
|
-
/**
|
|
5
|
-
* Registers an account for the specified customer and logs the customer in.
|
|
6
|
-
*
|
|
7
|
-
* @param registration The account registration info.
|
|
8
|
-
* @return The authentication token.
|
|
9
|
-
*/
|
|
10
|
-
register(registration: TRequest): Observable<string>;
|
|
11
|
-
/**
|
|
12
|
-
* Registers an account for the specified customer but does not log the customer in.
|
|
13
|
-
*
|
|
14
|
-
* @param registration The account registration info.
|
|
15
|
-
*/
|
|
16
|
-
registerOnly(registration: TRequest): Observable<void>;
|
|
17
|
-
}
|
|
18
|
-
export declare const DaffRegisterDriver: import("@angular/core").InjectionToken<DaffRegisterServiceInterface<DaffAccountRegistration>>, provideDaffRegisterDriver: <R extends DaffRegisterServiceInterface<DaffAccountRegistration> = DaffRegisterServiceInterface<DaffAccountRegistration>>(klass: import("@angular/core").Type<R>) => import("@angular/core").ExistingProvider;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DaffAuthResetPasswordInfo } from '@daffodil/auth';
|
|
3
|
-
export interface DaffResetPasswordServiceInterface<T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo> {
|
|
4
|
-
/**
|
|
5
|
-
* Resets password for the specified customer and logs in.
|
|
6
|
-
*/
|
|
7
|
-
resetPassword(info: T): Observable<string>;
|
|
8
|
-
/**
|
|
9
|
-
* Resets password for the specified customer.
|
|
10
|
-
*/
|
|
11
|
-
resetPasswordOnly(info: T): Observable<void>;
|
|
12
|
-
/**
|
|
13
|
-
* Send a password reset email to the specified email address.
|
|
14
|
-
*/
|
|
15
|
-
sendResetEmail(email: string): Observable<void>;
|
|
16
|
-
}
|
|
17
|
-
export declare const DaffResetPasswordDriver: import("@angular/core").InjectionToken<DaffResetPasswordServiceInterface<DaffAuthResetPasswordInfo>>, provideDaffResetPasswordDriver: <R extends DaffResetPasswordServiceInterface<DaffAuthResetPasswordInfo> = DaffResetPasswordServiceInterface<DaffAuthResetPasswordInfo>>(klass: import("@angular/core").Type<R>) => import("@angular/core").ExistingProvider;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ApolloLink } from '@apollo/client/core';
|
|
2
|
-
import { DaffAuthStorageService } from '@daffodil/auth';
|
|
3
|
-
import { DaffApolloLinkGenerator } from '@daffodil/core/graphql';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.
|
|
7
|
-
*
|
|
8
|
-
* @inheritdoc
|
|
9
|
-
*/
|
|
10
|
-
export declare class MagentoAuthApolloBearerTokenLinkGenerator implements DaffApolloLinkGenerator {
|
|
11
|
-
private storage;
|
|
12
|
-
constructor(storage: DaffAuthStorageService);
|
|
13
|
-
getLink(): ApolloLink;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoAuthApolloBearerTokenLinkGenerator, never>;
|
|
15
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<MagentoAuthApolloBearerTokenLinkGenerator>;
|
|
16
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/common";
|
|
4
|
-
export declare class DaffAuthMagentoDriverModule {
|
|
5
|
-
static forRoot(): ModuleWithProviders<DaffAuthMagentoDriverModule>;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthMagentoDriverModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffAuthMagentoDriverModule, never, [typeof i1.CommonModule], never>;
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffAuthMagentoDriverModule>;
|
|
9
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Apollo } from 'apollo-angular';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffAuthServiceInterface } from '@daffodil/auth/driver';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* @inheritdoc
|
|
7
|
-
*/
|
|
8
|
-
export declare class DaffMagentoAuthService implements DaffAuthServiceInterface {
|
|
9
|
-
private apollo;
|
|
10
|
-
constructor(apollo: Apollo);
|
|
11
|
-
check(): Observable<void>;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoAuthService, never>;
|
|
13
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoAuthService>;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const transformMagentoAuthError: (error: any) => Error;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DaffLoginInfo, DaffAuthToken } from '@daffodil/auth';
|
|
3
|
-
import { DaffLoginServiceInterface } from '@daffodil/auth/driver';
|
|
4
|
-
import { DaffQueuedApollo } from '@daffodil/core/graphql';
|
|
5
|
-
import { DaffMagentoAuthTransformerService } from './transforms/auth-transformer.service';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* @inheritdoc
|
|
9
|
-
*/
|
|
10
|
-
export declare class DaffMagentoLoginService implements DaffLoginServiceInterface {
|
|
11
|
-
private apollo;
|
|
12
|
-
authTransformer: DaffMagentoAuthTransformerService;
|
|
13
|
-
constructor(apollo: DaffQueuedApollo, authTransformer: DaffMagentoAuthTransformerService);
|
|
14
|
-
login({ email, password }: DaffLoginInfo): Observable<DaffAuthToken>;
|
|
15
|
-
logout(): Observable<any>;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoLoginService, never>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoLoginService>;
|
|
18
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { MagentoAuth } from './response/auth';
|
|
2
|
-
export { MagentoRegisterResponse } from './response/register.type';
|
|
3
|
-
export { MagentoSendResetEmailResponse } from './response/send-reset-email.type';
|
|
4
|
-
export { MagentoResetPasswordResponse } from './response/reset-password.type';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { DaffAuthMagentoDriverModule } from './auth-driver.module';
|
|
2
|
-
export { DaffMagentoAuthService } from './auth.service';
|
|
3
|
-
export { DaffMagentoLoginService } from './login.service';
|
|
4
|
-
export { DaffMagentoRegisterService } from './register.service';
|
|
5
|
-
export { DaffMagentoAuthTransformerService } from './transforms/auth-transformer.service';
|
|
6
|
-
export { MagentoAuthApolloBearerTokenLinkGenerator } from './apollo-bearer-token-link-generator';
|
|
7
|
-
export * from './queries/public_api';
|
|
8
|
-
export * from './models/public_api';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const checkTokenQuery: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const createCustomerMutation: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const generateTokenMutation: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { checkTokenQuery } from './check-token';
|
|
2
|
-
export { createCustomerMutation } from './create-customer';
|
|
3
|
-
export { generateTokenMutation } from './generate-token';
|
|
4
|
-
export { revokeCustomerTokenMutation } from './revoke-customer-token';
|
|
5
|
-
export { sendPasswordResetEmailMutation } from './send-reset-email';
|
|
6
|
-
export { resetPasswordMutation } from './reset-password';
|
|
7
|
-
export * from './responses/public_api';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const resetPasswordMutation: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const revokeCustomerTokenMutation: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const sendPasswordResetEmailMutation: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DaffAccountRegistration } from '@daffodil/auth';
|
|
3
|
-
import { DaffRegisterServiceInterface } from '@daffodil/auth/driver';
|
|
4
|
-
import { DaffQueuedApollo } from '@daffodil/core/graphql';
|
|
5
|
-
import { DaffMagentoLoginService } from './login.service';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* @inheritdoc
|
|
9
|
-
*/
|
|
10
|
-
export declare class DaffMagentoRegisterService implements DaffRegisterServiceInterface {
|
|
11
|
-
private apollo;
|
|
12
|
-
private loginService;
|
|
13
|
-
constructor(apollo: DaffQueuedApollo, loginService: DaffMagentoLoginService);
|
|
14
|
-
register(registration: DaffAccountRegistration): Observable<string>;
|
|
15
|
-
registerOnly({ email, password, subscribe, firstName, lastName }: DaffAccountRegistration): Observable<void>;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoRegisterService, never>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoRegisterService>;
|
|
18
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DaffAuthResetPasswordInfo } from '@daffodil/auth';
|
|
3
|
-
import { DaffResetPasswordServiceInterface } from '@daffodil/auth/driver';
|
|
4
|
-
import { DaffQueuedApollo } from '@daffodil/core/graphql';
|
|
5
|
-
import { DaffMagentoLoginService } from './login.service';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* @inheritdoc
|
|
9
|
-
*/
|
|
10
|
-
export declare class DaffMagentoResetPasswordService implements DaffResetPasswordServiceInterface {
|
|
11
|
-
private apollo;
|
|
12
|
-
private loginService;
|
|
13
|
-
constructor(apollo: DaffQueuedApollo, loginService: DaffMagentoLoginService);
|
|
14
|
-
resetPassword(info: DaffAuthResetPasswordInfo): Observable<string>;
|
|
15
|
-
resetPasswordOnly({ email, password, token }: DaffAuthResetPasswordInfo): Observable<void>;
|
|
16
|
-
sendResetEmail(email: string): Observable<void>;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoResetPasswordService, never>;
|
|
18
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoResetPasswordService>;
|
|
19
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { DaffAuthToken } from '@daffodil/auth';
|
|
2
|
-
import { MagentoAuth } from '../models/response/auth';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* Transforms magento auths into an object usable by daffodil.
|
|
6
|
-
*/
|
|
7
|
-
export declare class DaffMagentoAuthTransformerService {
|
|
8
|
-
/**
|
|
9
|
-
* Transforms the magento AuthNode from the magento auth query into a DaffAuthToken.
|
|
10
|
-
*
|
|
11
|
-
* @param auth the auth from a magento auth query.
|
|
12
|
-
*/
|
|
13
|
-
transform(auth: MagentoAuth): DaffAuthToken;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoAuthTransformerService, never>;
|
|
15
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoAuthTransformerService>;
|
|
16
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ApolloQueryResult } from '@apollo/client/core';
|
|
2
|
-
import { MagentoCheckTokenResponse } from '../queries/public_api';
|
|
3
|
-
export declare const validateCheckTokenResponse: (response: ApolloQueryResult<MagentoCheckTokenResponse>) => ApolloQueryResult<MagentoCheckTokenResponse>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ApolloQueryResult } from '@apollo/client/core';
|
|
2
|
-
import { MagentoGenerateTokenResponse } from '../queries/public_api';
|
|
3
|
-
export declare const validateGenerateTokenResponse: (response: ApolloQueryResult<MagentoGenerateTokenResponse>) => ApolloQueryResult<MagentoGenerateTokenResponse>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { validateCheckTokenResponse } from './check-token';
|
|
2
|
-
export { validateGenerateTokenResponse } from './generate-token';
|
|
3
|
-
export { validateRevokeTokenResponse } from './revoke-token';
|
|
4
|
-
export { validateSendResetEmailResponse } from './send-reset-email';
|
|
5
|
-
export { validateResetPasswordResponse } from './reset-password';
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ApolloQueryResult } from '@apollo/client/core';
|
|
2
|
-
import { MagentoResetPasswordResponse } from '../models/public_api';
|
|
3
|
-
export declare const validateResetPasswordResponse: (response: ApolloQueryResult<MagentoResetPasswordResponse>) => ApolloQueryResult<MagentoResetPasswordResponse>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ApolloQueryResult } from '@apollo/client/core';
|
|
2
|
-
import { MagentoRevokeCustomerTokenResponse } from '../queries/public_api';
|
|
3
|
-
export declare const validateRevokeTokenResponse: (response: ApolloQueryResult<MagentoRevokeCustomerTokenResponse>) => ApolloQueryResult<MagentoRevokeCustomerTokenResponse>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ApolloQueryResult } from '@apollo/client/core';
|
|
2
|
-
import { MagentoSendResetEmailResponse } from '../models/public_api';
|
|
3
|
-
export declare const validateSendResetEmailResponse: (response: ApolloQueryResult<MagentoSendResetEmailResponse>) => ApolloQueryResult<MagentoSendResetEmailResponse>;
|
package/driver/public_api.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DaffAuthStorageService } from '@daffodil/auth';
|
|
3
|
-
import { DaffAuthServiceInterface } from '../interfaces/public_api';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class DaffAuthDriverTokenCheck {
|
|
6
|
-
private storage;
|
|
7
|
-
private driver;
|
|
8
|
-
constructor(storage: DaffAuthStorageService, driver: DaffAuthServiceInterface);
|
|
9
|
-
/**
|
|
10
|
-
* Checks if the auth token in storage is valid.
|
|
11
|
-
* If there is not an auth token in storage, the driver is not called
|
|
12
|
-
* and an error is immediately thrown.
|
|
13
|
-
*/
|
|
14
|
-
check(): Observable<void>;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthDriverTokenCheck, never>;
|
|
16
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffAuthDriverTokenCheck>;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './auth-check.service';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DaffAuthServiceInterface } from '@daffodil/auth/driver';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* @inheritdoc
|
|
6
|
-
*/
|
|
7
|
-
export declare class DaffTestingAuthService implements DaffAuthServiceInterface {
|
|
8
|
-
check(): Observable<void>;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTestingAuthService, never>;
|
|
10
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffTestingAuthService>;
|
|
11
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/common";
|
|
4
|
-
export declare class DaffAuthTestingDriverModule {
|
|
5
|
-
static forRoot(): ModuleWithProviders<DaffAuthTestingDriverModule>;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthTestingDriverModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffAuthTestingDriverModule, never, [typeof i1.CommonModule], never>;
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffAuthTestingDriverModule>;
|
|
9
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DaffLoginInfo, DaffAuthToken } from '@daffodil/auth';
|
|
3
|
-
import { DaffLoginServiceInterface } from '@daffodil/auth/driver';
|
|
4
|
-
import { DaffAuthTokenFactory } from '@daffodil/auth/testing';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* @inheritdoc
|
|
8
|
-
*/
|
|
9
|
-
export declare class DaffTestingLoginService implements DaffLoginServiceInterface<DaffLoginInfo, DaffAuthToken> {
|
|
10
|
-
private factory;
|
|
11
|
-
constructor(factory: DaffAuthTokenFactory);
|
|
12
|
-
login(loginInfo: DaffLoginInfo): Observable<DaffAuthToken>;
|
|
13
|
-
logout(): Observable<void>;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTestingLoginService, never>;
|
|
15
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffTestingLoginService>;
|
|
16
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { DaffAuthTestingDriverModule } from './auth-driver.module';
|
|
2
|
-
export { DaffTestingAuthService } from './auth/auth.service';
|
|
3
|
-
export { DaffTestingLoginService } from './login/login.service';
|
|
4
|
-
export { DaffTestingRegisterService } from './register/register.service';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DaffAccountRegistration, DaffLoginInfo } from '@daffodil/auth';
|
|
3
|
-
import { DaffRegisterServiceInterface } from '@daffodil/auth/driver';
|
|
4
|
-
import { DaffAuthTokenFactory } from '@daffodil/auth/testing';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* @inheritdoc
|
|
8
|
-
*/
|
|
9
|
-
export declare class DaffTestingRegisterService implements DaffRegisterServiceInterface {
|
|
10
|
-
private authTokenFactory;
|
|
11
|
-
constructor(authTokenFactory: DaffAuthTokenFactory);
|
|
12
|
-
register(registration: DaffAccountRegistration): Observable<string>;
|
|
13
|
-
registerOnly(registration: DaffLoginInfo): Observable<void>;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTestingRegisterService, never>;
|
|
15
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffTestingRegisterService>;
|
|
16
|
-
}
|