"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BQ_HEAP_PAGEVIEWS_SCHEMA_ANDROID = exports.BQ_HEAP_PAGEVIEWS_SCHEMA_IOS = exports.BQ_HEAP_PAGEVIEWS_SCHEMA_WEB = exports.BQ_HEAP_PAGEVIEWS_SCHEMA_ALL = exports.BQ_HEAP_SESSIONS_SCHEMA_ANDROID = exports.BQ_HEAP_SESSIONS_SCHEMA_IOS = exports.BQ_HEAP_SESSIONS_SCHEMA_WEB = exports.BQ_HEAP_SESSIONS_SCHEMA_ALL = exports.BQ_HEAP_USERS_SCHEMA = exports.BQ_HEAP_EVENT_SCHEMA_ANDROID = exports.BQ_HEAP_EVENT_SCHEMA_IOS = exports.BQ_HEAP_EVENT_SCHEMA_WEB = exports.BQ_HEAP_EVENT_SCHEMA_ALL = exports.BQ_SEGMENT_SCHEMA = void 0;
exports.BQ_SEGMENT_SCHEMA = [
    {
        name: '_id',
        type: 'number',
        description: 'The unique ID of the track call itself.'
    },
    {
        name: 'anonymous_id',
        type: 'string',
        description: 'The anonymous ID of the user.'
    },
    {
        name: 'context_ip',
        type: 'string',
        description: 'The IP address of the client. Non-user-related context fields sent with each track call.'
    },
    {
        name: 'context_library_name',
        type: 'string',
        description: 'The Logging library name. Non-user-related context fields sent with each track call.'
    },
    {
        name: 'context_library_version',
        type: 'string',
        description: 'The Logging library version. Non-user-related context fields sent with each track call.'
    },
    {
        name: 'context_page_path',
        type: 'string',
        description: 'The path of the page on which the event was logged.'
    },
    {
        name: 'context_page_title',
        type: 'string',
        description: 'The title of the page on which the event was logged.'
    },
    {
        name: 'context_page_url',
        type: 'string',
        description: 'The full url of the page on which the event was logged.'
    },
    {
        name: 'context_locale',
        type: 'string',
        description: 'The browsers locale used when the event was logged.'
    },
    {
        name: 'context_user_agent',
        type: 'string',
        description: 'The browsers user-agent string.'
    },
    {
        name: 'event',
        type: 'string',
        description: 'The slug of the event name, so you can join the tracks table.'
    },
    {
        name: 'event_text',
        type: 'string',
        description: 'The name of the event.'
    },
    {
        name: 'loaded_at',
        type: 'timestamp',
        description: 'The UTC timestamp reflecting when the data was staged by the processor. Bigquery only.'
    },
    {
        name: 'original_timestamp',
        type: 'timestamp',
        description: 'The original timestamp set by the Segment library at the time the event is created. This timestamp can be affected by device clock skew.'
    },
    {
        name: 'received_at',
        type: 'timestamp',
        description: 'When Segment received the track call.'
    },
    {
        name: 'sent_at',
        type: 'timestamp',
        description: 'When a user triggered the track call. This timestamp can also be affected by device clock skew'
    },
    {
        name: 'timestamp',
        type: 'timestamp',
        description: 'The UTC-converted timestamp which is set by the Segment library'
    },
    {
        name: 'uuid_ts',
        type: 'timestamp',
        description: 'This is used to keep track of when the specific event was last processed by our connector, specifically for deduping and debugging purposes. You can generally ignore this column'
    }
];
exports.BQ_HEAP_EVENT_SCHEMA_ALL = [
    {
        name: 'event_id',
        type: 'number',
        description: 'Unique ID of the associated event, randomly generated by Heap.'
    },
    {
        name: 'user_id',
        type: 'number',
        description: 'Unique ID of the associated user, randomly generated by Heap.'
    },
    {
        name: 'session_id',
        type: 'number',
        description: 'Unique ID of the associated session, randomly generated by Heap.'
    },
    {
        name: 'time',
        type: 'timestamp',
        description: 'Timestamp without timezone of when the event happened.'
    },
    {
        name: 'type',
        type: 'string',
        description: 'For web autocaptured events, can be any of view page, click, submit, change, with push state events registered as view page events. For iOS auto-tracked events, can be touch, edit field, or a gesture recognizer you’ve defined. For custom events, this will be the custom event name.'
    },
    {
        name: 'library',
        type: 'string',
        description: 'Version of Heap library on which event occurred. Can be one of “web”, “iOS”, or “server”.'
    }
];
exports.BQ_HEAP_EVENT_SCHEMA_WEB = [
    {
        name: 'platform',
        type: 'string',
        description: 'User’s operating system.'
    },
    {
        name: 'device_type',
        type: 'string',
        description: 'Device type, which can be one of “Mobile”, “Tablet”, or “Desktop”.'
    },
    {
        name: 'country',
        type: 'string',
        description: 'Country in which user session occurred, based on IP.'
    },
    {
        name: 'region',
        type: 'string',
        description: 'Region in which user session occurred, based on IP.'
    },
    {
        name: 'city',
        type: 'string',
        description: 'City in which user session occurred, based on IP.'
    },
    {
        name: 'IP',
        type: 'string',
        description: 'The IP address for the session, which is used for determining geolocation.'
    },
    {
        name: 'referrer',
        type: 'string',
        description: 'URL that linked to your site and initiated the session.If the user navigated directly to your site, or referral headers were stripped, then this value will appear as NULL downstream and as `direct` in the UI.'
    },
    {
        name: 'landing_page',
        type: 'string',
        description: 'URL of the first pageview of the session.'
    },
    {
        name: 'landing_page_query',
        type: 'string',
        description: 'The query parameters of the first page of the user’s session.'
    },
    {
        name: 'landing_page_hash',
        type: 'string',
        description: 'The hash route of the first page of the user’s session.'
    },
    {
        name: 'browser',
        type: 'string',
        description: 'User’s browser.'
    },
    {
        name: 'search_keyword',
        type: 'string',
        description: 'Search term that brought the user to your site. [Deprecated]'
    },
    {
        name: 'utm_source',
        type: 'string',
        description: 'GA-based utm_source tag associated with the session’s initial pageview.'
    },
    {
        name: 'utm_campaign',
        type: 'string',
        description: 'GA-based utm_campaign tag associated with the session’s initial pageview.'
    },
    {
        name: 'utm_medium',
        type: 'string',
        description: 'GA-based utm_medium tag associated with the session’s initial pageview.'
    },
    {
        name: 'utm_term',
        type: 'string',
        description: 'GA-based utm_term tag associated with the session’s initial pageview.'
    },
    {
        name: 'utm_content',
        type: 'string',
        description: 'GA-based utm_content tag associated with the session’s initial pageview.'
    },
    {
        name: 'domain',
        type: 'string',
        description: 'Domain including subdomain, e.g. blog.heap.io.'
    },
    {
        name: 'path',
        type: 'string',
        description: 'Portion of the current URL following your domain, e.g. /docs for heap.io/docs.'
    },
    {
        name: 'hash',
        type: 'string',
        description: 'Portion of the current URL following the hash sign, e.g. #install for heap.io/docs#install.'
    },
    {
        name: 'query',
        type: 'string',
        description: 'Query params of the page’s current URL, e.g. ?utm_id=1234 for heap.io?utm_id=1234.'
    },
    {
        name: 'title',
        type: 'string',
        description: 'Title of the current page.'
    },
    {
        name: 'href',
        type: 'string',
        description: 'href property of link (used for clicks on anchor tags).'
    },
    {
        name: 'target_text',
        type: 'string',
        description: 'Button text of the event target.'
    },
    {
        name: 'heap_previous_page',
        type: 'string',
        description: 'The previous page visited in this session.'
    }
];
exports.BQ_HEAP_EVENT_SCHEMA_IOS = [
    {
        name: 'platform',
        type: 'string',
        description: 'User’s operating system.'
    },
    {
        name: 'device_type',
        type: 'string',
        description: 'Device type, which can be one of “Mobile”, “Tablet”, or “Desktop”.'
    },
    {
        name: 'country',
        type: 'string',
        description: 'Country in which user session occurred, based on IP.'
    },
    {
        name: 'region',
        type: 'string',
        description: 'Region in which user session occurred, based on IP.'
    },
    {
        name: 'city',
        type: 'string',
        description: 'City in which user session occurred, based on IP.'
    },
    {
        name: 'IP',
        type: 'string',
        description: 'The IP address for the session, which is used for determining geolocation.'
    },
    {
        name: 'device',
        type: 'string',
        description: 'User device model.'
    },
    {
        name: 'carrier',
        type: 'string',
        description: 'Users mobile phone carrier.'
    },
    {
        name: 'app_name',
        type: 'string',
        description: 'Current name of iOS app, as determined by CFBundleName.'
    },
    {
        name: 'app_version',
        type: 'string',
        description: 'Current version of iOS app, as determined by CFBundleShortVersionString.'
    },
    {
        name: 'action_method',
        type: 'string',
        description: 'Name of the action method triggered by this event, e.g. loginButtonWasPressed.'
    },
    {
        name: 'view_controller',
        type: 'string',
        description: 'Name of the current view controller.'
    },
    {
        name: 'screen_a11y_id',
        type: 'string',
        description: 'accessibilityIdentifier for the current view controller.'
    },
    {
        name: 'screen_a11y_label',
        type: 'string',
        description: 'accessibilityLabel for the current view controller.'
    },
    {
        name: 'target_view_class',
        type: 'string',
        description: 'Underlying class name of an iOS action’s target, e.g. UITableCellView.'
    },
    {
        name: 'target_view_name',
        type: 'string',
        description: 'Instance variable name of an iOS action’s target, e.g. loginButtonView.'
    },
    {
        name: 'target_a11y_id',
        type: 'string',
        description: 'accessibilityIdentifier of an iOS action’s target.'
    },
    {
        name: 'target_a11y_label',
        type: 'string',
        description: 'accessibilityLabel of an iOS action’s target.'
    },
    {
        name: 'target_text',
        type: 'string',
        description: 'Button text of the event target.'
    }
];
exports.BQ_HEAP_EVENT_SCHEMA_ANDROID = [
    {
        name: 'heap_device_id',
        type: 'string',
        description: 'Current ID of the device.'
    },
    {
        name: 'heap_app_name',
        type: 'string',
        description: 'Current name of Android app.'
    },
    {
        name: 'heap_app_version',
        type: 'string',
        description: 'Current version of the Android app.'
    },
    {
        name: 'heap_device',
        type: 'string',
        description: 'User’s device model.'
    }
];
exports.BQ_HEAP_USERS_SCHEMA = [
    {
        name: 'user_id',
        type: 'number',
        description: 'Unique ID of user, randomly generated by Heap.'
    },
    {
        name: 'identity',
        type: 'string',
        description: 'User’s username or other unique token, passed via heap.identify API. Must be unique.'
    },
    {
        name: 'handle',
        type: 'string',
        description: 'User’s username or other unique token, passed in via heap.addUserProperties API.'
    },
    {
        name: 'email',
        type: 'string',
        description: 'User’s email address, passed in via heap.addUserProperties API.'
    },
    {
        name: 'joindate',
        type: 'timestamp',
        description: 'Timestamp without timezone of when the user was first seen.'
    },
    {
        name: 'last_modified',
        type: 'timestamp',
        description: 'Timestamp without timezone of when the user’s data was last modified.'
    }
];
exports.BQ_HEAP_SESSIONS_SCHEMA_ALL = [
    {
        name: 'event_id',
        type: 'number',
        description: 'ID of associated session event, randomly generated by Heap used internally by Heap for data syncing.'
    },
    {
        name: 'user_id',
        type: 'number',
        description: 'ID of associated user, randomly generated by Heap.'
    },
    {
        name: 'session_id',
        type: 'number',
        description: 'ID of associated session, randomly generated by Heap.'
    },
    {
        name: 'time',
        type: 'timestamp',
        description: 'Timestamp without timezone of when session started.'
    },
    {
        name: 'library',
        type: 'string',
        description: 'Version of Heap library which initiated the session. Can be one of “web” or “iOS”.'
    },
    {
        name: 'country',
        type: 'string',
        description: 'Country in which user session occurred, based on IP.'
    },
    {
        name: 'region',
        type: 'string',
        description: 'Region in which user session occurred, based on IP.'
    },
    {
        name: 'city',
        type: 'string',
        description: 'City in which user session occurred, based on IP.'
    }
];
exports.BQ_HEAP_SESSIONS_SCHEMA_WEB = [
    {
        name: 'platform',
        type: 'string',
        description: 'User’s operating system.'
    },
    {
        name: 'device_type',
        type: 'string',
        description: 'Device type, which can be one of “Mobile”, “Tablet”, or “Desktop”.'
    },
    {
        name: 'IP',
        type: 'string',
        description: 'The IP address for the session, which is used for determining geolocation.'
    },
    {
        name: 'referrer',
        type: 'string',
        description: 'URL that linked to your site and initiated the session.If the user navigated directly to your site, or referral headers were stripped, then this value will appear as NULL downstream and as `direct` in the UI.'
    },
    {
        name: 'landing_page',
        type: 'string',
        description: 'URL of the first pageview of the session.'
    },
    {
        name: 'landing_page_query',
        type: 'string',
        description: 'The query parameters of the first page of the user’s session.'
    },
    {
        name: 'landing_page_hash',
        type: 'string',
        description: 'The hash route of the first page of the user’s session.'
    },
    {
        name: 'browser',
        type: 'string',
        description: 'User’s browser.'
    },
    {
        name: 'search_keyword',
        type: 'string',
        description: 'Search term that brought the user to your site. [Deprecated]'
    },
    {
        name: 'utm_source',
        type: 'string',
        description: 'GA-based utm_source tag associated with the session’s initial pageview.'
    },
    {
        name: 'utm_campaign',
        type: 'string',
        description: 'GA-based utm_campaign tag associated with the session’s initial pageview.'
    },
    {
        name: 'utm_medium',
        type: 'string',
        description: 'GA-based utm_medium tag associated with the session’s initial pageview.'
    },
    {
        name: 'utm_term',
        type: 'string',
        description: 'GA-based utm_term tag associated with the session’s initial pageview.'
    },
    {
        name: 'utm_content',
        type: 'string',
        description: 'GA-based utm_content tag associated with the session’s initial pageview.'
    }
];
exports.BQ_HEAP_SESSIONS_SCHEMA_IOS = [
    {
        name: 'platform',
        type: 'string',
        description: 'User’s operating system.'
    },
    {
        name: 'device_type',
        type: 'string',
        description: 'Device type, which can be one of “Mobile”, “Tablet”, or “Desktop”.'
    },
    {
        name: 'IP',
        type: 'string',
        description: 'The IP address for the session, which is used for determining geolocation.'
    },
    {
        name: 'device',
        type: 'string',
        description: 'User device model.'
    },
    {
        name: 'carrier',
        type: 'string',
        description: 'Users mobile phone carrier.'
    },
    {
        name: 'app_name',
        type: 'string',
        description: 'Current name of iOS app, as determined by CFBundleName.'
    },
    {
        name: 'app_version',
        type: 'string',
        description: 'Current version of iOS app, as determined by CFBundleShortVersionString.'
    }
];
exports.BQ_HEAP_SESSIONS_SCHEMA_ANDROID = [
    {
        name: 'heap_device_id',
        type: 'string',
        description: 'Current ID of the device.'
    },
    {
        name: 'heap_app_name',
        type: 'string',
        description: 'Current name of Android app.'
    },
    {
        name: 'heap_app_version',
        type: 'string',
        description: 'Current version of the Android app.'
    },
    {
        name: 'heap_device',
        type: 'string',
        description: 'User’s device model.'
    }
];
exports.BQ_HEAP_PAGEVIEWS_SCHEMA_ALL = [
    {
        name: 'event_id',
        type: 'number',
        description: 'Unique ID of associated pageview event.'
    },
    {
        name: 'user_id',
        type: 'number',
        description: 'Unique ID of associated user, randomly generated by Heap.'
    },
    {
        name: 'session_id',
        type: 'number',
        description: 'Unique ID of associated session, randomly generated by Heap.'
    },
    {
        name: 'time',
        type: 'timestamp',
        description: 'Timestamp without timezone of when the pageview occurred.'
    },
    {
        name: 'library',
        type: 'string',
        description: 'Version of Heap library which initiated the session. Can be one of “web” or “iOS”.'
    }
];
exports.BQ_HEAP_PAGEVIEWS_SCHEMA_WEB = [
    {
        name: 'platform',
        type: 'string',
        description: 'User’s operating system.'
    },
    {
        name: 'device_type',
        type: 'string',
        description: 'Device type, which can be one of “Mobile”, “Tablet”, or “Desktop”.'
    },
    {
        name: 'country',
        type: 'string',
        description: 'Country in which user session occurred, based on IP.'
    },
    {
        name: 'region',
        type: 'string',
        description: 'Region in which user session occurred, based on IP.'
    },
    {
        name: 'city',
        type: 'string',
        description: 'City in which user session occurred, based on IP.'
    },
    {
        name: 'IP',
        type: 'string',
        description: 'The IP address for the session, which is used for determining geolocation.'
    },
    {
        name: 'referrer',
        type: 'string',
        description: 'URL that linked to your site and initiated the session.If the user navigated directly to your site, or referral headers were stripped, then this value will appear as NULL downstream and as `direct` in the UI.'
    },
    {
        name: 'landing_page',
        type: 'string',
        description: 'URL of the first pageview of the session.'
    },
    {
        name: 'landing_page_query',
        type: 'string',
        description: 'The query parameters of the first page of the user’s session.'
    },
    {
        name: 'landing_page_hash',
        type: 'string',
        description: 'The hash route of the first page of the user’s session.'
    },
    {
        name: 'browser',
        type: 'string',
        description: 'User’s browser.'
    },
    {
        name: 'search_keyword',
        type: 'string',
        description: 'Search term that brought the user to your site. [Deprecated]'
    },
    {
        name: 'utm_source',
        type: 'string',
        description: 'GA-based utm_source tag associated with the session’s initial pageview.'
    },
    {
        name: 'utm_campaign',
        type: 'string',
        description: 'GA-based utm_campaign tag associated with the session’s initial pageview.'
    },
    {
        name: 'utm_medium',
        type: 'string',
        description: 'GA-based utm_medium tag associated with the session’s initial pageview.'
    },
    {
        name: 'utm_term',
        type: 'string',
        description: 'GA-based utm_term tag associated with the session’s initial pageview.'
    },
    {
        name: 'utm_content',
        type: 'string',
        description: 'GA-based utm_content tag associated with the session’s initial pageview.'
    },
    {
        name: 'path',
        type: 'string',
        description: 'Portion of the current URL following your domain, e.g. /docs for heap.io/docs.'
    },
    {
        name: 'hash',
        type: 'string',
        description: 'Portion of the current URL following the hash sign, e.g. #install for heap.io/docs#install.'
    },
    {
        name: 'query',
        type: 'string',
        description: 'Query params of the page’s current URL, e.g. ?utm_id=1234 for heap.io?utm_id=1234.'
    },
    {
        name: 'title',
        type: 'string',
        description: 'Title of the current page.'
    },
    {
        name: 'heap_previous_page',
        type: 'string',
        description: 'The previous page visited in this session.'
    }
];
exports.BQ_HEAP_PAGEVIEWS_SCHEMA_IOS = [
    {
        name: 'platform',
        type: 'string',
        description: 'User’s operating system.'
    },
    {
        name: 'device_type',
        type: 'string',
        description: 'Device type, which can be one of “Mobile”, “Tablet”, or “Desktop”.'
    },
    {
        name: 'country',
        type: 'string',
        description: 'Country in which user session occurred, based on IP.'
    },
    {
        name: 'region',
        type: 'string',
        description: 'Region in which user session occurred, based on IP.'
    },
    {
        name: 'city',
        type: 'string',
        description: 'City in which user session occurred, based on IP.'
    },
    {
        name: 'IP',
        type: 'string',
        description: 'The IP address for the session, which is used for determining geolocation.'
    },
    {
        name: 'device',
        type: 'string',
        description: 'User device model.'
    },
    {
        name: 'carrier',
        type: 'string',
        description: 'Users mobile phone carrier.'
    },
    {
        name: 'app_name',
        type: 'string',
        description: 'Current name of iOS app, as determined by CFBundleName.'
    },
    {
        name: 'app_version',
        type: 'string',
        description: 'Current version of iOS app, as determined by CFBundleShortVersionString.'
    },
    {
        name: 'view_controller',
        type: 'string',
        description: 'Name of the current view controller.'
    },
    {
        name: 'screen_a11y_id',
        type: 'string',
        description: 'accessibilityIdentifier for the current view controller.'
    },
    {
        name: 'screen_a11y_label',
        type: 'string',
        description: 'accessibilityLabel for the current view controller.'
    }
];
exports.BQ_HEAP_PAGEVIEWS_SCHEMA_ANDROID = [
    {
        name: 'heap_device_id',
        type: 'string',
        description: 'Current ID of the device.'
    },
    {
        name: 'heap_app_name',
        type: 'string',
        description: 'Current name of Android app.'
    },
    {
        name: 'heap_app_version',
        type: 'string',
        description: 'Current version of the Android app.'
    },
    {
        name: 'heap_device',
        type: 'string',
        description: 'User’s device model.'
    }
];
