@cfxlabsinc/b2b-services
    Preparing search index...
    Index
    • Creates an organization.

      name may only contain alphanumeric characters, spaces and underscores — callers are expected to sanitize before calling.

      Parameters

      • __namedParameters: {
            customRoleMappingName?: string;
            domain?: string;
            enableAutoJoiningByDomain?: boolean;
            legacyOrgId?: string;
            maxUsers?: number;
            membersMustHaveMatchingDomain?: boolean;
            name: string;
        }

      Returns Promise<CreatedOrg>

    • Queries organizations. domain matches an org's configured domain, which is how onboarding decides whether a workspace already exists.

      This is a POST despite being a read — that is PropelAuth's contract, not a mistake.

      Parameters

      • __namedParameters: {
            domain?: string;
            legacyOrgId?: string;
            name?: string;
            orderBy?: "CREATED_AT_ASC" | "CREATED_AT_DESC" | "NAME";
            pageNumber?: number;
            pageSize?: number;
        } = {}

      Returns Promise<OrgQueryResponse>

    • Fetches a single user.

      Returns null when PropelAuth has no such user — callers already branch on that, so it stays a value rather than an exception.

      Parameters

      • userId: string
      • includeOrgs: boolean = false

        populates orgIdToOrgInfo with per-org roles and permissions. Off by default; the payload is meaningfully larger with it on.

      Returns Promise<UserMetadata | null>