Functions

create-organization

fn (request: CreateOrganizationRequest): Organization

Create a new organization.

Example

::orgs ::supabase::admin::organizations

org ::orgs/create-organization(::orgs/CreateOrganizationRequest({
  name: "My New Team"
}))
org.id  // => "org-abc-123"

get-organization

fn (slug: Str): Organization

Get details for a specific organization by slug.

list-members

fn (slug: Str): Vec

List members of an organization.

Example

::orgs ::supabase::admin::organizations

members ::orgs/list-members("my-org-slug")
// => [{user_id: "...", user_name: "...", role_name: "Owner", ...}, ...]

list-organization-projects

fn (slug: Str): Vec

List all projects belonging to an organization.

list-organizations

fn (): Vec

List all organizations the authenticated user belongs to.

Example

::orgs ::supabase::admin::organizations

orgs ::orgs/list-organizations()
// => [{id: "org-123", name: "My Team", ...}, ...]

ns alias

Alias of ::supabase::admin::organizations/

Types

CreateOrganizationRequest

CreateOrganizationRequest type {
    name: Str
}

Organization

Organization type {
    id: Str?,
    slug: Str?,
    name: Str?
}

OrganizationMember

OrganizationMember type {
    user_id: Str?,
    user_name: Str?,
    role_name: Str?,
    email: Str?
}