@genesislcap/foundation-auth 14.136.0 → 14.137.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 (120) hide show
  1. package/README.md +6 -33
  2. package/dist/dts/config/config.d.ts.map +1 -1
  3. package/dist/dts/entity/loginAck.d.ts +20 -25
  4. package/dist/dts/entity/loginAck.d.ts.map +1 -1
  5. package/dist/dts/machine/machine.d.ts +2 -2
  6. package/dist/dts/machine/machine.d.ts.map +1 -1
  7. package/dist/dts/machine/types.d.ts +1 -1
  8. package/dist/dts/machine/types.d.ts.map +1 -1
  9. package/dist/dts/routes/base.d.ts +13 -7
  10. package/dist/dts/routes/base.d.ts.map +1 -1
  11. package/dist/dts/routes/config.d.ts +1 -1
  12. package/dist/dts/routes/config.d.ts.map +1 -1
  13. package/dist/dts/routes/protected/protected.d.ts +2 -0
  14. package/dist/dts/routes/protected/protected.d.ts.map +1 -1
  15. package/dist/dts/routes/protected/protected.template.d.ts.map +1 -1
  16. package/dist/dts/user/index.d.ts +5 -2
  17. package/dist/dts/user/index.d.ts.map +1 -1
  18. package/dist/esm/config/config.js +1 -1
  19. package/dist/esm/machine/machine.js +2 -2
  20. package/dist/esm/routes/base.js +1 -1
  21. package/dist/esm/routes/config.js +1 -1
  22. package/dist/esm/routes/protected/protected.js +11 -1
  23. package/dist/esm/routes/protected/protected.template.js +8 -0
  24. package/dist/esm/user/index.js +5 -2
  25. package/dist/foundation-auth.api.json +2704 -5197
  26. package/dist/foundation-auth.d.ts +42 -287
  27. package/docs/api/foundation-auth.authmachinecontext.md +1 -1
  28. package/docs/api/foundation-auth.defaultauthmachine._constructor_.md +1 -1
  29. package/docs/api/foundation-auth.details.md +6 -13
  30. package/docs/api/foundation-auth.getauthmachine.md +1 -1
  31. package/docs/api/foundation-auth.loginack.md +2 -16
  32. package/docs/api/foundation-auth.md +0 -9
  33. package/docs/api/foundation-auth.product.md +6 -8
  34. package/docs/api/foundation-auth.system.md +6 -7
  35. package/docs/api-report.md +29 -218
  36. package/package.json +13 -12
  37. package/dist/dts/user/config.d.ts +0 -29
  38. package/dist/dts/user/config.d.ts.map +0 -1
  39. package/dist/dts/user/user.d.ts +0 -233
  40. package/dist/dts/user/user.d.ts.map +0 -1
  41. package/dist/esm/user/config.js +0 -17
  42. package/dist/esm/user/user.js +0 -200
  43. package/docs/api/foundation-auth.defaultuser.actionhistory.md +0 -13
  44. package/docs/api/foundation-auth.defaultuser.addauthenticationchangelistener.md +0 -22
  45. package/docs/api/foundation-auth.defaultuser.clearactions.md +0 -17
  46. package/docs/api/foundation-auth.defaultuser.clearpaths.md +0 -17
  47. package/docs/api/foundation-auth.defaultuser.cleartrackinghistory.md +0 -16
  48. package/docs/api/foundation-auth.defaultuser.details.md +0 -12
  49. package/docs/api/foundation-auth.defaultuser.haspermission.md +0 -22
  50. package/docs/api/foundation-auth.defaultuser.hasprofile.md +0 -22
  51. package/docs/api/foundation-auth.defaultuser.isadmin.md +0 -16
  52. package/docs/api/foundation-auth.defaultuser.isanonymous.md +0 -12
  53. package/docs/api/foundation-auth.defaultuser.isauthenticated.md +0 -12
  54. package/docs/api/foundation-auth.defaultuser.isbanned.md +0 -16
  55. package/docs/api/foundation-auth.defaultuser.lastaction.md +0 -17
  56. package/docs/api/foundation-auth.defaultuser.lastpath.md +0 -19
  57. package/docs/api/foundation-auth.defaultuser.md +0 -50
  58. package/docs/api/foundation-auth.defaultuser.pathhistory.md +0 -13
  59. package/docs/api/foundation-auth.defaultuser.permission.md +0 -12
  60. package/docs/api/foundation-auth.defaultuser.profile.md +0 -12
  61. package/docs/api/foundation-auth.defaultuser.set.md +0 -22
  62. package/docs/api/foundation-auth.defaultuser.sourceref.md +0 -12
  63. package/docs/api/foundation-auth.defaultuser.trackaction.md +0 -24
  64. package/docs/api/foundation-auth.defaultuser.trackpath.md +0 -17
  65. package/docs/api/foundation-auth.defaultuser.unset.md +0 -16
  66. package/docs/api/foundation-auth.defaultuser.userkvs.md +0 -14
  67. package/docs/api/foundation-auth.defaultuser.username.md +0 -12
  68. package/docs/api/foundation-auth.defaultuserconfig.md +0 -13
  69. package/docs/api/foundation-auth.details.daystopasswordexpiry.md +0 -11
  70. package/docs/api/foundation-auth.details.failedloginattempts.md +0 -11
  71. package/docs/api/foundation-auth.details.heartbeatintervalsecs.md +0 -11
  72. package/docs/api/foundation-auth.details.lastlogindatetime.md +0 -11
  73. package/docs/api/foundation-auth.details.product.md +0 -11
  74. package/docs/api/foundation-auth.details.rejectedloginattempts.md +0 -11
  75. package/docs/api/foundation-auth.details.system.md +0 -11
  76. package/docs/api/foundation-auth.getuser.md +0 -30
  77. package/docs/api/foundation-auth.loginack.details.md +0 -11
  78. package/docs/api/foundation-auth.loginack.permission.md +0 -11
  79. package/docs/api/foundation-auth.loginack.profile.md +0 -11
  80. package/docs/api/foundation-auth.loginack.updatequeue.md +0 -11
  81. package/docs/api/foundation-auth.loginack.userkvs.md +0 -13
  82. package/docs/api/foundation-auth.loginack.username.md +0 -11
  83. package/docs/api/foundation-auth.loginack.zeromqproxyinboundport.md +0 -11
  84. package/docs/api/foundation-auth.loginack.zeromqproxymodeenabled.md +0 -11
  85. package/docs/api/foundation-auth.loginack.zeromqproxyoutboundport.md +0 -11
  86. package/docs/api/foundation-auth.product.name.md +0 -11
  87. package/docs/api/foundation-auth.product.version.md +0 -11
  88. package/docs/api/foundation-auth.system.date.md +0 -11
  89. package/docs/api/foundation-auth.user.addauthenticationchangelistener.md +0 -33
  90. package/docs/api/foundation-auth.user.cleartrackinghistory.md +0 -15
  91. package/docs/api/foundation-auth.user.details.md +0 -11
  92. package/docs/api/foundation-auth.user.haspermission.md +0 -22
  93. package/docs/api/foundation-auth.user.hasprofile.md +0 -22
  94. package/docs/api/foundation-auth.user.isadmin.md +0 -15
  95. package/docs/api/foundation-auth.user.isanonymous.md +0 -11
  96. package/docs/api/foundation-auth.user.isauthenticated.md +0 -11
  97. package/docs/api/foundation-auth.user.isbanned.md +0 -15
  98. package/docs/api/foundation-auth.user.md +0 -55
  99. package/docs/api/foundation-auth.user.permission.md +0 -11
  100. package/docs/api/foundation-auth.user.profile.md +0 -11
  101. package/docs/api/foundation-auth.user.set.md +0 -22
  102. package/docs/api/foundation-auth.user.sourceref.md +0 -11
  103. package/docs/api/foundation-auth.user.unset.md +0 -15
  104. package/docs/api/foundation-auth.user.userkvs.md +0 -13
  105. package/docs/api/foundation-auth.user.username.md +0 -11
  106. package/docs/api/foundation-auth.useractionhistory.actionhistory.md +0 -13
  107. package/docs/api/foundation-auth.useractionhistory.clearactions.md +0 -17
  108. package/docs/api/foundation-auth.useractionhistory.lastaction.md +0 -17
  109. package/docs/api/foundation-auth.useractionhistory.md +0 -32
  110. package/docs/api/foundation-auth.useractionhistory.trackaction.md +0 -24
  111. package/docs/api/foundation-auth.userauthenticationchangeevent.md +0 -18
  112. package/docs/api/foundation-auth.userauthenticationchangetype.md +0 -13
  113. package/docs/api/foundation-auth.userconfig.md +0 -21
  114. package/docs/api/foundation-auth.userconfig.trackactionexclusions.md +0 -13
  115. package/docs/api/foundation-auth.userconfig.trackpathexclusions.md +0 -13
  116. package/docs/api/foundation-auth.userpathhistory.clearpaths.md +0 -17
  117. package/docs/api/foundation-auth.userpathhistory.lastpath.md +0 -19
  118. package/docs/api/foundation-auth.userpathhistory.md +0 -32
  119. package/docs/api/foundation-auth.userpathhistory.pathhistory.md +0 -13
  120. package/docs/api/foundation-auth.userpathhistory.trackpath.md +0 -17
