jclib-ui 1.0.290 → 1.0.291

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.
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Tenta renovar a sessão depois de um 401.
3
+ * @returns {Promise<boolean>} true quando a requisição original pode ser repetida
4
+ */
5
+ export function renovarSessao(error: any, apiConfig: any, config: any): Promise<boolean>;
@@ -11,6 +11,12 @@ export type GlobalApiConfig = {
11
11
  version?: string;
12
12
  ident?: string;
13
13
  loginRoute?: string;
14
+ /**
15
+ * rota que renova a sessão (POST) quando uma requisição volta 401. Só faz
16
+ * sentido em APIs com token em cookie HttpOnly, junto de `withCredentials`.
17
+ * Vazio = sem renovação automática: o 401 vai direto para `loginRoute`
18
+ */
19
+ refreshRoute?: string;
14
20
  isProductionMode: boolean;
15
21
  /** envia cookies de sessão nas requisições (APIs que usam cookie HttpOnly) */
16
22
  withCredentials?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jclib-ui",
3
- "version": "1.0.290",
3
+ "version": "1.0.291",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "dependencies": {