/** Dummy message for fqdn validation */ export interface SubmitContact { /** Submit Contact Id */ id?: string | null; } export interface SubmitContactRequest { /** * Contact's information. * To reconcile with an existing contact, * a phone or email must be provided, * or the current session identity must be attached to a contact or member. * * If no existing contact can be found, * a new contact is created with the specified information. * * * Required if there's no contextual identity or given `contactId`. * */ info?: ContactInfo; /** Pass through data, to be posted on Contact Submitted Domain Event (optional). */ passThroughData?: string | null; /** * Existing Contact ID (optional). * Requires permission `CONTACTS.SUBMIT_WITH_OVERRIDES` */ contactId?: string | null; } export interface ContactInfo { /** Contact's first and last name. */ name?: ContactName; /** Contact's email addresses. */ emails?: ContactEmailsWrapper; /** Contact's phone numbers. */ phones?: ContactPhonesWrapper; /** Contact's street addresses. */ addresses?: ContactAddressesWrapper; /** Contact's company name. */ company?: string | null; /** Contact's job title. */ jobTitle?: string | null; /** Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`. */ birthdate?: string | null; /** * Locale in * [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. * Typically, this is a lowercase 2-letter language code, * followed by a hyphen, followed by an uppercase 2-letter country code. * For example, `en-US` for U.S. English, and `de-DE` for Germany German. */ locale?: string | null; /** * List of contact's labels. * * Labels are used to organize contacts. Labels can be * added and removed using Label Contact and Unlabel Contact, respectively. * * To view or manage contact labels, use the Labels API. */ labelKeys?: LabelsWrapper; /** * Additional custom fields. * * Empty fields are not returned. */ extendedFields?: ExtendedFieldsWrapper; /** Contact's profile picture. */ picture?: ContactPicture; } export interface ContactName { /** Contact's first name. */ first?: string | null; /** Contact's last name. */ last?: string | null; } export interface ContactEmailsWrapper { /** List of up to 50 email addresses. */ items?: ContactEmail[]; } export interface ContactEmail { /** * Email ID. * @readonly */ id?: string | null; /** * Email type. * * `UNTAGGED` is shown as "Other" in the Contact List. */ tag?: EmailTag; /** Email address. */ email?: string; /** * Indicates whether this is the contact's primary email address. * When changing `primary` to `true` for an email, * the contact's other emails become `false`. * Changing the primary email of a contact also affects the subscription status to marketing emails that are decided based on the primary email. */ primary?: boolean | null; } export declare enum EmailTag { UNTAGGED = "UNTAGGED", MAIN = "MAIN", HOME = "HOME", WORK = "WORK" } export interface ContactPhonesWrapper { /** List of up to 50 phone numbers. */ items?: ContactPhone[]; } export interface ContactPhone { /** * Phone ID. * @readonly */ id?: string | null; /** * Phone type. * * `UNTAGGED` is shown as "Other" in the Contact List. */ tag?: PhoneTag; /** [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. */ countryCode?: string | null; /** Phone number. */ phone?: string; /** * [ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/) * phone number. * Automatically generated using `phone` and `countryCode`, pending both values are valid. * @readonly */ e164Phone?: string | null; /** * Indicates whether this is the contact's primary phone number. * When changing `primary` to `true` for a phone, * the contact's `primary` field for other phones becomes `false`. * Changing the primary phone number also affects the subscription status to SMS messages that are decided based on the primary phone. */ primary?: boolean | null; } export declare enum PhoneTag { UNTAGGED = "UNTAGGED", MAIN = "MAIN", HOME = "HOME", MOBILE = "MOBILE", WORK = "WORK", FAX = "FAX" } export interface ContactAddressesWrapper { /** List of up to 50 addresses. */ items?: ContactAddress[]; } export interface ContactAddress { /** * Street address ID. * @readonly */ id?: string | null; /** * Address type. * `UNTAGGED` is shown as "Other" in the Contact List. */ tag?: AddressTag; /** Street address. */ address?: Address; } export declare enum AddressTag { UNTAGGED = "UNTAGGED", HOME = "HOME", WORK = "WORK", BILLING = "BILLING", SHIPPING = "SHIPPING" } /** Physical address */ export interface Address extends AddressStreetOneOf { /** Street address object, with number and name in separate fields. */ streetAddress?: StreetAddress; /** Main address line, usually street and number, as free text. */ addressLine?: string | null; /** * 2-letter country code in an * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */ country?: string | null; /** * Code for a subdivision (such as state, prefecture, or province) in an * [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. */ subdivision?: string | null; /** City name. */ city?: string | null; /** Postal or zip code. */ postalCode?: string | null; /** * Free text providing more detailed address information, * such as apartment, suite, or floor. */ addressLine2?: string | null; } /** @oneof */ export interface AddressStreetOneOf { /** Street address object, with number and name in separate fields. */ streetAddress?: StreetAddress; /** Main address line, usually street and number, as free text. */ addressLine?: string | null; } export interface StreetAddress { /** Street number. */ number?: string; /** Street name. */ name?: string; } export interface AddressLocation { /** Address's latitude. */ latitude?: number | null; /** Address's longitude. */ longitude?: number | null; } export interface Subdivision { /** subdivision short code */ code?: string; /** Full subdivision name. */ name?: string; } export declare enum SubdivisionType { UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE", /** State */ ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1", /** County */ ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2", /** City/town */ ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3", /** Neighborhood/quarter */ ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4", /** Street/block */ ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5", /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */ COUNTRY = "COUNTRY" } export interface AssigneesWrapper { /** List of site contributor user IDs. */ items?: string[]; } export interface LabelsWrapper { /** * List of contact label keys. * * Contact labels help categorize contacts. Label keys must exist to be added to the contact. * Contact labels can be created or retrieved with Find or Create Label or List Labels. */ items?: string[]; } export interface ExtendedFieldsWrapper { /** * Contact's extended fields, * where each key is the field key, * and each value is the field's value for the contact. * * To view and manage extended fields, use the Extended Fields API. */ items?: Record; } export interface LocationsWrapper { /** List of location ids. */ items?: string[]; } /** TEST contact picture description */ export interface ContactPicture { /** * Image. * This can contain an image URL or a Wix Media image ID. */ image?: Image; } export interface Image { /** * WixMedia image ID. * This property is written by Wix when an image is uploaded to the Wix Media Manager. */ id?: string; /** Image source: Either a Media Manager URL or external URL. */ url?: string; /** Height of the original image. */ height?: number; /** Width of the original image. */ width?: number; /** Image alt text (optional). */ altText?: string | null; /** * Image URL expiration date (optional). * @readonly */ urlExpirationDate?: Date | null; } export declare enum ImageProvider { UNKNOWN = "UNKNOWN", /** Image stored outside Wix */ EXTERNAL = "EXTERNAL", /** Stored in wix media platform, Must be uploaded by using `GeneratePictureUploadUrl` */ WIX_MEDIA = "WIX_MEDIA" } export interface ContactActivity { /** Date and time of the last action. */ activityDate?: Date | null; /** Contact's last action in the site. */ activityType?: ContactActivityType; } export declare enum ContactActivityType { /** Visited the site. */ GENERAL = "GENERAL", /** Became a new contact. */ CONTACT_CREATED = "CONTACT_CREATED", /** Logged in. */ MEMBER_LOGIN = "MEMBER_LOGIN", /** Requested a site membership. */ MEMBER_REGISTER = "MEMBER_REGISTER", /** Was approved, blocked, or unblocked. */ MEMBER_STATUS_CHANGED = "MEMBER_STATUS_CHANGED", /** Submitted a form. */ FORM_SUBMITTED = "FORM_SUBMITTED", /** Started a chat. */ INBOX_FORM_SUBMITTED = "INBOX_FORM_SUBMITTED", /** Paid a payment request. */ INBOX_PAYMENT_REQUEST_PAID = "INBOX_PAYMENT_REQUEST_PAID", /** Received a message from the site. */ INBOX_MESSAGE_TO_CUSTOMER = "INBOX_MESSAGE_TO_CUSTOMER", /** Sent a new message to the site. */ INBOX_MESSAGE_FROM_CUSTOMER = "INBOX_MESSAGE_FROM_CUSTOMER", /** Subscribed to a site newsletter through a form. */ NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED = "NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED", /** Unsubscribed from a site newsletter. */ NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE = "NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE", /** Made a purchase. */ ECOM_PURCHASE = "ECOM_PURCHASE", /** Abandoned a shopping cart. */ ECOM_CART_ABANDON = "ECOM_CART_ABANDON", /** Checked out shopping cart and submitted buyer info (but didn’t complete the purchase yet). */ ECOM_CHECKOUT_BUYER = "ECOM_CHECKOUT_BUYER", /** Booked an appointment. */ BOOKINGS_APPOINTMENT = "BOOKINGS_APPOINTMENT", /** Made a Wix Hotels reservation. */ HOTELS_RESERVATION = "HOTELS_RESERVATION", /** Paid for a Wix Hotels reservation. */ HOTELS_PURCHASE = "HOTELS_PURCHASE", /** Confirmed a Wix Hotels reservation. */ HOTELS_CONFIRMATION = "HOTELS_CONFIRMATION", /** Canceled a Wix Hotels reservation. */ HOTELS_CANCEL = "HOTELS_CANCEL", /** Purchased a video. */ VIDEO_PURCHASE = "VIDEO_PURCHASE", /** Rented a video. */ VIDEO_RENT = "VIDEO_RENT", /** Made a purchase with a pay button. */ CASHIER_BUTTON_PURCHASE = "CASHIER_BUTTON_PURCHASE", /** Became a new Wix Marketplace lead. */ ARENA_NEW_LEAD = "ARENA_NEW_LEAD", /** RSVP'd to an event. */ EVENTS_RSVP = "EVENTS_RSVP", /** Paid an invoice. */ INVOICE_PAY = "INVOICE_PAY", /** An invoice is now overdue. */ INVOICE_OVERDUE = "INVOICE_OVERDUE", /** Accepted a price quote. */ PRICE_QUOTE_ACCEPT = "PRICE_QUOTE_ACCEPT", /** A price quote has expired. */ PRICE_QUOTE_EXPIRE = "PRICE_QUOTE_EXPIRE", /** Ordered food with Wix Restaurants. */ RESTAURANTS_ORDER = "RESTAURANTS_ORDER", /** Made a Wix Restaurants reservation. */ RESTAURANTS_RESERVATION = "RESTAURANTS_RESERVATION", /** Opened an email from the site. */ SHOUTOUT_OPEN = "SHOUTOUT_OPEN", /** Clicked a link in an email from the site. */ SHOUTOUT_CLICK = "SHOUTOUT_CLICK", /** Merged with another contact. */ CONTACT_MERGED = "CONTACT_MERGED", /** Subscribed to a site newsletter. */ NEWSLETTER_SUBSCRIPTION_SUBSCRIBE = "NEWSLETTER_SUBSCRIPTION_SUBSCRIBE", /** Subscription status to site newsletters is pending confirmation. */ NEWSLETTER_SUBSCRIPTION_PENDING = "NEWSLETTER_SUBSCRIPTION_PENDING", /** Subscription status to site newsletters is not set. */ NEWSLETTER_SUBSCRIPTION_NOT_SET = "NEWSLETTER_SUBSCRIPTION_NOT_SET", /** Subscribed to phone notifications. */ PHONE_SUBSCRIPTION_SUBSCRIBE = "PHONE_SUBSCRIPTION_SUBSCRIBE", /** Subscription to phone notificatons is pending confirmation. */ PHONE_SUBSCRIPTION_PENDING = "PHONE_SUBSCRIPTION_PENDING", /** Subscription to phone notificatons is not set. */ PHONE_SUBSCRIPTION_NOT_SET = "PHONE_SUBSCRIPTION_NOT_SET", /** Subscribed to phone notifications. */ PHONE_SUBSCRIPTION_UNSUBSCRIBE = "PHONE_SUBSCRIPTION_UNSUBSCRIBE" } export interface ActivityIcon { /** Icon name */ name?: string | null; /** Icon url */ url?: string | null; } export interface SubmitContactOptions { /** * Overrides `visitorId` * Requires permission `CONTACTS.SUBMIT_WITH_OVERRIDES` */ overrideVisitorId?: string | null; /** * Overrides `memberId` * Requires permission `CONTACTS.SUBMIT_WITH_OVERRIDES` */ overrideMemberId?: string | null; /** * Overrides `app_id` * Requires permission `CONTACTS.SUBMIT_WITH_OVERRIDES` */ overrideAppId?: string | null; /** * Indicates primary email is verified (first email on contact.emails) * Requires permission `CONTACTS.SUBMIT_WITH_OVERRIDES` */ emailVerified?: boolean | null; /** * Indicates primary phone is verified (first phone on contact.phones) * Requires permission `CONTACTS.SUBMIT_WITH_OVERRIDES` */ phoneVerified?: boolean | null; } export interface SubmitContactResponse { /** ID of the contact that was found or created. */ contactId?: string; /** * Identity type of the returned contact. * * - `CONTACT`: The returned contact ID belongs to a new or existing contact. * - `MEMBER`: The returned contact ID belongs to the currently logged-in site member. * - `NOT_AUTHENTICATED_MEMBER`: The returned contact ID belongs to a site member who is not currently logged in. */ identityType?: IdentityType; /** * Indicates whether the contact was just created or already existed. * * If the contact was just created, returns `true`. * If it already existed, returns `false`. */ newContact?: boolean; } export declare enum IdentityType { UNKNOWN = "UNKNOWN", /** Existing or new contact */ CONTACT = "CONTACT", /** Member is logged in, matching logic skipped */ MEMBER = "MEMBER", /** Matching contact is a member, Merge logic won't be applied */ NOT_AUTHENTICATED_MEMBER = "NOT_AUTHENTICATED_MEMBER" } export interface ContactToSubmit { /** * reserved 6; * reserved "raw_source"; */ contactInfo?: ContactInfo; /** Last activity */ activity?: ContactActivity; /** Pass through data */ passThroughData?: string | null; /** Contact Id */ contactId?: string; /** Create/Update */ submitOperation?: SubmitOperation; /** * Raw source * @deprecated */ rawSource?: string | null; /** Need to resolve source in allocator, because of server sign */ sourceType?: ContactSourceType; /** Source Id */ sourceId?: string | null; /** Hide from contact list (implicit contact) */ hideFromContactList?: boolean; } export declare enum SubmitOperation { UNKNOWN = "UNKNOWN", CREATE = "CREATE", UPDATE = "UPDATE" } export declare enum ContactSourceType { OTHER = "OTHER", ADMIN = "ADMIN", WIX_APP = "WIX_APP", IMPORT = "IMPORT", THIRD_PARTY = "THIRD_PARTY", WIX_BOOKINGS = "WIX_BOOKINGS", WIX_CHAT = "WIX_CHAT", WIX_EMAIL_MARKETING = "WIX_EMAIL_MARKETING", WIX_EVENTS = "WIX_EVENTS", WIX_FORMS = "WIX_FORMS", WIX_GROUPS = "WIX_GROUPS", WIX_HOTELS = "WIX_HOTELS", WIX_MARKET_PLACE = "WIX_MARKET_PLACE", WIX_MUSIC = "WIX_MUSIC", WIX_RESTAURANTS = "WIX_RESTAURANTS", WIX_SITE_MEMBERS = "WIX_SITE_MEMBERS", WIX_STORES = "WIX_STORES", WIX_CODE = "WIX_CODE", HOPP = "HOPP" } export interface SubmitVisitorIdRequest { /** Existing Contact ID */ contactId?: string; /** The visitor ID to be attached to the given `contactId` */ visitorId?: string; } export interface SubmitVisitorIdResponse { /** The mapped Contact ID */ contactId?: string; /** The mapped visitor ID */ visitorId?: string; /** Date in the `visitorId` was attached to the given `contactId` */ validFrom?: Date | null; } export interface MessageEnvelope { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } export interface IdentificationData extends IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType; } /** @oneof */ export interface IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } export declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } export interface SubmitContactResponseNonNullableFields { contactId: string; identityType: IdentityType; newContact: boolean; }