Interface OnfleetNodeParameters

Source
interface OnfleetNodeParameters {
    additionalFields?:
        | { isReadOnly?: boolean; phone?: string }
        | {
            addressApartment?: string;
            addressName?: string;
            addressNotes?: string;
        }
        | {
            addressApartment?: string;
            addressName?: string;
            addressNotes?: string;
            addressPostalCode?: string;
        }
        | { teams?: unknown[] }
        | {
            recipientNotes?: string;
            recipientSkipSMSNotifications?: boolean;
        }
        | { notes?: string }
        | {
            completeAfter?: string;
            completeBefore?: string;
            executor?: string;
            merchant?: string;
            notes?: string;
            pickupTask?: boolean;
            quantity?: number;
            recipient?: {
                recipientProperties: {
                    recipientName: string;
                    recipientNotes?: string;
                    recipientPhone: string;
                    recipientSkipSMSNotifications?: boolean;
                };
            };
            recipientName?: string;
            recipientNotes?: string;
            recipientSkipSMSNotifications?: boolean;
            serviceTime?: number;
            useMerchantForProxy?: boolean;
        }
        | { enableSelfAssignment?: boolean; hub?: string }
        | {
            endingRoute?: {
                endingRouteProperties: {
                    hub?: string;
                    routeEnd:
                        | "hub"
                        | "team_hub"
                        | "worker_routing_address"
                        | "anywhere";
                };
            };
            maxAllowedDelay?: number;
            maxTasksPerRoute?: number;
            scheduleTimeWindow?: {
                scheduleTimeWindowProperties: {
                    endTime?: string;
                    startTime?: string;
                };
            };
            serviceTime?: number;
            taskTimeWindow?: {
                taskTimeWindowProperties: {
                    endTime?: string;
                    startTime?: string;
                };
            };
        }
        | {
            capacity?: number;
            displayName?: string;
            vehicle?: {
                vehicleProperties: {
                    color?: string;
                    description?: string;
                    licensePlate?: string;
                    type: "BICYCLE"
                    | "CAR"
                    | "MOTORCYCLE"
                    | "TRUCK";
                };
            };
        };
    address?: string;
    addressCity?: string;
    addressCountry?: string;
    addressNumber?: string;
    addressStreet?: string;
    byLocation?: boolean;
    containerId?: string;
    containerType?: "organizations"
    | "teams"
    | "workers";
    destination?: {
        destinationProperties: {
            address: string;
            addressApartment?: string;
            addressCity: string;
            addressCountry: string;
            addressName?: string;
            addressNotes?: string;
            addressNumber: string;
            addressPostalCode?: string;
            addressState: string;
            addressStreet: string;
            unparsed?: boolean;
        };
    };
    email?: string;
    filters?: | {
        from?: string;
        state?: (0 | 1 | 3 | 2 | "all")[];
        to?: string;
    }
    | {
        dropOff?: {
            dropOffProperties: {
                dropOffLatitude: number;
                dropOffLongitude: number;
            };
        };
        pickUp?: {
            pickUpProperties: {
                pickupLatitude: number;
                pickupLongitude: number;
                pickupTime?: string;
            };
        };
        restrictedVehicleTypes?: | "BICYCLE"
        | "CAR"
        | "MOTORCYCLE"
        | "TRUCK";
        serviceTime?: number;
    }
    | { radius?: number }
    | {
        phones?: string;
        states?: (0 | 1 | 2)[];
        teams?: unknown[];
    };
    getBy?: "id"
    | "name"
    | "phone";
    id?: string;
    index?: number;
    latitude?: number;
    limit?: number;
    longitude?: number;
    managers?: unknown[];
    name?: string;
    operation?:
        | "create"
        | "get"
        | "getAll"
        | "update"
        | "delete"
        | "complete"
        | "clone"
        | "addTask"
        | "updateTask"
        | "getDelegatee"
        | "autoDispatch"
        | "getTimeEstimates"
        | "getSchedule";
    options?: | { considerDependencies?: boolean }
    | { recipientSkipPhoneNumberValidation?: boolean }
    | {
        filter?: (
            | "id"
            | "organization"
            | "name"
            | "metadata"
            | "imageUrl"
            | "phone"
            | "location"
            | "displayName"
            | "teams"
            | "accountStatus"
            | "activeTask"
            | "capacity"
            | "delayTime"
            | "onDuty"
            | "tasks"
            | "timeCreated"
            | "timeLastModified"
            | "timeLastSeen"
            | "userData"
            | "vehicle"
        )[];
    }
    | {
        analytics?: boolean;
        filter?: (
            | "id"
            | "organization"
            | "name"
            | "metadata"
            | "imageUrl"
            | "phone"
            | "location"
            | "displayName"
            | "teams"
            | "accountStatus"
            | "activeTask"
            | "capacity"
            | "delayTime"
            | "onDuty"
            | "tasks"
            | "timeCreated"
            | "timeLastModified"
            | "timeLastSeen"
            | "userData"
            | "vehicle"
        )[];
    };
    overrideFields?: {
        completeAfter?: string;
        completeBefore?: string;
        includeBarcodes?: boolean;
        includeDependencies?: boolean;
        includeMetadata?: boolean;
        notes?: string;
        pickupTask?: boolean;
        serviceTime?: number;
    };
    phone?: string;
    recipientName?: string;
    recipientPhone?: string;
    resource?: | "admin"
    | "organization"
    | "task"
    | "container"
    | "team"
    | "destination"
    | "hub"
    | "recipient"
    | "worker";
    returnAll?: boolean;
    schedule?: {
        scheduleProperties: {
            date: string;
            shifts?: {
                shiftsProperties: { end: string; start: string }[];
            };
            timezone: string;
        }[];
    };
    success?: boolean;
    tasks?: string;
    teams?: unknown[];
    type?: 0
    | 1
    | -1;
    unparsed?: boolean;
    updateFields?:
        | {
            isReadOnly?: boolean;
            name?: string;
            phone?: string;
        }
        | {
            destination?: {
                destinationProperties: {
                    address: string;
                    addressApartment?: string;
                    addressCity: string;
                    addressCountry: string;
                    addressName?: string;
                    addressNotes?: string;
                    addressNumber: string;
                    addressPostalCode?: string;
                    addressState: string;
                    addressStreet: string;
                    unparsed?: boolean;
                };
            };
            name?: string;
            teams?: unknown[];
        }
        | {
            notes?: string;
            recipientName?: string;
            recipientPhone?: string;
            skipSMSNotifications?: boolean;
        }
        | {
            completeAfter?: string;
            completeBefore?: string;
            executor?: string;
            merchant?: string;
            notes?: string;
            pickupTask?: boolean;
            quantity?: number;
            serviceTime?: number;
        }
        | {
            enableSelfAssignment?: boolean;
            hub?: string;
            managers?: unknown[];
            name?: string;
            workers?: unknown[];
        }
        | {
            capacity?: number;
            displayName?: string;
            name?: string;
            teams?: unknown[];
        };
    workers?: unknown[];
}

