2022-08-01 13:47:55 -07:00
|
|
|
import { INodeProperties } from 'n8n-workflow';
|
2020-04-20 07:35:58 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const guestOperations: INodeProperties[] = [
|
2020-04-20 07:35:58 -07:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
2022-05-20 14:47:24 -07:00
|
|
|
noDataExpression: true,
|
2020-04-20 07:35:58 -07:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['guest'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Create',
|
|
|
|
value: 'create',
|
|
|
|
description: 'Create a guest',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Create a guest',
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Delete',
|
|
|
|
value: 'delete',
|
|
|
|
description: 'Delete a guest',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Delete a guest',
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Get',
|
|
|
|
value: 'get',
|
|
|
|
description: 'Get a guest',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Get a guest',
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Update',
|
|
|
|
value: 'update',
|
|
|
|
description: 'Update a guest',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Update a guest',
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'create',
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|
2020-04-20 07:35:58 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const guestFields: INodeProperties[] = [
|
2021-03-24 15:01:12 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* guest:create */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
2020-04-20 07:35:58 -07:00
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
displayName: 'Team Name or ID',
|
2020-04-20 21:57:39 -07:00
|
|
|
name: 'team',
|
2020-04-20 07:35:58 -07:00
|
|
|
type: 'options',
|
2022-08-01 13:47:55 -07:00
|
|
|
description:
|
|
|
|
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
2020-04-20 07:35:58 -07:00
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['guest'],
|
|
|
|
operation: ['create'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'getTeams',
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Email',
|
|
|
|
name: 'email',
|
|
|
|
type: 'string',
|
2022-06-20 07:54:01 -07:00
|
|
|
placeholder: 'name@email.com',
|
2020-04-20 07:35:58 -07:00
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['guest'],
|
|
|
|
operation: ['create'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Additional Fields',
|
|
|
|
name: 'additionalFields',
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
default: {},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['guest'],
|
|
|
|
operation: ['create'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Can Edit Tags',
|
|
|
|
name: 'can_edit_tags',
|
|
|
|
type: 'boolean',
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Can See Time Spend',
|
|
|
|
name: 'can_see_time_spend',
|
|
|
|
type: 'boolean',
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
displayName: 'Can See Time Estimated',
|
2020-04-20 07:35:58 -07:00
|
|
|
name: 'can_see_time_estimated',
|
|
|
|
type: 'boolean',
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2021-03-24 15:01:12 -07:00
|
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* guest:delete */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
2020-04-20 07:35:58 -07:00
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
displayName: 'Team Name or ID',
|
2020-04-20 21:57:39 -07:00
|
|
|
name: 'team',
|
2020-04-20 07:35:58 -07:00
|
|
|
type: 'options',
|
2022-08-01 13:47:55 -07:00
|
|
|
description:
|
|
|
|
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
2020-04-20 07:35:58 -07:00
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['guest'],
|
|
|
|
operation: ['delete'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'getTeams',
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Guest ID',
|
2020-04-20 21:57:39 -07:00
|
|
|
name: 'guest',
|
2020-04-20 07:35:58 -07:00
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['guest'],
|
|
|
|
operation: ['delete'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
},
|
2021-03-24 15:01:12 -07:00
|
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* guest:get */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
2020-04-20 07:35:58 -07:00
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
displayName: 'Team Name or ID',
|
2020-04-20 21:57:39 -07:00
|
|
|
name: 'team',
|
2020-04-20 07:35:58 -07:00
|
|
|
type: 'options',
|
2022-08-01 13:47:55 -07:00
|
|
|
description:
|
|
|
|
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
2020-04-20 07:35:58 -07:00
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['guest'],
|
|
|
|
operation: ['get'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'getTeams',
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Guest ID',
|
2020-04-20 21:57:39 -07:00
|
|
|
name: 'guest',
|
2020-04-20 07:35:58 -07:00
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['guest'],
|
|
|
|
operation: ['get'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
},
|
2021-03-24 15:01:12 -07:00
|
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* guest:update */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
2020-04-20 07:35:58 -07:00
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
displayName: 'Team Name or ID',
|
2020-04-20 21:57:39 -07:00
|
|
|
name: 'team',
|
2020-04-20 07:35:58 -07:00
|
|
|
type: 'options',
|
2022-08-01 13:47:55 -07:00
|
|
|
description:
|
|
|
|
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
2020-04-20 07:35:58 -07:00
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['guest'],
|
|
|
|
operation: ['update'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'getTeams',
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Guest ID',
|
2020-04-20 21:57:39 -07:00
|
|
|
name: 'guest',
|
2020-04-20 07:35:58 -07:00
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['guest'],
|
|
|
|
operation: ['update'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Update Fields',
|
|
|
|
name: 'updateFields',
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
default: {},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['guest'],
|
|
|
|
operation: ['update'],
|
2020-04-20 07:35:58 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Can Edit Tags',
|
|
|
|
name: 'can_edit_tags',
|
|
|
|
type: 'boolean',
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Can See Time Spend',
|
|
|
|
name: 'can_see_time_spend',
|
|
|
|
type: 'boolean',
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
displayName: 'Can See Time Estimated',
|
2020-04-20 07:35:58 -07:00
|
|
|
name: 'can_see_time_estimated',
|
|
|
|
type: 'boolean',
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Username',
|
|
|
|
name: 'username',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|