@blinkdotnew/dev-sdk 2.2.2 → 2.2.3

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.mts CHANGED
@@ -807,7 +807,7 @@ interface BlinkNotifications {
807
807
  email(params: SendEmailRequest): Promise<SendEmailResponse>;
808
808
  }
809
809
 
810
- type ConnectorProvider = 'discord' | 'notion' | 'google_drive' | 'google_calendar' | 'ai';
810
+ type ConnectorProvider = 'discord' | 'notion' | 'google_drive' | 'google_calendar' | 'google_slides' | 'google_docs' | 'google_sheets' | 'slack' | 'linkedin' | 'hubspot' | 'ai';
811
811
  type ConnectorAuthMode = 'oauth' | 'api_key' | 'blink_managed' | 'hybrid';
812
812
  interface ConnectorStatusData {
813
813
  connected: boolean;
package/dist/index.d.ts CHANGED
@@ -807,7 +807,7 @@ interface BlinkNotifications {
807
807
  email(params: SendEmailRequest): Promise<SendEmailResponse>;
808
808
  }
809
809
 
810
- type ConnectorProvider = 'discord' | 'notion' | 'google_drive' | 'google_calendar' | 'ai';
810
+ type ConnectorProvider = 'discord' | 'notion' | 'google_drive' | 'google_calendar' | 'google_slides' | 'google_docs' | 'google_sheets' | 'slack' | 'linkedin' | 'hubspot' | 'ai';
811
811
  type ConnectorAuthMode = 'oauth' | 'api_key' | 'blink_managed' | 'hybrid';
812
812
  interface ConnectorStatusData {
813
813
  connected: boolean;
package/dist/index.js CHANGED
@@ -1266,15 +1266,6 @@ function getSessionStorage() {
1266
1266
  return null;
1267
1267
  }
1268
1268
  }
1269
- function isSafari() {
1270
- if (!hasWindow()) return false;
1271
- const ua = navigator.userAgent.toLowerCase();
1272
- const hasSafariUA = /safari/i.test(ua) && !/chrome|chromium|android/i.test(ua);
1273
- const isSafariVendor = typeof navigator !== "undefined" && /apple computer|apple/i.test(navigator.vendor || "");
1274
- const isIOSSafari = /safari/i.test(ua) && /iphone|ipad|ipod/i.test(ua);
1275
- const hasSafariProperties = typeof window !== "undefined" && "safari" in window && !("chrome" in window);
1276
- return hasSafariUA || isSafariVendor || isIOSSafari || hasSafariProperties;
1277
- }
1278
1269
 
1279
1270
  // src/auth.ts
1280
1271
  var BlinkAuth = class {
@@ -1297,16 +1288,16 @@ var BlinkAuth = class {
1297
1288
  this.authConfig = {
1298
1289
  mode: "managed",
1299
1290
  // Default mode
1300
- authUrl: "https://dev.blink.new",
1301
- coreUrl: "https://core.dev.blink.new",
1291
+ authUrl: "https://blink.new",
1292
+ coreUrl: "https://core.blink.new",
1302
1293
  detectSessionInUrl: true,
1303
1294
  // Default to true for web compatibility
1304
1295
  ...config.auth
1305
1296
  };
1306
- this.authUrl = this.authConfig.authUrl || "https://dev.blink.new";
1307
- this.coreUrl = this.authConfig.coreUrl || "https://core.dev.blink.new";
1297
+ this.authUrl = this.authConfig.authUrl || "https://blink.new";
1298
+ this.coreUrl = this.authConfig.coreUrl || "https://core.blink.new";
1308
1299
  const hostname = getLocationHostname();
1309
- if (hostname && this.authUrl === "https://dev.blink.new" && (hostname === "localhost" || hostname === "127.0.0.1")) {
1300
+ if (hostname && this.authUrl === "https://blink.new" && (hostname === "localhost" || hostname === "127.0.0.1")) {
1310
1301
  console.warn("\u26A0\uFE0F Using default authUrl in development. Set auth.authUrl to your app origin for headless auth endpoints to work.");
1311
1302
  }
1312
1303
  if (config.authRequired !== void 0 && !config.auth?.mode) {
@@ -1358,7 +1349,7 @@ var BlinkAuth = class {
1358
1349
  setupParentWindowListener() {
1359
1350
  if (!isWeb || !this.isIframe || !hasWindow()) return;
1360
1351
  window.addEventListener("message", (event) => {
1361
- if (event.origin !== "https://dev.blink.new" && event.origin !== "https://blink.new" && event.origin !== "http://localhost:3000" && event.origin !== "http://localhost:3001") {
1352
+ if (event.origin !== "https://blink.new" && event.origin !== "http://localhost:3000" && event.origin !== "http://localhost:3001") {
1362
1353
  return;
1363
1354
  }
1364
1355
  if (event.data?.type === "BLINK_AUTH_TOKENS") {
@@ -2021,7 +2012,7 @@ var BlinkAuth = class {
2021
2012
  if (!hasWindow()) {
2022
2013
  throw new BlinkAuthError("NETWORK_ERROR" /* NETWORK_ERROR */, "signInWithProvider requires a browser environment");
2023
2014
  }
2024
- const shouldPreferRedirect = isWeb && this.isIframe || typeof window !== "undefined" && window.crossOriginIsolated === true || isWeb && isSafari();
2015
+ const shouldPreferRedirect = isWeb && this.isIframe || typeof window !== "undefined" && window.crossOriginIsolated === true;
2025
2016
  const state = this.generateState();
2026
2017
  try {
2027
2018
  const sessionStorage = getSessionStorage();
package/dist/index.mjs CHANGED
@@ -1264,15 +1264,6 @@ function getSessionStorage() {
1264
1264
  return null;
1265
1265
  }
1266
1266
  }
1267
- function isSafari() {
1268
- if (!hasWindow()) return false;
1269
- const ua = navigator.userAgent.toLowerCase();
1270
- const hasSafariUA = /safari/i.test(ua) && !/chrome|chromium|android/i.test(ua);
1271
- const isSafariVendor = typeof navigator !== "undefined" && /apple computer|apple/i.test(navigator.vendor || "");
1272
- const isIOSSafari = /safari/i.test(ua) && /iphone|ipad|ipod/i.test(ua);
1273
- const hasSafariProperties = typeof window !== "undefined" && "safari" in window && !("chrome" in window);
1274
- return hasSafariUA || isSafariVendor || isIOSSafari || hasSafariProperties;
1275
- }
1276
1267
 
1277
1268
  // src/auth.ts
1278
1269
  var BlinkAuth = class {
@@ -1295,16 +1286,16 @@ var BlinkAuth = class {
1295
1286
  this.authConfig = {
1296
1287
  mode: "managed",
1297
1288
  // Default mode
1298
- authUrl: "https://dev.blink.new",
1299
- coreUrl: "https://core.dev.blink.new",
1289
+ authUrl: "https://blink.new",
1290
+ coreUrl: "https://core.blink.new",
1300
1291
  detectSessionInUrl: true,
1301
1292
  // Default to true for web compatibility
1302
1293
  ...config.auth
1303
1294
  };
1304
- this.authUrl = this.authConfig.authUrl || "https://dev.blink.new";
1305
- this.coreUrl = this.authConfig.coreUrl || "https://core.dev.blink.new";
1295
+ this.authUrl = this.authConfig.authUrl || "https://blink.new";
1296
+ this.coreUrl = this.authConfig.coreUrl || "https://core.blink.new";
1306
1297
  const hostname = getLocationHostname();
1307
- if (hostname && this.authUrl === "https://dev.blink.new" && (hostname === "localhost" || hostname === "127.0.0.1")) {
1298
+ if (hostname && this.authUrl === "https://blink.new" && (hostname === "localhost" || hostname === "127.0.0.1")) {
1308
1299
  console.warn("\u26A0\uFE0F Using default authUrl in development. Set auth.authUrl to your app origin for headless auth endpoints to work.");
1309
1300
  }
1310
1301
  if (config.authRequired !== void 0 && !config.auth?.mode) {
@@ -1356,7 +1347,7 @@ var BlinkAuth = class {
1356
1347
  setupParentWindowListener() {
1357
1348
  if (!isWeb || !this.isIframe || !hasWindow()) return;
1358
1349
  window.addEventListener("message", (event) => {
1359
- if (event.origin !== "https://dev.blink.new" && event.origin !== "https://blink.new" && event.origin !== "http://localhost:3000" && event.origin !== "http://localhost:3001") {
1350
+ if (event.origin !== "https://blink.new" && event.origin !== "http://localhost:3000" && event.origin !== "http://localhost:3001") {
1360
1351
  return;
1361
1352
  }
1362
1353
  if (event.data?.type === "BLINK_AUTH_TOKENS") {
@@ -2019,7 +2010,7 @@ var BlinkAuth = class {
2019
2010
  if (!hasWindow()) {
2020
2011
  throw new BlinkAuthError("NETWORK_ERROR" /* NETWORK_ERROR */, "signInWithProvider requires a browser environment");
2021
2012
  }
2022
- const shouldPreferRedirect = isWeb && this.isIframe || typeof window !== "undefined" && window.crossOriginIsolated === true || isWeb && isSafari();
2013
+ const shouldPreferRedirect = isWeb && this.isIframe || typeof window !== "undefined" && window.crossOriginIsolated === true;
2023
2014
  const state = this.generateState();
2024
2015
  try {
2025
2016
  const sessionStorage = getSessionStorage();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blinkdotnew/dev-sdk",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "description": "Blink TypeScript SDK for client-side applications - Zero-boilerplate CRUD + auth + AI + analytics + notifications for modern SaaS/AI apps",
5
5
  "keywords": [
6
6
  "blink",