Properties§

Source§

readonly additionalFields?:
    | { isReadOnly?: boolean; phone?: string }
    | {
        addressApartment?: string;
        addressName?: string;
        addressNotes?: string;
    }
    | {
        addressApartment?: string;
        addressName?: string;
        addressNotes?: string;
        addressPostalCode?: string;
    }
    | { teams?: unknown[] }
    | {
        recipientNotes?: string;
        recipientSkipSMSNotifications?: boolean;
    }
    | { notes?: string }
    | {
        completeAfter?: string;
        completeBefore?: string;
        executor?: string;
        merchant?: string;
        notes?: string;
        pickupTask?: boolean;
        quantity?: number;
        recipient?: {
            recipientProperties: {
                recipientName: string;
                recipientNotes?: string;
                recipientPhone: string;
                recipientSkipSMSNotifications?: boolean;
            };
        };
        recipientName?: string;
        recipientNotes?: string;
        recipientSkipSMSNotifications?: boolean;
        serviceTime?: number;
        useMerchantForProxy?: boolean;
    }
    | { enableSelfAssignment?: boolean; hub?: string }
    | {
        endingRoute?: {
            endingRouteProperties: {
                hub?: string;
                routeEnd:
                    | "hub"
                    | "team_hub"
                    | "worker_routing_address"
                    | "anywhere";
            };
        };
        maxAllowedDelay?: number;
        maxTasksPerRoute?: number;
        scheduleTimeWindow?: {
            scheduleTimeWindowProperties: {
                endTime?: string;
                startTime?: string;
            };
        };
        serviceTime?: number;
        taskTimeWindow?: {
            taskTimeWindowProperties: {
                endTime?: string;
                startTime?: string;
            };
        };
    }
    | {
        capacity?: number;
        displayName?: string;
        vehicle?: {
            vehicleProperties: {
                color?: string;
                description?: string;
                licensePlate?: string;
                type: "BICYCLE"
                | "CAR"
                | "MOTORCYCLE"
                | "TRUCK";
            };
        };
    }

