工作队列管理对象

工作队列的增删改查

interface Manager {
    addPortalUsersByID: ((qID, portalUserIDs) => void);
    addPublicGroupsByID: ((qID, groupIDs) => void);
    addRolesAndSubsByID: ((qID, RoleIDs) => void);
    addRolesByID: ((qID, RoleIDs) => void);
    addUsersByID: ((qID, userIDs) => void);
    create: ((ps) => string);
    getByID: ((id) => Queue);
    getByName: ((name) => Queue);
    getList: ((qo?) => Queue[]);
    getPortalUsersByID: ((qID, qo?) => string[]);
    getPublicGroupsByID: ((qID, qo?) => string[]);
    getRolesAndSubsByID: ((qID, qo?) => string[]);
    getRolesByID: ((qID, qo?) => string[]);
    getUsersByID: ((qID, qo?) => string[]);
    remove: ((id) => void);
    removePortalUsersByID: ((qID, portalUserIDs) => void);
    removePublicGroupsByID: ((qID, groupIDs) => void);
    removeRolesAndSubsByID: ((qID, RoleIDs) => void);
    removeRolesByID: ((qID, RoleIDs) => void);
    removeUsersByID: ((qID, userIDs) => void);
}

Properties

addPortalUsersByID: ((qID, portalUserIDs) => void)

添加业务用户

Type declaration

    • (qID, portalUserIDs): void
    • Parameters

      • qID: string
      • portalUserIDs: string[]

      Returns void

addPublicGroupsByID: ((qID, groupIDs) => void)

添加公共组

Type declaration

    • (qID, groupIDs): void
    • Parameters

      • qID: string
      • groupIDs: string[]

      Returns void

addRolesAndSubsByID: ((qID, RoleIDs) => void)

添加角色及下属

Type declaration

    • (qID, RoleIDs): void
    • Parameters

      • qID: string
      • RoleIDs: string[]

      Returns void

addRolesByID: ((qID, RoleIDs) => void)

添加角色

Type declaration

    • (qID, RoleIDs): void
    • Parameters

      • qID: string
      • RoleIDs: string[]

      Returns void

addUsersByID: ((qID, userIDs) => void)

添加用户

Type declaration

    • (qID, userIDs): void
    • Parameters

      • qID: string
      • userIDs: string[]

      Returns void

create: ((ps) => string)

创建工作队列

Type declaration

    • (ps): string
    • Parameters

      • ps: QueueOpts

        工作队列创建参数。必填参数:name、label、memberMap,且memberMap至少包含一个成员。

      Returns string

Example

import * as queue from "queue"
let mgr = queue.newManager()
let id = mgr.create({ name: "test",
label: "test",
memberMap: { user: [{租户ID},] } })
let testQueue = mgr.getByID(id)

Returns

角色ID

getByID: ((id) => Queue)

获取工作队列

Type declaration

    • (id): Queue
    • Parameters

      • id: string

        工作队列ID

      Returns Queue

getByName: ((name) => Queue)

获取工作队列

Type declaration

    • (name): Queue
    • Parameters

      • name: string

        工作队列名称

      Returns Queue

getList: ((qo?) => Queue[])

获取工作队列列表

Type declaration

Returns

工作队列列表(不包含成员信息和队列对象信息)

getPortalUsersByID: ((qID, qo?) => string[])

获取成员业务用户

Type declaration

    • (qID, qo?): string[]
    • Parameters

      Returns string[]

getPublicGroupsByID: ((qID, qo?) => string[])

获取成员公共组

Type declaration

    • (qID, qo?): string[]
    • Parameters

      Returns string[]

getRolesAndSubsByID: ((qID, qo?) => string[])

获取成员角色及下属

Type declaration

    • (qID, qo?): string[]
    • Parameters

      Returns string[]

getRolesByID: ((qID, qo?) => string[])

获取成员角色

Type declaration

    • (qID, qo?): string[]
    • Parameters

      Returns string[]

getUsersByID: ((qID, qo?) => string[])

获取成员用户

Type declaration

    • (qID, qo?): string[]
    • Parameters

      Returns string[]

remove: ((id) => void)

删除工作队列

Type declaration

    • (id): void
    • Parameters

      • id: string

        工作队列ID

      Returns void

removePortalUsersByID: ((qID, portalUserIDs) => void)

移除成员业务用户

Type declaration

    • (qID, portalUserIDs): void
    • Parameters

      • qID: string
      • portalUserIDs: string[]

      Returns void

removePublicGroupsByID: ((qID, groupIDs) => void)

移除成员公共组

Type declaration

    • (qID, groupIDs): void
    • Parameters

      • qID: string
      • groupIDs: string[]

      Returns void

removeRolesAndSubsByID: ((qID, RoleIDs) => void)

移除成员角色及下属

Type declaration

    • (qID, RoleIDs): void
    • Parameters

      • qID: string
      • RoleIDs: string[]

      Returns void

removeRolesByID: ((qID, RoleIDs) => void)

移除成员角色

Type declaration

    • (qID, RoleIDs): void
    • Parameters

      • qID: string
      • RoleIDs: string[]

      Returns void

removeUsersByID: ((qID, userIDs) => void)

移除成员用户

Type declaration

    • (qID, userIDs): void
    • Parameters

      • qID: string
      • userIDs: string[]

      Returns void