2020-12-13 01:47:52 -08:00
|
|
|
import {
|
|
|
|
INodeProperties,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const userOperations: INodeProperties[] = [
|
2020-12-13 01:47:52 -08:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
2022-05-20 14:47:24 -07:00
|
|
|
noDataExpression: true,
|
2020-12-13 01:47:52 -08:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'user',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Info',
|
|
|
|
value: 'info',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Get information about a user',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Get information about a user',
|
2020-12-13 01:47:52 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Get Presence',
|
|
|
|
value: 'getPresence',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Get online status of a user',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Get a user\'s presence status',
|
2020-12-13 01:47:52 -08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'info',
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|
2020-12-13 01:47:52 -08:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const userFields: INodeProperties[] = [
|
2020-12-13 01:47:52 -08:00
|
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* user:info */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
|
|
|
displayName: 'User ID',
|
|
|
|
name: 'user',
|
|
|
|
type: 'string',
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'getUsers',
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'info',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'user',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
required: true,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The ID of the user to get information about',
|
2020-12-13 01:47:52 -08:00
|
|
|
},
|
|
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* user:getPresence */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
|
|
|
displayName: 'User ID',
|
|
|
|
name: 'user',
|
|
|
|
type: 'string',
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'getUsers',
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'getPresence',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'user',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
required: true,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The ID of the user to get the online status of',
|
2020-12-13 01:47:52 -08:00
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|