@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.js CHANGED
@@ -2535,6 +2535,11 @@ function createClient(urlOrOptions, browserOptions) {
2535
2535
  });
2536
2536
  }
2537
2537
  if (isServerClientOptions(urlOrOptions)) {
2538
+ if (typeof urlOrOptions === "object" && urlOrOptions !== null && "organizationId" in urlOrOptions && typeof urlOrOptions.organizationId === "string") {
2539
+ console.warn(
2540
+ "[@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, ... }))."
2541
+ );
2542
+ }
2538
2543
  return new Ragable(urlOrOptions);
2539
2544
  }
2540
2545
  if (typeof urlOrOptions === "object" && urlOrOptions !== null && "organizationId" in urlOrOptions && typeof urlOrOptions.organizationId === "string") {