SuperAPI AI Directory

ziniao-staff

Office & productivity

View repository

Updated 10-16 09:45

About this skill

Employee Management

CRITICAL — Before starting, you MUST first use the Read tool to read ../ziniao-shared/SKILL.md, which contains authentication, error handling, and security rules CRITICAL — Before executing any Shortcuts, you MUST first use the Read tool to read the corresponding references/ documentation, and must not directly call commands blindly.

Core Scenarios

Query Employees

Supports multiple filter conditions, with enum values mapped to human-readable form. Note: by default the results include deleted employees; when taking IDs for subsequent operations, it is recommended to add --status active。

ziniao-cli staff list --name "张三" --status active --format table
ziniao-cli staff list --role boss --page-all
ziniao-cli staff list --department-id 15868464646076

Create Employee

The raw API requires nested JSON with 20+ fields; the CLI simplifies it to core flags + smart defaults (--department-id required):

ziniao-cli staff create --username "zhangsan" --name "张三" --password "Pass123!" --role-id 16691047257645 --department-id 15868464646076

Smart defaults:authDevide=1(all-device authorization),authClient=全部允许、isLimitLogin=0.\nThe login date is sent as a valid date by default:loginLimitStartDate=今天、loginLimitEndDate=2099-12-31, and can also be specified via --login-start-date / --login-end-date .

Enable/Disable/Delete

The raw API is a single endpoint distinguished by the status field; the CLI splits it into 3 semantic commands:

ziniao-cli staff enable --id 16524289555087
ziniao-cli staff disable --id "id1,id2,id3"   # 支持批量
ziniao-cli staff remove --id 16524289555087    # high-risk-write

Enum Mapping

flag Available Values Corresponding API Value
--status active / disabled / deleted delflag: 0/1/2
--role boss / manager / employee / admin level: 0/1/2/3
--device-auth auto / first / approve / phone authDevide: 1/2/3/4
--allow-clients windows,mac,web,android,ios,linux,miniapp or all authClient nested object

Shortcuts

Command Description Detailed Documentation
staff list Query employee list references/ziniao-staff-list.md
staff create Add employee references/ziniao-staff-create.md
staff update Modify employee Send only the modified fields:--id xxx --name "新名", underlying path /superbrowser/rest/v2/erp/staff/modify
staff enable Enable employee references/ziniao-staff-enable-disable.md
staff disable Disable employee Same as above
staff remove Delete employee high-risk-write
staff transfer Transfer --staff-id xxx --department-id yyy

Generic api coverage

ziniao-cli api /superbrowser/rest/v1/erp/staff/list --data '{"page":1,"limit":10}'
ziniao-cli api /superbrowser/rest/v2/erp/staff/add --data '{...}'
ziniao-cli api /superbrowser/rest/v2/erp/staff/modify --data '{...}'
ziniao-cli api /superbrowser/rest/v1/erp/staff/status --data '{"staffIds":["xxx"],"status":"1"}'
ziniao-cli api /superbrowser/rest/v1/erp/staff/department --data '{"staffIds":["xxx"],"departmentIds":["yyy"]}'