@daffodil/auth 0.88.1 → 0.89.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/driver/in-memory/index.d.ts +84 -1
  2. package/driver/index.d.ts +135 -1
  3. package/driver/magento/index.d.ts +132 -1
  4. package/driver/testing/index.d.ts +49 -1
  5. package/fesm2022/daffodil-auth-driver-in-memory.mjs +19 -19
  6. package/fesm2022/daffodil-auth-driver-in-memory.mjs.map +1 -1
  7. package/fesm2022/daffodil-auth-driver-magento.mjs +22 -22
  8. package/fesm2022/daffodil-auth-driver-magento.mjs.map +1 -1
  9. package/fesm2022/daffodil-auth-driver-testing.mjs +16 -16
  10. package/fesm2022/daffodil-auth-driver-testing.mjs.map +1 -1
  11. package/fesm2022/daffodil-auth-driver.mjs +3 -3
  12. package/fesm2022/daffodil-auth-driver.mjs.map +1 -1
  13. package/fesm2022/daffodil-auth-routing.mjs +20 -20
  14. package/fesm2022/daffodil-auth-routing.mjs.map +1 -1
  15. package/fesm2022/daffodil-auth-state-testing.mjs +16 -16
  16. package/fesm2022/daffodil-auth-state-testing.mjs.map +1 -1
  17. package/fesm2022/daffodil-auth-state.mjs +28 -28
  18. package/fesm2022/daffodil-auth-state.mjs.map +1 -1
  19. package/fesm2022/daffodil-auth-testing.mjs +9 -9
  20. package/fesm2022/daffodil-auth-testing.mjs.map +1 -1
  21. package/fesm2022/daffodil-auth.mjs +3 -3
  22. package/fesm2022/daffodil-auth.mjs.map +1 -1
  23. package/index.d.ts +76 -1
  24. package/package.json +1 -1
  25. package/routing/index.d.ts +104 -1
  26. package/state/index.d.ts +424 -1
  27. package/state/testing/index.d.ts +59 -1
  28. package/testing/index.d.ts +38 -1
  29. package/driver/constants/public_api.d.ts +0 -1
  30. package/driver/constants/unauthenticated-error-codes.d.ts +0 -10
  31. package/driver/errors/authentication-failed.d.ts +0 -6
  32. package/driver/errors/codes.enum.d.ts +0 -6
  33. package/driver/errors/invalid-api-response.d.ts +0 -6
  34. package/driver/errors/map.d.ts +0 -13
  35. package/driver/errors/public_api.d.ts +0 -6
  36. package/driver/errors/registration-failed.d.ts +0 -9
  37. package/driver/errors/unauthorized.d.ts +0 -6
  38. package/driver/in-memory/backend/auth.service.d.ts +0 -24
  39. package/driver/in-memory/collection-name.const.d.ts +0 -1
  40. package/driver/in-memory/drivers/auth/auth.service.d.ts +0 -16
  41. package/driver/in-memory/drivers/auth-driver.module.d.ts +0 -9
  42. package/driver/in-memory/drivers/login/login.service.d.ts +0 -18
  43. package/driver/in-memory/drivers/public_api.d.ts +0 -4
  44. package/driver/in-memory/drivers/register/register.service.d.ts +0 -20
  45. package/driver/in-memory/drivers/reset-password/service.d.ts +0 -21
  46. package/driver/in-memory/models/db-customer.type.d.ts +0 -8
  47. package/driver/in-memory/public_api.d.ts +0 -2
  48. package/driver/interfaces/auth-service.interface.d.ts +0 -8
  49. package/driver/interfaces/login-service.interface.d.ts +0 -15
  50. package/driver/interfaces/public_api.d.ts +0 -4
  51. package/driver/interfaces/register-service.interface.d.ts +0 -18
  52. package/driver/interfaces/reset-password-service.interface.d.ts +0 -17
  53. package/driver/magento/apollo-bearer-token-link-generator.d.ts +0 -16
  54. package/driver/magento/auth-driver.module.d.ts +0 -9
  55. package/driver/magento/auth.service.d.ts +0 -14
  56. package/driver/magento/errors/codes.d.ts +0 -5
  57. package/driver/magento/errors/map.d.ts +0 -2
  58. package/driver/magento/errors/transform.d.ts +0 -1
  59. package/driver/magento/login.service.d.ts +0 -18
  60. package/driver/magento/models/public_api.d.ts +0 -4
  61. package/driver/magento/models/response/auth.d.ts +0 -3
  62. package/driver/magento/models/response/register.type.d.ts +0 -7
  63. package/driver/magento/models/response/reset-password.type.d.ts +0 -3
  64. package/driver/magento/models/response/send-reset-email.type.d.ts +0 -3
  65. package/driver/magento/public_api.d.ts +0 -8
  66. package/driver/magento/queries/check-token.d.ts +0 -1
  67. package/driver/magento/queries/create-customer.d.ts +0 -1
  68. package/driver/magento/queries/generate-token.d.ts +0 -1
  69. package/driver/magento/queries/public_api.d.ts +0 -7
  70. package/driver/magento/queries/reset-password.d.ts +0 -1
  71. package/driver/magento/queries/responses/check-token-response.d.ts +0 -5
  72. package/driver/magento/queries/responses/generate-token-response.d.ts +0 -4
  73. package/driver/magento/queries/responses/public_api.d.ts +0 -3
  74. package/driver/magento/queries/responses/revoke-customer-token-response.d.ts +0 -5
  75. package/driver/magento/queries/revoke-customer-token.d.ts +0 -1
  76. package/driver/magento/queries/send-reset-email.d.ts +0 -1
  77. package/driver/magento/register.service.d.ts +0 -18
  78. package/driver/magento/reset-password.service.d.ts +0 -19
  79. package/driver/magento/transforms/auth-transformer.service.d.ts +0 -16
  80. package/driver/magento/validators/check-token.d.ts +0 -3
  81. package/driver/magento/validators/generate-token.d.ts +0 -3
  82. package/driver/magento/validators/public_api.d.ts +0 -5
  83. package/driver/magento/validators/reset-password.d.ts +0 -3
  84. package/driver/magento/validators/revoke-token.d.ts +0 -3
  85. package/driver/magento/validators/send-reset-email.d.ts +0 -3
  86. package/driver/public_api.d.ts +0 -4
  87. package/driver/services/auth-check.service.d.ts +0 -17
  88. package/driver/services/public_api.d.ts +0 -1
  89. package/driver/testing/drivers/auth/auth.service.d.ts +0 -11
  90. package/driver/testing/drivers/auth-driver.module.d.ts +0 -9
  91. package/driver/testing/drivers/login/login.service.d.ts +0 -16
  92. package/driver/testing/drivers/public_api.d.ts +0 -4
  93. package/driver/testing/drivers/register/register.service.d.ts +0 -16
  94. package/driver/testing/drivers/reset-password/service.d.ts +0 -17
  95. package/driver/testing/public_api.d.ts +0 -1
  96. package/errors/codes.enum.d.ts +0 -3
  97. package/errors/map.d.ts +0 -7
  98. package/errors/missing-token.d.ts +0 -10
  99. package/errors/public_api.d.ts +0 -3
  100. package/models/account-registration.d.ts +0 -15
  101. package/models/auth-token.d.ts +0 -3
  102. package/models/login-info.d.ts +0 -4
  103. package/models/public_api.d.ts +0 -4
  104. package/models/reset-password-info.type.d.ts +0 -14
  105. package/public_api.d.ts +0 -3
  106. package/routing/config/default.d.ts +0 -2
  107. package/routing/config/interface.d.ts +0 -29
  108. package/routing/config/public_api.d.ts +0 -3
  109. package/routing/config/token.d.ts +0 -2
  110. package/routing/effects/redirect.effects.d.ts +0 -18
  111. package/routing/guards/guest-only-guard-redirect.token.d.ts +0 -1
  112. package/routing/guards/guest-only.guard.d.ts +0 -20
  113. package/routing/guards/member-only-guard-redirect.token.d.ts +0 -1
  114. package/routing/guards/member-only.guard.d.ts +0 -20
  115. package/routing/guards/public_api.d.ts +0 -5
  116. package/routing/guards/reset-password.guard.d.ts +0 -13
  117. package/routing/helpers/public_api.d.ts +0 -1
  118. package/routing/helpers/redirect-unauthenticated-hook-factory.d.ts +0 -4
  119. package/routing/module.d.ts +0 -9
  120. package/routing/public_api.d.ts +0 -5
  121. package/routing/redirect.module.d.ts +0 -7
  122. package/state/actions/auth.actions.d.ts +0 -56
  123. package/state/actions/login.actions.d.ts +0 -64
  124. package/state/actions/public_api.d.ts +0 -4
  125. package/state/actions/register.actions.d.ts +0 -40
  126. package/state/actions/reset-password.actions.d.ts +0 -74
  127. package/state/auth-state.module.d.ts +0 -11
  128. package/state/config/default.d.ts +0 -2
  129. package/state/config/public_api.d.ts +0 -3
  130. package/state/config/token.d.ts +0 -2
  131. package/state/config/type.d.ts +0 -7
  132. package/state/effects/auth.effects.d.ts +0 -28
  133. package/state/effects/login.effects.d.ts +0 -17
  134. package/state/effects/register.effects.d.ts +0 -17
  135. package/state/effects/reset-password.effects.d.ts +0 -18
  136. package/state/facades/auth/facade.d.ts +0 -19
  137. package/state/facades/auth/facade.interface.d.ts +0 -11
  138. package/state/facades/auth/public_api.d.ts +0 -2
  139. package/state/facades/login/facade.d.ts +0 -18
  140. package/state/facades/login/facade.interface.d.ts +0 -7
  141. package/state/facades/login/public_api.d.ts +0 -2
  142. package/state/facades/public_api.d.ts +0 -4
  143. package/state/facades/register/facade.d.ts +0 -18
  144. package/state/facades/register/facade.interface.d.ts +0 -7
  145. package/state/facades/register/public_api.d.ts +0 -2
  146. package/state/facades/reset-password/facade.d.ts +0 -20
  147. package/state/facades/reset-password/facade.interface.d.ts +0 -9
  148. package/state/facades/reset-password/public_api.d.ts +0 -2
  149. package/state/injection-tokens/error-matcher.token.d.ts +0 -2
  150. package/state/injection-tokens/public_api.d.ts +0 -2
  151. package/state/injection-tokens/unauthenticated/hook.token.d.ts +0 -2
  152. package/state/injection-tokens/unauthenticated/hook.type.d.ts +0 -9
  153. package/state/injection-tokens/unauthenticated/hooks.token.d.ts +0 -2
  154. package/state/injection-tokens/unauthenticated/public_api.d.ts +0 -2
  155. package/state/public_api.d.ts +0 -7
  156. package/state/reducers/auth/auth-initial-state.d.ts +0 -2
  157. package/state/reducers/auth/auth-reducer-state.interface.d.ts +0 -4
  158. package/state/reducers/auth/auth.reducer.d.ts +0 -3
  159. package/state/reducers/auth/public_api.d.ts +0 -3
  160. package/state/reducers/auth-feature-state.interface.d.ts +0 -14
  161. package/state/reducers/auth-reducers.d.ts +0 -3
  162. package/state/reducers/auth-store-feature-key.d.ts +0 -1
  163. package/state/reducers/login/login-initial-state.d.ts +0 -2
  164. package/state/reducers/login/login-reducer-state.interface.d.ts +0 -2
  165. package/state/reducers/login/login.reducer.d.ts +0 -4
  166. package/state/reducers/login/public_api.d.ts +0 -3
  167. package/state/reducers/public_api.d.ts +0 -8
  168. package/state/reducers/register/public_api.d.ts +0 -3
  169. package/state/reducers/register/register-initial-state.d.ts +0 -2
  170. package/state/reducers/register/register-reducer-state.interface.d.ts +0 -2
  171. package/state/reducers/register/register.reducer.d.ts +0 -4
  172. package/state/reducers/reset-password/initial-state.d.ts +0 -2
  173. package/state/reducers/reset-password/public_api.d.ts +0 -3
  174. package/state/reducers/reset-password/reducer.d.ts +0 -4
  175. package/state/reducers/reset-password/state.interface.d.ts +0 -5
  176. package/state/reducers/token/extra.token.d.ts +0 -3
  177. package/state/reducers/token/public_api.d.ts +0 -1
  178. package/state/reducers/token/reducers.token.d.ts +0 -3
  179. package/state/selectors/auth/auth.selector.d.ts +0 -8
  180. package/state/selectors/auth-all.selector.d.ts +0 -10
  181. package/state/selectors/auth-feature.selector.d.ts +0 -6
  182. package/state/selectors/login/login.selector.d.ts +0 -7
  183. package/state/selectors/public_api.d.ts +0 -5
  184. package/state/selectors/register/register.selector.d.ts +0 -7
  185. package/state/selectors/reset-password/selector.d.ts +0 -9
  186. package/state/testing/auth-testing.module.d.ts +0 -6
  187. package/state/testing/mock-auth-facade.d.ts +0 -16
  188. package/state/testing/mock-login-facade.d.ts +0 -15
  189. package/state/testing/mock-register-facade.d.ts +0 -15
  190. package/state/testing/mock-reset-password-facade.d.ts +0 -16
  191. package/state/testing/public_api.d.ts +0 -5
  192. package/storage/auth-storage.service.d.ts +0 -12
  193. package/testing/factories/account-registration.factory.d.ts +0 -15
  194. package/testing/factories/auth-token.factory.d.ts +0 -11
  195. package/testing/factories/public_api.d.ts +0 -3
  196. package/testing/factories/reset-password-info.factory.d.ts +0 -13
  197. package/testing/public_api.d.ts +0 -1