@@ -12,6 +12,8 @@ import { ComposableStyles } from '@microsoft/fast-element';
12
12
  import { Constructable } from '@microsoft/fast-element';
13
13
  import { Container } from '@microsoft/fast-foundation';
14
14
  import { Controller } from '@microsoft/fast-element';
15
+ import { DefaultUser } from '@genesislcap/foundation-user';
16
+ import { defaultUserConfig } from '@genesislcap/foundation-user';
15
17
  import { DoneInvokeEvent } from 'xstate';
16
18
  import { ElementStyles } from '@microsoft/fast-element';
17
19
  import { EmitOptions } from '@genesislcap/foundation-events';
@@ -20,23 +22,32 @@ import type { ErrorEvent as ErrorEvent_2 } from 'xstate';
20
22
  import { EventObject } from 'xstate';
21
23
  import { FetchMachine } from '@genesislcap/foundation-state-machine';
22
24
  import { FetchMachineEvent } from '@genesislcap/foundation-state-machine';
25
+ import { getUser } from '@genesislcap/foundation-user';
23
26
  import { InterfaceSymbol } from '@microsoft/fast-foundation';
24
27
  import type { InterpreterOptions } from 'xstate';
25
- import { Listener } from '@genesislcap/foundation-utils';
26
28
  import { Logger } from '@genesislcap/foundation-logger';
