/**
 * Google Calendar Node - Version 1.3
 * Discriminator: resource=event, operation=getAll
 */


interface Credentials {
  googleCalendarOAuth2Api: CredentialReference;
}

/** Retrieve many events from a calendar */
export type GoogleCalendarV13EventGetAllParams = {
  resource: 'event';
  operation: 'getAll';
/**
 * Google Calendar to operate on
 * @default {"mode":"list","value":""}
 */
    calendar?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
/**
 * Whether to return all results or only up to a given limit
 * @default false
 */
    returnAll?: boolean | Expression<boolean>;
/**
 * Max number of results to return
 * @displayOptions.show { returnAll: [false] }
 * @default 50
 */
    limit?: number | Expression<number>;
/**
 * At least some part of the event must be after this time, use &lt;a href="https://docs.n8n.io/code/cookbook/luxon/" target="_blank"&gt;expression&lt;/a&gt; to set a date, or switch to fixed mode to choose date from widget
 * @default ={{ $now }}
 */
    timeMin?: string | Expression<string>;
/**
 * At least some part of the event must be before this time, use &lt;a href="https://docs.n8n.io/code/cookbook/luxon/" target="_blank"&gt;expression&lt;/a&gt; to set a date, or switch to fixed mode to choose date from widget
 * @default ={{ $now.plus({ week: 1 }) }}
 */
    timeMax?: string | Expression<string>;
/**
 * Options
 * @default {}
 */
    options?: {
    /** At least some part of the event must be after this time, use &lt;a href="https://docs.n8n.io/code/cookbook/luxon/" target="_blank"&gt;expression&lt;/a&gt; to set a date, or switch to fixed mode to choose date from widget
     */
    timeMin?: string | Expression<string>;
    /** At least some part of the event must be before this time, use &lt;a href="https://docs.n8n.io/code/cookbook/luxon/" target="_blank"&gt;expression&lt;/a&gt; to set a date, or switch to fixed mode to choose date from widget
     */
    timeMax?: string | Expression<string>;
    /** Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves
     * @default false
     */
    singleEvents?: boolean | Expression<boolean>;
    /** Specify fields to return, by default a predefined by Google set of commonly used fields would be returned. To return all fields, use '*', &lt;a href='https://developers.google.com/calendar/api/guides/performance#partial' target='_blank'&gt;More info&lt;/a&gt;.
     */
    fields?: string | Expression<string> | PlaceholderValue;
    /** Specifies event ID in the iCalendar format to be included in the response
     */
    iCalUID?: string | Expression<string> | PlaceholderValue;
    /** The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned.
     * @default 0
     */
    maxAttendees?: number | Expression<number>;
    /** The order of the events returned in the result
     */
    orderBy?: 'startTime' | 'updated' | Expression<string>;
    /** Free text search terms to find events that match these terms in any field, except for extended properties
     */
    query?: string | Expression<string> | PlaceholderValue;
    /** Recurring Event Handling
     * @default expand
     */
    recurringEventHandling?: 'expand' | 'first' | 'next' | Expression<string>;
    /** Whether to include deleted events (with status equals "cancelled") in the result
     * @default false
     */
    showDeleted?: boolean | Expression<boolean>;
    /** Whether to include hidden invitations in the result
     * @default false
     */
    showHiddenInvitations?: boolean | Expression<boolean>;
    /** Time zone used in the response. The default is the time zone of the calendar.
     * @default {"mode":"list","value":""}
     */
    timeZone?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
    /** Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by. When specified, entries deleted since this time will always be included regardless of showDeleted.
     */
    updatedMin?: string | Expression<string>;
  };
};

export type GoogleCalendarV13EventGetAllOutput = {
  created?: string;
  creator?: {
    email?: string;
    self?: boolean;
  };
  description?: string;
  end?: {
    dateTime?: string;
    timeZone?: string;
  };
  etag?: string;
  eventType?: string;
  htmlLink?: string;
  iCalUID?: string;
  id?: string;
  kind?: string;
  organizer?: {
    email?: string;
    self?: boolean;
  };
  reminders?: {
    useDefault?: boolean;
  };
  sequence?: number;
  start?: {
    dateTime?: string;
    timeZone?: string;
  };
  status?: string;
  summary?: string;
  updated?: string;
};

export type GoogleCalendarV13EventGetAllNode = {
  type: 'n8n-nodes-base.googleCalendar';
  version: 1.3;
  credentials?: Credentials;
  config: NodeConfig<GoogleCalendarV13EventGetAllParams>;
  output?: Items<GoogleCalendarV13EventGetAllOutput>;
};