/**
 * Google Contacts Node - Version 1
 * Discriminator: resource=contact, operation=getAll
 */


interface Credentials {
  googleContactsOAuth2Api: CredentialReference;
}

/** Retrieve many contacts */
export type GoogleContactsV1ContactGetAllParams = {
  resource: 'contact';
  operation: 'getAll';
/**
 * 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 100
 */
    limit?: number | Expression<number>;
/**
 * A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas.
 * @default []
 */
    fields?: Array<'*' | 'addresses' | 'biographies' | 'birthdays' | 'coverPhotos' | 'emailAddresses' | 'events' | 'genders' | 'imClients' | 'interests' | 'locales' | 'memberships' | 'metadata' | 'names' | 'nicknames' | 'occupations' | 'organizations' | 'phoneNumbers' | 'photos' | 'relations' | 'residences' | 'sipAddresses' | 'skills' | 'urls' | 'userDefined'>;
/**
 * Whether or not to use a query to filter the results
 * @default false
 */
    useQuery?: boolean | Expression<boolean>;
/**
 * The plain-text query for the request. The query is used to match prefix phrases of the fields on a person. For example, a person with name "foo name" matches queries such as "f", "fo", "foo", "foo n", "nam", etc., but not "oo n".
 * @displayOptions.show { useQuery: [true] }
 */
    query?: string | Expression<string> | PlaceholderValue;
/**
 * Whether to return the data exactly in the way it got received from the API
 * @default false
 */
    rawData?: boolean | Expression<boolean>;
/**
 * Options
 * @displayOptions.show { useQuery: [false] }
 * @default {}
 */
    options?: {
    /** The order of the contacts returned in the result
     */
    sortOrder?: 'LAST_MODIFIED_ASCENDING' | 'LAST_MODIFIED_DESCENDING' | 'FIRST_NAME_ASCENDING' | 'LAST_NAME_ASCENDING' | Expression<string>;
  };
};

export type GoogleContactsV1ContactGetAllOutput = {
  contactId?: string;
  etag?: string;
  names?: {
    displayName?: string;
    displayNameLastFirst?: string;
    familyName?: string;
    givenName?: string;
    unstructuredName?: string;
  };
  phoneNumbers?: {
    mobile?: Array<string>;
  };
  resourceName?: string;
};

export type GoogleContactsV1ContactGetAllNode = {
  type: 'n8n-nodes-base.googleContacts';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<GoogleContactsV1ContactGetAllParams>;
  output?: Items<GoogleContactsV1ContactGetAllOutput>;
};