@daffodil/auth 0.48.2 → 0.50.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.
Files changed (39) hide show
  1. package/esm2020/driver/magento/apollo-bearer-token-link-generator.mjs +6 -2
  2. package/esm2020/state/actions/auth.actions.mjs +11 -1
  3. package/esm2020/state/auth-state.module.mjs +10 -4
  4. package/esm2020/state/config/default.mjs +3 -1
  5. package/esm2020/state/config/type.mjs +1 -1
  6. package/esm2020/state/effects/auth.effects.mjs +3 -3
  7. package/esm2020/state/effects/login.effects.mjs +4 -4
  8. package/esm2020/state/effects/redirect.effects.mjs +35 -0
  9. package/esm2020/state/facades/auth/facade.interface.mjs +1 -1
  10. package/esm2020/state/facades/auth/facade.mjs +3 -2
  11. package/esm2020/state/reducers/auth/auth-initial-state.mjs +2 -1
  12. package/esm2020/state/reducers/auth/auth-reducer-state.interface.mjs +1 -1
  13. package/esm2020/state/reducers/auth/auth.reducer.mjs +18 -1
  14. package/esm2020/state/selectors/auth/auth.selector.mjs +3 -1
  15. package/esm2020/state/testing/mock-auth-facade.mjs +2 -1
  16. package/fesm2015/daffodil-auth-driver-magento.mjs +5 -1
  17. package/fesm2015/daffodil-auth-driver-magento.mjs.map +1 -1
  18. package/fesm2015/daffodil-auth-state-testing.mjs +1 -0
  19. package/fesm2015/daffodil-auth-state-testing.mjs.map +1 -1
  20. package/fesm2015/daffodil-auth-state.mjs +58 -7
  21. package/fesm2015/daffodil-auth-state.mjs.map +1 -1
  22. package/fesm2020/daffodil-auth-driver-magento.mjs +5 -1
  23. package/fesm2020/daffodil-auth-driver-magento.mjs.map +1 -1
  24. package/fesm2020/daffodil-auth-state-testing.mjs +1 -0
  25. package/fesm2020/daffodil-auth-state-testing.mjs.map +1 -1
  26. package/fesm2020/daffodil-auth-state.mjs +70 -6
  27. package/fesm2020/daffodil-auth-state.mjs.map +1 -1
  28. package/package.json +3 -3
  29. package/state/actions/auth.actions.d.ts +10 -2
  30. package/state/auth-state.module.d.ts +1 -1
  31. package/state/config/type.d.ts +10 -0
  32. package/state/effects/auth.effects.d.ts +2 -2
  33. package/state/effects/login.effects.d.ts +2 -2
  34. package/state/effects/redirect.effects.d.ts +17 -0
  35. package/state/facades/auth/facade.d.ts +4 -4
  36. package/state/facades/auth/facade.interface.d.ts +4 -0
  37. package/state/reducers/auth/auth-reducer-state.interface.d.ts +1 -0
  38. package/state/selectors/auth/auth.selector.d.ts +2 -2
  39. package/state/testing/mock-auth-facade.d.ts +1 -0
@@ -10,6 +10,7 @@ import * as i2 from '@daffodil/auth';
10
10
  import { DAFF_AUTH_ERROR_MATCHER } from '@daffodil/auth';
11
11
  import { DaffAuthDriver, DaffLoginDriver, DaffRegisterDriver, DaffResetPasswordDriver } from '@daffodil/auth/driver';
12
12
  import { DaffStorageServiceError, DaffServerSideStorageError } from '@daffodil/core';
13
+ import * as i2$1 from '@angular/router';
13
14
 
14
15
  var DaffAuthActionTypes;
15
16
  (function (DaffAuthActionTypes) {
@@ -21,6 +22,7 @@ var DaffAuthActionTypes;
21
22
  DaffAuthActionTypes["AuthCheckSuccessAction"] = "[@daffodil/auth] Auth Check Success Action";
22
23
  DaffAuthActionTypes["AuthCheckFailureAction"] = "[@daffodil/auth] Auth Check Failure Action";
23
24
  DaffAuthActionTypes["AuthCompleteAction"] = "[@daffodil/auth] Auth Complete Action";
25
+ DaffAuthActionTypes["AuthRevokeAction"] = "[@daffodil/auth] Auth Revoke Action";
24
26
  })(DaffAuthActionTypes || (DaffAuthActionTypes = {}));
25
27
  /**
26
28
  * An action triggered by guards to initialize an auth check request.
@@ -96,6 +98,15 @@ class DaffAuthComplete {
96
98
  this.type = DaffAuthActionTypes.AuthCompleteAction;
97
99
  }
98
100
  }
101
+ /**
102
+ * An action triggered when the user auth token is revoked.
103
+ * The auth token has been removed from storage at this point.
104
+ */
105
+ class DaffAuthRevoke {
106
+ constructor() {
107
+ this.type = DaffAuthActionTypes.AuthRevokeAction;
108
+ }
109
+ }
99
110
 
100
111
  var DaffAuthLoginActionTypes;
101
112
  (function (DaffAuthLoginActionTypes) {
@@ -290,6 +301,7 @@ class DaffResetPasswordLanding {
290
301
  const daffAuthInitialState = {
291
302
  loading: false,
292
303
  errors: [],
304
+ loggedIn: false,
293
305
  };
294
306
 
295
307
  function daffAuthReducer(state = daffAuthInitialState, action) {
@@ -302,10 +314,17 @@ function daffAuthReducer(state = daffAuthInitialState, action) {
302
314
  case DaffAuthActionTypes.AuthCheckSuccessAction:
303
315
  return {
304
316
  ...state,
317
+ loggedIn: true,
305
318
  loading: false,
306
319
  errors: [],
307
320
  };
308
321
  case DaffAuthActionTypes.AuthCheckFailureAction:
322
+ return {
323
+ ...state,
324
+ loggedIn: false,
325
+ loading: false,
326
+ errors: [action.errorMessage],
327
+ };
309
328
  case DaffAuthActionTypes.AuthServerSideAction:
310
329
  case DaffAuthActionTypes.AuthStorageFailureAction:
311
330
  return {
@@ -313,6 +332,16 @@ function daffAuthReducer(state = daffAuthInitialState, action) {
313
332
  loading: false,
314
333
  errors: [action.errorMessage],
315
334
  };
335
+ case DaffAuthActionTypes.AuthCompleteAction:
336
+ return {
337
+ ...state,
338
+ loggedIn: true,
339
+ };
340
+ case DaffAuthActionTypes.AuthRevokeAction:
341
+ return {
342
+ ...state,
343
+ loggedIn: false,
344
+ };
316
345
  default:
317
346
  return state;
318
347
  }
@@ -438,10 +467,12 @@ const createAuthSelectors = () => {
438
467
  const selectAuthState = createSelector(getDaffAuthFeatureStateSelector(), state => state.auth);
439
468
  const selectAuthLoading = createSelector(selectAuthState, state => state.loading);
440
469
  const selectAuthErrors = createSelector(selectAuthState, state => state.errors);
470
+ const selectAuthLoggedIn = createSelector(selectAuthState, state => state.loggedIn);
441
471
  return {
442
472
  selectAuthState,
443
473
  selectAuthLoading,
444
474
  selectAuthErrors,
475
+ selectAuthLoggedIn,
445
476
  };
446
477
  };
447
478
  const getAuthSelectors = (() => {
@@ -513,9 +544,10 @@ const getDaffAuthSelectors = (() => {
513
544
  class DaffAuthFacade {
514
545
  constructor(store) {
515
546
  this.store = store;
516
- const { selectAuthLoading, selectAuthErrors, } = getDaffAuthSelectors();
547
+ const { selectAuthLoading, selectAuthErrors, selectAuthLoggedIn, } = getDaffAuthSelectors();
517
548
  this.loading$ = this.store.pipe(select(selectAuthLoading));
518
549
  this.errors$ = this.store.pipe(select(selectAuthErrors));
550
+ this.loggedIn$ = this.store.pipe(select(selectAuthLoggedIn));
519
551
  }
520
552
  dispatch(action) {
521
553
  this.store.dispatch(action);
@@ -603,6 +635,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
603
635
  const TWENTY_MINUTES = 1.2e6;
604
636
  const daffAuthStateDefaultConfig = {
605
637
  checkInterval: TWENTY_MINUTES,
638
+ authCompleteRedirectPath: '/',
639
+ logoutRedirectPath: '/',
606
640
  };
607
641
 
608
642
  const DAFF_AUTH_STATE_CONFIG = new InjectionToken('DAFF_AUTH_STATE_CONFIG', { factory: () => daffAuthStateDefaultConfig });
@@ -628,7 +662,7 @@ class DaffAuthEffects {
628
662
  return true;
629
663
  }), tap(() => {
630
664
  this.storage.removeAuthToken();
631
- }), switchMap(() => EMPTY), catchError((error) => {
665
+ }), map(() => new DaffAuthRevoke()), catchError((error) => {
632
666
  switch (true) {
633
667
  case error instanceof DaffServerSideStorageError:
634
668
  return of(new DaffAuthServerSide(this.errorMatcher(error)));
@@ -675,7 +709,7 @@ class DaffAuthLoginEffects {
675
709
  this.logout$ = createEffect(() => this.actions$.pipe(ofType(DaffAuthLoginActionTypes.LogoutAction), switchMap((action) => this.loginDriver.logout().pipe(map(() => new DaffAuthLogoutSuccess()), catchError((error) => of(new DaffAuthLogoutFailure(this.errorMatcher(error))))))));
676
710
  this.removeAuthToken$ = createEffect(() => this.actions$.pipe(ofType(DaffAuthLoginActionTypes.LogoutSuccessAction), tap(() => {
677
711
  this.storage.removeAuthToken();
678
- }), switchMap(() => EMPTY), catchError((error) => {
712
+ }), map(() => new DaffAuthRevoke()), catchError((error) => {
679
713
  switch (true) {
680
714
  case error instanceof DaffServerSideStorageError:
681
715
  return of(new DaffAuthServerSide(this.errorMatcher(error)));
@@ -709,6 +743,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
709
743
  args: [DAFF_AUTH_ERROR_MATCHER]
710
744
  }] }, { type: i2.DaffAuthStorageService }]; } });
711
745
 
746
+ /**
747
+ * Redirects the user to certain pages based on certain auth actions.
748
+ */
749
+ class DaffAuthRedirectEffects {
750
+ constructor(actions$, router, config) {
751
+ this.actions$ = actions$;
752
+ this.router = router;
753
+ this.config = config;
754
+ this.redirectAfterLoginOrRegister$ = createEffect(() => this.actions$.pipe(ofType(DaffAuthActionTypes.AuthCompleteAction), tap(() => {
755
+ this.router.navigateByUrl(this.config.authCompleteRedirectPath);
756
+ }), switchMap(() => EMPTY)), { dispatch: false });
757
+ this.redirectAfterLogout$ = createEffect(() => this.actions$.pipe(ofType(DaffAuthLoginActionTypes.LogoutSuccessAction), tap(() => {
758
+ this.router.navigateByUrl(this.config.logoutRedirectPath);
759
+ }), switchMap(() => EMPTY)), { dispatch: false });
760
+ }
761
+ }
762
+ /** @nocollapse */ DaffAuthRedirectEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAuthRedirectEffects, deps: [{ token: i1$1.Actions }, { token: i2$1.Router }, { token: DAFF_AUTH_STATE_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
763
+ /** @nocollapse */ DaffAuthRedirectEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAuthRedirectEffects });
764
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAuthRedirectEffects, decorators: [{
765
+ type: Injectable
766
+ }], ctorParameters: function () { return [{ type: i1$1.Actions }, { type: i2$1.Router }, { type: undefined, decorators: [{
767
+ type: Inject,
768
+ args: [DAFF_AUTH_STATE_CONFIG]
769
+ }] }]; } });
770
+
712
771
  class DaffAuthRegisterEffects {
713
772
  constructor(actions$, registerDriver, errorMatcher, storage) {
714
773
  this.actions$ = actions$;
@@ -771,11 +830,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
771
830
  }] }, { type: i2.DaffAuthStorageService }]; } });
772
831
 
773
832
  class DaffAuthStateModule {
774
- static withConfig(config) {
833
+ static withConfig(config = {}) {
775
834
  return {
776
835
  ngModule: DaffAuthStateModule,
777
836
  providers: [
778
- provideDaffAuthStateConfig(config),
837
+ provideDaffAuthStateConfig({
838
+ ...daffAuthStateDefaultConfig,
839
+ ...config,
840
+ }),
779
841
  ],
780
842
  };
781
843
  }
@@ -789,6 +851,7 @@ class DaffAuthStateModule {
789
851
  DaffAuthLoginEffects,
790
852
  DaffAuthRegisterEffects,
791
853
  DaffAuthResetPasswordEffects,
854
+ DaffAuthRedirectEffects,
792
855
  ]),
793
856
  ]] });
794
857
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAuthStateModule, decorators: [{
@@ -801,6 +864,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
801
864
  DaffAuthLoginEffects,
802
865
  DaffAuthRegisterEffects,
803
866
  DaffAuthResetPasswordEffects,
867
+ DaffAuthRedirectEffects,
804
868
  ]),
805
869
  ],
806
870
  }]
@@ -810,5 +874,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
810
874
  * Generated bundle index. Do not edit.
811
875
  */
812
876
 
