Skip to main content
Version: v1.0.0(int)

OrganizationSettings

Org-private settings — branding, billing address, logo, defaults. Lives in the org schema (moves to the per-tenant DB at physical split). One row per org.

Tables owned

TablePurpose
org.organization_settingsSingle-row table per org. Branding / billing / address / logo fields.

Operations

Writes

  • upsert(conn, patch)OrganizationSettings. Creates the settings row on first write; updates on subsequent calls. Tenant comes from app.org_id. logoUrl is just one of the patch fields — clients upload the logo to their own storage and PATCH the URL via E014.

Reads

  • get(conn)OrganizationSettings | null. Returns the row for the current org (app.org_id).
  • listByOrgIds(conn, orgIds)OrganizationSettings[]. Cross-tenant batched read by org_id, intended for platform-layer workflows (e.g. /me) that span all orgs a user belongs to and therefore run outside any single app.org_id context. Caller is responsible for authorization — pass only org_ids the user is permitted to see. Missing rows are simply omitted.