@myxtra/authentication-green 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -51,10 +51,10 @@ the access token if it is present.
51
51
 
52
52
  Examples of some endpoints that will be called by components:
53
53
 
54
- | BFF URL | API Gateway URL |
55
- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
56
- | https://bff.syst.mijnxtra.be/xtra/newsletter/v1/newsletters | https://api.syst.myxtra.be/newsletter/v1/newsletters |
57
- | https://bff.syst.mijnxtra.be/xtra/newsletter/v1/newsletters?partnerClientId=123456 | https://api.syst.myxtra.be/newsletter/v1/newsletters?partnerClientId=123456 |
54
+ | BFF URL | API Gateway URL |
55
+ | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------- |
56
+ | <https://bff.syst.mijnxtra.be/xtra/newsletter/v1/newsletters> | <https://api.syst.myxtra.be/newsletter/v1/newsletters> |
57
+ | <https://bff.syst.mijnxtra.be/xtra/newsletter/v1/newsletters?partnerClientId=123456> | <https://api.syst.myxtra.be/newsletter/v1/newsletters?partnerClientId=123456> |
58
58
 
59
59
  ## Installation
60
60
 
@@ -130,9 +130,18 @@ type Config = {
130
130
  | 'okay'
131
131
  | 'spar'
132
132
  | 'xtra';
133
+ // Add links to custom pages on the menu (only visible to authenticated users)
134
+ bouMenuItems?: Array<{
135
+ label: string; // Text to display for the link
136
+ url: string; // URL of the custom page
137
+ icon: string; // Icon to show in front of the text (see disclaimer below)
138
+ }>;
133
139
  };
134
140
  ```
135
141
 
142
+ > ❗ You can find a list of available BOU menu item icons
143
+ > [here](https://unpkg.com/@myxtra/authentication-green/dist/icons/bouMenuIcons.html).
144
+
136
145
  ## Events & window object
137
146
 
138
147
  The authentication component will emit events and add properties to the window object. For backwards
@@ -153,16 +162,17 @@ type XTRA = {
153
162
  yob: () => number;
154
163
  gender: () => 'M' | 'F';
155
164
  phone: () => string;
156
- streetName: () => string,
157
- houseNr: () => string,
158
- box: () => string,
159
- zip: () => string,
160
- city: () => string,
161
- country: () => string,
162
- email: () => string,
163
- cbh: () => string,
164
- state: () => 'Authenticated',
165
- }
165
+ streetName: () => string;
166
+ houseNr: () => string;
167
+ box: () => string;
168
+ zip: () => string;
169
+ city: () => string;
170
+ country: () => string;
171
+ email: () => string;
172
+ cbh: () => string;
173
+ state: () => 'Authenticated';
174
+ };
175
+ };
166
176
  ```
167
177
 
168
178
  The authenticated event is sent through