/** * Keap Node - Version 1 * Discriminator: resource=contact, operation=upsert */ interface Credentials { keapOAuth2Api: CredentialReference; } /** Create a new contact, or update the current one if it already exists (upsert) */ export type KeapV1ContactUpsertParams = { resource: 'contact'; operation: 'upsert'; /** * Performs duplicate checking by one of the following options: Email, EmailAndName. If a match is found using the option provided, the existing contact will be updated. * @default email */ duplicateOption?: 'email' | 'emailAndName' | Expression; /** * Additional Fields * @default {} */ additionalFields?: { /** Anniversary */ anniversary?: string | Expression; /** Company ID * @default 0 */ companyId?: number | Expression; /** Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a> */ contactType?: string | Expression; /** Family Name */ familyName?: string | Expression | PlaceholderValue; /** Given Name */ givenName?: string | Expression | PlaceholderValue; /** IP Address */ ipAddress?: string | Expression | PlaceholderValue; /** Job Title */ jobTitle?: string | Expression | PlaceholderValue; /** Lead Source ID * @default 0 */ leadSourceId?: number | Expression; /** Middle Name */ middleName?: string | Expression | PlaceholderValue; /** Opt In Reason */ optInReason?: string | Expression | PlaceholderValue; /** Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a> */ ownerId?: string | Expression; /** Preferred Locale */ preferredLocale?: string | Expression | PlaceholderValue; /** Preferred Name */ preferredName?: string | Expression | PlaceholderValue; /** Source Type */ sourceType?: 'API' | 'IMPORT' | 'LANDINGPAGE' | 'MANUAL' | 'OTHER' | 'UNKNOWN' | Expression; /** Spouse Name */ spouseName?: string | Expression | PlaceholderValue; /** Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a> */ timezone?: string | Expression; /** Website */ website?: string | Expression | PlaceholderValue; }; /** * Addresses * @default {} */ addressesUi?: { /** Address */ addressesValues?: Array<{ /** Field */ field?: 'BILLING' | 'SHIPPING' | 'OTHER' | Expression; /** Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a> */ countryCode?: string | Expression; /** Line 1 */ line1?: string | Expression | PlaceholderValue; /** Line 2 */ line2?: string | Expression | PlaceholderValue; /** Locality */ locality?: string | Expression | PlaceholderValue; /** Postal Code */ postalCode?: string | Expression | PlaceholderValue; /** Region */ region?: string | Expression | PlaceholderValue; /** Zip Code */ zipCode?: string | Expression | PlaceholderValue; /** Zip Four */ zipFour?: string | Expression | PlaceholderValue; }>; }; /** * Emails * @default {} */ emailsUi?: { /** Email */ emailsValues?: Array<{ /** Field */ field?: 'EMAIL1' | 'EMAIL2' | 'EMAIL3' | Expression; /** Email */ email?: string | Expression | PlaceholderValue; }>; }; /** * Faxes * @default {} */ faxesUi?: { /** Fax */ faxesValues?: Array<{ /** Field */ field?: 'FAX1' | 'FAX2' | Expression; /** Number */ number?: string | Expression | PlaceholderValue; }>; }; /** * Phones * @default {} */ phonesUi?: { /** Phones */ phonesValues?: Array<{ /** Field */ field?: 'PHONE1' | 'PHONE2' | 'PHONE3' | 'PHONE4' | 'PHONE5' | Expression; /** Number */ number?: string | Expression | PlaceholderValue; }>; }; /** * Social Accounts * @default {} */ socialAccountsUi?: { /** Social Account */ socialAccountsValues?: Array<{ /** Type */ type?: 'Facebook' | 'Twitter' | 'LinkedIn' | Expression; /** Name */ name?: string | Expression | PlaceholderValue; }>; }; }; export type KeapV1ContactUpsertOutput = { addresses?: Array<{ field?: string; locality?: string; postal_code?: string; }>; date_created?: string; email_addresses?: Array<{ email?: string; field?: string; }>; email_opted_in?: boolean; email_status?: string; family_name?: string; given_name?: string; id?: number; last_updated?: string; last_updated_utc_millis?: number; phone_numbers?: Array<{ field?: string; number?: string; number_e164?: null; }>; ScoreValue?: null; tag_ids?: Array; }; export type KeapV1ContactUpsertNode = { type: 'n8n-nodes-base.keap'; version: 1; credentials?: Credentials; config: NodeConfig; output?: Items; };