@ragable/sdk 0.6.7 → 0.6.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.mjs CHANGED
@@ -2462,6 +2462,11 @@ function createClient(urlOrOptions, browserOptions) {
2462
2462
  });
2463
2463
  }
2464
2464
  if (isServerClientOptions(urlOrOptions)) {
2465
+ if (typeof urlOrOptions === "object" && urlOrOptions !== null && "organizationId" in urlOrOptions && typeof urlOrOptions.organizationId === "string") {
2466
+ console.warn(
2467
+ "[@ragable/sdk] createClient: `apiKey` is set, so the server client is returned. It has no `database` or `auth` \u2014 only `agents` and `shift`. For `database.from()` / `auth.*`, use the browser client without `apiKey` (e.g. createClient(ragableUrl, { organizationId, authGroupId, databaseInstanceId, ... }))."
2468
+ );
2469
+ }
2465
2470
  return new Ragable(urlOrOptions);
2466
2471
  }
2467
2472
  if (typeof urlOrOptions === "object" && urlOrOptions !== null && "organizationId" in urlOrOptions && typeof urlOrOptions.organizationId === "string") {