2021-01-15 16:34:46 -08:00
|
|
|
import {
|
|
|
|
INodeProperties,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
export const myAccountOperations = [
|
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'myAccount',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
2021-01-17 10:11:03 -08:00
|
|
|
name: 'Get',
|
|
|
|
value: 'get',
|
2021-01-15 16:34:46 -08:00
|
|
|
},
|
2021-01-17 10:11:03 -08:00
|
|
|
],
|
|
|
|
default: 'get',
|
|
|
|
description: 'Operation to perform',
|
|
|
|
},
|
|
|
|
] as INodeProperties[];
|
|
|
|
|
|
|
|
|
|
|
|
export const myAccountFields = [
|
|
|
|
{
|
|
|
|
displayName: 'Details',
|
|
|
|
name: 'details',
|
|
|
|
type: 'options',
|
|
|
|
required: true,
|
|
|
|
default: 'identity',
|
|
|
|
description: 'Details of my account to retrieve',
|
|
|
|
options: [
|
2021-01-15 16:34:46 -08:00
|
|
|
{
|
2021-01-17 10:11:03 -08:00
|
|
|
name: 'Identity',
|
|
|
|
value: 'identity',
|
2021-01-15 16:34:46 -08:00
|
|
|
description: 'Return the identity of the logged-in user',
|
|
|
|
},
|
|
|
|
{
|
2021-01-17 10:11:03 -08:00
|
|
|
name: 'Blocked users',
|
|
|
|
value: 'blockedUsers',
|
|
|
|
description: 'Return the blocked users of the logged-in user',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Friends',
|
|
|
|
value: 'friends',
|
|
|
|
description: 'Return the friends of the logged-in user',
|
2021-01-15 16:34:46 -08:00
|
|
|
},
|
|
|
|
{
|
2021-01-17 10:11:03 -08:00
|
|
|
name: 'Karma',
|
|
|
|
value: 'karma',
|
|
|
|
description: 'Return the subreddit karma for the logged-in user',
|
2021-01-15 16:34:46 -08:00
|
|
|
},
|
|
|
|
{
|
2021-01-19 07:48:15 -08:00
|
|
|
name: 'Preferences',
|
2021-01-17 10:11:03 -08:00
|
|
|
value: 'prefs',
|
|
|
|
description: 'Return the settings preferences of the logged-in user',
|
2021-01-15 16:34:46 -08:00
|
|
|
},
|
|
|
|
{
|
2021-01-17 10:11:03 -08:00
|
|
|
name: 'Trophies',
|
|
|
|
value: 'trophies',
|
|
|
|
description: 'Return the trophies of the logged-in user',
|
2021-01-15 16:34:46 -08:00
|
|
|
},
|
|
|
|
],
|
2021-01-17 10:11:03 -08:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'myAccount',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'get',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2021-01-15 16:34:46 -08:00
|
|
|
},
|
2021-01-17 12:18:17 -08:00
|
|
|
] as INodeProperties[];
|