n8n-nodes-alegra-unofficial
Version:
Unofficial Alegra node for n8n - Community integration with Alegra's accounting platform. NOT OFFICIALLY SUPPORTED BY ALEGRA.
314 lines • 8.21 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.taxOperations = void 0;
exports.taxOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['tax'],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a new tax',
action: 'Create a tax',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete a tax',
action: 'Delete a tax',
},
{
name: 'Get',
value: 'get',
description: 'Get a tax by ID',
action: 'Get a tax',
},
{
name: 'Get Many',
value: 'getAll',
description: 'Get many taxes',
action: 'Get many taxes',
},
{
name: 'Update',
value: 'update',
description: 'Update a tax',
action: 'Update a tax',
},
],
default: 'getAll',
},
// Create Tax
{
displayName: 'Name',
name: 'name',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['tax'],
operation: ['create'],
},
},
description: 'Tax name',
},
{
displayName: 'Percentage',
name: 'percentage',
type: 'number',
typeOptions: {
numberPrecision: 2,
},
required: true,
default: 0,
displayOptions: {
show: {
resource: ['tax'],
operation: ['create'],
},
},
description: 'Tax percentage',
},
{
displayName: 'Type',
name: 'type',
type: 'options',
required: true,
options: [
{
name: 'General Tax',
value: 'general',
},
{
name: 'Retention',
value: 'retention',
},
{
name: 'Compound Tax',
value: 'compound',
},
],
default: 'general',
displayOptions: {
show: {
resource: ['tax'],
operation: ['create'],
},
},
description: 'Type of tax',
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['tax'],
operation: ['create'],
},
},
options: [
{
displayName: 'Description',
name: 'description',
type: 'string',
typeOptions: {
rows: 4,
},
default: '',
description: 'Tax description',
},
{
displayName: 'Status',
name: 'status',
type: 'boolean',
default: true,
description: 'Whether the tax is active',
},
],
},
// Get Tax
{
displayName: 'Tax ID',
name: 'id',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['tax'],
operation: ['get', 'delete'],
},
},
description: 'The ID of the tax',
},
// Get All Taxes
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
resource: ['tax'],
operation: ['getAll'],
},
},
default: true,
description: 'Whether to return all results or only up to a given limit',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
resource: ['tax'],
operation: ['getAll'],
returnAll: [false],
},
},
typeOptions: {
minValue: 1,
maxValue: 100,
},
default: 30,
description: 'Max number of results to return',
},
{
displayName: 'Filters',
name: 'filters',
type: 'collection',
placeholder: 'Add Filter',
default: {},
displayOptions: {
show: {
resource: ['tax'],
operation: ['getAll'],
},
},
options: [
{
displayName: 'Type',
name: 'type',
type: 'options',
options: [
{
name: 'All',
value: '',
},
{
name: 'General Tax',
value: 'general',
},
{
name: 'Retention',
value: 'retention',
},
{
name: 'Compound Tax',
value: 'compound',
},
],
default: '',
description: 'Filter by tax type',
},
{
displayName: 'Status',
name: 'status',
type: 'options',
options: [
{
name: 'All',
value: '',
},
{
name: 'Active',
value: 'active',
},
{
name: 'Inactive',
value: 'inactive',
},
],
default: '',
description: 'Filter by status',
},
],
},
// Update Tax
{
displayName: 'Tax ID',
name: 'id',
type: 'string',
required: true,
default: '',
displayOptions: {
show: {
resource: ['tax'],
operation: ['update'],
},
},
description: 'The ID of the tax to update',
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['tax'],
operation: ['update'],
},
},
options: [
{
displayName: 'Name',
name: 'name',
type: 'string',
default: '',
description: 'Tax name',
},
{
displayName: 'Percentage',
name: 'percentage',
type: 'number',
typeOptions: {
numberPrecision: 2,
},
default: 0,
description: 'Tax percentage',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
typeOptions: {
rows: 4,
},
default: '',
description: 'Tax description',
},
{
displayName: 'Status',
name: 'status',
type: 'boolean',
default: true,
description: 'Whether the tax is active',
},
],
},
];
//# sourceMappingURL=tax.operations.js.map