cityworks
    Preparing search index...

    Class Employee

    A plugin that contains "general" methods for a Cityworks install

    Index

    Methods

    • Add a new employee

      Parameters

      • employee: EmployeeBase

        The employee information. LastName is a required field.

      Returns Promise<unknown>

      Returns Promise object that represents an object that is the newly-added user

    • Add a licenses to an employee

      Parameters

      • employeeIds: Number[]

        The IDs of the employees to whom to add licenses.

      • licenseCodes: string[]

        The license codes to add.

      Returns Promise<unknown>

      Returns Promise object that represents an object that is the newly-added user

    • Get all employees

      Parameters

      • inactive: boolean = false

      Returns Promise<unknown>

      Returns Promise object that represents an object that is the newly-added user

    • Get the employees in the group with the given group ID.

      Parameters

      • groupId: number

        Which group to get employee list.

      • inactive: boolean = false

        Whether to include inactive employees.

      Returns Promise<unknown>

      Returns Promise object that represents an object that is the newly-added user

    • Check names for uniqueness

      Parameters

      • namesToCheck: string[]

        an array list of the names (strings) to check for uniqueness

      Returns Promise<unknown>

      Returns Promise object that represents an object that is the newly-added user

    • Get employee custom data fields by id

      Parameters

      • employeeSid: number

        employeeSid with which the custom fields are associated

      • OptionalcustFieldIds: string[]

        which custom field IDs to retrieve.

      Returns Promise<unknown>

      Returns Promise object that represents an object that is the newly-added user

    • Delete by ID

      Parameters

      • employeeSids: number[]

        The SIDs of the employees to delete.

      Returns Promise<unknown>

      Returns Promise object that represents an object that is the newly-added user

    • Delete licenses from an employee

      Parameters

      • employeeIds: Number[]

        The IDs of the employees from whom to delete licenses.

      • licenseCodes: string[]

        The license codes to delete.

      Returns Promise<unknown>

      Returns Promise object that represents an object that is the newly-added user

    • Get employee by ID

      Parameters

      • employeeSid: number

        The SID of the employee to retrieve.

      Returns Promise<unknown>

      Returns Promise object that represents an object that is the newly-added user

    • Get employees by IDs

      Parameters

      • employeeSids: number[]

        The SIDs of the employees to retrieve.

      Returns Promise<unknown>

      Returns Promise object that represents an object that is the newly-added user

    • Get groups that given employees are member of by employee sids.

      Parameters

      • employeeSids: number[]

        The SIDs of the employees to retrieve groups for.

      Returns Promise<unknown>

      Returns Promise object that represents an object that is the newly-added user

    • Search for employees

      Parameters

      • searchParameters: {
            AdDomain?: string[];
            DomainId?: number[];
            Email?: string[];
            EmployeeId?: string[];
            EmployeeSid?: number[];
            FirstName?: string[];
            FullName?: string[];
            IsUser?: Boolean;
            LastName?: string[];
            LoginName?: string[];
            Organization?: string[];
            UniqueName?: string[];
        }

        an object of employee properties to search for. Support properties are: AdDomain, DomainId, Email, EmployeeId, EmployeeSid, LoginName, UniqueName, FirstName, Lastname, FullName, IsUser, Organization

      • active: boolean = true

        search by active or all employees. Default is false (active only).

      • maxResults: number = 20

        the maximum number of results to return. Default is 20.

      Returns Promise<unknown>

      Returns Promise object that represents an object that is the newly-added user

    • Update existing employee(s)

      Parameters

      • employeeSids: number | number[]

        The SIDs of the employees to update.

      • employeeProperties: EmployeeBase

      Returns Promise<unknown>

      Returns Promise object that represents an object that is the updated user