813
- export { DAFF_AUTH_STATE_CONFIG, DAFF_AUTH_STORE_FEATURE_KEY, DaffAuthActionTypes, DaffAuthCheck, DaffAuthCheckFailure, DaffAuthCheckSuccess, DaffAuthComplete, DaffAuthFacade, DaffAuthGuardCheck, DaffAuthGuardCheckCompletion, DaffAuthLogin, DaffAuthLoginActionTypes, DaffAuthLoginFacade, DaffAuthLoginFailure, DaffAuthLoginSuccess, DaffAuthLogout, DaffAuthLogoutFailure, DaffAuthLogoutSuccess, DaffAuthRegister, DaffAuthRegisterActionTypes, DaffAuthRegisterFacade, DaffAuthRegisterFailure, DaffAuthRegisterSuccess, DaffAuthResetPasswordActionTypes, DaffAuthResetPasswordFacade, DaffAuthServerSide, DaffAuthStateModule, DaffAuthStorageFailure, DaffResetPassword, DaffResetPasswordFailure, DaffResetPasswordLanding, DaffResetPasswordSuccess, DaffSendResetEmail, DaffSendResetEmailFailure, DaffSendResetEmailSuccess, daffAuthInitialState, daffAuthLoginInitialState, daffAuthLoginReducer, daffAuthReducer, daffAuthReducers, daffAuthRegisterInitialState, daffAuthRegisterReducer, daffAuthResetPasswordInitialState, daffAuthResetPasswordReducer, daffAuthStateDefaultConfig, getDaffAuthSelectors, provideDaffAuthStateConfig };
877
+ export { DAFF_AUTH_STATE_CONFIG, DAFF_AUTH_STORE_FEATURE_KEY, DaffAuthActionTypes, DaffAuthCheck, DaffAuthCheckFailure, DaffAuthCheckSuccess, DaffAuthComplete, DaffAuthFacade, DaffAuthGuardCheck, DaffAuthGuardCheckCompletion, DaffAuthLogin, DaffAuthLoginActionTypes, DaffAuthLoginFacade, DaffAuthLoginFailure, DaffAuthLoginSuccess, DaffAuthLogout, DaffAuthLogoutFailure, DaffAuthLogoutSuccess, DaffAuthRegister, DaffAuthRegisterActionTypes, DaffAuthRegisterFacade, DaffAuthRegisterFailure, DaffAuthRegisterSuccess, DaffAuthResetPasswordActionTypes, DaffAuthResetPasswordFacade, DaffAuthRevoke, DaffAuthServerSide, DaffAuthStateModule, DaffAuthStorageFailure, DaffResetPassword, DaffResetPasswordFailure, DaffResetPasswordLanding, DaffResetPasswordSuccess, DaffSendResetEmail, DaffSendResetEmailFailure, DaffSendResetEmailSuccess, daffAuthInitialState, daffAuthLoginInitialState, daffAuthLoginReducer, daffAuthReducer, daffAuthReducers, daffAuthRegisterInitialState, daffAuthRegisterReducer, daffAuthResetPasswordInitialState, daffAuthResetPasswordReducer, daffAuthStateDefaultConfig, getDaffAuthSelectors, provideDaffAuthStateConfig };
814
878
  //# sourceMappingURL=daffodil-auth-state.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-auth-state.mjs","sources":["../../../libs/auth/state/src/actions/auth.actions.ts","../../../libs/auth/state/src/actions/login.actions.ts","../../../libs/auth/state/src/actions/register.actions.ts","../../../libs/auth/state/src/actions/reset-password.actions.ts","../../../libs/auth/state/src/reducers/auth/auth-initial-state.ts","../../../libs/auth/state/src/reducers/auth/auth.reducer.ts","../../../libs/auth/state/src/reducers/login/login-initial-state.ts","../../../libs/auth/state/src/reducers/login/login.reducer.ts","../../../libs/auth/state/src/reducers/register/register-initial-state.ts","../../../libs/auth/state/src/reducers/register/register.reducer.ts","../../../libs/auth/state/src/reducers/reset-password/initial-state.ts","../../../libs/auth/state/src/reducers/reset-password/reducer.ts","../../../libs/auth/state/src/reducers/auth-store-feature-key.ts","../../../libs/auth/state/src/reducers/auth-reducers.ts","../../../libs/auth/state/src/selectors/auth-feature.selector.ts","../../../libs/auth/state/src/selectors/auth/auth.selector.ts","../../../libs/auth/state/src/selectors/login/login.selector.ts","../../../libs/auth/state/src/selectors/register/register.selector.ts","../../../libs/auth/state/src/selectors/reset-password/selector.ts","../../../libs/auth/state/src/selectors/auth-all.selector.ts","../../../libs/auth/state/src/facades/auth/facade.ts","../../../libs/auth/state/src/facades/login/facade.ts","../../../libs/auth/state/src/facades/register/facade.ts","../../../libs/auth/state/src/facades/reset-password/facade.ts","../../../libs/auth/state/src/config/default.ts","../../../libs/auth/state/src/config/token.ts","../../../libs/auth/state/src/effects/auth.effects.ts","../../../libs/auth/state/src/effects/login.effects.ts","../../../libs/auth/state/src/effects/register.effects.ts","../../../libs/auth/state/src/effects/reset-password.effects.ts","../../../libs/auth/state/src/auth-state.module.ts","../../../libs/auth/state/src/daffodil-auth-state.ts"],"sourcesContent":["import { Action } from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nexport enum DaffAuthActionTypes {\n AuthGuardCheckAction = '[@daffodil/auth] Auth Guard Check Action',\n AuthGuardCheckCompletionAction = '[@daffodil/auth] Auth Guard Check Completion Action',\n AuthStorageFailureAction = '[@daffodil/auth] Auth Storage Failure Action',\n AuthServerSideAction = '[@daffodil/auth] Auth Server Side Action',\n AuthCheckAction = '[@daffodil/auth] Auth Check Action',\n AuthCheckSuccessAction = '[@daffodil/auth] Auth Check Success Action',\n AuthCheckFailureAction = '[@daffodil/auth] Auth Check Failure Action',\n AuthCompleteAction = '[@daffodil/auth] Auth Complete Action',\n}\n\n/**\n * An action triggered by guards to initialize an auth check request.\n */\nexport class DaffAuthGuardCheck implements Action {\n readonly type = DaffAuthActionTypes.AuthGuardCheckAction;\n}\n\n/**\n * An action triggered on the completion of a guard token check.\n */\nexport class DaffAuthGuardCheckCompletion implements Action {\n readonly type = DaffAuthActionTypes.AuthGuardCheckCompletionAction;\n\n constructor(public result: boolean) {}\n}\n\n/*\n * An action triggered upon a failed auth storage operation.\n */\nexport class DaffAuthStorageFailure implements Action {\n readonly type = DaffAuthActionTypes.AuthStorageFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/*\n * An action triggered when an invalid operation is performed in the server environment.\n * A common example is trying to access the auth token from storage.\n */\nexport class DaffAuthServerSide implements Action {\n readonly type = DaffAuthActionTypes.AuthServerSideAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/**\n * An action triggered to initialize an auth check request.\n */\nexport class DaffAuthCheck implements Action {\n readonly type = DaffAuthActionTypes.AuthCheckAction;\n}\n\n/**\n * An action triggered upon a successful auth check.\n *\n * @param token - the customer access token\n */\nexport class DaffAuthCheckSuccess implements Action {\n readonly type = DaffAuthActionTypes.AuthCheckSuccessAction;\n}\n\n/**\n * An action triggered upon a failed auth check request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffAuthCheckFailure implements Action {\n readonly type = DaffAuthActionTypes.AuthCheckFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/**\n * An action triggered when the user authentication flow is completed.\n * The auth token is in storage at this point.\n */\nexport class DaffAuthComplete implements Action {\n readonly type = DaffAuthActionTypes.AuthCompleteAction;\n}\n\nexport type DaffAuthActions =\n | DaffAuthGuardCheckCompletion\n | DaffAuthGuardCheck\n | DaffAuthStorageFailure\n | DaffAuthServerSide\n | DaffAuthCheck\n | DaffAuthCheckSuccess\n | DaffAuthCheckFailure\n | DaffAuthComplete;\n","import { Action } from '@ngrx/store';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nexport enum DaffAuthLoginActionTypes {\n LoginAction = '[@daffodil/auth] Login Action',\n LoginSuccessAction = '[@daffodil/auth] Login Success Action',\n LoginFailureAction = '[@daffodil/auth] Login Failure Action',\n LogoutAction = '[@daffodil/auth] Logout Action',\n LogoutSuccessAction = '[@daffodil/auth] Logout Success Action',\n LogoutFailureAction = '[@daffodil/auth] Logout Failure Action',\n}\n\n/**\n * An action triggered to initialize a auth login request.\n */\nexport class DaffAuthLogin<T extends DaffLoginInfo = DaffLoginInfo> implements Action {\n readonly type = DaffAuthLoginActionTypes.LoginAction;\n\n constructor(public loginInfo: T) {}\n}\n\n/**\n * An action triggered upon a successful auth login.\n *\n * @param token - the customer access token\n */\nexport class DaffAuthLoginSuccess<T extends DaffAuthToken = DaffAuthToken> implements Action {\n readonly type = DaffAuthLoginActionTypes.LoginSuccessAction;\n\n constructor(public auth: T) {}\n}\n\n/**\n * An action triggered upon a failed auth login request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffAuthLoginFailure implements Action {\n readonly type = DaffAuthLoginActionTypes.LoginFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/**\n * An action triggered to initialize a logout request.\n */\nexport class DaffAuthLogout implements Action {\n readonly type = DaffAuthLoginActionTypes.LogoutAction;\n}\n\n/**\n * An action triggered upon a successful logout.\n *\n * @param token - the customer access token\n */\nexport class DaffAuthLogoutSuccess implements Action {\n readonly type = DaffAuthLoginActionTypes.LogoutSuccessAction;\n}\n\n/**\n * An action triggered upon a failed logout request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffAuthLogoutFailure implements Action {\n readonly type = DaffAuthLoginActionTypes.LogoutFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\nexport type DaffAuthLoginActions<\n T extends DaffLoginInfo = DaffLoginInfo,\n U extends DaffAuthToken = DaffAuthToken,\n> =\n | DaffAuthLogin<T>\n | DaffAuthLoginSuccess<U>\n | DaffAuthLoginFailure\n | DaffAuthLogout\n | DaffAuthLogoutSuccess\n | DaffAuthLogoutFailure;\n","import { Action } from '@ngrx/store';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nexport enum DaffAuthRegisterActionTypes {\n RegisterAction = '[@daffodil/auth] Register Action',\n RegisterSuccessAction = '[@daffodil/auth] Register Success Action',\n RegisterFailureAction = '[@daffodil/auth] Register Failure Action',\n}\n\n/**\n * An action triggered to initialize a auth register request.\n *\n * @param registration\n */\nexport class DaffAuthRegister<T extends DaffAccountRegistration = DaffAccountRegistration> implements Action {\n readonly type = DaffAuthRegisterActionTypes.RegisterAction;\n\n constructor(public registration: T, public autoLogin = true) {}\n}\n\n/**\n * An action triggered upon a successful auth register request.\n *\n * @param token - the customer access token\n */\nexport class DaffAuthRegisterSuccess implements Action {\n readonly type = DaffAuthRegisterActionTypes.RegisterSuccessAction;\n\n constructor(public token?: string) {}\n}\n\n/**\n * An action triggered upon a failed auth request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffAuthRegisterFailure implements Action {\n readonly type = DaffAuthRegisterActionTypes.RegisterFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\nexport type DaffAuthRegisterActions<\n T extends DaffAccountRegistration = DaffAccountRegistration,\n> =\n | DaffAuthRegister<T>\n | DaffAuthRegisterSuccess\n | DaffAuthRegisterFailure;\n","import { Action } from '@ngrx/store';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nexport enum DaffAuthResetPasswordActionTypes {\n SendResetEmailAction = '[@daffodil/auth] Send Reset Email Action',\n SendResetEmailSuccessAction = '[@daffodil/auth] Send Reset Email Success Action',\n SendResetEmailFailureAction = '[@daffodil/auth] Send Reset Email Failure Action',\n ResetPasswordAction = '[@daffodil/auth] Reset Password Action',\n ResetPasswordSuccessAction = '[@daffodil/auth] Reset Password Success Action',\n ResetPasswordFailureAction = '[@daffodil/auth] Reset Password Failure Action',\n ResetPasswordLandingAction = '[@daffodil/auth] Reset Password Landing Action',\n}\n\n/**\n * An action triggered to send the specified customer an email to reset their password.\n */\nexport class DaffSendResetEmail implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.SendResetEmailAction;\n\n constructor(public email: string) {}\n}\n\n/**\n * An action triggered upon a successfully sent reset password email.\n */\nexport class DaffSendResetEmailSuccess implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.SendResetEmailSuccessAction;\n}\n\n/**\n * An action triggered upon a failure to send the reset password email.\n *\n * @param errorMessage - an error message\n */\nexport class DaffSendResetEmailFailure implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.SendResetEmailFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/**\n * An action triggered to initialize a logout request.\n */\nexport class DaffResetPassword<T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo> implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordAction;\n\n constructor(public info: T, public autoLogin = true) {}\n}\n\n/**\n * An action triggered upon a successful logout.\n */\nexport class DaffResetPasswordSuccess implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordSuccessAction;\n}\n\n/**\n * An action triggered upon a failed logout request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffResetPasswordFailure implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/**\n * An action triggered upon the user navigating to the reset password page from the link in their email.\n *\n * @param token - The token with which the password can be reset\n */\nexport class DaffResetPasswordLanding implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordLandingAction;\n\n constructor(public token: DaffAuthResetPasswordInfo['token']) {}\n}\n\nexport type DaffAuthResetPasswordActions<\n T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo,\n> =\n | DaffSendResetEmail\n | DaffSendResetEmailSuccess\n | DaffSendResetEmailFailure\n | DaffResetPassword<T>\n | DaffResetPasswordSuccess\n | DaffResetPasswordFailure\n | DaffResetPasswordLanding;\n","import { DaffAuthReducerState } from './auth-reducer-state.interface';\n\nexport const daffAuthInitialState: DaffAuthReducerState = {\n loading: false,\n errors: [],\n};\n","import {\n DaffAuthActionTypes,\n DaffAuthActions,\n} from '../../actions/public_api';\nimport { daffAuthInitialState } from './auth-initial-state';\nimport { DaffAuthReducerState } from './auth-reducer-state.interface';\n\nexport function daffAuthReducer(\n state = daffAuthInitialState,\n action: DaffAuthActions,\n): DaffAuthReducerState {\n switch (action.type) {\n case DaffAuthActionTypes.AuthCheckAction:\n return {\n ...state,\n loading: true,\n };\n\n case DaffAuthActionTypes.AuthCheckSuccessAction:\n return {\n ...state,\n loading: false,\n errors: [],\n };\n\n case DaffAuthActionTypes.AuthCheckFailureAction:\n case DaffAuthActionTypes.AuthServerSideAction:\n case DaffAuthActionTypes.AuthStorageFailureAction:\n return {\n ...state,\n loading: false,\n errors: [action.errorMessage],\n };\n\n default:\n return state;\n }\n}\n","import { DaffAuthLoginReducerState } from './login-reducer-state.interface';\n\nexport const daffAuthLoginInitialState: DaffAuthLoginReducerState = {\n loading: false,\n errors: [],\n};\n","import {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\n\nimport {\n DaffAuthLoginActionTypes,\n DaffAuthLoginActions,\n} from '../../actions/public_api';\nimport { daffAuthLoginInitialState } from './login-initial-state';\nimport { DaffAuthLoginReducerState } from './login-reducer-state.interface';\n\nexport function daffAuthLoginReducer<\n T extends DaffLoginInfo,\n U extends DaffAuthToken,\n>(\n state = daffAuthLoginInitialState,\n action: DaffAuthLoginActions<T, U>,\n): DaffAuthLoginReducerState {\n switch (action.type) {\n case DaffAuthLoginActionTypes.LoginAction:\n case DaffAuthLoginActionTypes.LogoutAction:\n return {\n ...state,\n loading: true,\n };\n\n case DaffAuthLoginActionTypes.LoginSuccessAction:\n case DaffAuthLoginActionTypes.LogoutSuccessAction:\n return {\n ...state,\n loading: false,\n errors: [],\n };\n\n case DaffAuthLoginActionTypes.LoginFailureAction:\n case DaffAuthLoginActionTypes.LogoutFailureAction:\n return {\n ...state,\n loading: false,\n errors: [action.errorMessage],\n };\n\n default:\n return state;\n }\n}\n","import { DaffAuthRegisterReducerState } from './register-reducer-state.interface';\n\nexport const daffAuthRegisterInitialState: DaffAuthRegisterReducerState = {\n loading: false,\n errors: [],\n};\n","import { DaffAccountRegistration } from '@daffodil/auth';\n\nimport {\n DaffAuthRegisterActionTypes,\n DaffAuthRegisterActions,\n} from '../../actions/public_api';\nimport { daffAuthRegisterInitialState } from './register-initial-state';\nimport { DaffAuthRegisterReducerState } from './register-reducer-state.interface';\n\nexport function daffAuthRegisterReducer<\n T extends DaffAccountRegistration,\n>(\n state = daffAuthRegisterInitialState,\n action: DaffAuthRegisterActions<T>,\n): DaffAuthRegisterReducerState {\n switch (action.type) {\n case DaffAuthRegisterActionTypes.RegisterAction:\n return {\n ...state,\n loading: true,\n };\n\n case DaffAuthRegisterActionTypes.RegisterSuccessAction:\n return {\n ...state,\n loading: false,\n errors: [],\n };\n\n case DaffAuthRegisterActionTypes.RegisterFailureAction:\n return {\n ...state,\n loading: false,\n errors: [action.errorMessage],\n };\n\n default:\n return state;\n }\n}\n","import { DaffAuthResetPasswordReducerState } from './state.interface';\n\nexport const daffAuthResetPasswordInitialState: DaffAuthResetPasswordReducerState = {\n loading: false,\n errors: [],\n token: null,\n};\n","import { DaffAuthResetPasswordInfo } from '@daffodil/auth';\n\nimport {\n DaffAuthResetPasswordActionTypes,\n DaffAuthResetPasswordActions,\n} from '../../actions/public_api';\nimport { daffAuthResetPasswordInitialState } from './initial-state';\nimport { DaffAuthResetPasswordReducerState } from './state.interface';\n\nexport function daffAuthResetPasswordReducer<\n T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo,\n>(\n state = daffAuthResetPasswordInitialState,\n action: DaffAuthResetPasswordActions<T>,\n): DaffAuthResetPasswordReducerState {\n switch (action.type) {\n case DaffAuthResetPasswordActionTypes.ResetPasswordAction:\n case DaffAuthResetPasswordActionTypes.SendResetEmailAction:\n return {\n ...state,\n loading: true,\n };\n\n case DaffAuthResetPasswordActionTypes.ResetPasswordSuccessAction:\n case DaffAuthResetPasswordActionTypes.SendResetEmailSuccessAction:\n return {\n ...state,\n loading: false,\n errors: [],\n };\n\n case DaffAuthResetPasswordActionTypes.ResetPasswordFailureAction:\n case DaffAuthResetPasswordActionTypes.SendResetEmailFailureAction:\n return {\n ...state,\n loading: false,\n errors: [action.errorMessage],\n };\n\n case DaffAuthResetPasswordActionTypes.ResetPasswordLandingAction:\n return {\n ...state,\n token: action.token,\n };\n\n default:\n return state;\n }\n}\n","export const DAFF_AUTH_STORE_FEATURE_KEY = 'daffAuth';\n","import { ActionReducerMap } from '@ngrx/store';\n\nimport { DaffAuthFeatureState } from './auth-feature-state.interface';\nimport { daffAuthReducer } from './auth/public_api';\nimport { daffAuthLoginReducer } from './login/public_api';\nimport { daffAuthRegisterReducer } from './register/public_api';\nimport { daffAuthResetPasswordReducer } from './reset-password/public_api';\n\nexport const daffAuthReducers: ActionReducerMap<DaffAuthFeatureState> = {\n auth: daffAuthReducer,\n login: daffAuthLoginReducer,\n register: daffAuthRegisterReducer,\n resetPassword: daffAuthResetPasswordReducer,\n};\n","import {\n createFeatureSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport {\n DaffAuthFeatureState,\n DAFF_AUTH_STORE_FEATURE_KEY,\n} from '../reducers/public_api';\n\n/**\n * Feature State Selector\n */\nexport const getDaffAuthFeatureStateSelector = (() => {\n let cache;\n return (): MemoizedSelector<Record<string, any>, DaffAuthFeatureState> =>\n cache = cache || createFeatureSelector<DaffAuthFeatureState>(DAFF_AUTH_STORE_FEATURE_KEY);\n})();\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffAuthToken } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthReducerState } from '../../reducers/public_api';\nimport { getDaffAuthFeatureStateSelector } from '../auth-feature.selector';\n\nexport interface AuthSelectors {\n selectAuthState: MemoizedSelector<Record<string, any>, DaffAuthReducerState>;\n selectAuthLoading: MemoizedSelector<Record<string, any>, boolean>;\n selectAuthErrors: MemoizedSelector<Record<string, any>, DaffStateError[]>;\n}\n\nconst createAuthSelectors = <T extends DaffAuthToken = DaffAuthToken>() => {\n const selectAuthState = createSelector(\n getDaffAuthFeatureStateSelector(),\n state => state.auth,\n );\n\n const selectAuthLoading = createSelector(\n selectAuthState,\n state => state.loading,\n );\n\n const selectAuthErrors = createSelector(\n selectAuthState,\n state => state.errors,\n );\n\n return {\n selectAuthState,\n selectAuthLoading,\n selectAuthErrors,\n };\n};\n\nexport const getAuthSelectors = (() => {\n let cache;\n return <T extends DaffAuthToken = DaffAuthToken>(): AuthSelectors =>\n cache = cache || createAuthSelectors<T>();\n})();\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthLoginReducerState } from '../../reducers/public_api';\nimport { getDaffAuthFeatureStateSelector } from '../auth-feature.selector';\n\nexport interface DaffAuthLoginSelectors {\n selectAuthLoginState: MemoizedSelector<Record<string, any>, DaffAuthLoginReducerState>;\n selectAuthLoginLoading: MemoizedSelector<Record<string, any>, boolean>;\n selectAuthLoginErrors: MemoizedSelector<Record<string, any>, DaffStateError[]>;\n}\n\nconst createLoginSelectors = () => {\n const selectAuthLoginState = createSelector(\n getDaffAuthFeatureStateSelector(),\n state => state.login,\n );\n\n const selectAuthLoginLoading = createSelector(\n selectAuthLoginState,\n state => state.loading,\n );\n\n const selectAuthLoginErrors = createSelector(\n selectAuthLoginState,\n state => state.errors,\n );\n\n return {\n selectAuthLoginState,\n selectAuthLoginLoading,\n selectAuthLoginErrors,\n };\n};\n\nexport const getDaffAuthLoginSelectors = (() => {\n let cache;\n return (): DaffAuthLoginSelectors =>\n cache = cache || createLoginSelectors();\n})();\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffAuthToken } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthRegisterReducerState } from '../../reducers/public_api';\nimport { getDaffAuthFeatureStateSelector } from '../auth-feature.selector';\n\nexport interface DaffAuthRegisterSelectors {\n selectAuthRegisterState: MemoizedSelector<Record<string, any>, DaffAuthRegisterReducerState>;\n selectAuthRegisterLoading: MemoizedSelector<Record<string, any>, boolean>;\n selectAuthRegisterErrors: MemoizedSelector<Record<string, any>, DaffStateError[]>;\n}\n\nconst createRegisterSelectors = <T extends DaffAuthToken = DaffAuthToken>() => {\n const selectAuthRegisterState = createSelector(\n getDaffAuthFeatureStateSelector(),\n state => state.register,\n );\n\n const selectAuthRegisterLoading = createSelector(\n selectAuthRegisterState,\n state => state.loading,\n );\n\n const selectAuthRegisterErrors = createSelector(\n selectAuthRegisterState,\n state => state.errors,\n );\n\n return {\n selectAuthRegisterState,\n selectAuthRegisterLoading,\n selectAuthRegisterErrors,\n };\n};\n\nexport const getDaffAuthRegisterSelectors = (() => {\n let cache;\n return <T extends DaffAuthToken = DaffAuthToken>(): DaffAuthRegisterSelectors =>\n cache = cache || createRegisterSelectors<T>();\n})();\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthResetPasswordReducerState } from '../../reducers/public_api';\nimport { getDaffAuthFeatureStateSelector } from '../auth-feature.selector';\n\nexport interface DaffAuthResetPasswordSelectors {\n selectAuthResetPasswordState: MemoizedSelector<Record<string, any>, DaffAuthResetPasswordReducerState>;\n selectAuthResetPasswordLoading: MemoizedSelector<Record<string, any>, boolean>;\n selectAuthResetPasswordErrors: MemoizedSelector<Record<string, any>, DaffStateError[]>;\n selectAuthResetPasswordToken: MemoizedSelector<Record<string, any>, DaffAuthResetPasswordInfo['token']>;\n}\n\nconst createResetPasswordSelectors = (): DaffAuthResetPasswordSelectors => {\n const selectAuthResetPasswordState = createSelector(\n getDaffAuthFeatureStateSelector(),\n state => state.resetPassword,\n );\n\n const selectAuthResetPasswordLoading = createSelector(\n selectAuthResetPasswordState,\n state => state.loading,\n );\n\n const selectAuthResetPasswordErrors = createSelector(\n selectAuthResetPasswordState,\n state => state.errors,\n );\n\n const selectAuthResetPasswordToken = createSelector(\n selectAuthResetPasswordState,\n state => state.token,\n );\n\n return {\n selectAuthResetPasswordState,\n selectAuthResetPasswordLoading,\n selectAuthResetPasswordErrors,\n selectAuthResetPasswordToken,\n };\n};\n\nexport const getDaffAuthResetPasswordSelectors = (() => {\n let cache;\n return (): DaffAuthResetPasswordSelectors =>\n cache = cache || createResetPasswordSelectors();\n})();\n","import { MemoizedSelector } from '@ngrx/store';\n\nimport { DaffAuthFeatureState } from '../reducers/public_api';\nimport { getDaffAuthFeatureStateSelector } from './auth-feature.selector';\nimport {\n getAuthSelectors,\n AuthSelectors,\n} from './auth/auth.selector';\nimport {\n getDaffAuthLoginSelectors,\n DaffAuthLoginSelectors,\n} from './login/login.selector';\nimport {\n getDaffAuthRegisterSelectors,\n DaffAuthRegisterSelectors,\n} from './register/register.selector';\nimport {\n DaffAuthResetPasswordSelectors,\n getDaffAuthResetPasswordSelectors,\n} from './reset-password/selector';\n\nexport interface DaffAuthSelectors extends\n DaffAuthRegisterSelectors,\n DaffAuthLoginSelectors,\n DaffAuthResetPasswordSelectors,\n AuthSelectors {\n selectAuthFeatureState: MemoizedSelector<Record<string, any>, DaffAuthFeatureState>;\n}\n\nexport const getDaffAuthSelectors = (() => {\n let cache;\n return (): DaffAuthSelectors =>\n cache = cache || {\n ...getAuthSelectors(),\n ...getDaffAuthLoginSelectors(),\n ...getDaffAuthRegisterSelectors(),\n ...getDaffAuthResetPasswordSelectors(),\n selectAuthFeatureState: getDaffAuthFeatureStateSelector(),\n };\n})();\n","import { Injectable } from '@angular/core';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffAuthToken } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthFeatureState } from '../../reducers/public_api';\nimport { getDaffAuthSelectors } from '../../selectors/public_api';\nimport { DaffAuthFacadeInterface } from './facade.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthFacade<T extends DaffAuthToken = DaffAuthToken> implements DaffAuthFacadeInterface {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n constructor(private store: Store<DaffAuthFeatureState>) {\n const {\n selectAuthLoading,\n selectAuthErrors,\n } = getDaffAuthSelectors();\n\n this.loading$ = this.store.pipe(select(selectAuthLoading));\n this.errors$ = this.store.pipe(select(selectAuthErrors));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthFeatureState } from '../../reducers/public_api';\nimport { getDaffAuthSelectors } from '../../selectors/public_api';\nimport { DaffAuthLoginFacadeInterface } from './facade.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthLoginFacade implements DaffAuthLoginFacadeInterface {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n constructor(private store: Store<DaffAuthFeatureState>) {\n const {\n selectAuthLoginLoading,\n selectAuthLoginErrors,\n } = getDaffAuthSelectors();\n\n this.loading$ = this.store.pipe(select(selectAuthLoginLoading));\n this.errors$ = this.store.pipe(select(selectAuthLoginErrors));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthFeatureState } from '../../reducers/public_api';\nimport { getDaffAuthSelectors } from '../../selectors/public_api';\nimport { DaffAuthRegisterFacadeInterface } from './facade.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthRegisterFacade implements DaffAuthRegisterFacadeInterface {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n constructor(private store: Store<DaffAuthFeatureState>) {\n const {\n selectAuthRegisterLoading,\n selectAuthRegisterErrors,\n } = getDaffAuthSelectors();\n\n this.loading$ = this.store.pipe(select(selectAuthRegisterLoading));\n this.errors$ = this.store.pipe(select(selectAuthRegisterErrors));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthFeatureState } from '../../reducers/public_api';\nimport { getDaffAuthSelectors } from '../../selectors/public_api';\nimport { DaffAuthResetPasswordFacadeInterface } from './facade.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthResetPasswordFacade implements DaffAuthResetPasswordFacadeInterface {\n token$: Observable<DaffAuthResetPasswordInfo['token']>;\n\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n constructor(private store: Store<DaffAuthFeatureState>) {\n const {\n selectAuthResetPasswordLoading,\n selectAuthResetPasswordErrors,\n selectAuthResetPasswordToken,\n } = getDaffAuthSelectors();\n\n this.token$ = this.store.pipe(select(selectAuthResetPasswordToken));\n\n this.loading$ = this.store.pipe(select(selectAuthResetPasswordLoading));\n this.errors$ = this.store.pipe(select(selectAuthResetPasswordErrors));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { DaffAuthStateConfig } from './type';\n\nconst TWENTY_MINUTES = 1.2e6;\n\nexport const daffAuthStateDefaultConfig: DaffAuthStateConfig = {\n checkInterval: TWENTY_MINUTES,\n};\n","import {\n InjectionToken,\n ValueProvider,\n} from '@angular/core';\n\nimport { daffAuthStateDefaultConfig } from './default';\nimport { DaffAuthStateConfig } from './type';\n\nexport const DAFF_AUTH_STATE_CONFIG = new InjectionToken('DAFF_AUTH_STATE_CONFIG', { factory: () => daffAuthStateDefaultConfig });\n\nexport const provideDaffAuthStateConfig = (config: DaffAuthStateConfig): ValueProvider => ({\n provide: DAFF_AUTH_STATE_CONFIG,\n useValue: config,\n});\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n of,\n Observable,\n EMPTY,\n} from 'rxjs';\nimport {\n switchMap,\n catchError,\n map,\n repeat,\n filter,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DaffAuthStorageService,\n DAFF_AUTH_ERROR_MATCHER,\n} from '@daffodil/auth';\nimport {\n DaffAuthDriver,\n DaffAuthServiceInterface,\n} from '@daffodil/auth/driver';\nimport {\n DaffError,\n DaffServerSideStorageError,\n DaffStorageServiceError,\n} from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\n\nimport {\n DaffAuthActionTypes,\n DaffAuthCheckSuccess,\n DaffAuthCheckFailure,\n DaffAuthCheck,\n DaffAuthGuardCheckCompletion,\n DaffAuthGuardCheck,\n DaffAuthStorageFailure,\n DaffAuthServerSide,\n} from '../actions/public_api';\nimport {\n DaffAuthStateConfig,\n DAFF_AUTH_STATE_CONFIG,\n} from '../config/public_api';\n\n@Injectable()\nexport class DaffAuthEffects {\n constructor(\n private actions$: Actions,\n @Inject(DaffAuthDriver) private authDriver: DaffAuthServiceInterface,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n private storage: DaffAuthStorageService,\n @Inject(DAFF_AUTH_STATE_CONFIG) private config: DaffAuthStateConfig,\n ) {}\n\n check$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthActionTypes.AuthCheckAction),\n switchMap((action: DaffAuthCheck) =>\n this.authDriver.check().pipe(\n map(() => new DaffAuthCheckSuccess()),\n catchError((error: DaffError) => of(new DaffAuthCheckFailure(this.errorMatcher(error)))),\n ),\n ),\n ));\n\n guardCheck$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthActionTypes.AuthGuardCheckAction),\n switchMap((action: DaffAuthGuardCheck) =>\n this.authDriver.check().pipe(\n map(() => new DaffAuthGuardCheckCompletion(true)),\n catchError((error: DaffError) => of(new DaffAuthGuardCheckCompletion(false))),\n ),\n ),\n ));\n\n removeAuthToken$ = createEffect(() => this.actions$.pipe(\n ofType<DaffAuthCheckFailure | DaffAuthGuardCheckCompletion>(\n DaffAuthActionTypes.AuthGuardCheckCompletionAction,\n DaffAuthActionTypes.AuthCheckFailureAction,\n ),\n filter(action => {\n // don't remove token when guard check completes with true result\n if (action.type === DaffAuthActionTypes.AuthGuardCheckCompletionAction && action.result) {\n return false;\n }\n\n return true;\n }),\n tap(() => {\n this.storage.removeAuthToken();\n }),\n switchMap(() => EMPTY),\n catchError((error: Error) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(new DaffAuthServerSide(this.errorMatcher(error)));\n\n case error instanceof DaffStorageServiceError:\n default:\n return of(new DaffAuthStorageFailure(this.errorMatcher(error)));\n }\n }),\n ));\n\n // this needs to be defined after `check$` or else the driver call won't be run\n authCheckInterval$ = createEffect(() => of(new DaffAuthCheck()).pipe(\n repeat({ delay: this.config.checkInterval }),\n filter(() => !!this.storage.getAuthToken()),\n catchError((error: Error) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(new DaffAuthServerSide(this.errorMatcher(error)));\n\n case error instanceof DaffStorageServiceError:\n return of(new DaffAuthStorageFailure(this.errorMatcher(error)));\n\n default:\n return EMPTY;\n }\n }),\n ));\n}\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n of,\n Observable,\n EMPTY,\n} from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n DAFF_AUTH_ERROR_MATCHER,\n DaffAuthStorageService,\n} from '@daffodil/auth';\nimport {\n DaffLoginDriver,\n DaffLoginServiceInterface,\n} from '@daffodil/auth/driver';\nimport {\n DaffError,\n DaffServerSideStorageError,\n DaffStorageServiceError,\n} from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\n\nimport {\n DaffAuthLoginActionTypes,\n DaffAuthLogin,\n DaffAuthLoginSuccess,\n DaffAuthLoginFailure,\n DaffAuthLogoutSuccess,\n DaffAuthLogoutFailure,\n DaffAuthLogout,\n DaffAuthStorageFailure,\n DaffAuthComplete,\n DaffAuthServerSide,\n} from '../actions/public_api';\n\n@Injectable()\nexport class DaffAuthLoginEffects<\n T extends DaffLoginInfo = DaffLoginInfo,\n U extends DaffAuthToken = DaffAuthToken,\n> {\n constructor(\n private actions$: Actions,\n @Inject(DaffLoginDriver) private loginDriver: DaffLoginServiceInterface<T, U>,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n private storage: DaffAuthStorageService,\n ) {}\n\n login$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthLoginActionTypes.LoginAction),\n switchMap((action: DaffAuthLogin<T>) =>\n this.loginDriver.login(action.loginInfo).pipe(\n map((resp) =>\n new DaffAuthLoginSuccess<U>(resp),\n ),\n catchError((error: DaffError) =>\n of(new DaffAuthLoginFailure(this.errorMatcher(error))),\n ),\n ),\n ),\n ));\n\n logout$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthLoginActionTypes.LogoutAction),\n switchMap((action: DaffAuthLogout) =>\n this.loginDriver.logout().pipe(\n map(() => new DaffAuthLogoutSuccess()),\n catchError((error: DaffError) =>\n of(new DaffAuthLogoutFailure(this.errorMatcher(error))),\n ),\n ),\n ),\n ));\n\n removeAuthToken$ = createEffect(() => this.actions$.pipe(\n ofType<DaffAuthLogoutSuccess>(\n DaffAuthLoginActionTypes.LogoutSuccessAction,\n ),\n tap(() => {\n this.storage.removeAuthToken();\n }),\n switchMap(() => EMPTY),\n catchError((error: Error) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(new DaffAuthServerSide(this.errorMatcher(error)));\n\n case error instanceof DaffStorageServiceError:\n default:\n return of(new DaffAuthStorageFailure(this.errorMatcher(error)));\n }\n }),\n ));\n\n storeAuthToken$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthLoginActionTypes.LoginSuccessAction),\n tap((action: DaffAuthLoginSuccess<U>) => {\n this.storage.setAuthToken(action.auth.token);\n }),\n map(() => new DaffAuthComplete()),\n catchError((error: Error) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(new DaffAuthServerSide(this.errorMatcher(error)));\n\n case error instanceof DaffStorageServiceError:\n default:\n return of(new DaffAuthStorageFailure(this.errorMatcher(error)));\n }\n }),\n ));\n}\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n of,\n Observable,\n iif,\n defer,\n} from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DaffAccountRegistration,\n DaffAuthStorageService,\n DAFF_AUTH_ERROR_MATCHER,\n} from '@daffodil/auth';\nimport {\n DaffRegisterDriver,\n DaffRegisterServiceInterface,\n} from '@daffodil/auth/driver';\nimport {\n DaffError,\n DaffServerSideStorageError,\n DaffStorageServiceError,\n} from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\n\nimport {\n DaffAuthRegisterActionTypes,\n DaffAuthRegister,\n DaffAuthRegisterSuccess,\n DaffAuthRegisterFailure,\n DaffAuthComplete,\n DaffAuthServerSide,\n DaffAuthStorageFailure,\n} from '../actions/public_api';\n\n@Injectable()\nexport class DaffAuthRegisterEffects<\n T extends DaffAccountRegistration = DaffAccountRegistration,\n> {\n constructor(\n private actions$: Actions,\n @Inject(DaffRegisterDriver) private registerDriver: DaffRegisterServiceInterface<T>,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n private storage: DaffAuthStorageService,\n ) {}\n\n register$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthRegisterActionTypes.RegisterAction),\n switchMap((action: DaffAuthRegister<T>) =>\n iif(\n () => action.autoLogin,\n defer(() => this.registerDriver.register(action.registration).pipe(\n tap(token => this.storage.setAuthToken(token)),\n switchMap(() => of(new DaffAuthRegisterSuccess(), new DaffAuthComplete())),\n )),\n defer(() => this.registerDriver.registerOnly(action.registration).pipe(\n map(() => new DaffAuthRegisterSuccess()),\n )),\n ).pipe(\n catchError((error: DaffError) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(\n new DaffAuthServerSide(this.errorMatcher(error)),\n new DaffAuthRegisterFailure(this.errorMatcher(error)),\n );\n\n case error instanceof DaffStorageServiceError:\n return of(\n new DaffAuthStorageFailure(this.errorMatcher(error)),\n new DaffAuthRegisterFailure(this.errorMatcher(error)),\n );\n\n default:\n return of(new DaffAuthRegisterFailure(this.errorMatcher(error)));\n }\n }),\n ),\n ),\n ));\n}\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n of,\n Observable,\n iif,\n defer,\n} from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DAFF_AUTH_ERROR_MATCHER,\n DaffAuthResetPasswordInfo,\n DaffAuthStorageService,\n} from '@daffodil/auth';\nimport {\n DaffResetPasswordDriver,\n DaffResetPasswordServiceInterface,\n} from '@daffodil/auth/driver';\nimport {\n DaffError,\n DaffServerSideStorageError,\n DaffStorageServiceError,\n} from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\n\nimport {\n DaffAuthResetPasswordActionTypes,\n DaffResetPassword,\n DaffResetPasswordSuccess,\n DaffResetPasswordFailure,\n DaffSendResetEmail,\n DaffSendResetEmailSuccess,\n DaffSendResetEmailFailure,\n DaffAuthComplete,\n DaffAuthServerSide,\n DaffAuthStorageFailure,\n} from '../actions/public_api';\n\n@Injectable()\nexport class DaffAuthResetPasswordEffects<\n T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo,\n> {\n constructor(\n private actions$: Actions,\n @Inject(DaffResetPasswordDriver) private driver: DaffResetPasswordServiceInterface<T>,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n private storage: DaffAuthStorageService,\n ) {}\n\n sendResetEmail$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthResetPasswordActionTypes.SendResetEmailAction),\n switchMap((action: DaffSendResetEmail) =>\n this.driver.sendResetEmail(action.email).pipe(\n map(() =>\n new DaffSendResetEmailSuccess(),\n ),\n catchError((error: DaffError) =>\n of(new DaffSendResetEmailFailure(this.errorMatcher(error))),\n ),\n ),\n ),\n ));\n\n resetPassword$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthResetPasswordActionTypes.ResetPasswordAction),\n switchMap((action: DaffResetPassword<T>) =>\n iif(\n () => action.autoLogin,\n defer(() => this.driver.resetPassword(action.info).pipe(\n tap(token => this.storage.setAuthToken(token)),\n switchMap(() => of(new DaffResetPasswordSuccess(), new DaffAuthComplete())),\n )),\n defer(() => this.driver.resetPasswordOnly(action.info).pipe(\n map(() => new DaffResetPasswordSuccess()),\n )),\n ).pipe(\n catchError((error: DaffError) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(\n new DaffAuthServerSide(this.errorMatcher(error)),\n new DaffResetPasswordFailure(this.errorMatcher(error)),\n );\n\n case error instanceof DaffStorageServiceError:\n return of(\n new DaffAuthStorageFailure(this.errorMatcher(error)),\n new DaffResetPasswordFailure(this.errorMatcher(error)),\n );\n\n default:\n return of(new DaffResetPasswordFailure(this.errorMatcher(error)));\n }\n }),\n ),\n ),\n ));\n}\n","import {\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\n\nimport {\n DaffAuthStateConfig,\n provideDaffAuthStateConfig,\n} from './config/public_api';\nimport { DaffAuthEffects } from './effects/auth.effects';\nimport { DaffAuthLoginEffects } from './effects/login.effects';\nimport { DaffAuthRegisterEffects } from './effects/register.effects';\nimport { DaffAuthResetPasswordEffects } from './effects/reset-password.effects';\nimport {\n DAFF_AUTH_STORE_FEATURE_KEY,\n daffAuthReducers,\n} from './reducers/public_api';\n\n@NgModule({\n imports: [\n StoreModule.forFeature(DAFF_AUTH_STORE_FEATURE_KEY, daffAuthReducers),\n EffectsModule.forFeature([\n DaffAuthEffects,\n DaffAuthLoginEffects,\n DaffAuthRegisterEffects,\n DaffAuthResetPasswordEffects,\n ]),\n ],\n})\nexport class DaffAuthStateModule {\n static withConfig(config: DaffAuthStateConfig): ModuleWithProviders<DaffAuthStateModule> {\n return {\n ngModule: DaffAuthStateModule,\n providers: [\n prov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eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;oIAAnB,mBAAmB,EAAA,OAAA,EAAA,CAAA,EAAA,CAAA,kBAAA,EAAAC,IAAA,CAAA,oBAAA,CAAA,EAAA,CAAA,CAAA;AAAnB,mBAAA,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,EAVrB,OAAA,EAAA,CAAA;AACP,YAAA,WAAW,CAAC,UAAU,CAAC,2BAA2B,EAAE,gBAAgB,CAAC;YACrE,aAAa,CAAC,UAAU,CAAC;gBACvB,eAAe;gBACf,oBAAoB;gBACpB,uBAAuB;gBACvB,4BAA4B;aAC7B,CAAC;AACH,SAAA,CAAA,EAAA,CAAA,CAAA;2FAEU,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAX/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;AACP,wBAAA,WAAW,CAAC,UAAU,CAAC,2BAA2B,EAAE,gBAAgB,CAAC;wBACrE,aAAa,CAAC,UAAU,CAAC;4BACvB,eAAe;4BACf,oBAAoB;4BACpB,uBAAuB;4BACvB,4BAA4B;yBAC7B,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC9BD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-auth-state.mjs","sources":["../../../libs/auth/state/src/actions/auth.actions.ts","../../../libs/auth/state/src/actions/login.actions.ts","../../../libs/auth/state/src/actions/register.actions.ts","../../../libs/auth/state/src/actions/reset-password.actions.ts","../../../libs/auth/state/src/reducers/auth/auth-initial-state.ts","../../../libs/auth/state/src/reducers/auth/auth.reducer.ts","../../../libs/auth/state/src/reducers/login/login-initial-state.ts","../../../libs/auth/state/src/reducers/login/login.reducer.ts","../../../libs/auth/state/src/reducers/register/register-initial-state.ts","../../../libs/auth/state/src/reducers/register/register.reducer.ts","../../../libs/auth/state/src/reducers/reset-password/initial-state.ts","../../../libs/auth/state/src/reducers/reset-password/reducer.ts","../../../libs/auth/state/src/reducers/auth-store-feature-key.ts","../../../libs/auth/state/src/reducers/auth-reducers.ts","../../../libs/auth/state/src/selectors/auth-feature.selector.ts","../../../libs/auth/state/src/selectors/auth/auth.selector.ts","../../../libs/auth/state/src/selectors/login/login.selector.ts","../../../libs/auth/state/src/selectors/register/register.selector.ts","../../../libs/auth/state/src/selectors/reset-password/selector.ts","../../../libs/auth/state/src/selectors/auth-all.selector.ts","../../../libs/auth/state/src/facades/auth/facade.ts","../../../libs/auth/state/src/facades/login/facade.ts","../../../libs/auth/state/src/facades/register/facade.ts","../../../libs/auth/state/src/facades/reset-password/facade.ts","../../../libs/auth/state/src/config/default.ts","../../../libs/auth/state/src/config/token.ts","../../../libs/auth/state/src/effects/auth.effects.ts","../../../libs/auth/state/src/effects/login.effects.ts","../../../libs/auth/state/src/effects/redirect.effects.ts","../../../libs/auth/state/src/effects/register.effects.ts","../../../libs/auth/state/src/effects/reset-password.effects.ts","../../../libs/auth/state/src/auth-state.module.ts","../../../libs/auth/state/src/daffodil-auth-state.ts"],"sourcesContent":["import { Action } from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nexport enum DaffAuthActionTypes {\n AuthGuardCheckAction = '[@daffodil/auth] Auth Guard Check Action',\n AuthGuardCheckCompletionAction = '[@daffodil/auth] Auth Guard Check Completion Action',\n AuthStorageFailureAction = '[@daffodil/auth] Auth Storage Failure Action',\n AuthServerSideAction = '[@daffodil/auth] Auth Server Side Action',\n AuthCheckAction = '[@daffodil/auth] Auth Check Action',\n AuthCheckSuccessAction = '[@daffodil/auth] Auth Check Success Action',\n AuthCheckFailureAction = '[@daffodil/auth] Auth Check Failure Action',\n AuthCompleteAction = '[@daffodil/auth] Auth Complete Action',\n AuthRevokeAction = '[@daffodil/auth] Auth Revoke Action',\n}\n\n/**\n * An action triggered by guards to initialize an auth check request.\n */\nexport class DaffAuthGuardCheck implements Action {\n readonly type = DaffAuthActionTypes.AuthGuardCheckAction;\n}\n\n/**\n * An action triggered on the completion of a guard token check.\n */\nexport class DaffAuthGuardCheckCompletion implements Action {\n readonly type = DaffAuthActionTypes.AuthGuardCheckCompletionAction;\n\n constructor(public result: boolean) {}\n}\n\n/*\n * An action triggered upon a failed auth storage operation.\n */\nexport class DaffAuthStorageFailure implements Action {\n readonly type = DaffAuthActionTypes.AuthStorageFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/*\n * An action triggered when an invalid operation is performed in the server environment.\n * A common example is trying to access the auth token from storage.\n */\nexport class DaffAuthServerSide implements Action {\n readonly type = DaffAuthActionTypes.AuthServerSideAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/**\n * An action triggered to initialize an auth check request.\n */\nexport class DaffAuthCheck implements Action {\n readonly type = DaffAuthActionTypes.AuthCheckAction;\n}\n\n/**\n * An action triggered upon a successful auth check.\n *\n * @param token - the customer access token\n */\nexport class DaffAuthCheckSuccess implements Action {\n readonly type = DaffAuthActionTypes.AuthCheckSuccessAction;\n}\n\n/**\n * An action triggered upon a failed auth check request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffAuthCheckFailure implements Action {\n readonly type = DaffAuthActionTypes.AuthCheckFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/**\n * An action triggered when the user authentication flow is completed.\n * The auth token is in storage at this point.\n */\nexport class DaffAuthComplete implements Action {\n readonly type = DaffAuthActionTypes.AuthCompleteAction;\n}\n\n/**\n * An action triggered when the user auth token is revoked.\n * The auth token has been removed from storage at this point.\n */\nexport class DaffAuthRevoke implements Action {\n readonly type = DaffAuthActionTypes.AuthRevokeAction;\n}\n\nexport type DaffAuthActions =\n | DaffAuthGuardCheckCompletion\n | DaffAuthGuardCheck\n | DaffAuthStorageFailure\n | DaffAuthServerSide\n | DaffAuthCheck\n | DaffAuthCheckSuccess\n | DaffAuthCheckFailure\n | DaffAuthComplete\n | DaffAuthRevoke;\n","import { Action } from '@ngrx/store';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nexport enum DaffAuthLoginActionTypes {\n LoginAction = '[@daffodil/auth] Login Action',\n LoginSuccessAction = '[@daffodil/auth] Login Success Action',\n LoginFailureAction = '[@daffodil/auth] Login Failure Action',\n LogoutAction = '[@daffodil/auth] Logout Action',\n LogoutSuccessAction = '[@daffodil/auth] Logout Success Action',\n LogoutFailureAction = '[@daffodil/auth] Logout Failure Action',\n}\n\n/**\n * An action triggered to initialize a auth login request.\n */\nexport class DaffAuthLogin<T extends DaffLoginInfo = DaffLoginInfo> implements Action {\n readonly type = DaffAuthLoginActionTypes.LoginAction;\n\n constructor(public loginInfo: T) {}\n}\n\n/**\n * An action triggered upon a successful auth login.\n *\n * @param token - the customer access token\n */\nexport class DaffAuthLoginSuccess<T extends DaffAuthToken = DaffAuthToken> implements Action {\n readonly type = DaffAuthLoginActionTypes.LoginSuccessAction;\n\n constructor(public auth: T) {}\n}\n\n/**\n * An action triggered upon a failed auth login request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffAuthLoginFailure implements Action {\n readonly type = DaffAuthLoginActionTypes.LoginFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/**\n * An action triggered to initialize a logout request.\n */\nexport class DaffAuthLogout implements Action {\n readonly type = DaffAuthLoginActionTypes.LogoutAction;\n}\n\n/**\n * An action triggered upon a successful logout.\n *\n * @param token - the customer access token\n */\nexport class DaffAuthLogoutSuccess implements Action {\n readonly type = DaffAuthLoginActionTypes.LogoutSuccessAction;\n}\n\n/**\n * An action triggered upon a failed logout request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffAuthLogoutFailure implements Action {\n readonly type = DaffAuthLoginActionTypes.LogoutFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\nexport type DaffAuthLoginActions<\n T extends DaffLoginInfo = DaffLoginInfo,\n U extends DaffAuthToken = DaffAuthToken,\n> =\n | DaffAuthLogin<T>\n | DaffAuthLoginSuccess<U>\n | DaffAuthLoginFailure\n | DaffAuthLogout\n | DaffAuthLogoutSuccess\n | DaffAuthLogoutFailure;\n","import { Action } from '@ngrx/store';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nexport enum DaffAuthRegisterActionTypes {\n RegisterAction = '[@daffodil/auth] Register Action',\n RegisterSuccessAction = '[@daffodil/auth] Register Success Action',\n RegisterFailureAction = '[@daffodil/auth] Register Failure Action',\n}\n\n/**\n * An action triggered to initialize a auth register request.\n *\n * @param registration\n */\nexport class DaffAuthRegister<T extends DaffAccountRegistration = DaffAccountRegistration> implements Action {\n readonly type = DaffAuthRegisterActionTypes.RegisterAction;\n\n constructor(public registration: T, public autoLogin = true) {}\n}\n\n/**\n * An action triggered upon a successful auth register request.\n *\n * @param token - the customer access token\n */\nexport class DaffAuthRegisterSuccess implements Action {\n readonly type = DaffAuthRegisterActionTypes.RegisterSuccessAction;\n\n constructor(public token?: string) {}\n}\n\n/**\n * An action triggered upon a failed auth request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffAuthRegisterFailure implements Action {\n readonly type = DaffAuthRegisterActionTypes.RegisterFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\nexport type DaffAuthRegisterActions<\n T extends DaffAccountRegistration = DaffAccountRegistration,\n> =\n | DaffAuthRegister<T>\n | DaffAuthRegisterSuccess\n | DaffAuthRegisterFailure;\n","import { Action } from '@ngrx/store';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nexport enum DaffAuthResetPasswordActionTypes {\n SendResetEmailAction = '[@daffodil/auth] Send Reset Email Action',\n SendResetEmailSuccessAction = '[@daffodil/auth] Send Reset Email Success Action',\n SendResetEmailFailureAction = '[@daffodil/auth] Send Reset Email Failure Action',\n ResetPasswordAction = '[@daffodil/auth] Reset Password Action',\n ResetPasswordSuccessAction = '[@daffodil/auth] Reset Password Success Action',\n ResetPasswordFailureAction = '[@daffodil/auth] Reset Password Failure Action',\n ResetPasswordLandingAction = '[@daffodil/auth] Reset Password Landing Action',\n}\n\n/**\n * An action triggered to send the specified customer an email to reset their password.\n */\nexport class DaffSendResetEmail implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.SendResetEmailAction;\n\n constructor(public email: string) {}\n}\n\n/**\n * An action triggered upon a successfully sent reset password email.\n */\nexport class DaffSendResetEmailSuccess implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.SendResetEmailSuccessAction;\n}\n\n/**\n * An action triggered upon a failure to send the reset password email.\n *\n * @param errorMessage - an error message\n */\nexport class DaffSendResetEmailFailure implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.SendResetEmailFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/**\n * An action triggered to initialize a logout request.\n */\nexport class DaffResetPassword<T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo> implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordAction;\n\n constructor(public info: T, public autoLogin = true) {}\n}\n\n/**\n * An action triggered upon a successful logout.\n */\nexport class DaffResetPasswordSuccess implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordSuccessAction;\n}\n\n/**\n * An action triggered upon a failed logout request.\n *\n * @param errorMessage - an error message\n */\nexport class DaffResetPasswordFailure implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordFailureAction;\n\n constructor(public errorMessage: DaffStateError) {}\n}\n\n/**\n * An action triggered upon the user navigating to the reset password page from the link in their email.\n *\n * @param token - The token with which the password can be reset\n */\nexport class DaffResetPasswordLanding implements Action {\n readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordLandingAction;\n\n constructor(public token: DaffAuthResetPasswordInfo['token']) {}\n}\n\nexport type DaffAuthResetPasswordActions<\n T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo,\n> =\n | DaffSendResetEmail\n | DaffSendResetEmailSuccess\n | DaffSendResetEmailFailure\n | DaffResetPassword<T>\n | DaffResetPasswordSuccess\n | DaffResetPasswordFailure\n | DaffResetPasswordLanding;\n","import { DaffAuthReducerState } from './auth-reducer-state.interface';\n\nexport const daffAuthInitialState: DaffAuthReducerState = {\n loading: false,\n errors: [],\n loggedIn: false,\n};\n","import {\n DaffAuthActionTypes,\n DaffAuthActions,\n} from '../../actions/public_api';\nimport { daffAuthInitialState } from './auth-initial-state';\nimport { DaffAuthReducerState } from './auth-reducer-state.interface';\n\nexport function daffAuthReducer(\n state = daffAuthInitialState,\n action: DaffAuthActions,\n): DaffAuthReducerState {\n switch (action.type) {\n case DaffAuthActionTypes.AuthCheckAction:\n return {\n ...state,\n loading: true,\n };\n\n case DaffAuthActionTypes.AuthCheckSuccessAction:\n return {\n ...state,\n loggedIn: true,\n loading: false,\n errors: [],\n };\n\n case DaffAuthActionTypes.AuthCheckFailureAction:\n return {\n ...state,\n loggedIn: false,\n loading: false,\n errors: [action.errorMessage],\n };\n\n case DaffAuthActionTypes.AuthServerSideAction:\n case DaffAuthActionTypes.AuthStorageFailureAction:\n return {\n ...state,\n loading: false,\n errors: [action.errorMessage],\n };\n\n case DaffAuthActionTypes.AuthCompleteAction:\n return {\n ...state,\n loggedIn: true,\n };\n\n case DaffAuthActionTypes.AuthRevokeAction:\n return {\n ...state,\n loggedIn: false,\n };\n\n default:\n return state;\n }\n}\n","import { DaffAuthLoginReducerState } from './login-reducer-state.interface';\n\nexport const daffAuthLoginInitialState: DaffAuthLoginReducerState = {\n loading: false,\n errors: [],\n};\n","import {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\n\nimport {\n DaffAuthLoginActionTypes,\n DaffAuthLoginActions,\n} from '../../actions/public_api';\nimport { daffAuthLoginInitialState } from './login-initial-state';\nimport { DaffAuthLoginReducerState } from './login-reducer-state.interface';\n\nexport function daffAuthLoginReducer<\n T extends DaffLoginInfo,\n U extends DaffAuthToken,\n>(\n state = daffAuthLoginInitialState,\n action: DaffAuthLoginActions<T, U>,\n): DaffAuthLoginReducerState {\n switch (action.type) {\n case DaffAuthLoginActionTypes.LoginAction:\n case DaffAuthLoginActionTypes.LogoutAction:\n return {\n ...state,\n loading: true,\n };\n\n case DaffAuthLoginActionTypes.LoginSuccessAction:\n case DaffAuthLoginActionTypes.LogoutSuccessAction:\n return {\n ...state,\n loading: false,\n errors: [],\n };\n\n case DaffAuthLoginActionTypes.LoginFailureAction:\n case DaffAuthLoginActionTypes.LogoutFailureAction:\n return {\n ...state,\n loading: false,\n errors: [action.errorMessage],\n };\n\n default:\n return state;\n }\n}\n","import { DaffAuthRegisterReducerState } from './register-reducer-state.interface';\n\nexport const daffAuthRegisterInitialState: DaffAuthRegisterReducerState = {\n loading: false,\n errors: [],\n};\n","import { DaffAccountRegistration } from '@daffodil/auth';\n\nimport {\n DaffAuthRegisterActionTypes,\n DaffAuthRegisterActions,\n} from '../../actions/public_api';\nimport { daffAuthRegisterInitialState } from './register-initial-state';\nimport { DaffAuthRegisterReducerState } from './register-reducer-state.interface';\n\nexport function daffAuthRegisterReducer<\n T extends DaffAccountRegistration,\n>(\n state = daffAuthRegisterInitialState,\n action: DaffAuthRegisterActions<T>,\n): DaffAuthRegisterReducerState {\n switch (action.type) {\n case DaffAuthRegisterActionTypes.RegisterAction:\n return {\n ...state,\n loading: true,\n };\n\n case DaffAuthRegisterActionTypes.RegisterSuccessAction:\n return {\n ...state,\n loading: false,\n errors: [],\n };\n\n case DaffAuthRegisterActionTypes.RegisterFailureAction:\n return {\n ...state,\n loading: false,\n errors: [action.errorMessage],\n };\n\n default:\n return state;\n }\n}\n","import { DaffAuthResetPasswordReducerState } from './state.interface';\n\nexport const daffAuthResetPasswordInitialState: DaffAuthResetPasswordReducerState = {\n loading: false,\n errors: [],\n token: null,\n};\n","import { DaffAuthResetPasswordInfo } from '@daffodil/auth';\n\nimport {\n DaffAuthResetPasswordActionTypes,\n DaffAuthResetPasswordActions,\n} from '../../actions/public_api';\nimport { daffAuthResetPasswordInitialState } from './initial-state';\nimport { DaffAuthResetPasswordReducerState } from './state.interface';\n\nexport function daffAuthResetPasswordReducer<\n T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo,\n>(\n state = daffAuthResetPasswordInitialState,\n action: DaffAuthResetPasswordActions<T>,\n): DaffAuthResetPasswordReducerState {\n switch (action.type) {\n case DaffAuthResetPasswordActionTypes.ResetPasswordAction:\n case DaffAuthResetPasswordActionTypes.SendResetEmailAction:\n return {\n ...state,\n loading: true,\n };\n\n case DaffAuthResetPasswordActionTypes.ResetPasswordSuccessAction:\n case DaffAuthResetPasswordActionTypes.SendResetEmailSuccessAction:\n return {\n ...state,\n loading: false,\n errors: [],\n };\n\n case DaffAuthResetPasswordActionTypes.ResetPasswordFailureAction:\n case DaffAuthResetPasswordActionTypes.SendResetEmailFailureAction:\n return {\n ...state,\n loading: false,\n errors: [action.errorMessage],\n };\n\n case DaffAuthResetPasswordActionTypes.ResetPasswordLandingAction:\n return {\n ...state,\n token: action.token,\n };\n\n default:\n return state;\n }\n}\n","export const DAFF_AUTH_STORE_FEATURE_KEY = 'daffAuth';\n","import { ActionReducerMap } from '@ngrx/store';\n\nimport { DaffAuthFeatureState } from './auth-feature-state.interface';\nimport { daffAuthReducer } from './auth/public_api';\nimport { daffAuthLoginReducer } from './login/public_api';\nimport { daffAuthRegisterReducer } from './register/public_api';\nimport { daffAuthResetPasswordReducer } from './reset-password/public_api';\n\nexport const daffAuthReducers: ActionReducerMap<DaffAuthFeatureState> = {\n auth: daffAuthReducer,\n login: daffAuthLoginReducer,\n register: daffAuthRegisterReducer,\n resetPassword: daffAuthResetPasswordReducer,\n};\n","import {\n createFeatureSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport {\n DaffAuthFeatureState,\n DAFF_AUTH_STORE_FEATURE_KEY,\n} from '../reducers/public_api';\n\n/**\n * Feature State Selector\n */\nexport const getDaffAuthFeatureStateSelector = (() => {\n let cache;\n return (): MemoizedSelector<Record<string, any>, DaffAuthFeatureState> =>\n cache = cache || createFeatureSelector<DaffAuthFeatureState>(DAFF_AUTH_STORE_FEATURE_KEY);\n})();\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthReducerState } from '../../reducers/public_api';\nimport { getDaffAuthFeatureStateSelector } from '../auth-feature.selector';\n\nexport interface AuthSelectors {\n selectAuthState: MemoizedSelector<Record<string, any>, DaffAuthReducerState>;\n selectAuthLoading: MemoizedSelector<Record<string, any>, boolean>;\n selectAuthErrors: MemoizedSelector<Record<string, any>, DaffStateError[]>;\n selectAuthLoggedIn: MemoizedSelector<Record<string, any>, boolean>;\n}\n\nconst createAuthSelectors = () => {\n const selectAuthState = createSelector(\n getDaffAuthFeatureStateSelector(),\n state => state.auth,\n );\n\n const selectAuthLoading = createSelector(\n selectAuthState,\n state => state.loading,\n );\n\n const selectAuthErrors = createSelector(\n selectAuthState,\n state => state.errors,\n );\n\n const selectAuthLoggedIn = createSelector(\n selectAuthState,\n state => state.loggedIn,\n );\n\n return {\n selectAuthState,\n selectAuthLoading,\n selectAuthErrors,\n selectAuthLoggedIn,\n };\n};\n\nexport const getAuthSelectors = (() => {\n let cache;\n return (): AuthSelectors =>\n cache = cache || createAuthSelectors();\n})();\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthLoginReducerState } from '../../reducers/public_api';\nimport { getDaffAuthFeatureStateSelector } from '../auth-feature.selector';\n\nexport interface DaffAuthLoginSelectors {\n selectAuthLoginState: MemoizedSelector<Record<string, any>, DaffAuthLoginReducerState>;\n selectAuthLoginLoading: MemoizedSelector<Record<string, any>, boolean>;\n selectAuthLoginErrors: MemoizedSelector<Record<string, any>, DaffStateError[]>;\n}\n\nconst createLoginSelectors = () => {\n const selectAuthLoginState = createSelector(\n getDaffAuthFeatureStateSelector(),\n state => state.login,\n );\n\n const selectAuthLoginLoading = createSelector(\n selectAuthLoginState,\n state => state.loading,\n );\n\n const selectAuthLoginErrors = createSelector(\n selectAuthLoginState,\n state => state.errors,\n );\n\n return {\n selectAuthLoginState,\n selectAuthLoginLoading,\n selectAuthLoginErrors,\n };\n};\n\nexport const getDaffAuthLoginSelectors = (() => {\n let cache;\n return (): DaffAuthLoginSelectors =>\n cache = cache || createLoginSelectors();\n})();\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffAuthToken } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthRegisterReducerState } from '../../reducers/public_api';\nimport { getDaffAuthFeatureStateSelector } from '../auth-feature.selector';\n\nexport interface DaffAuthRegisterSelectors {\n selectAuthRegisterState: MemoizedSelector<Record<string, any>, DaffAuthRegisterReducerState>;\n selectAuthRegisterLoading: MemoizedSelector<Record<string, any>, boolean>;\n selectAuthRegisterErrors: MemoizedSelector<Record<string, any>, DaffStateError[]>;\n}\n\nconst createRegisterSelectors = <T extends DaffAuthToken = DaffAuthToken>() => {\n const selectAuthRegisterState = createSelector(\n getDaffAuthFeatureStateSelector(),\n state => state.register,\n );\n\n const selectAuthRegisterLoading = createSelector(\n selectAuthRegisterState,\n state => state.loading,\n );\n\n const selectAuthRegisterErrors = createSelector(\n selectAuthRegisterState,\n state => state.errors,\n );\n\n return {\n selectAuthRegisterState,\n selectAuthRegisterLoading,\n selectAuthRegisterErrors,\n };\n};\n\nexport const getDaffAuthRegisterSelectors = (() => {\n let cache;\n return <T extends DaffAuthToken = DaffAuthToken>(): DaffAuthRegisterSelectors =>\n cache = cache || createRegisterSelectors<T>();\n})();\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthResetPasswordReducerState } from '../../reducers/public_api';\nimport { getDaffAuthFeatureStateSelector } from '../auth-feature.selector';\n\nexport interface DaffAuthResetPasswordSelectors {\n selectAuthResetPasswordState: MemoizedSelector<Record<string, any>, DaffAuthResetPasswordReducerState>;\n selectAuthResetPasswordLoading: MemoizedSelector<Record<string, any>, boolean>;\n selectAuthResetPasswordErrors: MemoizedSelector<Record<string, any>, DaffStateError[]>;\n selectAuthResetPasswordToken: MemoizedSelector<Record<string, any>, DaffAuthResetPasswordInfo['token']>;\n}\n\nconst createResetPasswordSelectors = (): DaffAuthResetPasswordSelectors => {\n const selectAuthResetPasswordState = createSelector(\n getDaffAuthFeatureStateSelector(),\n state => state.resetPassword,\n );\n\n const selectAuthResetPasswordLoading = createSelector(\n selectAuthResetPasswordState,\n state => state.loading,\n );\n\n const selectAuthResetPasswordErrors = createSelector(\n selectAuthResetPasswordState,\n state => state.errors,\n );\n\n const selectAuthResetPasswordToken = createSelector(\n selectAuthResetPasswordState,\n state => state.token,\n );\n\n return {\n selectAuthResetPasswordState,\n selectAuthResetPasswordLoading,\n selectAuthResetPasswordErrors,\n selectAuthResetPasswordToken,\n };\n};\n\nexport const getDaffAuthResetPasswordSelectors = (() => {\n let cache;\n return (): DaffAuthResetPasswordSelectors =>\n cache = cache || createResetPasswordSelectors();\n})();\n","import { MemoizedSelector } from '@ngrx/store';\n\nimport { DaffAuthFeatureState } from '../reducers/public_api';\nimport { getDaffAuthFeatureStateSelector } from './auth-feature.selector';\nimport {\n getAuthSelectors,\n AuthSelectors,\n} from './auth/auth.selector';\nimport {\n getDaffAuthLoginSelectors,\n DaffAuthLoginSelectors,\n} from './login/login.selector';\nimport {\n getDaffAuthRegisterSelectors,\n DaffAuthRegisterSelectors,\n} from './register/register.selector';\nimport {\n DaffAuthResetPasswordSelectors,\n getDaffAuthResetPasswordSelectors,\n} from './reset-password/selector';\n\nexport interface DaffAuthSelectors extends\n DaffAuthRegisterSelectors,\n DaffAuthLoginSelectors,\n DaffAuthResetPasswordSelectors,\n AuthSelectors {\n selectAuthFeatureState: MemoizedSelector<Record<string, any>, DaffAuthFeatureState>;\n}\n\nexport const getDaffAuthSelectors = (() => {\n let cache;\n return (): DaffAuthSelectors =>\n cache = cache || {\n ...getAuthSelectors(),\n ...getDaffAuthLoginSelectors(),\n ...getDaffAuthRegisterSelectors(),\n ...getDaffAuthResetPasswordSelectors(),\n selectAuthFeatureState: getDaffAuthFeatureStateSelector(),\n };\n})();\n","import { Injectable } from '@angular/core';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffAuthToken } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthFeatureState } from '../../reducers/public_api';\nimport { getDaffAuthSelectors } from '../../selectors/public_api';\nimport { DaffAuthFacadeInterface } from './facade.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthFacade implements DaffAuthFacadeInterface {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n loggedIn$: Observable<boolean>;\n\n constructor(private store: Store<DaffAuthFeatureState>) {\n const {\n selectAuthLoading,\n selectAuthErrors,\n selectAuthLoggedIn,\n } = getDaffAuthSelectors();\n\n this.loading$ = this.store.pipe(select(selectAuthLoading));\n this.errors$ = this.store.pipe(select(selectAuthErrors));\n this.loggedIn$ = this.store.pipe(select(selectAuthLoggedIn));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthFeatureState } from '../../reducers/public_api';\nimport { getDaffAuthSelectors } from '../../selectors/public_api';\nimport { DaffAuthLoginFacadeInterface } from './facade.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthLoginFacade implements DaffAuthLoginFacadeInterface {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n constructor(private store: Store<DaffAuthFeatureState>) {\n const {\n selectAuthLoginLoading,\n selectAuthLoginErrors,\n } = getDaffAuthSelectors();\n\n this.loading$ = this.store.pipe(select(selectAuthLoginLoading));\n this.errors$ = this.store.pipe(select(selectAuthLoginErrors));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthFeatureState } from '../../reducers/public_api';\nimport { getDaffAuthSelectors } from '../../selectors/public_api';\nimport { DaffAuthRegisterFacadeInterface } from './facade.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthRegisterFacade implements DaffAuthRegisterFacadeInterface {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n constructor(private store: Store<DaffAuthFeatureState>) {\n const {\n selectAuthRegisterLoading,\n selectAuthRegisterErrors,\n } = getDaffAuthSelectors();\n\n this.loading$ = this.store.pipe(select(selectAuthRegisterLoading));\n this.errors$ = this.store.pipe(select(selectAuthRegisterErrors));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffAuthFeatureState } from '../../reducers/public_api';\nimport { getDaffAuthSelectors } from '../../selectors/public_api';\nimport { DaffAuthResetPasswordFacadeInterface } from './facade.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthResetPasswordFacade implements DaffAuthResetPasswordFacadeInterface {\n token$: Observable<DaffAuthResetPasswordInfo['token']>;\n\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n constructor(private store: Store<DaffAuthFeatureState>) {\n const {\n selectAuthResetPasswordLoading,\n selectAuthResetPasswordErrors,\n selectAuthResetPasswordToken,\n } = getDaffAuthSelectors();\n\n this.token$ = this.store.pipe(select(selectAuthResetPasswordToken));\n\n this.loading$ = this.store.pipe(select(selectAuthResetPasswordLoading));\n this.errors$ = this.store.pipe(select(selectAuthResetPasswordErrors));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { DaffAuthStateConfig } from './type';\n\nconst TWENTY_MINUTES = 1.2e6;\n\nexport const daffAuthStateDefaultConfig: DaffAuthStateConfig = {\n checkInterval: TWENTY_MINUTES,\n authCompleteRedirectPath: '/',\n logoutRedirectPath: '/',\n};\n","import {\n InjectionToken,\n ValueProvider,\n} from '@angular/core';\n\nimport { daffAuthStateDefaultConfig } from './default';\nimport { DaffAuthStateConfig } from './type';\n\nexport const DAFF_AUTH_STATE_CONFIG = new InjectionToken('DAFF_AUTH_STATE_CONFIG', { factory: () => daffAuthStateDefaultConfig });\n\nexport const provideDaffAuthStateConfig = (config: DaffAuthStateConfig): ValueProvider => ({\n provide: DAFF_AUTH_STATE_CONFIG,\n useValue: config,\n});\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n of,\n Observable,\n EMPTY,\n} from 'rxjs';\nimport {\n switchMap,\n catchError,\n map,\n repeat,\n filter,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DaffAuthStorageService,\n DAFF_AUTH_ERROR_MATCHER,\n} from '@daffodil/auth';\nimport {\n DaffAuthDriver,\n DaffAuthServiceInterface,\n} from '@daffodil/auth/driver';\nimport {\n DaffError,\n DaffServerSideStorageError,\n DaffStorageServiceError,\n} from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\n\nimport {\n DaffAuthActionTypes,\n DaffAuthCheckSuccess,\n DaffAuthCheckFailure,\n DaffAuthCheck,\n DaffAuthGuardCheckCompletion,\n DaffAuthGuardCheck,\n DaffAuthStorageFailure,\n DaffAuthServerSide,\n DaffAuthRevoke,\n} from '../actions/public_api';\nimport {\n DaffAuthStateConfig,\n DAFF_AUTH_STATE_CONFIG,\n} from '../config/public_api';\n\n@Injectable()\nexport class DaffAuthEffects {\n constructor(\n private actions$: Actions,\n @Inject(DaffAuthDriver) private authDriver: DaffAuthServiceInterface,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n private storage: DaffAuthStorageService,\n @Inject(DAFF_AUTH_STATE_CONFIG) private config: DaffAuthStateConfig,\n ) {}\n\n check$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthActionTypes.AuthCheckAction),\n switchMap((action: DaffAuthCheck) =>\n this.authDriver.check().pipe(\n map(() => new DaffAuthCheckSuccess()),\n catchError((error: DaffError) => of(new DaffAuthCheckFailure(this.errorMatcher(error)))),\n ),\n ),\n ));\n\n guardCheck$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthActionTypes.AuthGuardCheckAction),\n switchMap((action: DaffAuthGuardCheck) =>\n this.authDriver.check().pipe(\n map(() => new DaffAuthGuardCheckCompletion(true)),\n catchError((error: DaffError) => of(new DaffAuthGuardCheckCompletion(false))),\n ),\n ),\n ));\n\n removeAuthToken$ = createEffect(() => this.actions$.pipe(\n ofType<DaffAuthCheckFailure | DaffAuthGuardCheckCompletion>(\n DaffAuthActionTypes.AuthGuardCheckCompletionAction,\n DaffAuthActionTypes.AuthCheckFailureAction,\n ),\n filter(action => {\n // don't remove token when guard check completes with true result\n if (action.type === DaffAuthActionTypes.AuthGuardCheckCompletionAction && action.result) {\n return false;\n }\n\n return true;\n }),\n tap(() => {\n this.storage.removeAuthToken();\n }),\n map(() => new DaffAuthRevoke()),\n catchError((error: Error) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(new DaffAuthServerSide(this.errorMatcher(error)));\n\n case error instanceof DaffStorageServiceError:\n default:\n return of(new DaffAuthStorageFailure(this.errorMatcher(error)));\n }\n }),\n ));\n\n // this needs to be defined after `check$` or else the driver call won't be run\n authCheckInterval$ = createEffect(() => of(new DaffAuthCheck()).pipe(\n repeat({ delay: this.config.checkInterval }),\n filter(() => !!this.storage.getAuthToken()),\n catchError((error: Error) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(new DaffAuthServerSide(this.errorMatcher(error)));\n\n case error instanceof DaffStorageServiceError:\n return of(new DaffAuthStorageFailure(this.errorMatcher(error)));\n\n default:\n return EMPTY;\n }\n }),\n ));\n}\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n of,\n Observable,\n EMPTY,\n} from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n DAFF_AUTH_ERROR_MATCHER,\n DaffAuthStorageService,\n} from '@daffodil/auth';\nimport {\n DaffLoginDriver,\n DaffLoginServiceInterface,\n} from '@daffodil/auth/driver';\nimport {\n DaffError,\n DaffServerSideStorageError,\n DaffStorageServiceError,\n} from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\n\nimport {\n DaffAuthLoginActionTypes,\n DaffAuthLogin,\n DaffAuthLoginSuccess,\n DaffAuthLoginFailure,\n DaffAuthLogoutSuccess,\n DaffAuthLogoutFailure,\n DaffAuthLogout,\n DaffAuthStorageFailure,\n DaffAuthComplete,\n DaffAuthServerSide,\n DaffAuthRevoke,\n} from '../actions/public_api';\n\n@Injectable()\nexport class DaffAuthLoginEffects<\n T extends DaffLoginInfo = DaffLoginInfo,\n U extends DaffAuthToken = DaffAuthToken,\n> {\n constructor(\n private actions$: Actions,\n @Inject(DaffLoginDriver) private loginDriver: DaffLoginServiceInterface<T, U>,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n private storage: DaffAuthStorageService,\n ) {}\n\n login$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthLoginActionTypes.LoginAction),\n switchMap((action: DaffAuthLogin<T>) =>\n this.loginDriver.login(action.loginInfo).pipe(\n map((resp) =>\n new DaffAuthLoginSuccess<U>(resp),\n ),\n catchError((error: DaffError) =>\n of(new DaffAuthLoginFailure(this.errorMatcher(error))),\n ),\n ),\n ),\n ));\n\n logout$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthLoginActionTypes.LogoutAction),\n switchMap((action: DaffAuthLogout) =>\n this.loginDriver.logout().pipe(\n map(() => new DaffAuthLogoutSuccess()),\n catchError((error: DaffError) =>\n of(new DaffAuthLogoutFailure(this.errorMatcher(error))),\n ),\n ),\n ),\n ));\n\n removeAuthToken$ = createEffect(() => this.actions$.pipe(\n ofType<DaffAuthLogoutSuccess>(\n DaffAuthLoginActionTypes.LogoutSuccessAction,\n ),\n tap(() => {\n this.storage.removeAuthToken();\n }),\n map(() => new DaffAuthRevoke()),\n catchError((error: Error) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(new DaffAuthServerSide(this.errorMatcher(error)));\n\n case error instanceof DaffStorageServiceError:\n default:\n return of(new DaffAuthStorageFailure(this.errorMatcher(error)));\n }\n }),\n ));\n\n storeAuthToken$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthLoginActionTypes.LoginSuccessAction),\n tap((action: DaffAuthLoginSuccess<U>) => {\n this.storage.setAuthToken(action.auth.token);\n }),\n map(() => new DaffAuthComplete()),\n catchError((error: Error) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(new DaffAuthServerSide(this.errorMatcher(error)));\n\n case error instanceof DaffStorageServiceError:\n default:\n return of(new DaffAuthStorageFailure(this.errorMatcher(error)));\n }\n }),\n ));\n}\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport { EMPTY } from 'rxjs';\nimport {\n switchMap,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DaffAuthActionTypes,\n DaffAuthComplete,\n DaffAuthLoginActionTypes,\n} from '../actions/public_api';\nimport {\n DaffAuthStateConfig,\n DAFF_AUTH_STATE_CONFIG,\n} from '../config/public_api';\n\n/**\n * Redirects the user to certain pages based on certain auth actions.\n */\n@Injectable()\nexport class DaffAuthRedirectEffects {\n constructor(\n private actions$: Actions,\n private router: Router,\n @Inject(DAFF_AUTH_STATE_CONFIG) private config: DaffAuthStateConfig,\n ) {}\n\n redirectAfterLoginOrRegister$ = createEffect(() => this.actions$.pipe(\n ofType<DaffAuthComplete>(DaffAuthActionTypes.AuthCompleteAction),\n tap(() => {\n this.router.navigateByUrl(this.config.authCompleteRedirectPath);\n }),\n switchMap(() => EMPTY),\n ), { dispatch: false });\n\n redirectAfterLogout$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthLoginActionTypes.LogoutSuccessAction),\n tap(() => {\n this.router.navigateByUrl(this.config.logoutRedirectPath);\n }),\n switchMap(() => EMPTY),\n ), { dispatch: false });\n}\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n of,\n Observable,\n iif,\n defer,\n} from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DaffAccountRegistration,\n DaffAuthStorageService,\n DAFF_AUTH_ERROR_MATCHER,\n} from '@daffodil/auth';\nimport {\n DaffRegisterDriver,\n DaffRegisterServiceInterface,\n} from '@daffodil/auth/driver';\nimport {\n DaffError,\n DaffServerSideStorageError,\n DaffStorageServiceError,\n} from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\n\nimport {\n DaffAuthRegisterActionTypes,\n DaffAuthRegister,\n DaffAuthRegisterSuccess,\n DaffAuthRegisterFailure,\n DaffAuthComplete,\n DaffAuthServerSide,\n DaffAuthStorageFailure,\n} from '../actions/public_api';\n\n@Injectable()\nexport class DaffAuthRegisterEffects<\n T extends DaffAccountRegistration = DaffAccountRegistration,\n> {\n constructor(\n private actions$: Actions,\n @Inject(DaffRegisterDriver) private registerDriver: DaffRegisterServiceInterface<T>,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n private storage: DaffAuthStorageService,\n ) {}\n\n register$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthRegisterActionTypes.RegisterAction),\n switchMap((action: DaffAuthRegister<T>) =>\n iif(\n () => action.autoLogin,\n defer(() => this.registerDriver.register(action.registration).pipe(\n tap(token => this.storage.setAuthToken(token)),\n switchMap(() => of(new DaffAuthRegisterSuccess(), new DaffAuthComplete())),\n )),\n defer(() => this.registerDriver.registerOnly(action.registration).pipe(\n map(() => new DaffAuthRegisterSuccess()),\n )),\n ).pipe(\n catchError((error: DaffError) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(\n new DaffAuthServerSide(this.errorMatcher(error)),\n new DaffAuthRegisterFailure(this.errorMatcher(error)),\n );\n\n case error instanceof DaffStorageServiceError:\n return of(\n new DaffAuthStorageFailure(this.errorMatcher(error)),\n new DaffAuthRegisterFailure(this.errorMatcher(error)),\n );\n\n default:\n return of(new DaffAuthRegisterFailure(this.errorMatcher(error)));\n }\n }),\n ),\n ),\n ));\n}\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n of,\n Observable,\n iif,\n defer,\n} from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DAFF_AUTH_ERROR_MATCHER,\n DaffAuthResetPasswordInfo,\n DaffAuthStorageService,\n} from '@daffodil/auth';\nimport {\n DaffResetPasswordDriver,\n DaffResetPasswordServiceInterface,\n} from '@daffodil/auth/driver';\nimport {\n DaffError,\n DaffServerSideStorageError,\n DaffStorageServiceError,\n} from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\n\nimport {\n DaffAuthResetPasswordActionTypes,\n DaffResetPassword,\n DaffResetPasswordSuccess,\n DaffResetPasswordFailure,\n DaffSendResetEmail,\n DaffSendResetEmailSuccess,\n DaffSendResetEmailFailure,\n DaffAuthComplete,\n DaffAuthServerSide,\n DaffAuthStorageFailure,\n} from '../actions/public_api';\n\n@Injectable()\nexport class DaffAuthResetPasswordEffects<\n T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo,\n> {\n constructor(\n private actions$: Actions,\n @Inject(DaffResetPasswordDriver) private driver: DaffResetPasswordServiceInterface<T>,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n private storage: DaffAuthStorageService,\n ) {}\n\n sendResetEmail$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthResetPasswordActionTypes.SendResetEmailAction),\n switchMap((action: DaffSendResetEmail) =>\n this.driver.sendResetEmail(action.email).pipe(\n map(() =>\n new DaffSendResetEmailSuccess(),\n ),\n catchError((error: DaffError) =>\n of(new DaffSendResetEmailFailure(this.errorMatcher(error))),\n ),\n ),\n ),\n ));\n\n resetPassword$ = createEffect(() => this.actions$.pipe(\n ofType(DaffAuthResetPasswordActionTypes.ResetPasswordAction),\n switchMap((action: DaffResetPassword<T>) =>\n iif(\n () => action.autoLogin,\n defer(() => this.driver.resetPassword(action.info).pipe(\n tap(token => this.storage.setAuthToken(token)),\n switchMap(() => of(new DaffResetPasswordSuccess(), new DaffAuthComplete())),\n )),\n defer(() => this.driver.resetPasswordOnly(action.info).pipe(\n map(() => new DaffResetPasswordSuccess()),\n )),\n ).pipe(\n catchError((error: DaffError) => {\n switch (true) {\n case error instanceof DaffServerSideStorageError:\n return of(\n new DaffAuthServerSide(this.errorMatcher(error)),\n new DaffResetPasswordFailure(this.errorMatcher(error)),\n );\n\n case error instanceof DaffStorageServiceError:\n return of(\n new DaffAuthStorageFailure(this.errorMatcher(error)),\n new DaffResetPasswordFailure(this.errorMatcher(error)),\n );\n\n default:\n return of(new DaffResetPasswordFailure(this.errorMatcher(error)));\n }\n }),\n ),\n ),\n ));\n}\n","import {\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\n\nimport {\n DaffAuthStateConfig,\n daffAuthStateDefaultConfig,\n provideDaffAuthStateConfig,\n} from './config/public_api';\nimport { DaffAuthEffects } from './effects/auth.effects';\nimport { DaffAuthLoginEffects } from './effects/login.effects';\nimport { DaffAuthRedirectEffects } from './effects/redirect.effects';\nimport { DaffAuthRegisterEffects } from './effects/register.effects';\nimport { DaffAuthResetPasswordEffects } from './effects/reset-password.effects';\nimport {\n DAFF_AUTH_STORE_FEATURE_KEY,\n daffAuthReducers,\n} from './reducers/public_api';\n\n@NgModule({\n imports: [\n StoreModule.forFeature(DAFF_AUTH_STORE_FEATURE_KEY, daffAuthReducers),\n EffectsModule.forFeature([\n DaffAuthEffects,\n DaffAuthLoginEffects,\n DaffAuthRegisterEffects,\n DaffAuthResetPasswordEffects,\n DaffAuthRedirectEffects,\n ]),\n ],\n})\nexport class DaffAuthStateModule {\n static withConfig(config: Partial<DaffAuthStateConfig> = {}): ModuleWithProviders<DaffAuthStateModule> {\n return {\n ngModule: DaffAuthStateModule,\n providers: [\n provideDaffAuthStateConfig({\n ...daffAuthStateDefaultConfig,\n ...config,\n }),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;IAIY,oBAUX;AAVD,CAAA,UAAY,mBAAmB,EAAA;AAC7B,IAAA,mBAAA,CAAA,sBAAA,CAAA,GAAA,0CAAiE,CAAA;AACjE,IAAA,mBAAA,CAAA,gCAAA,CAAA,GAAA,qDAAsF,CAAA;AACtF,IAAA,mBAAA,CAAA,0BAAA,CAAA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,aAAa,CAAC,UAAU,CAAC;gBACvB,eAAe;gBACf,oBAAoB;gBACpB,uBAAuB;gBACvB,4BAA4B;gBAC5B,uBAAuB;aACxB,CAAC;AACH,SAAA,CAAA,EAAA,CAAA,CAAA;2FAEU,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAZ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;AACP,wBAAA,WAAW,CAAC,UAAU,CAAC,2BAA2B,EAAE,gBAAgB,CAAC;wBACrE,aAAa,CAAC,UAAU,CAAC;4BACvB,eAAe;4BACf,oBAAoB;4BACpB,uBAAuB;4BACvB,4BAA4B;4BAC5B,uBAAuB;yBACxB,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACjCD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daffodil/auth",
