/**
 * Onfleet Node - Version 1
 * Discriminator: resource=team, operation=autoDispatch
 */


interface Credentials {
  onfleetApi: CredentialReference;
}

/** Automatically dispatch tasks assigned to a team to on-duty drivers */
export type OnfleetV1TeamAutoDispatchParams = {
  resource: 'team';
  operation: 'autoDispatch';
/**
 * The ID of the team object for lookup
 */
    id?: string | Expression<string> | PlaceholderValue;
/**
 * Additional Fields
 * @default {}
 */
    additionalFields?: {
    /** Ending Route
     * @default {}
     */
    endingRoute?: {
        /** Ending Route Properties
     */
    endingRouteProperties?: {
      /** Where the route will end
       */
      routeEnd?: 'team_hub' | 'worker_routing_address' | 'hub' | 'anywhere' | Expression<string>;
      /** The team's hub. Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
       * @displayOptions.show { routeEnd: ["hub"] }
       */
      hub?: string | Expression<string>;
    };
  };
    /** Max allowed time in minutes that a task can be late
     * @default 10
     */
    maxAllowedDelay?: number | Expression<number>;
    /** Total number of tasks allowed on a route
     * @default 100
     */
    maxTasksPerRoute?: number | Expression<number>;
    /** Schedule Time Window
     * @default {}
     */
    scheduleTimeWindow?: {
        /** Schedule Time Window Properties
     */
    scheduleTimeWindowProperties?: {
      /** Start Time
       */
      startTime?: string | Expression<string>;
      /** End Time
       */
      endTime?: string | Expression<string>;
    };
  };
    /** The default service time to apply in Minutes to the tasks when no task service time exists
     * @default 2
     */
    serviceTime?: number | Expression<number>;
    /** Task Time Window
     * @default {}
     */
    taskTimeWindow?: {
        /** Task Time Window Properties
     */
    taskTimeWindowProperties?: {
      /** Start Time
       */
      startTime?: string | Expression<string>;
      /** End Time
       */
      endTime?: string | Expression<string>;
    };
  };
  };
};

export type OnfleetV1TeamAutoDispatchNode = {
  type: 'n8n-nodes-base.onfleet';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<OnfleetV1TeamAutoDispatchParams>;
};