/** * Klaviyo API * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * * Contact: developers@klaviyo.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { RequestFile } from './models'; export class MetricAggregateQueryResourceObjectAttributes { /** * The metric ID used in the aggregation. */ 'metricId': string; /** * Optional pagination cursor to iterate over large result sets */ 'pageCursor'?: string; /** * Measurement key, e.g. `unique`, `sum_value`, `count` */ 'measurements': Array | Array<'count' | 'sum_value' | 'unique'>; /** * Aggregation interval, e.g. \"hour\", \"day\", \"week\", \"month\" */ 'interval'?: MetricAggregateQueryResourceObjectAttributes.IntervalEnum | 'day' | 'hour' | 'month' | 'week' | null = MetricAggregateQueryResourceObjectAttributes.IntervalEnum.Day; /** * Alter the maximum number of returned rows in a single page of aggregation results */ 'pageSize'?: number | null = 500; /** * Optional attribute(s) used for partitioning by the aggregation function */ 'by'?: Array | Array<'$attributed_channel' | '$attributed_flow' | '$attributed_message' | '$attributed_variation' | '$campaign_channel' | '$flow' | '$flow_channel' | '$message' | '$message_send_cohort' | '$usage_amount' | '$value_currency' | '$variation' | '$variation_send_cohort' | 'Bot Click' | 'Bounce Type' | 'Campaign Name' | 'Client Canonical' | 'Client Name' | 'Client Type' | 'Email Domain' | 'Failure Source' | 'Failure Type' | 'From Number' | 'From Phone Region' | 'Inbox Provider' | 'List' | 'Message Name' | 'Message Type' | 'Method' | 'Segment Count' | 'Subject' | 'To Number' | 'To Phone Region' | 'URL' | 'form_id'> | null; /** * Provide fields to limit the returned data */ 'returnFields'?: Array | null; /** * List of filters, must include time range using ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm). These filters follow a similar format to those in `GET` requests, the primary difference is that this endpoint asks for a list. The time range can be filtered by providing a `greater-or-equal` and a `less-than` filter on the `datetime` field. */ 'filter': Array; /** * The timezone used for processing the query, e.g. `\'America/New_York\'`. This field is validated against a list of common timezones from the [IANA Time Zone Database](https://www.iana.org/time-zones). While most are supported, a few notable exceptions are `Factory`, `Europe/Kyiv` and `Pacific/Kanton`. This field is case-sensitive. */ 'timezone'?: string | null = 'UTC'; /** * Provide a sort key (e.g. -$message) */ 'sort'?: MetricAggregateQueryResourceObjectAttributes.SortEnum | '$attributed_channel' | '-$attributed_channel' | '$attributed_flow' | '-$attributed_flow' | '$attributed_message' | '-$attributed_message' | '$attributed_variation' | '-$attributed_variation' | '$campaign_channel' | '-$campaign_channel' | '$flow' | '-$flow' | '$flow_channel' | '-$flow_channel' | '$message' | '-$message' | '$message_send_cohort' | '-$message_send_cohort' | '$usage_amount' | '-$usage_amount' | '$value_currency' | '-$value_currency' | '$variation' | '-$variation' | '$variation_send_cohort' | '-$variation_send_cohort' | 'Bot Click' | '-Bot Click' | 'Bounce Type' | '-Bounce Type' | 'Campaign Name' | '-Campaign Name' | 'Client Canonical' | '-Client Canonical' | 'Client Name' | '-Client Name' | 'Client Type' | '-Client Type' | 'Email Domain' | '-Email Domain' | 'Failure Source' | '-Failure Source' | 'Failure Type' | '-Failure Type' | 'From Number' | '-From Number' | 'From Phone Region' | '-From Phone Region' | 'Inbox Provider' | '-Inbox Provider' | 'List' | '-List' | 'Message Name' | '-Message Name' | 'Message Type' | '-Message Type' | 'Method' | '-Method' | 'Segment Count' | '-Segment Count' | 'Subject' | '-Subject' | 'To Number' | '-To Number' | 'To Phone Region' | '-To Phone Region' | 'URL' | '-URL' | 'count' | '-count' | 'form_id' | '-form_id' | 'sum_value' | '-sum_value' | 'unique' | '-unique'; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { "name": "metricId", "baseName": "metric_id", "type": "string" }, { "name": "pageCursor", "baseName": "page_cursor", "type": "string" }, { "name": "measurements", "baseName": "measurements", "type": "Array" }, { "name": "interval", "baseName": "interval", "type": "MetricAggregateQueryResourceObjectAttributes.IntervalEnum" }, { "name": "pageSize", "baseName": "page_size", "type": "number" }, { "name": "by", "baseName": "by", "type": "Array" }, { "name": "returnFields", "baseName": "return_fields", "type": "Array" }, { "name": "filter", "baseName": "filter", "type": "Array" }, { "name": "timezone", "baseName": "timezone", "type": "string" }, { "name": "sort", "baseName": "sort", "type": "MetricAggregateQueryResourceObjectAttributes.SortEnum" } ]; static getAttributeTypeMap() { return MetricAggregateQueryResourceObjectAttributes.attributeTypeMap; } } export namespace MetricAggregateQueryResourceObjectAttributes { export enum MeasurementsEnum { Count = 'count', SumValue = 'sum_value', Unique = 'unique' } export enum IntervalEnum { Day = 'day', Hour = 'hour', Month = 'month', Week = 'week' } export enum ByEnum { AttributedChannel = '$attributed_channel', AttributedFlow = '$attributed_flow', AttributedMessage = '$attributed_message', AttributedVariation = '$attributed_variation', CampaignChannel = '$campaign_channel', Flow = '$flow', FlowChannel = '$flow_channel', Message = '$message', MessageSendCohort = '$message_send_cohort', UsageAmount = '$usage_amount', ValueCurrency = '$value_currency', Variation = '$variation', VariationSendCohort = '$variation_send_cohort', BotClick = 'Bot Click', BounceType = 'Bounce Type', CampaignName = 'Campaign Name', ClientCanonical = 'Client Canonical', ClientName = 'Client Name', ClientType = 'Client Type', EmailDomain = 'Email Domain', FailureSource = 'Failure Source', FailureType = 'Failure Type', FromNumber = 'From Number', FromPhoneRegion = 'From Phone Region', InboxProvider = 'Inbox Provider', List = 'List', MessageName = 'Message Name', MessageType = 'Message Type', Method = 'Method', SegmentCount = 'Segment Count', Subject = 'Subject', ToNumber = 'To Number', ToPhoneRegion = 'To Phone Region', Url = 'URL', FormId = 'form_id' } export enum SortEnum { AttributedChannel = '$attributed_channel', AttributedChannelDesc = '-$attributed_channel', AttributedFlow = '$attributed_flow', AttributedFlowDesc = '-$attributed_flow', AttributedMessage = '$attributed_message', AttributedMessageDesc = '-$attributed_message', AttributedVariation = '$attributed_variation', AttributedVariationDesc = '-$attributed_variation', CampaignChannel = '$campaign_channel', CampaignChannelDesc = '-$campaign_channel', Flow = '$flow', FlowDesc = '-$flow', FlowChannel = '$flow_channel', FlowChannelDesc = '-$flow_channel', Message = '$message', MessageDesc = '-$message', MessageSendCohort = '$message_send_cohort', MessageSendCohortDesc = '-$message_send_cohort', UsageAmount = '$usage_amount', UsageAmountDesc = '-$usage_amount', ValueCurrency = '$value_currency', ValueCurrencyDesc = '-$value_currency', Variation = '$variation', VariationDesc = '-$variation', VariationSendCohort = '$variation_send_cohort', VariationSendCohortDesc = '-$variation_send_cohort', BotClick = 'Bot Click', BotClickDesc = '-Bot Click', BounceType = 'Bounce Type', BounceTypeDesc = '-Bounce Type', CampaignName = 'Campaign Name', CampaignNameDesc = '-Campaign Name', ClientCanonical = 'Client Canonical', ClientCanonicalDesc = '-Client Canonical', ClientName = 'Client Name', ClientNameDesc = '-Client Name', ClientType = 'Client Type', ClientTypeDesc = '-Client Type', EmailDomain = 'Email Domain', EmailDomainDesc = '-Email Domain', FailureSource = 'Failure Source', FailureSourceDesc = '-Failure Source', FailureType = 'Failure Type', FailureTypeDesc = '-Failure Type', FromNumber = 'From Number', FromNumberDesc = '-From Number', FromPhoneRegion = 'From Phone Region', FromPhoneRegionDesc = '-From Phone Region', InboxProvider = 'Inbox Provider', InboxProviderDesc = '-Inbox Provider', List = 'List', ListDesc = '-List', MessageName = 'Message Name', MessageNameDesc = '-Message Name', MessageType = 'Message Type', MessageTypeDesc = '-Message Type', Method = 'Method', MethodDesc = '-Method', SegmentCount = 'Segment Count', SegmentCountDesc = '-Segment Count', Subject = 'Subject', SubjectDesc = '-Subject', ToNumber = 'To Number', ToNumberDesc = '-To Number', ToPhoneRegion = 'To Phone Region', ToPhoneRegionDesc = '-To Phone Region', Url = 'URL', UrlDesc = '-URL', Count = 'count', CountDesc = '-count', FormId = 'form_id', FormIdDesc = '-form_id', SumValue = 'sum_value', SumValueDesc = '-sum_value', Unique = 'unique', UniqueDesc = '-unique' } }