Default: {}

Source§

readonly address?: string

The destination's street address details

Source§

readonly addressCity?: string

The name of the municipality

Source§

readonly addressCountry?: string

The name of the country

Source§

readonly addressNumber?: string

The number component of this address, it may also contain letters

Source§

readonly addressStreet?: string

The name of the street

Source§

readonly byLocation?: boolean

Whether to search for only those workers who are currently within a certain target area

Source§

readonly containerId?: string

The object ID according to the container chosen

Source§

readonly containerType?: "organizations" | "teams" | "workers"

Source§

readonly destination?: {
    destinationProperties: {
        address: string;
        addressApartment?: string;
        addressCity: string;
        addressCountry: string;
        addressName?: string;
        addressNotes?: string;
        addressNumber: string;
        addressPostalCode?: string;
        addressState: string;
        addressStreet: string;
        unparsed?: boolean;
    };
}

Default: {}

Source§

readonly email?: string

The administrator's email address

Source§

readonly filters?:
    | {
        from?: string;
        state?: (0 | 1 | 3 | 2 | "all")[];
        to?: string;
    }
    | {
        dropOff?: {
            dropOffProperties: {
                dropOffLatitude: number;
                dropOffLongitude: number;
            };
        };
        pickUp?: {
            pickUpProperties: {
                pickupLatitude: number;
                pickupLongitude: number;
                pickupTime?: string;
            };
        };
        restrictedVehicleTypes?: | "BICYCLE"
        | "CAR"
        | "MOTORCYCLE"
        | "TRUCK";
        serviceTime?: number;
    }
    | { radius?: number }
    | {
        phones?: string;
        states?: (0 | 1 | 2)[];
        teams?: unknown[];
    }

Default: {}

Source§

readonly getBy?: "id" | "name" | "phone"

The variable that is used for looking up a recipient Default: "id"

Source§

readonly id?: string

The ID of the admin object for lookup

Source§

readonly index?: number

The index given indicates the position where the tasks are going to be inserted

Source§

readonly latitude?: number

The latitude component of the coordinate pair Type options: {"numberPrecision":14}

Source§

readonly limit?: number

Max number of results to return Default: 64 Type options: {"minValue":1,"maxValue":64}

Source§

readonly longitude?: number

The longitude component of the coordinate pair Type options: {"numberPrecision":14}

Source§

readonly managers?: unknown[]

A list of managing administrators. Choose from the list, or specify IDs using an expression. Default: [] Type options: {"loadOptionsMethod":"getAdmins"}

Source§

readonly name?: string

The administrator's name

Source§

readonly operation?:
    | "create"
    | "get"
    | "getAll"
    | "update"
    | "delete"
    | "complete"
    | "clone"
    | "addTask"
    | "updateTask"
    | "getDelegatee"
    | "autoDispatch"
    | "getTimeEstimates"
    | "getSchedule"

Default: "getAll"

Source§