3
- "version": "0.48.2",
3
+ "version": "0.50.0",
4
4
  "description": "Reducers, State, Selectors, and Drivers for logging in and registering users.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,12 +18,12 @@
18
18
  "peerDependencies": {
19
19
  "@angular/common": "^13.0.0",
20
20
  "@angular/core": "^13.0.0",
21
- "@daffodil/core": "0.48.2",
21
+ "@daffodil/core": "0.50.0",
22
22
  "@ngrx/store": "^13.0.0",
23
23
  "rxjs": "7.5.5"
24
24
  },
25
25
  "optionalDependencies": {
26
- "@daffodil/driver": "0.48.2"
26
+ "@daffodil/driver": "0.50.0"
27
27
  },
28
28
  "module": "fesm2015/daffodil-auth.mjs",
29
29
  "es2020": "fesm2020/daffodil-auth.mjs",
@@ -8,7 +8,8 @@ export declare enum DaffAuthActionTypes {
8
8
  AuthCheckAction = "[@daffodil/auth] Auth Check Action",
9
9
  AuthCheckSuccessAction = "[@daffodil/auth] Auth Check Success Action",
10
10
  AuthCheckFailureAction = "[@daffodil/auth] Auth Check Failure Action",
11
- AuthCompleteAction = "[@daffodil/auth] Auth Complete Action"
11
+ AuthCompleteAction = "[@daffodil/auth] Auth Complete Action",
12
+ AuthRevokeAction = "[@daffodil/auth] Auth Revoke Action"
12
13
  }
