-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathinvite.js
39 lines (31 loc) · 962 Bytes
/
invite.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
'use strict';
const BoxCommand = require('../../box-command');
class UsersInviteUserCommand extends BoxCommand {
async run() {
const { flags, args } = this.parse(UsersInviteUserCommand);
let user = await this.client.enterprise.inviteUser(args.enterpriseID, args.email);
await this.output(user);
}
}
UsersInviteUserCommand.aliases = [ 'users:invite-user' ];
UsersInviteUserCommand.description = 'Invite an Existing Box User to Your Enterprise';
UsersInviteUserCommand.examples = ['box users:invite user@example.com 12345'];
UsersInviteUserCommand._endpoint = 'post_invites';
UsersInviteUserCommand.flags = {
...BoxCommand.flags
};
UsersInviteUserCommand.args = [
{
name: 'email',
required: true,
hidden: false,
description: 'Email address of the user to invite',
},
{
name: 'enterpriseID',
required: true,
hidden: false,
description: 'ID of the Enterprise to invite the user to',
}
];
module.exports = UsersInviteUserCommand;