2023-01-27 03:22:44 -08:00
|
|
|
import type { INodeProperties } from 'n8n-workflow';
|
2021-02-22 04:11:51 -08:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const userOperations: INodeProperties[] = [
|
2021-02-22 04:11:51 -08:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
2022-05-20 14:47:24 -07:00
|
|
|
noDataExpression: true,
|
2021-02-22 04:11:51 -08:00
|
|
|
default: 'get',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Get',
|
|
|
|
value: 'get',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Get a user',
|
2021-02-22 04:11:51 -08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['user'],
|
2021-02-22 04:11:51 -08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|
2021-02-22 04:11:51 -08:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const userFields: INodeProperties[] = [
|
2021-02-22 04:11:51 -08:00
|
|
|
// ----------------------------------
|
|
|
|
// user: get
|
|
|
|
// ----------------------------------
|
|
|
|
{
|
|
|
|
displayName: 'Self',
|
|
|
|
name: 'self',
|
|
|
|
type: 'boolean',
|
|
|
|
default: true,
|
|
|
|
required: true,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Whether to return details on the logged-in user',
|
2021-02-22 04:11:51 -08:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['user'],
|
|
|
|
operation: ['get'],
|
2021-02-22 04:11:51 -08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'User ID',
|
|
|
|
name: 'userId',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The ID of the user to retrieve',
|
2021-02-22 04:11:51 -08:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['user'],
|
|
|
|
operation: ['get'],
|
|
|
|
self: [false],
|
2021-02-22 04:11:51 -08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|