Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

1.0 MB
Raw Blame
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`segment templates template segment-actions-absmartly matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to ABsmartly",
  "free": false,
  "icon_url": "/static/services/absmartly.com.png",
  "id": "segment-actions-absmartly",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "ABsmartly Collector endpoint, for example: https://you-subdomain.absmartly.io/v1 - Contact ABsmartly Support if you don't know your Collector Endpoint.",
      "key": "collectorEndpoint",
      "label": "Collector Endpoint",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "ABsmartly SDK API Key. Create SDK Api Keys in the Settings > API Keys section of the ABsmartly Web Console",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "Environment name. Environment name needs to match what's in the Web Console. Create Environments in the Settings > Environments section of the ABsmartly Web Console",
      "key": "environment",
      "label": "Environment",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event != 'Experiment Viewed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {},
          "description": "The units of the goal to track. Mapping of unit name to source property in the event payload. Create Units in the Settings > Units section of the ABsmartly Web Console",
          "key": "units",
          "label": "Units",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.event}",
          "description": "The name of the goal to track",
          "key": "name",
          "label": "Goal Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Custom properties of the goal",
          "key": "properties",
          "label": "Goal Properties",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$lib ?? 'segment'}",
          "description": "Optional agent identifier that originated the event. Used to identify which SDK generated the event.",
          "key": "agent",
          "label": "Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "Optional application name that originated this event. Must exist if not empty. Create Applications in the Settings > Applications section of the ABsmartly Web Console",
          "key": "application",
          "label": "Application",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "trackGoal",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {},
          "description": "The units of the goal to track. Mapping of unit name to source property in the event payload. Create Units in the Settings > Units section of the ABsmartly Web Console",
          "key": "units",
          "label": "Units",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.event}",
          "description": "The name of the goal to track",
          "key": "name",
          "label": "Goal Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Custom properties of the goal",
          "key": "properties",
          "label": "Goal Properties",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$lib ?? 'segment'}",
          "description": "Optional agent identifier that originated the event. Used to identify which SDK generated the event.",
          "key": "agent",
          "label": "Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "Optional application name that originated this event. Must exist if not empty. Create Applications in the Settings > Applications section of the ABsmartly Web Console",
          "key": "application",
          "label": "Application",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "trackGoal",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Page Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$screen'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {},
          "description": "The units of the goal to track. Mapping of unit name to source property in the event payload. Create Units in the Settings > Units section of the ABsmartly Web Console",
          "key": "units",
          "label": "Units",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.event}",
          "description": "The name of the goal to track",
          "key": "name",
          "label": "Goal Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Custom properties of the goal",
          "key": "properties",
          "label": "Goal Properties",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$lib ?? 'segment'}",
          "description": "Optional agent identifier that originated the event. Used to identify which SDK generated the event.",
          "key": "agent",
          "label": "Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "Optional application name that originated this event. Must exist if not empty. Create Applications in the Settings > Applications section of the ABsmartly Web Console",
          "key": "application",
          "label": "Application",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "trackGoal",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Screen Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Experiment Viewed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {
            "$$_extend_object": "{event.properties.exposure}",
          },
          "description": "The ABsmartly exposure payload without any goals. Generated by the ABsmartly SDK and should not be modified.",
          "key": "exposure",
          "label": "ABsmartly Exposure Payload",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$lib ?? 'segment'}",
          "description": "Optional agent identifier that originated the event. Used to identify which SDK generated the event.",
          "key": "agent",
          "label": "Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "Optional application name that originated this event. Must exist if not empty. Create Applications in the Settings > Applications section of the ABsmartly Web Console",
          "key": "application",
          "label": "Application",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "trackExposure",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Exposures (Verbatim)",
    },
  ],
  "name": "ABsmartly",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-acoustic matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Acoustic",
  "free": false,
  "icon_url": "/static/services/acoustic.com.png",
  "id": "segment-actions-acoustic",
  "inputs_schema": [
    {
      "default": "customer_org_",
      "description": "Use your Acoustic Org name but replace any spaces with an underscore, eg., AcmeCustomer_Prod",
      "key": "fileNamePrefix",
      "label": "Customer Prefix",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": "",
      "description": "The Alias of the Access Point created for your access to the S3 Bucket.",
      "key": "s3_bucket_accesspoint_alias",
      "label": "S3 Bucket Access Point Alias",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "S3 Access Key for the S3 bucket.",
      "key": "s3_access_key",
      "label": "S3 Access Key",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "S3 Secret credential for the S3 bucket.",
      "key": "s3_secret",
      "label": "S3 Secret",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": "us-east-1",
      "description": "Should always be us-east-1 unless directed by Acoustic otherwise. ",
      "key": "s3_region",
      "label": "S3 Region",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": "Version 2.3",
      "description": "

Last-Modified: 02.01.2024 10.30.43

",
      "key": "version",
      "label": "Version:",
      "required": false,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {},
          "description": "Map simple Key-Value pairs (optional) ",
          "key": "key_value_pairs",
          "label": "Key-Value pairs",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "If the data needed is in an array, use this section to Map Array data into useable attributes (optional) ",
          "key": "array_data",
          "label": "Arrays",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "If the data is present in a Context section, use this to map the attributes of a Context Section (optional)",
          "key": "context",
          "label": "Context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "If the data is present in a Properties section, use this to map the attributes of a Properties Section (optional) ",
          "key": "properties",
          "label": "Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "If the data is present in a Traits section, use this to map the attributes of a Traits Section (optional) ",
          "key": "traits",
          "label": "Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.email ?? person.properties.email}",
          "description": "The field to be used to uniquely identify the Recipient in Acoustic. This field is required with Email preferred but not required.",
          "key": "uniqueRecipientId",
          "label": "UniqueRecipientId",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "Do Not Modify - The type of event. e.g. track or identify, this field is required",
          "key": "type",
          "label": "Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Do Not Modify - The timestamp for when the event took place. This field is required",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "receiveEvents",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {},
          "description": "Map simple Key-Value pairs (optional) ",
          "key": "key_value_pairs",
          "label": "Key-Value pairs",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "If the data needed is in an array, use this section to Map Array data into useable attributes (optional) ",
          "key": "array_data",
          "label": "Arrays",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "If the data is present in a Context section, use this to map the attributes of a Context Section (optional)",
          "key": "context",
          "label": "Context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "If the data is present in a Properties section, use this to map the attributes of a Properties Section (optional) ",
          "key": "properties",
          "label": "Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "If the data is present in a Traits section, use this to map the attributes of a Traits Section (optional) ",
          "key": "traits",
          "label": "Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.properties.email ?? person.properties.email}",
          "description": "The field to be used to uniquely identify the Recipient in Acoustic. This field is required with Email preferred but not required.",
          "key": "uniqueRecipientId",
          "label": "UniqueRecipientId",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "Do Not Modify - The type of event. e.g. track or identify, this field is required",
          "key": "type",
          "label": "Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Do Not Modify - The timestamp for when the event took place. This field is required",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "receiveEvents",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify Calls",
    },
  ],
  "name": "Acoustic",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-airship matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Airship",
  "free": false,
  "icon_url": "/static/services/airship.com.png",
  "id": "segment-actions-airship",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Create in the Airship Go dashboard in Settings->Partner Integrations->Segment",
      "key": "access_token",
      "label": "Access Token",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "The App Key identifies the Airship Project to which API requests are made.",
      "key": "app_key",
      "label": "App Key",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "choices": [
        {
          "label": "US",
          "value": "US",
        },
        {
          "label": "EU",
          "value": "EU",
        },
      ],
      "default": "US",
      "description": "US or EU",
      "key": "endpoint",
      "label": "Data Center",
      "required": true,
      "secret": false,
      "type": "choice",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "The identifier assigned in Airship as the Named User",
          "key": "named_user_id",
          "label": "Airship Named User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "Event Name",
          "key": "name",
          "label": "Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "When the event occurred.",
          "key": "occurred",
          "label": "Occurred",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Properties of the event",
          "key": "properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "customEvents",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Custom Events",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "The identifier assigned in Airship as the Named User",
          "key": "named_user_id",
          "label": "Airship Named User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "When the Trait was set",
          "key": "occurred",
          "label": "Occurred",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "account_creation": "{person.properties.account_creation}",
            "advertising_id": "",
            "age": "{person.properties.age}",
            "altitude": "{person.properties.altitude}",
            "birthdate": "{person.properties.birthday}",
            "city": "{person.properties.address.city}",
            "company": "{person.properties.company_name}",
            "country": "{person.properties.address.country}",
            "email": "{person.properties.email}",
            "first_name": "{person.properties.first_name}",
            "full_name": "{person.properties.full_name}",
            "gender": "{person.properties.gender}",
            "home_phone": "{person.properties.home_phone}",
            "last_name": "{person.properties.last_name}",
            "latitude": "{person.properties.latitude}",
            "longitude": "{person.properties.longitude}",
            "loyalty_tier": "{person.properties.loyalty_tier}",
            "mobile_phone": "{person.properties.phone}",
            "region": "{person.properties.address.region}",
            "title": "{person.properties.title}",
            "username": "{person.properties.username}",
            "work_phone": "{person.properties.work_phone}",
            "zipcode": "{person.properties.address.postalCode}",
          },
          "description": "User Attributes. Attributes should exist in Airship in order to be set, including the predifined ones defaulted here.",
          "key": "attributes",
          "label": "Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "setAttributes",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Set Attributes",
    },
  ],
  "name": "Airship",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-algolia-insights matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Algolia Insights",
  "free": false,
  "icon_url": "/static/services/algolia.com.png",
  "id": "segment-actions-algolia-insights",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Your Algolia Application ID.",
      "key": "appId",
      "label": "appId",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "An API key which has write permissions to the Algolia Insights API",
      "key": "apiKey",
      "label": "apiKey",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Product Clicked'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.properties.product_id}",
          "description": "Populates the ObjectIds field in the Algolia Insights API. Product ID of the clicked item.",
          "key": "objectID",
          "label": "Product ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.search_index}",
          "description": "Name of the targeted search index.",
          "key": "index",
          "label": "Index",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.query_id}",
          "description": "Query ID of the list on which the item was clicked.",
          "key": "queryID",
          "label": "Query ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.position}",
          "description": "Position of the click in the list of Algolia search results.",
          "key": "position",
          "label": "Position",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID associated with the user.",
          "key": "userToken",
          "label": "User Token",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Additional fields for this event. This field may be useful for Algolia Insights fields which are not mapped in Segment.",
          "key": "extraProperties",
          "label": "Extra Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "Product Clicked",
          "description": "The name of the event to be send to Algolia. Defaults to 'Product Clicked'",
          "key": "eventName",
          "label": "Event Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "view",
              "value": "view",
            },
            {
              "label": "conversion",
              "value": "conversion",
            },
            {
              "label": "click",
              "value": "click",
            },
          ],
          "default": "click",
          "description": "The type of event to send to Algolia. Defaults to 'click'",
          "key": "eventType",
          "label": "Event Type",
          "required": false,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "productClickedEvents",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Send product clicked events to Algolia",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Order Completed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "choices": [
            {
              "label": "Purchase",
              "value": "purchase",
            },
            {
              "label": "Add To Cart",
              "value": "addToCart",
            },
          ],
          "default": "purchase",
          "description": "Sub-type of the event, "purchase" or "addToCart".",
          "key": "eventSubtype",
          "label": "Event Subtype",
          "required": false,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "{event.properties.products}",
          "description": "Populates the ObjectIDs field in the Algolia Insights API. An array of objects representing the purchased items. Each object must contain a product_id field.",
          "key": "products",
          "label": "Product Details",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.search_index}",
          "description": "Name of the targeted search index.",
          "key": "index",
          "label": "Index",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.query_id}",
          "description": "Query ID of the list on which the item was purchased.",
          "key": "queryID",
          "label": "Query ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID associated with the user.",
          "key": "userToken",
          "label": "User Token",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.value}",
          "description": "The value of the cart that is being converted.",
          "key": "value",
          "label": "Value",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.currency}",
          "description": "Currency of the objects associated with the event in 3-letter ISO 4217 format. Required when \`value\` or \`price\` is set.",
          "key": "currency",
          "label": "Currency",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Additional fields for this event. This field may be useful for Algolia Insights fields which are not mapped in Segment.",
          "key": "extraProperties",
          "label": "Extra Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "Conversion Event",
          "description": "The name of the event to send to Algolia. Defaults to 'Conversion Event'",
          "key": "eventName",
          "label": "Event Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "View",
              "value": "view",
            },
            {
              "label": "Conversion",
              "value": "conversion",
            },
            {
              "label": "Click",
              "value": "click",
            },
          ],
          "default": "conversion",
          "description": "The type of event to send to Algolia. Defaults to 'conversion'",
          "key": "eventType",
          "label": "Event Type",
          "required": false,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "conversionEvents",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Send purchase events to Algolia",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Product Added'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "choices": [
            {
              "label": "Purchase",
              "value": "purchase",
            },
            {
              "label": "Add To Cart",
              "value": "addToCart",
            },
          ],
          "default": "addToCart",
          "description": "Sub-type of the event, "purchase" or "addToCart".",
          "key": "eventSubtype",
          "label": "Event Subtype",
          "required": false,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "{event.properties.products}",
          "description": "Populates the ObjectIDs field in the Algolia Insights API. An array of objects representing the purchased items. Each object must contain a product_id field.",
          "key": "products",
          "label": "Product Details",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.search_index}",
          "description": "Name of the targeted search index.",
          "key": "index",
          "label": "Index",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.query_id}",
          "description": "Query ID of the list on which the item was purchased.",
          "key": "queryID",
          "label": "Query ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID associated with the user.",
          "key": "userToken",
          "label": "User Token",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.value}",
          "description": "The value of the cart that is being converted.",
          "key": "value",
          "label": "Value",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.currency}",
          "description": "Currency of the objects associated with the event in 3-letter ISO 4217 format. Required when \`value\` or \`price\` is set.",
          "key": "currency",
          "label": "Currency",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Additional fields for this event. This field may be useful for Algolia Insights fields which are not mapped in Segment.",
          "key": "extraProperties",
          "label": "Extra Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "Conversion Event",
          "description": "The name of the event to send to Algolia. Defaults to 'Conversion Event'",
          "key": "eventName",
          "label": "Event Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "View",
              "value": "view",
            },
            {
              "label": "Conversion",
              "value": "conversion",
            },
            {
              "label": "Click",
              "value": "click",
            },
          ],
          "default": "conversion",
          "description": "The type of event to send to Algolia. Defaults to 'conversion'",
          "key": "eventType",
          "label": "Event Type",
          "required": false,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "conversionEvents",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Send add-to-cart events to Algolia",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Product Viewed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.properties.product_id}",
          "description": "Product ID of the clicked item.",
          "key": "objectID",
          "label": "Product ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.search_index}",
          "description": "Name of the targeted search index.",
          "key": "index",
          "label": "Index",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.query_id}",
          "description": "Query ID of the list on which the item was viewed.",
          "key": "queryID",
          "label": "Query ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID associated with the user.",
          "key": "userToken",
          "label": "User Token",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Additional fields for this event. This field may be useful for Algolia Insights fields which are not mapped in Segment.",
          "key": "extraProperties",
          "label": "Extra Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "Product Viewed",
          "description": "The name of the event to be send to Algolia. Defaults to 'Product Viewed'",
          "key": "eventName",
          "label": "Event Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "view",
              "value": "view",
            },
            {
              "label": "conversion",
              "value": "conversion",
            },
            {
              "label": "click",
              "value": "click",
            },
          ],
          "default": "view",
          "description": "The type of event to send to Algolia. Defaults to 'view'",
          "key": "eventType",
          "label": "Event Type",
          "required": false,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "productViewedEvents",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Send product viewed events to Algolia",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Product List Filtered'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.properties.filters}",
          "description": "Populates the filters field in the Algolia Insights API, a list of up to 10 facet filters. Field should be an array of strings with format \${attribute}:\${value}.",
          "key": "filters",
          "label": "Filters",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.search_index}",
          "description": "Name of the targeted search index.",
          "key": "index",
          "label": "Index",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.query_id}",
          "description": "Query ID of the list on which the item was clicked.",
          "key": "queryID",
          "label": "Query ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID associated with the user.",
          "key": "userToken",
          "label": "User Token",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Additional fields for this event. This field may be useful for Algolia Insights fields which are not mapped in Segment.",
          "key": "extraProperties",
          "label": "Extra Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "Product List Filtered",
          "description": "The name of the event to be send to Algolia. Defaults to 'Product List Filtered'",
          "key": "eventName",
          "label": "Event Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "view",
              "value": "view",
            },
            {
              "label": "conversion",
              "value": "conversion",
            },
            {
              "label": "click",
              "value": "click",
            },
          ],
          "default": "click",
          "description": "The type of event to send to Algolia. Defaults to 'click'",
          "key": "eventType",
          "label": "Event Type",
          "required": false,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "productListFilteredEvents",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Send product list filtered events to Algolia",
    },
  ],
  "name": "Algolia Insights",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-amplitude matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Amplitude",
  "free": false,
  "icon_url": "/static/services/amplitude.com.png",
  "id": "segment-actions-amplitude",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Amplitude project API key. You can find this key in the "General" tab of your Amplitude project.",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "Amplitude project secret key. You can find this key in the "General" tab of your Amplitude project.",
      "key": "secretKey",
      "label": "Secret Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "choices": [
        {
          "label": "North America",
          "value": "north_america",
        },
        {
          "label": "Europe",
          "value": "europe",
        },
      ],
      "default": "north_america",
      "description": "The region to send your data.",
      "key": "endpoint",
      "label": "Endpoint Region",
      "required": false,
      "secret": false,
      "type": "choice",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event != 'Order Completed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "A readable ID specified by you. Must have a minimum length of 5 characters. Required unless device ID is present. **Note:** If you send a request with a user ID that is not in the Amplitude system yet, then the user tied to that ID will not be marked new until their first event.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_id ?? event.distinct_id}",
          "description": "A device-specific identifier, such as the Identifier for Vendor on iOS. Required unless user ID is present. If a device ID is not sent with the event, it will be set to a hashed version of the user ID.",
          "key": "device_id",
          "label": "Device ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "A unique identifier for your event.",
          "key": "event_type",
          "label": "Event Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The start time of the session, necessary if you want to associate events with a particular system. To use automatic Amplitude session tracking in browsers, enable Analytics 2.0 on your connected source.",
          "key": "session_id",
          "label": "Session ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event. If time is not sent with the event, it will be set to the request upload time.",
          "key": "time",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "An object of key-value pairs that represent additional data to be sent along with the event. You can store property values in an array, but note that Amplitude only supports one-dimensional arrays. Date values are transformed into string values. Object depth may not exceed 40 layers.",
          "key": "event_properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "An object of key-value pairs that represent additional data tied to the user. You can store property values in an array, but note that Amplitude only supports one-dimensional arrays. Date values are transformed into string values. Object depth may not exceed 40 layers.",
          "key": "user_properties",
          "label": "User Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Groups of users for the event as an event-level group. You can only track up to 5 groups. **Note:** This Amplitude feature is only available to Enterprise customers who have purchased the Accounts add-on.",
          "key": "groups",
          "label": "Groups",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "The current version of your application.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "Platform of the device. If using analytics.js to send events from a Browser and no if no Platform value is provided, the value "Web" will be sent.",
          "key": "platform",
          "label": "Platform",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os}",
          "description": "The name of the mobile operating system or browser that the user is using.",
          "key": "os_name",
          "label": "OS Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "The version of the mobile operating system or browser the user is using.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The device brand that the user is using.",
          "key": "device_brand",
          "label": "Device Brand",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_manufacturer}",
          "description": "The device manufacturer that the user is using.",
          "key": "device_manufacturer",
          "label": "Device Manufacturer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "The device model that the user is using.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The carrier that the user is using.",
          "key": "carrier",
          "label": "Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_country_name}",
          "description": "The current country of the user.",
          "key": "country",
          "label": "Country",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The current region of the user.",
          "key": "region",
          "label": "Region",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_city_name}",
          "description": "The current city of the user.",
          "key": "city",
          "label": "City",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "The current Designated Market Area of the user.",
          "key": "dma",
          "label": "Designated Market Area",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language set by the user.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.price}",
          "description": "The price of the item purchased. Required for revenue data if the revenue field is not sent. You can use negative values to indicate refunds.",
          "key": "price",
          "label": "Price",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.quantity}",
          "description": "The quantity of the item purchased. Defaults to 1 if not specified.",
          "key": "quantity",
          "label": "Quantity",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.revenue}",
          "description": "Revenue = price * quantity. If you send all 3 fields of price, quantity, and revenue, then (price * quantity) will be used as the revenue value. You can use negative values to indicate refunds. **Note:** You will need to explicitly set this if you are using the Amplitude in cloud-mode.",
          "key": "revenue",
          "label": "Revenue",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.productId}",
          "description": "An identifier for the item purchased. You must send a price and quantity or revenue with this field.",
          "key": "productId",
          "label": "Product ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.revenueType}",
          "description": "The type of revenue for the item purchased. You must send a price and quantity or revenue with this field.",
          "key": "revenueType",
          "label": "Revenue Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_latitude}",
          "description": "The current Latitude of the user.",
          "key": "location_lat",
          "label": "Latitude",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_longitude}",
          "description": "The current Longitude of the user.",
          "key": "location_lng",
          "label": "Longtitude",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user. Use "$remote" to use the IP address on the upload request. Amplitude will use the IP address to reverse lookup a user's location (city, country, region, and DMA). Amplitude has the ability to drop the location and IP address from events once it reaches our servers. You can submit a request to Amplitude's platform specialist team here to configure this for you.",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_idfa}",
          "description": "Identifier for Advertiser. _(iOS)_",
          "key": "idfa",
          "label": "Identifier For Advertiser (IDFA)",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_id}",
          "description": "Identifier for Vendor. _(iOS)_",
          "key": "idfv",
          "label": "Identifier For Vendor (IDFV)",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_idfa}",
          "description": "Google Play Services advertising ID. _(Android)_",
          "key": "adid",
          "label": "Google Play Services Advertising ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "Android ID (not the advertising ID). _(Android)_",
          "key": "android_id",
          "label": "Android ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "An incrementing counter to distinguish events with the same user ID and timestamp from each other. Amplitude recommends you send an event ID, increasing over time, especially if you expect events to occur simultanenously.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "Amplitude will deduplicate subsequent events sent with this ID we have already seen before within the past 7 days. Amplitude recommends generating a UUID or using some combination of device ID, user ID, event type, event ID, and time.",
          "key": "insert_id",
          "label": "Insert ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$lib}",
          "description": "The name of the library that generated the event.",
          "key": "library",
          "label": "Library",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.products}",
          "description": "The list of products purchased.",
          "key": "products",
          "label": "Products",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "initial_referrer": "{event.properties.$referrer}",
            "initial_utm_campaign": "{event.properties.utm_campaign}",
            "initial_utm_content": "{event.properties.utm_content}",
            "initial_utm_medium": "{event.properties.utm_medium}",
            "initial_utm_source": "{event.properties.utm_source}",
            "initial_utm_term": "{event.properties.utm_term}",
          },
          "description": "The following fields will only be set as user properties if they do not already have a value.",
          "key": "setOnce",
          "label": "Set Once",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "referrer": "{event.properties.$referrer}",
            "utm_campaign": "{event.properties.utm_campaign}",
            "utm_content": "{event.properties.utm_content}",
            "utm_medium": "{event.properties.utm_medium}",
            "utm_source": "{event.properties.utm_source}",
            "utm_term": "{event.properties.utm_term}",
          },
          "description": "The following fields will be set as user properties for every event.",
          "key": "setAlways",
          "label": "Set Always",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Increment a user property by a number with add. If the user property doesn't have a value set yet, it's initialized to 0.",
          "key": "add",
          "label": "Add",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": true,
          "description": "Enabling this setting will set the Device manufacturer, Device Model and OS Name properties based on the user agent string provided in the userAgent field.",
          "key": "userAgentParsing",
          "label": "User Agent Parsing",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": false,
          "description": "Enabling this setting will send user_agent based on the raw user agent string provided in the userAgent field",
          "key": "includeRawUserAgent",
          "label": "Include Raw User Agent",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": undefined,
          "description": "Amplitude has a default minimum id length of 5 characters for user_id and device_id fields. This field allows the minimum to be overridden to allow shorter id lengths.",
          "key": "min_id_length",
          "label": "Minimum ID Length",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "model": "",
            "platformVersion": "",
          },
          "description": "The user agent data of device sending the event",
          "key": "userAgentData",
          "label": "User Agent Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "logEventV2",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Order Completed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": false,
          "description": "When enabled, track revenue with each product within the event. When disabled, track total revenue once for the event.",
          "key": "trackRevenuePerProduct",
          "label": "Track Revenue Per Product",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "{person.id}",
          "description": "A readable ID specified by you. Must have a minimum length of 5 characters. Required unless device ID is present. **Note:** If you send a request with a user ID that is not in the Amplitude system yet, then the user tied to that ID will not be marked new until their first event.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_id ?? event.distinct_id}",
          "description": "A device-specific identifier, such as the Identifier for Vendor on iOS. Required unless user ID is present. If a device ID is not sent with the event, it will be set to a hashed version of the user ID.",
          "key": "device_id",
          "label": "Device ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "A unique identifier for your event.",
          "key": "event_type",
          "label": "Event Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The start time of the session, necessary if you want to associate events with a particular system. To use automatic Amplitude session tracking in browsers, enable Analytics 2.0 on your connected source.",
          "key": "session_id",
          "label": "Session ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event. If time is not sent with the event, it will be set to the request upload time.",
          "key": "time",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "An object of key-value pairs that represent additional data to be sent along with the event. You can store property values in an array, but note that Amplitude only supports one-dimensional arrays. Date values are transformed into string values. Object depth may not exceed 40 layers.",
          "key": "event_properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "An object of key-value pairs that represent additional data tied to the user. You can store property values in an array, but note that Amplitude only supports one-dimensional arrays. Date values are transformed into string values. Object depth may not exceed 40 layers.",
          "key": "user_properties",
          "label": "User Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Groups of users for the event as an event-level group. You can only track up to 5 groups. **Note:** This Amplitude feature is only available to Enterprise customers who have purchased the Accounts add-on.",
          "key": "groups",
          "label": "Groups",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "The current version of your application.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "Platform of the device. If using analytics.js to send events from a Browser and no if no Platform value is provided, the value "Web" will be sent.",
          "key": "platform",
          "label": "Platform",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os}",
          "description": "The name of the mobile operating system or browser that the user is using.",
          "key": "os_name",
          "label": "OS Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "The version of the mobile operating system or browser the user is using.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The device brand that the user is using.",
          "key": "device_brand",
          "label": "Device Brand",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_manufacturer}",
          "description": "The device manufacturer that the user is using.",
          "key": "device_manufacturer",
          "label": "Device Manufacturer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "The device model that the user is using.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The carrier that the user is using.",
          "key": "carrier",
          "label": "Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_country_name}",
          "description": "The current country of the user.",
          "key": "country",
          "label": "Country",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The current region of the user.",
          "key": "region",
          "label": "Region",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_city_name}",
          "description": "The current city of the user.",
          "key": "city",
          "label": "City",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "The current Designated Market Area of the user.",
          "key": "dma",
          "label": "Designated Market Area",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language set by the user.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.price}",
          "description": "The price of the item purchased. Required for revenue data if the revenue field is not sent. You can use negative values to indicate refunds.",
          "key": "price",
          "label": "Price",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.quantity}",
          "description": "The quantity of the item purchased. Defaults to 1 if not specified.",
          "key": "quantity",
          "label": "Quantity",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.revenue}",
          "description": "Revenue = price * quantity. If you send all 3 fields of price, quantity, and revenue, then (price * quantity) will be used as the revenue value. You can use negative values to indicate refunds. **Note:** You will need to explicitly set this if you are using the Amplitude in cloud-mode.",
          "key": "revenue",
          "label": "Revenue",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.productId}",
          "description": "An identifier for the item purchased. You must send a price and quantity or revenue with this field.",
          "key": "productId",
          "label": "Product ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.revenueType}",
          "description": "The type of revenue for the item purchased. You must send a price and quantity or revenue with this field.",
          "key": "revenueType",
          "label": "Revenue Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_latitude}",
          "description": "The current Latitude of the user.",
          "key": "location_lat",
          "label": "Latitude",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_longitude}",
          "description": "The current Longitude of the user.",
          "key": "location_lng",
          "label": "Longtitude",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user. Use "$remote" to use the IP address on the upload request. Amplitude will use the IP address to reverse lookup a user's location (city, country, region, and DMA). Amplitude has the ability to drop the location and IP address from events once it reaches our servers. You can submit a request to Amplitude's platform specialist team here to configure this for you.",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_idfa}",
          "description": "Identifier for Advertiser. _(iOS)_",
          "key": "idfa",
          "label": "Identifier For Advertiser (IDFA)",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_id}",
          "description": "Identifier for Vendor. _(iOS)_",
          "key": "idfv",
          "label": "Identifier For Vendor (IDFV)",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_idfa}",
          "description": "Google Play Services advertising ID. _(Android)_",
          "key": "adid",
          "label": "Google Play Services Advertising ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "Android ID (not the advertising ID). _(Android)_",
          "key": "android_id",
          "label": "Android ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "An incrementing counter to distinguish events with the same user ID and timestamp from each other. Amplitude recommends you send an event ID, increasing over time, especially if you expect events to occur simultanenously.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "Amplitude will deduplicate subsequent events sent with this ID we have already seen before within the past 7 days. Amplitude recommends generating a UUID or using some combination of device ID, user ID, event type, event ID, and time.",
          "key": "insert_id",
          "label": "Insert ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$lib}",
          "description": "The name of the library that generated the event.",
          "key": "library",
          "label": "Library",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.products}",
          "description": "The list of products purchased.",
          "key": "products",
          "label": "Products",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": true,
          "description": "Enabling this setting will set the Device manufacturer, Device Model and OS Name properties based on the user agent string provided in the userAgent field",
          "key": "userAgentParsing",
          "label": "User Agent Parsing",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": false,
          "description": "Enabling this setting will send user_agent based on the raw user agent string provided in the userAgent field",
          "key": "includeRawUserAgent",
          "label": "Include Raw User Agent",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": {
            "utm_campaign": "{event.properties.utm_campaign}",
            "utm_content": "{event.properties.utm_content}",
            "utm_medium": "{event.properties.utm_medium}",
            "utm_source": "{event.properties.utm_source}",
            "utm_term": "{event.properties.utm_term}",
          },
          "description": "UTM Tracking Properties",
          "key": "utm_properties",
          "label": "UTM Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "The referrer of the web request. Sent to Amplitude as both last touch “referrer” and first touch “initial_referrer”",
          "key": "referrer",
          "label": "Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "Amplitude has a default minimum id lenght of 5 characters for user_id and device_id fields. This field allows the minimum to be overridden to allow shorter id lengths.",
          "key": "min_id_length",
          "label": "Minimum ID Length",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "model": "",
            "platformVersion": "",
          },
          "description": "The user agent data of device sending the event",
          "key": "userAgentData",
          "label": "User Agent Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "logPurchase",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Order Completed Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "A readable ID specified by you. Must have a minimum length of 5 characters. Required unless device ID is present. **Note:** If you send a request with a user ID that is not in the Amplitude system yet, then the user tied to that ID will not be marked new until their first event.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_id ?? event.distinct_id}",
          "description": "A device-specific identifier, such as the Identifier for Vendor on iOS. Required unless user ID is present. If a device ID is not sent with the event, it will be set to a hashed version of the user ID.",
          "key": "device_id",
          "label": "Device ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "A unique identifier for your event.",
          "key": "event_type",
          "label": "Event Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The start time of the session, necessary if you want to associate events with a particular system. To use automatic Amplitude session tracking in browsers, enable Analytics 2.0 on your connected source.",
          "key": "session_id",
          "label": "Session ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event. If time is not sent with the event, it will be set to the request upload time.",
          "key": "time",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "An object of key-value pairs that represent additional data to be sent along with the event. You can store property values in an array, but note that Amplitude only supports one-dimensional arrays. Date values are transformed into string values. Object depth may not exceed 40 layers.",
          "key": "event_properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "An object of key-value pairs that represent additional data tied to the user. You can store property values in an array, but note that Amplitude only supports one-dimensional arrays. Date values are transformed into string values. Object depth may not exceed 40 layers.",
          "key": "user_properties",
          "label": "User Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Groups of users for the event as an event-level group. You can only track up to 5 groups. **Note:** This Amplitude feature is only available to Enterprise customers who have purchased the Accounts add-on.",
          "key": "groups",
          "label": "Groups",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "The current version of your application.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "Platform of the device. If using analytics.js to send events from a Browser and no if no Platform value is provided, the value "Web" will be sent.",
          "key": "platform",
          "label": "Platform",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os}",
          "description": "The name of the mobile operating system or browser that the user is using.",
          "key": "os_name",
          "label": "OS Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "The version of the mobile operating system or browser the user is using.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The device brand that the user is using.",
          "key": "device_brand",
          "label": "Device Brand",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_manufacturer}",
          "description": "The device manufacturer that the user is using.",
          "key": "device_manufacturer",
          "label": "Device Manufacturer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "The device model that the user is using.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The carrier that the user is using.",
          "key": "carrier",
          "label": "Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_country_name}",
          "description": "The current country of the user.",
          "key": "country",
          "label": "Country",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The current region of the user.",
          "key": "region",
          "label": "Region",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_city_name}",
          "description": "The current city of the user.",
          "key": "city",
          "label": "City",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "The current Designated Market Area of the user.",
          "key": "dma",
          "label": "Designated Market Area",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language set by the user.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.price}",
          "description": "The price of the item purchased. Required for revenue data if the revenue field is not sent. You can use negative values to indicate refunds.",
          "key": "price",
          "label": "Price",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.quantity}",
          "description": "The quantity of the item purchased. Defaults to 1 if not specified.",
          "key": "quantity",
          "label": "Quantity",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.revenue}",
          "description": "Revenue = price * quantity. If you send all 3 fields of price, quantity, and revenue, then (price * quantity) will be used as the revenue value. You can use negative values to indicate refunds. **Note:** You will need to explicitly set this if you are using the Amplitude in cloud-mode.",
          "key": "revenue",
          "label": "Revenue",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.productId}",
          "description": "An identifier for the item purchased. You must send a price and quantity or revenue with this field.",
          "key": "productId",
          "label": "Product ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.revenueType}",
          "description": "The type of revenue for the item purchased. You must send a price and quantity or revenue with this field.",
          "key": "revenueType",
          "label": "Revenue Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_latitude}",
          "description": "The current Latitude of the user.",
          "key": "location_lat",
          "label": "Latitude",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_longitude}",
          "description": "The current Longitude of the user.",
          "key": "location_lng",
          "label": "Longtitude",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user. Use "$remote" to use the IP address on the upload request. Amplitude will use the IP address to reverse lookup a user's location (city, country, region, and DMA). Amplitude has the ability to drop the location and IP address from events once it reaches our servers. You can submit a request to Amplitude's platform specialist team here to configure this for you.",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_idfa}",
          "description": "Identifier for Advertiser. _(iOS)_",
          "key": "idfa",
          "label": "Identifier For Advertiser (IDFA)",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_id}",
          "description": "Identifier for Vendor. _(iOS)_",
          "key": "idfv",
          "label": "Identifier For Vendor (IDFV)",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_idfa}",
          "description": "Google Play Services advertising ID. _(Android)_",
          "key": "adid",
          "label": "Google Play Services Advertising ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "Android ID (not the advertising ID). _(Android)_",
          "key": "android_id",
          "label": "Android ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "An incrementing counter to distinguish events with the same user ID and timestamp from each other. Amplitude recommends you send an event ID, increasing over time, especially if you expect events to occur simultanenously.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "Amplitude will deduplicate subsequent events sent with this ID we have already seen before within the past 7 days. Amplitude recommends generating a UUID or using some combination of device ID, user ID, event type, event ID, and time.",
          "key": "insert_id",
          "label": "Insert ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$lib}",
          "description": "The name of the library that generated the event.",
          "key": "library",
          "label": "Library",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.products}",
          "description": "The list of products purchased.",
          "key": "products",
          "label": "Products",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "initial_referrer": "{event.properties.$referrer}",
            "initial_utm_campaign": "{event.properties.utm_campaign}",
            "initial_utm_content": "{event.properties.utm_content}",
            "initial_utm_medium": "{event.properties.utm_medium}",
            "initial_utm_source": "{event.properties.utm_source}",
            "initial_utm_term": "{event.properties.utm_term}",
          },
          "description": "The following fields will only be set as user properties if they do not already have a value.",
          "key": "setOnce",
          "label": "Set Once",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "referrer": "{event.properties.$referrer}",
            "utm_campaign": "{event.properties.utm_campaign}",
            "utm_content": "{event.properties.utm_content}",
            "utm_medium": "{event.properties.utm_medium}",
            "utm_source": "{event.properties.utm_source}",
            "utm_term": "{event.properties.utm_term}",
          },
          "description": "The following fields will be set as user properties for every event.",
          "key": "setAlways",
          "label": "Set Always",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Increment a user property by a number with add. If the user property doesn't have a value set yet, it's initialized to 0.",
          "key": "add",
          "label": "Add",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": true,
          "description": "Enabling this setting will set the Device manufacturer, Device Model and OS Name properties based on the user agent string provided in the userAgent field.",
          "key": "userAgentParsing",
          "label": "User Agent Parsing",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": false,
          "description": "Enabling this setting will send user_agent based on the raw user agent string provided in the userAgent field",
          "key": "includeRawUserAgent",
          "label": "Include Raw User Agent",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": undefined,
          "description": "Amplitude has a default minimum id length of 5 characters for user_id and device_id fields. This field allows the minimum to be overridden to allow shorter id lengths.",
          "key": "min_id_length",
          "label": "Minimum ID Length",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "model": "",
            "platformVersion": "",
          },
          "description": "The user agent data of device sending the event",
          "key": "userAgentData",
          "label": "User Agent Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "logEventV2",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Page Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$screen'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "A readable ID specified by you. Must have a minimum length of 5 characters. Required unless device ID is present. **Note:** If you send a request with a user ID that is not in the Amplitude system yet, then the user tied to that ID will not be marked new until their first event.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_id ?? event.distinct_id}",
          "description": "A device-specific identifier, such as the Identifier for Vendor on iOS. Required unless user ID is present. If a device ID is not sent with the event, it will be set to a hashed version of the user ID.",
          "key": "device_id",
          "label": "Device ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "A unique identifier for your event.",
          "key": "event_type",
          "label": "Event Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The start time of the session, necessary if you want to associate events with a particular system. To use automatic Amplitude session tracking in browsers, enable Analytics 2.0 on your connected source.",
          "key": "session_id",
          "label": "Session ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event. If time is not sent with the event, it will be set to the request upload time.",
          "key": "time",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "An object of key-value pairs that represent additional data to be sent along with the event. You can store property values in an array, but note that Amplitude only supports one-dimensional arrays. Date values are transformed into string values. Object depth may not exceed 40 layers.",
          "key": "event_properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "An object of key-value pairs that represent additional data tied to the user. You can store property values in an array, but note that Amplitude only supports one-dimensional arrays. Date values are transformed into string values. Object depth may not exceed 40 layers.",
          "key": "user_properties",
          "label": "User Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Groups of users for the event as an event-level group. You can only track up to 5 groups. **Note:** This Amplitude feature is only available to Enterprise customers who have purchased the Accounts add-on.",
          "key": "groups",
          "label": "Groups",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "The current version of your application.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "Platform of the device. If using analytics.js to send events from a Browser and no if no Platform value is provided, the value "Web" will be sent.",
          "key": "platform",
          "label": "Platform",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os}",
          "description": "The name of the mobile operating system or browser that the user is using.",
          "key": "os_name",
          "label": "OS Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "The version of the mobile operating system or browser the user is using.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The device brand that the user is using.",
          "key": "device_brand",
          "label": "Device Brand",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_manufacturer}",
          "description": "The device manufacturer that the user is using.",
          "key": "device_manufacturer",
          "label": "Device Manufacturer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "The device model that the user is using.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The carrier that the user is using.",
          "key": "carrier",
          "label": "Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_country_name}",
          "description": "The current country of the user.",
          "key": "country",
          "label": "Country",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The current region of the user.",
          "key": "region",
          "label": "Region",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_city_name}",
          "description": "The current city of the user.",
          "key": "city",
          "label": "City",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "The current Designated Market Area of the user.",
          "key": "dma",
          "label": "Designated Market Area",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language set by the user.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.price}",
          "description": "The price of the item purchased. Required for revenue data if the revenue field is not sent. You can use negative values to indicate refunds.",
          "key": "price",
          "label": "Price",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.quantity}",
          "description": "The quantity of the item purchased. Defaults to 1 if not specified.",
          "key": "quantity",
          "label": "Quantity",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.revenue}",
          "description": "Revenue = price * quantity. If you send all 3 fields of price, quantity, and revenue, then (price * quantity) will be used as the revenue value. You can use negative values to indicate refunds. **Note:** You will need to explicitly set this if you are using the Amplitude in cloud-mode.",
          "key": "revenue",
          "label": "Revenue",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.productId}",
          "description": "An identifier for the item purchased. You must send a price and quantity or revenue with this field.",
          "key": "productId",
          "label": "Product ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.revenueType}",
          "description": "The type of revenue for the item purchased. You must send a price and quantity or revenue with this field.",
          "key": "revenueType",
          "label": "Revenue Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_latitude}",
          "description": "The current Latitude of the user.",
          "key": "location_lat",
          "label": "Latitude",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_longitude}",
          "description": "The current Longitude of the user.",
          "key": "location_lng",
          "label": "Longtitude",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user. Use "$remote" to use the IP address on the upload request. Amplitude will use the IP address to reverse lookup a user's location (city, country, region, and DMA). Amplitude has the ability to drop the location and IP address from events once it reaches our servers. You can submit a request to Amplitude's platform specialist team here to configure this for you.",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_idfa}",
          "description": "Identifier for Advertiser. _(iOS)_",
          "key": "idfa",
          "label": "Identifier For Advertiser (IDFA)",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_id}",
          "description": "Identifier for Vendor. _(iOS)_",
          "key": "idfv",
          "label": "Identifier For Vendor (IDFV)",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_idfa}",
          "description": "Google Play Services advertising ID. _(Android)_",
          "key": "adid",
          "label": "Google Play Services Advertising ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "Android ID (not the advertising ID). _(Android)_",
          "key": "android_id",
          "label": "Android ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "An incrementing counter to distinguish events with the same user ID and timestamp from each other. Amplitude recommends you send an event ID, increasing over time, especially if you expect events to occur simultanenously.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "Amplitude will deduplicate subsequent events sent with this ID we have already seen before within the past 7 days. Amplitude recommends generating a UUID or using some combination of device ID, user ID, event type, event ID, and time.",
          "key": "insert_id",
          "label": "Insert ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$lib}",
          "description": "The name of the library that generated the event.",
          "key": "library",
          "label": "Library",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.products}",
          "description": "The list of products purchased.",
          "key": "products",
          "label": "Products",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "initial_referrer": "{event.properties.$referrer}",
            "initial_utm_campaign": "{event.properties.utm_campaign}",
            "initial_utm_content": "{event.properties.utm_content}",
            "initial_utm_medium": "{event.properties.utm_medium}",
            "initial_utm_source": "{event.properties.utm_source}",
            "initial_utm_term": "{event.properties.utm_term}",
          },
          "description": "The following fields will only be set as user properties if they do not already have a value.",
          "key": "setOnce",
          "label": "Set Once",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "referrer": "{event.properties.$referrer}",
            "utm_campaign": "{event.properties.utm_campaign}",
            "utm_content": "{event.properties.utm_content}",
            "utm_medium": "{event.properties.utm_medium}",
            "utm_source": "{event.properties.utm_source}",
            "utm_term": "{event.properties.utm_term}",
          },
          "description": "The following fields will be set as user properties for every event.",
          "key": "setAlways",
          "label": "Set Always",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Increment a user property by a number with add. If the user property doesn't have a value set yet, it's initialized to 0.",
          "key": "add",
          "label": "Add",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": true,
          "description": "Enabling this setting will set the Device manufacturer, Device Model and OS Name properties based on the user agent string provided in the userAgent field.",
          "key": "userAgentParsing",
          "label": "User Agent Parsing",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": false,
          "description": "Enabling this setting will send user_agent based on the raw user agent string provided in the userAgent field",
          "key": "includeRawUserAgent",
          "label": "Include Raw User Agent",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": undefined,
          "description": "Amplitude has a default minimum id length of 5 characters for user_id and device_id fields. This field allows the minimum to be overridden to allow shorter id lengths.",
          "key": "min_id_length",
          "label": "Minimum ID Length",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "model": "",
            "platformVersion": "",
          },
          "description": "The user agent data of device sending the event",
          "key": "userAgentData",
          "label": "User Agent Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "logEventV2",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Screen Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "A UUID (unique user ID) specified by you. **Note:** If you send a request with a user ID that is not in the Amplitude system yet, then the user tied to that ID will not be marked new until their first event. Required unless device ID is present.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_id ?? event.distinct_id}",
          "description": "A device specific identifier, such as the Identifier for Vendor (IDFV) on iOS. Required unless user ID is present.",
          "key": "device_id",
          "label": "Device ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Additional data tied to the user in Amplitude. Each distinct value will show up as a user segment on the Amplitude dashboard. Object depth may not exceed 40 layers. **Note:** You can store property values in an array and date values are transformed into string values.",
          "key": "user_properties",
          "label": "User Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Groups of users for Amplitude's account-level reporting feature. Note: You can only track up to 5 groups. Any groups past that threshold will not be tracked. **Note:** This feature is only available to Amplitude Enterprise customers who have purchased the Amplitude Accounts add-on.",
          "key": "groups",
          "label": "Groups",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "Version of the app the user is on.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "The platform of the user's device.",
          "key": "platform",
          "label": "Platform",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os}",
          "description": "The mobile operating system or browser of the user's device.",
          "key": "os_name",
          "label": "OS Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "The version of the mobile operating system or browser of the user's device.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The brand of user's the device.",
          "key": "device_brand",
          "label": "Device Brand",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_manufacturer}",
          "description": "The manufacturer of the user's device.",
          "key": "device_manufacturer",
          "label": "Device Manufacturer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "The model of the user's device.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The user's mobile carrier.",
          "key": "carrier",
          "label": "Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_country_name}",
          "description": "The country in which the user is located.",
          "key": "country",
          "label": "Country",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The geographical region in which the user is located.",
          "key": "region",
          "label": "Region",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_city_name}",
          "description": "The city in which the user is located.",
          "key": "city",
          "label": "City",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "The Designated Market Area in which the user is located.",
          "key": "dma",
          "label": "Designated Market Area",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "Language the user has set on their device or browser.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "Whether the user is paying or not.",
          "key": "paying",
          "label": "Is Paying",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": undefined,
          "description": "The version of the app the user was first on.",
          "key": "start_version",
          "label": "Initial Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "Amplitude will deduplicate subsequent events sent with this ID we have already seen before within the past 7 days. Amplitude recommends generating a UUID or using some combination of device ID, user ID, event type, event ID, and time.",
          "key": "insert_id",
          "label": "Insert ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": true,
          "description": "Enabling this setting will set the Device manufacturer, Device Model and OS Name properties based on the user agent string provided in the userAgent field",
          "key": "userAgentParsing",
          "label": "User Agent Parsing",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": false,
          "description": "Enabling this setting will send user_agent based on the raw user agent string provided in the userAgent field",
          "key": "includeRawUserAgent",
          "label": "Include Raw User Agent",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": {
            "utm_campaign": "{event.properties.utm_campaign}",
            "utm_content": "{event.properties.utm_content}",
            "utm_medium": "{event.properties.utm_medium}",
            "utm_source": "{event.properties.utm_source}",
            "utm_term": "{event.properties.utm_term}",
          },
          "description": "UTM Tracking Properties",
          "key": "utm_properties",
          "label": "UTM Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "The referrer of the web request. Sent to Amplitude as both last touch “referrer” and first touch “initial_referrer”",
          "key": "referrer",
          "label": "Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "Amplitude has a default minimum id length of 5 characters for user_id and device_id fields. This field allows the minimum to be overridden to allow shorter id lengths.",
          "key": "min_id_length",
          "label": "Minimum ID Length",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$lib}",
          "description": "The name of the library that generated the event.",
          "key": "library",
          "label": "Library",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "model": "",
            "platformVersion": "",
          },
          "description": "The user agent data of device sending the event",
          "key": "userAgentData",
          "label": "User Agent Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "identifyUser",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify Calls",
    },
  ],
  "name": "Amplitude",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-angler-ai matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Angler AI",
  "free": false,
  "icon_url": "/static/services/getangler.ai.png",
  "id": "segment-actions-angler-ai",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Your Angler AI API Authentication Token",
      "key": "accessToken",
      "label": "Authentication Token",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "Your Angler AI Workspace ID",
      "key": "workspaceId",
      "label": "Workspace ID",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {
            "accepts_marketing": "{person.properties.accepts_marketing}",
            "accepts_marketing_updated_at": "{person.properties.accepts_marketing_updated_at}",
            "created_at": "{person.properties.created_at}",
            "currency": "{person.properties.currency}",
            "email": "{person.properties.email}",
            "first_name": "{person.properties.first_name}",
            "hashed_email": "{person.properties.hashed_email}",
            "hashed_first_name": "{person.properties.hashed_first_name}",
            "hashed_last_name": "{person.properties.hashed_last_name}",
            "hashed_phone": "{person.properties.hashed_phone}",
            "id": "{person.id ?? person.properties.id}",
            "last_name": "{person.properties.last_name}",
            "last_order_id": "{person.properties.last_order_id}",
            "last_order_name": "{person.properties.last_order_name}",
            "marketing_opt_in_level": "{person.properties.marketing_opt_in_level}",
            "note": "{person.properties.note}",
            "orders_count": "{person.properties.orders_count}",
            "phone": "{person.properties.phone}",
            "state": "{person.properties.state}",
            "tax_exempt": "{person.properties.tax_exempt}",
            "total_spent": "{person.properties.total_spent}",
            "updated_at": "{person.properties.updated_at}",
            "verified_email": "{person.properties.verified_email}",
          },
          "description": "The user object.",
          "key": "user",
          "label": "User",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.properties.addresses}",
          "description": "A list of the ten most recently updated addresses for the customer.",
          "key": "addresses",
          "label": "Addresses",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "address1": "{person.properties.default_address.address1}",
            "address2": "{person.properties.default_address.address2}",
            "city": "{person.properties.default_address.city}",
            "country": "{person.properties.default_address.country}",
            "country_code": "{person.properties.default_address.country_code}",
            "first_name": "{person.properties.default_address.first_name}",
            "last_name": "{person.properties.default_address.last_name}",
            "phone": "{person.properties.default_address.phone}",
            "province": "{person.properties.default_address.province}",
            "province_code": "{person.properties.default_address.province_code}",
            "zip": "{person.properties.default_address.zip}",
          },
          "description": "The mailing address associated with the payment method.",
          "key": "default_address",
          "label": "Default Address",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.properties.email_marketing_consent}",
          "description": "The marketing consent information when the customer consented to receiving marketing material by email.",
          "key": "email_marketing_consent",
          "label": "Email Marketing Consent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.metafield}",
          "description": "Attaches additional metadata to a shop's resources.",
          "key": "metafield",
          "label": "Metafield",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.sms_marketing_consent}",
          "description": "The marketing consent information when the customer consented to receiving marketing material by SMS.",
          "key": "sms_marketing_consent",
          "label": "SMS Marketing Consent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "saveUser",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Save User",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "A unique event identifier.",
          "key": "eventId",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "ipAddress",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp when the event was triggered.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "clientId": "{event.distinct_id}",
            "fbc": "{event.properties.fbc}",
            "fbp": "{event.properties.fbp}",
            "ga": "{event.properties.ga}",
            "userId": "{person.id}",
          },
          "description": "Identifiers for the user",
          "key": "identifiers",
          "label": "Identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "referrer": "{event.properties.$referrer}",
            "url": "{event.properties.$current_url}",
          },
          "description": "Page details to send with the event",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Custom attributes for the event. Data should be specified as key:value pairs",
          "key": "customAttributes",
          "label": "Custom Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "dob": "{person.properties.birthday ?? person.properties.birthday}",
            "email": "{person.properties.email ?? person.properties.email}",
            "firstName": "{person.properties.first_name ?? person.properties.first_name}",
            "lastName": "{person.properties.last_name ?? person.properties.last_name}",
            "phone": "{person.properties.phone ?? person.properties.phone}",
          },
          "description": "Customer details",
          "key": "customer",
          "label": "Customer",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "currencyCode": undefined,
            "id": undefined,
            "totalAmount": undefined,
          },
          "description": "Cart details",
          "key": "cart",
          "label": "Cart",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "Cart Line Item details",
          "key": "cartLines",
          "label": "Cart Line Items",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "page_viewed",
              "value": "page_viewed",
            },
            {
              "label": "cart_viewed",
              "value": "cart_viewed",
            },
          ],
          "default": undefined,
          "description": "The name of the event to track.",
          "key": "eventName",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "saveBaseEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Save Event - Page Viewed",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = 'Cart Viewed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "A unique event identifier.",
          "key": "eventId",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "ipAddress",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp when the event was triggered.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "clientId": "{event.distinct_id}",
            "fbc": "{event.properties.fbc}",
            "fbp": "{event.properties.fbp}",
            "ga": "{event.properties.ga}",
            "userId": "{person.id}",
          },
          "description": "Identifiers for the user",
          "key": "identifiers",
          "label": "Identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "referrer": "{event.properties.$referrer}",
            "url": "{event.properties.$current_url}",
          },
          "description": "Page details to send with the event",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Custom attributes for the event. Data should be specified as key:value pairs",
          "key": "customAttributes",
          "label": "Custom Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "dob": "{person.properties.birthday ?? person.properties.birthday}",
            "email": "{person.properties.email ?? person.properties.email}",
            "firstName": "{person.properties.first_name ?? person.properties.first_name}",
            "lastName": "{person.properties.last_name ?? person.properties.last_name}",
            "phone": "{person.properties.phone ?? person.properties.phone}",
          },
          "description": "Customer details",
          "key": "customer",
          "label": "Customer",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "currencyCode": undefined,
            "id": undefined,
            "totalAmount": undefined,
          },
          "description": "Cart details",
          "key": "cart",
          "label": "Cart",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "Cart Line Item details",
          "key": "cartLines",
          "label": "Cart Line Items",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "page_viewed",
              "value": "page_viewed",
            },
            {
              "label": "cart_viewed",
              "value": "cart_viewed",
            },
          ],
          "default": undefined,
          "description": "The name of the event to track.",
          "key": "eventName",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "saveBaseEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Save Event - Cart Viewed",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = 'Checkout Address Info Submitted'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "A unique event identifier.",
          "key": "eventId",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "ipAddress",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp when the event was triggered.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "clientId": "{event.distinct_id}",
            "fbc": "{event.properties.fbc}",
            "fbp": "{event.properties.fbp}",
            "ga": "{event.properties.ga}",
            "userId": "{person.id}",
          },
          "description": "Identifiers for the user",
          "key": "identifiers",
          "label": "Identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "referrer": "{event.properties.$referrer}",
            "url": "{event.properties.$current_url}",
          },
          "description": "Page details to send with the event",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Custom attributes for the event. Data should be specified as key:value pairs",
          "key": "customAttributes",
          "label": "Custom Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "dob": "{person.properties.birthday ?? person.properties.birthday}",
            "email": "{person.properties.email ?? person.properties.email}",
            "firstName": "{person.properties.first_name ?? person.properties.first_name}",
            "lastName": "{person.properties.last_name ?? person.properties.last_name}",
            "phone": "{person.properties.phone ?? person.properties.phone}",
          },
          "description": "Customer details",
          "key": "customer",
          "label": "Customer",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "currencyCode": undefined,
            "orderId": undefined,
            "shippingLinePriceAmount": undefined,
            "subtotalPriceAmount": undefined,
            "totalAmount": undefined,
            "totalTaxAmount": undefined,
          },
          "description": "Checkout details",
          "key": "checkout",
          "label": "Checkout",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "Checkout Line Item details",
          "key": "checkoutLineItems",
          "label": "Checkout Line Items",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "address1": "{event.properties.billing_address.address1}",
            "address2": "{event.properties.billing_address.address2}",
            "city": "{event.properties.billing_address.city}",
            "country": "{event.properties.billing_address.country}",
            "country_code": "{event.properties.billing_address.country_code}",
            "first_name": "{event.properties.billing_address.first_name}",
            "last_name": "{event.properties.billing_address.last_name}",
            "phone": "{event.properties.billing_address.phone}",
            "province": "{event.properties.billing_address.province}",
            "province_code": "{event.properties.billing_address.province_code}",
            "zip": "{event.properties.billing_address.zip}",
          },
          "description": "The billing address associated with the checkout.",
          "key": "checkoutBillingAddress",
          "label": "Checkout Billing Address",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "address1": "{event.properties.shipping_address.address1}",
            "address2": "{event.properties.shipping_address.address2}",
            "city": "{event.properties.shipping_address.city}",
            "country": "{event.properties.shipping_address.country}",
            "country_code": "{event.properties.shipping_address.country_code}",
            "first_name": "{event.properties.shipping_address.first_name}",
            "last_name": "{event.properties.shipping_address.last_name}",
            "phone": "{event.properties.shipping_address.phone}",
            "province": "{event.properties.shipping_address.province}",
            "province_code": "{event.properties.shipping_address.province_code}",
            "zip": "{event.properties.shipping_address.zip}",
          },
          "description": "The address to which the order will be shipped.",
          "key": "checkoutShippingAddress",
          "label": "Checkout Shipping Address",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "choices": [
            {
              "label": "checkout_address_info_submitted",
              "value": "checkout_address_info_submitted",
            },
            {
              "label": "checkout_completed",
              "value": "checkout_completed",
            },
            {
              "label": "checkout_contact_info_submitted",
              "value": "checkout_contact_info_submitted",
            },
            {
              "label": "checkout_shipping_info_submitted",
              "value": "checkout_shipping_info_submitted",
            },
            {
              "label": "checkout_started",
              "value": "checkout_started",
            },
            {
              "label": "payment_info_submitted",
              "value": "payment_info_submitted",
            },
          ],
          "default": "checkout_address_info_submitted",
          "description": "The name of the Checkout Event to track.",
          "key": "eventName",
          "label": "Checkout Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "saveCheckoutEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Save Event - Checkout Address Info Submitted",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = 'Order Completed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "A unique event identifier.",
          "key": "eventId",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "ipAddress",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp when the event was triggered.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "clientId": "{event.distinct_id}",
            "fbc": "{event.properties.fbc}",
            "fbp": "{event.properties.fbp}",
            "ga": "{event.properties.ga}",
            "userId": "{person.id}",
          },
          "description": "Identifiers for the user",
          "key": "identifiers",
          "label": "Identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "referrer": "{event.properties.$referrer}",
            "url": "{event.properties.$current_url}",
          },
          "description": "Page details to send with the event",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Custom attributes for the event. Data should be specified as key:value pairs",
          "key": "customAttributes",
          "label": "Custom Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "dob": "{person.properties.birthday ?? person.properties.birthday}",
            "email": "{person.properties.email ?? person.properties.email}",
            "firstName": "{person.properties.first_name ?? person.properties.first_name}",
            "lastName": "{person.properties.last_name ?? person.properties.last_name}",
            "phone": "{person.properties.phone ?? person.properties.phone}",
          },
          "description": "Customer details",
          "key": "customer",
          "label": "Customer",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "currencyCode": undefined,
            "orderId": undefined,
            "shippingLinePriceAmount": undefined,
            "subtotalPriceAmount": undefined,
            "totalAmount": undefined,
            "totalTaxAmount": undefined,
          },
          "description": "Checkout details",
          "key": "checkout",
          "label": "Checkout",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "Checkout Line Item details",
          "key": "checkoutLineItems",
          "label": "Checkout Line Items",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "address1": "{event.properties.billing_address.address1}",
            "address2": "{event.properties.billing_address.address2}",
            "city": "{event.properties.billing_address.city}",
            "country": "{event.properties.billing_address.country}",
            "country_code": "{event.properties.billing_address.country_code}",
            "first_name": "{event.properties.billing_address.first_name}",
            "last_name": "{event.properties.billing_address.last_name}",
            "phone": "{event.properties.billing_address.phone}",
            "province": "{event.properties.billing_address.province}",
            "province_code": "{event.properties.billing_address.province_code}",
            "zip": "{event.properties.billing_address.zip}",
          },
          "description": "The billing address associated with the checkout.",
          "key": "checkoutBillingAddress",
          "label": "Checkout Billing Address",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "address1": "{event.properties.shipping_address.address1}",
            "address2": "{event.properties.shipping_address.address2}",
            "city": "{event.properties.shipping_address.city}",
            "country": "{event.properties.shipping_address.country}",
            "country_code": "{event.properties.shipping_address.country_code}",
            "first_name": "{event.properties.shipping_address.first_name}",
            "last_name": "{event.properties.shipping_address.last_name}",
            "phone": "{event.properties.shipping_address.phone}",
            "province": "{event.properties.shipping_address.province}",
            "province_code": "{event.properties.shipping_address.province_code}",
            "zip": "{event.properties.shipping_address.zip}",
          },
          "description": "The address to which the order will be shipped.",
          "key": "checkoutShippingAddress",
          "label": "Checkout Shipping Address",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "choices": [
            {
              "label": "checkout_address_info_submitted",
              "value": "checkout_address_info_submitted",
            },
            {
              "label": "checkout_completed",
              "value": "checkout_completed",
            },
            {
              "label": "checkout_contact_info_submitted",
              "value": "checkout_contact_info_submitted",
            },
            {
              "label": "checkout_shipping_info_submitted",
              "value": "checkout_shipping_info_submitted",
            },
            {
              "label": "checkout_started",
              "value": "checkout_started",
            },
            {
              "label": "payment_info_submitted",
              "value": "payment_info_submitted",
            },
          ],
          "default": "checkout_completed",
          "description": "The name of the Checkout Event to track.",
          "key": "eventName",
          "label": "Checkout Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "saveCheckoutEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Save Event - Checkout Completed",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = 'Checkout Contact Info Submitted'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "A unique event identifier.",
          "key": "eventId",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "ipAddress",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp when the event was triggered.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "clientId": "{event.distinct_id}",
            "fbc": "{event.properties.fbc}",
            "fbp": "{event.properties.fbp}",
            "ga": "{event.properties.ga}",
            "userId": "{person.id}",
          },
          "description": "Identifiers for the user",
          "key": "identifiers",
          "label": "Identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "referrer": "{event.properties.$referrer}",
            "url": "{event.properties.$current_url}",
          },
          "description": "Page details to send with the event",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Custom attributes for the event. Data should be specified as key:value pairs",
          "key": "customAttributes",
          "label": "Custom Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "dob": "{person.properties.birthday ?? person.properties.birthday}",
            "email": "{person.properties.email ?? person.properties.email}",
            "firstName": "{person.properties.first_name ?? person.properties.first_name}",
            "lastName": "{person.properties.last_name ?? person.properties.last_name}",
            "phone": "{person.properties.phone ?? person.properties.phone}",
          },
          "description": "Customer details",
          "key": "customer",
          "label": "Customer",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "currencyCode": undefined,
            "orderId": undefined,
            "shippingLinePriceAmount": undefined,
            "subtotalPriceAmount": undefined,
            "totalAmount": undefined,
            "totalTaxAmount": undefined,
          },
          "description": "Checkout details",
          "key": "checkout",
          "label": "Checkout",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "Checkout Line Item details",
          "key": "checkoutLineItems",
          "label": "Checkout Line Items",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "address1": "{event.properties.billing_address.address1}",
            "address2": "{event.properties.billing_address.address2}",
            "city": "{event.properties.billing_address.city}",
            "country": "{event.properties.billing_address.country}",
            "country_code": "{event.properties.billing_address.country_code}",
            "first_name": "{event.properties.billing_address.first_name}",
            "last_name": "{event.properties.billing_address.last_name}",
            "phone": "{event.properties.billing_address.phone}",
            "province": "{event.properties.billing_address.province}",
            "province_code": "{event.properties.billing_address.province_code}",
            "zip": "{event.properties.billing_address.zip}",
          },
          "description": "The billing address associated with the checkout.",
          "key": "checkoutBillingAddress",
          "label": "Checkout Billing Address",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "address1": "{event.properties.shipping_address.address1}",
            "address2": "{event.properties.shipping_address.address2}",
            "city": "{event.properties.shipping_address.city}",
            "country": "{event.properties.shipping_address.country}",
            "country_code": "{event.properties.shipping_address.country_code}",
            "first_name": "{event.properties.shipping_address.first_name}",
            "last_name": "{event.properties.shipping_address.last_name}",
            "phone": "{event.properties.shipping_address.phone}",
            "province": "{event.properties.shipping_address.province}",
            "province_code": "{event.properties.shipping_address.province_code}",
            "zip": "{event.properties.shipping_address.zip}",
          },
          "description": "The address to which the order will be shipped.",
          "key": "checkoutShippingAddress",
          "label": "Checkout Shipping Address",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "choices": [
            {
              "label": "checkout_address_info_submitted",
              "value": "checkout_address_info_submitted",
            },
            {
              "label": "checkout_completed",
              "value": "checkout_completed",
            },
            {
              "label": "checkout_contact_info_submitted",
              "value": "checkout_contact_info_submitted",
            },
            {
              "label": "checkout_shipping_info_submitted",
              "value": "checkout_shipping_info_submitted",
            },
            {
              "label": "checkout_started",
              "value": "checkout_started",
            },
            {
              "label": "payment_info_submitted",
              "value": "payment_info_submitted",
            },
          ],
          "default": "checkout_contact_info_submitted",
          "description": "The name of the Checkout Event to track.",
          "key": "eventName",
          "label": "Checkout Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "saveCheckoutEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Save Event - Checkout Contact Info Submitted",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = 'Checkout Shipping Info Submitted'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "A unique event identifier.",
          "key": "eventId",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "ipAddress",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp when the event was triggered.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "clientId": "{event.distinct_id}",
            "fbc": "{event.properties.fbc}",
            "fbp": "{event.properties.fbp}",
            "ga": "{event.properties.ga}",
            "userId": "{person.id}",
          },
          "description": "Identifiers for the user",
          "key": "identifiers",
          "label": "Identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "referrer": "{event.properties.$referrer}",
            "url": "{event.properties.$current_url}",
          },
          "description": "Page details to send with the event",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Custom attributes for the event. Data should be specified as key:value pairs",
          "key": "customAttributes",
          "label": "Custom Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "dob": "{person.properties.birthday ?? person.properties.birthday}",
            "email": "{person.properties.email ?? person.properties.email}",
            "firstName": "{person.properties.first_name ?? person.properties.first_name}",
            "lastName": "{person.properties.last_name ?? person.properties.last_name}",
            "phone": "{person.properties.phone ?? person.properties.phone}",
          },
          "description": "Customer details",
          "key": "customer",
          "label": "Customer",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "currencyCode": undefined,
            "orderId": undefined,
            "shippingLinePriceAmount": undefined,
            "subtotalPriceAmount": undefined,
            "totalAmount": undefined,
            "totalTaxAmount": undefined,
          },
          "description": "Checkout details",
          "key": "checkout",
          "label": "Checkout",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "Checkout Line Item details",
          "key": "checkoutLineItems",
          "label": "Checkout Line Items",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "address1": "{event.properties.billing_address.address1}",
            "address2": "{event.properties.billing_address.address2}",
            "city": "{event.properties.billing_address.city}",
            "country": "{event.properties.billing_address.country}",
            "country_code": "{event.properties.billing_address.country_code}",
            "first_name": "{event.properties.billing_address.first_name}",
            "last_name": "{event.properties.billing_address.last_name}",
            "phone": "{event.properties.billing_address.phone}",
            "province": "{event.properties.billing_address.province}",
            "province_code": "{event.properties.billing_address.province_code}",
            "zip": "{event.properties.billing_address.zip}",
          },
          "description": "The billing address associated with the checkout.",
          "key": "checkoutBillingAddress",
          "label": "Checkout Billing Address",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "address1": "{event.properties.shipping_address.address1}",
            "address2": "{event.properties.shipping_address.address2}",
            "city": "{event.properties.shipping_address.city}",
            "country": "{event.properties.shipping_address.country}",
            "country_code": "{event.properties.shipping_address.country_code}",
            "first_name": "{event.properties.shipping_address.first_name}",
            "last_name": "{event.properties.shipping_address.last_name}",
            "phone": "{event.properties.shipping_address.phone}",
            "province": "{event.properties.shipping_address.province}",
            "province_code": "{event.properties.shipping_address.province_code}",
            "zip": "{event.properties.shipping_address.zip}",
          },
          "description": "The address to which the order will be shipped.",
          "key": "checkoutShippingAddress",
          "label": "Checkout Shipping Address",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "choices": [
            {
              "label": "checkout_address_info_submitted",
              "value": "checkout_address_info_submitted",
            },
            {
              "label": "checkout_completed",
              "value": "checkout_completed",
            },
            {
              "label": "checkout_contact_info_submitted",
              "value": "checkout_contact_info_submitted",
            },
            {
              "label": "checkout_shipping_info_submitted",
              "value": "checkout_shipping_info_submitted",
            },
            {
              "label": "checkout_started",
              "value": "checkout_started",
            },
            {
              "label": "payment_info_submitted",
              "value": "payment_info_submitted",
            },
          ],
          "default": "checkout_shipping_info_submitted",
          "description": "The name of the Checkout Event to track.",
          "key": "eventName",
          "label": "Checkout Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "saveCheckoutEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Save Event - Checkout Shipping Info Submitted",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = 'Checkout Started'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "A unique event identifier.",
          "key": "eventId",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "ipAddress",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp when the event was triggered.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "clientId": "{event.distinct_id}",
            "fbc": "{event.properties.fbc}",
            "fbp": "{event.properties.fbp}",
            "ga": "{event.properties.ga}",
            "userId": "{person.id}",
          },
          "description": "Identifiers for the user",
          "key": "identifiers",
          "label": "Identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "referrer": "{event.properties.$referrer}",
            "url": "{event.properties.$current_url}",
          },
          "description": "Page details to send with the event",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Custom attributes for the event. Data should be specified as key:value pairs",
          "key": "customAttributes",
          "label": "Custom Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "dob": "{person.properties.birthday ?? person.properties.birthday}",
            "email": "{person.properties.email ?? person.properties.email}",
            "firstName": "{person.properties.first_name ?? person.properties.first_name}",
            "lastName": "{person.properties.last_name ?? person.properties.last_name}",
            "phone": "{person.properties.phone ?? person.properties.phone}",
          },
          "description": "Customer details",
          "key": "customer",
          "label": "Customer",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "currencyCode": undefined,
            "orderId": undefined,
            "shippingLinePriceAmount": undefined,
            "subtotalPriceAmount": undefined,
            "totalAmount": undefined,
            "totalTaxAmount": undefined,
          },
          "description": "Checkout details",
          "key": "checkout",
          "label": "Checkout",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "Checkout Line Item details",
          "key": "checkoutLineItems",
          "label": "Checkout Line Items",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "address1": "{event.properties.billing_address.address1}",
            "address2": "{event.properties.billing_address.address2}",
            "city": "{event.properties.billing_address.city}",
            "country": "{event.properties.billing_address.country}",
            "country_code": "{event.properties.billing_address.country_code}",
            "first_name": "{event.properties.billing_address.first_name}",
            "last_name": "{event.properties.billing_address.last_name}",
            "phone": "{event.properties.billing_address.phone}",
            "province": "{event.properties.billing_address.province}",
            "province_code": "{event.properties.billing_address.province_code}",
            "zip": "{event.properties.billing_address.zip}",
          },
          "description": "The billing address associated with the checkout.",
          "key": "checkoutBillingAddress",
          "label": "Checkout Billing Address",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "address1": "{event.properties.shipping_address.address1}",
            "address2": "{event.properties.shipping_address.address2}",
            "city": "{event.properties.shipping_address.city}",
            "country": "{event.properties.shipping_address.country}",
            "country_code": "{event.properties.shipping_address.country_code}",
            "first_name": "{event.properties.shipping_address.first_name}",
            "last_name": "{event.properties.shipping_address.last_name}",
            "phone": "{event.properties.shipping_address.phone}",
            "province": "{event.properties.shipping_address.province}",
            "province_code": "{event.properties.shipping_address.province_code}",
            "zip": "{event.properties.shipping_address.zip}",
          },
          "description": "The address to which the order will be shipped.",
          "key": "checkoutShippingAddress",
          "label": "Checkout Shipping Address",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "choices": [
            {
              "label": "checkout_address_info_submitted",
              "value": "checkout_address_info_submitted",
            },
            {
              "label": "checkout_completed",
              "value": "checkout_completed",
            },
            {
              "label": "checkout_contact_info_submitted",
              "value": "checkout_contact_info_submitted",
            },
            {
              "label": "checkout_shipping_info_submitted",
              "value": "checkout_shipping_info_submitted",
            },
            {
              "label": "checkout_started",
              "value": "checkout_started",
            },
            {
              "label": "payment_info_submitted",
              "value": "payment_info_submitted",
            },
          ],
          "default": "checkout_started",
          "description": "The name of the Checkout Event to track.",
          "key": "eventName",
          "label": "Checkout Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "saveCheckoutEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Save Event - Checkout Started",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = 'Payment Info Entered'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "A unique event identifier.",
          "key": "eventId",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "ipAddress",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp when the event was triggered.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "clientId": "{event.distinct_id}",
            "fbc": "{event.properties.fbc}",
            "fbp": "{event.properties.fbp}",
            "ga": "{event.properties.ga}",
            "userId": "{person.id}",
          },
          "description": "Identifiers for the user",
          "key": "identifiers",
          "label": "Identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "referrer": "{event.properties.$referrer}",
            "url": "{event.properties.$current_url}",
          },
          "description": "Page details to send with the event",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Custom attributes for the event. Data should be specified as key:value pairs",
          "key": "customAttributes",
          "label": "Custom Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "dob": "{person.properties.birthday ?? person.properties.birthday}",
            "email": "{person.properties.email ?? person.properties.email}",
            "firstName": "{person.properties.first_name ?? person.properties.first_name}",
            "lastName": "{person.properties.last_name ?? person.properties.last_name}",
            "phone": "{person.properties.phone ?? person.properties.phone}",
          },
          "description": "Customer details",
          "key": "customer",
          "label": "Customer",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "currencyCode": undefined,
            "orderId": undefined,
            "shippingLinePriceAmount": undefined,
            "subtotalPriceAmount": undefined,
            "totalAmount": undefined,
            "totalTaxAmount": undefined,
          },
          "description": "Checkout details",
          "key": "checkout",
          "label": "Checkout",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "Checkout Line Item details",
          "key": "checkoutLineItems",
          "label": "Checkout Line Items",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "address1": "{event.properties.billing_address.address1}",
            "address2": "{event.properties.billing_address.address2}",
            "city": "{event.properties.billing_address.city}",
            "country": "{event.properties.billing_address.country}",
            "country_code": "{event.properties.billing_address.country_code}",
            "first_name": "{event.properties.billing_address.first_name}",
            "last_name": "{event.properties.billing_address.last_name}",
            "phone": "{event.properties.billing_address.phone}",
            "province": "{event.properties.billing_address.province}",
            "province_code": "{event.properties.billing_address.province_code}",
            "zip": "{event.properties.billing_address.zip}",
          },
          "description": "The billing address associated with the checkout.",
          "key": "checkoutBillingAddress",
          "label": "Checkout Billing Address",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "address1": "{event.properties.shipping_address.address1}",
            "address2": "{event.properties.shipping_address.address2}",
            "city": "{event.properties.shipping_address.city}",
            "country": "{event.properties.shipping_address.country}",
            "country_code": "{event.properties.shipping_address.country_code}",
            "first_name": "{event.properties.shipping_address.first_name}",
            "last_name": "{event.properties.shipping_address.last_name}",
            "phone": "{event.properties.shipping_address.phone}",
            "province": "{event.properties.shipping_address.province}",
            "province_code": "{event.properties.shipping_address.province_code}",
            "zip": "{event.properties.shipping_address.zip}",
          },
          "description": "The address to which the order will be shipped.",
          "key": "checkoutShippingAddress",
          "label": "Checkout Shipping Address",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "choices": [
            {
              "label": "checkout_address_info_submitted",
              "value": "checkout_address_info_submitted",
            },
            {
              "label": "checkout_completed",
              "value": "checkout_completed",
            },
            {
              "label": "checkout_contact_info_submitted",
              "value": "checkout_contact_info_submitted",
            },
            {
              "label": "checkout_shipping_info_submitted",
              "value": "checkout_shipping_info_submitted",
            },
            {
              "label": "checkout_started",
              "value": "checkout_started",
            },
            {
              "label": "payment_info_submitted",
              "value": "payment_info_submitted",
            },
          ],
          "default": "checkout_payment_info_submitted",
          "description": "The name of the Checkout Event to track.",
          "key": "eventName",
          "label": "Checkout Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "saveCheckoutEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Save Event - Checkout Payment Info Submitted",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = 'Product List Viewed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "A unique event identifier.",
          "key": "eventId",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "ipAddress",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp when the event was triggered.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "clientId": "{event.distinct_id}",
            "fbc": "{event.properties.fbc}",
            "fbp": "{event.properties.fbp}",
            "ga": "{event.properties.ga}",
            "userId": "{person.id}",
          },
          "description": "Identifiers for the user",
          "key": "identifiers",
          "label": "Identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "referrer": "{event.properties.$referrer}",
            "url": "{event.properties.$current_url}",
          },
          "description": "Page details to send with the event",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Custom attributes for the event. Data should be specified as key:value pairs",
          "key": "customAttributes",
          "label": "Custom Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "dob": "{person.properties.birthday ?? person.properties.birthday}",
            "email": "{person.properties.email ?? person.properties.email}",
            "firstName": "{person.properties.first_name ?? person.properties.first_name}",
            "lastName": "{person.properties.last_name ?? person.properties.last_name}",
            "phone": "{person.properties.phone ?? person.properties.phone}",
          },
          "description": "Customer details",
          "key": "customer",
          "label": "Customer",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "currencyCode": undefined,
            "id": undefined,
            "totalAmount": undefined,
          },
          "description": "Cart details",
          "key": "cart",
          "label": "Cart",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "Cart Line Item details",
          "key": "cartLines",
          "label": "Cart Line Items",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "id": "{event.properties.list_id}",
            "title": "{event.properties.list_name}",
          },
          "description": "Collection details",
          "key": "collection",
          "label": "Collection",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "A list of product variants associated with the collection.",
          "key": "collectionProductVariants",
          "label": "Collection Product Variants",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "collection_viewed",
              "value": "collection_viewed",
            },
          ],
          "default": "collection_viewed",
          "description": "The name of the Collection Event to track.",
          "key": "eventName",
          "label": "Collection Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "saveCollectionEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Save Event - Collection Viewed",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = 'Products Searched'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "A unique event identifier.",
          "key": "eventId",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "ipAddress",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp when the event was triggered.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "clientId": "{event.distinct_id}",
            "fbc": "{event.properties.fbc}",
            "fbp": "{event.properties.fbp}",
            "ga": "{event.properties.ga}",
            "userId": "{person.id}",
          },
          "description": "Identifiers for the user",
          "key": "identifiers",
          "label": "Identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "referrer": "{event.properties.$referrer}",
            "url": "{event.properties.$current_url}",
          },
          "description": "Page details to send with the event",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Custom attributes for the event. Data should be specified as key:value pairs",
          "key": "customAttributes",
          "label": "Custom Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "dob": "{person.properties.birthday ?? person.properties.birthday}",
            "email": "{person.properties.email ?? person.properties.email}",
            "firstName": "{person.properties.first_name ?? person.properties.first_name}",
            "lastName": "{person.properties.last_name ?? person.properties.last_name}",
            "phone": "{person.properties.phone ?? person.properties.phone}",
          },
          "description": "Customer details",
          "key": "customer",
          "label": "Customer",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "currencyCode": undefined,
            "id": undefined,
            "totalAmount": undefined,
          },
          "description": "Cart details",
          "key": "cart",
          "label": "Cart",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "Cart Line Item details",
          "key": "cartLines",
          "label": "Cart Line Items",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.products}",
          "description": "Search results details",
          "key": "searchResults",
          "label": "Search Results",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.query}",
          "description": "The search query that was executed.",
          "key": "query",
          "label": "Search Query",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "search_submitted",
              "value": "search_submitted",
            },
          ],
          "default": "search_submitted",
          "description": "The name of the Search event to track.",
          "key": "eventName",
          "label": "Search Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "saveSearchEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Save Event - Search Submitted",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = 'Product Added'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "A unique event identifier.",
          "key": "eventId",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "ipAddress",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp when the event was triggered.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "clientId": "{event.distinct_id}",
            "fbc": "{event.properties.fbc}",
            "fbp": "{event.properties.fbp}",
            "ga": "{event.properties.ga}",
            "userId": "{person.id}",
          },
          "description": "Identifiers for the user",
          "key": "identifiers",
          "label": "Identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "referrer": "{event.properties.$referrer}",
            "url": "{event.properties.$current_url}",
          },
          "description": "Page details to send with the event",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Custom attributes for the event. Data should be specified as key:value pairs",
          "key": "customAttributes",
          "label": "Custom Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "dob": "{person.properties.birthday ?? person.properties.birthday}",
            "email": "{person.properties.email ?? person.properties.email}",
            "firstName": "{person.properties.first_name ?? person.properties.first_name}",
            "lastName": "{person.properties.last_name ?? person.properties.last_name}",
            "phone": "{person.properties.phone ?? person.properties.phone}",
          },
          "description": "Customer details",
          "key": "customer",
          "label": "Customer",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "Cart Line details",
          "key": "cartLine",
          "label": "Cart Line",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "product_added_to_cart",
              "value": "product_added_to_cart",
            },
            {
              "label": "product_removed_from_cart",
              "value": "product_removed_from_cart",
            },
          ],
          "default": "product_added_to_cart",
          "description": "The name of the Cart Event to track.",
          "key": "eventName",
          "label": "Cart Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "saveCartEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Save Event - Product Added To Cart",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = 'Product Removed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "A unique event identifier.",
          "key": "eventId",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "ipAddress",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp when the event was triggered.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "clientId": "{event.distinct_id}",
            "fbc": "{event.properties.fbc}",
            "fbp": "{event.properties.fbp}",
            "ga": "{event.properties.ga}",
            "userId": "{person.id}",
          },
          "description": "Identifiers for the user",
          "key": "identifiers",
          "label": "Identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "referrer": "{event.properties.$referrer}",
            "url": "{event.properties.$current_url}",
          },
          "description": "Page details to send with the event",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Custom attributes for the event. Data should be specified as key:value pairs",
          "key": "customAttributes",
          "label": "Custom Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "dob": "{person.properties.birthday ?? person.properties.birthday}",
            "email": "{person.properties.email ?? person.properties.email}",
            "firstName": "{person.properties.first_name ?? person.properties.first_name}",
            "lastName": "{person.properties.last_name ?? person.properties.last_name}",
            "phone": "{person.properties.phone ?? person.properties.phone}",
          },
          "description": "Customer details",
          "key": "customer",
          "label": "Customer",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "Cart Line details",
          "key": "cartLine",
          "label": "Cart Line",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "product_added_to_cart",
              "value": "product_added_to_cart",
            },
            {
              "label": "product_removed_from_cart",
              "value": "product_removed_from_cart",
            },
          ],
          "default": "product_removed_from_cart",
          "description": "The name of the Cart Event to track.",
          "key": "eventName",
          "label": "Cart Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "saveCartEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Save Event - Product Removed From Cart",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = 'Product Viewed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "A unique event identifier.",
          "key": "eventId",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "ipAddress",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp when the event was triggered.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "clientId": "{event.distinct_id}",
            "fbc": "{event.properties.fbc}",
            "fbp": "{event.properties.fbp}",
            "ga": "{event.properties.ga}",
            "userId": "{person.id}",
          },
          "description": "Identifiers for the user",
          "key": "identifiers",
          "label": "Identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "referrer": "{event.properties.$referrer}",
            "url": "{event.properties.$current_url}",
          },
          "description": "Page details to send with the event",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Custom attributes for the event. Data should be specified as key:value pairs",
          "key": "customAttributes",
          "label": "Custom Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "dob": "{person.properties.birthday ?? person.properties.birthday}",
            "email": "{person.properties.email ?? person.properties.email}",
            "firstName": "{person.properties.first_name ?? person.properties.first_name}",
            "lastName": "{person.properties.last_name ?? person.properties.last_name}",
            "phone": "{person.properties.phone ?? person.properties.phone}",
          },
          "description": "Customer details",
          "key": "customer",
          "label": "Customer",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "currencyCode": undefined,
            "id": undefined,
            "totalAmount": undefined,
          },
          "description": "Cart details",
          "key": "cart",
          "label": "Cart",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "Cart Line Item details",
          "key": "cartLines",
          "label": "Cart Line Items",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "id": "{event.properties.product_id}",
            "imageSrc": "{event.properties.image_url}",
            "priceAmount": "{event.properties.price}",
            "sku": "{event.properties.sku}",
            "title": "{event.properties.name}",
            "type": "{event.properties.category}",
            "untranslatedTitle": "{"@if":{"exists":[{"@path":"$.properties.variant"}],"then":{"@path":"$.properties.variant"},"else":{"@path":"$.properties.title"}}}",
            "url": "{event.properties.url}",
            "variantId": "{event.properties.variant}",
            "vendor": "{event.properties.vendor}",
          },
          "description": "Product Variant details",
          "key": "productVariant",
          "label": "Product Variant",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "choices": [
            {
              "label": "product_viewed",
              "value": "product_viewed",
            },
          ],
          "default": "product_viewed",
          "description": "The name of the Product event to track.",
          "key": "eventName",
          "label": "Product Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "saveProductEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Save Event - Product Viewed",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = 'Form Submitted'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "A unique event identifier.",
          "key": "eventId",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "ipAddress",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp when the event was triggered.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "clientId": "{event.distinct_id}",
            "fbc": "{event.properties.fbc}",
            "fbp": "{event.properties.fbp}",
            "ga": "{event.properties.ga}",
            "userId": "{person.id}",
          },
          "description": "Identifiers for the user",
          "key": "identifiers",
          "label": "Identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "referrer": "{event.properties.$referrer}",
            "url": "{event.properties.$current_url}",
          },
          "description": "Page details to send with the event",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Custom attributes for the event. Data should be specified as key:value pairs",
          "key": "customAttributes",
          "label": "Custom Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "dob": "{person.properties.birthday ?? person.properties.birthday}",
            "email": "{person.properties.email ?? person.properties.email}",
            "firstName": "{person.properties.first_name ?? person.properties.first_name}",
            "lastName": "{person.properties.last_name ?? person.properties.last_name}",
            "phone": "{person.properties.phone ?? person.properties.phone}",
          },
          "description": "Customer details",
          "key": "customer",
          "label": "Customer",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "currencyCode": undefined,
            "id": undefined,
            "totalAmount": undefined,
          },
          "description": "Cart details",
          "key": "cart",
          "label": "Cart",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "Cart Line Item details",
          "key": "cartLines",
          "label": "Cart Line Items",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "The id attribute of an element.",
          "key": "id",
          "label": "Form ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "The action attribute of a form element.",
          "key": "action",
          "label": "Form Action",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.form.elements}",
          "description": "A list of elements associated with the form.",
          "key": "elements",
          "label": "Form Elements",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "form_submitted",
              "value": "form_submitted",
            },
          ],
          "default": "form_submitted",
          "description": "The name of the Form Event to track.",
          "key": "eventName",
          "label": "Form Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "saveFormEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Save Event - Form Submitted",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = 'Order Completed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.properties.products}",
          "description": "list of line items associated with the order.",
          "key": "line_items",
          "label": "Line items",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "address1": "{event.properties.billing_address.address1}",
            "address2": "{event.properties.billing_address.address2}",
            "city": "{event.properties.billing_address.city}",
            "country": "{event.properties.billing_address.country}",
            "country_code": "{event.properties.billing_address.country_code}",
            "first_name": "{event.properties.billing_address.first_name}",
            "last_name": "{event.properties.billing_address.last_name}",
            "phone": "{event.properties.billing_address.phone}",
            "province": "{event.properties.billing_address.province}",
            "province_code": "{event.properties.billing_address.province_code}",
            "zip": "{event.properties.billing_address.zip}",
          },
          "description": "The mailing address associated with the payment method.",
          "key": "billing_address",
          "label": "Billing Address",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the browser used by the customer when they placed the order. Both IPv4 and IPv6 are supported.",
          "key": "browser_ip",
          "label": "Browser IP",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.buyer_accepts_marketing ?? person.properties.accepts_marketing}",
          "description": "Whether the customer consented to receive email updates from the shop.",
          "key": "buyer_accepts_marketing",
          "label": "Buyer Accepts Marketing",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "{event.properties.checkout_id}",
          "description": "The ID of the checkout.",
          "key": "checkout_id",
          "label": "Checkout ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "browser_ip": "{event.properties.$ip}",
            "user_agent": "{event.properties.$raw_user_agent}",
          },
          "description": "Information about the browser that the customer used when they placed their order.",
          "key": "client_details",
          "label": "Client Details",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.confirmed}",
          "description": "Confirmed",
          "key": "confirmed",
          "label": "Confirmed",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "{event.properties.contact_email ?? person.properties.email}",
          "description": "Contact Email",
          "key": "contact_email",
          "label": "Contact Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.created_at}",
          "description": "The autogenerated date and time (ISO 8601 format) when the order was created.",
          "key": "created_at",
          "label": "Created At",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.currency}",
          "description": "The three-letter code (ISO 4217 format) for the currency that the customer used when they paid for their last order.",
          "key": "currency",
          "label": "Currency",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.subtotal}",
          "description": "The current subtotal price of the order in the shop currency. The value of this field reflects order edits, returns, and refunds.",
          "key": "current_subtotal_price",
          "label": "Current Subtotal Price",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.discount}",
          "description": "The current total discounts on the order in the shop currency. The value of this field reflects order edits, returns, and refunds.",
          "key": "current_total_discounts",
          "label": "Current Total Discounts",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.current_total_price}",
          "description": "The current total price of the order in the shop currency. The value of this field reflects order edits, returns, and refunds.",
          "key": "current_total_price",
          "label": "Current Total Price",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.tax}",
          "description": "The current total taxes charged on the order in the shop currency. The value of this field reflects order edits, returns, or refunds.",
          "key": "current_total_tax",
          "label": "Current Total Tax",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id ?? person.properties.id}",
          "description": "A unique identifier for the customer.",
          "key": "customer_id",
          "label": "Customer ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.discount_applications}",
          "description": "An ordered list of stacked discount applications. The discount_applications property includes 3 types: discount_code, manual, and script. All 3 types share a common structure and have some type specific attributes.",
          "key": "discount_applications",
          "label": "Discount Applications",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.discount_codes}",
          "description": "A list of discounts applied to the order.",
          "key": "discount_codes",
          "label": "Discount Codes",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.email ?? person.properties.email}",
          "description": "The customer's email address.",
          "key": "email",
          "label": "Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.estimated_taxes}",
          "description": "Whether taxes on the order are estimated. Many factors can change between the time a customer places an order and the time the order is shipped, which could affect the calculation of taxes.",
          "key": "estimated_taxes",
          "label": "Estimated Taxes",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "{event.properties.financial_status}",
          "description": "The status of payments associated with the order.",
          "key": "financial_status",
          "label": "Financial Status",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.fulfillment_status}",
          "description": "The order's status in terms of fulfilled line items.",
          "key": "fulfillment_status",
          "label": "Fulfillment Status",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.gateway}",
          "description": "The payment gateway used.",
          "key": "gateway",
          "label": "Gateway",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.order_id}",
          "description": "The ID of the order, used for API purposes.",
          "key": "id",
          "label": "ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.landing_site}",
          "description": "The URL for the page where the buyer landed when they entered the shop.",
          "key": "landing_site",
          "label": "Landing Site",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.landing_site_ref}",
          "description": "Landing Site Ref",
          "key": "landing_site_ref",
          "label": "Landing Site Ref",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.name}",
          "description": "The order name.",
          "key": "name",
          "label": "Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.order_number}",
          "description": "The order position in the shop count of orders starting at 1001. Order numbers are sequential and start at 1001.",
          "key": "order_number",
          "label": "Order Number",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.phone}",
          "description": "The customer's phone number for receiving SMS notifications.",
          "key": "phone",
          "label": "Phone",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.processed_at}",
          "description": "The date and time (ISO 8601 format) when an order was processed.",
          "key": "processed_at",
          "label": "Processed At",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.processing_method}",
          "description": "How the payment was processed.",
          "key": "processing_method",
          "label": "Processing Method",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.reference}",
          "description": "Reference",
          "key": "reference",
          "label": "Reference",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.referring_site}",
          "description": "The website where the customer clicked a link to the shop.",
          "key": "referring_site",
          "label": "Referring Site",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "address1": "{event.properties.shipping_address.address1}",
            "address2": "{event.properties.shipping_address.address2}",
            "city": "{event.properties.shipping_address.city}",
            "country": "{event.properties.shipping_address.country}",
            "country_code": "{event.properties.shipping_address.country_code}",
            "first_name": "{event.properties.shipping_address.first_name}",
            "last_name": "{event.properties.shipping_address.last_name}",
            "phone": "{event.properties.shipping_address.phone}",
            "province": "{event.properties.shipping_address.province}",
            "province_code": "{event.properties.shipping_address.province_code}",
            "zip": "{event.properties.shipping_address.zip}",
          },
          "description": "The mailing address associated with the payment method.",
          "key": "shipping_address",
          "label": "Shipping Address",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.source_identifier}",
          "description": "The ID of the order placed on the originating platform.",
          "key": "source_identifier",
          "label": "Source Identifier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.source_name}",
          "description": "The source of the checkout.",
          "key": "source_name",
          "label": "Source Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.source_url}",
          "description": "A valid URL to the original order on the originating surface.",
          "key": "source_url",
          "label": "Source URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.subtotal}",
          "description": "The price of the order in the shop currency after discounts but before shipping, duties, taxes, and tips.",
          "key": "subtotal_price",
          "label": "Subtotal Price",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.tags}",
          "description": "Tags attached to the order, formatted as a string of comma-separated values. Tags are additional short descriptors, commonly used for filtering and searching. Each individual tag is limited to 40 characters in length.",
          "key": "tags",
          "label": "Tags",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.taxes_included}",
          "description": "Whether taxes are included in the order subtotal.",
          "key": "taxes_included",
          "label": "Taxes Included",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "{event.properties.discount}",
          "description": "The total discounts applied to the price of the order in the shop currency.",
          "key": "total_discounts",
          "label": "Total Discounts",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.total_line_items_price}",
          "description": "The sum of all line item prices in the shop currency.",
          "key": "total_line_items_price",
          "label": "Total Line Items Price",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.total_outstanding}",
          "description": "The total outstanding amount of the order in the shop currency.",
          "key": "total_outstanding",
          "label": "Total Outstanding",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.total}",
          "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.",
          "key": "total_price",
          "label": "Total Price",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.total_price_usd}",
          "description": "The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency in USD",
          "key": "total_price_usd",
          "label": "Total Price USD",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.tax}",
          "description": "The sum of all the taxes applied to the order in the shop currency. Must be positive.",
          "key": "total_tax",
          "label": "Total Tax",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.user_id}",
          "description": "The ID of the user logged into Shopify POS who processed the order, if applicable.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.updated_at}",
          "description": "The date and time (ISO 8601 format) when the order was last modified.",
          "key": "updated_at",
          "label": "Updated At",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.additional_fields}",
          "description": "Extra properties.",
          "key": "additional_fields",
          "label": "Additional Fields",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "saveOrder",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Save Order",
    },
  ],
  "name": "Angler AI",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-attentive matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Attentive",
  "free": false,
  "icon_url": "/static/services/attentive.com.png",
  "id": "segment-actions-attentive",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Your Attentive API Key.",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "The type of event. This name is case sensitive. "Order shipped" and "Order Shipped" would be considered different event types.",
          "key": "type",
          "label": "Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "clientUserId": "{person.id}",
            "email": "{person.properties.email ?? event.properties.email}",
            "phone": "{person.properties.phone ?? event.properties.phone}",
          },
          "description": "At least one identifier is required. Custom identifiers can be added as additional key:value pairs.",
          "key": "userIdentifiers",
          "label": "User Identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Metadata to associate with the event.",
          "key": "properties",
          "label": "Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.uuid}",
          "description": "A unique identifier representing this specific event. Should be a UUID format.",
          "key": "externalEventId",
          "label": "External Event Id",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Timestamp for the event, ISO 8601 format.",
          "key": "occurredAt",
          "label": "Occurred At",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "customEvents",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Event",
    },
  ],
  "name": "Attentive",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-blend-ai matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Blend Ai",
  "free": false,
  "icon_url": "/static/services/blend.com.png",
  "id": "segment-actions-blend-ai",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Blend API key - found on integration page.",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set') or event = '$pageview' or event = '$screen' or event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event ?? event.event}",
          "description": "The name of event, page or screen",
          "key": "eventName",
          "label": "Event Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of event",
          "key": "eventType",
          "label": "Event Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Properties of the event",
          "key": "eventProperties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "User profile details / traits",
          "key": "userTraits",
          "label": "User Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "userId": "{person.id}",
          },
          "description": "User identifiers",
          "key": "identifiers",
          "label": "Identifiers",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "trackEvents",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Send Data to Blend",
    },
  ],
  "name": "Blend Ai",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-canny matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Canny",
  "free": false,
  "icon_url": "/static/services/canny.io.png",
  "id": "segment-actions-canny",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "You can find your API Key in the Segment Integration page in your admin settings.",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$groupidentify'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.properties.$group_0}",
          "description": "The unique identifier of the group.",
          "key": "groupId",
          "label": "Group ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Properties to set on the group profile",
          "key": "traits",
          "label": "Group Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of the event",
          "key": "type",
          "label": "Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The unique identifier of the user.",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "group",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Create or update a Company",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "A distinct ID of an identified (logged in) user.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "avatar": "{person.properties.avatar}",
            "company": "{person.properties.company}",
            "createdAt": "{person.properties.createdAt}",
            "email": "{person.properties.email}",
            "id": "{person.properties.id}",
            "name": "{person.properties.name}",
          },
          "description": "Properties to set on the user profile",
          "key": "traits",
          "label": "User Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of the event",
          "key": "type",
          "label": "Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "identify",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Create or update a User",
    },
  ],
  "name": "Canny",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-canvas matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Canvas",
  "free": false,
  "icon_url": "/static/services/supernova.ai.png",
  "id": "segment-actions-canvas",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "API token generated by Canvas",
      "key": "apiToken",
      "label": "API Token",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "The name of the event.",
          "key": "event",
          "label": "Event name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "A JSON object containing the properties of the event.",
          "key": "properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "Event context as it appears in Segment",
          "key": "context",
          "label": "Event context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "The anonymous ID associated with the user",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "message_id",
          "label": "Message ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "A timestamp of when the event took place. Default is current date and time.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.receivedAt}",
          "description": "When the event was received.",
          "key": "received_at",
          "label": "Received at",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.sentAt}",
          "description": "Device-time when the event was sent.",
          "key": "sent_at",
          "label": "Sent at",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The user's id",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "sendTrackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Send Track Event",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "The properties of the user.",
          "key": "traits",
          "label": "User Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "Event context as it appears in Segment",
          "key": "context",
          "label": "Event context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "The anonymous ID associated with the user",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "message_id",
          "label": "Message ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "A timestamp of when the event took place. Default is current date and time.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.receivedAt}",
          "description": "When the event was received.",
          "key": "received_at",
          "label": "Received at",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.sentAt}",
          "description": "Device-time when the event was sent.",
          "key": "sent_at",
          "label": "Sent at",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The user's id",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "sendIdentifyEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Send Identify User Event",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$groupidentify'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.properties.$group_0}",
          "description": "The unique identifier of the group.",
          "key": "group_id",
          "label": "Group ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "The properties of the group.",
          "key": "traits",
          "label": "Group Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "Event context as it appears in Segment",
          "key": "context",
          "label": "Event context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "The anonymous ID associated with the user",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "message_id",
          "label": "Message ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "A timestamp of when the event took place. Default is current date and time.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.receivedAt}",
          "description": "When the event was received.",
          "key": "received_at",
          "label": "Received at",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.sentAt}",
          "description": "Device-time when the event was sent.",
          "key": "sent_at",
          "label": "Sent at",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The user's id",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "sendGroupEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Send Identify Group Event",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "Page name",
          "key": "name",
          "label": "Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Properties to associate with the page view",
          "key": "properties",
          "label": "Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "Event context as it appears in Segment",
          "key": "context",
          "label": "Event context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "The anonymous ID associated with the user",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "message_id",
          "label": "Message ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "A timestamp of when the event took place. Default is current date and time.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.receivedAt}",
          "description": "When the event was received.",
          "key": "received_at",
          "label": "Received at",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.sentAt}",
          "description": "Device-time when the event was sent.",
          "key": "sent_at",
          "label": "Sent at",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The user's id",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "sendPageEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Send Page Event",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$screen'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "Screen name",
          "key": "name",
          "label": "Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Properties to associate with the screen",
          "key": "properties",
          "label": "Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "Event context as it appears in Segment",
          "key": "context",
          "label": "Event context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "The anonymous ID associated with the user",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "message_id",
          "label": "Message ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "A timestamp of when the event took place. Default is current date and time.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.receivedAt}",
          "description": "When the event was received.",
          "key": "received_at",
          "label": "Received at",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.sentAt}",
          "description": "Device-time when the event was sent.",
          "key": "sent_at",
          "label": "Sent at",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The user's id",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "sendScreenEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Send Screen Event",
    },
  ],
  "name": "Canvas",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-clevertap matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to CleverTap",
  "free": false,
  "icon_url": "/static/services/clevertap.com.png",
  "id": "segment-actions-clevertap",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "CleverTap Account Id. This can be found under [Settings Page](https://developer.clevertap.com/docs/authentication#getting-your-account-credentials).",
      "key": "clevertapAccountId",
      "label": "CleverTap Account ID",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "CleverTap Passcode. This can be found under [Settings Page](https://developer.clevertap.com/docs/authentication#getting-your-account-credentials).",
      "key": "clevertapPasscode",
      "label": "CleverTap Account Passcode",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "choices": [
        {
          "label": "SK",
          "value": "https://sk1.api.clevertap.com",
        },
        {
          "label": "EU",
          "value": "https://eu1.api.clevertap.com",
        },
        {
          "label": "US",
          "value": "https://us1.api.clevertap.com",
        },
        {
          "label": "SG",
          "value": "https://sg1.api.clevertap.com",
        },
        {
          "label": "IN",
          "value": "https://in1.api.clevertap.com",
        },
      ],
      "default": "https://sk1.api.clevertap.com",
      "description": "Learn More about [Account regions](https://docs.clevertap.com/docs/build-segment-destination#set-up-segment-destination-action).",
      "key": "clevertapEndpoint",
      "label": "REST Endpoint",
      "required": true,
      "secret": false,
      "type": "choice",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = 'Delete User'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "The ID of the profile which you want to delete",
          "key": "identity",
          "label": "Identity",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "userDelete",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Event Name is Delete User",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.timestamp}",
          "description": "A timestamp when the person was created",
          "key": "ts",
          "label": "Created At",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Optional attributes for the person. When updating a person attributes added or updated, not removed",
          "key": "profileData",
          "label": "Person Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.id}",
          "description": "The Id used to uniquely identify a person in CleverTap",
          "key": "identity",
          "label": "Identity",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "userUpload",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Event Type is Identify",
    },
  ],
  "name": "CleverTap",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-cloud-gwen matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to GWEN",
  "free": false,
  "icon_url": "/static/services/gwenplatform.com.png",
  "id": "segment-actions-cloud-gwen",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "GWEN API key. Can be found [here](http://gwen.insertcoin.se/iam/api-token) (login required)",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "The user's id. (Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of the event",
          "key": "type",
          "label": "Event Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "The data to be sent to GWEN",
          "key": "data",
          "label": "Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "sendEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Send an event to GWEN",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "The user's id. (Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user",
          "key": "ip",
          "label": "User IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The userAgent string of the user",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "identifyUser",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify a user",
    },
  ],
  "name": "GWEN",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-drip matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Drip",
  "free": false,
  "icon_url": "/static/services/drip.com.png",
  "id": "segment-actions-drip",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Account ID for your Drip account. You can find this in your Drip account settings.",
      "key": "accountId",
      "label": "Account ID",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "API key for your Drip account. You can find this in your Drip account settings.",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {
            "$$_extend_object": "{person.properties.custom_fields}",
          },
          "description": "Custom fields to add to a person's profile. Non string values will be stringified.",
          "key": "custom_fields",
          "label": "Custom fields",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.properties.email}",
          "description": "The person's email address.",
          "key": "email",
          "label": "Email Address",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The person's ip address.",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.phone}",
          "description": "The person's sms number.",
          "key": "phone",
          "label": "SMS Number",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.initial_status ?? 'unsubscribed'}",
          "description": "The person's subscription status if newly identified.",
          "key": "initial_status",
          "label": "Initial Status",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.status}",
          "description": "The person's subscription status. Overrides initial_status.",
          "key": "status",
          "label": "Status",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.status_updated_at}",
          "description": "The timestamp associated with the update to a person's status.",
          "key": "status_updated_at",
          "label": "Status Updated At",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.tags}",
          "description": "Comma delimited list of tags to add to a person's profile. e.g. "tag1,tag2".",
          "key": "tags",
          "label": "Tags",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$timezone}",
          "description": "The person's timezone.",
          "key": "timezone",
          "label": "Timezone",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "identify",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "The name of the action.",
          "key": "action",
          "label": "Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.email ?? person.properties.email}",
          "description": "The person's email address.",
          "key": "email",
          "label": "Email Address",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Additional properties associated with the event.",
          "key": "properties",
          "label": "Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track event",
    },
  ],
  "name": "Drip",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-fullstory-cloud matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Fullstory Cloud Mode",
  "free": false,
  "icon_url": "/static/services/fullstory.com.png",
  "id": "segment-actions-fullstory-cloud",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "[FullStory API key](https://help.fullstory.com/hc/en-us/articles/360052021773-Managing-API-Keys)",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "The user's id",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "The name of the event.",
          "key": "name",
          "label": "Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "A JSON object containing additional information about the event that will be indexed by FullStory.",
          "key": "properties",
          "label": "Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The date and time when the event occurred. If not provided, the current FullStory server time will be used.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "Set to true if the custom event should be attached to the user's most recent session. The most recent session must have had activity within the past 30 minutes.",
          "key": "useRecentSession",
          "label": "Use Recent Session",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": undefined,
          "description": "If known, the FullStory session playback URL to which the event should be attached, as returned by the FS.getCurrentSessionURL() client API.",
          "key": "sessionUrl",
          "label": "Session URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "trackEventV2",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Event",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "The user's id",
          "key": "uid",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "The user's anonymous id",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.name}",
          "description": "The user's display name",
          "key": "displayName",
          "label": "Display Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email}",
          "description": "The user's email",
          "key": "email",
          "label": "Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "The Segment traits to be forwarded to FullStory",
          "key": "properties",
          "label": "Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "identifyUserV2",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify User",
    },
  ],
  "name": "Fullstory Cloud Mode",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-gameball matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Gameball",
  "free": false,
  "icon_url": "/static/services/gameball.co.png",
  "id": "segment-actions-gameball",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Go to [help center](https://help.gameball.co/en/articles/3467114-get-your-account-integration-details-api-key-and-transaction-key) to learn how to find your API Key.",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "Go to [help center](https://help.gameball.co/en/articles/3467114-get-your-account-integration-details-api-key-and-transaction-key) to learn how to find your API Key.",
      "key": "secretKey",
      "label": "Secret Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event != 'Order Completed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "The name of the event",
          "key": "name",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "The event metadata to send to Gameball",
          "key": "metadata",
          "label": "Event Metadata",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "Unique identifier for the player in your database.",
          "key": "playerUniqueId",
          "label": "Player ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.mobile ?? person.properties.mobile}",
          "description": "Player's unique mobile number.",
          "key": "mobile",
          "label": "Mobile Number",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.email ?? person.properties.email}",
          "description": "Player's unique email.",
          "key": "email",
          "label": "Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Events",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Order Completed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "Unique identifier for the player in your database.",
          "key": "playerUniqueId",
          "label": "Player ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.mobile ?? person.properties.mobile}",
          "description": "Player's unique mobile number.",
          "key": "mobile",
          "label": "Mobile Number",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.email ?? person.properties.email}",
          "description": "Player's unique email.",
          "key": "email",
          "label": "Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.order_id}",
          "description": "Unique order ID which identifies the underlying order in your system, e.g. order number, invoice number. It will be used for reversing any reward or redemption transaction on Gameball.",
          "key": "orderId",
          "label": "Order Id",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The date this order was placed, as an ISO8601 timestamp. Defaults to now if not provided.",
          "key": "orderDate",
          "label": "Order Date",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.total}",
          "description": "The sum of all order items' prices, including discounts, shipping, taxes, and tips. (Note: totalPaid is part of the totalPrice). Must be positive.",
          "key": "totalPrice",
          "label": "Total Price",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.subtotal}",
          "description": "The actual paid amount to the store. (Based on this amount, the player will be rewarded. Also, According to the Cashback Configuration). Must be positive.",
          "key": "totalPaid",
          "label": "Total Paid",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.shipping}",
          "description": "The total shipping price of the order. Must be positive.",
          "key": "totalShipping",
          "label": "Total Shipping",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.tax}",
          "description": "The sum of all the taxes applied to the order in the shop currency. Must be positive.",
          "key": "totalTax",
          "label": "Total Tax",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.discount}",
          "description": "Total discount applied on this order. Must be positive.",
          "key": "totalDiscount",
          "label": "Total Discount",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.products}",
          "description": "A list of line items, each containing information about an item in the order.",
          "key": "lineItems",
          "label": "Line Items",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{[event.properties.coupon]}",
          "description": "An array of discount codes.",
          "key": "discountCodes",
          "label": "Discount Codes",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.redeemedAmount}",
          "description": "Monetary value of the redeemed points to be used by that player while placing his order. Note:  If this field is set, then the holdReference value should be null. Also, both fields could be null.",
          "key": "redeemedAmount",
          "label": "Redeemed Amount",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.holdReference}",
          "description": "Hold reference ID received after calling Hold Points API. This is used in case you want to use already held points. Note:  If this field is set, then the redeemedAmount value should be null. Also, both fields could be null.",
          "key": "holdReference",
          "label": "Hold Reference",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.is_guest ?? false}",
          "description": "A boolean value indicating if the customer who placed this order is a guest. The default is false.",
          "key": "guest",
          "label": "Guest",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties.extra}",
          },
          "description": "Key value pair(s) of any extra information about the order. The key values must be of type string or number",
          "key": "extra",
          "label": "Extra",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.merchantId}",
          "description": "Merchant unique id or code",
          "key": "merchantId",
          "label": "Merchant Id",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.merchantName}",
          "description": "Merchant name",
          "key": "merchantName",
          "label": "Merchant Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.branchId}",
          "description": "Branch unique id or code",
          "key": "branchId",
          "label": "Branch Id",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.branchName}",
          "description": "Branch name",
          "key": "branchName",
          "label": "Branch Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "trackOrder",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Orders",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "Unique identifier for the player in your database.",
          "key": "playerUniqueId",
          "label": "Player ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.mobile ?? person.properties.mobile}",
          "description": "Player's unique mobile number.",
          "key": "mobile",
          "label": "Mobile Number",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.email ?? person.properties.email}",
          "description": "Player's unique email.",
          "key": "email",
          "label": "Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.displayName}",
          "description": "Player's display name",
          "key": "displayName",
          "label": "Display Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.first_name}",
          "description": "Player's first name",
          "key": "firstName",
          "label": "First Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.last_name}",
          "description": "Player's last name",
          "key": "lastName",
          "label": "Last Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.gender}",
          "description": "Player's gender.",
          "key": "gender",
          "label": "Gender",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.birthday}",
          "description": "Player's date of birth",
          "key": "dateOfBirth",
          "label": "Date Of Birth",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.joinDate}",
          "description": "Player's join date at your system.",
          "key": "joinDate",
          "label": "Join Date",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.address.country}",
          "description": "Player's country.",
          "key": "country",
          "label": "Country",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.address.city}",
          "description": "Player's city",
          "key": "city",
          "label": "City",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.location.postalCode}",
          "description": "Player's zip code",
          "key": "zip",
          "label": "Zip code",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "Player's preferred language",
          "key": "preferredLanguage",
          "label": "Preferred language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.is_guest ?? false}",
          "description": "A boolean value indicating if the customer who placed this order is a guest. The default is false.",
          "key": "guest",
          "label": "Guest",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "{event.context.campaign}",
          "description": "Player's utms",
          "key": "utms",
          "label": "UTMs",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.context}",
          "description": "Player's used devices",
          "key": "devices",
          "label": "Devices",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.totalSpent}",
          "description": "Player's total spent amount",
          "key": "totalSpent",
          "label": "Total Spent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.lastOrderDate}",
          "description": "Player's last order date",
          "key": "lastOrderDate",
          "label": "Last Order Date",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.totalOrders}",
          "description": "Player's total orders",
          "key": "totalOrders",
          "label": "Total Orders",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.avgOrderAmount}",
          "description": "Player's average order amount",
          "key": "avgOrderAmount",
          "label": "Average Order Amount",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.tags}",
          "description": "Comma separated string of tags to be attached to the player.",
          "key": "tags",
          "label": "Tags",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties.extra}",
          },
          "description": "Key value pairs of any extra player attributes.",
          "key": "playerCustomAttributes",
          "label": "Player Custom Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.properties.referrerCode}",
          "description": "Referring player’s referral code. This is used in case of referral, where the player to be created is referred by the player having this code.",
          "key": "referrerCode",
          "label": "Referrer Code",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.levelOrder}",
          "description": "The level order to place the player in. IMPORTANT: manual player leveling is available under special circumstances and is not available by default. Contact us for more info.",
          "key": "levelOrder",
          "label": "Level Order",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.deviceToken}",
          "description": "The FCM token (Firebase Cloud Messaging) needed for sending mobile push notifications. (Used only in case of mobile app)",
          "key": "deviceToken",
          "label": "Device Token",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "identifyPlayer",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Create Or Update Players",
    },
  ],
  "name": "Gameball",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-hilo matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Hilo",
  "free": false,
  "icon_url": "/static/services/hilo.com.png",
  "id": "segment-actions-hilo",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Hilo integration ID. This can be found on the integration page.",
      "key": "integrationId",
      "label": "Integration ID",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "An anonymous identifier",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "Event name",
          "key": "event",
          "label": "Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Properties to associate with the event",
          "key": "properties",
          "label": "Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "track",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "An anonymous identifier",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "Page name",
          "key": "name",
          "label": "Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Properties to associate with the page view",
          "key": "properties",
          "label": "Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the page view",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "page",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Page Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$screen'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "An anonymous identifier",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "Mobile screen name",
          "key": "name",
          "label": "Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Properties to associate with the screen view",
          "key": "properties",
          "label": "Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the screen view",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "screen",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Screen Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "An anonymous identifier",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Traits to associate with the user",
          "key": "traits",
          "label": "Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "identify",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$groupidentify'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "An anonymous identifier",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$group_0}",
          "description": "The group ID",
          "key": "groupId",
          "label": "Group ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Traits to associate with the user",
          "key": "traits",
          "label": "Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "group",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Group Calls",
    },
  ],
  "name": "Hilo",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-hyperengage matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Hyperengage",
  "free": false,
  "icon_url": "/static/services/hyperengage.io.png",
  "id": "segment-actions-hyperengage",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Your Hyperengage API key located in the Integration Settings page.",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "Your Hyperengage workspace identifier located in the Integration Settings page.",
      "key": "workspaceIdentifier",
      "label": "Workspace Identifier",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "The name of the event",
          "key": "event_name",
          "label": "Event name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The user id, to uniquely identify the user associated with the event",
          "key": "user_id",
          "label": "User id",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$group_0}",
          "description": "The account id, to uniquely identify the account associated with the user",
          "key": "account_id",
          "label": "Account id",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "The properties of the track call",
          "key": "properties",
          "label": "Event properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "User Anonymous id",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The ID of the event.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$pathname}",
          "description": "The path of the document.",
          "key": "doc_path",
          "label": "Document Path",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The search query of the document.",
          "key": "doc_search",
          "label": "Document Search",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.title}",
          "description": "The title of the page where the event occurred.",
          "key": "doc_title",
          "label": "Page Title",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "The URL of the page where the event occurred.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "The referrer of the page where the event occurred.",
          "key": "referer",
          "label": "Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the browser.",
          "key": "user_agent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language of the browser.",
          "key": "user_language",
          "label": "User Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The time of the event in UTC.",
          "key": "utc_time",
          "label": "UTC Time",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "content": "{event.properties.utm_content}",
            "medium": "{event.properties.utm_medium}",
            "name": "{event.properties.utm_campaign}",
            "source": "{event.properties.utm_source}",
            "term": "{event.properties.utm_term}",
          },
          "description": "Information about the UTM parameters.",
          "key": "utm",
          "label": "UTM",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "density": "",
            "height": "{event.context.screen.height}",
            "width": "{event.context.screen.width}",
          },
          "description": "Information about the screen.",
          "key": "screen",
          "label": "Screen",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$timezone ?? event.properties.timezone}",
          "description": "The timezone of the browser.",
          "key": "timezone",
          "label": "Timezone",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "source_ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "track",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Event",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "The External ID of the user",
          "key": "user_id",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.name ?? event.properties.name}",
          "description": "The user's name",
          "key": "name",
          "label": "Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.first_name ?? event.properties.first_name}",
          "description": "The user's first name. This field is mandatory if you're not providing a name field",
          "key": "first_name",
          "label": "First name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.last_name ?? event.properties.last_name}",
          "description": "The user's last name. This field is mandatory if you're not providing a name field",
          "key": "last_name",
          "label": "Last name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email ?? event.properties.email}",
          "description": "The user's email address",
          "key": "email",
          "label": "Email address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$group_0}",
          "description": "The account id, to uniquely identify the account associated with the user",
          "key": "account_id",
          "label": "Account id",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.created_at ?? person.properties.createdAt}",
          "description": "The timestamp when the user was created, represented in the ISO-8601 date format. For instance, "2023-09-26T15:30:00Z".",
          "key": "created_at",
          "label": "Created at",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Properties to associate with the user",
          "key": "traits",
          "label": "Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "User Anonymous id",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The ID of the event.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$pathname}",
          "description": "The path of the document.",
          "key": "doc_path",
          "label": "Document Path",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The search query of the document.",
          "key": "doc_search",
          "label": "Document Search",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.title}",
          "description": "The title of the page where the event occurred.",
          "key": "doc_title",
          "label": "Page Title",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "The URL of the page where the event occurred.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "The referrer of the page where the event occurred.",
          "key": "referer",
          "label": "Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the browser.",
          "key": "user_agent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language of the browser.",
          "key": "user_language",
          "label": "User Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The time of the event in UTC.",
          "key": "utc_time",
          "label": "UTC Time",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "content": "{event.properties.utm_content}",
            "medium": "{event.properties.utm_medium}",
            "name": "{event.properties.utm_campaign}",
            "source": "{event.properties.utm_source}",
            "term": "{event.properties.utm_term}",
          },
          "description": "Information about the UTM parameters.",
          "key": "utm",
          "label": "UTM",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "density": "",
            "height": "{event.context.screen.height}",
            "width": "{event.context.screen.width}",
          },
          "description": "Information about the screen.",
          "key": "screen",
          "label": "Screen",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$timezone ?? event.properties.timezone}",
          "description": "The timezone of the browser.",
          "key": "timezone",
          "label": "Timezone",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "source_ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "identify",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify User",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$groupidentify'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.properties.$group_0}",
          "description": "The External ID of the account to send properties for",
          "key": "account_id",
          "label": "Account id",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.name ?? event.properties.name}",
          "description": "The Account name",
          "key": "name",
          "label": "Account name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.created_at ?? person.properties.createdAt}",
          "description": "The timestamp when the account was created, represented in the ISO-8601 date format. For instance, "2023-09-26T15:30:00Z".",
          "key": "created_at",
          "label": "Account created at",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "The properties of the account",
          "key": "traits",
          "label": "Account properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.properties.plan ?? person.properties.plan_name}",
          "description": "Subscription plan the account is associated with",
          "key": "plan",
          "label": "Account subscription plan",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.industry}",
          "description": "The account industry",
          "key": "industry",
          "label": "Account industry",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.website}",
          "description": "The account website",
          "key": "website",
          "label": "Account website",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "User Anonymous id",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The ID of the event.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$pathname}",
          "description": "The path of the document.",
          "key": "doc_path",
          "label": "Document Path",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The search query of the document.",
          "key": "doc_search",
          "label": "Document Search",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.title}",
          "description": "The title of the page where the event occurred.",
          "key": "doc_title",
          "label": "Page Title",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "The URL of the page where the event occurred.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "The referrer of the page where the event occurred.",
          "key": "referer",
          "label": "Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the browser.",
          "key": "user_agent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language of the browser.",
          "key": "user_language",
          "label": "User Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The time of the event in UTC.",
          "key": "utc_time",
          "label": "UTC Time",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "content": "{event.properties.utm_content}",
            "medium": "{event.properties.utm_medium}",
            "name": "{event.properties.utm_campaign}",
            "source": "{event.properties.utm_source}",
            "term": "{event.properties.utm_term}",
          },
          "description": "Information about the UTM parameters.",
          "key": "utm",
          "label": "UTM",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "density": "",
            "height": "{event.context.screen.height}",
            "width": "{event.context.screen.width}",
          },
          "description": "Information about the screen.",
          "key": "screen",
          "label": "Screen",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$timezone ?? event.properties.timezone}",
          "description": "The timezone of the browser.",
          "key": "timezone",
          "label": "Timezone",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "source_ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "group",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Group",
    },
  ],
  "name": "Hyperengage",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-insider-cloud matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Insider Cloud Mode",
  "free": false,
  "icon_url": "/static/services/insider.com.png",
  "id": "segment-actions-insider-cloud",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "You can get your Account Name via Insider Inone Panel > Settings > Inone Settings > Account Preferences.",
      "key": "account_name",
      "label": "Account Name",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "You can get your API Key via Insider Inone Panel > Settings > Preferences > Integration Settings",
      "key": "ucd_key",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": true,
          "description": "If true, Email will be sent as identifier to Insider.",
          "key": "email_as_identifier",
          "label": "Treat Email as Identifier",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": true,
          "description": "If true, Phone Number will be sent as identifier to Insider",
          "key": "phone_number_as_identifier",
          "label": "Treat Phone Number as Identifier",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": false,
          "description": "If enabled, new data for array fields will be appended to the existing values in Insider.",
          "key": "append_arrays",
          "label": "Append Array Fields",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "{person.properties.age}",
          "description": "Age of a user.",
          "key": "age",
          "label": "Age",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.birthday}",
          "description": "User’s birthday",
          "key": "birthday",
          "label": "Birthday",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email}",
          "description": "Email address of a user.",
          "key": "email",
          "label": "Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.first_name}",
          "description": "First name of a user.",
          "key": "firstName",
          "label": "First Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.gender}",
          "description": "Gender of a user.",
          "key": "gender",
          "label": "Gender",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.last_name}",
          "description": "Last name of a user.",
          "key": "lastName",
          "label": "Last Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.phone}",
          "description": "User's phone number in E.164 format (e.g. +6598765432), can be used as an identifier.",
          "key": "phone",
          "label": "Phone Number",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "User's unique identifier. The UUID string is used as identifier when sending data to Insider. UUID is required if the Anonymous Id field is empty.",
          "key": "uuid",
          "label": "UUID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "An Anonymous Identifier. The Anonymous Id string is used as identifier when sending data to Insider. Anonymous Id is required if the UUID field is empty.",
          "key": "segment_anonymous_id",
          "label": "Anonymous Id",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "You can select you custom identifiers for the event.",
          "key": "custom_identifiers",
          "label": "Custom Identifiers",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.properties.address.city}",
          "description": "City",
          "key": "city",
          "label": "City",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.address.country}",
          "description": "Country",
          "key": "country",
          "label": "Country",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "GDPR opt-in.",
          "key": "gdprOptin",
          "label": "GDPR Opt-in",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": undefined,
          "description": "Email opt-in.",
          "key": "emailOptin",
          "label": "Email Opt-in",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": undefined,
          "description": "SMS opt-in.",
          "key": "smsOptin",
          "label": "SMS Opt-in",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": undefined,
          "description": "Whatsapp opt-in.",
          "key": "whatsappOptin",
          "label": "Whatsapp Opt-in",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": undefined,
          "description": "The user's preferred language.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "The user's additional information.",
          "key": "custom",
          "label": "Other Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "updateUserProfile",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Create or Update a User Profile",
    },
  ],
  "name": "Insider Cloud Mode",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-iterable matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Iterable",
  "free": false,
  "icon_url": "/static/services/iterable.com.png",
  "id": "segment-actions-iterable",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "To obtain the API Key, go to the Iterable app and naviate to Integrations > API Keys. Create a new API Key with the 'Server-Side' type.",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "choices": [
        {
          "label": "United States",
          "value": "united_states",
        },
        {
          "label": "Europe",
          "value": "europe",
        },
      ],
      "default": "united_states",
      "description": "The location where your Iterable data is hosted.",
      "key": "dataCenterLocation",
      "label": "Data Center Location",
      "required": false,
      "secret": false,
      "type": "choice",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event != 'Order Completed' and event != 'Cart Updated'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.properties.email ?? person.properties.email}",
          "description": "An email address that identifies a user profile in Iterable.",
          "key": "email",
          "label": "Email Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "A user ID that identifies a user profile in Iterable.",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "Name of the event",
          "key": "eventName",
          "label": "Event name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Additional event properties.",
          "key": "dataFields",
          "label": "Event Data Fields",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.uuid}",
          "description": "A unique ID. If an event exists with that id, the event will be updated",
          "key": "id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Time the event took place.",
          "key": "createdAt",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.campaignId}",
          "description": "Iterable campaign the event can be attributed to.",
          "key": "campaignId",
          "label": "Campaign ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.templateId}",
          "description": "Iterable template the event can be attributed to.",
          "key": "templateId",
          "label": "Template ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.properties.email}",
          "description": "An email address that identifies a user profile in Iterable.",
          "key": "email",
          "label": "Email Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "A user ID that identifies a user profile in Iterable.",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Data to store on the user profile.",
          "key": "dataFields",
          "label": "User Data Fields",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.properties.phone}",
          "description": "User phone number. Must be a valid phone number including country code. e.g. +14158675309",
          "key": "phoneNumber",
          "label": "User Phone Number",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "If you'd like to merge (rather than overwrite) a user profile's top-level objects with the values provided for them in the request body, set mergeNestedObjects to true.",
          "key": "mergeNestedObjects",
          "label": "Merge Nested Objects",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "updateUser",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Cart Updated'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {
            "dataFields": "{person.properties}",
            "email": "{event.properties.email ?? person.properties.email}",
            "mergeNestedObjects": false,
            "phoneNumber": "{person.properties.phone}",
            "userId": "{person.id}",
          },
          "description": "Updates user data or adds a user if none exists",
          "key": "user",
          "label": "User Data",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "Individual items in the cart. Each item must contain \`id\`, \`name\`, \`price\`, and \`quantity\`. Extra values are added to dataFields.",
          "key": "items",
          "label": "Cart items",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "updateCart",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Update Cart Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Order Completed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.properties.order_id}",
          "description": "Similar to \`Event ID\` in custom events. Iterable recommends mapping \`order_id\` or \`messageId\`. If a purchase exists with that id, the purchase will be updated. If none is specified, a new id will automatically be generated by Iterable",
          "key": "id",
          "label": "Order ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "dataFields": "{person.properties}",
            "email": "{event.properties.email ?? person.properties.email}",
            "mergeNestedObjects": false,
            "phoneNumber": "{person.properties.phone}",
            "userId": "{person.id}",
          },
          "description": "Updates user data or adds a user if none exists",
          "key": "user",
          "label": "User Data",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Additional event properties.",
          "key": "dataFields",
          "label": "Event Data Fields",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "Individual items in the cart. Each item must contain \`id\`, \`name\`, \`price\`, and \`quantity\`. Extra values are added to dataFields.",
          "key": "items",
          "label": "Cart items",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.total}",
          "description": "Total order amount.",
          "key": "total",
          "label": "Total",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Time the event took place.",
          "key": "createdAt",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.campaignId}",
          "description": "Iterable campaign the event can be attributed to.",
          "key": "campaignId",
          "label": "Campaign ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.templateId}",
          "description": "Iterable template the event can be attributed to.",
          "key": "templateId",
          "label": "Template ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "trackPurchase",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Order Completed Calls",
    },
  ],
  "name": "Iterable",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-kameleoon matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Kameleoon",
  "free": false,
  "icon_url": "/static/services/kameleoon.com.png",
  "id": "segment-actions-kameleoon",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Kameleoon API key. You can generate one using the link in the help doc (https://help.kameleoon.com/setting-up-segment/).",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "Kameleoon project sitecode. You can find this project dashboard (https://help.kameleoon.com/question/how-do-i-find-my-site-id/).",
      "key": "sitecode",
      "label": "Sitecode",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "Anonymous id",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event ?? event.event}",
          "description": "The event name",
          "key": "event",
          "label": "Event Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of the event",
          "key": "type",
          "label": "Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Additional event Properties or user Traits to send with the event",
          "key": "properties",
          "label": "Event properties or user traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.kameleoonVisitorCode ?? person.properties.kameleoonVisitorCode}",
          "description": "Kameleoon Visitor Code - a unique identifier for the user",
          "key": "kameleoonVisitorCode",
          "label": "Kameleoon Visitor Code",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "Context properties to send with the event",
          "key": "context",
          "label": "Context properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "messageId",
          "label": "MessageId",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "logEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "Anonymous id",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of the event",
          "key": "type",
          "label": "Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Page properties",
          "key": "properties",
          "label": "Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.kameleoonVisitorCode}",
          "description": "Kameleoon Visitor Code - a unique identifier for the user",
          "key": "kameleoonVisitorCode",
          "label": "Kameleoon Visitor Code",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "The name of the page",
          "key": "name",
          "label": "Page Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "Context properties to send with the event",
          "key": "context",
          "label": "Context properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "messageId",
          "label": "MessageId",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "page",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Page Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$groupidentify'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "Anonymous id",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of the event",
          "key": "type",
          "label": "Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$group_0}",
          "description": "The group id",
          "key": "groupId",
          "label": "Group ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Traits to send with the event",
          "key": "properties",
          "label": "User Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.properties.kameleoonVisitorCode}",
          "description": "Kameleoon Visitor Code - a unique identifier for the user",
          "key": "kameleoonVisitorCode",
          "label": "Kameleoon Visitor Code",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "messageId",
          "label": "MessageId",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "group",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Group Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "Anonymous id",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of the event",
          "key": "type",
          "label": "Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Traits to send with the event",
          "key": "properties",
          "label": "User Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.properties.kameleoonVisitorCode}",
          "description": "Kameleoon Visitor Code - a unique identifier for the user",
          "key": "kameleoonVisitorCode",
          "label": "Kameleoon Visitor Code",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "messageId",
          "label": "MessageId",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "identify",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify Calls",
    },
  ],
  "name": "Kameleoon",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-koala-cloud matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Koala (Cloud)",
  "free": false,
  "icon_url": "/static/services/getkoala.com.png",
  "id": "segment-actions-koala-cloud",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Your public key",
      "key": "public_key",
      "label": "Public Key",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.properties.email ?? event.email}",
          "description": "The email to associate with the user",
          "key": "email",
          "label": "Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "The event name",
          "key": "event",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Properties to send with the event",
          "key": "properties",
          "label": "Event properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "sent_at",
          "label": "Sent At",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "Context properties to send with the event",
          "key": "context",
          "label": "Context properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Traits inherited from the context object",
          "key": "traits",
          "label": "Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The device IP collected from the context",
          "key": "device_ip",
          "label": "Device IP",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "message_id",
          "label": "MessageId",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "track",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.properties.email ?? event.email}",
          "description": "The email to associate with the user",
          "key": "email",
          "label": "Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Traits to associate with the user",
          "key": "traits",
          "label": "Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "sent_at",
          "label": "Sent At",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "Context properties to send with the event",
          "key": "context",
          "label": "Context properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The device IP collected from the context",
          "key": "device_ip",
          "label": "Device IP",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "message_id",
          "label": "MessageId",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "identify",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify Calls",
    },
  ],
  "name": "Koala (Cloud)",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-launchdarkly matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to LaunchDarkly",
  "free": false,
  "icon_url": "/static/services/launchdarkly.com.png",
  "id": "segment-actions-launchdarkly",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Find and copy the client-side ID in the LaunchDarkly account settings page.",
      "key": "client_id",
      "label": "LaunchDarkly client-side ID",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": "events.launchdarkly.com",
      "description": "Your LaunchDarkly events host name. If not specified, the default value of events.launchdarkly.com will be used. Most customers will not need to change this setting.",
      "key": "events_host_name",
      "label": "LaunchDarkly events host name",
      "required": false,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "user",
          "description": "The event's context kind. If not specified, the context kind will default to \`user\`. To learn more about context kinds and where you can find a list of context kinds LaunchDarkly has observed, read [Context kinds](https://docs.launchdarkly.com/home/contexts/context-kinds).",
          "key": "context_kind",
          "label": "Context Kind",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The unique LaunchDarkly context key. In most cases the Segment \`userId\` should be used.",
          "key": "user_key",
          "label": "Context Key",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "A mapping of additional context kinds to context keys. To learn more, read [Contexts and segments](https://docs.launchdarkly.com/home/contexts).",
          "key": "additional_context_keys",
          "label": "Additional Context Keys",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.event}",
          "description": "The name of the event to track. This name typically corresponds to a LaunchDarkly metric with the same key.",
          "key": "event_name",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.revenue ?? event.properties.value}",
          "description": "The numeric value associated with the event. This value is used by the LaunchDarkly experimentation feature in numeric custom metrics, and will also be returned as part of the custom event for Data Export.",
          "key": "metric_value",
          "label": "Metric Value",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Optional object containing the properties for the event being tracked. These properties assist with observational analytics for LaunchDarkly Data Export destinations. These properties are not saved to the LaunchDarkly user.",
          "key": "event_properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The time when the event happened. Defaults to the current time.",
          "key": "timestamp",
          "label": "Event timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Event",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set') or event = '$alias'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "The user's unique key.",
          "key": "user_key",
          "label": "User key",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.previousId ?? event.distinct_id}",
          "description": "The user's unauthenticated identifier.",
          "key": "previous_key",
          "label": "Anonymous ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The time when the event happened. Defaults to the current time.",
          "key": "timestamp",
          "label": "Event Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "aliasUser",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Alias User",
    },
  ],
  "name": "LaunchDarkly",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-launchpad matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Launchpad",
  "free": false,
  "icon_url": "/static/services/launchpad.com.png",
  "id": "segment-actions-launchpad",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Launchpad project secret. You can find that in the settings in your Launchpad.pm account.",
      "key": "apiSecret",
      "label": "Secret Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "choices": [
        {
          "label": "US 🇺🇸",
          "value": "US 🇺🇸",
        },
        {
          "label": "EU 🇪🇺",
          "value": "EU 🇪🇺",
        },
      ],
      "default": "US 🇺🇸",
      "description": "Learn about [EU data residency](https://help.launchpad.pm).",
      "key": "apiRegion",
      "label": "Data Residency",
      "required": false,
      "secret": false,
      "type": "choice",
    },
    {
      "default": undefined,
      "description": "This value, if it's not blank, will be sent as segment_source_name to Launchpad for every event/page/screen call.",
      "key": "sourceName",
      "label": "Source Name",
      "required": false,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event != 'Order Completed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "The name of the action being performed.",
          "key": "event",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "A unique ID for a known user. This will be used as the Distinct ID. This field is required if the Anonymous ID field is empty",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "A unique ID for an anonymous user. This will be used as the Distinct ID if the User ID field is empty. This field is required if the User ID field is empty",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The unique identifier of the group that performed this event.",
          "key": "groupId",
          "label": "Group ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "A random id that is unique to an event. Launchpad uses $insert_id to deduplicate events.",
          "key": "messageId",
          "label": "Insert ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event. Launchpad expects epoch timestamp in millisecond or second. Please note, Launchpad only accepts this field as the timestamp. If the field is empty, it will be set to the time Launchpad servers receive it.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "An object of key-value pairs that represent additional data to be sent along with the event.",
          "key": "properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "An object of key-value pairs that represent additional data tied to the user. This is used for segmentation within the platform.",
          "key": "traits",
          "label": "User Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "An object of key-value pairs that provides useful context about the event.",
          "key": "context",
          "label": "Event context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "The name of the action being performed.",
          "key": "event",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "A unique ID for a known user. This will be used as the Distinct ID. This field is required if the Anonymous ID field is empty",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "A unique ID for an anonymous user. This will be used as the Distinct ID if the User ID field is empty. This field is required if the User ID field is empty",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The unique identifier of the group that performed this event.",
          "key": "groupId",
          "label": "Group ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "A random id that is unique to an event. Launchpad uses $insert_id to deduplicate events.",
          "key": "messageId",
          "label": "Insert ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event. Launchpad expects epoch timestamp in millisecond or second. Please note, Launchpad only accepts this field as the timestamp. If the field is empty, it will be set to the time Launchpad servers receive it.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "An object of key-value pairs that represent additional data to be sent along with the event.",
          "key": "properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "An object of key-value pairs that represent additional data tied to the user. This is used for segmentation within the platform.",
          "key": "traits",
          "label": "User Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "An object of key-value pairs that provides useful context about the event.",
          "key": "context",
          "label": "Event context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Page Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$screen'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "The name of the action being performed.",
          "key": "event",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "A unique ID for a known user. This will be used as the Distinct ID. This field is required if the Anonymous ID field is empty",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "A unique ID for an anonymous user. This will be used as the Distinct ID if the User ID field is empty. This field is required if the User ID field is empty",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The unique identifier of the group that performed this event.",
          "key": "groupId",
          "label": "Group ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "A random id that is unique to an event. Launchpad uses $insert_id to deduplicate events.",
          "key": "messageId",
          "label": "Insert ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event. Launchpad expects epoch timestamp in millisecond or second. Please note, Launchpad only accepts this field as the timestamp. If the field is empty, it will be set to the time Launchpad servers receive it.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "An object of key-value pairs that represent additional data to be sent along with the event.",
          "key": "properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "An object of key-value pairs that represent additional data tied to the user. This is used for segmentation within the platform.",
          "key": "traits",
          "label": "User Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "An object of key-value pairs that provides useful context about the event.",
          "key": "context",
          "label": "Event context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Screen Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user. This is only used for geolocation and won't be stored.",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "A unique ID for a known user. This will be used as the Distinct ID. This field is required if the Anonymous ID field is empty",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "A unique ID for an anonymous user. This will be used as the Distinct ID if the User ID field is empty. This field is required if the User ID field is empty",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Properties that you want to set on the user profile and you would want to segment by later.",
          "key": "traits",
          "label": "User Properties",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "identifyUser",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$groupidentify'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": undefined,
          "description": "The group key you specified in Launchpad under the company corresponding to the group. If this is not specified, it will be defaulted to "$group_id". This is helpful when you have a group of companies that should be joined together as in when you have a multinational.",
          "key": "groupKey",
          "label": "Group Key",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$group_0}",
          "description": "The unique identifier of the group. If there is a trait that matches the group key, it will override this value.",
          "key": "groupId",
          "label": "Group ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "The properties to set on the group profile.",
          "key": "traits",
          "label": "Group Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.id}",
          "description": "A unique ID for a known user. This will be used as the Distinct ID. This field is required if the Anonymous ID field is empty",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "A unique ID for an anonymous user. This will be used as the Distinct ID if the User ID field is empty. This field is required if the User ID field is empty",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "groupIdentifyUser",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Group Calls",
    },
  ],
  "name": "Launchpad",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-livelike-cloud matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to LiveLike",
  "free": false,
  "icon_url": "/static/services/livelike.com.png",
  "id": "segment-actions-livelike-cloud",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Your LiveLike Application Client ID.",
      "key": "clientId",
      "label": "Client ID",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "Your LiveLike Producer token.",
      "key": "producerToken",
      "label": "Producer Token",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "The name of the event being performed. For example, \`User Registration\` could be an event_name referring the event that is being sent to LiveLike.",
          "key": "event_name",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of event (track/screen/page)",
          "key": "event_type",
          "label": "Event Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "A unique identifier for a user.",
          "key": "segment_user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.livelike_profile_id}",
          "description": "The unique LiveLike user identifier.",
          "key": "livelike_profile_id",
          "label": "LiveLike User Profile ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Segment Anonymous ID.",
          "key": "anonymous_id",
          "label": "Segment Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.custom_id}",
          "description": "In case you are not able to store \`livelike_profile_id\`, LiveLike provides a way to create your own access tokens which helps us to map your user_id to a unique \`livelike_profile_id\`. Please refer [LiveLike Docs](https://docs.livelike.com/docs/client-generated-access-tokens) for more info.",
          "key": "custom_id",
          "label": "Custom ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The date and time when the event occurred in ISO 8601 format. Defaults to current time if not provided. For example, \`2019-09-30T15:59:44.933696Z\`.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Properties of the event.",
          "key": "properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track User Actions",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event ?? event.properties.title}",
          "description": "The name of the event being performed. For example, \`User Registration\` could be an event_name referring the event that is being sent to LiveLike.",
          "key": "event_name",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of event (track/screen/page)",
          "key": "event_type",
          "label": "Event Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "A unique identifier for a user.",
          "key": "segment_user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.livelike_profile_id}",
          "description": "The unique LiveLike user identifier.",
          "key": "livelike_profile_id",
          "label": "LiveLike User Profile ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Segment Anonymous ID.",
          "key": "anonymous_id",
          "label": "Segment Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.custom_id}",
          "description": "In case you are not able to store \`livelike_profile_id\`, LiveLike provides a way to create your own access tokens which helps us to map your user_id to a unique \`livelike_profile_id\`. Please refer [LiveLike Docs](https://docs.livelike.com/docs/client-generated-access-tokens) for more info.",
          "key": "custom_id",
          "label": "Custom ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The date and time when the event occurred in ISO 8601 format. Defaults to current time if not provided. For example, \`2019-09-30T15:59:44.933696Z\`.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Properties of the event.",
          "key": "properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Page Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$screen'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event ?? event.properties.title}",
          "description": "The name of the event being performed. For example, \`User Registration\` could be an event_name referring the event that is being sent to LiveLike.",
          "key": "event_name",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of event (track/screen/page)",
          "key": "event_type",
          "label": "Event Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "A unique identifier for a user.",
          "key": "segment_user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.livelike_profile_id}",
          "description": "The unique LiveLike user identifier.",
          "key": "livelike_profile_id",
          "label": "LiveLike User Profile ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Segment Anonymous ID.",
          "key": "anonymous_id",
          "label": "Segment Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.custom_id}",
          "description": "In case you are not able to store \`livelike_profile_id\`, LiveLike provides a way to create your own access tokens which helps us to map your user_id to a unique \`livelike_profile_id\`. Please refer [LiveLike Docs](https://docs.livelike.com/docs/client-generated-access-tokens) for more info.",
          "key": "custom_id",
          "label": "Custom ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The date and time when the event occurred in ISO 8601 format. Defaults to current time if not provided. For example, \`2019-09-30T15:59:44.933696Z\`.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Properties of the event.",
          "key": "properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Screen Calls",
    },
  ],
  "name": "LiveLike",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-m3ter matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to m3ter",
  "free": false,
  "icon_url": "/static/services/m3ter.com.png",
  "id": "segment-actions-m3ter",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Your service user Access Key Id. You can generate the service user and its Access Key Id in your m3ter console under "Settings" -> "Access" -> "Service Users" -> "Create Service User". Step by step guide can be found in [m3ter Docs](https://www.m3ter.com/docs/guides/authenticating-with-the-platform/service-authentication#generating-an-api-key-and-secret-for-a-service-user)",
      "key": "access_key_id",
      "label": "m3ter Access Key Id",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "Your service user Api Secret. You can generate the service user and its Api Secret in your m3ter console under "Settings" -> "Access" -> "Service Users" -> "Create Service User". Step by step guide can be found in [m3ter Docs](https://www.m3ter.com/docs/guides/authenticating-with-the-platform/service-authentication#generating-an-api-key-and-secret-for-a-service-user)",
      "key": "api_secret",
      "label": "m3ter Api Secret",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "ID of your organization where your data will be submitted to",
      "key": "org_id",
      "label": "m3ter Organization Id",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.properties.uid}",
          "description": "Unique ID for this measurement",
          "key": "uid",
          "label": "m3ter UUID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.meter}",
          "description": "Short code identifying the Meter the measurement is for",
          "key": "meter",
          "label": "Meter",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.account}",
          "description": "Code of the Account the measurement is for",
          "key": "account",
          "label": "Account",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Timestamp for the measurement",
          "key": "ts",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "End timestamp for the measurement. Can be used in the case a usage event needs to have an explicit start and end rather than being instantaneous",
          "key": "ets",
          "label": "End timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Non-numeric who values for data measurements, such as: who logged-in to the service; who was contacted by the service",
          "key": "who",
          "label": "Who",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Non-numeric where values for data measurements such as: where someone logged into your service from",
          "key": "where",
          "label": "Where",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Non-numeric what values for data measurements such as: what level of user logged into the service",
          "key": "what",
          "label": "What",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Non-numeric other values for measurements such as textual data which is not applicable to Who, What, or Where events",
          "key": "other",
          "label": "Other",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Non-numeric metadata values for measurements using high-cardinality fields that you don't intend to segment when you aggregate the data",
          "key": "metadata",
          "label": "Metadata",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Numeric measure values for general quantitative measurements.",
          "key": "measure",
          "label": "Measure",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Numeric cost values for measurements associated with costs",
          "key": "cost",
          "label": "Cost",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {},
          "description": "Numeric income values for measurements associated with income",
          "key": "income",
          "label": "Income",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "submitMeasurements",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Submit usage data to m3ter",
    },
  ],
  "name": "m3ter",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-mixpanel matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Mixpanel",
  "free": false,
  "icon_url": "/static/services/mixpanel.com.png",
  "id": "segment-actions-mixpanel",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Mixpanel project token.",
      "key": "projectToken",
      "label": "Project Token",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "Mixpanel project secret.",
      "key": "apiSecret",
      "label": "Secret Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "choices": [
        {
          "label": "US 🇺🇸",
          "value": "US 🇺🇸",
        },
        {
          "label": "EU 🇪🇺",
          "value": "EU 🇪🇺",
        },
        {
          "label": "IN 🇮🇳",
          "value": "IN 🇮🇳",
        },
      ],
      "default": "US 🇺🇸",
      "description": "Learn about [EU data residency](https://docs.mixpanel.com/docs/privacy/eu-residency) and [India data residency](https://docs.mixpanel.com/docs/privacy/in-residency)",
      "key": "apiRegion",
      "label": "Data Residency",
      "required": false,
      "secret": false,
      "type": "choice",
    },
    {
      "default": undefined,
      "description": "This value, if it's not blank, will be sent as segment_source_name to Mixpanel for every event/page/screen call.",
      "key": "sourceName",
      "label": "Source Name",
      "required": false,
      "secret": false,
      "type": "string",
    },
    {
      "choices": [
        {
          "label": "1",
          "value": "1",
        },
        {
          "label": "0",
          "value": "0",
        },
      ],
      "default": "1",
      "description": "This value, if it's 1 (recommended), Mixpanel will validate the events you are trying to send and return errors per event that failed. Learn more about the Mixpanel [Import Events API](https://developer.mixpanel.com/reference/import-events)",
      "key": "strictMode",
      "label": "Strict Mode",
      "required": false,
      "secret": false,
      "type": "choice",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event != 'Order Completed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "The name of the action being performed.",
          "key": "event",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "A distinct ID specified by you.",
          "key": "distinct_id",
          "label": "Distinct ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "A distinct ID randomly generated prior to calling identify.",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The distinct ID after calling identify.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The unique identifier of the group that performed this event.",
          "key": "group_id",
          "label": "Group ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "A random id that is unique to an event. Mixpanel uses $insert_id to deduplicate events.",
          "key": "insert_id",
          "label": "Insert ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event. Mixpanel expects epoch timestamp in millisecond or second. Please note, Mixpanel only accepts this field as the timestamp. If the field is empty, it will be set to the time Mixpanel servers receive it.",
          "key": "time",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_name}",
          "description": "The name of your application.",
          "key": "app_name",
          "label": "App Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_namespace}",
          "description": "The namespace of your application.",
          "key": "app_namespace",
          "label": "App Namespace",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_build}",
          "description": "The current build of your application.",
          "key": "app_build",
          "label": "App Build",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "The current version of your application.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os}",
          "description": "The name of the mobile operating system or browser that the user is using.",
          "key": "os_name",
          "label": "OS Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "The version of the mobile operating system or browser the user is using.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_id}",
          "description": "A unique identifier for the device the user is using.",
          "key": "device_id",
          "label": "Device ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "The type of the user's device.",
          "key": "device_type",
          "label": "Device Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_name}",
          "description": "The name of the user's device.",
          "key": "device_name",
          "label": "Device Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_manufacturer}",
          "description": "The device manufacturer that the user is using.",
          "key": "device_manufacturer",
          "label": "Device Manufacturer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "The device model that the user is using.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Whether bluetooth is enabled.",
          "key": "bluetooth",
          "label": "Bluetooth Enabled",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "",
          "description": "The carrier that the user is using.",
          "key": "carrier",
          "label": "Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Whether cellular is enabled.",
          "key": "cellular",
          "label": "Cellular Enabled",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "",
          "description": "Set to true if user’s device has an active, available Wifi connection, false if not.",
          "key": "wifi",
          "label": "Wifi",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "{event.properties.$geoip_country_name}",
          "description": "The current country of the user.",
          "key": "country",
          "label": "Country",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The current region of the user.",
          "key": "region",
          "label": "Region",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language set by the user.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$lib}",
          "description": "The name of the SDK used to send events.",
          "key": "library_name",
          "label": "Library Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$lib_version}",
          "description": "The version of the SDK used to send events.",
          "key": "library_version",
          "label": "Library Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user. This is only used for geolocation and won't be stored.",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_idfa}",
          "description": "Identifier for Advertiser. _(iOS)_",
          "key": "idfa",
          "label": "Identifier For Advertiser (IDFA)",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "The full URL of the webpage on which the event is triggered.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Width, in pixels, of the device screen.",
          "key": "screen_width",
          "label": "Screen width",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Height, in pixels, of the device screen.",
          "key": "screen_height",
          "label": "Screen height",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Pixel density of the device screen.",
          "key": "screen_density",
          "label": "Screen density",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "Referrer url",
          "key": "referrer",
          "label": "Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "User agent",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Advertising ID",
          "key": "advertising_id",
          "label": "Advertising ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Ad Tracking Enabled (true or false)",
          "key": "ad_tracking_enabled",
          "label": "Ad Tracking Enabled",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$timezone}",
          "description": "The event timezone",
          "key": "timezone",
          "label": "Timezone",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The App Platform, if applicable",
          "key": "app_platform",
          "label": "App Platform",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event ?? event.event}",
          "description": "The Event Original Name, if applicable",
          "key": "name",
          "label": "Event Original Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "An object of key-value pairs that represent additional data to be sent along with the event.",
          "key": "event_properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "An object of key-value pairs that provides useful context about the event.",
          "key": "context",
          "label": "Event context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "utm_campaign": "{event.properties.utm_campaign}",
            "utm_content": "{event.properties.utm_content}",
            "utm_medium": "{event.properties.utm_medium}",
            "utm_source": "{event.properties.utm_source}",
            "utm_term": "{event.properties.utm_term}",
          },
          "description": "UTM Tracking Properties",
          "key": "utm_properties",
          "label": "UTM Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "architecture": "",
            "bitness": "",
            "mobile": "",
            "model": "",
            "platform": "",
            "platformVersion": "",
            "uaFullVersion": "",
            "wow64": "",
          },
          "description": "The user agent data of device sending the event",
          "key": "userAgentData",
          "label": "User Agent Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Order Completed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": true,
          "description": "When enabled, send "Product Purchased" with each product within the event.",
          "key": "generatePurchaseEventPerProduct",
          "label": "Generate Purchase Event Per Product",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "A distinct ID specified by you.",
          "key": "distinct_id",
          "label": "Distinct ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "A distinct ID randomly generated prior to calling identify.",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The distinct ID after calling identify.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The unique identifier of the group that performed this event.",
          "key": "group_id",
          "label": "Group ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "A random id that is unique to an event. Mixpanel uses $insert_id to deduplicate events.",
          "key": "insert_id",
          "label": "Insert ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event. Mixpanel expects epoch timestamp in millisecond or second. Please note, Mixpanel only accepts this field as the timestamp. If the field is empty, it will be set to the time Mixpanel servers receive it.",
          "key": "time",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_name}",
          "description": "The name of your application.",
          "key": "app_name",
          "label": "App Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_namespace}",
          "description": "The namespace of your application.",
          "key": "app_namespace",
          "label": "App Namespace",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_build}",
          "description": "The current build of your application.",
          "key": "app_build",
          "label": "App Build",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "The current version of your application.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os}",
          "description": "The name of the mobile operating system or browser that the user is using.",
          "key": "os_name",
          "label": "OS Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "The version of the mobile operating system or browser the user is using.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_id}",
          "description": "A unique identifier for the device the user is using.",
          "key": "device_id",
          "label": "Device ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "The type of the user's device.",
          "key": "device_type",
          "label": "Device Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_name}",
          "description": "The name of the user's device.",
          "key": "device_name",
          "label": "Device Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_manufacturer}",
          "description": "The device manufacturer that the user is using.",
          "key": "device_manufacturer",
          "label": "Device Manufacturer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "The device model that the user is using.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Whether bluetooth is enabled.",
          "key": "bluetooth",
          "label": "Bluetooth Enabled",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "",
          "description": "The carrier that the user is using.",
          "key": "carrier",
          "label": "Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Whether cellular is enabled.",
          "key": "cellular",
          "label": "Cellular Enabled",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "",
          "description": "Set to true if user’s device has an active, available Wifi connection, false if not.",
          "key": "wifi",
          "label": "Wifi",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "{event.properties.$geoip_country_name}",
          "description": "The current country of the user.",
          "key": "country",
          "label": "Country",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The current region of the user.",
          "key": "region",
          "label": "Region",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language set by the user.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$lib}",
          "description": "The name of the SDK used to send events.",
          "key": "library_name",
          "label": "Library Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$lib_version}",
          "description": "The version of the SDK used to send events.",
          "key": "library_version",
          "label": "Library Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user. This is only used for geolocation and won't be stored.",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_idfa}",
          "description": "Identifier for Advertiser. _(iOS)_",
          "key": "idfa",
          "label": "Identifier For Advertiser (IDFA)",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "The full URL of the webpage on which the event is triggered.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Width, in pixels, of the device screen.",
          "key": "screen_width",
          "label": "Screen width",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Height, in pixels, of the device screen.",
          "key": "screen_height",
          "label": "Screen height",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Pixel density of the device screen.",
          "key": "screen_density",
          "label": "Screen density",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "Referrer url",
          "key": "referrer",
          "label": "Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "User agent",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Advertising ID",
          "key": "advertising_id",
          "label": "Advertising ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Ad Tracking Enabled (true or false)",
          "key": "ad_tracking_enabled",
          "label": "Ad Tracking Enabled",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$timezone}",
          "description": "The event timezone",
          "key": "timezone",
          "label": "Timezone",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The App Platform, if applicable",
          "key": "app_platform",
          "label": "App Platform",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event ?? event.event}",
          "description": "The Event Original Name, if applicable",
          "key": "name",
          "label": "Event Original Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "An object of key-value pairs that represent additional data to be sent along with the event.",
          "key": "event_properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "An object of key-value pairs that provides useful context about the event.",
          "key": "context",
          "label": "Event context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "utm_campaign": "{event.properties.utm_campaign}",
            "utm_content": "{event.properties.utm_content}",
            "utm_medium": "{event.properties.utm_medium}",
            "utm_source": "{event.properties.utm_source}",
            "utm_term": "{event.properties.utm_term}",
          },
          "description": "UTM Tracking Properties",
          "key": "utm_properties",
          "label": "UTM Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "architecture": "",
            "bitness": "",
            "mobile": "",
            "model": "",
            "platform": "",
            "platformVersion": "",
            "uaFullVersion": "",
            "wow64": "",
          },
          "description": "The user agent data of device sending the event",
          "key": "userAgentData",
          "label": "User Agent Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "Products in the order.",
          "key": "products",
          "label": "Products",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "The name of the action being performed.",
          "key": "event",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "trackPurchase",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Order Completed Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "The name of the action being performed.",
          "key": "event",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "A distinct ID specified by you.",
          "key": "distinct_id",
          "label": "Distinct ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "A distinct ID randomly generated prior to calling identify.",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The distinct ID after calling identify.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The unique identifier of the group that performed this event.",
          "key": "group_id",
          "label": "Group ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "A random id that is unique to an event. Mixpanel uses $insert_id to deduplicate events.",
          "key": "insert_id",
          "label": "Insert ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event. Mixpanel expects epoch timestamp in millisecond or second. Please note, Mixpanel only accepts this field as the timestamp. If the field is empty, it will be set to the time Mixpanel servers receive it.",
          "key": "time",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_name}",
          "description": "The name of your application.",
          "key": "app_name",
          "label": "App Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_namespace}",
          "description": "The namespace of your application.",
          "key": "app_namespace",
          "label": "App Namespace",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_build}",
          "description": "The current build of your application.",
          "key": "app_build",
          "label": "App Build",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "The current version of your application.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os}",
          "description": "The name of the mobile operating system or browser that the user is using.",
          "key": "os_name",
          "label": "OS Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "The version of the mobile operating system or browser the user is using.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_id}",
          "description": "A unique identifier for the device the user is using.",
          "key": "device_id",
          "label": "Device ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "The type of the user's device.",
          "key": "device_type",
          "label": "Device Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_name}",
          "description": "The name of the user's device.",
          "key": "device_name",
          "label": "Device Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_manufacturer}",
          "description": "The device manufacturer that the user is using.",
          "key": "device_manufacturer",
          "label": "Device Manufacturer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "The device model that the user is using.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Whether bluetooth is enabled.",
          "key": "bluetooth",
          "label": "Bluetooth Enabled",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "",
          "description": "The carrier that the user is using.",
          "key": "carrier",
          "label": "Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Whether cellular is enabled.",
          "key": "cellular",
          "label": "Cellular Enabled",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "",
          "description": "Set to true if user’s device has an active, available Wifi connection, false if not.",
          "key": "wifi",
          "label": "Wifi",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "{event.properties.$geoip_country_name}",
          "description": "The current country of the user.",
          "key": "country",
          "label": "Country",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The current region of the user.",
          "key": "region",
          "label": "Region",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language set by the user.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$lib}",
          "description": "The name of the SDK used to send events.",
          "key": "library_name",
          "label": "Library Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$lib_version}",
          "description": "The version of the SDK used to send events.",
          "key": "library_version",
          "label": "Library Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user. This is only used for geolocation and won't be stored.",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_idfa}",
          "description": "Identifier for Advertiser. _(iOS)_",
          "key": "idfa",
          "label": "Identifier For Advertiser (IDFA)",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "The full URL of the webpage on which the event is triggered.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Width, in pixels, of the device screen.",
          "key": "screen_width",
          "label": "Screen width",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Height, in pixels, of the device screen.",
          "key": "screen_height",
          "label": "Screen height",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Pixel density of the device screen.",
          "key": "screen_density",
          "label": "Screen density",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "Referrer url",
          "key": "referrer",
          "label": "Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "User agent",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Advertising ID",
          "key": "advertising_id",
          "label": "Advertising ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Ad Tracking Enabled (true or false)",
          "key": "ad_tracking_enabled",
          "label": "Ad Tracking Enabled",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$timezone}",
          "description": "The event timezone",
          "key": "timezone",
          "label": "Timezone",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The App Platform, if applicable",
          "key": "app_platform",
          "label": "App Platform",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event ?? event.event}",
          "description": "The Event Original Name, if applicable",
          "key": "name",
          "label": "Event Original Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "An object of key-value pairs that represent additional data to be sent along with the event.",
          "key": "event_properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "An object of key-value pairs that provides useful context about the event.",
          "key": "context",
          "label": "Event context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "utm_campaign": "{event.properties.utm_campaign}",
            "utm_content": "{event.properties.utm_content}",
            "utm_medium": "{event.properties.utm_medium}",
            "utm_source": "{event.properties.utm_source}",
            "utm_term": "{event.properties.utm_term}",
          },
          "description": "UTM Tracking Properties",
          "key": "utm_properties",
          "label": "UTM Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "architecture": "",
            "bitness": "",
            "mobile": "",
            "model": "",
            "platform": "",
            "platformVersion": "",
            "uaFullVersion": "",
            "wow64": "",
          },
          "description": "The user agent data of device sending the event",
          "key": "userAgentData",
          "label": "User Agent Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Page Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$screen'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "The name of the action being performed.",
          "key": "event",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "A distinct ID specified by you.",
          "key": "distinct_id",
          "label": "Distinct ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "A distinct ID randomly generated prior to calling identify.",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The distinct ID after calling identify.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The unique identifier of the group that performed this event.",
          "key": "group_id",
          "label": "Group ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "A random id that is unique to an event. Mixpanel uses $insert_id to deduplicate events.",
          "key": "insert_id",
          "label": "Insert ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event. Mixpanel expects epoch timestamp in millisecond or second. Please note, Mixpanel only accepts this field as the timestamp. If the field is empty, it will be set to the time Mixpanel servers receive it.",
          "key": "time",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_name}",
          "description": "The name of your application.",
          "key": "app_name",
          "label": "App Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_namespace}",
          "description": "The namespace of your application.",
          "key": "app_namespace",
          "label": "App Namespace",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_build}",
          "description": "The current build of your application.",
          "key": "app_build",
          "label": "App Build",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "The current version of your application.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os}",
          "description": "The name of the mobile operating system or browser that the user is using.",
          "key": "os_name",
          "label": "OS Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "The version of the mobile operating system or browser the user is using.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_id}",
          "description": "A unique identifier for the device the user is using.",
          "key": "device_id",
          "label": "Device ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "The type of the user's device.",
          "key": "device_type",
          "label": "Device Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_name}",
          "description": "The name of the user's device.",
          "key": "device_name",
          "label": "Device Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_manufacturer}",
          "description": "The device manufacturer that the user is using.",
          "key": "device_manufacturer",
          "label": "Device Manufacturer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "The device model that the user is using.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Whether bluetooth is enabled.",
          "key": "bluetooth",
          "label": "Bluetooth Enabled",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "",
          "description": "The carrier that the user is using.",
          "key": "carrier",
          "label": "Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Whether cellular is enabled.",
          "key": "cellular",
          "label": "Cellular Enabled",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "",
          "description": "Set to true if user’s device has an active, available Wifi connection, false if not.",
          "key": "wifi",
          "label": "Wifi",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "{event.properties.$geoip_country_name}",
          "description": "The current country of the user.",
          "key": "country",
          "label": "Country",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The current region of the user.",
          "key": "region",
          "label": "Region",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language set by the user.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$lib}",
          "description": "The name of the SDK used to send events.",
          "key": "library_name",
          "label": "Library Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$lib_version}",
          "description": "The version of the SDK used to send events.",
          "key": "library_version",
          "label": "Library Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user. This is only used for geolocation and won't be stored.",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_idfa}",
          "description": "Identifier for Advertiser. _(iOS)_",
          "key": "idfa",
          "label": "Identifier For Advertiser (IDFA)",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "The full URL of the webpage on which the event is triggered.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Width, in pixels, of the device screen.",
          "key": "screen_width",
          "label": "Screen width",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Height, in pixels, of the device screen.",
          "key": "screen_height",
          "label": "Screen height",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Pixel density of the device screen.",
          "key": "screen_density",
          "label": "Screen density",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "Referrer url",
          "key": "referrer",
          "label": "Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "User agent",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Advertising ID",
          "key": "advertising_id",
          "label": "Advertising ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Ad Tracking Enabled (true or false)",
          "key": "ad_tracking_enabled",
          "label": "Ad Tracking Enabled",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$timezone}",
          "description": "The event timezone",
          "key": "timezone",
          "label": "Timezone",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The App Platform, if applicable",
          "key": "app_platform",
          "label": "App Platform",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event ?? event.event}",
          "description": "The Event Original Name, if applicable",
          "key": "name",
          "label": "Event Original Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "An object of key-value pairs that represent additional data to be sent along with the event.",
          "key": "event_properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "An object of key-value pairs that provides useful context about the event.",
          "key": "context",
          "label": "Event context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "utm_campaign": "{event.properties.utm_campaign}",
            "utm_content": "{event.properties.utm_content}",
            "utm_medium": "{event.properties.utm_medium}",
            "utm_source": "{event.properties.utm_source}",
            "utm_term": "{event.properties.utm_term}",
          },
          "description": "UTM Tracking Properties",
          "key": "utm_properties",
          "label": "UTM Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "architecture": "",
            "bitness": "",
            "mobile": "",
            "model": "",
            "platform": "",
            "platformVersion": "",
            "uaFullVersion": "",
            "wow64": "",
          },
          "description": "The user agent data of device sending the event",
          "key": "userAgentData",
          "label": "User Agent Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Screen Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user. This is only used for geolocation and won't be stored.",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The unique user identifier set by you",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "The generated anonymous ID for the user",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Properties to set on the user profile",
          "key": "traits",
          "label": "User Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "identifyUser",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$groupidentify'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": undefined,
          "description": "The group key you specified in Mixpanel under Project settings. If this is not specified, it will be defaulted to "$group_id".",
          "key": "group_key",
          "label": "Group Key",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$group_0}",
          "description": "The unique identifier of the group. If there is a trait that matches the group key, it will override this value.",
          "key": "group_id",
          "label": "Group ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "The properties to set on the group profile.",
          "key": "traits",
          "label": "Group Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "groupIdentifyUser",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Group Calls",
    },
  ],
  "name": "Mixpanel",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-moloco-rmp matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Moloco MCM",
  "free": false,
  "icon_url": "/static/services/moloco.com.png",
  "id": "segment-actions-moloco-rmp",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "ID of the platform",
      "key": "platformId",
      "label": "Platform ID",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": "",
      "description": "Name of the platform (default to the \`Platform ID\`)",
      "key": "platformName",
      "label": "Platform Name",
      "required": false,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "The API key for the platform",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "choices": [
        {
          "label": "App",
          "value": "APP",
        },
        {
          "label": "Site",
          "value": "SITE",
        },
      ],
      "default": undefined,
      "description": "Type of channel, either APP or SITE. Defaults to SITE.",
      "key": "channel_type",
      "label": "Channel Type",
      "required": true,
      "secret": false,
      "type": "choice",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Products Searched'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Timestamp that the event happened at.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "User Identifier for the platform. The length should not exceed 128 characters.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "advertising_id": "",
            "ip": "{event.properties.$ip}",
            "language": undefined,
            "model": "{event.properties.$device_model}",
            "os": "{event.properties.$os}",
            "os_version": "{event.properties.$os_version}",
            "ua": "{event.properties.$raw_user_agent}",
            "unique_device_id": "{event.properties.$device_id}",
          },
          "description": "Device information of the event",
          "key": "device",
          "label": "Device",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.",
          "key": "session_id",
          "label": "Session ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "UNKNOWN_CURRENCY",
              "value": "UNKNOWN_CURRENCY",
            },
            {
              "label": "USD",
              "value": "USD",
            },
            {
              "label": "KRW",
              "value": "KRW",
            },
            {
              "label": "JPY",
              "value": "JPY",
            },
            {
              "label": "EUR",
              "value": "EUR",
            },
            {
              "label": "GBP",
              "value": "GBP",
            },
            {
              "label": "SEK",
              "value": "SEK",
            },
            {
              "label": "INR",
              "value": "INR",
            },
            {
              "label": "THB",
              "value": "THB",
            },
            {
              "label": "IDR",
              "value": "IDR",
            },
            {
              "label": "CNY",
              "value": "CNY",
            },
            {
              "label": "CAD",
              "value": "CAD",
            },
            {
              "label": "RUB",
              "value": "RUB",
            },
            {
              "label": "BRL",
              "value": "BRL",
            },
            {
              "label": "SGD",
              "value": "SGD",
            },
            {
              "label": "HKD",
              "value": "HKD",
            },
            {
              "label": "AUD",
              "value": "AUD",
            },
            {
              "label": "PLN",
              "value": "PLN",
            },
            {
              "label": "DKK",
              "value": "DKK",
            },
            {
              "label": "VND",
              "value": "VND",
            },
            {
              "label": "MYR",
              "value": "MYR",
            },
            {
              "label": "PHP",
              "value": "PHP",
            },
            {
              "label": "TRY",
              "value": "TRY",
            },
            {
              "label": "VEF",
              "value": "VEF",
            },
          ],
          "default": "USD",
          "description": "The default currency value. Defaults to "USD". If this is set, it will be used as a default currency value for items.",
          "key": "default_currency",
          "label": "Default Currency",
          "required": false,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "{event.properties.products}",
          "description": "Item information list related to the event.",
          "key": "items",
          "label": "Items",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.query}",
          "description": "Query string for the search.",
          "key": "search_query",
          "label": "Search Query",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$pathname}",
          "description": "A string value used to uniquely identify a page. For example: "electronics", "categories/12312", "azd911d" or "/classes/foo/lectures/bar".",
          "key": "page_id",
          "label": "Page ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Tokens that can be used to identify a page. Alternative to page_id with a lower priority.",
          "key": "page_identifier_tokens",
          "label": "Page Identifier Tokens",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "Similar to referrer in HTTP, this value indicates from which page the user came to the current page.",
          "key": "referrer_page_id",
          "label": "Referrer Page ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "search",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Search",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Order Completed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Timestamp that the event happened at.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "User Identifier for the platform. The length should not exceed 128 characters.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "advertising_id": "",
            "ip": "{event.properties.$ip}",
            "language": undefined,
            "model": "{event.properties.$device_model}",
            "os": "{event.properties.$os}",
            "os_version": "{event.properties.$os_version}",
            "ua": "{event.properties.$raw_user_agent}",
            "unique_device_id": "{event.properties.$device_id}",
          },
          "description": "Device information of the event",
          "key": "device",
          "label": "Device",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.",
          "key": "session_id",
          "label": "Session ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "UNKNOWN_CURRENCY",
              "value": "UNKNOWN_CURRENCY",
            },
            {
              "label": "USD",
              "value": "USD",
            },
            {
              "label": "KRW",
              "value": "KRW",
            },
            {
              "label": "JPY",
              "value": "JPY",
            },
            {
              "label": "EUR",
              "value": "EUR",
            },
            {
              "label": "GBP",
              "value": "GBP",
            },
            {
              "label": "SEK",
              "value": "SEK",
            },
            {
              "label": "INR",
              "value": "INR",
            },
            {
              "label": "THB",
              "value": "THB",
            },
            {
              "label": "IDR",
              "value": "IDR",
            },
            {
              "label": "CNY",
              "value": "CNY",
            },
            {
              "label": "CAD",
              "value": "CAD",
            },
            {
              "label": "RUB",
              "value": "RUB",
            },
            {
              "label": "BRL",
              "value": "BRL",
            },
            {
              "label": "SGD",
              "value": "SGD",
            },
            {
              "label": "HKD",
              "value": "HKD",
            },
            {
              "label": "AUD",
              "value": "AUD",
            },
            {
              "label": "PLN",
              "value": "PLN",
            },
            {
              "label": "DKK",
              "value": "DKK",
            },
            {
              "label": "VND",
              "value": "VND",
            },
            {
              "label": "MYR",
              "value": "MYR",
            },
            {
              "label": "PHP",
              "value": "PHP",
            },
            {
              "label": "TRY",
              "value": "TRY",
            },
            {
              "label": "VEF",
              "value": "VEF",
            },
          ],
          "default": "USD",
          "description": "The default currency value. Defaults to "USD". If this is set, it will be used as a default currency value for items.",
          "key": "default_currency",
          "label": "Default Currency",
          "required": false,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "{event.properties.products}",
          "description": "Item information list related to the event.",
          "key": "items",
          "label": "Items",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "currency": "{event.properties.currency}",
            "price": "{event.properties.revenue}",
          },
          "description": "Revenue of the event",
          "key": "revenue",
          "label": "Revenue",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$pathname}",
          "description": "A string value used to uniquely identify a page. For example: "electronics", "categories/12312", "azd911d" or "/classes/foo/lectures/bar".",
          "key": "page_id",
          "label": "Page ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Tokens that can be used to identify a page. Alternative to page_id with a lower priority.",
          "key": "page_identifier_tokens",
          "label": "Page Identifier Tokens",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "currency": undefined,
            "price": undefined,
          },
          "description": "Shipping charge’s monetary amount in a specific currency.",
          "key": "shipping_charge",
          "label": "Shipping Charge",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "purchase",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Purchase",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview' and properties.name != 'Home' and properties.name != 'Land'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Timestamp that the event happened at.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "User Identifier for the platform. The length should not exceed 128 characters.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "advertising_id": "",
            "ip": "{event.properties.$ip}",
            "language": undefined,
            "model": "{event.properties.$device_model}",
            "os": "{event.properties.$os}",
            "os_version": "{event.properties.$os_version}",
            "ua": "{event.properties.$raw_user_agent}",
            "unique_device_id": "{event.properties.$device_id}",
          },
          "description": "Device information of the event",
          "key": "device",
          "label": "Device",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.",
          "key": "session_id",
          "label": "Session ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "UNKNOWN_CURRENCY",
              "value": "UNKNOWN_CURRENCY",
            },
            {
              "label": "USD",
              "value": "USD",
            },
            {
              "label": "KRW",
              "value": "KRW",
            },
            {
              "label": "JPY",
              "value": "JPY",
            },
            {
              "label": "EUR",
              "value": "EUR",
            },
            {
              "label": "GBP",
              "value": "GBP",
            },
            {
              "label": "SEK",
              "value": "SEK",
            },
            {
              "label": "INR",
              "value": "INR",
            },
            {
              "label": "THB",
              "value": "THB",
            },
            {
              "label": "IDR",
              "value": "IDR",
            },
            {
              "label": "CNY",
              "value": "CNY",
            },
            {
              "label": "CAD",
              "value": "CAD",
            },
            {
              "label": "RUB",
              "value": "RUB",
            },
            {
              "label": "BRL",
              "value": "BRL",
            },
            {
              "label": "SGD",
              "value": "SGD",
            },
            {
              "label": "HKD",
              "value": "HKD",
            },
            {
              "label": "AUD",
              "value": "AUD",
            },
            {
              "label": "PLN",
              "value": "PLN",
            },
            {
              "label": "DKK",
              "value": "DKK",
            },
            {
              "label": "VND",
              "value": "VND",
            },
            {
              "label": "MYR",
              "value": "MYR",
            },
            {
              "label": "PHP",
              "value": "PHP",
            },
            {
              "label": "TRY",
              "value": "TRY",
            },
            {
              "label": "VEF",
              "value": "VEF",
            },
          ],
          "default": "USD",
          "description": "The default currency value. Defaults to "USD". If this is set, it will be used as a default currency value for items.",
          "key": "default_currency",
          "label": "Default Currency",
          "required": false,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "{event.properties.products}",
          "description": "Item information list related to the event.",
          "key": "items",
          "label": "Items",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$pathname}",
          "description": "A string value used to uniquely identify a page. For example: "electronics", "categories/12312", "azd911d" or "/classes/foo/lectures/bar". Either page_id or page_identifier_tokens is required.",
          "key": "page_id",
          "label": "Page ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Tokens that can be used to identify a page. Alternative to page_id with a lower priority. Either page_id or page_identifier_tokens is required.",
          "key": "page_identifier_tokens",
          "label": "Page Identifier Tokens",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "Similar to referrer in HTTP, this value indicates from which page the user came to the current page.",
          "key": "referrer_page_id",
          "label": "Referrer Page ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "pageView",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Page View",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview' and properties.name = 'Land'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Timestamp that the event happened at.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "User Identifier for the platform. The length should not exceed 128 characters.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "advertising_id": "",
            "ip": "{event.properties.$ip}",
            "language": undefined,
            "model": "{event.properties.$device_model}",
            "os": "{event.properties.$os}",
            "os_version": "{event.properties.$os_version}",
            "ua": "{event.properties.$raw_user_agent}",
            "unique_device_id": "{event.properties.$device_id}",
          },
          "description": "Device information of the event",
          "key": "device",
          "label": "Device",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.",
          "key": "session_id",
          "label": "Session ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "UNKNOWN_CURRENCY",
              "value": "UNKNOWN_CURRENCY",
            },
            {
              "label": "USD",
              "value": "USD",
            },
            {
              "label": "KRW",
              "value": "KRW",
            },
            {
              "label": "JPY",
              "value": "JPY",
            },
            {
              "label": "EUR",
              "value": "EUR",
            },
            {
              "label": "GBP",
              "value": "GBP",
            },
            {
              "label": "SEK",
              "value": "SEK",
            },
            {
              "label": "INR",
              "value": "INR",
            },
            {
              "label": "THB",
              "value": "THB",
            },
            {
              "label": "IDR",
              "value": "IDR",
            },
            {
              "label": "CNY",
              "value": "CNY",
            },
            {
              "label": "CAD",
              "value": "CAD",
            },
            {
              "label": "RUB",
              "value": "RUB",
            },
            {
              "label": "BRL",
              "value": "BRL",
            },
            {
              "label": "SGD",
              "value": "SGD",
            },
            {
              "label": "HKD",
              "value": "HKD",
            },
            {
              "label": "AUD",
              "value": "AUD",
            },
            {
              "label": "PLN",
              "value": "PLN",
            },
            {
              "label": "DKK",
              "value": "DKK",
            },
            {
              "label": "VND",
              "value": "VND",
            },
            {
              "label": "MYR",
              "value": "MYR",
            },
            {
              "label": "PHP",
              "value": "PHP",
            },
            {
              "label": "TRY",
              "value": "TRY",
            },
            {
              "label": "VEF",
              "value": "VEF",
            },
          ],
          "default": "USD",
          "description": "The default currency value. Defaults to "USD". If this is set, it will be used as a default currency value for items.",
          "key": "default_currency",
          "label": "Default Currency",
          "required": false,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "{event.properties.products}",
          "description": "Item information list related to the event.",
          "key": "items",
          "label": "Items",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$pathname}",
          "description": "A string value used to uniquely identify a page. For example: "electronics", "categories/12312", "azd911d" or "/classes/foo/lectures/bar".",
          "key": "page_id",
          "label": "Page ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Tokens that can be used to identify a page. Alternative to page_id with a lower priority.",
          "key": "page_identifier_tokens",
          "label": "Page Identifier Tokens",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "Similar to referrer in HTTP, this value indicates from which page the user came to the current page.",
          "key": "referrer_page_id",
          "label": "Referrer Page ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "land",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Land",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Product Viewed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Timestamp that the event happened at.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "User Identifier for the platform. The length should not exceed 128 characters.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "advertising_id": "",
            "ip": "{event.properties.$ip}",
            "language": undefined,
            "model": "{event.properties.$device_model}",
            "os": "{event.properties.$os}",
            "os_version": "{event.properties.$os_version}",
            "ua": "{event.properties.$raw_user_agent}",
            "unique_device_id": "{event.properties.$device_id}",
          },
          "description": "Device information of the event",
          "key": "device",
          "label": "Device",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.",
          "key": "session_id",
          "label": "Session ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "UNKNOWN_CURRENCY",
              "value": "UNKNOWN_CURRENCY",
            },
            {
              "label": "USD",
              "value": "USD",
            },
            {
              "label": "KRW",
              "value": "KRW",
            },
            {
              "label": "JPY",
              "value": "JPY",
            },
            {
              "label": "EUR",
              "value": "EUR",
            },
            {
              "label": "GBP",
              "value": "GBP",
            },
            {
              "label": "SEK",
              "value": "SEK",
            },
            {
              "label": "INR",
              "value": "INR",
            },
            {
              "label": "THB",
              "value": "THB",
            },
            {
              "label": "IDR",
              "value": "IDR",
            },
            {
              "label": "CNY",
              "value": "CNY",
            },
            {
              "label": "CAD",
              "value": "CAD",
            },
            {
              "label": "RUB",
              "value": "RUB",
            },
            {
              "label": "BRL",
              "value": "BRL",
            },
            {
              "label": "SGD",
              "value": "SGD",
            },
            {
              "label": "HKD",
              "value": "HKD",
            },
            {
              "label": "AUD",
              "value": "AUD",
            },
            {
              "label": "PLN",
              "value": "PLN",
            },
            {
              "label": "DKK",
              "value": "DKK",
            },
            {
              "label": "VND",
              "value": "VND",
            },
            {
              "label": "MYR",
              "value": "MYR",
            },
            {
              "label": "PHP",
              "value": "PHP",
            },
            {
              "label": "TRY",
              "value": "TRY",
            },
            {
              "label": "VEF",
              "value": "VEF",
            },
          ],
          "default": "USD",
          "description": "The default currency value. Defaults to "USD". If this is set, it will be used as a default currency value for items.",
          "key": "default_currency",
          "label": "Default Currency",
          "required": false,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "{event.properties}",
          "description": "Item information list related to the event.",
          "key": "items",
          "label": "Items",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$pathname}",
          "description": "A string value used to uniquely identify a page. For example: "electronics", "categories/12312", "azd911d" or "/classes/foo/lectures/bar".",
          "key": "page_id",
          "label": "Page ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Tokens that can be used to identify a page. Alternative to page_id with a lower priority.",
          "key": "page_identifier_tokens",
          "label": "Page Identifier Tokens",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "itemPageView",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Item Page View",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview' and properties.name = 'Home'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Timestamp that the event happened at.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "User Identifier for the platform. The length should not exceed 128 characters.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "advertising_id": "",
            "ip": "{event.properties.$ip}",
            "language": undefined,
            "model": "{event.properties.$device_model}",
            "os": "{event.properties.$os}",
            "os_version": "{event.properties.$os_version}",
            "ua": "{event.properties.$raw_user_agent}",
            "unique_device_id": "{event.properties.$device_id}",
          },
          "description": "Device information of the event",
          "key": "device",
          "label": "Device",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.",
          "key": "session_id",
          "label": "Session ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "UNKNOWN_CURRENCY",
              "value": "UNKNOWN_CURRENCY",
            },
            {
              "label": "USD",
              "value": "USD",
            },
            {
              "label": "KRW",
              "value": "KRW",
            },
            {
              "label": "JPY",
              "value": "JPY",
            },
            {
              "label": "EUR",
              "value": "EUR",
            },
            {
              "label": "GBP",
              "value": "GBP",
            },
            {
              "label": "SEK",
              "value": "SEK",
            },
            {
              "label": "INR",
              "value": "INR",
            },
            {
              "label": "THB",
              "value": "THB",
            },
            {
              "label": "IDR",
              "value": "IDR",
            },
            {
              "label": "CNY",
              "value": "CNY",
            },
            {
              "label": "CAD",
              "value": "CAD",
            },
            {
              "label": "RUB",
              "value": "RUB",
            },
            {
              "label": "BRL",
              "value": "BRL",
            },
            {
              "label": "SGD",
              "value": "SGD",
            },
            {
              "label": "HKD",
              "value": "HKD",
            },
            {
              "label": "AUD",
              "value": "AUD",
            },
            {
              "label": "PLN",
              "value": "PLN",
            },
            {
              "label": "DKK",
              "value": "DKK",
            },
            {
              "label": "VND",
              "value": "VND",
            },
            {
              "label": "MYR",
              "value": "MYR",
            },
            {
              "label": "PHP",
              "value": "PHP",
            },
            {
              "label": "TRY",
              "value": "TRY",
            },
            {
              "label": "VEF",
              "value": "VEF",
            },
          ],
          "default": "USD",
          "description": "The default currency value. Defaults to "USD". If this is set, it will be used as a default currency value for items.",
          "key": "default_currency",
          "label": "Default Currency",
          "required": false,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "{event.properties.products}",
          "description": "Item information list related to the event.",
          "key": "items",
          "label": "Items",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$pathname}",
          "description": "A string value used to uniquely identify a page. For example: "electronics", "categories/12312", "azd911d" or "/classes/foo/lectures/bar".",
          "key": "page_id",
          "label": "Page ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Tokens that can be used to identify a page. Alternative to page_id with a lower priority.",
          "key": "page_identifier_tokens",
          "label": "Page Identifier Tokens",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "home",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Home",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Product Added to Wishlist'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Timestamp that the event happened at.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "User Identifier for the platform. The length should not exceed 128 characters.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "advertising_id": "",
            "ip": "{event.properties.$ip}",
            "language": undefined,
            "model": "{event.properties.$device_model}",
            "os": "{event.properties.$os}",
            "os_version": "{event.properties.$os_version}",
            "ua": "{event.properties.$raw_user_agent}",
            "unique_device_id": "{event.properties.$device_id}",
          },
          "description": "Device information of the event",
          "key": "device",
          "label": "Device",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.",
          "key": "session_id",
          "label": "Session ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "UNKNOWN_CURRENCY",
              "value": "UNKNOWN_CURRENCY",
            },
            {
              "label": "USD",
              "value": "USD",
            },
            {
              "label": "KRW",
              "value": "KRW",
            },
            {
              "label": "JPY",
              "value": "JPY",
            },
            {
              "label": "EUR",
              "value": "EUR",
            },
            {
              "label": "GBP",
              "value": "GBP",
            },
            {
              "label": "SEK",
              "value": "SEK",
            },
            {
              "label": "INR",
              "value": "INR",
            },
            {
              "label": "THB",
              "value": "THB",
            },
            {
              "label": "IDR",
              "value": "IDR",
            },
            {
              "label": "CNY",
              "value": "CNY",
            },
            {
              "label": "CAD",
              "value": "CAD",
            },
            {
              "label": "RUB",
              "value": "RUB",
            },
            {
              "label": "BRL",
              "value": "BRL",
            },
            {
              "label": "SGD",
              "value": "SGD",
            },
            {
              "label": "HKD",
              "value": "HKD",
            },
            {
              "label": "AUD",
              "value": "AUD",
            },
            {
              "label": "PLN",
              "value": "PLN",
            },
            {
              "label": "DKK",
              "value": "DKK",
            },
            {
              "label": "VND",
              "value": "VND",
            },
            {
              "label": "MYR",
              "value": "MYR",
            },
            {
              "label": "PHP",
              "value": "PHP",
            },
            {
              "label": "TRY",
              "value": "TRY",
            },
            {
              "label": "VEF",
              "value": "VEF",
            },
          ],
          "default": "USD",
          "description": "The default currency value. Defaults to "USD". If this is set, it will be used as a default currency value for items.",
          "key": "default_currency",
          "label": "Default Currency",
          "required": false,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "{event.properties}",
          "description": "Item information list related to the event.",
          "key": "items",
          "label": "Items",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "currency": "{event.properties.currency}",
            "price": "{event.properties.revenue}",
          },
          "description": "Revenue of the event",
          "key": "revenue",
          "label": "Revenue",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$pathname}",
          "description": "A string value used to uniquely identify a page. For example: "electronics", "categories/12312", "azd911d" or "/classes/foo/lectures/bar".",
          "key": "page_id",
          "label": "Page ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Tokens that can be used to identify a page. Alternative to page_id with a lower priority.",
          "key": "page_identifier_tokens",
          "label": "Page Identifier Tokens",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "addToWishlist",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Add to Wishlist",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Product Added'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Timestamp that the event happened at.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "User Identifier for the platform. The length should not exceed 128 characters.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "advertising_id": "",
            "ip": "{event.properties.$ip}",
            "language": undefined,
            "model": "{event.properties.$device_model}",
            "os": "{event.properties.$os}",
            "os_version": "{event.properties.$os_version}",
            "ua": "{event.properties.$raw_user_agent}",
            "unique_device_id": "{event.properties.$device_id}",
          },
          "description": "Device information of the event",
          "key": "device",
          "label": "Device",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.",
          "key": "session_id",
          "label": "Session ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "UNKNOWN_CURRENCY",
              "value": "UNKNOWN_CURRENCY",
            },
            {
              "label": "USD",
              "value": "USD",
            },
            {
              "label": "KRW",
              "value": "KRW",
            },
            {
              "label": "JPY",
              "value": "JPY",
            },
            {
              "label": "EUR",
              "value": "EUR",
            },
            {
              "label": "GBP",
              "value": "GBP",
            },
            {
              "label": "SEK",
              "value": "SEK",
            },
            {
              "label": "INR",
              "value": "INR",
            },
            {
              "label": "THB",
              "value": "THB",
            },
            {
              "label": "IDR",
              "value": "IDR",
            },
            {
              "label": "CNY",
              "value": "CNY",
            },
            {
              "label": "CAD",
              "value": "CAD",
            },
            {
              "label": "RUB",
              "value": "RUB",
            },
            {
              "label": "BRL",
              "value": "BRL",
            },
            {
              "label": "SGD",
              "value": "SGD",
            },
            {
              "label": "HKD",
              "value": "HKD",
            },
            {
              "label": "AUD",
              "value": "AUD",
            },
            {
              "label": "PLN",
              "value": "PLN",
            },
            {
              "label": "DKK",
              "value": "DKK",
            },
            {
              "label": "VND",
              "value": "VND",
            },
            {
              "label": "MYR",
              "value": "MYR",
            },
            {
              "label": "PHP",
              "value": "PHP",
            },
            {
              "label": "TRY",
              "value": "TRY",
            },
            {
              "label": "VEF",
              "value": "VEF",
            },
          ],
          "default": "USD",
          "description": "The default currency value. Defaults to "USD". If this is set, it will be used as a default currency value for items.",
          "key": "default_currency",
          "label": "Default Currency",
          "required": false,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "{event.properties}",
          "description": "Item information list related to the event.",
          "key": "items",
          "label": "Items",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$pathname}",
          "description": "A string value used to uniquely identify a page. For example: "electronics", "categories/12312", "azd911d" or "/classes/foo/lectures/bar".",
          "key": "page_id",
          "label": "Page ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Tokens that can be used to identify a page. Alternative to page_id with a lower priority.",
          "key": "page_identifier_tokens",
          "label": "Page Identifier Tokens",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "addToCart",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Add to Cart",
    },
  ],
  "name": "Moloco MCM",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-optimizely-data-platform matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Optimizely Data Platform",
  "free": false,
  "icon_url": "/static/services/optimizely.com.png",
  "id": "segment-actions-optimizely-data-platform",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Api Key used for Optimizely API authorization when sending events",
      "key": "apiKey",
      "label": "Api Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "choices": [
        {
          "label": "US",
          "value": "US",
        },
        {
          "label": "Europe",
          "value": "EU",
        },
        {
          "label": "Australia",
          "value": "AU",
        },
      ],
      "default": "US",
      "description": "Optimizely Region to sync data to. Default is US",
      "key": "region",
      "label": "Region",
      "required": true,
      "secret": false,
      "type": "choice",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Product Viewed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "email": "{event.properties.email ?? person.properties.email}",
            "fs_user_id": "{person.id}",
            "optimizely_vuid": "{event.properties.optimizely_vuid ?? person.properties.optimizely_vuid}",
            "userId": "{person.id}",
            "web_user_id": "{person.id}",
          },
          "description": "User identifier details to send to Optimizely. ",
          "key": "user_identifiers",
          "label": "User identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "product",
          "description": "The Optimizely Event Type. Defaults to "custom" if not provided",
          "key": "event_type",
          "label": "Optimizely Event Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "detail",
          "description": "The name of the Optimizely Event Action.",
          "key": "event_action",
          "label": "Optimizely Event Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties}",
          "description": "Product details to associate with the event. Product ID field is required for each product",
          "key": "products",
          "label": "Product details",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.order_id}",
          "description": "Identifier for the order",
          "key": "order_id",
          "label": "Order ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.total}",
          "description": "Total value of the order",
          "key": "total",
          "label": "Order Total",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Event timestamp",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "customEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Product Viewed",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Product Added'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "email": "{event.properties.email ?? person.properties.email}",
            "fs_user_id": "{person.id}",
            "optimizely_vuid": "{event.properties.optimizely_vuid ?? person.properties.optimizely_vuid}",
            "userId": "{person.id}",
            "web_user_id": "{person.id}",
          },
          "description": "User identifier details to send to Optimizely. ",
          "key": "user_identifiers",
          "label": "User identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "product",
          "description": "The Optimizely Event Type. Defaults to "custom" if not provided",
          "key": "event_type",
          "label": "Optimizely Event Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "add_to_cart",
          "description": "The name of the Optimizely Event Action.",
          "key": "event_action",
          "label": "Optimizely Event Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties}",
          "description": "Product details to associate with the event. Product ID field is required for each product",
          "key": "products",
          "label": "Product details",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.order_id}",
          "description": "Identifier for the order",
          "key": "order_id",
          "label": "Order ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.total}",
          "description": "Total value of the order",
          "key": "total",
          "label": "Order Total",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Event timestamp",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "customEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Product Added",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Product Removed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "email": "{event.properties.email ?? person.properties.email}",
            "fs_user_id": "{person.id}",
            "optimizely_vuid": "{event.properties.optimizely_vuid ?? person.properties.optimizely_vuid}",
            "userId": "{person.id}",
            "web_user_id": "{person.id}",
          },
          "description": "User identifier details to send to Optimizely. ",
          "key": "user_identifiers",
          "label": "User identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "product",
          "description": "The Optimizely Event Type. Defaults to "custom" if not provided",
          "key": "event_type",
          "label": "Optimizely Event Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "remove_from_cart",
          "description": "The name of the Optimizely Event Action.",
          "key": "event_action",
          "label": "Optimizely Event Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties}",
          "description": "Product details to associate with the event. Product ID field is required for each product",
          "key": "products",
          "label": "Product details",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.order_id}",
          "description": "Identifier for the order",
          "key": "order_id",
          "label": "Order ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.total}",
          "description": "Total value of the order",
          "key": "total",
          "label": "Order Total",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Event timestamp",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "customEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Product Removed",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Order Completed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "email": "{event.properties.email ?? person.properties.email}",
            "fs_user_id": "{person.id}",
            "optimizely_vuid": "{event.properties.optimizely_vuid ?? person.properties.optimizely_vuid}",
            "userId": "{person.id}",
            "web_user_id": "{person.id}",
          },
          "description": "User identifier details to send to Optimizely. ",
          "key": "user_identifiers",
          "label": "User identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "order",
          "description": "The Optimizely Event Type. Defaults to "custom" if not provided",
          "key": "event_type",
          "label": "Optimizely Event Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "purchase",
          "description": "The name of the Optimizely Event Action.",
          "key": "event_action",
          "label": "Optimizely Event Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.products}",
          "description": "Product details to associate with the event. Product ID field is required for each product",
          "key": "products",
          "label": "Product details",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.order_id}",
          "description": "Identifier for the order",
          "key": "order_id",
          "label": "Order ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.total}",
          "description": "Total value of the order",
          "key": "total",
          "label": "Order Total",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Event timestamp",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "customEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Order Completed",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Email Sent'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "email": "{event.properties.email ?? person.properties.email}",
            "fs_user_id": "{person.id}",
            "optimizely_vuid": "{event.properties.optimizely_vuid ?? person.properties.optimizely_vuid}",
            "userId": "{person.id}",
            "web_user_id": "{person.id}",
          },
          "description": "User identifier details to send to Optimizely. ",
          "key": "user_identifiers",
          "label": "User identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "sent",
          "description": "The name of the Optimizely Event Action.",
          "key": "event_action",
          "label": "Optimizely Event Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.campaign_name}",
          "description": "The campaign name",
          "key": "campaign",
          "label": "Campaign Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.campaign_id}",
          "description": "The campaign unique identifier",
          "key": "campaign_id",
          "label": "Campaign ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.link_url}",
          "description": "URL of the link which was clicked",
          "key": "link_url",
          "label": "Link URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Event timestamp",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "emailEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Email Sent",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Email Link Clicked'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "email": "{event.properties.email ?? person.properties.email}",
            "fs_user_id": "{person.id}",
            "optimizely_vuid": "{event.properties.optimizely_vuid ?? person.properties.optimizely_vuid}",
            "userId": "{person.id}",
            "web_user_id": "{person.id}",
          },
          "description": "User identifier details to send to Optimizely. ",
          "key": "user_identifiers",
          "label": "User identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "click",
          "description": "The name of the Optimizely Event Action.",
          "key": "event_action",
          "label": "Optimizely Event Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.campaign_name}",
          "description": "The campaign name",
          "key": "campaign",
          "label": "Campaign Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.campaign_id}",
          "description": "The campaign unique identifier",
          "key": "campaign_id",
          "label": "Campaign ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.link_url}",
          "description": "URL of the link which was clicked",
          "key": "link_url",
          "label": "Link URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Event timestamp",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "emailEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Email Link Clicked",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Email Opened'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "email": "{event.properties.email ?? person.properties.email}",
            "fs_user_id": "{person.id}",
            "optimizely_vuid": "{event.properties.optimizely_vuid ?? person.properties.optimizely_vuid}",
            "userId": "{person.id}",
            "web_user_id": "{person.id}",
          },
          "description": "User identifier details to send to Optimizely. ",
          "key": "user_identifiers",
          "label": "User identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "open",
          "description": "The name of the Optimizely Event Action.",
          "key": "event_action",
          "label": "Optimizely Event Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.campaign_name}",
          "description": "The campaign name",
          "key": "campaign",
          "label": "Campaign Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.campaign_id}",
          "description": "The campaign unique identifier",
          "key": "campaign_id",
          "label": "Campaign ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.link_url}",
          "description": "URL of the link which was clicked",
          "key": "link_url",
          "label": "Link URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Event timestamp",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "emailEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Email Opened",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Unsubscribed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "email": "{event.properties.email ?? person.properties.email}",
            "fs_user_id": "{person.id}",
            "optimizely_vuid": "{event.properties.optimizely_vuid ?? person.properties.optimizely_vuid}",
            "userId": "{person.id}",
            "web_user_id": "{person.id}",
          },
          "description": "User identifier details to send to Optimizely. ",
          "key": "user_identifiers",
          "label": "User identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "unsubscribe",
          "description": "The name of the Optimizely Event Action.",
          "key": "event_action",
          "label": "Optimizely Event Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.campaign_name}",
          "description": "The campaign name",
          "key": "campaign",
          "label": "Campaign Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.campaign_id}",
          "description": "The campaign unique identifier",
          "key": "campaign_id",
          "label": "Campaign ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.link_url}",
          "description": "URL of the link which was clicked",
          "key": "link_url",
          "label": "Link URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Event timestamp",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "emailEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Unsubscribed",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Email Marked as Spam'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "email": "{event.properties.email ?? person.properties.email}",
            "fs_user_id": "{person.id}",
            "optimizely_vuid": "{event.properties.optimizely_vuid ?? person.properties.optimizely_vuid}",
            "userId": "{person.id}",
            "web_user_id": "{person.id}",
          },
          "description": "User identifier details to send to Optimizely. ",
          "key": "user_identifiers",
          "label": "User identifiers",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "spam_report",
          "description": "The name of the Optimizely Event Action.",
          "key": "event_action",
          "label": "Optimizely Event Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.campaign_name}",
          "description": "The campaign name",
          "key": "campaign",
          "label": "Campaign Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.campaign_id}",
          "description": "The campaign unique identifier",
          "key": "campaign_id",
          "label": "Campaign ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.link_url}",
          "description": "URL of the link which was clicked",
          "key": "link_url",
          "label": "Link URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Event timestamp",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "emailEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Email Marked as Spam",
    },
  ],
  "name": "Optimizely Data Platform",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-pinterest-conversions-api matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Pinterest Conversions API",
  "free": false,
  "icon_url": "/static/services/pinterest.com.png",
  "id": "segment-actions-pinterest-conversions-api",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Unique identifier of an ad account. This can be found in the Pinterest UI by following the steps mentioned [here](https://developers.pinterest.com/docs/conversions/conversions/#Find%20your%20%2Cad_account_id).",
      "key": "ad_account_id",
      "label": "Ad Account ID",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "The conversion token for your Pinterest account. This can be found in the Pinterest UI by following the steps mentioned [here](https://developers.pinterest.com/docs/conversions/conversions/#Get%20the%20conversion%20token).",
      "key": "conversion_token",
      "label": "Conversion Token",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') AND event = 'Product Added'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "choices": [
            {
              "label": "Add to Cart",
              "value": "add_to_cart",
            },
            {
              "label": "Checkout",
              "value": "checkout",
            },
            {
              "label": "Lead",
              "value": "lead",
            },
            {
              "label": "Page Visit",
              "value": "page_visit",
            },
            {
              "label": "Search",
              "value": "search",
            },
            {
              "label": "Sign Up",
              "value": "signup",
            },
            {
              "label": "View Category",
              "value": "view_category",
            },
            {
              "label": "Watch Video",
              "value": "watch_video",
            },
            {
              "label": "Custom",
              "value": "custom",
            },
          ],
          "default": "add_to_cart",
          "description": "The conversion event type. For custom events, you must use the predefined event name "custom". Please refer to the possible event types in [Pinterest API docs](https://developers.pinterest.com/docs/api/v5/#operation/events/create).",
          "key": "event_name",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "choices": [
            {
              "label": "App Android",
              "value": "app_android",
            },
            {
              "label": "App IOS",
              "value": "app_ios",
            },
            {
              "label": "Web",
              "value": "web",
            },
            {
              "label": "Offline",
              "value": "offline",
            },
          ],
          "default": "web",
          "description": "The source indicating where the conversion event occurred. This must be app_android, app_ios , web or offline.",
          "key": "action_source",
          "label": "Action Source",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "{event.timestamp}",
          "description": "Device IDs can be used to add and remove only anonymous users to/from a cohort. However, users with an assigned User ID cannot use Device ID to sync to a cohort.",
          "key": "event_time",
          "label": "Event Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "A unique id string that identifies this event and can be used for deduping between events ingested via both the conversion API and Pinterest tracking.",
          "key": "event_id",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "URL of the web conversion event.",
          "key": "event_source_url",
          "label": "Event Source URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": true,
          "description": "When action_source is web or offline, it defines whether the user has opted out of tracking for web conversion events. While when action_source is app_android or app_ios, it defines whether the user has enabled Limit Ad Tracking on their iOS device, or opted out of Ads Personalization on their Android device.",
          "key": "opt_out",
          "label": "Opt Out",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": {
            "city": undefined,
            "click_id": undefined,
            "client_ip_address": "{event.properties.$ip}",
            "client_user_agent": "{event.properties.$raw_user_agent}",
            "country": undefined,
            "date_of_birth": undefined,
            "email": "{[event.properties.email ?? person.properties.email]}",
            "external_id": undefined,
            "first_name": undefined,
            "gender": undefined,
            "hashed_maids": undefined,
            "last_name": undefined,
            "partner_id": undefined,
            "phone": undefined,
            "state": undefined,
            "zip": undefined,
          },
          "description": "Object containing customer information data. Note, It is required at least one of 1) em, 2) hashed_maids or 3) pair client_ip_address + client_user_agent..",
          "key": "user_data",
          "label": "User Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "content_ids": undefined,
            "contents": undefined,
            "currency": "{event.properties.currency}",
            "num_items": undefined,
            "opt_out_type": undefined,
            "order_id": "{event.properties.order_id}",
            "search_string": "{event.properties.query}",
            "value": "{event.properties.price ?? event.properties.value}",
          },
          "description": "Object containing customer information data.",
          "key": "custom_data",
          "label": "Custom Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.app.id}",
          "description": "The app store app ID.",
          "key": "app_id",
          "label": "App ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_name}",
          "description": "Name of the app. ",
          "key": "app_name",
          "label": "App Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "Version of the app.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Brand of the user device.",
          "key": "device_brand",
          "label": "Device Brand",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.device.carrier}",
          "description": "User device’s mobile carrier. ",
          "key": "device_carrier",
          "label": "Device Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "Model of the user device.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "Type of the user device.",
          "key": "device_type",
          "label": "Device Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "Version of the device operating system.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Whether the event occurred when the user device was connected to wifi.",
          "key": "wifi",
          "label": "Wifi",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": undefined,
          "description": "Two-character ISO-639-1 language code indicating the user's language.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "reportConversionEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Add to Cart",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') AND event = 'Checkout'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "choices": [
            {
              "label": "Add to Cart",
              "value": "add_to_cart",
            },
            {
              "label": "Checkout",
              "value": "checkout",
            },
            {
              "label": "Lead",
              "value": "lead",
            },
            {
              "label": "Page Visit",
              "value": "page_visit",
            },
            {
              "label": "Search",
              "value": "search",
            },
            {
              "label": "Sign Up",
              "value": "signup",
            },
            {
              "label": "View Category",
              "value": "view_category",
            },
            {
              "label": "Watch Video",
              "value": "watch_video",
            },
            {
              "label": "Custom",
              "value": "custom",
            },
          ],
          "default": "checkout",
          "description": "The conversion event type. For custom events, you must use the predefined event name "custom". Please refer to the possible event types in [Pinterest API docs](https://developers.pinterest.com/docs/api/v5/#operation/events/create).",
          "key": "event_name",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "choices": [
            {
              "label": "App Android",
              "value": "app_android",
            },
            {
              "label": "App IOS",
              "value": "app_ios",
            },
            {
              "label": "Web",
              "value": "web",
            },
            {
              "label": "Offline",
              "value": "offline",
            },
          ],
          "default": "web",
          "description": "The source indicating where the conversion event occurred. This must be app_android, app_ios , web or offline.",
          "key": "action_source",
          "label": "Action Source",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "{event.timestamp}",
          "description": "Device IDs can be used to add and remove only anonymous users to/from a cohort. However, users with an assigned User ID cannot use Device ID to sync to a cohort.",
          "key": "event_time",
          "label": "Event Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "A unique id string that identifies this event and can be used for deduping between events ingested via both the conversion API and Pinterest tracking.",
          "key": "event_id",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "URL of the web conversion event.",
          "key": "event_source_url",
          "label": "Event Source URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": true,
          "description": "When action_source is web or offline, it defines whether the user has opted out of tracking for web conversion events. While when action_source is app_android or app_ios, it defines whether the user has enabled Limit Ad Tracking on their iOS device, or opted out of Ads Personalization on their Android device.",
          "key": "opt_out",
          "label": "Opt Out",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": {
            "city": undefined,
            "click_id": undefined,
            "client_ip_address": "{event.properties.$ip}",
            "client_user_agent": "{event.properties.$raw_user_agent}",
            "country": undefined,
            "date_of_birth": undefined,
            "email": "{[event.properties.email ?? person.properties.email]}",
            "external_id": undefined,
            "first_name": undefined,
            "gender": undefined,
            "hashed_maids": undefined,
            "last_name": undefined,
            "partner_id": undefined,
            "phone": undefined,
            "state": undefined,
            "zip": undefined,
          },
          "description": "Object containing customer information data. Note, It is required at least one of 1) em, 2) hashed_maids or 3) pair client_ip_address + client_user_agent..",
          "key": "user_data",
          "label": "User Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "content_ids": undefined,
            "contents": undefined,
            "currency": "{event.properties.currency}",
            "num_items": undefined,
            "opt_out_type": undefined,
            "order_id": "{event.properties.order_id}",
            "search_string": "{event.properties.query}",
            "value": "{event.properties.price ?? event.properties.value}",
          },
          "description": "Object containing customer information data.",
          "key": "custom_data",
          "label": "Custom Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.app.id}",
          "description": "The app store app ID.",
          "key": "app_id",
          "label": "App ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_name}",
          "description": "Name of the app. ",
          "key": "app_name",
          "label": "App Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "Version of the app.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Brand of the user device.",
          "key": "device_brand",
          "label": "Device Brand",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.device.carrier}",
          "description": "User device’s mobile carrier. ",
          "key": "device_carrier",
          "label": "Device Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "Model of the user device.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "Type of the user device.",
          "key": "device_type",
          "label": "Device Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "Version of the device operating system.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Whether the event occurred when the user device was connected to wifi.",
          "key": "wifi",
          "label": "Wifi",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": undefined,
          "description": "Two-character ISO-639-1 language code indicating the user's language.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "reportConversionEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Checkout",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') AND event = 'Generate Lead'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "choices": [
            {
              "label": "Add to Cart",
              "value": "add_to_cart",
            },
            {
              "label": "Checkout",
              "value": "checkout",
            },
            {
              "label": "Lead",
              "value": "lead",
            },
            {
              "label": "Page Visit",
              "value": "page_visit",
            },
            {
              "label": "Search",
              "value": "search",
            },
            {
              "label": "Sign Up",
              "value": "signup",
            },
            {
              "label": "View Category",
              "value": "view_category",
            },
            {
              "label": "Watch Video",
              "value": "watch_video",
            },
            {
              "label": "Custom",
              "value": "custom",
            },
          ],
          "default": "lead",
          "description": "The conversion event type. For custom events, you must use the predefined event name "custom". Please refer to the possible event types in [Pinterest API docs](https://developers.pinterest.com/docs/api/v5/#operation/events/create).",
          "key": "event_name",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "choices": [
            {
              "label": "App Android",
              "value": "app_android",
            },
            {
              "label": "App IOS",
              "value": "app_ios",
            },
            {
              "label": "Web",
              "value": "web",
            },
            {
              "label": "Offline",
              "value": "offline",
            },
          ],
          "default": "web",
          "description": "The source indicating where the conversion event occurred. This must be app_android, app_ios , web or offline.",
          "key": "action_source",
          "label": "Action Source",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "{event.timestamp}",
          "description": "Device IDs can be used to add and remove only anonymous users to/from a cohort. However, users with an assigned User ID cannot use Device ID to sync to a cohort.",
          "key": "event_time",
          "label": "Event Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "A unique id string that identifies this event and can be used for deduping between events ingested via both the conversion API and Pinterest tracking.",
          "key": "event_id",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "URL of the web conversion event.",
          "key": "event_source_url",
          "label": "Event Source URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": true,
          "description": "When action_source is web or offline, it defines whether the user has opted out of tracking for web conversion events. While when action_source is app_android or app_ios, it defines whether the user has enabled Limit Ad Tracking on their iOS device, or opted out of Ads Personalization on their Android device.",
          "key": "opt_out",
          "label": "Opt Out",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": {
            "city": undefined,
            "click_id": undefined,
            "client_ip_address": "{event.properties.$ip}",
            "client_user_agent": "{event.properties.$raw_user_agent}",
            "country": undefined,
            "date_of_birth": undefined,
            "email": "{[event.properties.email ?? person.properties.email]}",
            "external_id": undefined,
            "first_name": undefined,
            "gender": undefined,
            "hashed_maids": undefined,
            "last_name": undefined,
            "partner_id": undefined,
            "phone": undefined,
            "state": undefined,
            "zip": undefined,
          },
          "description": "Object containing customer information data. Note, It is required at least one of 1) em, 2) hashed_maids or 3) pair client_ip_address + client_user_agent..",
          "key": "user_data",
          "label": "User Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "content_ids": undefined,
            "contents": undefined,
            "currency": "{event.properties.currency}",
            "num_items": undefined,
            "opt_out_type": undefined,
            "order_id": "{event.properties.order_id}",
            "search_string": "{event.properties.query}",
            "value": "{event.properties.price ?? event.properties.value}",
          },
          "description": "Object containing customer information data.",
          "key": "custom_data",
          "label": "Custom Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.app.id}",
          "description": "The app store app ID.",
          "key": "app_id",
          "label": "App ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_name}",
          "description": "Name of the app. ",
          "key": "app_name",
          "label": "App Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "Version of the app.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Brand of the user device.",
          "key": "device_brand",
          "label": "Device Brand",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.device.carrier}",
          "description": "User device’s mobile carrier. ",
          "key": "device_carrier",
          "label": "Device Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "Model of the user device.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "Type of the user device.",
          "key": "device_type",
          "label": "Device Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "Version of the device operating system.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Whether the event occurred when the user device was connected to wifi.",
          "key": "wifi",
          "label": "Wifi",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": undefined,
          "description": "Two-character ISO-639-1 language code indicating the user's language.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "reportConversionEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Lead",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "choices": [
            {
              "label": "Add to Cart",
              "value": "add_to_cart",
            },
            {
              "label": "Checkout",
              "value": "checkout",
            },
            {
              "label": "Lead",
              "value": "lead",
            },
            {
              "label": "Page Visit",
              "value": "page_visit",
            },
            {
              "label": "Search",
              "value": "search",
            },
            {
              "label": "Sign Up",
              "value": "signup",
            },
            {
              "label": "View Category",
              "value": "view_category",
            },
            {
              "label": "Watch Video",
              "value": "watch_video",
            },
            {
              "label": "Custom",
              "value": "custom",
            },
          ],
          "default": "page_visit",
          "description": "The conversion event type. For custom events, you must use the predefined event name "custom". Please refer to the possible event types in [Pinterest API docs](https://developers.pinterest.com/docs/api/v5/#operation/events/create).",
          "key": "event_name",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "choices": [
            {
              "label": "App Android",
              "value": "app_android",
            },
            {
              "label": "App IOS",
              "value": "app_ios",
            },
            {
              "label": "Web",
              "value": "web",
            },
            {
              "label": "Offline",
              "value": "offline",
            },
          ],
          "default": "web",
          "description": "The source indicating where the conversion event occurred. This must be app_android, app_ios , web or offline.",
          "key": "action_source",
          "label": "Action Source",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "{event.timestamp}",
          "description": "Device IDs can be used to add and remove only anonymous users to/from a cohort. However, users with an assigned User ID cannot use Device ID to sync to a cohort.",
          "key": "event_time",
          "label": "Event Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "A unique id string that identifies this event and can be used for deduping between events ingested via both the conversion API and Pinterest tracking.",
          "key": "event_id",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "URL of the web conversion event.",
          "key": "event_source_url",
          "label": "Event Source URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": true,
          "description": "When action_source is web or offline, it defines whether the user has opted out of tracking for web conversion events. While when action_source is app_android or app_ios, it defines whether the user has enabled Limit Ad Tracking on their iOS device, or opted out of Ads Personalization on their Android device.",
          "key": "opt_out",
          "label": "Opt Out",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": {
            "city": undefined,
            "click_id": undefined,
            "client_ip_address": "{event.properties.$ip}",
            "client_user_agent": "{event.properties.$raw_user_agent}",
            "country": undefined,
            "date_of_birth": undefined,
            "email": "{[event.properties.email ?? person.properties.email]}",
            "external_id": undefined,
            "first_name": undefined,
            "gender": undefined,
            "hashed_maids": undefined,
            "last_name": undefined,
            "partner_id": undefined,
            "phone": undefined,
            "state": undefined,
            "zip": undefined,
          },
          "description": "Object containing customer information data. Note, It is required at least one of 1) em, 2) hashed_maids or 3) pair client_ip_address + client_user_agent..",
          "key": "user_data",
          "label": "User Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "content_ids": undefined,
            "contents": undefined,
            "currency": "{event.properties.currency}",
            "num_items": undefined,
            "opt_out_type": undefined,
            "order_id": "{event.properties.order_id}",
            "search_string": "{event.properties.query}",
            "value": "{event.properties.price ?? event.properties.value}",
          },
          "description": "Object containing customer information data.",
          "key": "custom_data",
          "label": "Custom Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.app.id}",
          "description": "The app store app ID.",
          "key": "app_id",
          "label": "App ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_name}",
          "description": "Name of the app. ",
          "key": "app_name",
          "label": "App Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "Version of the app.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Brand of the user device.",
          "key": "device_brand",
          "label": "Device Brand",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.device.carrier}",
          "description": "User device’s mobile carrier. ",
          "key": "device_carrier",
          "label": "Device Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "Model of the user device.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "Type of the user device.",
          "key": "device_type",
          "label": "Device Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "Version of the device operating system.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Whether the event occurred when the user device was connected to wifi.",
          "key": "wifi",
          "label": "Wifi",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": undefined,
          "description": "Two-character ISO-639-1 language code indicating the user's language.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "reportConversionEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Page Visit",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') AND event = 'Products Searched'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "choices": [
            {
              "label": "Add to Cart",
              "value": "add_to_cart",
            },
            {
              "label": "Checkout",
              "value": "checkout",
            },
            {
              "label": "Lead",
              "value": "lead",
            },
            {
              "label": "Page Visit",
              "value": "page_visit",
            },
            {
              "label": "Search",
              "value": "search",
            },
            {
              "label": "Sign Up",
              "value": "signup",
            },
            {
              "label": "View Category",
              "value": "view_category",
            },
            {
              "label": "Watch Video",
              "value": "watch_video",
            },
            {
              "label": "Custom",
              "value": "custom",
            },
          ],
          "default": "search",
          "description": "The conversion event type. For custom events, you must use the predefined event name "custom". Please refer to the possible event types in [Pinterest API docs](https://developers.pinterest.com/docs/api/v5/#operation/events/create).",
          "key": "event_name",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "choices": [
            {
              "label": "App Android",
              "value": "app_android",
            },
            {
              "label": "App IOS",
              "value": "app_ios",
            },
            {
              "label": "Web",
              "value": "web",
            },
            {
              "label": "Offline",
              "value": "offline",
            },
          ],
          "default": "web",
          "description": "The source indicating where the conversion event occurred. This must be app_android, app_ios , web or offline.",
          "key": "action_source",
          "label": "Action Source",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "{event.timestamp}",
          "description": "Device IDs can be used to add and remove only anonymous users to/from a cohort. However, users with an assigned User ID cannot use Device ID to sync to a cohort.",
          "key": "event_time",
          "label": "Event Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "A unique id string that identifies this event and can be used for deduping between events ingested via both the conversion API and Pinterest tracking.",
          "key": "event_id",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "URL of the web conversion event.",
          "key": "event_source_url",
          "label": "Event Source URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": true,
          "description": "When action_source is web or offline, it defines whether the user has opted out of tracking for web conversion events. While when action_source is app_android or app_ios, it defines whether the user has enabled Limit Ad Tracking on their iOS device, or opted out of Ads Personalization on their Android device.",
          "key": "opt_out",
          "label": "Opt Out",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": {
            "city": undefined,
            "click_id": undefined,
            "client_ip_address": "{event.properties.$ip}",
            "client_user_agent": "{event.properties.$raw_user_agent}",
            "country": undefined,
            "date_of_birth": undefined,
            "email": "{[event.properties.email ?? person.properties.email]}",
            "external_id": undefined,
            "first_name": undefined,
            "gender": undefined,
            "hashed_maids": undefined,
            "last_name": undefined,
            "partner_id": undefined,
            "phone": undefined,
            "state": undefined,
            "zip": undefined,
          },
          "description": "Object containing customer information data. Note, It is required at least one of 1) em, 2) hashed_maids or 3) pair client_ip_address + client_user_agent..",
          "key": "user_data",
          "label": "User Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "content_ids": undefined,
            "contents": undefined,
            "currency": "{event.properties.currency}",
            "num_items": undefined,
            "opt_out_type": undefined,
            "order_id": "{event.properties.order_id}",
            "search_string": "{event.properties.query}",
            "value": "{event.properties.price ?? event.properties.value}",
          },
          "description": "Object containing customer information data.",
          "key": "custom_data",
          "label": "Custom Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.app.id}",
          "description": "The app store app ID.",
          "key": "app_id",
          "label": "App ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_name}",
          "description": "Name of the app. ",
          "key": "app_name",
          "label": "App Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "Version of the app.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Brand of the user device.",
          "key": "device_brand",
          "label": "Device Brand",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.device.carrier}",
          "description": "User device’s mobile carrier. ",
          "key": "device_carrier",
          "label": "Device Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "Model of the user device.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "Type of the user device.",
          "key": "device_type",
          "label": "Device Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "Version of the device operating system.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Whether the event occurred when the user device was connected to wifi.",
          "key": "wifi",
          "label": "Wifi",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": undefined,
          "description": "Two-character ISO-639-1 language code indicating the user's language.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "reportConversionEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Search",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') AND event = 'Signed Up'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "choices": [
            {
              "label": "Add to Cart",
              "value": "add_to_cart",
            },
            {
              "label": "Checkout",
              "value": "checkout",
            },
            {
              "label": "Lead",
              "value": "lead",
            },
            {
              "label": "Page Visit",
              "value": "page_visit",
            },
            {
              "label": "Search",
              "value": "search",
            },
            {
              "label": "Sign Up",
              "value": "signup",
            },
            {
              "label": "View Category",
              "value": "view_category",
            },
            {
              "label": "Watch Video",
              "value": "watch_video",
            },
            {
              "label": "Custom",
              "value": "custom",
            },
          ],
          "default": "signup",
          "description": "The conversion event type. For custom events, you must use the predefined event name "custom". Please refer to the possible event types in [Pinterest API docs](https://developers.pinterest.com/docs/api/v5/#operation/events/create).",
          "key": "event_name",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "choices": [
            {
              "label": "App Android",
              "value": "app_android",
            },
            {
              "label": "App IOS",
              "value": "app_ios",
            },
            {
              "label": "Web",
              "value": "web",
            },
            {
              "label": "Offline",
              "value": "offline",
            },
          ],
          "default": "web",
          "description": "The source indicating where the conversion event occurred. This must be app_android, app_ios , web or offline.",
          "key": "action_source",
          "label": "Action Source",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "{event.timestamp}",
          "description": "Device IDs can be used to add and remove only anonymous users to/from a cohort. However, users with an assigned User ID cannot use Device ID to sync to a cohort.",
          "key": "event_time",
          "label": "Event Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "A unique id string that identifies this event and can be used for deduping between events ingested via both the conversion API and Pinterest tracking.",
          "key": "event_id",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "URL of the web conversion event.",
          "key": "event_source_url",
          "label": "Event Source URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": true,
          "description": "When action_source is web or offline, it defines whether the user has opted out of tracking for web conversion events. While when action_source is app_android or app_ios, it defines whether the user has enabled Limit Ad Tracking on their iOS device, or opted out of Ads Personalization on their Android device.",
          "key": "opt_out",
          "label": "Opt Out",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": {
            "city": undefined,
            "click_id": undefined,
            "client_ip_address": "{event.properties.$ip}",
            "client_user_agent": "{event.properties.$raw_user_agent}",
            "country": undefined,
            "date_of_birth": undefined,
            "email": "{[event.properties.email ?? person.properties.email]}",
            "external_id": undefined,
            "first_name": undefined,
            "gender": undefined,
            "hashed_maids": undefined,
            "last_name": undefined,
            "partner_id": undefined,
            "phone": undefined,
            "state": undefined,
            "zip": undefined,
          },
          "description": "Object containing customer information data. Note, It is required at least one of 1) em, 2) hashed_maids or 3) pair client_ip_address + client_user_agent..",
          "key": "user_data",
          "label": "User Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "content_ids": undefined,
            "contents": undefined,
            "currency": "{event.properties.currency}",
            "num_items": undefined,
            "opt_out_type": undefined,
            "order_id": "{event.properties.order_id}",
            "search_string": "{event.properties.query}",
            "value": "{event.properties.price ?? event.properties.value}",
          },
          "description": "Object containing customer information data.",
          "key": "custom_data",
          "label": "Custom Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.app.id}",
          "description": "The app store app ID.",
          "key": "app_id",
          "label": "App ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_name}",
          "description": "Name of the app. ",
          "key": "app_name",
          "label": "App Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "Version of the app.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Brand of the user device.",
          "key": "device_brand",
          "label": "Device Brand",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.device.carrier}",
          "description": "User device’s mobile carrier. ",
          "key": "device_carrier",
          "label": "Device Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "Model of the user device.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "Type of the user device.",
          "key": "device_type",
          "label": "Device Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "Version of the device operating system.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Whether the event occurred when the user device was connected to wifi.",
          "key": "wifi",
          "label": "Wifi",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": undefined,
          "description": "Two-character ISO-639-1 language code indicating the user's language.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "reportConversionEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Sign Up",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') AND event = 'Product Category Viewed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "choices": [
            {
              "label": "Add to Cart",
              "value": "add_to_cart",
            },
            {
              "label": "Checkout",
              "value": "checkout",
            },
            {
              "label": "Lead",
              "value": "lead",
            },
            {
              "label": "Page Visit",
              "value": "page_visit",
            },
            {
              "label": "Search",
              "value": "search",
            },
            {
              "label": "Sign Up",
              "value": "signup",
            },
            {
              "label": "View Category",
              "value": "view_category",
            },
            {
              "label": "Watch Video",
              "value": "watch_video",
            },
            {
              "label": "Custom",
              "value": "custom",
            },
          ],
          "default": "view_category",
          "description": "The conversion event type. For custom events, you must use the predefined event name "custom". Please refer to the possible event types in [Pinterest API docs](https://developers.pinterest.com/docs/api/v5/#operation/events/create).",
          "key": "event_name",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "choices": [
            {
              "label": "App Android",
              "value": "app_android",
            },
            {
              "label": "App IOS",
              "value": "app_ios",
            },
            {
              "label": "Web",
              "value": "web",
            },
            {
              "label": "Offline",
              "value": "offline",
            },
          ],
          "default": "web",
          "description": "The source indicating where the conversion event occurred. This must be app_android, app_ios , web or offline.",
          "key": "action_source",
          "label": "Action Source",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "{event.timestamp}",
          "description": "Device IDs can be used to add and remove only anonymous users to/from a cohort. However, users with an assigned User ID cannot use Device ID to sync to a cohort.",
          "key": "event_time",
          "label": "Event Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "A unique id string that identifies this event and can be used for deduping between events ingested via both the conversion API and Pinterest tracking.",
          "key": "event_id",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "URL of the web conversion event.",
          "key": "event_source_url",
          "label": "Event Source URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": true,
          "description": "When action_source is web or offline, it defines whether the user has opted out of tracking for web conversion events. While when action_source is app_android or app_ios, it defines whether the user has enabled Limit Ad Tracking on their iOS device, or opted out of Ads Personalization on their Android device.",
          "key": "opt_out",
          "label": "Opt Out",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": {
            "city": undefined,
            "click_id": undefined,
            "client_ip_address": "{event.properties.$ip}",
            "client_user_agent": "{event.properties.$raw_user_agent}",
            "country": undefined,
            "date_of_birth": undefined,
            "email": "{[event.properties.email ?? person.properties.email]}",
            "external_id": undefined,
            "first_name": undefined,
            "gender": undefined,
            "hashed_maids": undefined,
            "last_name": undefined,
            "partner_id": undefined,
            "phone": undefined,
            "state": undefined,
            "zip": undefined,
          },
          "description": "Object containing customer information data. Note, It is required at least one of 1) em, 2) hashed_maids or 3) pair client_ip_address + client_user_agent..",
          "key": "user_data",
          "label": "User Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "content_ids": undefined,
            "contents": undefined,
            "currency": "{event.properties.currency}",
            "num_items": undefined,
            "opt_out_type": undefined,
            "order_id": "{event.properties.order_id}",
            "search_string": "{event.properties.query}",
            "value": "{event.properties.price ?? event.properties.value}",
          },
          "description": "Object containing customer information data.",
          "key": "custom_data",
          "label": "Custom Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.app.id}",
          "description": "The app store app ID.",
          "key": "app_id",
          "label": "App ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_name}",
          "description": "Name of the app. ",
          "key": "app_name",
          "label": "App Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "Version of the app.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Brand of the user device.",
          "key": "device_brand",
          "label": "Device Brand",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.device.carrier}",
          "description": "User device’s mobile carrier. ",
          "key": "device_carrier",
          "label": "Device Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "Model of the user device.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "Type of the user device.",
          "key": "device_type",
          "label": "Device Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "Version of the device operating system.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Whether the event occurred when the user device was connected to wifi.",
          "key": "wifi",
          "label": "Wifi",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": undefined,
          "description": "Two-character ISO-639-1 language code indicating the user's language.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "reportConversionEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "View Category",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') AND event = 'Product Video Watched'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "choices": [
            {
              "label": "Add to Cart",
              "value": "add_to_cart",
            },
            {
              "label": "Checkout",
              "value": "checkout",
            },
            {
              "label": "Lead",
              "value": "lead",
            },
            {
              "label": "Page Visit",
              "value": "page_visit",
            },
            {
              "label": "Search",
              "value": "search",
            },
            {
              "label": "Sign Up",
              "value": "signup",
            },
            {
              "label": "View Category",
              "value": "view_category",
            },
            {
              "label": "Watch Video",
              "value": "watch_video",
            },
            {
              "label": "Custom",
              "value": "custom",
            },
          ],
          "default": "watch_video",
          "description": "The conversion event type. For custom events, you must use the predefined event name "custom". Please refer to the possible event types in [Pinterest API docs](https://developers.pinterest.com/docs/api/v5/#operation/events/create).",
          "key": "event_name",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "choices": [
            {
              "label": "App Android",
              "value": "app_android",
            },
            {
              "label": "App IOS",
              "value": "app_ios",
            },
            {
              "label": "Web",
              "value": "web",
            },
            {
              "label": "Offline",
              "value": "offline",
            },
          ],
          "default": "web",
          "description": "The source indicating where the conversion event occurred. This must be app_android, app_ios , web or offline.",
          "key": "action_source",
          "label": "Action Source",
          "required": true,
          "secret": false,
          "type": "choice",
        },
        {
          "default": "{event.timestamp}",
          "description": "Device IDs can be used to add and remove only anonymous users to/from a cohort. However, users with an assigned User ID cannot use Device ID to sync to a cohort.",
          "key": "event_time",
          "label": "Event Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "A unique id string that identifies this event and can be used for deduping between events ingested via both the conversion API and Pinterest tracking.",
          "key": "event_id",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "URL of the web conversion event.",
          "key": "event_source_url",
          "label": "Event Source URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": true,
          "description": "When action_source is web or offline, it defines whether the user has opted out of tracking for web conversion events. While when action_source is app_android or app_ios, it defines whether the user has enabled Limit Ad Tracking on their iOS device, or opted out of Ads Personalization on their Android device.",
          "key": "opt_out",
          "label": "Opt Out",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": {
            "city": undefined,
            "click_id": undefined,
            "client_ip_address": "{event.properties.$ip}",
            "client_user_agent": "{event.properties.$raw_user_agent}",
            "country": undefined,
            "date_of_birth": undefined,
            "email": "{[event.properties.email ?? person.properties.email]}",
            "external_id": undefined,
            "first_name": undefined,
            "gender": undefined,
            "hashed_maids": undefined,
            "last_name": undefined,
            "partner_id": undefined,
            "phone": undefined,
            "state": undefined,
            "zip": undefined,
          },
          "description": "Object containing customer information data. Note, It is required at least one of 1) em, 2) hashed_maids or 3) pair client_ip_address + client_user_agent..",
          "key": "user_data",
          "label": "User Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "content_ids": undefined,
            "contents": undefined,
            "currency": "{event.properties.currency}",
            "num_items": undefined,
            "opt_out_type": undefined,
            "order_id": "{event.properties.order_id}",
            "search_string": "{event.properties.query}",
            "value": "{event.properties.price ?? event.properties.value}",
          },
          "description": "Object containing customer information data.",
          "key": "custom_data",
          "label": "Custom Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.app.id}",
          "description": "The app store app ID.",
          "key": "app_id",
          "label": "App ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_name}",
          "description": "Name of the app. ",
          "key": "app_name",
          "label": "App Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "Version of the app.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Brand of the user device.",
          "key": "device_brand",
          "label": "Device Brand",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.device.carrier}",
          "description": "User device’s mobile carrier. ",
          "key": "device_carrier",
          "label": "Device Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "Model of the user device.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "Type of the user device.",
          "key": "device_type",
          "label": "Device Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "Version of the device operating system.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Whether the event occurred when the user device was connected to wifi.",
          "key": "wifi",
          "label": "Wifi",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": undefined,
          "description": "Two-character ISO-639-1 language code indicating the user's language.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "reportConversionEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Watch Video",
    },
  ],
  "name": "Pinterest Conversions API",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-pipedrive matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Pipedrive",
  "free": false,
  "icon_url": "/static/services/pipedrive.com.png",
  "id": "segment-actions-pipedrive",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Pipedrive domain. This is found in Pipedrive in Settings > Company settings > Company domain.",
      "key": "domain",
      "label": "Domain",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "Pipedrive API token. This is found in Pipedrive in Settings > Personal preferences > API > Your personal API token.",
      "key": "apiToken",
      "label": "API Token",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": "id",
      "description": "This is a key by which a Person in Pipedrive will be searched. It can be either Person id or has of a custom field containing external id. Default value is \`person_id\`.",
      "key": "personField",
      "label": "External ID field for a Person in Pipedrive",
      "required": false,
      "secret": false,
      "type": "string",
    },
    {
      "default": "id",
      "description": "This is a key by which an Organization in Pipedrive will be searched. It can be either Organization id or has of a custom field containing external id. Default value is \`org_id\`.",
      "key": "organizationField",
      "label": "External ID field for an Organization in Pipedrive",
      "required": false,
      "secret": false,
      "type": "string",
    },
    {
      "default": "id",
      "description": "This is a key by which a Deal in Pipedrive will be searched. It can be either Deal id or has of a custom field containing external id. Default value is \`deal_id\`.",
      "key": "dealField",
      "label": "External ID field for a Deal in Pipedrive",
      "required": false,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": undefined,
          "description": "If present, used instead of field in settings to find existing person in Pipedrive.",
          "key": "match_field",
          "label": "Match field",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "Value to find existing person by",
          "key": "match_value",
          "label": "Match value",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.name}",
          "description": "Name of the person",
          "key": "name",
          "label": "Person Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{[person.properties.email]}",
          "description": "Email addresses for this person.",
          "key": "email",
          "label": "Email Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{[person.properties.phone]}",
          "description": "Phone numbers for the person.",
          "key": "phone",
          "label": "Phone Number",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "Owner & followers (private)",
              "value": "1",
            },
            {
              "label": "Entire company (shared)",
              "value": "3",
            },
            {
              "label": "Owner's visibility group and sub-groups",
              "value": "5",
            },
            {
              "label": "Entire company",
              "value": "7",
            },
          ],
          "default": undefined,
          "description": "Visibility of the Person. If omitted, visibility will be set to the default visibility setting of this item type for the authorized user. 'Owner's visibility group and sub-groups' and 'Entire company' options only available with Professional or Enterprise plans",
          "key": "visible_to",
          "label": "Visible To",
          "required": false,
          "secret": false,
          "type": "choice",
        },
        {
          "default": undefined,
          "description": "If the person is created, use this timestamp as the creation timestamp. Format: YYY-MM-DD HH:MM:SS",
          "key": "add_time",
          "label": "Created At",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "New values for custom fields.",
          "key": "custom_fields",
          "label": "Custom fields",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "createUpdatePerson",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Create or Update a Person",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$groupidentify'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": undefined,
          "description": "If present, used instead of field in settings to find existing organization in Pipedrive.",
          "key": "match_field",
          "label": "Match field",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$group_0}",
          "description": "Value to find existing organization by",
          "key": "match_value",
          "label": "Match value",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.name}",
          "description": "Name of the organization",
          "key": "name",
          "label": "Organization Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "choices": [
            {
              "label": "Owner & followers (private)",
              "value": "1",
            },
            {
              "label": "Entire company (shared)",
              "value": "3",
            },
            {
              "label": "Owner's visibility group and sub-groups",
              "value": "5",
            },
            {
              "label": "Entire company",
              "value": "7",
            },
          ],
          "default": undefined,
          "description": "Visibility of the Organization. If omitted, visibility will be set to the default visibility setting of this item type for the authorized user. 'Owner's visibility group and sub-groups' and 'Entire company' options only available with Professional or Enterprise plans",
          "key": "visible_to",
          "label": "Visible To",
          "required": false,
          "secret": false,
          "type": "choice",
        },
        {
          "default": undefined,
          "description": "If the organization is created, use this timestamp as the creation timestamp. Format: YYY-MM-DD HH:MM:SS",
          "key": "add_time",
          "label": "Created At",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "New values for custom fields.",
          "key": "custom_fields",
          "label": "Custom fields",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "createUpdateOrganization",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Create or Update an Organization",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Activity Upserted'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.properties.activity_id}",
          "description": "ID of Activity in Pipedrive to Update. If left empty, a new one will be created",
          "key": "activity_id",
          "label": "Activity ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "If present, used instead of field in settings to find existing person in Pipedrive.",
          "key": "person_match_field",
          "label": "Person match field",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "Value to find existing person by",
          "key": "person_match_value",
          "label": "Person match value",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "If present, used instead of field in settings to find existing organization in Pipedrive.",
          "key": "organization_match_field",
          "label": "Organization match field",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Value to find existing organization by",
          "key": "organization_match_value",
          "label": "Organization match value",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "If present, used instead of field in settings to find existing deal in Pipedrive.",
          "key": "deal_match_field",
          "label": "Deal match field",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.deal_id}",
          "description": "Value to find existing deal by",
          "key": "deal_match_value",
          "label": "Deal match value",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.subject}",
          "description": "Subject of the Activity. When value for subject is not set, it will be given a default value \`Call\`.",
          "key": "subject",
          "label": "Activity Subject",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.type}",
          "description": "Type of the Activity. This is in correlation with the key_string parameter of ActivityTypes. When value for type is not set, it will be given a default value \`Call\`",
          "key": "type",
          "label": "Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.description}",
          "description": "Additional details about the Activity that is synced to your external calendar. Unlike the note added to the Activity, the description is publicly visible to any guests added to the Activity.",
          "key": "description",
          "label": "Description",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.note}",
          "description": "Note of the Activity (Accepts plain text and HTML)",
          "key": "note",
          "label": "Note",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.due_date}",
          "description": "Due date of the Activity. Format: YYYY-MM-DD",
          "key": "due_date",
          "label": "Due Date",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.due_time}",
          "description": "Due time of the Activity. Format: HH:MM",
          "key": "due_time",
          "label": "Due Time",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.duration}",
          "description": "Duration of the Activity. Format: HH:MM",
          "key": "duration",
          "label": "Duration",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.done}",
          "description": "Whether the Activity is done or not.",
          "key": "done",
          "label": "Done",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "createUpdateActivity",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Create or Update an Activity",
    },
  ],
  "name": "Pipedrive",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-playerzero-cloud matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to PlayerZero Cloud",
  "free": false,
  "icon_url": "/static/services/playerzero.ai.png",
  "id": "segment-actions-playerzero-cloud",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "The Project Token for the PlayerZero project you want to send data to. You can find this Token on the [Segment (Cloud) Connector](https://go.playerzero.app/connector/segment-cloud) page.",
      "key": "projectToken",
      "label": "PlayerZero Project Token",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') or event = '$pageview' or event = '$screen'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Event",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set') or event = '$groupidentify' or event = '$alias'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "identifyUser",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify User",
    },
  ],
  "name": "PlayerZero Cloud",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-podscribe matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Podscribe",
  "free": false,
  "icon_url": "/static/services/podscribe.com.png",
  "id": "segment-actions-podscribe",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Podscribe advertiser lookup key",
      "key": "advertiser",
      "label": "Advertiser",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "Podscribe user ID",
      "key": "userId",
      "label": "User ID",
      "required": false,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Order Completed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "The anonymous ID associated with the user",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer ?? event.properties.referrer}",
          "description": "The page referrer",
          "key": "referrer",
          "label": "Page Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url ?? event.properties.url}",
          "description": "The page URL",
          "key": "url",
          "label": "Page URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the device sending the event.",
          "key": "ip",
          "label": "User IP address",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.context.library}",
          },
          "description": "The library sending the event.",
          "key": "library",
          "label": "Segment Library",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email ?? event.properties.email}",
          "description": "Email address of the user",
          "key": "email",
          "label": "Email address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "coupon": "{event.properties.coupon}",
            "currency": "{event.properties.currency}",
            "is_new_customer": "{event.properties.is_new_customer}",
            "is_subscription": "{event.properties.is_subscription}",
            "num_items_purchased": "{event.properties.num_items_purchased}",
            "order_id": "{event.properties.order_id}",
            "total": "{event.properties.total}",
          },
          "description": "Properties to send with the event",
          "key": "properties",
          "label": "Event properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "purchase",
          "description": "Podscribe type of event to send",
          "key": "podscribeEvent",
          "label": "Podscribe event type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "track",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Order Completed Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Signed Up'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "The anonymous ID associated with the user",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer ?? event.properties.referrer}",
          "description": "The page referrer",
          "key": "referrer",
          "label": "Page Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url ?? event.properties.url}",
          "description": "The page URL",
          "key": "url",
          "label": "Page URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the device sending the event.",
          "key": "ip",
          "label": "User IP address",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.context.library}",
          },
          "description": "The library sending the event.",
          "key": "library",
          "label": "Segment Library",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email ?? event.properties.email}",
          "description": "Email address of the user",
          "key": "email",
          "label": "Email address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "coupon": "{event.properties.coupon}",
            "currency": "{event.properties.currency}",
            "is_new_customer": "{event.properties.is_new_customer}",
            "is_subscription": "{event.properties.is_subscription}",
            "num_items_purchased": "{event.properties.num_items_purchased}",
            "order_id": "{event.properties.order_id}",
            "total": "{event.properties.total}",
          },
          "description": "Properties to send with the event",
          "key": "properties",
          "label": "Event properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "signup",
          "description": "Podscribe type of event to send",
          "key": "podscribeEvent",
          "label": "Podscribe event type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "track",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Signed Up Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "The anonymous ID associated with the user",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer ?? event.properties.referrer}",
          "description": "The page referrer",
          "key": "referrer",
          "label": "Page Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url ?? event.properties.url}",
          "description": "The page URL",
          "key": "url",
          "label": "Page URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the device sending the event.",
          "key": "ip",
          "label": "User IP address",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.context.library}",
          },
          "description": "The library sending the event.",
          "key": "library",
          "label": "Segment Library",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the device sending the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "page",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Page Calls",
    },
  ],
  "name": "Podscribe",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-prodeology matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Prodeology",
  "free": false,
  "icon_url": "/static/services/prodeology.com.png",
  "id": "segment-actions-prodeology",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Your Prodeology API Key",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "The event name",
          "key": "event",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Properties to send with the event",
          "key": "properties",
          "label": "Event properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "The anonymous ID associated with the user",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "Context properties to send with the event",
          "key": "context",
          "label": "Context properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "messageId",
          "label": "MessageId",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "track",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "An anonymous identifier",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Page properties",
          "key": "properties",
          "label": "Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.name}",
          "description": "The name of the page",
          "key": "name",
          "label": "Page Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "Context properties to send with the event",
          "key": "context",
          "label": "Context properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "messageId",
          "label": "MessageId",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "page",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Page Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "An anonymous identifier",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Traits to associate with the user",
          "key": "traits",
          "label": "Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "messageId",
          "label": "MessageId",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "identify",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify Calls",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$groupidentify'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "Anonymous id",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$group_0}",
          "description": "The group id",
          "key": "groupId",
          "label": "Group ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Traits to associate with the group",
          "key": "traits",
          "label": "Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "messageId",
          "label": "MessageId",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "group",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Group Calls",
    },
  ],
  "name": "Prodeology",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-pushwoosh matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Pushwoosh",
  "free": false,
  "icon_url": "/static/services/pushwoosh.com.png",
  "id": "segment-actions-pushwoosh",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Pushwoosh API Key from Pushwoosh Control Panel",
      "key": "pushwooshAPIKey",
      "label": "Pushwoosh API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "Pushwoosh Application Code from Pushwoosh Control Panel",
      "key": "pushwooshAppCode",
      "label": "Pushwoosh Application Code",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') or event = '$pageview' or event = '$screen'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "The unique user identifier",
          "key": "external_id",
          "label": "External User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_id}",
          "description": "Device ID",
          "key": "device_id",
          "label": "Device ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "Device Platform",
          "key": "device_platform",
          "label": "Device Platform",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event ?? event.event}",
          "description": "Event Name",
          "key": "name",
          "label": "Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "When the event occurred.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Properties of the event",
          "key": "properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Events",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "The unique user identifier",
          "key": "external_id",
          "label": "External User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email}",
          "description": "The user's email",
          "key": "email",
          "label": "Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "Version of the app",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_id}",
          "description": "Device ID",
          "key": "device_id",
          "label": "Device ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "Device Model",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "Device Platform",
          "key": "device_platform",
          "label": "Device Platform",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.context.device.token}",
          "description": "Device Token. This is not automatically collected by Segment Mobile SDKs. Add it into the Segment payload if needed",
          "key": "device_token",
          "label": "Device Token",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "Language",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_country_name}",
          "description": "The country code of the user",
          "key": "country",
          "label": "Country",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_city_name}",
          "description": "The city of the user",
          "key": "city",
          "label": "City",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "latitude": "{event.properties.$geoip_latitude}",
            "longitude": "{event.properties.$geoip_longitude}",
          },
          "description": "The user's current longitude/latitude.",
          "key": "current_location",
          "label": "Current Location",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "The version of the device OS",
          "key": "device_os_version",
          "label": "Device OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$timezone}",
          "description": "The timezone of the user",
          "key": "timezone",
          "label": "Timezone",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "User agent of the device",
          "key": "user_agent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Custom attributes to send to Pushwoosh",
          "key": "custom_attributes",
          "label": "Custom Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "updateUserProfile",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Create or Update User Profile",
    },
  ],
  "name": "Pushwoosh",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-recombee matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Recombee",
  "free": false,
  "icon_url": "/static/services/recombee.com.png",
  "id": "segment-actions-recombee",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "The ID of the Recombee Database into which the interactions will be sent.",
      "key": "databaseId",
      "label": "Database ID",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "The private token for the Recombee Database used.",
      "key": "privateToken",
      "label": "Private Token",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "choices": [
        {
          "label": "EU",
          "value": "eu-west",
        },
        {
          "label": "Canada (East Coast)",
          "value": "ca-east",
        },
        {
          "label": "Australia",
          "value": "ap-se",
        },
        {
          "label": "US (West Coast)",
          "value": "us-west",
        },
        {
          "label": "Custom",
          "value": "custom",
        },
      ],
      "default": "eu-west",
      "description": "The Recombee cluster where your Database is located. [Learn more](https://docs.recombee.com/regions)",
      "key": "databaseRegion",
      "label": "Database Region",
      "required": true,
      "secret": false,
      "type": "choice",
    },
    {
      "default": undefined,
      "description": "URI of the Recombee API that should be used. *Keep this field empty unless you are calling the Recombee cluster based in a specific region or you were assigned a custom URI by the Recombee Support team.*",
      "key": "apiUri",
      "label": "API URI",
      "required": false,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID of the user who viewed the item.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "The viewed item.",
          "key": "itemId",
          "label": "Item ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The UTC timestamp of when the view occurred.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "The duration of the view in seconds.",
          "key": "duration",
          "label": "Duration",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.recomm_id}",
          "description": "The ID of the clicked recommendation (if the view is based on a recommendation request).",
          "key": "recommId",
          "label": "Recommendation ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Additional data to be stored with the view. *Keep this field empty unless instructed by the Recombee Support team.*",
          "key": "additionalData",
          "label": "Additional Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "addDetailView",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Page - Viewed",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Product Viewed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID of the user who viewed the item.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.product_id ?? event.properties.sku}",
          "description": "The viewed item.",
          "key": "itemId",
          "label": "Item ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The UTC timestamp of when the view occurred.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "The duration of the view in seconds.",
          "key": "duration",
          "label": "Duration",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.recomm_id}",
          "description": "The ID of the clicked recommendation (if the view is based on a recommendation request).",
          "key": "recommId",
          "label": "Recommendation ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Additional data to be stored with the view. *Keep this field empty unless instructed by the Recombee Support team.*",
          "key": "additionalData",
          "label": "Additional Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "addDetailView",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Ecommerce - Product Viewed",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Product Added'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID of the user who added the item to the cart.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "amount": "{event.properties.quantity}",
            "itemId": "{event.properties.product_id ?? event.properties.sku}",
            "price": "{event.properties.price}",
          },
          "description": "The item that was added to the cart.",
          "key": "item",
          "label": "Item",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The UTC timestamp of when the cart addition occurred.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.recomm_id}",
          "description": "The ID of the clicked recommendation (if the cart addition is based on a recommendation request).",
          "key": "recommId",
          "label": "Recommendation ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Additional data to be stored with the cart addition. *Keep this field empty unless instructed by the Recombee Support team.*",
          "key": "additionalData",
          "label": "Additional Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "addCartAddition",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Ecommerce - Product Added",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Product Removed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID of the user who added the item to the cart.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.product_id ?? event.properties.sku}",
          "description": "The item that was added to the cart.",
          "key": "itemId",
          "label": "Item ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "The UTC timestamp of when the cart addition occurred. If the timestamp is omitted, then all the cart additions with the given \`userId\` and \`itemId\` are deleted.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "deleteCartAddition",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Ecommerce - Product Removed",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Order Completed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID of the user who purchased the item(s).",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.products}",
          "description": "The items that were purchased.",
          "key": "items",
          "label": "Items",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The UTC timestamp of when the purchase occurred.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.recomm_id}",
          "description": "The ID of the clicked recommendation (if the purchase is based on a recommendation request).",
          "key": "recommId",
          "label": "Recommendation ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Additional data to be stored with the purchase. *Keep this field empty unless instructed by the Recombee Support team.*",
          "key": "additionalData",
          "label": "Additional Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "addPurchase",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Ecommerce - Order Completed",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Product Added to Wishlist'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID of the user who bookmarked the item.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.product_id ?? event.properties.sku}",
          "description": "The bookmarked item.",
          "key": "itemId",
          "label": "Item ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The UTC timestamp of when the bookmark event occurred.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.recomm_id}",
          "description": "The ID of the clicked recommendation (if the bookmark is based on a recommendation request).",
          "key": "recommId",
          "label": "Recommendation ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Additional data to be stored with the bookmark. *Keep this field empty unless instructed by the Recombee Support team.*",
          "key": "additionalData",
          "label": "Additional Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "addBookmark",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Ecommerce - Product Added to Wishlist",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Product Removed from Wishlist'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID of the user who bookmarked the item.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.product_id ?? event.properties.sku}",
          "description": "The item that was bookmarked.",
          "key": "itemId",
          "label": "Item ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "The UTC timestamp of when the bookmark occurred. If the timestamp is omitted, then all the bookmarks with the given \`userId\` and \`itemId\` are deleted.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "deleteBookmark",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Ecommerce - Product Removed from Wishlist",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Product Shared'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID of the user who bookmarked the item.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.product_id ?? event.properties.sku}",
          "description": "The bookmarked item.",
          "key": "itemId",
          "label": "Item ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The UTC timestamp of when the bookmark event occurred.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.recomm_id}",
          "description": "The ID of the clicked recommendation (if the bookmark is based on a recommendation request).",
          "key": "recommId",
          "label": "Recommendation ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Additional data to be stored with the bookmark. *Keep this field empty unless instructed by the Recombee Support team.*",
          "key": "additionalData",
          "label": "Additional Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "addBookmark",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Ecommerce - Product Shared",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Video Playback Started'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID of the user who viewed a portion of the item.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.content_asset_id ?? event.properties.content_asset_ids[0]}",
          "description": "The viewed item.",
          "key": "itemId",
          "label": "Item ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The UTC timestamp of when the view portion occurred.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "0",
          "description": "The viewed portion of the item as a number in the interval [0.0,1.0], where 0.0 means the user viewed nothing and 1.0 means the full item was viewed. It should be the actual viewed part of the item, no matter the seeking. For example, if the user seeked immediately to half of the item and then viewed 10% of the item, the \`portion\` should still be \`0.1\`.",
          "key": "portion",
          "label": "Portion",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.session}",
          "description": "The ID of the session in which the user viewed the item.",
          "key": "sessionId",
          "label": "Session ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.recomm_id}",
          "description": "The ID of the clicked recommendation (if the view portion is based on a recommendation request).",
          "key": "recommId",
          "label": "Recommendation ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Additional data to be stored with the view portion. *Keep this field empty unless instructed by the Recombee Support team.*",
          "key": "additionalData",
          "label": "Additional Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "setViewPortion",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Video - Playback Started",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Video Content Playing'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID of the user who viewed a portion of the item.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.content_asset_id ?? event.properties.content_asset_ids[0]}",
          "description": "The viewed item.",
          "key": "itemId",
          "label": "Item ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The UTC timestamp of when the view portion occurred.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "totalLength": "{event.properties.total_length}",
            "watchTime": "{event.properties.position}",
          },
          "description": "The portion of the item that the user viewed.",
          "key": "portion",
          "label": "Portion",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.session}",
          "description": "The ID of the session in which the user viewed the item.",
          "key": "sessionId",
          "label": "Session ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.recomm_id}",
          "description": "The ID of the clicked recommendation (if the view portion is based on a recommendation request).",
          "key": "recommId",
          "label": "Recommendation ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Additional data to be stored with the view portion. *Keep this field empty unless instructed by the Recombee Support team.*",
          "key": "additionalData",
          "label": "Additional Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "setViewPortionFromWatchTime",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Video - Content Playing",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Video Playback Paused'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID of the user who viewed a portion of the item.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.content_asset_id}",
          "description": "The viewed item.",
          "key": "itemId",
          "label": "Item ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The UTC timestamp of when the view portion occurred.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "totalLength": "{event.properties.total_length}",
            "watchTime": "{event.properties.position}",
          },
          "description": "The portion of the item that the user viewed.",
          "key": "portion",
          "label": "Portion",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.session}",
          "description": "The ID of the session in which the user viewed the item.",
          "key": "sessionId",
          "label": "Session ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.recomm_id}",
          "description": "The ID of the clicked recommendation (if the view portion is based on a recommendation request).",
          "key": "recommId",
          "label": "Recommendation ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Additional data to be stored with the view portion. *Keep this field empty unless instructed by the Recombee Support team.*",
          "key": "additionalData",
          "label": "Additional Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "setViewPortionFromWatchTime",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Video - Playback Paused",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Video Playback Completed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID of the user who viewed a portion of the item.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.content_asset_id ?? event.properties.content_asset_ids[0]}",
          "description": "The viewed item.",
          "key": "itemId",
          "label": "Item ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The UTC timestamp of when the view portion occurred.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "1",
          "description": "The viewed portion of the item as a number in the interval [0.0,1.0], where 0.0 means the user viewed nothing and 1.0 means the full item was viewed. It should be the actual viewed part of the item, no matter the seeking. For example, if the user seeked immediately to half of the item and then viewed 10% of the item, the \`portion\` should still be \`0.1\`.",
          "key": "portion",
          "label": "Portion",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.session}",
          "description": "The ID of the session in which the user viewed the item.",
          "key": "sessionId",
          "label": "Session ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.recomm_id}",
          "description": "The ID of the clicked recommendation (if the view portion is based on a recommendation request).",
          "key": "recommId",
          "label": "Recommendation ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Additional data to be stored with the view portion. *Keep this field empty unless instructed by the Recombee Support team.*",
          "key": "additionalData",
          "label": "Additional Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "setViewPortion",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Video - Playback Completed",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$screen'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID of the user who viewed the item.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "The viewed item.",
          "key": "itemId",
          "label": "Item ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The UTC timestamp of when the view occurred.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "The duration of the view in seconds.",
          "key": "duration",
          "label": "Duration",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.recomm_id}",
          "description": "The ID of the clicked recommendation (if the view is based on a recommendation request).",
          "key": "recommId",
          "label": "Recommendation ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Additional data to be stored with the view. *Keep this field empty unless instructed by the Recombee Support team.*",
          "key": "additionalData",
          "label": "Additional Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "addDetailView",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Screen - Viewed",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$alias'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "The ID of the target user that will be **kept** after the merge.",
          "key": "targetUserId",
          "label": "Target User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.previousId}",
          "description": "The ID of the source user that will be **deleted** after the merge.",
          "key": "sourceUserId",
          "label": "Source User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "mergeUsers",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Alias",
    },
  ],
  "name": "Recombee",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-revx matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to RevX Cloud",
  "free": false,
  "icon_url": "/static/services/revx.io.png",
  "id": "segment-actions-revx",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Revx specific client id. This can be found by contacting the RevX support team",
      "key": "client_id",
      "label": "Revx Client ID",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') or type ='screen'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.properties.$device_type}",
          "description": "Platform of the device.",
          "key": "os",
          "label": "Platform",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Identifier For Advertiser (IDFA/GAID)",
          "key": "advertising_id",
          "label": "Identifier For Advertiser (IDFA/GAID)",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event ?? event.event}",
          "description": "A unique identifier for your event.",
          "key": "event_name",
          "label": "Event name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "A unique identifier for your request type.",
          "key": "type",
          "label": "Request type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_id}",
          "description": "Identifier for Device Id for IOS and Android",
          "key": "idfv",
          "label": "Identifier For Vendor (IDFV)",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event. If time is not sent with the event, it will be set to the request upload time.",
          "key": "time",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "An object of key-value pairs that represent additional data to be sent along with the event.",
          "key": "event_properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "An object of key-value pairs that represent additional data tied to the user",
          "key": "user_properties",
          "label": "User Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "The current version of your application.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os}",
          "description": "The name of the mobile operating system or browser that the user is using.",
          "key": "os_name",
          "label": "OS Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "The version of the mobile operating system or browser the user is using.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The device brand that the user is using.",
          "key": "device_brand",
          "label": "Device Brand",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_manufacturer}",
          "description": "The device manufacturer that the user is using.",
          "key": "device_manufacturer",
          "label": "Device Manufacturer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "The device model that the user is using.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The carrier that the user is using.",
          "key": "carrier",
          "label": "Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_country_name}",
          "description": "The current country of the user.",
          "key": "country",
          "label": "Country",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The current region of the user.",
          "key": "region",
          "label": "Region",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_city_name}",
          "description": "The current city of the user.",
          "key": "city",
          "label": "City",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "The current Designated Market Area of the user.",
          "key": "dma",
          "label": "Designated Market Area",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language set by the user.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "price": "{event.properties.price}",
            "productId": "{event.properties.product_id}",
            "quantity": "{event.properties.quantity}",
          },
          "description": "The single product viewed or Added to cart.",
          "key": "product",
          "label": "Product",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "The list of products purchased.",
          "key": "products",
          "label": "Products",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_latitude}",
          "description": "The current Latitude of the user.",
          "key": "location_lat",
          "label": "Latitude",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_longitude}",
          "description": "The current Longitude of the user.",
          "key": "location_lng",
          "label": "Longtitude",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user. Use "$remote" to use the IP address on the upload request. ",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "sendRevxPing",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Send Revx Ping",
    },
  ],
  "name": "RevX Cloud",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-ripe-cloud matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Ripe Cloud Mode",
  "free": false,
  "icon_url": "/static/services/ripe.com.png",
  "id": "segment-actions-ripe-cloud",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "The Ripe API key found in the Ripe App",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": "https://api.getripe.com/event",
      "description": "The Ripe API endpoint (do not change this unless you know what you're doing)",
      "key": "endpoint",
      "label": "API Endpoint",
      "required": false,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$groupidentify'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "Anonymous id",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$group_0}",
          "description": "The group id",
          "key": "groupId",
          "label": "Group ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "Device context",
          "key": "context",
          "label": "Context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Traits to associate with the group",
          "key": "traits",
          "label": "Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "messageId",
          "label": "MessageId",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "group",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Group user",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "An anonymous identifier",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "Device context",
          "key": "context",
          "label": "Context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Traits to associate with the user",
          "key": "traits",
          "label": "Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "messageId",
          "label": "MessageId",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "identify",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify user",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "An anonymous identifier",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "Device context",
          "key": "context",
          "label": "Context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Page properties",
          "key": "properties",
          "label": "Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.name}",
          "description": "The name of the page",
          "key": "name",
          "label": "Page Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url ?? event.properties.url}",
          "description": "The page URL",
          "key": "url",
          "label": "Page URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$pathname ?? event.properties.path}",
          "description": "The page path",
          "key": "path",
          "label": "Page Path",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.search}",
          "description": "URL query string",
          "key": "search",
          "label": "Page Query String",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer ?? event.properties.referrer}",
          "description": "The page referrer",
          "key": "referrer",
          "label": "Page Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.title ?? event.properties.title}",
          "description": "The page title",
          "key": "title",
          "label": "Page Title",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "messageId",
          "label": "MessageId",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "page",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Page view",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.distinct_id}",
          "description": "An anonymous identifier",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "The event name",
          "key": "event",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "Device context",
          "key": "context",
          "label": "Context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Properties to send with the event",
          "key": "properties",
          "label": "Event properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "messageId",
          "label": "MessageId",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "track",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track event",
    },
  ],
  "name": "Ripe Cloud Mode",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-saleswings matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Saleswings",
  "free": false,
  "icon_url": "/static/services/saleswingsapp.com.png",
  "id": "segment-actions-saleswings",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Segment.io API key for your SalesWings project.",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "choices": [
        {
          "label": "Helium (live environment)",
          "value": "helium",
        },
        {
          "label": "Ozone (test environment)",
          "value": "ozone",
        },
      ],
      "default": "helium",
      "description": "SalesWings environment this destination is connected with.",
      "key": "environment",
      "label": "Environment",
      "required": true,
      "secret": false,
      "type": "choice",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "Track",
          "description": "Type of the SalesWings custom event (a custom event is visualized in SalesWings cockpit and SalesForce Lead Intent View as "[[Kind]] Data").",
          "key": "kind",
          "label": "Custom Event Kind",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "String description of the SalesWings custom event payload (a custom event is visualized in SalesWings cockpit and SalesForce Lead Intent View as "[[Kind]] Data").",
          "key": "data",
          "label": "Custom Event Data",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "Permanent identifier of a Segment user the event is attributed to.",
          "key": "userID",
          "label": "Segment User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "A pseudo-unique substitute for a Segment user ID the event is attributed to.",
          "key": "anonymousID",
          "label": "Segment Anonymous User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email ?? event.properties.email}",
          "description": "Identified email of the Segment User.",
          "key": "email",
          "label": "Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.url ?? event.properties.$current_url}",
          "description": "URL associated with the event.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.referrer ?? event.properties.$referrer}",
          "description": "Referrer URL associated with the event.",
          "key": "referrerUrl",
          "label": "Referrer URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "User Agent associated with the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "When the event was sent.",
          "key": "timestamp",
          "label": "Event Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Custom attribute values associated with the SalesWings custom event.",
          "key": "values",
          "label": "Custom Attribute Values",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "submitTrackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Submit Track Event",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "Identify",
          "description": "Type of the SalesWings custom event (a custom event is visualized in SalesWings cockpit and SalesForce Lead Intent View as "[[Kind]] Data").",
          "key": "kind",
          "label": "Custom Event Kind",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email}",
          "description": "String description of the SalesWings custom event payload (a custom event is visualized in SalesWings cockpit and SalesForce Lead Intent View as "[[Kind]] Data").",
          "key": "data",
          "label": "Custom Event Data",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "Permanent identifier of a Segment user the event is attributed to.",
          "key": "userID",
          "label": "Segment User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "A pseudo-unique substitute for a Segment user ID the event is attributed to.",
          "key": "anonymousID",
          "label": "Segment Anonymous User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email ?? event.properties.email}",
          "description": "Identified email of the Segment User.",
          "key": "email",
          "label": "Email",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.url ?? event.properties.$current_url}",
          "description": "URL associated with the event.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.referrer ?? event.properties.$referrer}",
          "description": "Referrer URL associated with the event.",
          "key": "referrerUrl",
          "label": "Referrer URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "User Agent associated with the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "When the event was sent.",
          "key": "timestamp",
          "label": "Event Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Custom attribute values associated with the SalesWings custom event.",
          "key": "values",
          "label": "Custom Attribute Values",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "submitIdentifyEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Submit Identify Event",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "Permanent identifier of a Segment user the event is attributed to.",
          "key": "userID",
          "label": "Segment User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "A pseudo-unique substitute for a Segment user ID the event is attributed to.",
          "key": "anonymousID",
          "label": "Segment Anonymous User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.url ?? event.properties.$current_url}",
          "description": "URL associated with the event.",
          "key": "url",
          "label": "URL",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.referrer ?? event.properties.$referrer}",
          "description": "Referrer URL associated with the event.",
          "key": "referrerUrl",
          "label": "Referrer URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "User Agent associated with the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "When the event was sent.",
          "key": "timestamp",
          "label": "Event Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "submitPageEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Submit Page Event",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$screen'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "Screen",
          "description": "Type of the SalesWings custom event (a custom event is visualized in SalesWings cockpit and SalesForce Lead Intent View as "[[Kind]] Data").",
          "key": "kind",
          "label": "Custom Event Kind",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "String description of the SalesWings custom event payload (a custom event is visualized in SalesWings cockpit and SalesForce Lead Intent View as "[[Kind]] Data").",
          "key": "data",
          "label": "Custom Event Data",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "Permanent identifier of a Segment user the event is attributed to.",
          "key": "userID",
          "label": "Segment User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "A pseudo-unique substitute for a Segment user ID the event is attributed to.",
          "key": "anonymousID",
          "label": "Segment Anonymous User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email ?? event.properties.email}",
          "description": "Identified email of the Segment User.",
          "key": "email",
          "label": "Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.url ?? event.properties.$current_url}",
          "description": "URL associated with the event.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.referrer ?? event.properties.$referrer}",
          "description": "Referrer URL associated with the event.",
          "key": "referrerUrl",
          "label": "Referrer URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "User Agent associated with the event.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "When the event was sent.",
          "key": "timestamp",
          "label": "Event Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Custom attribute values associated with the SalesWings custom event.",
          "key": "values",
          "label": "Custom Attribute Values",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "submitScreenEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Submit Screen Event",
    },
  ],
  "name": "Saleswings",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-schematic matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Schematic",
  "free": false,
  "icon_url": "/static/services/schematichq.com.png",
  "id": "segment-actions-schematic",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Found on your settings page.",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "Name of event (this will be snake cased in request)",
          "key": "event_name",
          "label": "Event name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Key-value pairs associated with a company (e.g. organization_id: 123456)",
          "key": "company_keys",
          "label": "Company keys",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "Time the event took place",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Key-value pairs associated with a user (e.g. email: [email protected])",
          "key": "user_keys",
          "label": "User keys",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "raw_event_name": "{event.event}",
          },
          "description": "Additional properties to send with event",
          "key": "traits",
          "label": "Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Event",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {},
          "description": "Key-value pairs associated with a company (e.g. organization_id: 123456)",
          "key": "company_keys",
          "label": "Company keys",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.properties.company_name}",
          "description": "Name of company",
          "key": "company_name",
          "label": "Company name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Properties associated with company",
          "key": "company_traits",
          "label": "Company traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "Time the event took place",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Key-value pairs associated with a user (e.g. email: [email protected])",
          "key": "user_keys",
          "label": "User keys",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.properties.name}",
          "description": "User's full name",
          "key": "user_name",
          "label": "User name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {},
          "description": "Properties associated with user",
          "key": "user_traits",
          "label": "User traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "identifyUser",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify User",
    },
  ],
  "name": "Schematic",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-sprig matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Sprig Cloud",
  "free": false,
  "icon_url": "/static/services/sprig.com.png",
  "id": "segment-actions-sprig",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Sprig API key.",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "The event to be sent to Sprig.",
          "key": "eventName",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event.",
          "key": "timestamp",
          "label": "Event Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The userId of the identified user.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Event",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "The userId of the identified user.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "The traits to attribute to the userId.",
          "key": "attributes",
          "label": "Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "identifyUser",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify User",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$screen'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "The event to be sent to Sprig.",
          "key": "eventName",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event.",
          "key": "timestamp",
          "label": "Event Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The userId of the identified user.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Screen Event",
    },
  ],
  "name": "Sprig Cloud",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-stackadapt-cloud matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to StackAdapt",
  "free": false,
  "icon_url": "/static/services/stackadapt.com.png",
  "id": "segment-actions-stackadapt-cloud",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Your StackAdapt Universal Pixel ID",
      "key": "pixelId",
      "label": "Universal Pixel ID",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set') or event = '$pageview' or event = '$screen' or event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID of the user in Segment",
          "key": "user_id",
          "label": "Segment User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The Segment event type (page, track, etc.)",
          "key": "event_type",
          "label": "Event Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "The event name (e.g. Order Completed)",
          "key": "action",
          "label": "Event Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "IP address of the user",
          "key": "ip_fwd",
          "label": "IP Address",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.title}",
          "description": "The title of the page where the event occurred.",
          "key": "title",
          "label": "Page Title",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "The URL of the page where the event occurred.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "The referrer of the page where the event occurred.",
          "key": "referrer",
          "label": "Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.utm_source}",
          "description": "UTM source parameter associated with event",
          "key": "utm_source",
          "label": "UTM Source",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "User-Agent of the user",
          "key": "user_agent",
          "label": "User Agent",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email ?? event.properties.email}",
          "description": "Email address of the individual who triggered the event.",
          "key": "email",
          "label": "Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.phone ?? event.properties.phone}",
          "description": "Phone number of the individual who triggered the event",
          "key": "phone",
          "label": "Phone Number",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.first_name ?? event.properties.first_name}",
          "description": "First name of the individual who triggered the event.",
          "key": "first_name",
          "label": "First Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.last_name ?? event.properties.last_name}",
          "description": "Last name of the individual who triggered the event.",
          "key": "last_name",
          "label": "Last Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "order_id": "{event.properties.order_id}",
            "product_category": "{event.properties.category}",
            "product_id": "{event.properties.product_id}",
            "product_name": "{event.properties.name}",
            "product_price": "{event.properties.price}",
            "product_quantity": "{event.properties.quantity}",
            "revenue": "{event.properties.revenue}",
          },
          "description": "Additional ecommerce fields that are included in the pixel payload.",
          "key": "ecommerce_data",
          "label": "Ecommerce Data",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.products}",
          "description": "The list of products associated with the event (for events with multiple products, such as Order Completed)",
          "key": "ecommerce_products",
          "label": "Products",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "forwardEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Forward Event",
    },
  ],
  "name": "StackAdapt",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-topsort matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Topsort",
  "free": false,
  "icon_url": "/static/services/topsort.com.png",
  "id": "segment-actions-topsort",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Created under Settings > API Integration in the Topsort Manager Platform.",
      "key": "api_key",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Product Viewed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.",
          "key": "id",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Timestamp that the event happened at.",
          "key": "occurredAt",
          "label": "Occurred At",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.",
          "key": "opaqueUserId",
          "label": "Opaque User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.resolvedBidId}",
          "description": "Identifier of an instance of a resolved auction for a determined product. The length should not exceed 128 characters.",
          "key": "resolvedBidId",
          "label": "Resolved Bid ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties.additionalAttribution}",
          },
          "description": "Additional attribution information.",
          "key": "additionalAttribution",
          "label": "Additional Attribution",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "impression",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Impression",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Product Clicked'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.",
          "key": "id",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Timestamp that the event happened at.",
          "key": "occurredAt",
          "label": "Occurred At",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.",
          "key": "opaqueUserId",
          "label": "Opaque User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.resolvedBidId}",
          "description": "Identifier of an instance of a resolved auction for a determined product. The length should not exceed 128 characters.",
          "key": "resolvedBidId",
          "label": "Resolved Bid ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties.additionalAttribution}",
          },
          "description": "Additional attribution information.",
          "key": "additionalAttribution",
          "label": "Additional Attribution",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "click",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Click",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Order Completed'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.",
          "key": "id",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Timestamp that the event happened at.",
          "key": "occurredAt",
          "label": "Occurred At",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.",
          "key": "opaqueUserId",
          "label": "Opaque User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.products}",
          "description": "Item information list related to the event.",
          "key": "items",
          "label": "Items",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "purchase",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Purchase",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Banner Impression'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.",
          "key": "id",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Timestamp that the event happened at.",
          "key": "occurredAt",
          "label": "Occurred At",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.",
          "key": "opaqueUserId",
          "label": "Opaque User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.resolvedBidId}",
          "description": "Identifier of an instance of a resolved auction for a determined product. The length should not exceed 128 characters.",
          "key": "resolvedBidId",
          "label": "Resolved Bid ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties.additionalAttribution}",
          },
          "description": "Additional attribution information.",
          "key": "additionalAttribution",
          "label": "Additional Attribution",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "impression",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Banner Impression",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') and event = 'Banner Click'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.",
          "key": "id",
          "label": "Event ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Timestamp that the event happened at.",
          "key": "occurredAt",
          "label": "Occurred At",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.",
          "key": "opaqueUserId",
          "label": "Opaque User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.resolvedBidId}",
          "description": "Identifier of an instance of a resolved auction for a determined product. The length should not exceed 128 characters.",
          "key": "resolvedBidId",
          "label": "Resolved Bid ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties.additionalAttribution}",
          },
          "description": "Additional attribution information.",
          "key": "additionalAttribution",
          "label": "Additional Attribution",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "click",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Banner Click",
    },
  ],
  "name": "Topsort",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-usermaven matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Usermaven",
  "free": false,
  "icon_url": "/static/services/usermaven.com.png",
  "id": "segment-actions-usermaven",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Found on your general settings page.",
      "key": "api_key",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "Found on your general settings page.",
      "key": "server_token",
      "label": "Server Token",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "The event name",
          "key": "event",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Attributes associated with the event",
          "key": "event_attributes",
          "label": "Event Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.id}",
          "description": "The user id, to uniquely identify the user",
          "key": "user_id",
          "label": "User id",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.email ?? person.properties.email}",
          "description": "The user email address",
          "key": "user_email",
          "label": "Email address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.created_at ?? person.properties.created_at}",
          "description": "The timestamp when the user was created",
          "key": "user_created_at",
          "label": "Created at",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "User Anonymous id",
          "key": "user_anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The ID of the event.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$pathname}",
          "description": "The path of the document.",
          "key": "doc_path",
          "label": "Document Path",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The search query of the document.",
          "key": "doc_search",
          "label": "Document Search",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of the event.",
          "key": "event_type",
          "label": "Event Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.title}",
          "description": "The title of the page where the event occurred.",
          "key": "page_title",
          "label": "Page Title",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "The referrer of the page where the event occurred.",
          "key": "referer",
          "label": "Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "The URL of the page where the event occurred.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the browser.",
          "key": "user_agent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language of the browser.",
          "key": "user_language",
          "label": "User Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The time of the event in UTC.",
          "key": "utc_time",
          "label": "UTC Time",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "content": "{event.properties.utm_content}",
            "medium": "{event.properties.utm_medium}",
            "name": "{event.properties.utm_campaign}",
            "source": "{event.properties.utm_source}",
            "term": "{event.properties.utm_term}",
          },
          "description": "Information about the UTM parameters.",
          "key": "utm",
          "label": "UTM",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "density": "",
            "height": "{event.context.screen.height}",
            "width": "{event.context.screen.width}",
          },
          "description": "Information about the screen.",
          "key": "screen",
          "label": "Screen",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.timezone ?? person.properties.timezone}",
          "description": "The timezone of the browser.",
          "key": "timezone",
          "label": "Timezone",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "source_ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "track",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Event",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "The user id, to uniquely identify the user",
          "key": "user_id",
          "label": "User id",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email ?? event.properties.email}",
          "description": "The user email address",
          "key": "user_email",
          "label": "Email address",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.created_at}",
          "description": "The timestamp when the user was created",
          "key": "user_created_at",
          "label": "Created at",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.first_name ?? event.properties.first_name}",
          "description": "The user first name",
          "key": "user_first_name",
          "label": "First name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.last_name ?? event.properties.last_name}",
          "description": "The user last name",
          "key": "user_last_name",
          "label": "Last name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "The user custom attributes",
          "key": "user_custom_attributes",
          "label": "Custom attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "User Anonymous id",
          "key": "user_anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The ID of the event.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$pathname}",
          "description": "The path of the document.",
          "key": "doc_path",
          "label": "Document Path",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The search query of the document.",
          "key": "doc_search",
          "label": "Document Search",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of the event.",
          "key": "event_type",
          "label": "Event Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.title}",
          "description": "The title of the page where the event occurred.",
          "key": "page_title",
          "label": "Page Title",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "The referrer of the page where the event occurred.",
          "key": "referer",
          "label": "Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "The URL of the page where the event occurred.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the browser.",
          "key": "user_agent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language of the browser.",
          "key": "user_language",
          "label": "User Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The time of the event in UTC.",
          "key": "utc_time",
          "label": "UTC Time",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "content": "{event.properties.utm_content}",
            "medium": "{event.properties.utm_medium}",
            "name": "{event.properties.utm_campaign}",
            "source": "{event.properties.utm_source}",
            "term": "{event.properties.utm_term}",
          },
          "description": "Information about the UTM parameters.",
          "key": "utm",
          "label": "UTM",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "density": "",
            "height": "{event.context.screen.height}",
            "width": "{event.context.screen.width}",
          },
          "description": "Information about the screen.",
          "key": "screen",
          "label": "Screen",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.timezone ?? person.properties.timezone}",
          "description": "The timezone of the browser.",
          "key": "timezone",
          "label": "Timezone",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "source_ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "identify",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify User",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$groupidentify'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.properties.$group_0}",
          "description": "The company id, to uniquely identify the company",
          "key": "company_id",
          "label": "Company id",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The user id, to uniquely identify the user",
          "key": "user_id",
          "label": "User id",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.name}",
          "description": "The company name",
          "key": "company_name",
          "label": "Company name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.created_at}",
          "description": "The timestamp when the company was created",
          "key": "company_created_at",
          "label": "Company created at",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "The company custom attributes",
          "key": "company_custom_attributes",
          "label": "Company custom attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "User Anonymous id",
          "key": "user_anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The ID of the event.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$pathname}",
          "description": "The path of the document.",
          "key": "doc_path",
          "label": "Document Path",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The search query of the document.",
          "key": "doc_search",
          "label": "Document Search",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of the event.",
          "key": "event_type",
          "label": "Event Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.title}",
          "description": "The title of the page where the event occurred.",
          "key": "page_title",
          "label": "Page Title",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "The referrer of the page where the event occurred.",
          "key": "referer",
          "label": "Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "The URL of the page where the event occurred.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the browser.",
          "key": "user_agent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language of the browser.",
          "key": "user_language",
          "label": "User Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The time of the event in UTC.",
          "key": "utc_time",
          "label": "UTC Time",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "content": "{event.properties.utm_content}",
            "medium": "{event.properties.utm_medium}",
            "name": "{event.properties.utm_campaign}",
            "source": "{event.properties.utm_source}",
            "term": "{event.properties.utm_term}",
          },
          "description": "Information about the UTM parameters.",
          "key": "utm",
          "label": "UTM",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "density": "",
            "height": "{event.context.screen.height}",
            "width": "{event.context.screen.width}",
          },
          "description": "Information about the screen.",
          "key": "screen",
          "label": "Screen",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.timezone ?? person.properties.timezone}",
          "description": "The timezone of the browser.",
          "key": "timezone",
          "label": "Timezone",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "source_ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "group",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Group",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "The user id, to uniquely identify the user",
          "key": "user_id",
          "label": "User id",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.email ?? person.properties.email}",
          "description": "The user email address",
          "key": "user_email",
          "label": "Email address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.created_at ?? person.properties.created_at}",
          "description": "The timestamp when the user was created",
          "key": "user_created_at",
          "label": "Created at",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.name}",
          "description": "The name of the page",
          "key": "page_name",
          "label": "Page Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "User Anonymous id",
          "key": "user_anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The ID of the event.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$pathname}",
          "description": "The path of the document.",
          "key": "doc_path",
          "label": "Document Path",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The search query of the document.",
          "key": "doc_search",
          "label": "Document Search",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of the event.",
          "key": "event_type",
          "label": "Event Type",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.title}",
          "description": "The title of the page where the event occurred.",
          "key": "page_title",
          "label": "Page Title",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "The referrer of the page where the event occurred.",
          "key": "referer",
          "label": "Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "The URL of the page where the event occurred.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the browser.",
          "key": "user_agent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language of the browser.",
          "key": "user_language",
          "label": "User Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The time of the event in UTC.",
          "key": "utc_time",
          "label": "UTC Time",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "content": "{event.properties.utm_content}",
            "medium": "{event.properties.utm_medium}",
            "name": "{event.properties.utm_campaign}",
            "source": "{event.properties.utm_source}",
            "term": "{event.properties.utm_term}",
          },
          "description": "Information about the UTM parameters.",
          "key": "utm",
          "label": "UTM",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "density": "",
            "height": "{event.context.screen.height}",
            "width": "{event.context.screen.width}",
          },
          "description": "Information about the screen.",
          "key": "screen",
          "label": "Screen",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.timezone ?? person.properties.timezone}",
          "description": "The timezone of the browser.",
          "key": "timezone",
          "label": "Timezone",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "source_ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "page",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Page",
    },
  ],
  "name": "Usermaven",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-usermotion matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to UserMotion",
  "free": false,
  "icon_url": "/static/services/usermotion.com.png",
  "id": "segment-actions-usermotion",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Your UserMotion API Key",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "A identifier for a known user.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "An identifier for an anonymous user",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email ?? event.email}",
          "description": "The email address of the identified user",
          "key": "email",
          "label": "Email",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Traits to associate with the user",
          "key": "traits",
          "label": "Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "identify",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify User",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$groupidentify'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "A identifier for a known user.",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "An identifier for an anonymous user",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$group_0}",
          "description": "A identifier for a known company.",
          "key": "groupId",
          "label": "Group ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Traits to associate with the company",
          "key": "traits",
          "label": "Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "group",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify Group",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify') or event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "A identifier for a known user.",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "An identifier for an anonymous user",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event ?? 'pageview'}",
          "description": "The name of the track() event or page() event",
          "key": "eventName",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "Context properties to send with the event",
          "key": "context",
          "label": "Context properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Properties to send with the event.",
          "key": "properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "track",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Analytics Event",
    },
  ],
  "name": "UserMotion",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-userpilot-cloud matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Userpilot Cloud",
  "free": false,
  "icon_url": "/static/services/userpilot.com.png",
  "id": "segment-actions-userpilot-cloud",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Your Userpilot API key can be found in the [Userpilot environment](https://run.userpilot.io/environment) dashboard.",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": "https://analytex.userpilot.io/",
      "description": "Your Userpilot API endpoint can be found in the [Userpilot environment](https://run.userpilot.io/environment) dashboard.",
      "key": "endpoint",
      "label": "API Endpoint",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID of the logged-in user.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.createdAt}",
          "description": "The date the user profile was created at",
          "key": "createdAt",
          "label": "User Created At Date",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Segment traits",
          "key": "traits",
          "label": "Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "identifyUser",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify User",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$groupidentify'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.properties.$group_0}",
          "description": "The ID of the company.",
          "key": "groupId",
          "label": "Company ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.createdAt}",
          "description": "The date the company profile was created at",
          "key": "createdAt",
          "label": "Company Created At Date",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Segment traits",
          "key": "traits",
          "label": "Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "identifyCompany",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify Company",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id ?? event.distinct_id}",
          "description": "The ID of the logged-in user.",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "Event name",
          "key": "name",
          "label": "Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Event properties",
          "key": "properties",
          "label": "Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Event",
    },
  ],
  "name": "Userpilot Cloud",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-voyage matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Voyage",
  "free": false,
  "icon_url": "/static/services/voyagesms.com.png",
  "id": "segment-actions-voyage",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Voyage API key. You can create a new API key or find your existing API key in the Advanced section of your [Settings page](https://app.voyagetext.com/dashboard/settings/advanced).",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.timestamp}",
          "description": "Date of cart creation. Default to current date and time.",
          "key": "DateCreated",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.OrderNumber}",
          "description": "Order number from e-commerce platform.",
          "key": "OrderNumber",
          "label": "Order Number",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.SourceId}",
          "description": "Order id from e-commerce platform (same as checkout id).",
          "key": "SourceId",
          "label": "Order ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.TokenId}",
          "description": "A reference to the order that is a string value.",
          "key": "TokenId",
          "label": "Token ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.CustomerId}",
          "description": "Customer ID from e-commerce platform.",
          "key": "CustomerId",
          "label": "Customer ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.Url}",
          "description": "Link for user to click on to see status.",
          "key": "Url",
          "label": "Order URL",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.OrderTotal}",
          "description": "Total Order Value.",
          "key": "OrderTotal",
          "label": "Order Total",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.TotalSpent}",
          "description": "Total customer lifetime spend.",
          "key": "TotalSpent",
          "label": "Total Spent",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.FirstName}",
          "description": "Customer's first name.",
          "key": "FirstName",
          "label": "First name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.lastName}",
          "description": "Customer's last name.",
          "key": "lastName",
          "label": "Last name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.Phone}",
          "description": "Customer's phone number.",
          "key": "Phone",
          "label": "Phone number",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.Email}",
          "description": "Customer's email address",
          "key": "Email",
          "label": "Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.Zip}",
          "description": "Customer's postal code",
          "key": "Zip",
          "label": "Zip code",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The date and time when the updates interacted with.",
          "key": "LastUpdated",
          "label": "Last Updated",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.ProductImageUrl}",
          "description": "URL with product image.",
          "key": "ProductImageUrl",
          "label": "Product Image URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.LinkReference}",
          "description": "Used as a key to link events together.",
          "key": "LinkReference",
          "label": "Link reference",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.HomepageUrl}",
          "description": "URL of the tenant's e-commerce homepage.",
          "key": "HomepageUrl",
          "label": "Homepage URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "trackOrderPlaced",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Order Placed Event",
    },
  ],
  "name": "Voyage",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-vwo-cloud matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to VWO Cloud Mode",
  "free": false,
  "icon_url": "/static/services/vwo.com.png",
  "id": "segment-actions-vwo-cloud",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Enter your VWO Account ID",
      "key": "vwoAccountId",
      "label": "Your VWO account ID",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "VWO Fullstack SDK Key. It is mandatory when using the VWO Fullstack suite.",
      "key": "apikey",
      "label": "VWO SDK Key",
      "required": false,
      "secret": true,
      "type": "string",
    },
    {
      "choices": [
        {
          "label": "US",
          "value": "US",
        },
        {
          "label": "Europe",
          "value": "EU",
        },
        {
          "label": "Asia",
          "value": "AS",
        },
      ],
      "default": "US",
      "description": "VWO Region to sync data to. Default is US",
      "key": "region",
      "label": "Region",
      "required": false,
      "secret": false,
      "type": "choice",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "Name of the event",
          "key": "name",
          "label": "Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "JSON object containing additional properties that will be associated with the event.",
          "key": "properties",
          "label": "Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.vwo_uuid}",
          "description": "VWO UUID",
          "key": "vwoUuid",
          "label": "VWO UUID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.context.page}",
          },
          "description": "Contains context information regarding a webpage",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "IP address of the user",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "User-Agent of the user",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Timestamp on the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Event",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Visitor's attributes to be mapped",
          "key": "attributes",
          "label": "attributes",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.properties.vwo_uuid}",
          "description": "VWO UUID",
          "key": "vwoUuid",
          "label": "VWO UUID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.context.page}",
          },
          "description": "Contains context information regarding a webpage",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "IP address of the user",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "User-Agent of the user",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Timestamp on the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "identifyUser",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify User",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.properties.$current_url}",
          "description": "URL of the webpage",
          "key": "url",
          "label": "Page URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.vwo_uuid}",
          "description": "VWO UUID",
          "key": "vwoUuid",
          "label": "VWO UUID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.context.page}",
          },
          "description": "Contains context information regarding a webpage",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "IP address of the user",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "User-Agent of the user",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "Timestamp on the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "pageVisit",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Page Visit",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = 'Audience Entered' or event = 'Audience Exited'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "Name of the event",
          "key": "name",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "An unique identifier for the user",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Anonymous ID for users",
          "key": "anonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.audience_key}",
          "description": "Segment's audience ID",
          "key": "audienceId",
          "label": "Audience ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "syncAudience",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Sync Audience",
    },
  ],
  "name": "VWO Cloud Mode",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-actions-xtremepush matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Xtremepush",
  "free": false,
  "icon_url": "/static/services/xtremepush.com.png",
  "id": "segment-actions-xtremepush",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Xtremepush integration URL can be found on the Xtremepush integration overview page",
      "key": "url",
      "label": "URL",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "Auth token for API can be found on the Xtremepush integration overview page",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of the event",
          "key": "type",
          "label": "Event type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "email": "{person.properties.email}",
            "phone": "{person.properties.phone}",
            "userId": "{person.id}",
          },
          "description": "The unique identifiers for the user",
          "key": "identifiers",
          "label": "Identifiers",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.event}",
          "description": "The name of the Segment track() event.",
          "key": "event",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "The properties of the Segment track() event.",
          "key": "properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The message ID of the event.",
          "key": "messageId",
          "label": "Message ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "track",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Send Analytics Events",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of the event",
          "key": "type",
          "label": "Event type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "anonymousId": "{event.distinct_id}",
            "email": "{person.properties.email}",
            "phone": "{person.properties.phone}",
            "userId": "{person.id}",
          },
          "description": "The unique identifiers for the user",
          "key": "identifiers",
          "label": "Identifiers",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Attributes assocatiated with the user.",
          "key": "traits",
          "label": "User Attributes",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event.",
          "key": "timestamp",
          "label": "Timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The message ID of the event.",
          "key": "messageId",
          "label": "Message ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "identify",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Send User Profile Data",
    },
  ],
  "name": "Xtremepush",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-calliper-cloud-actions matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Calliper Cloud",
  "free": false,
  "icon_url": "/static/services/cloud.com.png",
  "id": "segment-calliper-cloud-actions",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Your company id in Calliper. During the onboarding you can find it by selecting Segment integration. After onboarding is complete you can find it by opening "Data Sources" in the main menu, pressing "New Data Source" and pressing "Connect" on a Segment card.",
      "key": "companyId",
      "label": "Company id",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "Your Segment Key in Calliper. Please follow the instructions to find the Company id, secret key is located in a field next to it.",
      "key": "segmentKey",
      "label": "Segment Key",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "A type of your event, e.g. a sign up or a name of an action within your product.",
          "key": "event",
          "label": "Event Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event. Could be any date string/number value compatible with JavaScript Date constructor: e.g. milliseconds epoch or an ISO datetime. If time is not sent with the event, it will be set to the request time.",
          "key": "time",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "A distinct ID of an unidentified (logged out) user. Device id is used if available",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "A distinct ID of an identified (logged in) user.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The unique identifier of the group that performed this event.",
          "key": "group_id",
          "label": "Group ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "A random id that is unique to an event. ID is being used to prevent event duplication. All the events that share the same unique id besides the first one will be ignored.",
          "key": "event_unique_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event.properties.$app_version}",
          "description": "The current version of your application.",
          "key": "app_version",
          "label": "App Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os}",
          "description": "The name of the mobile operating system or browser that the user is using.",
          "key": "os_name",
          "label": "OS Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$os_version}",
          "description": "The version of the mobile operating system or browser the user is using.",
          "key": "os_version",
          "label": "OS Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_id}",
          "description": "A unique identifier for the device the user is using.",
          "key": "device_id",
          "label": "Device ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_type}",
          "description": "Platform of the device.",
          "key": "platform",
          "label": "Platform",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_manufacturer}",
          "description": "The device manufacturer that the user is using.",
          "key": "device_manufacturer",
          "label": "Device Manufacturer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$device_model}",
          "description": "The device model that the user is using.",
          "key": "device_model",
          "label": "Device Model",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The carrier that the user is using.",
          "key": "carrier",
          "label": "Carrier",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "Whether cellular is enabled.",
          "key": "cellular",
          "label": "Cellular Enabled",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
        {
          "default": "{event.properties.$geoip_country_name}",
          "description": "The current country of the user.",
          "key": "country",
          "label": "Country",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The current region of the user.",
          "key": "region",
          "label": "Region",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$geoip_city_name}",
          "description": "The current city of the user.",
          "key": "city",
          "label": "City",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language set by the user.",
          "key": "language",
          "label": "Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$lib}",
          "description": "The name of the SDK used to send events.",
          "key": "library_name",
          "label": "Library Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$lib_version}",
          "description": "The version of the SDK used to send events.",
          "key": "library_version",
          "label": "Library Version",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user. This is only used for geolocation and won't be stored.",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "The full URL of the webpage on which the event is triggered.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$pathname}",
          "description": "The relative URL of the webpage on which the event is triggered.",
          "key": "path",
          "label": "Page Path",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.title}",
          "description": "The name of the webpage on which the event is triggered.",
          "key": "page_title",
          "label": "Page Title",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "Referrer url",
          "key": "referrer",
          "label": "Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "User agent",
          "key": "user_agent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "An object of key-value pairs that represent additional data to be sent along with the event.",
          "key": "event_properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Event",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event. Could be any date string/number value compatible with JavaScript Date constructor: e.g. milliseconds epoch or an ISO datetime. If time is not sent with the event, it will be set to the request time.",
          "key": "time",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "A distinct ID of an identified (logged in) user.",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "A distinct ID of an unidentified (logged out) user. Device id is used if available",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.first_name ?? person.properties.firstName}",
          "description": "User's first name",
          "key": "first_name",
          "label": "First Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.last_name ?? person.properties.lastName}",
          "description": "User's last name",
          "key": "last_name",
          "label": "Last Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.name}",
          "description": "User's full name",
          "key": "name",
          "label": "Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email}",
          "description": "User's email address",
          "key": "email",
          "label": "Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.phone}",
          "description": "User's phone number",
          "key": "phone",
          "label": "Phone",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.createdAt ?? person.properties.created_at}",
          "description": "The timestamp for when the user profile was first created",
          "key": "created_at",
          "label": "User Creation Time",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Properties to set on the user profile",
          "key": "traits",
          "label": "User Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "identifyUser",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify User",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$groupidentify'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event. Could be any date string/number value compatible with JavaScript Date constructor: e.g. milliseconds epoch or an ISO datetime. If time is not sent with the event, it will be set to the request time.",
          "key": "time",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$group_0}",
          "description": "The unique identifier of the group.",
          "key": "group_id",
          "label": "Group ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "The properties to set on the group profile.",
          "key": "traits",
          "label": "Group Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "identifyGroup",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify Group",
    },
  ],
  "name": "Calliper Cloud",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-encharge-cloud-actions matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Encharge",
  "free": false,
  "icon_url": "/static/services/encharge.io.png",
  "id": "segment-encharge-cloud-actions",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Encharge.io API Key. This can be found on your [Account page](https://app.encharge.io/settings/api-keys).",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "The name of the event.",
          "key": "event",
          "label": "Event Name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "The properties of the event.",
          "key": "properties",
          "label": "Event Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Any default or custom field of the user. On the left-hand side, input the API name of the field as seen in your Encharge account. On the right-hand side, map the Segment field that contains the value. Any properties that don't exist will be created automatically. See more information in [Encharge's documentation](https://help.encharge.io/article/206-create-and-manage-custom-fields).",
          "key": "userFields",
          "label": "User Fields",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of event.",
          "key": "type",
          "label": "Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email ?? event.properties.email}",
          "description": "The email address of the user.",
          "key": "email",
          "label": "Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "An anonymous identifier for this user.",
          "key": "segmentAnonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The User ID associated with the user in Encharge.",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "An ID associating the event with a group.",
          "key": "groupId",
          "label": "Group ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "messageId",
          "label": "MessageId",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the user. Used to determine the device, browser and operating system.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "content": "{event.properties.utm_content}",
            "medium": "{event.properties.utm_medium}",
            "name": "{event.properties.utm_campaign}",
            "source": "{event.properties.utm_source}",
            "term": "{event.properties.utm_term}",
          },
          "description": "UTM campaign information.",
          "key": "campaign",
          "label": "Campaign",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "path": "{event.properties.$pathname}",
            "referrer": "{event.properties.$referrer}",
            "search": "",
            "title": "{event.properties.title}",
            "url": "{event.properties.$current_url}",
          },
          "description": "Information about the page where the event occurred.",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "city": "{event.properties.$geoip_city_name}",
            "country": "{event.properties.$geoip_country_name}",
            "region": "",
          },
          "description": "Information about the location of the user.",
          "key": "location",
          "label": "Location",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "trackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Event",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Fields to associate with the user in Encharge. Any unexisting fields will be automatically created in Encharge.",
          "key": "user",
          "label": "User Fields",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.properties.email ?? person.properties.email}",
          "description": "The email address of the user.",
          "key": "email",
          "label": "Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of event.",
          "key": "type",
          "label": "Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "An anonymous identifier for this user.",
          "key": "segmentAnonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The User ID associated with the user in Encharge.",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "An ID associating the event with a group.",
          "key": "groupId",
          "label": "Group ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "messageId",
          "label": "MessageId",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the user. Used to determine the device, browser and operating system.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "content": "{event.properties.utm_content}",
            "medium": "{event.properties.utm_medium}",
            "name": "{event.properties.utm_campaign}",
            "source": "{event.properties.utm_source}",
            "term": "{event.properties.utm_term}",
          },
          "description": "UTM campaign information.",
          "key": "campaign",
          "label": "Campaign",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "path": "{event.properties.$pathname}",
            "referrer": "{event.properties.$referrer}",
            "search": "",
            "title": "{event.properties.title}",
            "url": "{event.properties.$current_url}",
          },
          "description": "Information about the page where the event occurred.",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "city": "{event.properties.$geoip_city_name}",
            "country": "{event.properties.$geoip_country_name}",
            "region": "",
          },
          "description": "Information about the location of the user.",
          "key": "location",
          "label": "Location",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "identifyUser",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify User",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$pageview'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Custom properties to send with the pageview. Please note that URL, title, refererrer, path and search are automatically collected and don't have to be mapped here.",
          "key": "properties",
          "label": "Page View Properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Any default or custom field of the user. On the left-hand side, input the API name of the field as seen in your Encharge account. On the right-hand side, map the Segment field that contains the value. Any properties that don't exist will be created automatically. See more information in [Encharge's documentation](https://help.encharge.io/article/206-create-and-manage-custom-fields).",
          "key": "userFields",
          "label": "User Fields",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.event == '$pageview' ? 'page' : event.event == '$screen' ? 'screen' : event.event == '$groupidentify' ? 'group' : event.event in ('$identify', '$set') ? 'identify' : event.event == '$alias' ? 'alias' : 'track'}",
          "description": "The type of event.",
          "key": "type",
          "label": "Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email ?? event.properties.email}",
          "description": "The email address of the user.",
          "key": "email",
          "label": "Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "An anonymous identifier for this user.",
          "key": "segmentAnonymousId",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The User ID associated with the user in Encharge.",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "An ID associating the event with a group.",
          "key": "groupId",
          "label": "Group ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "messageId",
          "label": "MessageId",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$raw_user_agent}",
          "description": "The user agent of the user. Used to determine the device, browser and operating system.",
          "key": "userAgent",
          "label": "User Agent",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "content": "{event.properties.utm_content}",
            "medium": "{event.properties.utm_medium}",
            "name": "{event.properties.utm_campaign}",
            "source": "{event.properties.utm_source}",
            "term": "{event.properties.utm_term}",
          },
          "description": "UTM campaign information.",
          "key": "campaign",
          "label": "Campaign",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "path": "{event.properties.$pathname}",
            "referrer": "{event.properties.$referrer}",
            "search": "",
            "title": "{event.properties.title}",
            "url": "{event.properties.$current_url}",
          },
          "description": "Information about the page where the event occurred.",
          "key": "page",
          "label": "Page",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "city": "{event.properties.$geoip_city_name}",
            "country": "{event.properties.$geoip_country_name}",
            "region": "",
          },
          "description": "Information about the location of the user.",
          "key": "location",
          "label": "Location",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "trackPageView",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Page View",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$alias'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "The new User ID to associate with the user in Encharge.",
          "key": "userId",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.previousId}",
          "description": "The previous User ID associated with the user in Encharge.",
          "key": "previousUserId",
          "label": "Previous User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp of the event",
          "key": "timestamp",
          "label": "Timestamp",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The Segment messageId",
          "key": "messageId",
          "label": "MessageId",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "aliasUser",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Alias User",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$groupidentify'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "company",
          "description": "The type of Encharge object to create or update.",
          "key": "objectType",
          "label": "Object Type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$group_0}",
          "description": "An ID from your app/database that is used to uniquely identify the object in Encharge.",
          "key": "externalId",
          "label": "External Object ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": undefined,
          "description": "The Encharge ID of the object. Usually, you want to omit this and use External ID.",
          "key": "id",
          "label": "Object ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Data for the object fields in Encharge. Any unexisting fields will be ignored.",
          "key": "objectData",
          "label": "Object Fields",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.id}",
          "description": "The User ID of the user to associate with the object. If no email or user ID is provided, no user will be created and associated.",
          "key": "userId",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.email}",
          "description": "The email of the user to associate with the object. If no email or user ID is provided, no user will be created and associated.",
          "key": "email",
          "label": "Email",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "createUpdateObject",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Create or Update Object",
    },
  ],
  "name": "Encharge",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-inleads-ai matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Inleads AI",
  "free": false,
  "icon_url": "/static/services/inleads.ai.png",
  "id": "segment-inleads-ai",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Your Inleads AI API Key. You can find your API Key in your inleads.ai settings.",
      "key": "apiKey",
      "label": "API Key",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.event}",
          "description": "The name of the event",
          "key": "eventName",
          "label": "Event name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The user id, to uniquely identify the user associated with the event",
          "key": "user_id",
          "label": "User id",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$group_0}",
          "description": "The account id, to uniquely identify the account associated with the user",
          "key": "account_id",
          "label": "Account id",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "The properties of the track call",
          "key": "properties",
          "label": "Event properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "The Traits of the track call",
          "key": "traits",
          "label": "Event Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "browser": "{event.properties.$raw_user_agent}",
            "city": "{event.properties.$geoip_city_name}",
            "country": "{event.properties.$geoip_country_name}",
            "deviceModel": "{event.properties.$device_model}",
            "deviceType": "{event.properties.$device_type}",
            "deviceVendor": "{event.properties.$device_manufacturer}",
            "ip": "{event.properties.$ip}",
            "latitude": "{event.properties.$geoip_latitude}",
            "longitude": "{event.properties.$geoip_longitude}",
            "os": "{event.properties.$os}",
            "osVersion": "{event.properties.$os_version}",
            "timeZone": "{event.properties.$timezone ?? event.properties.timezone}",
          },
          "description": "User metadata including IP, Location, etc.",
          "key": "userMeta",
          "label": "User Metadata",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "User Anonymous id",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The ID of the event.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "The URL of the page where the event occurred.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "The referrer of the page where the event occurred.",
          "key": "referer",
          "label": "Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language of the browser.",
          "key": "user_language",
          "label": "User Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The time of the event in UTC.",
          "key": "utc_time",
          "label": "UTC Time",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "content": "{event.properties.utm_content}",
            "medium": "{event.properties.utm_medium}",
            "name": "{event.properties.utm_campaign}",
            "source": "{event.properties.utm_source}",
            "term": "{event.properties.utm_term}",
          },
          "description": "Information about the UTM parameters.",
          "key": "utm",
          "label": "UTM",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "density": "",
            "height": "{event.context.screen.height}",
            "width": "{event.context.screen.width}",
          },
          "description": "Information about the screen.",
          "key": "screen",
          "label": "Screen",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$timezone ?? event.properties.timezone}",
          "description": "The timezone of the browser.",
          "key": "timezone",
          "label": "Timezone",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "source_ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "track",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Event",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event = '$groupidentify'",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.properties.$group_0}",
          "description": "The External ID of the account to send properties for",
          "key": "account_id",
          "label": "Account id",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The ID associated with the user",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.name ?? event.properties.name}",
          "description": "The Account name",
          "key": "name",
          "label": "Account name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.created_at ?? person.properties.createdAt}",
          "description": "The timestamp when the account was created, represented in the ISO-8601 date format. For instance, "2023-09-26T15:30:00Z".",
          "key": "created_at",
          "label": "Account created at",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "The properties of the account",
          "key": "traits",
          "label": "Account properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{person.properties.website}",
          "description": "The account website",
          "key": "website",
          "label": "Account website",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "browser": "{event.properties.$raw_user_agent}",
            "city": "{event.properties.$geoip_city_name}",
            "country": "{event.properties.$geoip_country_name}",
            "deviceModel": "{event.properties.$device_model}",
            "deviceType": "{event.properties.$device_type}",
            "deviceVendor": "{event.properties.$device_manufacturer}",
            "ip": "{event.properties.$ip}",
            "latitude": "{event.properties.$geoip_latitude}",
            "longitude": "{event.properties.$geoip_longitude}",
            "os": "{event.properties.$os}",
            "osVersion": "{event.properties.$os_version}",
            "timeZone": "{event.properties.$timezone ?? event.properties.timezone}",
          },
          "description": "User metadata including IP, Location, etc.",
          "key": "userMeta",
          "label": "User Metadata",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "User Anonymous id",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The ID of the event.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "The URL of the page where the event occurred.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "The referrer of the page where the event occurred.",
          "key": "referer",
          "label": "Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language of the browser.",
          "key": "user_language",
          "label": "User Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The time of the event in UTC.",
          "key": "utc_time",
          "label": "UTC Time",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "content": "{event.properties.utm_content}",
            "medium": "{event.properties.utm_medium}",
            "name": "{event.properties.utm_campaign}",
            "source": "{event.properties.utm_source}",
            "term": "{event.properties.utm_term}",
          },
          "description": "Information about the UTM parameters.",
          "key": "utm",
          "label": "UTM",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "density": "",
            "height": "{event.context.screen.height}",
            "width": "{event.context.screen.width}",
          },
          "description": "Information about the screen.",
          "key": "screen",
          "label": "Screen",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$timezone ?? event.properties.timezone}",
          "description": "The timezone of the browser.",
          "key": "timezone",
          "label": "Timezone",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "source_ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "group",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Group",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{person.id}",
          "description": "The External ID of the user",
          "key": "user_id",
          "label": "User ID",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.name ?? event.properties.name}",
          "description": "The user's name",
          "key": "name",
          "label": "Name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.first_name ?? event.properties.first_name}",
          "description": "The user's first name. This field is mandatory if you're not providing a name field",
          "key": "first_name",
          "label": "First name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.last_name ?? event.properties.last_name}",
          "description": "The user's last name. This field is mandatory if you're not providing a name field",
          "key": "last_name",
          "label": "Last name",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email ?? event.properties.email}",
          "description": "The user's email address",
          "key": "email",
          "label": "Email address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$group_0}",
          "description": "The account id, to uniquely identify the account associated with the user",
          "key": "account_id",
          "label": "Account id",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.created_at ?? person.properties.createdAt}",
          "description": "The timestamp when the user was created, represented in the ISO-8601 date format. For instance, "2023-09-26T15:30:00Z".",
          "key": "created_at",
          "label": "Created at",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{person.properties}",
          },
          "description": "Properties to associate with the user",
          "key": "traits",
          "label": "Traits",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "browser": "{event.properties.$raw_user_agent}",
            "city": "{event.properties.$geoip_city_name}",
            "country": "{event.properties.$geoip_country_name}",
            "deviceModel": "{event.properties.$device_model}",
            "deviceType": "{event.properties.$device_type}",
            "deviceVendor": "{event.properties.$device_manufacturer}",
            "ip": "{event.properties.$ip}",
            "latitude": "{event.properties.$geoip_latitude}",
            "longitude": "{event.properties.$geoip_longitude}",
            "os": "{event.properties.$os}",
            "osVersion": "{event.properties.$os_version}",
            "timeZone": "{event.properties.$timezone ?? event.properties.timezone}",
          },
          "description": "User metadata including IP, Location, etc.",
          "key": "userMeta",
          "label": "User Metadata",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.distinct_id}",
          "description": "User Anonymous id",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.uuid}",
          "description": "The ID of the event.",
          "key": "event_id",
          "label": "Event ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$current_url}",
          "description": "The URL of the page where the event occurred.",
          "key": "url",
          "label": "URL",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$referrer}",
          "description": "The referrer of the page where the event occurred.",
          "key": "referer",
          "label": "Referrer",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$locale}",
          "description": "The language of the browser.",
          "key": "user_language",
          "label": "User Language",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The time of the event in UTC.",
          "key": "utc_time",
          "label": "UTC Time",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "content": "{event.properties.utm_content}",
            "medium": "{event.properties.utm_medium}",
            "name": "{event.properties.utm_campaign}",
            "source": "{event.properties.utm_source}",
            "term": "{event.properties.utm_term}",
          },
          "description": "Information about the UTM parameters.",
          "key": "utm",
          "label": "UTM",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "density": "",
            "height": "{event.context.screen.height}",
            "width": "{event.context.screen.width}",
          },
          "description": "Information about the screen.",
          "key": "screen",
          "label": "Screen",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "{event.properties.$timezone ?? event.properties.timezone}",
          "description": "The timezone of the browser.",
          "key": "timezone",
          "label": "Timezone",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.properties.$ip}",
          "description": "The IP address of the user.",
          "key": "source_ip",
          "label": "IP Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "identify",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Identify User",
    },
  ],
  "name": "Inleads AI",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-metronome-actions matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Metronome",
  "free": false,
  "icon_url": "/static/services/metronome.com.png",
  "id": "segment-metronome-actions",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Your Metronome API Token",
      "key": "apiToken",
      "label": "API Token",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "{event.uuid}",
          "description": "The Metronome transaction ID uniquely identifies an event to ensure Metronome only processes each event once.",
          "key": "transaction_id",
          "label": "transaction_id",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The Metronome customer ID or ingest alias this event should be associated with.",
          "key": "customer_id",
          "label": "customer_id",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The timestamp at which this event occurred.",
          "key": "timestamp",
          "label": "timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "The Metronome \`event_type\`.",
          "key": "event_type",
          "label": "event_type",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "The Metronome properties object.",
          "key": "properties",
          "label": "properties",
          "required": true,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "sendEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Send track events to Metronome",
    },
  ],
  "name": "Metronome",
  "status": "stable",
  "type": "destination",
}
`;

