@genesislcap/foundation-auth 15.14.2-FUI-2603.2 → 15.14.2-FUI-2603.3

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 (52) hide show
  1. package/dist/dts/machine/actions.d.ts +0 -13
  2. package/dist/dts/machine/actions.d.ts.map +1 -1
  3. package/dist/dts/machine/errors.d.ts +0 -5
  4. package/dist/dts/machine/errors.d.ts.map +1 -1
  5. package/dist/dts/machine/guards.d.ts +1 -2
  6. package/dist/dts/machine/guards.d.ts.map +1 -1
  7. package/dist/dts/machine/machine.d.ts +0 -4
  8. package/dist/dts/machine/machine.d.ts.map +1 -1
  9. package/dist/dts/machine/types.d.ts +0 -2
  10. package/dist/dts/machine/types.d.ts.map +1 -1
  11. package/dist/dts/mapper/utils.d.ts +0 -11
  12. package/dist/dts/mapper/utils.d.ts.map +1 -1
  13. package/dist/dts/routes/base.d.ts +0 -6
  14. package/dist/dts/routes/base.d.ts.map +1 -1
  15. package/dist/dts/routes/forgot-password/forgot-password.d.ts.map +1 -1
  16. package/dist/dts/routes/reset-password/reset-password.d.ts +0 -2
  17. package/dist/dts/routes/reset-password/reset-password.d.ts.map +1 -1
  18. package/dist/dts/routes/reset-password/reset-password.template.d.ts.map +1 -1
  19. package/dist/esm/machine/actions.js +14 -16
  20. package/dist/esm/machine/errors.js +8 -39
  21. package/dist/esm/machine/guards.js +5 -13
  22. package/dist/esm/machine/machine.js +45 -90
  23. package/dist/esm/mapper/utils.js +0 -16
  24. package/dist/esm/routes/base.js +0 -20
  25. package/dist/esm/routes/forgot-password/forgot-password.js +0 -5
  26. package/dist/esm/routes/reset-password/reset-password.js +13 -19
  27. package/dist/esm/routes/reset-password/reset-password.template.js +2 -6
  28. package/dist/esm/translation.json +1 -2
  29. package/dist/foundation-auth.api.json +2 -175
  30. package/dist/foundation-auth.d.ts +1 -35
  31. package/package.json +19 -19
  32. package/dist/dts/machine/actions.test.d.ts +0 -2
  33. package/dist/dts/machine/actions.test.d.ts.map +0 -1
  34. package/dist/dts/machine/dto.d.ts +0 -34
  35. package/dist/dts/machine/dto.d.ts.map +0 -1
  36. package/dist/dts/machine/dto.test.d.ts +0 -2
  37. package/dist/dts/machine/dto.test.d.ts.map +0 -1
  38. package/dist/dts/machine/guards.test.d.ts +0 -2
  39. package/dist/dts/machine/guards.test.d.ts.map +0 -1
  40. package/dist/dts/mapper/utils.test.d.ts +0 -2
  41. package/dist/dts/mapper/utils.test.d.ts.map +0 -1
  42. package/dist/dts/routes/reset-password/reset-identity.d.ts +0 -38
  43. package/dist/dts/routes/reset-password/reset-identity.d.ts.map +0 -1
  44. package/dist/dts/routes/reset-password/reset-identity.test.d.ts +0 -2
  45. package/dist/dts/routes/reset-password/reset-identity.test.d.ts.map +0 -1
  46. package/dist/esm/machine/actions.test.js +0 -21
  47. package/dist/esm/machine/dto.js +0 -76
  48. package/dist/esm/machine/dto.test.js +0 -88
  49. package/dist/esm/machine/guards.test.js +0 -53
  50. package/dist/esm/mapper/utils.test.js +0 -56
  51. package/dist/esm/routes/reset-password/reset-identity.js +0 -99
  52. package/dist/esm/routes/reset-password/reset-identity.test.js +0 -55
@@ -3,7 +3,6 @@ import { customElement } from '@microsoft/fast-element';
3
3
  import { commonStyles } from '../../styles';
