/**
 * Pipedrive Node - Version 1
 * Discriminator: resource=person, operation=create
 */


interface Credentials {
  pipedriveApi: CredentialReference;
  pipedriveOAuth2Api: CredentialReference;
}

/** Create an activity */
export type PipedriveV1PersonCreateParams = {
  resource: 'person';
  operation: 'create';
  authentication?: 'apiToken' | 'oAuth2' | Expression<string>;
/**
 * The name of the person to create
 */
    name?: string | Expression<string> | PlaceholderValue;
/**
 * Additional Fields
 * @default {}
 */
    additionalFields?: {
    /** Adds a custom property to set also values which have not been predefined
     * @default {}
     */
    customProperties?: {
        /** Property
     */
    property?: Array<{
      /** Name of the custom field to set. Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
       */
      name?: string | Expression<string>;
      /** Value of the property to set
       */
      value?: string | Expression<string> | PlaceholderValue;
    }>;
  };
    /** Email of the person
     */
    email?: string | Expression<string> | PlaceholderValue;
    /** Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;
     */
    label?: string | Expression<string>;
    /** Please be aware that it is only allowed once to change the marketing status from an old status to a new one
     * @default subscribed
     */
    marketing_status?: 'no_consent' | 'unsubscribed' | 'subscribed' | 'archived' | Expression<string>;
    /** ID of the organization this deal will be associated with. Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
     */
    org_id?: string | Expression<string>;
    /** Phone number of the person
     */
    phone?: string | Expression<string> | PlaceholderValue;
    /** Visibility of the person. If omitted, visibility will be set to the default visibility setting of this item type for the authorized user.
     * @default 3
     */
    visible_to?: '1' | '3' | Expression<string>;
    /** ID of the User this deal will be associated with. Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
     */
    owner_id?: string | Expression<string>;
  };
};

export type PipedriveV1PersonCreateOutput = {
  active_flag?: boolean;
  activities_count?: number;
  add_time?: string;
  birthday?: null;
  cc_email?: string;
  closed_deals_count?: number;
  delete_time?: null;
  done_activities_count?: number;
  email?: Array<{
    label?: string;
    primary?: boolean;
    value?: string;
  }>;
  email_messages_count?: number;
  files_count?: number;
  first_char?: string;
  followers_count?: number;
  id?: number;
  im?: Array<{
    primary?: boolean;
    value?: string;
  }>;
  label_ids?: Array<number>;
  last_activity_date?: null;
  last_activity_id?: null;
  last_incoming_mail_time?: null;
  last_outgoing_mail_time?: null;
  lost_deals_count?: number;
  name?: string;
  next_activity_date?: null;
  next_activity_id?: null;
  next_activity_time?: null;
  notes_count?: number;
  open_deals_count?: number;
  owner_id?: {
    active_flag?: boolean;
    email?: string;
    has_pic?: number;
    id?: number;
    name?: string;
    value?: number;
  };
  owner_name?: string;
  participant_closed_deals_count?: number;
  participant_open_deals_count?: number;
  phone?: Array<{
    label?: string;
    primary?: boolean;
    value?: string;
  }>;
  picture_id?: null;
  postal_address_admin_area_level_1?: null;
  postal_address_admin_area_level_2?: null;
  postal_address_country?: null;
  postal_address_formatted_address?: null;
  postal_address_lat?: null;
  postal_address_locality?: null;
  postal_address_long?: null;
  postal_address_postal_code?: null;
  postal_address_route?: null;
  postal_address_street_number?: null;
  postal_address_sublocality?: null;
  postal_address_subpremise?: null;
  related_closed_deals_count?: number;
  related_lost_deals_count?: number;
  related_open_deals_count?: number;
  related_won_deals_count?: number;
  undone_activities_count?: number;
  update_time?: string;
  visible_to?: string;
  won_deals_count?: number;
};

export type PipedriveV1PersonCreateNode = {
  type: 'n8n-nodes-base.pipedrive';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<PipedriveV1PersonCreateParams>;
  output?: Items<PipedriveV1PersonCreateOutput>;
};