n8n-nodes-base
Version:
Base nodes of n8n
146 lines (142 loc) • 5.18 kB
text/typescript
/**
* Onfleet Node - Version 1
* Discriminator: resource=task, operation=create
*/
interface Credentials {
onfleetApi: CredentialReference;
}
/** Create a new Onfleet admin */
export type OnfleetV1TaskCreateParams = {
resource: 'task';
operation: 'create';
/**
* The ID of the task object for lookup
*/
id?: string | Expression<string> | PlaceholderValue;
/**
* Destination
* @default {}
*/
destination?: {
/** Destination Properties
*/
destinationProperties?: {
/** Whether or not the address is specified in a single unparsed string
* @default false
*/
unparsed?: boolean | Expression<boolean>;
/** The destination's street address details
* @displayOptions.show { unparsed: [true] }
*/
address?: string | Expression<string> | PlaceholderValue;
/** The number component of this address, it may also contain letters
* @displayOptions.show { unparsed: [false] }
*/
addressNumber?: string | Expression<string> | PlaceholderValue;
/** The name of the street
* @displayOptions.show { unparsed: [false] }
*/
addressStreet?: string | Expression<string> | PlaceholderValue;
/** The name of the municipality
* @displayOptions.show { unparsed: [false] }
*/
addressCity?: string | Expression<string> | PlaceholderValue;
/** State
* @displayOptions.show { unparsed: [false] }
*/
addressState?: string | Expression<string> | PlaceholderValue;
/** The name of the country
* @displayOptions.show { unparsed: [false] }
*/
addressCountry?: string | Expression<string> | PlaceholderValue;
/** The postal or zip code
* @displayOptions.show { unparsed: [false] }
*/
addressPostalCode?: string | Expression<string> | PlaceholderValue;
/** A name associated with this address
*/
addressName?: string | Expression<string> | PlaceholderValue;
/** The suite or apartment number, or any additional relevant information
*/
addressApartment?: string | Expression<string> | PlaceholderValue;
/** Notes about the destination
*/
addressNotes?: string | Expression<string> | PlaceholderValue;
};
};
/**
* Additional Fields
* @default {}
*/
additionalFields?: {
/** The earliest time the task should be completed
*/
completeAfter?: string | Expression<string>;
/** The latest time the task should be completed
*/
completeBefore?: string | Expression<string>;
/** The ID of the organization that will be responsible for fulfilling the task
*/
executor?: string | Expression<string> | PlaceholderValue;
/** The ID of the organization that will be displayed to the recipient of the task
*/
merchant?: string | Expression<string> | PlaceholderValue;
/** Notes for the task
*/
notes?: string | Expression<string> | PlaceholderValue;
/** Whether the task is a pickup task
* @default false
*/
pickupTask?: boolean | Expression<boolean>;
/** The number of units to be dropped off while completing this task, for route optimization purposes
* @default 0
*/
quantity?: number | Expression<number>;
/** Recipient
* @default {}
*/
recipient?: {
/** Recipient Properties
*/
recipientProperties?: {
/** The recipient's complete name
*/
recipientName?: string | Expression<string> | PlaceholderValue;
/** 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.
*/
recipientPhone?: string | Expression<string> | PlaceholderValue;
/** Notes for this recipient: these are global notes that should not be task- or destination-specific
*/
recipientNotes?: string | Expression<string> | PlaceholderValue;
/** Whether this recipient has requested to skip SMS notifications
* @default false
*/
recipientSkipSMSNotifications?: boolean | Expression<boolean>;
};
};
/** Override the recipient name for this task only
*/
recipientName?: string | Expression<string> | PlaceholderValue;
/** Override the recipient notes for this task only
*/
recipientNotes?: string | Expression<string> | PlaceholderValue;
/** Whether to override the recipient notification settings for this task
* @default false
*/
recipientSkipSMSNotifications?: boolean | Expression<boolean>;
/** The number of minutes to be spent by the worker on arrival at this task's destination, for route optimization purposes
* @default 0
*/
serviceTime?: number | Expression<number>;
/** Whether to override the organization ID with the merchant's org ID for this task
* @default false
*/
useMerchantForProxy?: boolean | Expression<boolean>;
};
};
export type OnfleetV1TaskCreateNode = {
type: 'n8n-nodes-base.onfleet';
version: 1;
credentials?: Credentials;
config: NodeConfig<OnfleetV1TaskCreateParams>;
};