27
29
  import { Machine } from '@genesislcap/foundation-state-machine';
28
30
  import type { MachineContext } from '@genesislcap/foundation-state-machine';
29
31
  import { MachineContext as MachineContext_2 } from 'xstate';
30
- import { Observer } from '@genesislcap/foundation-utils';
31
32
  import { ParameterizedObject } from 'xstate';
32
33
  import { PartialFASTElementDefinition } from '@microsoft/fast-element';
33
34
  import { PropertyAssigner } from 'xstate';
34
35
  import { RouterConfiguration } from '@microsoft/fast-router';
36
+ import type { SetUserProperties } from '@genesislcap/foundation-user';
35
37
  import { Store } from '@genesislcap/foundation-store';
36
38
  import { StoreRoot } from '@genesislcap/foundation-store';
37
39
  import { StoreRootEventDetailMap } from '@genesislcap/foundation-store';
38
40
  import { SyntheticViewTemplate } from '@microsoft/fast-element';
39
41
  import { TemplateElementDependency } from '@genesislcap/foundation-ui';
42
+ import { User } from '@genesislcap/foundation-user';
43
+ import { UserActionHistory } from '@genesislcap/foundation-user';
44
+ import { UserAuthenticationChangeEvent } from '@genesislcap/foundation-user';
45
+ import { UserAuthenticationChangeType } from '@genesislcap/foundation-user';
46
+ import { UserConfig } from '@genesislcap/foundation-user';
47
+ import type { UserDetailsProductProperty } from '@genesislcap/foundation-user';
48
+ import type { UserDetailsProperty } from '@genesislcap/foundation-user';
49
+ import type { UserDetailsSystemProperty } from '@genesislcap/foundation-user';
50
+ import { UserPathHistory } from '@genesislcap/foundation-user';
40
51
  import { UUID } from '@genesislcap/foundation-utils';
41
52
  import { ViewTemplate } from '@microsoft/fast-element';
42
53
 
@@ -1083,92 +1094,19 @@ export declare class DefaultPasswordManagementMapper implements PasswordManageme
1083
1094
  toDTO: (entity: PasswordManagementEntity) => PasswordManagementDTO;
1084
1095
  }
1085
1096
 
