@servicetitan/docs-uikit 28.3.3 → 28.4.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.
@@ -58,16 +58,17 @@ const App = () => {
58
58
 
59
59
  `withMicroservice` accepts an object with the following properties:
60
60
 
61
- | Name | Type | Description |
62
- | :---------------- | :---------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------- |
63
- | `authAdapter` | <code>string &#124; Function</code> | (optional) authentication scheme ([see below](#auth-adapter)). Defaults to **Bearer** authentication. |
64
- | `authURL` | `string` | (optional) authentication endpoint for protected resources. Value is only optional for **Token** authentication. It is required for **Bearer** authentication. |
65
- | `axiosInstance` | `AxiosInstance` | (optional) Axios instance which will be used for authenticated requests. Defaults to the global Axios
66
- | `baseURL` | `string` | base URL of protected resources |
67
- | `component` | `React.ComponentType` | component to wrap |
68
- | `extraHeaders` | `Record<string, any>` | (optional) extra headers to add to requests |
69
- | `preAuthenticate` | `boolean` | (optional) whether to authenticate immediately or wait for the first request. Defaults to `false`. |
70
- | `tokens` | `Symbol[]` | (optional) symbols to use to provide `baseURL` to autogenerated API services and child components |
61
+ | Name | Type | Description |
62
+ | :------------------------ | :---------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
63
+ | `authAdapter` | <code>string &#124; Function</code> | (optional) authentication scheme ([see below](#auth-adapter)). Defaults to **Bearer** authentication. |
64
+ | `authURL` | `string` | (optional) authentication endpoint for protected resources. Value is only optional for **Token** authentication. It is required for **Bearer** authentication. |
65
+ | `axiosInstance` | `AxiosInstance` | (optional) Axios instance which will be used for authenticated requests. Defaults to the global Axios |
66
+ | `baseURL` | `string` | base URL of protected resources |
67
+ | `component` | `React.ComponentType` | component to wrap |
68
+ | `extraHeaders` | `Record<string, any>` | (optional) extra headers to add to requests |
69
+ | `preAuthenticate` | `boolean` | (optional) whether to authenticate immediately or wait for the first request. Defaults to `false`. Value is ignored for Token Server authentication ([see below](#pre-authenticate)). |
70
+ | `preAuthenticateCallback` | `(error?: any) => void` | (optional) callback to call after pre-authentication succeeds or fails. If pre-authentication fails, the error is passed to the first parameter of the callback. |
71
+ | `tokens` | `Symbol[]` | (optional) symbols to use to provide `baseURL` to autogenerated API services and child components |
71
72
 
72
73
  #### authAdapter{#auth-adapter}
73
74
 
@@ -87,7 +88,7 @@ The authentication endpoint for protected resources.
87
88
 
88
89
  - For **Token server** authentication, this the "silent login" endpoint. Defaults to `${baseURL}/bff/silent-login`.
89
90
 
90
- #### preAuthenticate
91
+ #### preAuthenticate{#pre-authenticate}
91
92
 
92
93
  Controls when authentication happens:
93
94
 
@@ -96,6 +97,8 @@ Controls when authentication happens:
96
97
  | `false` | Wait for the first request to a protected resource. This is the default value. |
97
98
  | `true` | Authenticate immediately after the component is loaded |
98
99
 
100
+ When using Token Server authentication, authentication is always performed after the component is loaded and this value is ignored.
101
+
99
102
  #### tokens
100
103
 
101
104
  The main purpose of `tokens` is to [provide](./react-ioc#provide) the `baseURL` to autogenerated API services.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/docs-uikit",
3
- "version": "28.3.3",
3
+ "version": "28.4.0",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,5 +16,5 @@
16
16
  "cli": {
17
17
  "webpack": false
18
18
  },
19
- "gitHead": "bac07173ff75001b7ad197e77bc1f6b23c531174"
19
+ "gitHead": "051b5b2f70ae6be345aa08ffdd49d8c049272940"
20
20
  }