@proveanything/smartlinks 1.0.46 → 1.0.48

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/API_SUMMARY.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.0.46 | Generated: 2025-11-23T09:12:28.424Z
3
+ Version: 1.0.48 | Generated: 2025-11-23T09:24:29.106Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
package/README.md CHANGED
@@ -149,9 +149,12 @@ initializeApi({
149
149
  apiKey?: string, // Node/server only
150
150
  bearerToken?: string, // optional at init; set by auth.login/verifyToken
151
151
  proxyMode?: boolean // set true if running inside an iframe and using parent proxy
152
- ngrokSkipBrowserWarning?: boolean // sends 'ngrok-skip-browser-warning: true'
152
+ ngrokSkipBrowserWarning?: boolean // forces header 'ngrok-skip-browser-warning: true'
153
153
  extraHeaders?: Record<string,string> // custom headers merged in each request
154
154
  })
155
+
156
+ // Auto-detection: If baseURL contains '.ngrok.io' or '.ngrok-free.dev' the header is added automatically
157
+ // unless you explicitly set ngrokSkipBrowserWarning: false.
155
158
  ```
156
159
 
157
160
  When embedding the SDK in an iframe with `proxyMode: true`, you can also use:
@@ -67,7 +67,7 @@ export var authKit;
67
67
  * Collection-based AuthKit
68
68
  * =================================== */
69
69
  async function load(authKitId) {
70
- const path = `/authKit/${encodeURIComponent(authKitId)}`;
70
+ const path = `/authKit/${encodeURIComponent(authKitId)}/config`;
71
71
  return request(path);
72
72
  }
73
73
  authKit.load = load;
package/dist/http.js CHANGED
@@ -24,7 +24,8 @@ export function initializeApi(options) {
24
24
  bearerToken = options.bearerToken;
25
25
  proxyMode = !!options.proxyMode;
26
26
  // Auto-enable ngrok skip header if domain contains .ngrok.io and user did not explicitly set the flag.
27
- const inferredNgrok = /\.ngrok\.io(\b|\/)/i.test(baseURL);
27
+ // Infer ngrok usage from common domains (.ngrok.io or .ngrok-free.dev)
28
+ const inferredNgrok = /(\.ngrok\.io|\.ngrok-free\.dev)(\b|\/)/i.test(baseURL);
28
29
  ngrokSkipBrowserWarning = options.ngrokSkipBrowserWarning !== undefined
29
30
  ? !!options.ngrokSkipBrowserWarning
30
31
  : inferredNgrok;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proveanything/smartlinks",
3
- "version": "1.0.46",
3
+ "version": "1.0.48",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",