exports[`segment templates template segment-outfunnel matches expected result 1`] = `
{
  "category": [],
  "code": "return event",
  "code_language": "javascript",
  "description": "Send event data to Outfunnel",
  "free": false,
  "icon_url": "/static/services/outfunnel.com.png",
  "id": "segment-outfunnel",
  "inputs_schema": [
    {
      "default": undefined,
      "description": "Outfunnel User ID. This is found under Account",
      "key": "userId",
      "label": "Outfunnel User Id",
      "required": true,
      "secret": false,
      "type": "string",
    },
    {
      "default": undefined,
      "description": "Outfunnel API Token. This is found under Account",
      "key": "apiToken",
      "label": "API Token",
      "required": true,
      "secret": true,
      "type": "string",
    },
    {
      "default": false,
      "description": "Will log configuration and request details",
      "key": "debug_mode",
      "label": "Debug Mode",
      "type": "boolean",
    },
  ],
  "mapping_templates": [
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event not in ('$pageview', '$screen', '$alias', '$identify', '$set', '$groupidentify')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "track",
          "description": "Indicates which action was triggered",
          "key": "action",
          "label": "Action name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.event}",
          "description": "The name of the event that occured",
          "key": "event_name",
          "label": "Event name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The identifier of the user who performed the event",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Anonymous ID of the user",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "",
          "description": "The identifier of the group where user belongs to",
          "key": "group_id",
          "label": "Group ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email ?? event.properties.email}",
          "description": "Email address of the user who performed the event",
          "key": "email",
          "label": "Email Address",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The time the event occured in UTC",
          "key": "timestamp",
          "label": "Event timestamp",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": {
            "$$_extend_object": "{event.properties}",
          },
          "description": "Optional metadata describing the event",
          "key": "properties",
          "label": "Event properties",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": {
            "$$_extend_object": "{event.context}",
          },
          "description": "Event context",
          "key": "context",
          "label": "Event context",
          "required": false,
          "secret": false,
          "type": "dictionary",
        },
        {
          "default": "forwardTrackEvent",
          "description": "The partner action to use",
          "hidden": true,
          "key": "internal_partner_action",
          "label": "Partner Action",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": false,
          "description": "Leave out any field that ends up empty (null or an empty string) instead of sending it. Use this when a property is only set on some events and you do not want the destination to overwrite what it already has.",
          "key": "internal_omit_empty_values",
          "label": "Omit empty values",
          "required": false,
          "secret": false,
          "type": "boolean",
        },
      ],
      "name": "Track Events",
    },
    {
      "filters": {
        "events": [
          {
            "id": null,
            "name": "All events",
            "order": 0,
            "properties": [
              {
                "key": "event in ('$identify', '$set')",
                "type": "hogql",
                "value": null,
              },
            ],
            "type": "events",
          },
        ],
      },
      "include_by_default": true,
      "inputs_schema": [
        {
          "default": "identify",
          "description": "Indicates which action was triggered",
          "key": "action",
          "label": "Action name",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.id}",
          "description": "The identifier of the user",
          "key": "user_id",
          "label": "User ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.distinct_id}",
          "description": "Anonymous ID of the user",
          "key": "anonymous_id",
          "label": "Anonymous ID",
          "required": false,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{person.properties.email}",
          "description": "Email address of the user who performed the event",
          "key": "email",
          "label": "Email Address",
          "required": true,
          "secret": false,
          "type": "string",
        },
        {
          "default": "{event.timestamp}",
          "description": "The time the event occured in UTC",
          "key": "timestamp",
          "label": "Event timestamp",
          "required": true,
          "secret": false,
 

File truncated at 1 MB.