@proveanything/smartlinks 1.15.14 → 1.15.15
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/docs/API_SUMMARY.md +4 -1
- package/dist/http.d.ts +6 -0
- package/dist/http.js +8 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/API_SUMMARY.md +4 -1
- package/package.json +1 -1
package/dist/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.15.
|
|
3
|
+
Version: 1.15.15 | Generated: 2026-07-29T17:46:34.198Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -170,6 +170,9 @@ Replace or augment globally applied custom headers.
|
|
|
170
170
|
**setBearerToken**(token: string | undefined) → `void`
|
|
171
171
|
Allows setting the bearerToken at runtime (e.g. after login/logout). Clears the HTTP cache whenever the token actually changes so that stale user-scoped responses (e.g. /account/profile) are not served after a login or logout event.
|
|
172
172
|
|
|
173
|
+
**getBearerToken**() → `string | undefined`
|
|
174
|
+
Returns the bearer token currently held by the SDK, or `undefined` if none is set. In proxy mode, credentials are held by the parent frame, not the local SDK, so this returns `undefined` even when the caller is authenticated.
|
|
175
|
+
|
|
173
176
|
**getBaseURL**() → `string | null`
|
|
174
177
|
Get the currently configured API base URL. Returns null if initializeApi() has not been called yet.
|
|
175
178
|
|
package/dist/http.d.ts
CHANGED
|
@@ -49,6 +49,12 @@ export declare function setExtraHeaders(headers: Record<string, string>): void;
|
|
|
49
49
|
* login or logout event.
|
|
50
50
|
*/
|
|
51
51
|
export declare function setBearerToken(token: string | undefined): void;
|
|
52
|
+
/**
|
|
53
|
+
* Returns the bearer token currently held by the SDK, or `undefined` if none is set.
|
|
54
|
+
* In proxy mode, credentials are held by the parent frame, not the local SDK,
|
|
55
|
+
* so this returns `undefined` even when the caller is authenticated.
|
|
56
|
+
*/
|
|
57
|
+
export declare function getBearerToken(): string | undefined;
|
|
52
58
|
/**
|
|
53
59
|
* Get the currently configured API base URL.
|
|
54
60
|
* Returns null if initializeApi() has not been called yet.
|
package/dist/http.js
CHANGED
|
@@ -466,6 +466,14 @@ export function setBearerToken(token) {
|
|
|
466
466
|
if (cachePersistence !== 'none')
|
|
467
467
|
idbClear().catch(() => { });
|
|
468
468
|
}
|
|
469
|
+
/**
|
|
470
|
+
* Returns the bearer token currently held by the SDK, or `undefined` if none is set.
|
|
471
|
+
* In proxy mode, credentials are held by the parent frame, not the local SDK,
|
|
472
|
+
* so this returns `undefined` even when the caller is authenticated.
|
|
473
|
+
*/
|
|
474
|
+
export function getBearerToken() {
|
|
475
|
+
return bearerToken;
|
|
476
|
+
}
|
|
469
477
|
/**
|
|
470
478
|
* Get the currently configured API base URL.
|
|
471
479
|
* Returns null if initializeApi() has not been called yet.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { initializeApi, isInitialized, hasAuthCredentials, configureSdkCache, invalidateCache, request, post, put, patch, del, sendCustomProxyMessage, getApiHeaders, isProxyEnabled, setBearerToken } from "./http";
|
|
1
|
+
export { initializeApi, isInitialized, hasAuthCredentials, configureSdkCache, invalidateCache, request, post, put, patch, del, sendCustomProxyMessage, getApiHeaders, isProxyEnabled, setBearerToken, getBearerToken } from "./http";
|
|
2
2
|
export * from "./api";
|
|
3
3
|
export * from "./types";
|
|
4
4
|
export { iframe } from "./iframe";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
2
|
// Top-level entrypoint of the npm package. Re-export initializeApi + all namespaces.
|
|
3
|
-
export { initializeApi, isInitialized, hasAuthCredentials, configureSdkCache, invalidateCache, request, post, put, patch, del, sendCustomProxyMessage, getApiHeaders, isProxyEnabled, setBearerToken } from "./http";
|
|
3
|
+
export { initializeApi, isInitialized, hasAuthCredentials, configureSdkCache, invalidateCache, request, post, put, patch, del, sendCustomProxyMessage, getApiHeaders, isProxyEnabled, setBearerToken, getBearerToken } from "./http";
|
|
4
4
|
export * from "./api";
|
|
5
5
|
export * from "./types";
|
|
6
6
|
// Iframe namespace
|
package/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.15.
|
|
3
|
+
Version: 1.15.15 | Generated: 2026-07-29T17:46:34.198Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -170,6 +170,9 @@ Replace or augment globally applied custom headers.
|
|
|
170
170
|
**setBearerToken**(token: string | undefined) → `void`
|
|
171
171
|
Allows setting the bearerToken at runtime (e.g. after login/logout). Clears the HTTP cache whenever the token actually changes so that stale user-scoped responses (e.g. /account/profile) are not served after a login or logout event.
|
|
172
172
|
|
|
173
|
+
**getBearerToken**() → `string | undefined`
|
|
174
|
+
Returns the bearer token currently held by the SDK, or `undefined` if none is set. In proxy mode, credentials are held by the parent frame, not the local SDK, so this returns `undefined` even when the caller is authenticated.
|
|
175
|
+
|
|
173
176
|
**getBaseURL**() → `string | null`
|
|
174
177
|
Get the currently configured API base URL. Returns null if initializeApi() has not been called yet.
|
|
175
178
|
|