import { createApiClient, throwApiError } from './chunk-XXPK7INX.js';

// src/commands/auth/api.ts
async function fetchOrgs(token) {
  const client = createApiClient(token);
  const { data, error, response } = await client.GET("/v1/auth/orgs");
  if (error) {
    throwApiError("Failed to fetch orgs", response.status, error.detail);
  }
  return data.organizations;
}

export { fetchOrgs };
//# sourceMappingURL=chunk-IWBPL7VB.js.map
//# sourceMappingURL=chunk-IWBPL7VB.js.map