4
4
  import { logger } from '../../utils';
5
5
  import { BaseRoute } from '../base';
6
- import { persistResetIdentity } from '../reset-password/reset-identity';
7
6
  import { ForgotPasswordTemplate as template } from './forgot-password.template';
8
7
  /**
9
8
  * ForgotPassword
@@ -21,10 +20,6 @@ let ForgotPassword = class ForgotPassword extends BaseRoute {
21
20
  /**
22
21
  * Example url from email: https://public-foundation.genesislab.global/reset-password?password=nc_cbGrlgCkZeJHAF043oqEidnk
23
22
  */
24
- persistResetIdentity({
25
- username: this.store.formEntry.username,
26
- organisation: this.store.formEntry.organisation,
27
- });
28
23
  this.$emit('auth-forgot-password', {
29
24
  username: this.store.formEntry.orgUsername,
30
25
  returnUrl: this.routing.getForgotPasswordReturnUrl(),
@@ -2,7 +2,6 @@ import { __awaiter, __decorate } from "tslib";
2
2
  import { customElement, observable, volatile } from '@microsoft/fast-element';
3
3
  import { commonStyles } from '../../styles';
4
4
  import { BaseRoute } from '../base';
5
- import { readResetIdentity, resolveResetUsername, shouldShowIdentityFields, } from './reset-identity';
6
5
  import { ResetPasswordTemplate as template } from './reset-password.template';
7
6
  /**
8
7
  * ResetPassword
@@ -25,22 +24,23 @@ let ResetPassword = class ResetPassword extends BaseRoute {
25
24
  this.passwordResetToken = '';
26
25
  }
27
26
  enter(phase) {
28
- this.hasPasswordExpired = !!phase.route.queryParams.expired;
29
- this.passwordResetToken = phase.route.queryParams.password;
30
- this.applyResetIdentity(phase.route.queryParams);
31
- }
32
- applyResetIdentity(queryParams) {
27
+ var _a, _b, _c, _d;
28
+ const query = ((_a = phase.route) === null || _a === void 0 ? void 0 : _a.queryParams) || {};
29
+ this.hasPasswordExpired = !!query.expired;
30
+ this.passwordResetToken = (_b = query.password) !== null && _b !== void 0 ? _b : '';
31
+ if (this.hasPasswordExpired) {
32
+ const username = (_d = (_c = this.store.authMachine.context.params) === null || _c === void 0 ? void 0 : _c.username) === null || _d === void 0 ? void 0 : _d.trim();
33
+ if (username) {
34
+ this.$emit('auth-username-changed', username);
35
+ }
36
+ return;
37
+ }
33
38
  if (!this.passwordResetToken) {
34
39
  return;
35
40
  }
36
- const stored = readResetIdentity();
37
- const username = resolveResetUsername(queryParams, stored);
41
+ const username = (query.username || query.user || query.USER_NAME || '').trim();
38
42
  if (username) {
39
- this.store.formEntry.onUsernameChanged(new CustomEvent('auth-username-changed', { detail: username }));
40
- }
41
- const organisation = queryParams.organisation || (stored === null || stored === void 0 ? void 0 : stored.organisation);
42
- if (organisation) {
43
- this.store.formEntry.onOrganisationChanged(new CustomEvent('auth-organisation-changed', { detail: organisation }));
43
+ this.$emit('auth-username-changed', username);
44
44
  }
45
45
  }
46
46
  onSubmit() {
@@ -69,9 +69,6 @@ let ResetPassword = class ResetPassword extends BaseRoute {
69
69
  get headingText() {
70
70
  return this.hasPasswordExpired ? 'You are required to change your password' : 'Change Password';
71
71
  }
72
- get showIdentityFields() {
73
- return shouldShowIdentityFields(this.passwordResetToken, this.store.formEntry.username);
74
- }
75
72
  };
76
73
  __decorate([
77
74
  observable
@@ -82,9 +79,6 @@ __decorate([
82
79
  __decorate([
83
80
  volatile
84
81
  ], ResetPassword.prototype, "headingText", null);
85
- __decorate([
86
- volatile
87
- ], ResetPassword.prototype, "showIdentityFields", null);
88
82
  ResetPassword = __decorate([
89
83
  customElement({
90
84
  name: 'foundation-auth-reset-password',
@@ -12,14 +12,10 @@ export const ResetPasswordTemplate = html `
12
12
  <auth-logo></auth-logo>
13
13
  ${showEnvironmentIndicator()}
14
14
  <div class="heading2" data-test-id="heading">${(x) => x.headingText}</div>
15
- <div class="heading3">
16
- ${(x) => x.toLocalisedText(x.showIdentityFields ? 'RESET_PASSWORD_SUBTITLE' : 'RESET_PASSWORD_TOKEN_SUBTITLE')}
17
- </div>
15
+ <div class="heading3">${(x) => x.toLocalisedText('RESET_PASSWORD_SUBTITLE')}</div>
18
16
  </div>
19
17
  <form @submit=${(x) => x.onSubmit()} autocomplete="on" data-test-id="form">
20
- ${when((x) => x.showIdentityFields, html `
21
- ${organisationField()} ${usernameField()}
22
- `)}
18
+ ${organisationField()} ${usernameField()}
23
19
  ${when((x) => !x.passwordResetToken, html `
24
20
  ${(x) => passwordField(x.toLocalisedText(x.hasPasswordExpired
25
21
  ? 'RESET_PASSWORD_CURRENT_PASSWORD_FIELD'
@@ -26,7 +26,6 @@
26
26
  "REQUEST_ACCOUNT_SUBMIT_BUTTON": "Request Account",
27
27
  "REQUEST_ACCOUNT_BUTTON_BACK": "Back",
28
28
  "RESET_PASSWORD_SUBTITLE": "Enter the username registered to your account",
29
- "RESET_PASSWORD_TOKEN_SUBTITLE": "Enter a new password for your account",
30
29
  "RESET_PASSWORD_OLD_PASSWORD_FIELD": "Old Password",
31
30
  "RESET_PASSWORD_CURRENT_PASSWORD_FIELD": "Current Password",
32
31
  "RESET_PASSWORD_SUBMIT_BUTTON": "Change Password",
@@ -44,7 +43,7 @@
44
43
  "FIELD_PASSWORD_REPEAT_NEW_TITLE": "Repeat New Password",
45
44
  "MESSAGE_PASSWORD_CHANGE_SUCCESS": "Password change success.",
46
45
  "MESSAGE_FORGOT_PASSWORD_RESET": "Please check your inbox for reset instructions.",
47
- "MESSAGE_PASSWORD_RESET_SUCCESS": "Password reset success.",
46
+ "MESSAGE_PASSWORD_RESET_SUCCESS": "Password reset success. Redirecting to login.",
48
47
  "MESSAGE_INCORRECT_CREDENTIALS": "Incorrect credentials, please try again.",
49
48
  "MESSAGE_MFA_REQUIRED": "Please check your inbox for your login link.",
50
49
  "MESSAGE_PASSWORD_EXPIRED": "You are required to change your password.",
@@ -2179,7 +2179,7 @@
2179
2179
  },
2180
2180
  {
2181
2181
  "kind": "Content",
2182
- "text": ";\n} | {\n type: 'logout';\n} | {\n type: 'cancel-mfa';\n} | {\n type: 'dismiss';\n} | {\n type: 'change-password';\n params: "
2182
+ "text": ";\n} | {\n type: 'logout';\n} | {\n type: 'cancel-mfa';\n} | {\n type: 'change-password';\n params: "
2183
2183
  },
2184
2184
  {
2185
2185
  "kind": "Reference",
@@ -3283,89 +3283,6 @@
3283
3283
  "endIndex": 2
3284
3284
  }
3285
3285
  },
3286
- {
3287
- "kind": "Function",
3288
- "canonicalReference": "@genesislcap/foundation-auth!clearAuthErrorState:function(1)",
3289
- "docComment": "/**\n * Drop accumulated machine errors. `ErrorMap` is shared with `startingContext`, so reset must clear it in place rather than replacing the context object.\n *\n * @public\n */\n",
3290
- "excerptTokens": [
3291
- {
3292
- "kind": "Content",
3293
- "text": "export declare function clearAuthErrorState<T extends "
3294
- },
3295
- {
3296
- "kind": "Reference",
3297
- "text": "ErrorState",
3298
- "canonicalReference": "@genesislcap/foundation-auth!~ErrorState:type"
3299
- },
3300
- {
3301
- "kind": "Content",
3302
- "text": ">(context: "
3303
- },
3304
- {
3305
- "kind": "Content",
3306
- "text": "T"
3307
- },
3308
- {
3309
- "kind": "Content",
3310
- "text": ", starting?: "
3311
- },
3312
- {
3313
- "kind": "Content",
3314
- "text": "T"
3315
- },
3316
- {
3317
- "kind": "Content",
3318
- "text": "): "
3319
- },
3320
- {
3321
- "kind": "Content",
3322
- "text": "T"
3323
- },
3324
- {
3325
- "kind": "Content",
3326
- "text": ";"
3327
- }
3328
- ],
3329
- "fileUrlPath": "src/machine/actions.ts",
3330
- "returnTypeTokenRange": {
3331
- "startIndex": 7,
3332
- "endIndex": 8
3333
- },
3334
- "releaseTag": "Public",
3335
- "overloadIndex": 1,
3336
- "parameters": [
3337
- {
3338
- "parameterName": "context",
3339
- "parameterTypeTokenRange": {
3340
- "startIndex": 3,
3341
- "endIndex": 4
3342
- },
3343
- "isOptional": false
3344
- },
3345
- {
3346
- "parameterName": "starting",
3347
- "parameterTypeTokenRange": {
3348
- "startIndex": 5,
3349
- "endIndex": 6
3350
- },
3351
- "isOptional": true
3352
- }
3353
- ],
3354
- "typeParameters": [
3355
- {
3356
- "typeParameterName": "T",
3357
- "constraintTokenRange": {
3358
- "startIndex": 1,
3359
- "endIndex": 2
3360
- },
3361
- "defaultTypeTokenRange": {
3362
- "startIndex": 0,
3363
- "endIndex": 0
3364
- }
3365
- }
3366
- ],
3367
- "name": "clearAuthErrorState"
3368
- },
3369
3286
  {
3370
3287
  "kind": "Function",
3371
3288
  "canonicalReference": "@genesislcap/foundation-auth!configure:function(1)",
@@ -6151,7 +6068,7 @@
6151
6068
  },
6152
6069
  {
6153
6070
  "kind": "Content",
6154
- "text": "() => {\n login: {\n actions: string[];\n target: string;\n };\n \"terms-and-conditions\": {\n actions: string[];\n target: string;\n };\n \"forgot-password\": {\n actions: string[];\n target: string;\n };\n \"change-password\": {\n actions: string[];\n target: string;\n };\n \"reset-password\": {\n actions: string[];\n target: string;\n };\n dismiss: {\n actions: string[];\n target: string;\n };\n }"
6071
+ "text": "() => {\n login: {\n actions: string[];\n target: string;\n };\n \"terms-and-conditions\": {\n actions: string[];\n target: string;\n };\n \"forgot-password\": {\n actions: string[];\n target: string;\n };\n \"change-password\": {\n actions: string[];\n target: string;\n };\n \"reset-password\": {\n actions: string[];\n target: string;\n };\n }"
6155
6072
  },
6156
6073
  {
6157
6074
  "kind": "Content",
@@ -10089,51 +10006,6 @@
10089
10006
  ],
10090
10007
  "name": "getRoutePath"
10091
10008
  },
