@openbkn/bkn-sdk 0.1.1-alpha.7 → 0.1.1-alpha.8

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/dist/index.d.ts CHANGED
@@ -974,6 +974,13 @@ interface AuthStatus {
974
974
  }
975
975
  declare function status(): AuthStatus;
976
976
  declare function currentToken(): string;
977
+ /**
978
+ * Like {@link currentToken} but proactively refreshes an expired access token
979
+ * when a refresh token is stored, persisting the result. API requests already
980
+ * refresh on a 401 (see api/http.ts); this covers the `auth token` getter,
981
+ * whose output is copied out and used elsewhere where no 401 retry can help.
982
+ */
983
+ declare function currentTokenFresh(): Promise<string>;
977
984
  interface WhoamiResult extends JwtClaims {
978
985
  /** Platform the active session belongs to. */
979
986
  baseUrl?: string;
@@ -1020,6 +1027,7 @@ type auth_WhoamiResult = WhoamiResult;
1020
1027
  declare const auth_attachNoAuth: typeof attachNoAuth;
1021
1028
  declare const auth_attachToken: typeof attachToken;
1022
1029
  declare const auth_currentToken: typeof currentToken;
1030
+ declare const auth_currentTokenFresh: typeof currentTokenFresh;
1023
1031
  declare const auth_deletePlatform: typeof deletePlatform;
1024
1032
  declare const auth_exportCreds: typeof exportCreds;
1025
1033
  declare const auth_hostOf: typeof hostOf;
@@ -1032,7 +1040,7 @@ declare const auth_userIdFromToken: typeof userIdFromToken;
1032
1040
  declare const auth_usersOf: typeof usersOf;
1033
1041
  declare const auth_whoami: typeof whoami;
1034
1042
  declare namespace auth {
1035
- export { type auth_AuthStatus as AuthStatus, type auth_PlatformListItem as PlatformListItem, type auth_WhoamiResult as WhoamiResult, auth_attachNoAuth as attachNoAuth, auth_attachToken as attachToken, auth_currentToken as currentToken, auth_deletePlatform as deletePlatform, auth_exportCreds as exportCreds, auth_hostOf as hostOf, auth_listPlatforms as listPlatforms, auth_logout as logout, auth_status as status, auth_switchUser as switchUser, auth_use as use, auth_userIdFromToken as userIdFromToken, auth_usersOf as usersOf, auth_whoami as whoami };
1043
+ export { type auth_AuthStatus as AuthStatus, type auth_PlatformListItem as PlatformListItem, type auth_WhoamiResult as WhoamiResult, auth_attachNoAuth as attachNoAuth, auth_attachToken as attachToken, auth_currentToken as currentToken, auth_currentTokenFresh as currentTokenFresh, auth_deletePlatform as deletePlatform, auth_exportCreds as exportCreds, auth_hostOf as hostOf, auth_listPlatforms as listPlatforms, auth_logout as logout, auth_status as status, auth_switchUser as switchUser, auth_use as use, auth_userIdFromToken as userIdFromToken, auth_usersOf as usersOf, auth_whoami as whoami };
1036
1044
  }
1037
1045
 
1038
1046
  interface RequestInitEx {
package/dist/index.js CHANGED
@@ -19,7 +19,7 @@ import {
19
19
  toolboxes,
20
20
  trace,
21
21
  vega
22
- } from "./chunk-GAYXY7LP.js";
22
+ } from "./chunk-DTU5DGJW.js";
23
23
  export {
24
24
  DEFAULT_BUSINESS_DOMAIN,
25
25
  DEFAULT_LIST_LIMIT,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openbkn/bkn-sdk",
3
- "version": "0.1.1-alpha.7",
3
+ "version": "0.1.1-alpha.8",
4
4
  "description": "Unified TypeScript SDK + CLI for the BKN (Business Knowledge Network) platform.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",