UNPKG

n8n-nodes-nimbasms

Version:

Nimba SMS node for n8n - Send SMS, manage contacts, campaigns and more

147 lines (146 loc) 4.28 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.contactFields = exports.contactOperations = void 0; exports.contactOperations = [ { displayName: 'Operation', name: 'operation', type: 'options', noDataExpression: true, displayOptions: { show: { resource: ['contact'], }, }, options: [ { name: 'Create', value: 'create', description: 'Create a new contact', action: 'Create a contact', }, { name: 'Get All', value: 'getAll', description: 'Get all contacts', action: 'Get all contacts', }, ], default: 'create', }, ]; exports.contactFields = [ /* -------------------------------------------------------------------------- */ /* contact:create */ /* -------------------------------------------------------------------------- */ { displayName: 'Phone Number', name: 'numero', type: 'string', displayOptions: { show: { resource: ['contact'], operation: ['create'], }, }, default: '', required: true, description: 'The contact phone number', placeholder: '+224123456789', }, { displayName: 'Additional Fields', name: 'additionalFields', type: 'collection', placeholder: 'Add Field', default: {}, displayOptions: { show: { resource: ['contact'], operation: ['create'], }, }, options: [ { displayName: 'Name', name: 'name', type: 'string', default: '', description: 'The contact name', }, { displayName: 'Groups', name: 'groups', type: 'string', default: '', description: 'Comma-separated list of group names to assign the contact to', placeholder: 'Group1,Group2,Group3', }, ], }, /* -------------------------------------------------------------------------- */ /* contact:getAll */ /* -------------------------------------------------------------------------- */ { displayName: 'Return All', name: 'returnAll', type: 'boolean', displayOptions: { show: { resource: ['contact'], operation: ['getAll'], }, }, default: false, description: 'Whether to return all results or only up to a given limit', }, { displayName: 'Limit', name: 'limit', type: 'number', displayOptions: { show: { resource: ['contact'], operation: ['getAll'], returnAll: [false], }, }, typeOptions: { minValue: 1, }, default: 50, description: 'Max number of results to return', }, { displayName: 'Filters', name: 'filters', type: 'collection', placeholder: 'Add Filter', default: {}, displayOptions: { show: { resource: ['contact'], operation: ['getAll'], }, }, options: [ { displayName: 'Search', name: 'search', type: 'string', default: '', description: 'Search term to filter contacts', }, { displayName: 'Offset', name: 'offset', type: 'number', typeOptions: { minValue: 0, }, default: 0, description: 'The initial index from which to return the results', }, ], }, ];