Hiyve Components - v1.0.0
    Preparing search index...

    Class AdminClient

    Index

    Constructors

    Methods

    • Add origin(s) to the allowed list for an organization.

      Parameters

      • orgId: string

        Organization ID

      • origins: string[]

        Origins to add

      Returns Promise<AllowedOriginsResponse>

    • Add a role to a user profile. Idempotent — if the role is already present, the profile is returned unchanged without an update call. Preserves all other roles.

      Parameters

      • profileId: string

        Profile ID

      • role: string

        Role string to add (e.g. 'public-files')

      • OptionalbrandOrgId: string

        Organization ID. If omitted, defaults to the org associated with the API key.

      Returns Promise<UserProfile>

      The updated profile (or the original, unchanged, if the role was already present).

      Implemented as read-modify-write against the underlying profile endpoint, which is not atomic. Concurrent addRole/removeRole calls on the same profile can race and lose updates. Callers should serialize role mutations per profile (typical sign-up / admin flows already do this naturally).

    • Deactivate (soft-delete) a user profile.

      Parameters

      • profileId: string

        Profile ID

      • OptionalbrandOrgId: string

        Organization ID. If omitted, defaults to the org associated with the API key.

      Returns Promise<{ message: string; profile: UserProfile }>

    • Get a single user profile by ID.

      Parameters

      • profileId: string

        Profile ID

      • OptionalbrandOrgId: string

        Organization ID. If omitted, defaults to the org associated with the API key.

      Returns Promise<UserProfile>

    • Remove origin(s) from the allowed list for an organization.

      Parameters

      • orgId: string

        Organization ID

      • origins: string[]

        Origins to remove

      Returns Promise<AllowedOriginsResponse>

    • Remove a role from a user profile. Idempotent — if the role is not present, the profile is returned unchanged without an update call. Preserves all other roles.

      Parameters

      • profileId: string

        Profile ID

      • role: string

        Role string to remove

      • OptionalbrandOrgId: string

        Organization ID. If omitted, defaults to the org associated with the API key.

      Returns Promise<UserProfile>

      The updated profile (or the original, unchanged, if the role was absent).

      Implemented as read-modify-write against the underlying profile endpoint, which is not atomic. Concurrent addRole/removeRole calls on the same profile can race and lose updates. Callers should serialize role mutations per profile.

    • Replace all allowed origins for an organization.

      Parameters

      • orgId: string

        Organization ID

      • origins: string[]

        Complete list of allowed origins (replaces existing)

      Returns Promise<AllowedOriginsResponse>

    • Update a user profile's core fields.

      Roles are stripped defensively — they cannot be set via this method. Use addRole / removeRole for role changes.

      Parameters

      • profileId: string

        Profile ID

      • updates: UpdateProfileData

        Fields to update

      • OptionalbrandOrgId: string

        Organization ID. If omitted, defaults to the org associated with the API key.

      Returns Promise<UserProfile>