readonly options?:
    | { considerDependencies?: boolean }
    | { recipientSkipPhoneNumberValidation?: boolean }
    | {
        filter?: (
            | "id"
            | "organization"
            | "name"
            | "metadata"
            | "imageUrl"
            | "phone"
            | "location"
            | "displayName"
            | "teams"
            | "accountStatus"
            | "activeTask"
            | "capacity"
            | "delayTime"
            | "onDuty"
            | "tasks"
            | "timeCreated"
            | "timeLastModified"
            | "timeLastSeen"
            | "userData"
            | "vehicle"
        )[];
    }
    | {
        analytics?: boolean;
        filter?: (
            | "id"
            | "organization"
            | "name"
            | "metadata"
            | "imageUrl"
            | "phone"
            | "location"
            | "displayName"
            | "teams"
            | "accountStatus"
            | "activeTask"
            | "capacity"
            | "delayTime"
            | "onDuty"
            | "tasks"
            | "timeCreated"
            | "timeLastModified"
            | "timeLastSeen"
            | "userData"
            | "vehicle"
        )[];
    }

Default: {}

Source§

readonly overrideFields?: {
    completeAfter?: string;
    completeBefore?: string;
    includeBarcodes?: boolean;
    includeDependencies?: boolean;
    includeMetadata?: boolean;
    notes?: string;
    pickupTask?: boolean;
    serviceTime?: number;
}

Default: {}

Source§

readonly phone?: string

The phone of the recipient for lookup

Source§

readonly recipientName?: string

The recipient's complete name

Source§

readonly recipientPhone?: string

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.

Source§

readonly resource?:
    | "admin"
    | "organization"
    | "task"
    | "container"
    | "team"
    | "destination"
    | "hub"
    | "recipient"
    | "worker"

The resource to perform operations on Default: "task"

Source§

readonly returnAll?: boolean

Whether to return all results or only up to a given limit

Source§

readonly schedule?: {
    scheduleProperties: {
        date: string;
        shifts?: {
            shiftsProperties: { end: string; start: string }[];
        };
        timezone: string;
    }[];
}

Default: {} Type options: {"multipleValues":true,"multipleValueButtonText":"Add Schedule"}

Source§

readonly success?: boolean

Whether the task's completion was successful Default: true

Source§

readonly tasks?: string

Task's ID that are going to be used Default: [] Type options: {"multipleValues":true,"multipleValueButtonText":"Add Task"}

Source§

readonly teams?: unknown[]

One or more teams of which the worker is a member. Choose from the list, or specify IDs using an expression. Default: [] Type options: {"loadOptionsMethod":"getTeams"}

Source§

readonly type?: 0 | 1 | -1

Source§

readonly unparsed?: boolean

Whether or not the address is specified in a single unparsed string

Source§

readonly updateFields?:
    | {
        isReadOnly?: boolean;
        name?: string;
        phone?: string;
    }
    | {
        destination?: {
            destinationProperties: {
                address: string;
                addressApartment?: string;
                addressCity: string;
                addressCountry: string;
                addressName?: string;
                addressNotes?: string;
                addressNumber: string;
                addressPostalCode?: string;
                addressState: string;
                addressStreet: string;
                unparsed?: boolean;
            };
        };
        name?: string;
        teams?: unknown[];
    }
    | {
        notes?: string;
        recipientName?: string;
        recipientPhone?: string;
        skipSMSNotifications?: boolean;
    }
    | {
        completeAfter?: string;
        completeBefore?: string;
        executor?: string;
        merchant?: string;
        notes?: string;
        pickupTask?: boolean;
        quantity?: number;
        serviceTime?: number;
    }
    | {
        enableSelfAssignment?: boolean;
        hub?: string;
        managers?: unknown[];
        name?: string;
        workers?: unknown[];
    }
    | {
        capacity?: number;
        displayName?: string;
        name?: string;
        teams?: unknown[];
    }

Default: {}

Source§

readonly workers?: unknown[]

A list of workers. Choose from the list, or specify IDs using an expression. Default: [] Type options: {"loadOptionsMethod":"getWorkers"}