Skip to main content
Module

x/jamf_school/mod.ts>UserGroup

A simple, secure, correct, and modern Jamf School API wrapper. (Unofficial)
Latest
interface UserGroup
Re-export
import { type UserGroup } from "https://deno.land/x/jamf_school@0.5.0/mod.ts";

UserGroup represents a named group of users.

Properties

readonly
type: "UserGroup"

Discriminator for type checks.

readonly
id: number

The ID of the user group.

readonly
name: string

The name of the user group.

readonly
description: string

A description of the user group (may be empty)

readonly
isParentGroup: boolean | null

Whether the users in this group are parents.

readonly
isTeacherGroup: boolean | null

Whether the users in this group are teachers.

readonly
locationId: number

The ID of this user group's location.

Methods

toJSON(): unknown

Return the data used to create this object.

toString(): string

The name of the user group.

update(): Promise<void>

(Read) Update this user group's data.

Other user groups created from the same data will not be updated.

getUsers(): Promise<User[]>

(Read) Get all the users in the user group.

getLocation(): Promise<Location | null>

(Read) Get the location this user group belongs to.

setName(name: string): Promise<void>

(Edit) Set this user group's description.

This method will not update the object. To update it, call UserGroup.update().

This method is a no-op if the name is the same as the user group's current name.

setDescription(text: string): Promise<void>

(Edit) Set this user group's description.

This method will not update the object. To update it, call UserGroup.update().

This method is a no-op if the description is the same as the user group's current description.

setParentGroup(status: boolean | null): Promise<void>

(Edit) Set whether the users in this group are parents.

A value of true indicates that users in this group are parents. false indicates that they are not. Using null means the users will inherit their status.

This method will not update the object. To update it, call UserGroup.update().

This method is a no-op if the user group is already a parent group.

setTeacherGroup(status: boolean | null): Promise<void>

(Edit) Set whether the users in this group are teachers.

A value of true indicates that users in this group are teachers. false indicates that they are not. Using null means the users will inherit their status.

This method will not update the object. To update it, call UserGroup.update().

This method is a no-op if the user group is already a teacher group.