13
14
  /**
14
15
  * An action triggered by guards to initialize an auth check request.
@@ -65,4 +66,11 @@ export declare class DaffAuthCheckFailure implements Action {
65
66
  export declare class DaffAuthComplete implements Action {
66
67
  readonly type = DaffAuthActionTypes.AuthCompleteAction;
67
68
  }
68
- export declare type DaffAuthActions = DaffAuthGuardCheckCompletion | DaffAuthGuardCheck | DaffAuthStorageFailure | DaffAuthServerSide | DaffAuthCheck | DaffAuthCheckSuccess | DaffAuthCheckFailure | DaffAuthComplete;
69
+ /**
70
+ * An action triggered when the user auth token is revoked.
71
+ * The auth token has been removed from storage at this point.
72
+ */
73
+ export declare class DaffAuthRevoke implements Action {
74
+ readonly type = DaffAuthActionTypes.AuthRevokeAction;
75
+ }
76
+ export declare type DaffAuthActions = DaffAuthGuardCheckCompletion | DaffAuthGuardCheck | DaffAuthStorageFailure | DaffAuthServerSide | DaffAuthCheck | DaffAuthCheckSuccess | DaffAuthCheckFailure | DaffAuthComplete | DaffAuthRevoke;
@@ -4,7 +4,7 @@ import * as i0 from "@angular/core";
4
4
  import * as i1 from "@ngrx/store";
5
5
  import * as i2 from "@ngrx/effects";
6
6
  export declare class DaffAuthStateModule {
7
- static withConfig(config: DaffAuthStateConfig): ModuleWithProviders<DaffAuthStateModule>;
7
+ static withConfig(config?: Partial<DaffAuthStateConfig>): ModuleWithProviders<DaffAuthStateModule>;
8
8
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthStateModule, never>;
9
9
  static ɵmod: i0.ɵɵNgModuleDeclaration<DaffAuthStateModule, never, [typeof i1.StoreFeatureModule, typeof i2.EffectsFeatureModule], never>;
10
10
  static ɵinj: i0.ɵɵInjectorDeclaration<DaffAuthStateModule>;