@@ -1 +1,104 @@
1
- export * from './public_api';
1
+ import { Router, ActivatedRouteSnapshot, ActivatedRoute } from '@angular/router';
2
+ import { Store } from '@ngrx/store';
3
+ import { Observable } from 'rxjs';
4
+ import { DaffAuthStorageService } from '@daffodil/auth';
5
+ import { DaffAuthDriverTokenCheck } from '@daffodil/auth/driver';
6
+ import { ErrorTransformer } from '@daffodil/core/state';
7
+ import * as i0 from '@angular/core';
8
+ import { ModuleWithProviders } from '@angular/core';
9
+ import { DaffAuthFacade, DaffAuthUnauthenticatedHook } from '@daffodil/auth/state';
10
+ import * as i1 from '@ngrx/effects';
11
+
12
+ declare class MemberOnlyGuard {
13
+ private tokenCheck;
14
+ private storage;
15
+ private router;
16
+ private store;
17
+ private errorMatcher;
18
+ private redirectUrl;
19
+ constructor(tokenCheck: DaffAuthDriverTokenCheck, storage: DaffAuthStorageService, router: Router, store: Store, errorMatcher: ErrorTransformer, redirectUrl: string);
20
+ canActivate(): Observable<boolean>;
21
+ private isAuthenticated;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<MemberOnlyGuard, never>;
23
+ static ɵprov: i0.ɵɵInjectableDeclaration<MemberOnlyGuard>;
24
+ }
25
+
26
+ declare class GuestOnlyGuard {
27
+ private tokenCheck;
28
+ private storage;
29
+ private router;
30
+ private store;
31
+ private errorMatcher;
32
+ private redirectUrl;
33
+ constructor(tokenCheck: DaffAuthDriverTokenCheck, storage: DaffAuthStorageService, router: Router, store: Store, errorMatcher: ErrorTransformer, redirectUrl: string);
34
+ canActivate(): Observable<boolean>;
35
+ private isUnauthenticated;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<GuestOnlyGuard, never>;
37
+ static ɵprov: i0.ɵɵInjectableDeclaration<GuestOnlyGuard>;
38
+ }
39
+
40
+ /**
41
+ * An interface for providing `@daffodil/auth/routing` with necessary config values.
42
+ */
43
+ interface DaffAuthRoutingConfig {
44
+ /**
45
+ * The name of the query param to which the reset password token will be set.
46
+ */
47
+ resetPasswordTokenParam: string;
48
+ /**
49
+ * The name of the query param from which the redirect URL will be fetched.
50
+ * Defaults to `redirect`.
51
+ */
52
+ redirectUrlParam: string;
53
+ /**
54
+ * The path to which the user will be redirected when they are logged in and the auth token is stored.
55
+ * Defaults to `'/'`.
56
+ */
57
+ authCompleteRedirectPath: string;
58
+ /**
59
+ * The path to which the user will be redirected when they are logged out.
60
+ * Defaults to `'/'`.
61
+ */
62
+ logoutRedirectPath: string;
63
+ /**
64
+ * The path to which the user will be redirected when their auth token is present but invalid.
65
+ * Defaults to `'/'`.
66
+ */
67
+ tokenExpirationRedirectPath: string;
68
+ }
69
+
70
+ declare const DAFF_AUTH_ROUTING_CONFIG_DEFAULT: DaffAuthRoutingConfig;
71
+
72
+ declare const DAFF_AUTH_ROUTING_CONFIG: i0.InjectionToken<DaffAuthRoutingConfig>;
73
+ declare const provideDaffAuthRoutingConfig: <R extends DaffAuthRoutingConfig = DaffAuthRoutingConfig>(config: Partial<R> | i0.InjectionToken<Partial<R>>) => i0.FactoryProvider;
74
+
75
+ declare class DaffAuthResetPasswordGuard {
76
+ private facade;
77
+ private config;
78
+ constructor(facade: DaffAuthFacade, config: DaffAuthRoutingConfig);
79
+ canActivate(route: ActivatedRouteSnapshot): Observable<boolean>;
80
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthResetPasswordGuard, never>;
81
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffAuthResetPasswordGuard>;
82
+ }
83
+
84
+ declare const DaffAuthGuestOnlyGuardRedirectUrl: i0.InjectionToken<string>;
85
+
86
+ declare const DaffAuthMemberOnlyGuardRedirectUrl: i0.InjectionToken<string>;
87
+
88
+ declare function daffAuthRoutingRedirectUnauthenticatedHookFactory(router: Router, route: ActivatedRoute, config: DaffAuthRoutingConfig): DaffAuthUnauthenticatedHook;
89
+
90
+ declare class DaffAuthRoutingModule {
91
+ static withConfig(config?: Partial<DaffAuthRoutingConfig>): ModuleWithProviders<DaffAuthRoutingModule>;
92
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthRoutingModule, never>;
93
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DaffAuthRoutingModule, never, never, never>;
94
+ static ɵinj: i0.ɵɵInjectorDeclaration<DaffAuthRoutingModule>;
95
+ }
96
+
97
+ declare class DaffAuthRoutingRedirectModule {
98
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthRoutingRedirectModule, never>;
99
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DaffAuthRoutingRedirectModule, never, [typeof i1.EffectsFeatureModule], never>;
100
+ static ɵinj: i0.ɵɵInjectorDeclaration<DaffAuthRoutingRedirectModule>;
101
+ }
102
+
103
+ export { DAFF_AUTH_ROUTING_CONFIG, DAFF_AUTH_ROUTING_CONFIG_DEFAULT, DaffAuthGuestOnlyGuardRedirectUrl, DaffAuthMemberOnlyGuardRedirectUrl, DaffAuthResetPasswordGuard, DaffAuthRoutingModule, DaffAuthRoutingRedirectModule, GuestOnlyGuard, MemberOnlyGuard, daffAuthRoutingRedirectUnauthenticatedHookFactory, provideDaffAuthRoutingConfig };
104
+ export type { DaffAuthRoutingConfig };
package/state/index.d.ts CHANGED
@@ -1 +1,424 @@
1
- export * from './public_api';
1
+ import * as _ngrx_store from '@ngrx/store';
2
+ import { Action, ActionReducer, ActionReducerMap, MemoizedSelector, Store } from '@ngrx/store';
3
+ import * as _daffodil_core_state from '@daffodil/core/state';
4
+ import { DaffStateError, DaffOperationState, DaffOperationStateSelectors, DaffStoreFacade, daffTransformErrorToStateError } from '@daffodil/core/state';
5
+ import { DaffLoginInfo, DaffAuthToken, DaffAccountRegistration, DaffAuthResetPasswordInfo } from '@daffodil/auth';
6
+ import * as i0 from '@angular/core';
7
+ import { ModuleWithProviders } from '@angular/core';
8
+ import { Observable } from 'rxjs';
9
+ import * as i2 from '@ngrx/effects';
10
+
11
+ declare enum DaffAuthActionTypes {
12
+ ResetToUnauthenticatedAction = "[@daffodil/auth] Reset To Unauthenticated Action",
13
+ AuthStorageFailureAction = "[@daffodil/auth] Auth Storage Failure Action",
14
+ AuthGuardLogoutAction = "[@daffodil/auth] Auth Guard Logout Action",
15
+ AuthServerSideAction = "[@daffodil/auth] Auth Server Side Action",
16
+ AuthCheckAction = "[@daffodil/auth] Auth Check Action",
17
+ AuthCheckSuccessAction = "[@daffodil/auth] Auth Check Success Action",
18
+ AuthCheckFailureAction = "[@daffodil/auth] Auth Check Failure Action"
19
+ }
20
+ declare class DaffAuthResetToUnauthenticated implements Action {
21
+ reason: Action['type'];
22
+ readonly type = DaffAuthActionTypes.ResetToUnauthenticatedAction;
23
+ constructor(reason: Action['type']);
24
+ }
25
+ declare class DaffAuthStorageFailure implements Action {
26
+ errorMessage: DaffStateError;
27
+ readonly type = DaffAuthActionTypes.AuthStorageFailureAction;
28
+ constructor(errorMessage: DaffStateError);
29
+ }
30
+ declare class DaffAuthGuardLogout implements Action {
31
+ errorMessage: DaffStateError;
32
+ readonly type = DaffAuthActionTypes.AuthGuardLogoutAction;
33
+ constructor(errorMessage: DaffStateError);
34
+ }
35
+ declare class DaffAuthServerSide implements Action {
36
+ errorMessage: DaffStateError;
37
+ readonly type = DaffAuthActionTypes.AuthServerSideAction;
38
+ constructor(errorMessage: DaffStateError);
39
+ }
40
+ /**
41
+ * An action triggered to initialize an auth check request.
42
+ */
43
+ declare class DaffAuthCheck implements Action {
44
+ readonly type = DaffAuthActionTypes.AuthCheckAction;
45
+ }
46
+ /**
47
+ * An action triggered upon a successful auth check.
48
+ *
49
+ * @param token - the customer access token
50
+ */
51
+ declare class DaffAuthCheckSuccess implements Action {
52
+ readonly type = DaffAuthActionTypes.AuthCheckSuccessAction;
53
+ }
54
+ /**
55
+ * An action triggered upon a failed auth check request.
56
+ *
57
+ * @param errorMessage - an error message
58
+ */
59
+ declare class DaffAuthCheckFailure implements Action {
60
+ errorMessage: DaffStateError;
61
+ readonly type = DaffAuthActionTypes.AuthCheckFailureAction;
62
+ constructor(errorMessage: DaffStateError);
63
+ }
64
+ type DaffAuthActions = DaffAuthResetToUnauthenticated | DaffAuthStorageFailure | DaffAuthGuardLogout | DaffAuthServerSide | DaffAuthCheck | DaffAuthCheckSuccess | DaffAuthCheckFailure;
65
+
66
+ declare enum DaffAuthLoginActionTypes {
67
+ LoginAction = "[@daffodil/auth] Login Action",
68
+ LoginSuccessAction = "[@daffodil/auth] Login Success Action",
69
+ LoginFailureAction = "[@daffodil/auth] Login Failure Action",
70
+ LogoutAction = "[@daffodil/auth] Logout Action",
71
+ LogoutSuccessAction = "[@daffodil/auth] Logout Success Action",
72
+ LogoutFailureAction = "[@daffodil/auth] Logout Failure Action"
73
+ }
74
+ /**
75
+ * An action triggered to initialize a auth login request.
76
+ */
77
+ declare class DaffAuthLogin<T extends DaffLoginInfo = DaffLoginInfo> implements Action {
78
+ loginInfo: T;
79
+ readonly type = DaffAuthLoginActionTypes.LoginAction;
80
+ constructor(loginInfo: T);
81
+ }
82
+ /**
83
+ * An action triggered upon a successful auth login.
84
+ *
85
+ * @param token - the customer access token
86
+ */
87
+ declare class DaffAuthLoginSuccess<T extends DaffAuthToken = DaffAuthToken> implements Action {
88
+ auth: T;
89
+ readonly type = DaffAuthLoginActionTypes.LoginSuccessAction;
90
+ constructor(auth: T);
91
+ }
92
+ /**
93
+ * An action triggered upon a failed auth login request.
94
+ *
95
+ * @param errorMessage - an error message
96
+ */
97
+ declare class DaffAuthLoginFailure implements Action {
98
+ errorMessage: DaffStateError;
99
+ readonly type = DaffAuthLoginActionTypes.LoginFailureAction;
100
+ constructor(errorMessage: DaffStateError);
101
+ }
102
+ /**
103
+ * An action triggered to initialize a logout request.
104
+ */
105
+ declare class DaffAuthLogout implements Action {
106
+ readonly type = DaffAuthLoginActionTypes.LogoutAction;
107
+ }
108
+ /**
109
+ * An action triggered upon a successful logout.
110
+ *
111
+ * @param token - the customer access token
112
+ */
113
+ declare class DaffAuthLogoutSuccess implements Action {
114
+ readonly type = DaffAuthLoginActionTypes.LogoutSuccessAction;
115
+ }
116
+ /**
117
+ * An action triggered upon a failed logout request.
118
+ *
119
+ * @param errorMessage - an error message
120
+ */
121
+ declare class DaffAuthLogoutFailure implements Action {
122
+ errorMessage: DaffStateError;
123
+ readonly type = DaffAuthLoginActionTypes.LogoutFailureAction;
124
+ constructor(errorMessage: DaffStateError);
125
+ }
126
+ type DaffAuthLoginActions<T extends DaffLoginInfo = DaffLoginInfo, U extends DaffAuthToken = DaffAuthToken> = DaffAuthLogin<T> | DaffAuthLoginSuccess<U> | DaffAuthLoginFailure | DaffAuthLogout | DaffAuthLogoutSuccess | DaffAuthLogoutFailure;
127
+
128
+ declare enum DaffAuthRegisterActionTypes {
129
+ RegisterAction = "[@daffodil/auth] Register Action",
130
+ RegisterSuccessAction = "[@daffodil/auth] Register Success Action",
131
+ RegisterFailureAction = "[@daffodil/auth] Register Failure Action"
132
+ }
133
+ /**
134
+ * An action triggered to initialize a auth register request.
135
+ *
136
+ * @param registration
137
+ */
138
+ declare class DaffAuthRegister<T extends DaffAccountRegistration = DaffAccountRegistration> implements Action {
139
+ registration: T;
140
+ autoLogin: boolean;
141
+ readonly type = DaffAuthRegisterActionTypes.RegisterAction;
142
+ constructor(registration: T, autoLogin?: boolean);
143
+ }
144
+ /**
145
+ * An action triggered upon a successful auth register request.
146
+ *
147
+ * @param token - the customer access token
148
+ */
149
+ declare class DaffAuthRegisterSuccess implements Action {
150
+ token?: string;
151
+ readonly type = DaffAuthRegisterActionTypes.RegisterSuccessAction;
152
+ constructor(token?: string);
153
+ }
154
+ /**
155
+ * An action triggered upon a failed auth request.
156
+ *
157
+ * @param errorMessage - an error message
158
+ */
159
+ declare class DaffAuthRegisterFailure implements Action {
160
+ errorMessage: DaffStateError;
161
+ readonly type = DaffAuthRegisterActionTypes.RegisterFailureAction;
162
+ constructor(errorMessage: DaffStateError);
163
+ }
164
+ type DaffAuthRegisterActions<T extends DaffAccountRegistration = DaffAccountRegistration> = DaffAuthRegister<T> | DaffAuthRegisterSuccess | DaffAuthRegisterFailure;
165
+
166
+ declare enum DaffAuthResetPasswordActionTypes {
167
+ SendResetEmailAction = "[@daffodil/auth] Send Reset Email Action",
168
+ SendResetEmailSuccessAction = "[@daffodil/auth] Send Reset Email Success Action",
169
+ SendResetEmailFailureAction = "[@daffodil/auth] Send Reset Email Failure Action",
170
+ ResetPasswordAction = "[@daffodil/auth] Reset Password Action",
171
+ ResetPasswordSuccessAction = "[@daffodil/auth] Reset Password Success Action",
172
+ ResetPasswordFailureAction = "[@daffodil/auth] Reset Password Failure Action",
173
+ ResetPasswordLandingAction = "[@daffodil/auth] Reset Password Landing Action"
174
+ }
175
+ /**
176
+ * An action triggered to send the specified customer an email to reset their password.
177
+ */
178
+ declare class DaffSendResetEmail implements Action {
179
+ email: string;
180
+ readonly type = DaffAuthResetPasswordActionTypes.SendResetEmailAction;
181
+ constructor(email: string);
182
+ }
183
+ /**
184
+ * An action triggered upon a successfully sent reset password email.
185
+ */
186
+ declare class DaffSendResetEmailSuccess implements Action {
187
+ readonly type = DaffAuthResetPasswordActionTypes.SendResetEmailSuccessAction;
188
+ }
189
+ /**
190
+ * An action triggered upon a failure to send the reset password email.
191
+ *
192
+ * @param errorMessage - an error message
193
+ */
194
+ declare class DaffSendResetEmailFailure implements Action {
195
+ errorMessage: DaffStateError;
196
+ readonly type = DaffAuthResetPasswordActionTypes.SendResetEmailFailureAction;
197
+ constructor(errorMessage: DaffStateError);
198
+ }
199
+ /**
200
+ * An action triggered to initialize a logout request.
201
+ */
202
+ declare class DaffResetPassword<T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo> implements Action {
203
+ info: T;
204
+ autoLogin: boolean;
205
+ readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordAction;
206
+ constructor(info: T, autoLogin?: boolean);
207
+ }
208
+ /**
209
+ * An action triggered upon a successful logout.
210
+ */
211
+ declare class DaffResetPasswordSuccess implements Action {
212
+ token?: string;
213
+ readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordSuccessAction;
214
+ constructor(token?: string);
215
+ }
216
+ /**
217
+ * An action triggered upon a failed logout request.
218
+ *
219
+ * @param errorMessage - an error message
220
+ */
221
+ declare class DaffResetPasswordFailure implements Action {
222
+ errorMessage: DaffStateError;
223
+ readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordFailureAction;
224
+ constructor(errorMessage: DaffStateError);
225
+ }
226
+ /**
227
+ * An action triggered upon the user navigating to the reset password page from the link in their email.
228
+ *
229
+ * @param token - The token with which the password can be reset
230
+ */
231
+ declare class DaffResetPasswordLanding implements Action {
232
+ token: DaffAuthResetPasswordInfo['token'];
233
+ readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordLandingAction;
234
+ constructor(token: DaffAuthResetPasswordInfo['token']);
235
+ }
236
+ type DaffAuthResetPasswordActions<T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo> = DaffSendResetEmail | DaffSendResetEmailSuccess | DaffSendResetEmailFailure | DaffResetPassword<T> | DaffResetPasswordSuccess | DaffResetPasswordFailure | DaffResetPasswordLanding;
237
+
238
+ interface DaffAuthReducerState extends DaffOperationState {
239
+ loggedIn: boolean;
240
+ }
241
+
242
+ declare function daffAuthReducer(state: DaffAuthReducerState, action: DaffAuthActions | DaffAuthLoginActions | DaffAuthRegisterSuccess | DaffAuthResetPasswordActions): DaffAuthReducerState;
243
+
244
+ declare const daffAuthInitialState: DaffAuthReducerState;
245
+
246
+ type DaffAuthLoginReducerState = DaffOperationState;
247
+
248
+ declare function daffAuthLoginReducer<T extends DaffLoginInfo, U extends DaffAuthToken>(state: _daffodil_core_state.DaffOperationState, action: DaffAuthLoginActions<T, U>): DaffAuthLoginReducerState;
249
+
250
+ declare const daffAuthLoginInitialState: DaffAuthLoginReducerState;
251
+
252
+ type DaffAuthRegisterReducerState = DaffOperationState;
253
+
254
+ declare function daffAuthRegisterReducer<T extends DaffAccountRegistration>(state: _daffodil_core_state.DaffOperationState, action: DaffAuthRegisterActions<T>): DaffAuthRegisterReducerState;
255
+
256
+ declare const daffAuthRegisterInitialState: DaffAuthRegisterReducerState;
257
+
258
+ interface DaffAuthResetPasswordReducerState extends DaffOperationState {
259
+ token: DaffAuthResetPasswordInfo['token'];
260
+ }
261
+
262
+ declare function daffAuthResetPasswordReducer<T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo>(state: DaffAuthResetPasswordReducerState, action: DaffAuthResetPasswordActions<T>): DaffAuthResetPasswordReducerState;
263
+
264
+ declare const daffAuthResetPasswordInitialState: DaffAuthResetPasswordReducerState;
265
+
266
+ declare const DAFF_AUTH_STORE_FEATURE_KEY = "daffAuth";
267
+
268
+ interface DaffAuthFeatureState {
269
+ auth: DaffAuthReducerState;
270
+ login: DaffAuthLoginReducerState;
271
+ register: DaffAuthRegisterReducerState;
272
+ resetPassword: DaffAuthResetPasswordReducerState;
273
+ }
274
+ interface DaffAuthStateRootSlice {
275
+ [DAFF_AUTH_STORE_FEATURE_KEY]: DaffAuthFeatureState;
276
+ }
277
+
278
+ declare const DAFF_AUTH_EXTRA_REDUCERS: i0.InjectionToken<ActionReducer<DaffAuthFeatureState, _ngrx_store.Action<string>>[]>;
279
+ declare const daffAuthProvideExtraReducers: <R extends ActionReducer<DaffAuthFeatureState, _ngrx_store.Action<string>> = ActionReducer<DaffAuthFeatureState, _ngrx_store.Action<string>>>(...values: R[]) => Array<i0.ValueProvider>;
280
+
281
+ declare const daffAuthReducers: ActionReducerMap<DaffAuthFeatureState>;
282
+
283
+ interface AuthSelectors extends DaffOperationStateSelectors<DaffAuthStateRootSlice, DaffAuthReducerState> {
284
+ selectAuthState: MemoizedSelector<DaffAuthStateRootSlice, DaffAuthReducerState>;
285
+ selectAuthLoggedIn: MemoizedSelector<DaffAuthStateRootSlice, boolean>;
286
+ }
287
+ declare const daffAuthSelectorFactory: () => AuthSelectors;
288
+
289
+ interface DaffAuthLoginSelectors extends DaffOperationStateSelectors<DaffAuthStateRootSlice, DaffAuthLoginReducerState> {
290
+ selectAuthLoginState: MemoizedSelector<DaffAuthStateRootSlice, DaffAuthLoginReducerState>;
291
+ }
292
+ declare const daffAuthLoginSelectorFactory: () => DaffAuthLoginSelectors;
293
+
294
+ interface DaffAuthRegisterSelectors extends DaffOperationStateSelectors<DaffAuthStateRootSlice, DaffAuthRegisterReducerState> {
295
+ selectAuthRegisterState: MemoizedSelector<DaffAuthStateRootSlice, DaffAuthRegisterReducerState>;
296
+ }
297
+ declare const daffAuthRegisterSelectorFactory: () => DaffAuthRegisterSelectors;
298
+
299
+ interface DaffAuthResetPasswordSelectors extends DaffOperationStateSelectors<DaffAuthStateRootSlice, DaffAuthResetPasswordReducerState> {
300
+ selectAuthResetPasswordState: MemoizedSelector<DaffAuthStateRootSlice, DaffAuthResetPasswordReducerState>;
301
+ selectAuthResetPasswordToken: MemoizedSelector<DaffAuthStateRootSlice, DaffAuthResetPasswordInfo['token']>;
302
+ }
303
+ declare const daffAuthResetPasswordSelectorFactory: () => DaffAuthResetPasswordSelectors;
304
+
305
+ interface DaffAuthSelectors extends DaffAuthRegisterSelectors, DaffAuthLoginSelectors, DaffAuthResetPasswordSelectors, AuthSelectors {
306
+ selectAuthFeatureState: MemoizedSelector<Record<string, any>, DaffAuthFeatureState>;
307
+ }
308
+ declare const getDaffAuthSelectors: () => DaffAuthSelectors;
309
+
310
+ interface DaffAuthFacadeInterface extends DaffStoreFacade<Action> {
311
+ loading$: Observable<boolean>;
312
+ errors$: Observable<DaffStateError[]>;
313
+ /**
314
+ * Whether the current user is logged in.
315
+ */
316
+ loggedIn$: Observable<boolean>;
317
+ }
318
+
319
+ /**
320
+ * @inheritdoc
321
+ */
322
+ declare class DaffAuthFacade implements DaffAuthFacadeInterface {
323
+ private store;
324
+ loading$: Observable<boolean>;
325
+ errors$: Observable<DaffStateError[]>;
326
+ loggedIn$: Observable<boolean>;
327
+ constructor(store: Store<DaffAuthStateRootSlice>);
328
+ dispatch(action: Action): void;
329
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthFacade, never>;
330
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffAuthFacade>;
331
+ }
332
+
333
+ interface DaffAuthLoginFacadeInterface extends DaffStoreFacade<Action> {
334
+ loading$: Observable<boolean>;
335
+ errors$: Observable<DaffStateError[]>;
336
+ }
337
+
338
+ /**
339
+ * @inheritdoc
340
+ */
341
+ declare class DaffAuthLoginFacade implements DaffAuthLoginFacadeInterface {
342
+ private store;
343
+ loading$: Observable<boolean>;
344
+ errors$: Observable<DaffStateError[]>;
345
+ constructor(store: Store<DaffAuthStateRootSlice>);
346
+ dispatch(action: Action): void;
347
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthLoginFacade, never>;
348
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffAuthLoginFacade>;
349
+ }
350
+
351
+ interface DaffAuthRegisterFacadeInterface extends DaffStoreFacade<Action> {
352
+ loading$: Observable<boolean>;
353
+ errors$: Observable<DaffStateError[]>;
354
+ }
355
+
356
+ /**
357
+ * @inheritdoc
358
+ */
359
+ declare class DaffAuthRegisterFacade implements DaffAuthRegisterFacadeInterface {
360
+ private store;
361
+ loading$: Observable<boolean>;
362
+ errors$: Observable<DaffStateError[]>;
363
+ constructor(store: Store<DaffAuthStateRootSlice>);
364
+ dispatch(action: Action): void;
365
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthRegisterFacade, never>;
366
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffAuthRegisterFacade>;
367
+ }
368
+
369
+ interface DaffAuthResetPasswordFacadeInterface extends DaffStoreFacade<Action> {
370
+ token$: Observable<DaffAuthResetPasswordInfo['token']>;
371
+ loading$: Observable<boolean>;
372
+ errors$: Observable<DaffStateError[]>;
373
+ }
374
+
375
+ /**
376
+ * @inheritdoc
377
+ */
378
+ declare class DaffAuthResetPasswordFacade implements DaffAuthResetPasswordFacadeInterface {
379
+ private store;
380
+ token$: Observable<DaffAuthResetPasswordInfo['token']>;
381
+ loading$: Observable<boolean>;
382
+ errors$: Observable<DaffStateError[]>;
383
+ constructor(store: Store<DaffAuthStateRootSlice>);
384
+ dispatch(action: Action): void;
385
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthResetPasswordFacade, never>;
386
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffAuthResetPasswordFacade>;
387
+ }
388
+
389
+ interface DaffAuthStateConfig {
390
+ /**
391
+ * How often Daffodil will run the auth check.
392
+ * Defaults to twenty minutes.
393
+ */
394
+ checkInterval: number;
395
+ }
396
+
397
+ declare const daffAuthStateDefaultConfig: DaffAuthStateConfig;
398
+
399
+ declare const DAFF_AUTH_STATE_CONFIG: i0.InjectionToken<DaffAuthStateConfig>;
400
+ declare const provideDaffAuthStateConfig: <R extends DaffAuthStateConfig = DaffAuthStateConfig>(config: Partial<R> | i0.InjectionToken<Partial<R>>) => i0.FactoryProvider;
401
+
402
+ /**
403
+ * A function that is called when the user is unauthenticated.
404
+ * When a logged-in user is unauthenticated, various packages may perform cleanup tasks.
405
+ * These hooks will be called in no particular order before the client driver state is reset.
406
+ * Daffodil will wait for at least one emission from each hook before proceeding.
407
+ */
408
+ type DaffAuthUnauthenticatedHook = (trigger: Action['type']) => Observable<unknown>;
409
+
410
+ declare const DAFF_AUTH_UNAUTHENTICATED_HOOKS: i0.InjectionToken<DaffAuthUnauthenticatedHook[]>;
411
+ declare const daffAuthProvideUnauthenticatedHooks: <R extends DaffAuthUnauthenticatedHook = DaffAuthUnauthenticatedHook>(...values: R[]) => Array<i0.ValueProvider>;
412
+
413
+ declare const DAFF_AUTH_ERROR_MATCHER: i0.InjectionToken<typeof daffTransformErrorToStateError>;
414
+ declare const provideDaffAuthErrorMatcher: <R extends typeof daffTransformErrorToStateError = typeof daffTransformErrorToStateError>(value: R) => i0.ValueProvider;
415
+
416
+ declare class DaffAuthStateModule {
417
+ static withConfig(config?: Partial<DaffAuthStateConfig>): ModuleWithProviders<DaffAuthStateModule>;
418
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthStateModule, never>;
419
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DaffAuthStateModule, never, [typeof _ngrx_store.StoreFeatureModule, typeof i2.EffectsFeatureModule], never>;
420
+ static ɵinj: i0.ɵɵInjectorDeclaration<DaffAuthStateModule>;
421
+ }
422
+
423
+ export { DAFF_AUTH_ERROR_MATCHER, DAFF_AUTH_EXTRA_REDUCERS, DAFF_AUTH_STATE_CONFIG, DAFF_AUTH_STORE_FEATURE_KEY, DAFF_AUTH_UNAUTHENTICATED_HOOKS, DaffAuthActionTypes, DaffAuthCheck, DaffAuthCheckFailure, DaffAuthCheckSuccess, DaffAuthFacade, DaffAuthGuardLogout, DaffAuthLogin, DaffAuthLoginActionTypes, DaffAuthLoginFacade, DaffAuthLoginFailure, DaffAuthLoginSuccess, DaffAuthLogout, DaffAuthLogoutFailure, DaffAuthLogoutSuccess, DaffAuthRegister, DaffAuthRegisterActionTypes, DaffAuthRegisterFacade, DaffAuthRegisterFailure, DaffAuthRegisterSuccess, DaffAuthResetPasswordActionTypes, DaffAuthResetPasswordFacade, DaffAuthResetToUnauthenticated, DaffAuthServerSide, DaffAuthStateModule, DaffAuthStorageFailure, DaffResetPassword, DaffResetPasswordFailure, DaffResetPasswordLanding, DaffResetPasswordSuccess, DaffSendResetEmail, DaffSendResetEmailFailure, DaffSendResetEmailSuccess, daffAuthInitialState, daffAuthLoginInitialState, daffAuthLoginReducer, daffAuthLoginSelectorFactory, daffAuthProvideExtraReducers, daffAuthProvideUnauthenticatedHooks, daffAuthReducer, daffAuthReducers, daffAuthRegisterInitialState, daffAuthRegisterReducer, daffAuthRegisterSelectorFactory, daffAuthResetPasswordInitialState, daffAuthResetPasswordReducer, daffAuthResetPasswordSelectorFactory, daffAuthSelectorFactory, daffAuthStateDefaultConfig, getDaffAuthSelectors, provideDaffAuthErrorMatcher, provideDaffAuthStateConfig };
424
+ export type { AuthSelectors, DaffAuthActions, DaffAuthFacadeInterface, DaffAuthFeatureState, DaffAuthLoginActions, DaffAuthLoginFacadeInterface, DaffAuthLoginReducerState, DaffAuthLoginSelectors, DaffAuthReducerState, DaffAuthRegisterActions, DaffAuthRegisterFacadeInterface, DaffAuthRegisterReducerState, DaffAuthRegisterSelectors, DaffAuthResetPasswordActions, DaffAuthResetPasswordFacadeInterface, DaffAuthResetPasswordReducerState, DaffAuthResetPasswordSelectors, DaffAuthSelectors, DaffAuthStateConfig, DaffAuthStateRootSlice, DaffAuthUnauthenticatedHook };
@@ -1 +1,59 @@
1
- export * from './public_api';
1
+ import * as i0 from '@angular/core';
2
+ import { Action } from '@ngrx/store';
3
+ import { BehaviorSubject } from 'rxjs';
4
+ import { DaffAuthFacadeInterface, DaffAuthLoginFacadeInterface, DaffAuthRegisterFacadeInterface, DaffAuthResetPasswordFacadeInterface } from '@daffodil/auth/state';
5
+ import { DaffStateError } from '@daffodil/core/state';
6
+
7
+ declare class DaffAuthStateTestingModule {
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthStateTestingModule, never>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DaffAuthStateTestingModule, never, never, never>;
10
+ static ɵinj: i0.ɵɵInjectorDeclaration<DaffAuthStateTestingModule>;
11
+ }
12
+
13
+ /**
14
+ * @inheritdoc
15
+ */
16
+ declare class MockDaffAuthFacade implements DaffAuthFacadeInterface {
17
+ loading$: BehaviorSubject<boolean>;
18
+ errors$: BehaviorSubject<DaffStateError[]>;
19
+ loggedIn$: BehaviorSubject<boolean>;
20
+ dispatch(action: Action): void;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffAuthFacade, never>;
22
+ static ɵprov: i0.ɵɵInjectableDeclaration<MockDaffAuthFacade>;
23
+ }
24
+
25
+ /**
26
+ * @inheritdoc
27
+ */
28
+ declare class MockDaffAuthLoginFacade implements DaffAuthLoginFacadeInterface {
29
+ loading$: BehaviorSubject<boolean>;
30
+ errors$: BehaviorSubject<DaffStateError[]>;
31
+ dispatch(action: Action): void;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffAuthLoginFacade, never>;
33
+ static ɵprov: i0.ɵɵInjectableDeclaration<MockDaffAuthLoginFacade>;
34
+ }
35
+
36
+ /**
37
+ * @inheritdoc
38
+ */
39
+ declare class MockDaffAuthRegisterFacade implements DaffAuthRegisterFacadeInterface {
40
+ loading$: BehaviorSubject<boolean>;
41
+ errors$: BehaviorSubject<DaffStateError[]>;
42
+ dispatch(action: Action): void;
43
+ static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffAuthRegisterFacade, never>;
44
+ static ɵprov: i0.ɵɵInjectableDeclaration<MockDaffAuthRegisterFacade>;
45
+ }
46
+
47
+ /**
48
+ * @inheritdoc
49
+ */
50
+ declare class MockDaffAuthResetPasswordFacade implements DaffAuthResetPasswordFacadeInterface {
51
+ token$: BehaviorSubject<string>;
52
+ loading$: BehaviorSubject<boolean>;
53
+ errors$: BehaviorSubject<DaffStateError[]>;
54
+ dispatch(action: Action): void;
55
+ static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffAuthResetPasswordFacade, never>;
56
+ static ɵprov: i0.ɵɵInjectableDeclaration<MockDaffAuthResetPasswordFacade>;
57
+ }
58
+
59
+ export { DaffAuthStateTestingModule, MockDaffAuthFacade, MockDaffAuthLoginFacade, MockDaffAuthRegisterFacade, MockDaffAuthResetPasswordFacade };
@@ -1 +1,38 @@
1
- export * from './public_api';
1
+ import { DaffAccountRegistration, DaffAuthToken, DaffAuthResetPasswordInfo } from '@daffodil/auth';
2
+ import { DaffModelFactory } from '@daffodil/core/testing';
3
+ import * as i0 from '@angular/core';
4
+
5
+ declare class MockAccountRegistration implements DaffAccountRegistration {
6
+ email: string;
7
+ password: string;
8
+ subscribe: boolean;
9
+ firstName: string;
10
+ lastName: string;
11
+ }
12
+ declare class DaffAccountRegistrationFactory extends DaffModelFactory<DaffAccountRegistration> {
13
+ constructor();
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffAccountRegistrationFactory, never>;
15
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffAccountRegistrationFactory>;
16
+ }
17
+
18
+ declare class MockAuthToken implements DaffAuthToken {
19
+ token: string;
20
+ }
21
+ declare class DaffAuthTokenFactory extends DaffModelFactory<DaffAuthToken> {
22
+ constructor();
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthTokenFactory, never>;
24
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffAuthTokenFactory>;
25
+ }
26
+
27
+ declare class MockAuthResetPasswordInfo implements DaffAuthResetPasswordInfo {
28
+ email: string;
29
+ password: string;
30
+ token: string;
31
+ }
32
+ declare class DaffAuthResetPasswordInfoFactory extends DaffModelFactory<DaffAuthResetPasswordInfo> {
33
+ constructor();
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<DaffAuthResetPasswordInfoFactory, never>;
35
+ static ɵprov: i0.ɵɵInjectableDeclaration<DaffAuthResetPasswordInfoFactory>;
36
+ }
37
+
38
+ export { DaffAccountRegistrationFactory, DaffAuthResetPasswordInfoFactory, DaffAuthTokenFactory, MockAccountRegistration, MockAuthResetPasswordInfo, MockAuthToken };
@@ -1 +0,0 @@
1
- export * from './unauthenticated-error-codes';
@@ -1,10 +0,0 @@
1
- /**
2
- * The error codes that indicate that the user definitely should not be in an unauthenticated state
3
- * and if an auth token exists in storage, it is invalid.
4
- * These are contrasted to network failures and other sporadic and generic errors that aren't
5
- * a guarantee of the token's invalidity.
6
- */
7
- export declare const DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES: {
8
- DAFF_AUTH_UNAUTHORIZED: boolean;
9
- DAFF_AUTH_AUTHENTICATION_FAILED: boolean;
10
- };
@@ -1,6 +0,0 @@
1
- import { DaffError, DaffInheritableError } from '@daffodil/core';
2
- export declare class DaffAuthenticationFailedError extends DaffInheritableError implements DaffError {
3
- message: string;
4
- readonly code: string;
5
- constructor(message: string);
6
- }
@@ -1,6 +0,0 @@
1
- export declare enum DaffAuthDriverErrorCodes {
2
- AUTHENTICATION_FAILED = "DAFF_AUTH_AUTHENTICATION_FAILED",
3
- INVALID_API_RESPONSE = "DAFF_AUTH_INVALID_API_RESPONSE",
4
- REGISTRATION_FAILED = "DAFF_AUTH_REGISTRATION_FAILED",
5
- UNAUTHORIZED = "DAFF_AUTH_UNAUTHORIZED"
6
- }
@@ -1,6 +0,0 @@
1
- import { DaffError, DaffInheritableError } from '@daffodil/core';
2
- export declare class DaffAuthInvalidAPIResponseError extends DaffInheritableError implements DaffError {
3
- message: string;
4
- readonly code: string;
5
- constructor(message: string);
6
- }