1086
- /**
1087
- * Default User implementation.
1088
- * @public
1089
- */
1090
- export declare class DefaultUser implements User {
1091
- /** @internal */
1092
- protected config: UserConfig;
1093
- /** {@inheritDoc UserPathHistory.pathHistory} */
1094
- pathHistory: string[];
1095
- /** {@inheritDoc UserActionHistory.actionHistory} */
1096
- actionHistory: unknown[];
1097
- /** {@inheritDoc User.isAuthenticated} */
1098
- isAuthenticated: boolean;
1099
- /** {@inheritDoc User.userKVs} */
1100
- userKVs: {
1101
- [key: string]: any;
1102
- };
1103
- /** {@inheritDoc User.details} */
1104
- details: Details;
1105
- /** {@inheritDoc User.permission} */
1106
- permission: string[];
1107
- /** {@inheritDoc User.profile} */
1108
- profile: string[];
1109
- /** {@inheritDoc User.sourceRef} */
1110
- sourceRef: string;
1111
- /** {@inheritDoc User.userName} */
1112
- userName: string;
1113
- /** {@inheritDoc User.set} */
1114
- set(entity: Partial<LoginAck>): this;
1115
- /** {@inheritDoc User.unset} */
1116
- unset(): this;
1117
- /** @internal */
1118
- protected userNameChanged(): void;
1119
- /** {@inheritDoc User.username} */
1120
- get username(): string;
1121
- /** {@inheritDoc User.isAnonymous} */
1122
- get isAnonymous(): boolean;
1123
- /** {@inheritDoc User.isAdmin} */
1124
- isAdmin(): boolean;
1125
- /** {@inheritDoc User.isBanned} */
1126
- isBanned(): boolean;
1127
- /** {@inheritDoc User.hasPermission} */
1128
- hasPermission(permission: string | string[]): boolean;
1129
- /** {@inheritDoc User.hasProfile} */
1130
- hasProfile(profile: string | string[]): boolean;
1131
- /** {@inheritDoc UserPathHistory.trackPath} */
1132
- trackPath(): string;
1133
- /** {@inheritDoc UserPathHistory.clearPaths} */
1134
- clearPaths(): void;
1135
- /** {@inheritDoc UserPathHistory.lastPath} */
1136
- lastPath(): string;
1137
- /** {@inheritDoc UserActionHistory.trackAction} */
1138
- trackAction<TDetails = unknown>(details: TDetails): void;
1139
- /** {@inheritDoc UserActionHistory.clearActions} */
1140
- clearActions(): void;
1141
- /** {@inheritDoc UserActionHistory.lastAction} */
1142
- lastAction(): unknown;
1143
- /** {@inheritDoc User.clearTrackingHistory} */
1144
- clearTrackingHistory(): void;
1145
- /** @internal */
1146
- protected hasKey(keys: string[], key: string | string[]): boolean;
1147
- /** @internal */
1148
- protected authenticationChangeListeners: Observer<UserAuthenticationChangeEvent>;
1149
- /** {@inheritDoc User.addAuthenticationChangeListener} */
1150
- addAuthenticationChangeListener(listener: Listener<UserAuthenticationChangeEvent>): () => void;
1151
- /** @internal */
1152
- protected isAuthenticatedChanged(): void;
1153
- }
1097
+ export { DefaultUser }
1154
1098
 
1155
- /**
1156
- * Default UserConfig DI implementation.
1157
- * @public
1158
- */
1159
- export declare const defaultUserConfig: UserConfig;
1099
+ export { defaultUserConfig }
1160
1100
 
1161
1101
  /**
1102
+ * @privateRemarks
1103
+ * Export retained for backwards compatibility.
1104
+ *
1105
+ * @deprecated - Use {@link @genesislcap/foundation-user#UserDetailsProperty} instead.
1106
+ *
1162
1107
  * @public
1163
1108
  */