10092
- {
10093
- "kind": "Function",
10094
- "canonicalReference": "@genesislcap/foundation-auth!hasDTOErrors:function(1)",
10095
- "docComment": "/**\n * True when a Genesis payload contains at least one ERROR item.\n *\n * @public\n */\n",
10096
- "excerptTokens": [
10097
- {
10098
- "kind": "Content",
10099
- "text": "export declare function hasDTOErrors(dto: "
10100
- },
10101
- {
10102
- "kind": "Content",
10103
- "text": "unknown"
10104
- },
10105
- {
10106
- "kind": "Content",
10107
- "text": "): "
10108
- },
10109
- {
10110
- "kind": "Content",
10111
- "text": "boolean"
10112
- },
10113
- {
10114
- "kind": "Content",
10115
- "text": ";"
10116
- }
10117
- ],
10118
- "fileUrlPath": "src/mapper/utils.ts",
10119
- "returnTypeTokenRange": {
10120
- "startIndex": 3,
10121
- "endIndex": 4
10122
- },
10123
- "releaseTag": "Public",
10124
- "overloadIndex": 1,
10125
- "parameters": [
10126
- {
10127
- "parameterName": "dto",
10128
- "parameterTypeTokenRange": {
10129
- "startIndex": 1,
10130
- "endIndex": 2
10131
- },
10132
- "isOptional": false
10133
- }
10134
- ],
10135
- "name": "hasDTOErrors"
10136
- },
10137
10009
  {
10138
10010
  "kind": "Function",
10139
10011
  "canonicalReference": "@genesislcap/foundation-auth!hasDTOErrorWarningCode:function(1)",
@@ -10536,51 +10408,6 @@
10536
10408
  ],
