From 19d90e91fb8001f7285089600d80c7d8dbe536d0 Mon Sep 17 00:00:00 2001 From: Santiago Botero Ruiz Date: Mon, 17 Jan 2022 11:20:09 -0500 Subject: [PATCH 1/2] feat: added team endpoints to onfleet node Added team auto-dispatch and driver time estimate endpoints to Onfleet node --- .../nodes-base/nodes/Onfleet/Onfleet.node.ts | 61 +++- .../Onfleet/descriptions/TeamDescription.ts | 281 ++++++++++++++++++ .../nodes-base/nodes/Onfleet/interfaces.ts | 17 ++ 3 files changed, 358 insertions(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/Onfleet/Onfleet.node.ts b/packages/nodes-base/nodes/Onfleet/Onfleet.node.ts index 3650ea466eefa..6a21eb0f1b016 100644 --- a/packages/nodes-base/nodes/Onfleet/Onfleet.node.ts +++ b/packages/nodes-base/nodes/Onfleet/Onfleet.node.ts @@ -16,9 +16,11 @@ import { OnfleetTask, OnfleetTaskComplete, OnfleetTaskUpdate, + OnfleetTeamAutoDispatch, OnfleetTeams, OnfleetWebhook, OnfleetWorker, + OnfleetWorkerEstimates, OnfleetWorkerFilter, OnfleetWorkerSchedule } from './interfaces'; @@ -525,7 +527,7 @@ export class Onfleet implements INodeType { * @param operation Current team opration * @returns {OnfleetTeams} Team information */ - static getTeamFields(this: IExecuteFunctions, item: number, operation: string): OnfleetTeams | null { + static getTeamFields(this: IExecuteFunctions, item: number, operation: string): OnfleetTeams | OnfleetWorkerEstimates | OnfleetTeamAutoDispatch | null { if (operation === 'create') { /* -------------------------------------------------------------------------- */ /* Get fields to create a team */ @@ -555,6 +557,47 @@ export class Onfleet implements INodeType { } Object.assign(teamData, additionalFields); return teamData; + } else if (operation === 'getTimeEstimates') { + /* -------------------------------------------------------------------------- */ + /* Get driver time estimates for tasks that haven't been created yet */ + /* -------------------------------------------------------------------------- */ + const dropoff = this.getNodeParameter('dropoff', item) as boolean; + const pickup = this.getNodeParameter('pickup', item) as boolean; + if (!dropoff && !pickup) throw new Error('At least 1 of dropoffLocation or pickupLocation must be selected'); + const longitudeField = `${dropoff ? 'dropoff' : 'pickup'}Longitude`; + const latitudeField = `${dropoff ? 'dropoff' : 'pickup'}Latitude`; + const longitude = this.getNodeParameter(longitudeField, item) as string; + const latitude = this.getNodeParameter(latitudeField, item) as string; + + const wokrerTimeEstimates = {} as OnfleetWorkerEstimates; + if (pickup) { + wokrerTimeEstimates.pickupLocation = `${longitude},${latitude}`; + wokrerTimeEstimates.pickupTime = (new Date(this.getNodeParameter('pickupTime', item) as Date)).getTime() / 1000; + } + if(dropoff) { + wokrerTimeEstimates.dropoffLocation = `${longitude},${latitude}`; + } + + const additionalFields = this.getNodeParameter('additionalFields', item) as IDataObject; + Object.assign(wokrerTimeEstimates, additionalFields); + return wokrerTimeEstimates; + } else if (operation === 'autoDispatch') { + /* -------------------------------------------------------------------------- */ + /* Dynamically dispatching tasks on the fly */ + /* -------------------------------------------------------------------------- */ + const teamAutoDispatch = {} as OnfleetTeamAutoDispatch; + const { + taskTimeWindow, scheduleTimeWindow, ...additionalFields + } = this.getNodeParameter('additionalFields', item) as IDataObject; + if (taskTimeWindow) { + teamAutoDispatch.taskTimeWindow= JSON.parse((taskTimeWindow as string)); + } + if (scheduleTimeWindow) { + teamAutoDispatch.scheduleTimeWindow= JSON.parse((scheduleTimeWindow as string)); + } + + Object.assign(teamAutoDispatch, additionalFields); + return teamAutoDispatch; } return null; } @@ -1176,6 +1219,22 @@ export class Onfleet implements INodeType { const id = this.getNodeParameter('id', index) as string; const path = `${resource}/${id}`; responseData.push(await onfleetApiRequest.call(this, 'DELETE', encodedApiKey, path)); + } else if (operation === 'getTimeEstimates') { + /* -------------------------------------------------------------------------- */ + /* Get driver time estimates for tasks that haven't been created yet */ + /* -------------------------------------------------------------------------- */ + const id = this.getNodeParameter('id', index) as string; + const workerTimeEstimates = Onfleet.getTeamFields.call(this, index, operation) as OnfleetWorkerSchedule; + const path = `${resource}/${id}/estimate`; + responseData.push(await onfleetApiRequest.call(this, 'GET', encodedApiKey, path, {}, workerTimeEstimates)); + } else if (operation === 'autoDispatch') { + /* -------------------------------------------------------------------------- */ + /* Dynamically dispatching tasks on the fly */ + /* -------------------------------------------------------------------------- */ + const id = this.getNodeParameter('id', index) as string; + const teamAutoDispatch = Onfleet.getTeamFields.call(this, index, operation) as OnfleetWorkerSchedule; + const path = `${resource}/${id}/dispatch`; + responseData.push(await onfleetApiRequest.call(this, 'POST', encodedApiKey, path, teamAutoDispatch)); } } catch (error) { if (this.continueOnFail()) { diff --git a/packages/nodes-base/nodes/Onfleet/descriptions/TeamDescription.ts b/packages/nodes-base/nodes/Onfleet/descriptions/TeamDescription.ts index c550ee1164a15..1eeabfe70af3a 100644 --- a/packages/nodes-base/nodes/Onfleet/descriptions/TeamDescription.ts +++ b/packages/nodes-base/nodes/Onfleet/descriptions/TeamDescription.ts @@ -38,6 +38,16 @@ export const teamOperations = [ value: 'getAll', description: 'List all Onfleet teams.', }, + { + name: 'Auto-Dispatch', + value: 'autoDispatch', + description: 'Dynamically dispatching tasks on the fly.', + }, + { + name: 'Get time estimates', + value: 'getTimeEstimates', + description: 'The Driver Time Estimates endpoint allows an API user to get estimated times for tasks that haven\'t been created yet.', + }, ], default: 'getAll', }, @@ -83,6 +93,169 @@ const enableSelfAssignmentField = { description: 'This toggles Team Self-Assignment that allows Drivers to Self Assign Tasks that are in the Team unassigned container.', } as INodeProperties; +const maxTasksPerRouteField = { + displayName: 'Max number of tasks per route', + name: 'maxTasksPerRoute', + type: 'number', + default: 100, + typeOptions: { + maxValue: 200, + minValue: 1, + }, + description: 'Total number of tasks allowed on a route.', +}as INodeProperties; + +const taskTimeWindowField = { + displayName: 'Task time window (JSON)', + name: 'taskTimeWindow', + type: 'json', + default: '{}', + description: 'This is the time window of tasks to include in the optimization. Param must be an array of length 2 in unix time in seconds precision, [start, end]', +} as INodeProperties; + +const scheduleTimeWindowField = { + displayName: 'Schedule time window (JSON)', + name: 'scheduleTimeWindow', + type: 'json', + default: '{}', + description: 'This is the Driver\'s scheduled time window. Param must be an array of length 2 in unix time in seconds precision, [start, end]', +} as INodeProperties; + +const serviceTImeField = { + displayName: 'Service time', + name: 'serviceTIme', + type: 'number', + default: 2, + typeOptions: { + minValue: 0, + }, + description: 'The default service time to apply in Minutes to the tasks when no task service time exists.', +} as INodeProperties; + +const routeEndField = { + displayName: 'Route end', + name: 'routeEnd', + type: 'string', + default: '', + description: 'Where the route will end.', +} as INodeProperties; + +const maxAllowedDelayField = { + displayName: 'Max allowed delay', + name: 'maxAllowedDelay', + type: 'number', + default: 10, + description: '', + typeOptions: { + minValue: 1, + }, +} as INodeProperties; + +const dropoffField = { + displayName: 'Dropoff', + name: 'dropoff', + type: 'boolean', + default: false, + description: 'Dropoff.', +} as INodeProperties; + +const pickupField = { + displayName: 'Pickup', + name: 'pickup', + type: 'boolean', + default: false, + description: 'Pickup.', +} as INodeProperties; + +const longitudeDropoffField = { + displayName: 'Dropoff longitude', + name: 'dropoffLongitude', + type: 'number', + typeOptions: { + numberPrecision: 14, + }, + default: '', + description: 'The longitude for dropoff location.', +} as INodeProperties; + +const latitudeDropoffField = { + displayName: 'Dropoff latitude', + name: 'dropoffLatitude', + type: 'number', + typeOptions: { + numberPrecision: 14, + }, + default: '', + description: 'The latitude for dropoff location.', +} as INodeProperties; + +const longitudePickupField = { + displayName: 'Pickup longitude', + name: 'pickupLongitude', + type: 'number', + typeOptions: { + numberPrecision: 14, + }, + default: '', + description: 'The longitude for pickup location.', +} as INodeProperties; + +const latitudePickupField = { + displayName: 'Pickup latitude', + name: 'pickupLatitude', + type: 'number', + typeOptions: { + numberPrecision: 14, + }, + default: '', + description: 'The latitude for pickup location.', +} as INodeProperties; + +const pickupTimeField = { + displayName: 'Pickup time', + name: 'pickupTime', + type: 'dateTime', + default: Date.now(), + description: 'If the request includes pickupLocation pickupTime must be present if the time is fewer than 3 hours in the future.', +} as INodeProperties; + +const restrictedVehicleTypesField = { + displayName: 'Restricted vehicle types', + name: 'restrictedVehicleTypes', + type: 'options', + options: [ + { + name: 'Car', + value: 'CAR', + }, + { + name: 'Motorcycle', + value: 'MOTORCYCLE', + }, + { + name: 'Bicycle', + value: 'BICYCLE', + }, + { + name: 'Truck', + value: 'TRUCK', + }, + ], + default: 'CAR', + description: 'Vehicle types to ignore in the query.', +} as INodeProperties; + +const serviceTimeEstimateField = { + displayName: 'Service time', + name: 'serviceTIme', + type: 'number', + default: 120, + typeOptions: { + minValue: 0, + }, + description: 'The expected time a worker will take at the pickupLocation, dropoffLocation, or both (as applicable) Unit: seconds.', +} as INodeProperties; + export const teamFields = [ { displayName: 'ID', @@ -95,6 +268,8 @@ export const teamFields = [ 'get', 'update', 'delete', + 'getTimeEstimates', + 'autoDispatch', ], }, }, @@ -169,4 +344,110 @@ export const teamFields = [ enableSelfAssignmentField, ], }, + { + displayName: 'Additional fields', + name: 'additionalFields', + type: 'collection', + placeholder: 'Add fields', + default: {}, + displayOptions: { + show: { + resource: [ 'teams' ], + operation: [ 'autoDispatch' ], + }, + }, + options: [ + maxTasksPerRouteField, + taskTimeWindowField, + scheduleTimeWindowField, + serviceTImeField, + routeEndField, + maxAllowedDelayField, + ], + }, + { + ...dropoffField, + displayOptions: { + show: { + resource: [ 'teams' ], + operation: [ 'getTimeEstimates' ], + }, + }, + }, + { + ...longitudeDropoffField, + displayOptions: { + show: { + resource: [ 'teams' ], + operation: [ 'getTimeEstimates' ], + dropoff: [ true ], + }, + }, + }, + { + ...latitudeDropoffField, + displayOptions: { + show: { + resource: [ 'teams' ], + operation: [ 'getTimeEstimates' ], + dropoff: [ true ], + }, + }, + }, + { + ...pickupField, + displayOptions: { + show: { + resource: [ 'teams' ], + operation: [ 'getTimeEstimates' ], + }, + }, + }, + { + ...longitudePickupField, + displayOptions: { + show: { + resource: [ 'teams' ], + operation: [ 'getTimeEstimates' ], + pickup: [ true ], + }, + }, + }, + { + ...latitudePickupField, + displayOptions: { + show: { + resource: [ 'teams' ], + operation: [ 'getTimeEstimates' ], + pickup: [ true ], + }, + }, + }, + { + ...pickupTimeField, + displayOptions: { + show: { + resource: [ 'teams' ], + operation: [ 'getTimeEstimates' ], + pickup: [ true ], + }, + }, + }, + { + displayName: 'Additional fields', + name: 'additionalFields', + type: 'collection', + placeholder: 'Add fields', + default: {}, + displayOptions: { + show: { + resource: [ 'teams' ], + operation: [ 'getTimeEstimates' ], + }, + }, + options: [ + restrictedVehicleTypesField, + serviceTimeEstimateField, + ], + }, ] as INodeProperties[]; diff --git a/packages/nodes-base/nodes/Onfleet/interfaces.ts b/packages/nodes-base/nodes/Onfleet/interfaces.ts index 226c1d8637761..2fba8f80d4082 100644 --- a/packages/nodes-base/nodes/Onfleet/interfaces.ts +++ b/packages/nodes-base/nodes/Onfleet/interfaces.ts @@ -155,3 +155,20 @@ export interface OnfleetWebhookMapping { export interface OnfleetWebhooksMapping { [key: string]: OnfleetWebhookMapping; } + +export interface OnfleetWorkerEstimates { + dropoffLocation?: string; + pickupLocation?: string; + pickupTime?: number; + restrictedVehicleTypes?: string; + serviceTime?: number; +} + +export interface OnfleetTeamAutoDispatch { + maxTasksPerRoute?: number; + taskTimeWindow?: [number, number]; + scheduleTimeWindow?: [number, number]; + serviceTime?: number; + routeEnd?: string; + maxAllowedDelay?: number; +} From 49a8e03cb1a682ff21fd057f5561ae9a7df959e0 Mon Sep 17 00:00:00 2001 From: Santiago Botero Ruiz Date: Wed, 19 Jan 2022 09:48:31 -0500 Subject: [PATCH 2/2] style: remove dots in descriptions and fixed some typos --- .../nodes-base/nodes/Onfleet/Onfleet.node.ts | 14 ++--- .../nodes/Onfleet/OnfleetTrigger.node.ts | 4 +- .../descriptions/AdministratorDescription.ts | 18 +++--- .../descriptions/ContainerDescription.ts | 18 +++--- .../descriptions/DestinationDescription.ts | 26 ++++---- .../Onfleet/descriptions/HubDescription.ts | 12 ++-- .../descriptions/OnfleetWebhookDescription.ts | 4 +- .../descriptions/OrganizationDescription.ts | 6 +- .../descriptions/RecipientDescription.ts | 34 +++++----- .../Onfleet/descriptions/TaskDescription.ts | 56 ++++++++--------- .../Onfleet/descriptions/TeamDescription.ts | 54 ++++++++-------- .../descriptions/WebhookDescription.ts | 16 ++--- .../Onfleet/descriptions/WorkerDescription.ts | 62 +++++++++---------- 13 files changed, 162 insertions(+), 162 deletions(-) diff --git a/packages/nodes-base/nodes/Onfleet/Onfleet.node.ts b/packages/nodes-base/nodes/Onfleet/Onfleet.node.ts index 6a21eb0f1b016..9d126d75d9c3c 100644 --- a/packages/nodes-base/nodes/Onfleet/Onfleet.node.ts +++ b/packages/nodes-base/nodes/Onfleet/Onfleet.node.ts @@ -108,7 +108,7 @@ export class Onfleet implements INodeType { }, ], default: 'tasks', - description: 'The resource to perform operations on.', + description: 'The resource to perform operations on', }, // Operations ...adminOperations, @@ -569,18 +569,18 @@ export class Onfleet implements INodeType { const longitude = this.getNodeParameter(longitudeField, item) as string; const latitude = this.getNodeParameter(latitudeField, item) as string; - const wokrerTimeEstimates = {} as OnfleetWorkerEstimates; + const workerTimeEstimates = {} as OnfleetWorkerEstimates; if (pickup) { - wokrerTimeEstimates.pickupLocation = `${longitude},${latitude}`; - wokrerTimeEstimates.pickupTime = (new Date(this.getNodeParameter('pickupTime', item) as Date)).getTime() / 1000; + workerTimeEstimates.pickupLocation = `${longitude},${latitude}`; + workerTimeEstimates.pickupTime = (new Date(this.getNodeParameter('pickupTime', item) as Date)).getTime() / 1000; } if(dropoff) { - wokrerTimeEstimates.dropoffLocation = `${longitude},${latitude}`; + workerTimeEstimates.dropoffLocation = `${longitude},${latitude}`; } const additionalFields = this.getNodeParameter('additionalFields', item) as IDataObject; - Object.assign(wokrerTimeEstimates, additionalFields); - return wokrerTimeEstimates; + Object.assign(workerTimeEstimates, additionalFields); + return workerTimeEstimates; } else if (operation === 'autoDispatch') { /* -------------------------------------------------------------------------- */ /* Dynamically dispatching tasks on the fly */ diff --git a/packages/nodes-base/nodes/Onfleet/OnfleetTrigger.node.ts b/packages/nodes-base/nodes/Onfleet/OnfleetTrigger.node.ts index 25000abb23095..72e8b100d0d93 100644 --- a/packages/nodes-base/nodes/Onfleet/OnfleetTrigger.node.ts +++ b/packages/nodes-base/nodes/Onfleet/OnfleetTrigger.node.ts @@ -24,7 +24,7 @@ export class OnfleetTrigger implements INodeType { group: [ 'trigger' ], version: 1, subtitle: '={{$parameter["events"]}}', - description: 'Starts the workflow when Onfleet events occur.', + description: 'Starts the workflow when Onfleet events occur', defaults: { name: 'Onfleet Trigger', color: '#AA81F3', @@ -142,7 +142,7 @@ export class OnfleetTrigger implements INodeType { .then(responseData => { if (responseData.id === undefined) { // Required data is missing so was not successful - throw new NodeApiError(this.getNode(), responseData, { message: 'Onfleet webhook creation response did not contain the expected data.' }); + throw new NodeApiError(this.getNode(), responseData, { message: 'Onfleet webhook creation response did not contain the expected data' }); } webhookData[event] = responseData.id as string; diff --git a/packages/nodes-base/nodes/Onfleet/descriptions/AdministratorDescription.ts b/packages/nodes-base/nodes/Onfleet/descriptions/AdministratorDescription.ts index b5d19a3f1aee0..027d8ec323468 100644 --- a/packages/nodes-base/nodes/Onfleet/descriptions/AdministratorDescription.ts +++ b/packages/nodes-base/nodes/Onfleet/descriptions/AdministratorDescription.ts @@ -16,22 +16,22 @@ export const adminOperations = [ { name: 'Create', value: 'create', - description: 'Create a new Onfleet admin.', + description: 'Create a new Onfleet admin', }, { name: 'Remove', value: 'delete', - description: 'Remove an Onfleet admin.', + description: 'Remove an Onfleet admin', }, { name: 'List', value: 'getAll', - description: 'List all Onfleet admins.', + description: 'List all Onfleet admins', }, { name: 'Update', value: 'update', - description: 'Update an Onfleet admin.', + description: 'Update an Onfleet admin', }, ], default: 'getAll', @@ -43,7 +43,7 @@ const adminNameField = { name: 'name', type: 'string', default: '', - description: 'The administrator\'s name.', + description: 'The administrator\'s name', } as INodeProperties; const adminEmailField = { @@ -51,7 +51,7 @@ const adminEmailField = { name: 'email', type: 'string', default: '', - description: 'The administrator\'s email address.', + description: 'The administrator\'s email address', } as INodeProperties; const adminPhoneField = { @@ -59,7 +59,7 @@ const adminPhoneField = { name: 'phone', type: 'string', default: '', - description: 'The administrator\'s phone number.', + description: 'The administrator\'s phone number', } as INodeProperties; const adminReadOnlyField = { @@ -67,7 +67,7 @@ const adminReadOnlyField = { name: 'isReadOnly', type: 'boolean', default: false, - description: 'Whether this administrator can perform write operations.', + description: 'Whether this administrator can perform write operations', } as INodeProperties; export const adminFields = [ @@ -88,7 +88,7 @@ export const adminFields = [ }, default: '', required: true, - description: 'The ID of the admin object for lookup.', + description: 'The ID of the admin object for lookup', }, { displayOptions: { diff --git a/packages/nodes-base/nodes/Onfleet/descriptions/ContainerDescription.ts b/packages/nodes-base/nodes/Onfleet/descriptions/ContainerDescription.ts index 43821c0d324a1..d02726cef778b 100644 --- a/packages/nodes-base/nodes/Onfleet/descriptions/ContainerDescription.ts +++ b/packages/nodes-base/nodes/Onfleet/descriptions/ContainerDescription.ts @@ -16,17 +16,17 @@ export const containerOperations = [ { name: 'Insert tasks (or append)', value: 'add', - description: 'Insert tasks at index (or append).', + description: 'Insert tasks at index (or append)', }, { name: 'Update tasks', value: 'update', - description: 'Fully replace a container\'s tasks.', + description: 'Fully replace a container\'s tasks', }, { name: 'Get container', value: 'get', - description: 'Get container information.', + description: 'Get container information', }, ], default: 'get', @@ -52,7 +52,7 @@ const containerTypeField = { }, ], default: '', - description: 'Container type.', + description: 'Container type', } as INodeProperties; const containerIdField = { @@ -60,7 +60,7 @@ const containerIdField = { name: 'containerId', type: 'string', default: '', - description: 'The object ID according to the container chosen.', + description: 'The object ID according to the container chosen', } as INodeProperties; const insertTypeField = { @@ -82,7 +82,7 @@ const insertTypeField = { }, ], default: '', - description: 'The index given indicates the position where the tasks are going to be inserted.', + description: 'The index given indicates the position where the tasks are going to be inserted', } as INodeProperties; const indexField = { @@ -90,7 +90,7 @@ const indexField = { name: 'index', type: 'number', default: '', - description: 'The index given indicates the position where the tasks are going to be inserted.', + description: 'The index given indicates the position where the tasks are going to be inserted', } as INodeProperties; const tasksField = { @@ -98,7 +98,7 @@ const tasksField = { name: 'tasks', type: 'json', default: '[]', - description: 'Array witht the task\'s ID that are going to be used in JSON format.', + description: 'Array witht the task\'s ID that are going to be used in JSON format', } as INodeProperties; const considerDependenciesField = { @@ -106,7 +106,7 @@ const considerDependenciesField = { name: 'considerDependencies', type: 'boolean', default: false, - description: 'Whether to include the target task\'s dependency family (parent and child tasks) in the resulting assignment operation.', + description: 'Whether to include the target task\'s dependency family (parent and child tasks) in the resulting assignment operation', } as INodeProperties; export const containerFields = [ diff --git a/packages/nodes-base/nodes/Onfleet/descriptions/DestinationDescription.ts b/packages/nodes-base/nodes/Onfleet/descriptions/DestinationDescription.ts index 7aa30b915e1d3..9e99d76b955a5 100644 --- a/packages/nodes-base/nodes/Onfleet/descriptions/DestinationDescription.ts +++ b/packages/nodes-base/nodes/Onfleet/descriptions/DestinationDescription.ts @@ -16,12 +16,12 @@ export const destinationOperations = [ { name: 'Create', value: 'create', - description: 'Create a new destination.', + description: 'Create a new destination', }, { name: 'Get', value: 'get', - description: 'Get a specific destination.', + description: 'Get a specific destination', }, ], @@ -33,7 +33,7 @@ const unparsedField = { displayName: 'Unparsed adress', name: 'unparsed', type: 'boolean', - description: 'Whether the address is specified in a single.', + description: 'Whether the address is specified in a single', default: false, } as INodeProperties; @@ -41,7 +41,7 @@ const unparsedAddressField = { displayName: 'Destination address', name: 'address', type: 'string', - description: 'The destination\'s street address details.', + description: 'The destination\'s street address details', default: null, } as INodeProperties; @@ -49,7 +49,7 @@ const unparsedAddressNumberField = { displayName: 'Number', name: 'addressNumber', type: 'string', - description: 'The number component of this address, it may also contain letters.', + description: 'The number component of this address, it may also contain letters', default: '', } as INodeProperties; @@ -57,7 +57,7 @@ const unparsedAddressStreetField = { displayName: 'Street', name: 'addressStreet', type: 'string', - description: 'The name of the street.', + description: 'The name of the street', default: '', } as INodeProperties; @@ -65,7 +65,7 @@ const unparsedAddressCityField = { displayName: 'City', name: 'addressCity', type: 'string', - description: 'The name of the municipality.', + description: 'The name of the municipality', default: '', } as INodeProperties; @@ -73,7 +73,7 @@ const unparsedAddressCountryField = { displayName: 'Country', name: 'addressCountry', type: 'string', - description: 'The name of the country.', + description: 'The name of the country', default: '', } as INodeProperties; @@ -82,7 +82,7 @@ const addressNameField = { name: 'addressName', type: 'string', default: '', - description: 'A name associated with this address.', + description: 'A name associated with this address', } as INodeProperties; const addressApartmentField = { @@ -90,7 +90,7 @@ const addressApartmentField = { name: 'addressApartment', type: 'string', default: '', - description: 'The suite or apartment number, or any additional relevant information.', + description: 'The suite or apartment number, or any additional relevant information', } as INodeProperties; const addressNoteField = { @@ -98,7 +98,7 @@ const addressNoteField = { name: 'addressNotes', type: 'string', default: '', - description: 'Notes about the destination.', + description: 'Notes about the destination', } as INodeProperties; const addressPostalCodeField = { @@ -106,7 +106,7 @@ const addressPostalCodeField = { name: 'addressPostalCode', type: 'string', default: '', - description: 'The postal or zip code.', + description: 'The postal or zip code', } as INodeProperties; export const destinationFields = [ @@ -124,7 +124,7 @@ export const destinationFields = [ }, default: '', required: true, - description: 'The ID of the destination object for lookup.', + description: 'The ID of the destination object for lookup', }, { ...unparsedField, diff --git a/packages/nodes-base/nodes/Onfleet/descriptions/HubDescription.ts b/packages/nodes-base/nodes/Onfleet/descriptions/HubDescription.ts index c089f1562c9ab..324661d8df4a6 100644 --- a/packages/nodes-base/nodes/Onfleet/descriptions/HubDescription.ts +++ b/packages/nodes-base/nodes/Onfleet/descriptions/HubDescription.ts @@ -16,17 +16,17 @@ export const hubOperations = [ { name: 'Create', value: 'create', - description: 'Create a new Onfleet hub.', + description: 'Create a new Onfleet hub', }, { name: 'List hubs', value: 'getAll', - description: 'List Onfleet hubs.', + description: 'List Onfleet hubs', }, { name: 'Update', value: 'update', - description: 'Update an Onfleet hub.', + description: 'Update an Onfleet hub', }, ], default: 'get', @@ -38,7 +38,7 @@ const nameField = { name: 'name', type: 'string', default: '', - description: 'A name to identify the hub.', + description: 'A name to identify the hub', } as INodeProperties; const teamsField = { @@ -46,7 +46,7 @@ const teamsField = { name: 'teams', type: 'json', default: '[]', - description: 'This is the team ID(s) that this Hub will be assigned to.', + description: 'This is the team ID(s) that this Hub will be assigned to', } as INodeProperties; export const hubFields = [ @@ -62,7 +62,7 @@ export const hubFields = [ }, default: '', required: true, - description: 'The ID of the hub object for lookup.', + description: 'The ID of the hub object for lookup', }, { ...nameField, diff --git a/packages/nodes-base/nodes/Onfleet/descriptions/OnfleetWebhookDescription.ts b/packages/nodes-base/nodes/Onfleet/descriptions/OnfleetWebhookDescription.ts index 899c65756d7d5..f5207eede5e10 100644 --- a/packages/nodes-base/nodes/Onfleet/descriptions/OnfleetWebhookDescription.ts +++ b/packages/nodes-base/nodes/Onfleet/descriptions/OnfleetWebhookDescription.ts @@ -13,7 +13,7 @@ export const eventDisplay: INodeProperties = { }), required: true, default: [], - description: 'The event to listen to.', + description: 'The event to listen to', }; export const eventNameField = { @@ -29,7 +29,7 @@ export const eventNameField = { type: 'string', required: false, default: null, - description: 'A name for the webhook for identification.', + description: 'A name for the webhook for identification', }, ], } as INodeProperties; diff --git a/packages/nodes-base/nodes/Onfleet/descriptions/OrganizationDescription.ts b/packages/nodes-base/nodes/Onfleet/descriptions/OrganizationDescription.ts index 123372c8c67a6..3353edfd3f453 100644 --- a/packages/nodes-base/nodes/Onfleet/descriptions/OrganizationDescription.ts +++ b/packages/nodes-base/nodes/Onfleet/descriptions/OrganizationDescription.ts @@ -16,12 +16,12 @@ export const organizationOperations = [ { name: 'Get details', value: 'get', - description: 'Retrieve your own organization\'s details.', + description: 'Retrieve your own organization\'s details', }, { name: 'Get delegatee details', value: 'getDelegatee', - description: 'Retrieve the details of an organization with which you are connected.', + description: 'Retrieve the details of an organization with which you are connected', }, ], @@ -42,6 +42,6 @@ export const organizationFields = [ }, default: '', required: true, - description: 'The ID of the delegatees for lookup.', + description: 'The ID of the delegatees for lookup', }, ] as INodeProperties[]; diff --git a/packages/nodes-base/nodes/Onfleet/descriptions/RecipientDescription.ts b/packages/nodes-base/nodes/Onfleet/descriptions/RecipientDescription.ts index b23ccf8530382..cd10fd611c80f 100644 --- a/packages/nodes-base/nodes/Onfleet/descriptions/RecipientDescription.ts +++ b/packages/nodes-base/nodes/Onfleet/descriptions/RecipientDescription.ts @@ -16,17 +16,17 @@ export const recipientOperations = [ { name: 'Create', value: 'create', - description: 'Create a new Onfleet recipient.', + description: 'Create a new Onfleet recipient', }, { name: 'Get', value: 'get', - description: 'Get a specific Onfleet recipient.', + description: 'Get a specific Onfleet recipient', }, { name: 'Update', value: 'update', - description: 'Update an Onfleet recipient.', + description: 'Update an Onfleet recipient', }, ], default: 'get', @@ -39,21 +39,21 @@ const additionalRecipientFields = [ name: 'recipientNotes', type: 'string', default: '', - description: 'Notes for this recipient: these are global notes that should not be task- or destination-specific.', + description: 'Notes for this recipient: these are global notes that should not be task- or destination-specific', }, { displayName: 'Skip recipient SMS notifications', name: 'recipientSkipSMSNotifications', type: 'boolean', default: false, - description: 'Whether this recipient has requested to skip SMS notifications.', + description: 'Whether this recipient has requested to skip SMS notifications', }, { displayName: 'Skip recipient phone number validation', name: 'recipientSkipPhoneNumberValidation', type: 'boolean', default: false, - description: 'Whether to skip validation for this recipient\'s phone number.', + description: 'Whether to skip validation for this recipient\'s phone number', }, ]; @@ -61,14 +61,14 @@ const recipientName = { displayName: 'Recipient name', name: 'recipientName', type: 'string', - description: 'The recipient\'s complete name.', + description: 'The recipient\'s complete name', } as INodeProperties; const recipientPhone = { displayName: 'Recipient phone', name: 'recipientPhone', type: 'string', - description: 'A unique, valid phone number as per the organization\'s country if there\'s no leading + sign. If a phone number has a leading + sign, it will disregard the organization\'s country setting.', + description: 'A unique, valid phone number as per the organization\'s country if there\'s no leading + sign. If a phone number has a leading + sign, it will disregard the organization\'s country setting', } as INodeProperties; const additionalRecipientFieldsUpdate = [ @@ -79,21 +79,21 @@ const additionalRecipientFieldsUpdate = [ name: 'notes', type: 'string', default: '', - description: 'Notes for this recipient: these are global notes that should not be task- or destination-specific.', + description: 'Notes for this recipient: these are global notes that should not be task- or destination-specific', }, { displayName: 'Skip recipient SMS notifications', name: 'skipSMSNotifications', type: 'boolean', default: false, - description: 'Whether this recipient has requested to skip SMS notifications.', + description: 'Whether this recipient has requested to skip SMS notifications', }, { displayName: 'Skip recipient phone number validation', name: 'skipPhoneNumberValidation', type: 'boolean', default: false, - description: 'Whether to skip validation for this recipient\'s phone number.', + description: 'Whether to skip validation for this recipient\'s phone number', }, ]; @@ -122,7 +122,7 @@ export const recipientFields = [ value: 'name', }, ], - description: 'The variable that is used for looking up a recipient.', + description: 'The variable that is used for looking up a recipient', required: true, default: 'id', }, @@ -139,7 +139,7 @@ export const recipientFields = [ }, default: '', required: true, - description: 'The ID of the recipient object for lookup.', + description: 'The ID of the recipient object for lookup', }, { displayName: 'ID', @@ -153,7 +153,7 @@ export const recipientFields = [ }, default: '', required: true, - description: 'The ID of the recipient object for lookup.', + description: 'The ID of the recipient object for lookup', }, { displayName: 'Name', @@ -168,7 +168,7 @@ export const recipientFields = [ }, default: '', required: true, - description: 'The name of the recipient for lookup.', + description: 'The name of the recipient for lookup', }, { displayName: 'Phone', @@ -183,7 +183,7 @@ export const recipientFields = [ }, default: '', required: true, - description: 'The phone of the recipient for lookup.', + description: 'The phone of the recipient for lookup', }, { displayName: 'Recipient', @@ -198,7 +198,7 @@ export const recipientFields = [ ], }, }, - description: 'Whether the task has a recipient associated.', + description: 'Whether the task has a recipient associated', required: true, default: true, }, diff --git a/packages/nodes-base/nodes/Onfleet/descriptions/TaskDescription.ts b/packages/nodes-base/nodes/Onfleet/descriptions/TaskDescription.ts index 8d923a964a4f8..66452a5465147 100644 --- a/packages/nodes-base/nodes/Onfleet/descriptions/TaskDescription.ts +++ b/packages/nodes-base/nodes/Onfleet/descriptions/TaskDescription.ts @@ -16,42 +16,42 @@ export const taskOperations = [ { name: 'Create', value: 'create', - description: 'Create a new Onfleet task.', + description: 'Create a new Onfleet task', }, { name: 'Create multiple tasks', value: 'createBatch', - description: 'Creating multiple tasks in batch.', + description: 'Creating multiple tasks in batch', }, { name: 'Clone', value: 'clone', - description: 'Clone an Onfleet task.', + description: 'Clone an Onfleet task', }, { name: 'Complete', value: 'complete', - description: 'Force-complete a started Onfleet task.', + description: 'Force-complete a started Onfleet task', }, { name: 'Remove', value: 'delete', - description: 'Remove an Onfleet task.', + description: 'Remove an Onfleet task', }, { name: 'List', value: 'getAll', - description: 'List Onfleet tasks.', + description: 'List Onfleet tasks', }, { name: 'Get', value: 'get', - description: 'Get a specific Onfleet task.', + description: 'Get a specific Onfleet task', }, { name: 'Update', value: 'update', - description: 'Update an Onfleet task.', + description: 'Update an Onfleet task', }, ], @@ -64,7 +64,7 @@ const merchantIdField = { name: 'merchant', type: 'string', default: '', - description: 'The ID of the organization that will be displayed to the recipient of the task.', + description: 'The ID of the organization that will be displayed to the recipient of the task', } as INodeProperties; const executorIdField = { @@ -72,7 +72,7 @@ const executorIdField = { name: 'executor', type: 'string', default: '', - description: 'The ID of the organization that will be responsible for fulfilling the task.', + description: 'The ID of the organization that will be responsible for fulfilling the task', } as INodeProperties; const completeAfterField = { @@ -80,7 +80,7 @@ const completeAfterField = { name: 'completeAfter', type: 'dateTime', default: null, - description: 'The earliest time the task should be completed.', + description: 'The earliest time the task should be completed', } as INodeProperties; const completeBeforeField = { @@ -88,7 +88,7 @@ const completeBeforeField = { name: 'completeBefore', type: 'dateTime', default: null, - description: 'The latest time the task should be completed.', + description: 'The latest time the task should be completed', } as INodeProperties; const pickupTaskField = { @@ -96,7 +96,7 @@ const pickupTaskField = { name: 'pickupTask', type: 'boolean', default: false, - description: 'Whether the task is a pickup task.', + description: 'Whether the task is a pickup task', } as INodeProperties; const notesField = { @@ -104,7 +104,7 @@ const notesField = { name: 'notes', type: 'string', default: '', - description: 'Notes for the task.', + description: 'Notes for the task', } as INodeProperties; const quantityField = { @@ -112,7 +112,7 @@ const quantityField = { name: 'quantity', type: 'number', default: 0, - description: 'The number of units to be dropped off while completing this task, for route optimization purposes.', + description: 'The number of units to be dropped off while completing this task, for route optimization purposes', } as INodeProperties; const serviceTimeField = { @@ -120,7 +120,7 @@ const serviceTimeField = { name: 'serviceTime', type: 'number', default: 0, - description: 'The number of minutes to be spent by the worker on arrival at this task\'s destination, for route optimization purposes.', + description: 'The number of minutes to be spent by the worker on arrival at this task\'s destination, for route optimization purposes', } as INodeProperties; export const taskFields = [ @@ -142,7 +142,7 @@ export const taskFields = [ }, default: '', required: true, - description: 'The ID of the task object for lookup.', + description: 'The ID of the task object for lookup', }, { displayName: 'Short ID', @@ -155,7 +155,7 @@ export const taskFields = [ }, }, required: true, - description: 'Whether the task short ID is used for lookup.', + description: 'Whether the task short ID is used for lookup', }, { displayName: 'From', @@ -167,7 +167,7 @@ export const taskFields = [ operation: [ 'getAll' ], }, }, - description: 'The starting time of the range. Tasks created or completed at or after this time will be included.', + description: 'The starting time of the range. Tasks created or completed at or after this time will be included', required: true, default: null, }, @@ -181,7 +181,7 @@ export const taskFields = [ operation: [ 'complete' ], }, }, - description: 'Whether the task\'s completion was successful.', + description: 'Whether the task\'s completion was successful', required: true, default: true, }, @@ -203,7 +203,7 @@ export const taskFields = [ name: 'to', type: 'dateTime', default: null, - description: 'The ending time of the range. Defaults to current time if not specified.', + description: 'The ending time of the range. Defaults to current time if not specified', }, { displayName: 'State', @@ -228,14 +228,14 @@ export const taskFields = [ }, ], default: null, - description: 'The state of the tasks.', + description: 'The state of the tasks', }, { displayName: 'LastId', name: 'lastId', type: 'string', default: null, - description: 'The last Id to walk the paginated response.', + description: 'The last Id to walk the paginated response', }, ], }, @@ -319,7 +319,7 @@ export const taskFields = [ name: 'notes', type: 'string', default: '', - description: 'Completion Notes.', + description: 'Completion Notes', }, ], }, @@ -352,28 +352,28 @@ export const taskFields = [ name: 'recipientNameOverride', type: 'string', default: '', - description: 'Override the recipient name for this task only.', + description: 'Override the recipient name for this task only', }, { displayName: 'Recipient Notes Override', name: 'recipientNotes', type: 'string', default: '', - description: 'Override the recipient notes for this task only.', + description: 'Override the recipient notes for this task only', }, { displayName: 'Recipient Skip SMS Notifications Override', name: 'recipientSkipSMSNotifications', type: 'boolean', default: '', - description: 'Override the recipient notification settings for this task only.', + description: 'Override the recipient notification settings for this task only', }, { displayName: 'Use Merchant For Proxy Override', name: 'useMerchantForProxy', type: 'boolean', default: '', - description: 'Override the organization ID to use the merchant orgID when set to true for this task only.', + description: 'Override the organization ID to use the merchant orgID when set to true for this task only', }, ], }, diff --git a/packages/nodes-base/nodes/Onfleet/descriptions/TeamDescription.ts b/packages/nodes-base/nodes/Onfleet/descriptions/TeamDescription.ts index 1eeabfe70af3a..daa3fd2c77195 100644 --- a/packages/nodes-base/nodes/Onfleet/descriptions/TeamDescription.ts +++ b/packages/nodes-base/nodes/Onfleet/descriptions/TeamDescription.ts @@ -16,37 +16,37 @@ export const teamOperations = [ { name: 'Create', value: 'create', - description: 'Create a new Onfleet team.', + description: 'Create a new Onfleet team', }, { name: 'Update', value: 'update', - description: 'Update an Onfleet team.', + description: 'Update an Onfleet team', }, { name: 'Remove', value: 'delete', - description: 'Remove an Onfleet team.', + description: 'Remove an Onfleet team', }, { name: 'Get', value: 'get', - description: 'Get a specific Onfleet team.', + description: 'Get a specific Onfleet team', }, { name: 'List', value: 'getAll', - description: 'List all Onfleet teams.', + description: 'List all Onfleet teams', }, { name: 'Auto-Dispatch', value: 'autoDispatch', - description: 'Dynamically dispatching tasks on the fly.', + description: 'Dynamically dispatching tasks on the fly', }, { name: 'Get time estimates', value: 'getTimeEstimates', - description: 'The Driver Time Estimates endpoint allows an API user to get estimated times for tasks that haven\'t been created yet.', + description: 'The Driver Time Estimates endpoint allows an API user to get estimated times for tasks that haven\'t been created yet', }, ], default: 'getAll', @@ -58,7 +58,7 @@ const nameField = { name: 'name', type: 'string', default: '', - description: 'A unique name for the team.', + description: 'A unique name for the team', } as INodeProperties; const workersField = { @@ -66,7 +66,7 @@ const workersField = { name: 'workers', type: 'json', default: '[]', - description: 'An array of workers IDs.', + description: 'An array of workers IDs', } as INodeProperties; const managersField = { @@ -74,7 +74,7 @@ const managersField = { name: 'managers', type: 'json', default: '[]', - description: 'An array of managing administrator IDs.', + description: 'An array of managing administrator IDs', } as INodeProperties; const hubField = { @@ -82,7 +82,7 @@ const hubField = { name: 'hub', type: 'string', default: '', - description: 'The ID of the team\'s hub.', + description: 'The ID of the team\'s hub', } as INodeProperties; const enableSelfAssignmentField = { @@ -90,7 +90,7 @@ const enableSelfAssignmentField = { name: 'enableSelfAssignment', type: 'boolean', default: false, - description: 'This toggles Team Self-Assignment that allows Drivers to Self Assign Tasks that are in the Team unassigned container.', + description: 'This toggles Team Self-Assignment that allows Drivers to Self Assign Tasks that are in the Team unassigned container', } as INodeProperties; const maxTasksPerRouteField = { @@ -102,7 +102,7 @@ const maxTasksPerRouteField = { maxValue: 200, minValue: 1, }, - description: 'Total number of tasks allowed on a route.', + description: 'Total number of tasks allowed on a route', }as INodeProperties; const taskTimeWindowField = { @@ -121,7 +121,7 @@ const scheduleTimeWindowField = { description: 'This is the Driver\'s scheduled time window. Param must be an array of length 2 in unix time in seconds precision, [start, end]', } as INodeProperties; -const serviceTImeField = { +const serviceTimeField = { displayName: 'Service time', name: 'serviceTIme', type: 'number', @@ -129,7 +129,7 @@ const serviceTImeField = { typeOptions: { minValue: 0, }, - description: 'The default service time to apply in Minutes to the tasks when no task service time exists.', + description: 'The default service time to apply in Minutes to the tasks when no task service time exists', } as INodeProperties; const routeEndField = { @@ -137,7 +137,7 @@ const routeEndField = { name: 'routeEnd', type: 'string', default: '', - description: 'Where the route will end.', + description: 'Where the route will end', } as INodeProperties; const maxAllowedDelayField = { @@ -156,7 +156,7 @@ const dropoffField = { name: 'dropoff', type: 'boolean', default: false, - description: 'Dropoff.', + description: 'Dropoff', } as INodeProperties; const pickupField = { @@ -164,7 +164,7 @@ const pickupField = { name: 'pickup', type: 'boolean', default: false, - description: 'Pickup.', + description: 'Pickup', } as INodeProperties; const longitudeDropoffField = { @@ -175,7 +175,7 @@ const longitudeDropoffField = { numberPrecision: 14, }, default: '', - description: 'The longitude for dropoff location.', + description: 'The longitude for dropoff location', } as INodeProperties; const latitudeDropoffField = { @@ -186,7 +186,7 @@ const latitudeDropoffField = { numberPrecision: 14, }, default: '', - description: 'The latitude for dropoff location.', + description: 'The latitude for dropoff location', } as INodeProperties; const longitudePickupField = { @@ -197,7 +197,7 @@ const longitudePickupField = { numberPrecision: 14, }, default: '', - description: 'The longitude for pickup location.', + description: 'The longitude for pickup location', } as INodeProperties; const latitudePickupField = { @@ -208,7 +208,7 @@ const latitudePickupField = { numberPrecision: 14, }, default: '', - description: 'The latitude for pickup location.', + description: 'The latitude for pickup location', } as INodeProperties; const pickupTimeField = { @@ -216,7 +216,7 @@ const pickupTimeField = { name: 'pickupTime', type: 'dateTime', default: Date.now(), - description: 'If the request includes pickupLocation pickupTime must be present if the time is fewer than 3 hours in the future.', + description: 'If the request includes pickupLocation pickupTime must be present if the time is fewer than 3 hours in the future', } as INodeProperties; const restrictedVehicleTypesField = { @@ -242,7 +242,7 @@ const restrictedVehicleTypesField = { }, ], default: 'CAR', - description: 'Vehicle types to ignore in the query.', + description: 'Vehicle types to ignore in the query', } as INodeProperties; const serviceTimeEstimateField = { @@ -253,7 +253,7 @@ const serviceTimeEstimateField = { typeOptions: { minValue: 0, }, - description: 'The expected time a worker will take at the pickupLocation, dropoffLocation, or both (as applicable) Unit: seconds.', + description: 'The expected time a worker will take at the pickupLocation, dropoffLocation, or both (as applicable) Unit: seconds', } as INodeProperties; export const teamFields = [ @@ -275,7 +275,7 @@ export const teamFields = [ }, default: '', required: true, - description: 'The ID of the team object for lookup.', + description: 'The ID of the team object for lookup', }, { ...nameField, @@ -360,7 +360,7 @@ export const teamFields = [ maxTasksPerRouteField, taskTimeWindowField, scheduleTimeWindowField, - serviceTImeField, + serviceTimeField, routeEndField, maxAllowedDelayField, ], diff --git a/packages/nodes-base/nodes/Onfleet/descriptions/WebhookDescription.ts b/packages/nodes-base/nodes/Onfleet/descriptions/WebhookDescription.ts index a1faaa83f3066..e70b759cb51f8 100644 --- a/packages/nodes-base/nodes/Onfleet/descriptions/WebhookDescription.ts +++ b/packages/nodes-base/nodes/Onfleet/descriptions/WebhookDescription.ts @@ -17,17 +17,17 @@ export const webhookOperations = [ { name: 'Create', value: 'create', - description: 'Create a new Onfleet webhook.', + description: 'Create a new Onfleet webhook', }, { name: 'Remove', value: 'delete', - description: 'Remove an Onfleet webhook.', + description: 'Remove an Onfleet webhook', }, { name: 'List', value: 'getAll', - description: 'List all Onfleet webhooks.', + description: 'List all Onfleet webhooks', }, ], default: 'getAll', @@ -39,7 +39,7 @@ const urlField = { name: 'url', type: 'string', default: '', - description: 'The URL that Onfleet should issue a request against as soon as the trigger condition is met. It must be HTTPS and have a valid certificate.', + description: 'The URL that Onfleet should issue a request against as soon as the trigger condition is met. It must be HTTPS and have a valid certificate', } as INodeProperties; const nameField = { @@ -47,7 +47,7 @@ const nameField = { name: 'name', type: 'string', default: '', - description: 'A name for the webhook for identification.', + description: 'A name for the webhook for identification', } as INodeProperties; const triggerField = { @@ -58,7 +58,7 @@ const triggerField = { return { name, value }; }), default: '', - description: 'The number corresponding to the trigger condition on which the webhook should fire.', + description: 'The number corresponding to the trigger condition on which the webhook should fire', } as INodeProperties; const thresholdField = { @@ -66,7 +66,7 @@ const thresholdField = { name: 'threshold', type: 'number', default: '', - description: 'For trigger Task Eta, the time threshold in seconds; for trigger Task Arrival, the distance threshold in meters.', + description: 'For trigger Task Eta, the time threshold in seconds; for trigger Task Arrival, the distance threshold in meters', } as INodeProperties; export const webhookFields = [ @@ -82,7 +82,7 @@ export const webhookFields = [ }, default: '', required: true, - description: 'The ID of the webhook object for lookup.', + description: 'The ID of the webhook object for lookup', }, { ...urlField, diff --git a/packages/nodes-base/nodes/Onfleet/descriptions/WorkerDescription.ts b/packages/nodes-base/nodes/Onfleet/descriptions/WorkerDescription.ts index c7f8f761c81ce..26dadafde9d89 100644 --- a/packages/nodes-base/nodes/Onfleet/descriptions/WorkerDescription.ts +++ b/packages/nodes-base/nodes/Onfleet/descriptions/WorkerDescription.ts @@ -16,42 +16,42 @@ export const workerOperations = [ { name: 'Create', value: 'create', - description: 'Create a new Onfleet worker.', + description: 'Create a new Onfleet worker', }, { name: 'Remove', value: 'delete', - description: 'Remove an Onfleet worker.', + description: 'Remove an Onfleet worker', }, { name: 'List', value: 'getAll', - description: 'List all Onfleet workers.', + description: 'List all Onfleet workers', }, { name: 'List workers by location', value: 'getAllByLocation', - description: 'List all Onfleet workers who are currently within a centain target area.', + description: 'List all Onfleet workers who are currently within a centain target area', }, { name: 'Get', value: 'get', - description: 'Get a specific Onfleet worker.', + description: 'Get a specific Onfleet worker', }, { name: 'Get Schedule', value: 'getSchedule', - description: 'Get a specific Onfleet worker schedule.', + description: 'Get a specific Onfleet worker schedule', }, { name: 'Set worker\'s schedule', value: 'setSchedule', - description: 'Set the worker\'s schedule.', + description: 'Set the worker\'s schedule', }, { name: 'Update', value: 'update', - description: 'Update an Onfleet worker.', + description: 'Update an Onfleet worker', }, ], default: 'get', @@ -63,7 +63,7 @@ const nameField = { name: 'name', type: 'string', default: '', - description: 'The worker\'s name.', + description: 'The worker\'s name', } as INodeProperties; const phoneField = { @@ -71,7 +71,7 @@ const phoneField = { name: 'phone', type: 'string', default: '', - description: 'A valid phone number as per the worker\'s organization\'s country.', + description: 'A valid phone number as per the worker\'s organization\'s country', } as INodeProperties; const capacityField = { @@ -79,7 +79,7 @@ const capacityField = { name: 'capacity', type: 'number', default: 0, - description: 'The maximum number of units this worker can carry, for route optimization purposes.', + description: 'The maximum number of units this worker can carry, for route optimization purposes', } as INodeProperties; const displayNameField = { @@ -87,7 +87,7 @@ const displayNameField = { name: 'displayName', type: 'string', default: '', - description: 'This value is used in place of the worker\'s actual name within sms notifications, delivery tracking pages, and across organization boundaries.', + description: 'This value is used in place of the worker\'s actual name within sms notifications, delivery tracking pages, and across organization boundaries', } as INodeProperties; // Vehicles fields @@ -96,7 +96,7 @@ const vehicleField = { name: 'vehicle', type: 'boolean', default: false, - description: 'Whether the worker has vehicle or not.', + description: 'Whether the worker has vehicle or not', } as INodeProperties; const vehicleTypeField = { @@ -122,7 +122,7 @@ const vehicleTypeField = { }, ], default: 'CAR', - description: 'Whether the worker has vehicle or not.', + description: 'Whether the worker has vehicle or not', } as INodeProperties; const vehicleDescriptionField = { @@ -130,7 +130,7 @@ const vehicleDescriptionField = { name: 'description', type: 'string', default: '', - description: 'The vehicle\'s make, model, year, or any other relevant identifying details.', + description: 'The vehicle\'s make, model, year, or any other relevant identifying details', } as INodeProperties; const vehicleLicensePlateField = { @@ -138,7 +138,7 @@ const vehicleLicensePlateField = { name: 'licensePlate', type: 'string', default: '', - description: 'The vehicle\'s license plate number.', + description: 'The vehicle\'s license plate number', } as INodeProperties; const vehicleColorField = { @@ -146,7 +146,7 @@ const vehicleColorField = { name: 'color', type: 'string', default: '', - description: 'The vehicle\'s color.', + description: 'The vehicle\'s color', } as INodeProperties; const teamsField = { @@ -154,7 +154,7 @@ const teamsField = { name: 'teams', type: 'json', default: '[]', - description: 'One or more team IDs of which the worker is a member.', + description: 'One or more team IDs of which the worker is a member', } as INodeProperties; const teamsFilterField = { @@ -162,7 +162,7 @@ const teamsFilterField = { name: 'teams', type: 'string', default: '', - description: 'A comma-separated list of the team IDs that workers must be part of.', + description: 'A comma-separated list of the team IDs that workers must be part of', } as INodeProperties; const statesFilterField = { @@ -184,7 +184,7 @@ const statesFilterField = { }, ], default: '', - description: 'List of worker states.', + description: 'List of worker states', } as INodeProperties; const phonesFilterField = { @@ -192,7 +192,7 @@ const phonesFilterField = { name: 'phones', type: 'string', default: '', - description: 'A comma-separated list of workers\' phone numbers.', + description: 'A comma-separated list of workers\' phone numbers', } as INodeProperties; const filterField = { @@ -200,7 +200,7 @@ const filterField = { name: 'filter', type: 'string', default: '', - description: 'A comma-separated list of fields to return, if all are not desired. For example, name, location.', + description: 'A comma-separated list of fields to return, if all are not desired. For example, name, location', } as INodeProperties; const longitudeFilterField = { @@ -211,7 +211,7 @@ const longitudeFilterField = { numberPrecision: 14, }, default: '', - description: 'The longitude component of the coordinate pair.', + description: 'The longitude component of the coordinate pair', } as INodeProperties; const latitudeFilterField = { @@ -222,7 +222,7 @@ const latitudeFilterField = { numberPrecision: 14, }, default: '', - description: 'The latitude component of the coordinate pair.', + description: 'The latitude component of the coordinate pair', } as INodeProperties; const radiusFilterField = { @@ -234,7 +234,7 @@ const radiusFilterField = { minValue: 0, }, default: 1000, - description: 'The length in meters of the radius of the spherical area in which to look for workers. Defaults to 1000 if missing. Maximum value is 10000.', + description: 'The length in meters of the radius of the spherical area in which to look for workers. Defaults to 1000 if missing. Maximum value is 10000', } as INodeProperties; const scheduleDateField = { @@ -242,7 +242,7 @@ const scheduleDateField = { name: 'date', type: 'dateTime', default: Date.now(), - description: 'Schedule\'s date.', + description: 'Schedule\'s date', } as INodeProperties; const scheduleTimezoneField = { @@ -250,7 +250,7 @@ const scheduleTimezoneField = { name: 'timezone', type: 'string', default: '', - description: 'A valid timezone.', + description: 'A valid timezone', } as INodeProperties; const scheduleStartField = { @@ -258,7 +258,7 @@ const scheduleStartField = { name: 'start', type: 'dateTime', default: Date.now(), - description: 'Start time.', + description: 'Start time', } as INodeProperties; const scheduleEndField = { @@ -266,7 +266,7 @@ const scheduleEndField = { name: 'end', type: 'dateTime', default: Date.now(), - description: 'End time.', + description: 'End time', } as INodeProperties; export const workerFields = [ @@ -288,7 +288,7 @@ export const workerFields = [ }, default: '', required: true, - description: 'The ID of the worker object for lookup.', + description: 'The ID of the worker object for lookup', }, { displayName: 'Analytics', @@ -302,7 +302,7 @@ export const workerFields = [ }, default: true, required: true, - description: 'A more detailed response, includes basic worker duty event, traveled distance (meters) and time analytics.', + description: 'A more detailed response, includes basic worker duty event, traveled distance (meters) and time analytics', }, { ...nameField,