1164
- export declare interface Details {
1165
- readonly system: System | null;
1166
- readonly heartbeatIntervalSecs: number;
1167
- readonly failedLoginAttempts: number;
1168
- readonly rejectedLoginAttempts: number;
1169
- readonly lastLoginDatetime: number;
1170
- readonly daysToPasswordExpiry: number;
1171
- readonly product: Product[];
1109
+ export declare interface Details extends UserDetailsProperty {
1172
1110
  }
1173
1111
 
1174
1112
  /**
@@ -1797,7 +1735,7 @@ export declare const fromIDPDTO: (dto: IDENTITY_PROVIDER) => IdentityProvider;
1797
1735
  * @example
1798
1736
  * ```ts
1799
1737
  * import { getAuthMachine } from '@genesislcap/foundation-auth/machine';
1800
- * import { getUser, UserAuthenticationChangeEvent } from '@genesislcap/foundation-auth/user';
1738
+ * import { getUser, UserAuthenticationChangeEvent } from '@genesislcap/foundation-user';
1801
1739
  * ...
1802
1740
  * private authMachine = getAuthMachine();
1803
1741
  * ...
@@ -1861,22 +1799,7 @@ export declare const getNormalisedText: (arr: NackErrorWarning[]) => string;
1861
1799
  */
1862
1800
  export declare function getRoutePath(route: AuthRoutes | string, hostPath?: string): string;
1863
1801
 
1864
- /**
1865
- * Gets User from the DI container.
1866
- *
1867
- * @remarks
1868
- * A utility method for host applications that are not using decorators or the DI container.
1869
- *
1870
- * @example
1871
- * ```ts
1872
- * import { getUser, User } from '@genesislcap/foundation-auth/user';
1873
- * ...
1874
- * private user: User = getUser();
1875
- * ```
1876
- *
1877
- * @public
1878
- */
1879
- export declare function getUser(): User;
1802
+ export { getUser }
1880
1803
 
1881
1804
  /**
1882
1805
  * hasDTOErrorWarningCode
@@ -2117,18 +2040,7 @@ export declare let LOGIN_URL: string;
2117
2040
  /**
2118
2041
  * @public
2119
2042
  */
2120
- export declare interface LoginAck extends Ack {
2121
- readonly userName: string;
2122
- readonly updateQueue: string;
2123
- readonly zeroMqProxyModeEnabled: boolean;
2124
- readonly zeroMqProxyInboundPort: number;
2125
- readonly zeroMqProxyOutboundPort: number;
2126
- readonly userKVs: {
2127
- [key: string]: any;
2128
- };
2129
- readonly details: Details;
2130
- readonly permission: string[];
2131
- readonly profile: string[];
2043
+ export declare interface LoginAck extends SetUserProperties, Ack {
2132
2044
  }
2133
2045
 
2134
2046
  /**
@@ -2455,11 +2367,14 @@ export declare interface PasswordManagementMapper extends Mapper<PasswordManagem
2455
2367
  export declare const PasswordManagementMapper: InterfaceSymbol<PasswordManagementMapper>;
2456
2368
 
2457
2369
  /**
2370
+ * @privateRemarks
2371
+ * Export retained for backwards compatibility.
2372
+ *
2373
+ * @deprecated - Use {@link @genesislcap/foundation-user#UserDetailsProductProperty} instead.
2374
+ *
2458
2375
  * @public
2459
2376
  */
2460
- export declare interface Product {
2461
- readonly name: string;
2462
- readonly version: string;
2377
+ export declare interface Product extends UserDetailsProductProperty {
2463
2378
  }
2464
2379
 
2465
2380
  /**
@@ -2562,10 +2477,14 @@ export declare type SSOCredentials = {
2562
2477
  export declare const styles: ElementStyles;
2563
2478
 
2564
2479
  /**
2480
+ * @privateRemarks
2481
+ * Export retained for backwards compatibility.
2482
+ *
2483
+ * @deprecated - Use {@link @genesislcap/foundation-user#UserDetailsSystemProperty} instead.
2484
+ *
2565
2485
  * @public
2566
2486
  */
2567
- export declare interface System {
2568
- readonly date: string;
2487
+ export declare interface System extends UserDetailsSystemProperty {
2569
2488
  }
2570
2489
 
2571
2490
  /**
@@ -2610,181 +2529,17 @@ declare type TemplateOptions = Partial<TemplateComponents> & {
2610
2529
  somePartial?: string | SyntheticViewTemplate;
2611
2530
  };
2612
2531
 
2613
- /**
2614
- * User interface.
2615
- *
2616
- * @remarks
2617
- * The user singleton, which always exists in either an anonymous or authenticated mode.
2618
- *
2619
- * @privateRemarks
2620
- * Providing `username` and `userName` for backwards compatability.
2621
- *
2622
- * @example
2623
- * ```ts
2624
- * import { User } from '@genesislcap/foundation-auth/user';
2625
- * ...
2626
- * @User private user: User
2627
- * ```
2628
- *
2629
- * @public
2630
- */
2631
- export declare interface User extends UserPathHistory, UserActionHistory {
2632
- readonly isAuthenticated: boolean;
2633
- readonly isAnonymous: boolean;
2634
- readonly userKVs: {
2635
- [key: string]: any;
2636
- };
2637
- readonly details: Details;
2638
- readonly permission: string[];
2639
- readonly profile: string[];
2640
- readonly sourceRef: string;
2641
- readonly userName: string;
2642
- readonly username: string;
2643
- /**
2644
- * @param entity - The LoginAck used to populate the User.
2645
- */
2646
- set(entity: Partial<LoginAck>): this;
2647
- unset(): this;
2648
- isAdmin(): boolean;
2649
- isBanned(): boolean;
2650
- /**
2651
- * @param permission - A permission string or an array of permission strings to check.
2652
- */
2653
- hasPermission(permission: string | string[]): boolean;
2654
- /**
2655
- * @param profile - A profile string or an array of profile strings to check.
2656
- */
2657
- hasProfile(profile: string | string[]): boolean;
2658
- /**
2659
- * @example
2660
- * ```ts
2661
- * import type { UserAuthenticationChangeEvent } from '@genesislcap/foundation-auth/user';
2662
- * ...
2663
- * const unsubscribe = this.user.addAuthenticationChangeListener((event: UserAuthenticationChangeEvent) => {
2664
- * console.log('User authenticated?', event.detail);
2665
- * });
2666
- * ```
2667
- *
2668
- * @param listener - A listener function.
2669
- */
2670
- addAuthenticationChangeListener(listener: Listener<UserAuthenticationChangeEvent>): () => void;
2671
- clearTrackingHistory(): void;
2672
- }
2673
-
2674
- /**
2675
- * User DI key.
2676
- *
2677
- * @privateRemarks
2678
- * Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
2679
- *
2680
- * @internal
2681
- */
2682
- export declare const User: InterfaceSymbol<User>;
2683
-
2684
- /**
2685
- * UserActionHistory.
2686
- *
2687
- * @remarks
2688
- * APIs to track a user's action history.
2689
- *
2690
- * @privateRemarks
2691
- * Integrate with foundation analytics? Users could then simply call `user.trackAction` and we could engage analytics.
2692
- * We should move analytics out of comms first.
2693
- *
2694
- * @public
2695
- */
2696
- export declare interface UserActionHistory {
2697
- /**
2698
- * Array of actions that have been tracked.
2699
- */
2700
- readonly actionHistory: unknown[];
2701
- /**
2702
- * Track an action.
2703
- */
2704
- trackAction<TDetails = unknown>(details: TDetails): void;
2705
- /**
2706
- * Clears action history.
2707
- */
2708
- clearActions(): void;
2709
- /**
2710
- * @returns The last stored action.
2711
- */
2712
- lastAction(): unknown;
2713
- }
2532
+ export { User }
2714
2533
 
2715
- /**
2716
- * UserAuthenticationChangeEvent.
2717
- *
2718
- * @remarks
2719
- * Detail will either be `true` or `false` to indicate authentication status.
2720
- *
2721
- * @public
2722
- */
2723
- export declare type UserAuthenticationChangeEvent = CustomEvent<boolean>;
2534
+ export { UserActionHistory }
2724
2535
 
2725
- /**
2726
- * UserAuthenticationChangeType.
2727
- * @public
2728
- */
2729
- export declare const UserAuthenticationChangeType = "user-authentication-change";
2536
+ export { UserAuthenticationChangeEvent }
2730
2537
 
2731
- /**
2732
- * UserConfig DI interface.
2733
- *
2734
- * @public
2735
- */
2736
- export declare interface UserConfig {
2737
- /**
2738
- * Exclude certain actions from tracking.
2739
- */
2740
- trackActionExclusions: unknown[];
2741
- /**
2742
- * Exclude certain paths from tracking.
2743
- */
2744
- trackPathExclusions: string[];
2745
- }
2538
+ export { UserAuthenticationChangeType }
2746
2539
 
2747
- /**
2748
- * UserConfig DI key.
2749
- *
2750
- * @internal
2751
- * @privateRemarks
2752
- * Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
2753
- */
2754
- export declare const UserConfig: InterfaceSymbol<UserConfig>;
2540
+ export { UserConfig }
2755
2541
 
2756
- /**
2757
- * UserPathHistory.
2758
- *
2759
- * @remarks
2760
- * APIs to track a user's path history. Includes the pathname, search and hash only.
2761
- * This is not intended proxy or replace the History API.
2762
- *
2763
- * @privateRemarks
2764
- * Integrate with foundation analytics? Users could then simply call `user.trackPath` and we could engage analytics.
2765
- * We should move analytics out of comms first.
2766
- *
2767
- * @public
2768
- */
2769
- export declare interface UserPathHistory {
2770
- /**
2771
- * Array of paths that have been tracked.
2772
- */
2773
- readonly pathHistory: string[];
2774
- /**
2775
- * Track current path.
2776
- */
2777
- trackPath(): string;
2778
- /**
2779
- * Clears path history.
2780
- */
2781
- clearPaths(): void;
2782
- /**
2783
- * May be used to return to a target path after authentication.
2784
- * @returns The last stored path.
2785
- */
2786
- lastPath(): string | undefined;
2787
- }
2542
+ export { UserPathHistory }
2788
2543
 
2789
2544
  /**
2790
2545
  * ZeroAuth.
@@ -24,5 +24,5 @@ Transient state during the machine's execution.
24
24
  | [dto](./foundation-auth.authmachinecontext.dto.md) | | [AuthDTO](./foundation-auth.authdto.md) | The login/login DTO from the fetch machine. |
25
25
  | [entity](./foundation-auth.authmachinecontext.entity.md) | | [AuthEntity](./foundation-auth.authentity.md) | The login/login Entity mapped from the DTO. |
26
26
  | [params?](./foundation-auth.authmachinecontext.params.md) | | [AuthMachineEventParams](./foundation-auth.authmachineeventparams.md) | _(Optional)_ Authentication event params. |
27
- | [user](./foundation-auth.authmachinecontext.user.md) | | [User](./foundation-auth.user.md) | The user, either authenticated or anonymous. |
27
+ | [user](./foundation-auth.authmachinecontext.user.md) | | User | The user, either authenticated or anonymous. |
28
28
 
@@ -16,7 +16,7 @@ constructor(user: User, fetchMachine: FetchMachine, cm: CredentialManager, uuid:
16
16
 
17
17
  | Parameter | Type | Description |
18
18
  | --- | --- | --- |
19
- | user | [User](./foundation-auth.user.md) | |
19
+ | user | User | |
20
20
  | fetchMachine | FetchMachine | |
21
21
  | cm | [CredentialManager](./foundation-auth.credentialmanager.md) | |
22
22
  | uuid | UUID | |
@@ -4,22 +4,15 @@
4
4
 
5
5
  ## Details interface
6
6
 
7
+ > Warning: This API is now obsolete.
8
+ >
9
+ > - Use instead.
10
+ >
7
11
 
8
12
  **Signature:**
9
13
 
10
14
  ```typescript
11
- export interface Details
15
+ export interface Details extends UserDetailsProperty
12
16
  ```
13
-
14
- ## Properties
15
-
16
- | Property | Modifiers | Type | Description |
17
- | --- | --- | --- | --- |
18
- | [daysToPasswordExpiry](./foundation-auth.details.daystopasswordexpiry.md) | <code>readonly</code> | number | |
19
- | [failedLoginAttempts](./foundation-auth.details.failedloginattempts.md) | <code>readonly</code> | number | |
20
- | [heartbeatIntervalSecs](./foundation-auth.details.heartbeatintervalsecs.md) | <code>readonly</code> | number | |
21
- | [lastLoginDatetime](./foundation-auth.details.lastlogindatetime.md) | <code>readonly</code> | number | |
22
- | [product](./foundation-auth.details.product.md) | <code>readonly</code> | [Product](./foundation-auth.product.md)<!-- -->\[\] | |
23
- | [rejectedLoginAttempts](./foundation-auth.details.rejectedloginattempts.md) | <code>readonly</code> | number | |
24
- | [system](./foundation-auth.details.system.md) | <code>readonly</code> | [System](./foundation-auth.system.md) \| null | |
17
+ **Extends:** UserDetailsProperty
25
18
 
@@ -24,7 +24,7 @@ A utility method for host applications that are not using decorators or the DI c
24
24
 
25
25
  ```ts
26
26
  import { getAuthMachine } from '@genesislcap/foundation-auth/machine';
27
- import { getUser, UserAuthenticationChangeEvent } from '@genesislcap/foundation-auth/user';
27
+ import { getUser, UserAuthenticationChangeEvent } from '@genesislcap/foundation-user';
28
28
  ...
29
29
  private authMachine = getAuthMachine();
30
30
  ...
@@ -8,21 +8,7 @@
8
8
  **Signature:**
9
9
 
10
10
  ```typescript
11
- export interface LoginAck extends Ack
11
+ export interface LoginAck extends SetUserProperties, Ack
12
12
  ```
13
- **Extends:** Ack
14
-
15
- ## Properties
16
-
17
- | Property | Modifiers | Type | Description |
18
- | --- | --- | --- | --- |
19
- | [details](./foundation-auth.loginack.details.md) | <code>readonly</code> | [Details](./foundation-auth.details.md) | |
20
- | [permission](./foundation-auth.loginack.permission.md) | <code>readonly</code> | string\[\] | |
21
- | [profile](./foundation-auth.loginack.profile.md) | <code>readonly</code> | string\[\] | |
22
- | [updateQueue](./foundation-auth.loginack.updatequeue.md) | <code>readonly</code> | string | |
23
- | [userKVs](./foundation-auth.loginack.userkvs.md) | <code>readonly</code> | { \[key: string\]: any; } | |
24
- | [userName](./foundation-auth.loginack.username.md) | <code>readonly</code> | string | |
25
- | [zeroMqProxyInboundPort](./foundation-auth.loginack.zeromqproxyinboundport.md) | <code>readonly</code> | number | |
26
- | [zeroMqProxyModeEnabled](./foundation-auth.loginack.zeromqproxymodeenabled.md) | <code>readonly</code> | boolean | |
27
- | [zeroMqProxyOutboundPort](./foundation-auth.loginack.zeromqproxyoutboundport.md) | <code>readonly</code> | number | |
13
+ **Extends:** SetUserProperties, Ack
28
14
 
@@ -17,7 +17,6 @@
17
17
  | [DefaultLogoutMapper](./foundation-auth.defaultlogoutmapper.md) | Default LogoutMapper. |
18
18
  | [DefaultMessageMapper](./foundation-auth.defaultmessagemapper.md) | |
19
19
  | [DefaultPasswordManagementMapper](./foundation-auth.defaultpasswordmanagementmapper.md) | Default PasswordManagementMapper. |
20
- | [DefaultUser](./foundation-auth.defaultuser.md) | Default User implementation. |
21
20
  | [FoundationAuth](./foundation-auth.foundationauth.md) | FoundationAuth. |
22
21
  | [MappingError](./foundation-auth.mappingerror.md) | MappingError. |
23
22
  | [ZeroAuth](./foundation-auth.zeroauth.md) | ZeroAuth. |
@@ -37,7 +36,6 @@
37
36
  | [getAuthMachine()](./foundation-auth.getauthmachine.md) | Get AuthMachine from the DI container. |
38
37
  | [getAuthStore()](./foundation-auth.getauthstore.md) | Get AuthStore from the DI container. |
39
38
  | [getRoutePath(route, hostPath)](./foundation-auth.getroutepath.md) | A utility to get a sub route path taking the host path into account. |
40
- | [getUser()](./foundation-auth.getuser.md) | Gets User from the DI container. |
41
39
  | [isChangePasswordParams(params)](./foundation-auth.ischangepasswordparams.md) | isChangePasswordParams. |
42
40
  | [isForgotPasswordParams(params)](./foundation-auth.isforgotpasswordparams.md) | isForgotPasswordParams. |
43
41
  | [isLoginAckDTO(dto)](./foundation-auth.isloginackdto.md) | isLoginAckDTO. |
@@ -94,10 +92,6 @@
94
92
  | [PasswordManagementMapper](./foundation-auth.passwordmanagementmapper.md) | PasswordManagementMapper interface. |
95
93
  | [Product](./foundation-auth.product.md) | |
96
94
  | [System](./foundation-auth.system.md) | |
97
- | [User](./foundation-auth.user.md) | User interface. |
98
- | [UserActionHistory](./foundation-auth.useractionhistory.md) | UserActionHistory. |
99
- | [UserConfig](./foundation-auth.userconfig.md) | UserConfig DI interface. |
100
- | [UserPathHistory](./foundation-auth.userpathhistory.md) | UserPathHistory. |
101
95
 
102
96
  ## Variables
103
97
 
@@ -111,7 +105,6 @@
111
105
  | [defaultAuthMachineContext](./foundation-auth.defaultauthmachinecontext.md) | Default AuthMachineContext. |
112
106
  | [defaultCredentialManagerConfig](./foundation-auth.defaultcredentialmanagerconfig.md) | The default configuration for the CredentialManager service. |
113
107
  | [defaultCredentialRequestOptions](./foundation-auth.defaultcredentialrequestoptions.md) | The default request options for the CredentialManager service. |
114
- | [defaultUserConfig](./foundation-auth.defaultuserconfig.md) | Default UserConfig DI implementation. |
115
108
  | [FORGOT\_PASSWORD\_URL](./foundation-auth.forgot_password_url.md) | |
116
109
  | [fromDTOAck](./foundation-auth.fromdtoack.md) | fromDTOAck |
117
110
  | [fromDTONack](./foundation-auth.fromdtonack.md) | fromDTONack |
@@ -131,7 +124,6 @@
131
124
  | [SSO\_LOGIN\_URL](./foundation-auth.sso_login_url.md) | |
132
125
  | [styles](./foundation-auth.styles.md) | |
133
126
  | [template](./foundation-auth.template.md) | |
134
- | [UserAuthenticationChangeType](./foundation-auth.userauthenticationchangetype.md) | UserAuthenticationChangeType. |
135
127
 
136
128
  ## Type Aliases
137
129
 
@@ -170,5 +162,4 @@
170
162
  | [Settings](./foundation-auth.settings.md) | Defines the parameters you may set on the routes. |
171
163
  | [SSOConfig](./foundation-auth.ssoconfig.md) | |
172
164
  | [SSOCredentials](./foundation-auth.ssocredentials.md) | |
173
- | [UserAuthenticationChangeEvent](./foundation-auth.userauthenticationchangeevent.md) | UserAuthenticationChangeEvent. |
174
165
 
@@ -4,17 +4,15 @@
4
4
 
5
5
  ## Product interface
6
6
 
7
+ > Warning: This API is now obsolete.
8
+ >
9
+ > - Use instead.
10
+ >
7
11
 
8
12
  **Signature:**
9
13
 
10
14
  ```typescript
11
- export interface Product
15
+ export interface Product extends UserDetailsProductProperty
12
16
  ```
13
-
14
- ## Properties
15
-
16
- | Property | Modifiers | Type | Description |
17
- | --- | --- | --- | --- |
18
- | [name](./foundation-auth.product.name.md) | <code>readonly</code> | string | |
19
- | [version](./foundation-auth.product.version.md) | <code>readonly</code> | string | |
17
+ **Extends:** UserDetailsProductProperty
20
18
 
@@ -4,16 +4,15 @@
4
4
 
5
5
  ## System interface
6
6
 
7
+ > Warning: This API is now obsolete.
8
+ >
9
+ > - Use instead.
10
+ >
7
11
 
8
12
  **Signature:**
9
13
 
10
14
  ```typescript
11
- export interface System
15
+ export interface System extends UserDetailsSystemProperty
12
16
  ```
13
-
14
- ## Properties
15
-
16
- | Property | Modifiers | Type | Description |
17
- | --- | --- | --- | --- |
18
- | [date](./foundation-auth.system.date.md) | <code>readonly</code> | string | |
17
+ **Extends:** UserDetailsSystemProperty
19
18