10537
10409
  "name": "isChangePasswordParams"
10538
10410
  },
10539
- {
10540
- "kind": "Function",
10541
- "canonicalReference": "@genesislcap/foundation-auth!isFailedAuthDTO:function(1)",
10542
- "docComment": "/**\n * True when a Genesis payload must be treated as failure. HTTP status is intentionally ignored; MESSAGE_TYPE and ERROR are the contract.\n *\n * @public\n */\n",
10543
- "excerptTokens": [
10544
- {
10545
- "kind": "Content",
10546
- "text": "export declare function isFailedAuthDTO(dto: "
10547
- },
10548
- {
10549
- "kind": "Content",
10550
- "text": "unknown"
10551
- },
10552
- {
10553
- "kind": "Content",
10554
- "text": "): "
10555
- },
10556
- {
10557
- "kind": "Content",
10558
- "text": "boolean"
10559
- },
10560
- {
10561
- "kind": "Content",
10562
- "text": ";"
10563
- }
10564
- ],
10565
- "fileUrlPath": "src/mapper/utils.ts",
10566
- "returnTypeTokenRange": {
10567
- "startIndex": 3,
10568
- "endIndex": 4
10569
- },
10570
- "releaseTag": "Public",
10571
- "overloadIndex": 1,
10572
- "parameters": [
10573
- {
10574
- "parameterName": "dto",
10575
- "parameterTypeTokenRange": {
10576
- "startIndex": 1,
10577
- "endIndex": 2
10578
- },
10579
- "isOptional": false
10580
- }
10581
- ],
10582
- "name": "isFailedAuthDTO"
10583
- },
10584
10411
  {
10585
10412
  "kind": "Function",
10586
10413
  "canonicalReference": "@genesislcap/foundation-auth!isForgotPasswordParams:function(1)",
@@ -438,8 +438,6 @@ export declare type AuthMachineEvent = {
438
438
  type: 'logout';
439
439
  } | {
440
440
  type: 'cancel-mfa';
441
- } | {
442
- type: 'dismiss';
443
441
  } | {
444
442
  type: 'change-password';
445
443
  params: ChangePasswordParams;
@@ -641,13 +639,6 @@ export declare type ChangePasswordParams = {
641
639
  requester?: string;
642
640
  };
643
641
 
644
- /**
645
- * Drop accumulated machine errors. `ErrorMap` is shared with `startingContext`, so
646
- * reset must clear it in place rather than replacing the context object.
647
- * @public
648
- */
649
- export declare function clearAuthErrorState<T extends ErrorState>(context: T, starting?: T): T;
650
-
651
642
  /**
652
643
  * configure.
653
644
  *
@@ -1040,10 +1031,6 @@ export declare class DefaultAuthMachine extends AbstractMachine<AuthMachineConte
1040
1031
  actions: string[];
1041
1032
  target: string;
1042
1033
  };
1043
- dismiss: {
1044
- actions: string[];
1045
- target: string;
1046
- };
1047
1034
  };
1048
1035
  protected dtoTransition: () => {
1049
1036
  actions: string[];
@@ -1250,13 +1237,6 @@ declare interface Details_2 {
1250
1237
  readonly PRODUCT: Product_2[];
1251
1238
  }
1252
1239
 
1253
- declare type ErrorState = {
1254
- error?: unknown;
1255
- errors?: {
1256
- clear(): void;
1257
- };
1258
- };
1259
-
1260
1240
  /**
1261
1241
  * @public
1262
1242
  */
@@ -1971,12 +1951,6 @@ export declare function getRoutePath(route: AuthRoutes | string, hostPath?: stri
1971
1951
 
1972
1952
  export { getUser }
1973
1953
 
1974
- /**
1975
- * True when a Genesis payload contains at least one ERROR item.
1976
- * @public
1977
- */
1978
- export declare function hasDTOErrors(dto: unknown): boolean;
1979
-
1980
1954
  /**
1981
1955
  * hasDTOErrorWarningCode
1982
1956
  * @remarks
@@ -2038,8 +2012,7 @@ declare type InternalEventMap = {
2038
2012
  /**
2039
2013
  * is200Nack.
2040
2014
  * @privateRemarks
2041
- * Required until http status codes are aligned on backend. HTTP status is ignored;
2042
- * Genesis MESSAGE_TYPE / ERROR determine failure.
2015
+ * Required until http status codes are aligned on backend.
2043
2016
  * @public
2044
2017
  */
2045
2018
  export declare const is200Nack: <TOutput = any>(event: EventObject | DoneInvokeEvent<TOutput>) => event is DoneInvokeEvent<TOutput>;
@@ -2053,13 +2026,6 @@ export declare const is200Nack: <TOutput = any>(event: EventObject | DoneInvokeE
2053
2026
  */
2054
2027
  export declare function isChangePasswordParams(params: AuthMachineEventParams): params is ChangePasswordParams;
2055
2028
 
2056
- /**
2057
- * True when a Genesis payload must be treated as failure.
2058
- * HTTP status is intentionally ignored; MESSAGE_TYPE and ERROR are the contract.
2059
- * @public
2060
- */
2061
- export declare function isFailedAuthDTO(dto: unknown): boolean;
2062
-
2063
2029
  /**
2064
2030
  * isForgotPasswordParams.
2065
2031
  * @remarks
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-auth",
3
3
  "description": "Genesis Foundation Auth",
4
- "version": "15.14.2-FUI-2603.2",
4
+ "version": "15.14.2-FUI-2603.3",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/esm/index.js",
7
7
  "types": "dist/foundation-auth.d.ts",
@@ -134,25 +134,25 @@
134
134
  }
135
135
  },
136
136
  "devDependencies": {
137
- "@genesislcap/foundation-testing": "15.14.2-FUI-2603.2",
138
- "@genesislcap/genx": "15.14.2-FUI-2603.2",
139
- "@genesislcap/rollup-builder": "15.14.2-FUI-2603.2",
140
- "@genesislcap/ts-builder": "15.14.2-FUI-2603.2",
141
- "@genesislcap/uvu-playwright-builder": "15.14.2-FUI-2603.2",
142
- "@genesislcap/vite-builder": "15.14.2-FUI-2603.2",
143
- "@genesislcap/webpack-builder": "15.14.2-FUI-2603.2"
137
+ "@genesislcap/foundation-testing": "15.14.2-FUI-2603.3",
138
+ "@genesislcap/genx": "15.14.2-FUI-2603.3",
139
+ "@genesislcap/rollup-builder": "15.14.2-FUI-2603.3",
140
+ "@genesislcap/ts-builder": "15.14.2-FUI-2603.3",
141
+ "@genesislcap/uvu-playwright-builder": "15.14.2-FUI-2603.3",
142
+ "@genesislcap/vite-builder": "15.14.2-FUI-2603.3",
143
+ "@genesislcap/webpack-builder": "15.14.2-FUI-2603.3"
144
144
  },
145
145
  "dependencies": {
146
- "@genesislcap/foundation-comms": "15.14.2-FUI-2603.2",
147
- "@genesislcap/foundation-events": "15.14.2-FUI-2603.2",
148
- "@genesislcap/foundation-i18n": "15.14.2-FUI-2603.2",
149
- "@genesislcap/foundation-logger": "15.14.2-FUI-2603.2",
150
- "@genesislcap/foundation-state-machine": "15.14.2-FUI-2603.2",
151
- "@genesislcap/foundation-store": "15.14.2-FUI-2603.2",
152
- "@genesislcap/foundation-ui": "15.14.2-FUI-2603.2",
153
- "@genesislcap/foundation-user": "15.14.2-FUI-2603.2",
154
- "@genesislcap/foundation-utils": "15.14.2-FUI-2603.2",
155
- "@genesislcap/foundation-zero": "15.14.2-FUI-2603.2",
146
+ "@genesislcap/foundation-comms": "15.14.2-FUI-2603.3",
147
+ "@genesislcap/foundation-events": "15.14.2-FUI-2603.3",
148
+ "@genesislcap/foundation-i18n": "15.14.2-FUI-2603.3",
149
+ "@genesislcap/foundation-logger": "15.14.2-FUI-2603.3",
150
+ "@genesislcap/foundation-state-machine": "15.14.2-FUI-2603.3",
151
+ "@genesislcap/foundation-store": "15.14.2-FUI-2603.3",
152
+ "@genesislcap/foundation-ui": "15.14.2-FUI-2603.3",
153
+ "@genesislcap/foundation-user": "15.14.2-FUI-2603.3",
154
+ "@genesislcap/foundation-utils": "15.14.2-FUI-2603.3",
155
+ "@genesislcap/foundation-zero": "15.14.2-FUI-2603.3",
156
156
  "@microsoft/fast-components": "2.30.6",
157
157
  "@microsoft/fast-element": "1.14.0",
158
158
  "@microsoft/fast-foundation": "2.50.0",
@@ -173,5 +173,5 @@
173
173
  "access": "public"
174
174
  },
175
175
  "customElements": "dist/custom-elements.json",
176
- "gitHead": "470d546163b507cfe4bc8335cdb5955c40aeb58a"
176
+ "gitHead": "2cea0acf960acfbf8de1f9ba35c97da362791a5d"
177
177
  }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=actions.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actions.test.d.ts","sourceRoot":"","sources":["../../../src/machine/actions.test.ts"],"names":[],"mappings":""}
@@ -1,34 +0,0 @@
1
- import type { EventObject } from 'xstate';
2
- import type { CredentialData } from '../credential';
3
- /**
4
- * Unwrap a Genesis auth DTO from FetchMachine output or APIError.
5
- * @public
6
- */
7
- export declare function unwrapAuthDto(value: unknown): unknown;
8
- type AuthMachineEventLike = EventObject & {
9
- data?: unknown;
10
- error?: unknown;
11
- output?: unknown;
12
- };
13
- /**
14
- * Read the auth DTO from a fetch done/error event.
15
- * @public
16
- */
17
- export declare function authDtoFromMachineEvent(event: AuthMachineEventLike): unknown;
18
- /**
19
- * True when a fetch done/error event carries a Genesis NACK / ERROR payload.
20
- * @public
21
- */
22
- export declare function isAuthNackEvent(event: AuthMachineEventLike): boolean;
23
- /**
24
- * True when fetch completed in the failed final state without a Genesis NACK body.
25
- * @public
26
- */
27
- export declare function isFetchFailureOutput(event: AuthMachineEventLike): boolean;
28
- /**
29
- * Fire-and-forget credential persistence so xstate does not hold pending on the Promise.
30
- * @public
31
- */
32
- export declare function persistCredentials(store: (data: CredentialData) => Promise<unknown> | unknown, data: CredentialData): void;
33
- export {};
34
- //# sourceMappingURL=dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dto.d.ts","sourceRoot":"","sources":["../../../src/machine/dto.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAMpD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAcrD;AAED,KAAK,oBAAoB,GAAG,WAAW,GAAG;IACxC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAMF;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAQ5E;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAEpE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CASzE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,EAC3D,IAAI,EAAE,cAAc,GACnB,IAAI,CASN"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=dto.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dto.test.d.ts","sourceRoot":"","sources":["../../../src/machine/dto.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=guards.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"guards.test.d.ts","sourceRoot":"","sources":["../../../src/machine/guards.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=utils.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.test.d.ts","sourceRoot":"","sources":["../../../src/mapper/utils.test.ts"],"names":[],"mappings":""}
@@ -1,38 +0,0 @@
1
- /**
2
- * Identity captured during forgot-password so the token reset screen can
3
- * submit USER_NAME without asking the user to type it again.
4
- */
5
- export declare const RESET_IDENTITY_STORAGE_KEY = "foundation-auth:password-reset-identity";
6
- /**
7
- * @public
8
- */
9
- export type ResetIdentity = {
10
- username: string;
11
- organisation?: string;
12
- };
13
- type QueryParams = Record<string, string | undefined>;
14
- /**
15
- * @public
16
- */
17
- export declare function persistResetIdentity(identity: ResetIdentity, storage?: Storage): void;
18
- /**
19
- * @public
20
- */
21
- export declare function readResetIdentity(storage?: Storage): ResetIdentity | undefined;
22
- /**
23
- * @public
24
- */
25
- export declare function clearResetIdentity(storage?: Storage): void;
26
- /**
27
- * @public
28
- */
29
- export declare function resolveResetUsername(queryParams?: QueryParams, stored?: ResetIdentity): string;
30
- /**
31
- * Username is required by EVENT_PASSWORD_RESET_ACTION. Hide it only when a
32
- * reset token is present and the username is already known.
33
- *
34
- * @public
35
- */
36
- export declare function shouldShowIdentityFields(passwordResetToken: string, username: string): boolean;
37
- export {};
38
- //# sourceMappingURL=reset-identity.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reset-identity.d.ts","sourceRoot":"","sources":["../../../../src/routes/reset-password/reset-identity.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,0BAA0B,4CAA4C,CAAC;AAEpF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAatD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAmBrF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,CAqB9E;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAU1D;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,GAAE,WAAgB,EAC7B,MAAM,CAAC,EAAE,aAAa,GACrB,MAAM,CAQR;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,kBAAkB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE9F"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=reset-identity.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reset-identity.test.d.ts","sourceRoot":"","sources":["../../../../src/routes/reset-password/reset-identity.test.ts"],"names":[],"mappings":""}
@@ -1,21 +0,0 @@
1
- import { assert, createLogicSuite } from '@genesislcap/foundation-testing';
2
- import { createErrorMap } from '@genesislcap/foundation-utils';
3
- import { clearAuthErrorState } from './actions';
4
- const Suite = createLogicSuite('clearAuthErrorState');
5
- Suite('clears shared ErrorMap in place so startingContext does not keep stale errors', () => {
6
- const errors = createErrorMap(() => { });
7
- errors.set('reset-password-error', new Error('Password validation failed'));
8
- errors.set('silent-login-error', new Error('ERROR_SILENT_LOGIN'));
9
- const starting = { errors, error: undefined, params: undefined };
10
- const context = { errors, error: new Error('stale'), params: { username: 'Jane' } };
11
- const next = clearAuthErrorState(context, starting);
12
- assert.is(errors.size, 0);
13
- assert.is(next.error, undefined);
14
- assert.is(next.errors, errors);
15
- assert.is(next.params, undefined);
16
- });
17
- Suite('does not throw when errors is missing', () => {
18
- const next = clearAuthErrorState({ error: new Error('x') });
19
- assert.is(next.error, undefined);
20
- });
21
- Suite.run();