import { gql } from '@apollo/client';
import * as Apollo from '@apollo/client';
export type Maybe<T> = T | null | undefined;
export type InputMaybe<T> = T | null | undefined;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
const defaultOptions = {} as const;
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
  ID: { input: string; output: string; }
  String: { input: string; output: string; }
  Boolean: { input: boolean; output: boolean; }
  Int: { input: number; output: number; }
  Float: { input: number; output: number; }
  BigInt: { input: any; output: any; }
  Byte: { input: any; output: any; }
  Currency: { input: any; output: any; }
  Date: { input: any; output: any; }
  DateTime: { input: any; output: any; }
  Duration: { input: any; output: any; }
  EmailAddress: { input: any; output: any; }
  GUID: { input: any; output: any; }
  HSL: { input: any; output: any; }
  HSLA: { input: any; output: any; }
  HexColorCode: { input: any; output: any; }
  Hexadecimal: { input: any; output: any; }
  IBAN: { input: any; output: any; }
  IPv4: { input: any; output: any; }
  IPv6: { input: any; output: any; }
  ISBN: { input: any; output: any; }
  ISO8601Duration: { input: any; output: any; }
  JSON: { input: any; output: any; }
  JSONObject: { input: any; output: any; }
  JWT: { input: any; output: any; }
  Latitude: { input: any; output: any; }
  LocalDate: { input: any; output: any; }
  LocalEndTime: { input: any; output: any; }
  LocalTime: { input: any; output: any; }
  Long: { input: any; output: any; }
  Longitude: { input: any; output: any; }
  MAC: { input: any; output: any; }
  NegativeFloat: { input: any; output: any; }
  NegativeInt: { input: any; output: any; }
  NonEmptyString: { input: any; output: any; }
  NonNegativeFloat: { input: any; output: any; }
  NonNegativeInt: { input: any; output: any; }
  NonPositiveFloat: { input: any; output: any; }
  NonPositiveInt: { input: any; output: any; }
  ObjectID: { input: any; output: any; }
  PhoneNumber: { input: any; output: any; }
  Port: { input: any; output: any; }
  PositiveFloat: { input: any; output: any; }
  PositiveInt: { input: any; output: any; }
  PostalCode: { input: any; output: any; }
  RGB: { input: any; output: any; }
  RGBA: { input: any; output: any; }
  SafeInt: { input: any; output: any; }
  Time: { input: any; output: any; }
  Timestamp: { input: any; output: any; }
  URL: { input: any; output: any; }
  USCurrency: { input: any; output: any; }
  UUID: { input: any; output: any; }
  UnsignedFloat: { input: any; output: any; }
  UnsignedInt: { input: any; output: any; }
  UtcOffset: { input: any; output: any; }
  Void: { input: any; output: any; }
};

export type AdminReport = {
  __typename?: 'AdminReport';
  users: Array<User>;
};

export type CheckScriptHeaderResults = {
  __typename?: 'CheckScriptHeaderResults';
  errorMessage?: Maybe<Scalars['String']['output']>;
  found: Scalars['Boolean']['output'];
  headerContent: Scalars['String']['output'];
};

export type CmsMetricValue = {
  __typename?: 'CmsMetricValue';
  name: Scalars['String']['output'];
  value: Scalars['PositiveInt']['output'];
  webflowItemId: Scalars['String']['output'];
};

export type CreateDashboardInput = {
  name: Scalars['String']['input'];
  siteId: Scalars['String']['input'];
};

export type CreateMetricEventInput = {
  cssClass?: InputMaybe<Scalars['String']['input']>;
  cssId?: InputMaybe<Scalars['String']['input']>;
  eventType: EventType;
  id?: InputMaybe<Scalars['UUID']['input']>;
  locationHref: Scalars['String']['input'];
  referer?: InputMaybe<Scalars['String']['input']>;
  siteId: Scalars['String']['input'];
  value?: InputMaybe<Scalars['String']['input']>;
  visitor: VisitorInput;
};

export type CreateMetricInput = {
  breakdownBy?: InputMaybe<MetricChartBreakdownBy>;
  cssSelector?: InputMaybe<Scalars['String']['input']>;
  dashboardId: Scalars['String']['input'];
  metricType: MetricType;
  name: Scalars['String']['input'];
  path?: InputMaybe<Scalars['String']['input']>;
  uniqueVisitor?: InputMaybe<Scalars['Boolean']['input']>;
  webflowCollectionId?: InputMaybe<Scalars['String']['input']>;
};

export type CreateSiteGridLayoutItemInput = {
  h: Scalars['PositiveInt']['input'];
  id: Scalars['String']['input'];
  w: Scalars['PositiveInt']['input'];
  x: Scalars['PositiveInt']['input'];
  y: Scalars['PositiveInt']['input'];
};

export type Dashboard = {
  __typename?: 'Dashboard';
  createdAt: Scalars['Date']['output'];
  gridLayout?: Maybe<Array<SiteGridLayoutItem>>;
  id: Scalars['String']['output'];
  isPublic: Scalars['Boolean']['output'];
  name: Scalars['String']['output'];
  organisationId: Scalars['String']['output'];
  siteId: Scalars['String']['output'];
  updatedAt: Scalars['Date']['output'];
};

export type DashboardGridLayoutItem = {
  __typename?: 'DashboardGridLayoutItem';
  h: Scalars['PositiveInt']['output'];
  id: Scalars['String']['output'];
  w: Scalars['PositiveInt']['output'];
  x: Scalars['PositiveInt']['output'];
  y: Scalars['PositiveInt']['output'];
};

export enum EventType {
  Click = 'click',
  Cms = 'cms',
  Form = 'form',
  Keyboard = 'keyboard',
  View = 'view'
}

export enum Feature {
  EmbeddableDashboard = 'EmbeddableDashboard',
  HistoricalData = 'HistoricalData',
  LiveData = 'LiveData',
  Membership = 'Membership',
  OneMillionVisitors = 'OneMillionVisitors',
  OneThousandVisitors = 'OneThousandVisitors',
  TenThousandVisitors = 'TenThousandVisitors',
  UnlimitedMetrics = 'UnlimitedMetrics',
  UnlimitedSites = 'UnlimitedSites'
}

export type Features = {
  __typename?: 'Features';
  memberFilter: Scalars['Boolean']['output'];
};

export type Me = {
  __typename?: 'Me';
  organisations: Array<MeOrganisation>;
  user: User;
};

export type MeOrganisation = {
  __typename?: 'MeOrganisation';
  id: Scalars['String']['output'];
};

export type Metric = {
  __typename?: 'Metric';
  breakdownBy?: Maybe<MetricChartBreakdownBy>;
  chartData?: Maybe<MetricChart>;
  cssSelector?: Maybe<Scalars['String']['output']>;
  dashboardId: Scalars['String']['output'];
  id: Scalars['ID']['output'];
  metricType: MetricType;
  name: Scalars['String']['output'];
  path?: Maybe<Scalars['String']['output']>;
  uniqueVisitor?: Maybe<Scalars['Boolean']['output']>;
  webflowCollectionId?: Maybe<Scalars['String']['output']>;
};


export type MetricChartDataArgs = {
  input: MetricChartInput;
};

export type MetricByValue = {
  __typename?: 'MetricByValue';
  name: Scalars['String']['output'];
  value: Scalars['PositiveInt']['output'];
};

export type MetricChart = {
  __typename?: 'MetricChart';
  data: Array<MetricChartData>;
  delta?: Maybe<Scalars['Int']['output']>;
  fromCache?: Maybe<Scalars['Boolean']['output']>;
  lastSync?: Maybe<Scalars['Date']['output']>;
  name: Scalars['String']['output'];
  queryTime?: Maybe<Scalars['Float']['output']>;
  total?: Maybe<Scalars['Int']['output']>;
};

export enum MetricChartBreakdownBy {
  City = 'City',
  ClientName = 'ClientName',
  Country = 'Country',
  CssClass = 'CssClass',
  CssId = 'CssId',
  DeviceBrand = 'DeviceBrand',
  DeviceModel = 'DeviceModel',
  DeviceType = 'DeviceType',
  None = 'None',
  OsName = 'OsName',
  Path = 'Path',
  Referer = 'Referer'
}

export type MetricChartData = {
  __typename?: 'MetricChartData';
  name: Scalars['String']['output'];
  values: Array<MetricChartDataValues>;
};

export type MetricChartDataValues = {
  __typename?: 'MetricChartDataValues';
  label: Scalars['String']['output'];
  value: Scalars['Int']['output'];
};

export type MetricChartInput = {
  breakdownBy?: InputMaybe<MetricChartBreakdownBy>;
  country?: InputMaybe<Scalars['String']['input']>;
  cssSelector?: InputMaybe<Scalars['String']['input']>;
  domain?: InputMaybe<Scalars['String']['input']>;
  emailAddress?: InputMaybe<Scalars['String']['input']>;
  endAt?: InputMaybe<Scalars['String']['input']>;
  ipAddress?: InputMaybe<Scalars['String']['input']>;
  isMember?: InputMaybe<Scalars['Boolean']['input']>;
  memberId?: InputMaybe<Scalars['String']['input']>;
  metricId?: InputMaybe<Scalars['String']['input']>;
  metricType?: InputMaybe<MetricType>;
  path?: InputMaybe<Scalars['String']['input']>;
  referer?: InputMaybe<Scalars['String']['input']>;
  siteId?: InputMaybe<Scalars['String']['input']>;
  skipCache?: InputMaybe<Scalars['Boolean']['input']>;
  startAt?: InputMaybe<Scalars['String']['input']>;
  timeframe?: InputMaybe<MetricTimeframe>;
  uniqueVisitor?: InputMaybe<Scalars['Boolean']['input']>;
  value?: InputMaybe<Scalars['String']['input']>;
  visitorId?: InputMaybe<Scalars['String']['input']>;
  webflowCollectionId?: InputMaybe<Scalars['String']['input']>;
};

export type MetricEvent = {
  __typename?: 'MetricEvent';
  cmsCollectionItemSlug?: Maybe<Scalars['String']['output']>;
  cmsCollectionSlug?: Maybe<Scalars['String']['output']>;
  cmsWebflowCollectionId?: Maybe<Scalars['String']['output']>;
  cmsWebflowItemId?: Maybe<Scalars['String']['output']>;
  createdAt?: Maybe<Scalars['Date']['output']>;
  cssClass?: Maybe<Scalars['String']['output']>;
  cssId?: Maybe<Scalars['String']['output']>;
  currentUrl?: Maybe<Scalars['String']['output']>;
  deviceBrand?: Maybe<Scalars['String']['output']>;
  deviceClientEngine?: Maybe<Scalars['String']['output']>;
  deviceClientEngineVersion?: Maybe<Scalars['String']['output']>;
  deviceClientName?: Maybe<Scalars['String']['output']>;
  deviceClientType?: Maybe<Scalars['String']['output']>;
  deviceClientVersion?: Maybe<Scalars['String']['output']>;
  deviceId?: Maybe<Scalars['String']['output']>;
  deviceModel?: Maybe<Scalars['String']['output']>;
  deviceOsName?: Maybe<Scalars['String']['output']>;
  deviceOsPlatform?: Maybe<Scalars['String']['output']>;
  deviceOsVersion?: Maybe<Scalars['String']['output']>;
  deviceType?: Maybe<Scalars['String']['output']>;
  deviceUserAgent?: Maybe<Scalars['String']['output']>;
  domain?: Maybe<Scalars['String']['output']>;
  eventType: EventType;
  formDisplayedAt?: Maybe<Scalars['Date']['output']>;
  formLastInteractionAt?: Maybe<Scalars['Date']['output']>;
  formSubmittedAt?: Maybe<Scalars['Date']['output']>;
  geoIpCity?: Maybe<Scalars['String']['output']>;
  geoIpCountry?: Maybe<Scalars['String']['output']>;
  geoIpEu?: Maybe<Scalars['Boolean']['output']>;
  geoIpLatitude?: Maybe<Scalars['Float']['output']>;
  geoIpLongitude?: Maybe<Scalars['Float']['output']>;
  geoIpRegion?: Maybe<Scalars['String']['output']>;
  geoIpTimezone?: Maybe<Scalars['String']['output']>;
  id: Scalars['ID']['output'];
  ipAddress?: Maybe<Scalars['String']['output']>;
  path?: Maybe<Scalars['String']['output']>;
  referer?: Maybe<Scalars['String']['output']>;
  siteId?: Maybe<Scalars['String']['output']>;
  updatedAt?: Maybe<Scalars['Date']['output']>;
  value?: Maybe<Scalars['String']['output']>;
  visitorId?: Maybe<Scalars['String']['output']>;
};

export type MetricFilters = {
  isMember?: InputMaybe<Scalars['Boolean']['input']>;
};

export enum MetricInterval {
  Day = 'day',
  Hour = 'hour',
  Month = 'month'
}

export enum MetricTimeframe {
  Custom = 'Custom',
  Last3Months = 'Last3Months',
  Last6Months = 'Last6Months',
  Last7days = 'Last7days',
  Last30days = 'Last30days',
  LastYear = 'LastYear',
  Today = 'Today',
  Yesterday = 'Yesterday'
}

export enum MetricType {
  Click = 'Click',
  Cms = 'Cms',
  CustomField = 'CustomField',
  Form = 'Form',
  Keyboard = 'Keyboard',
  TopCountries = 'TopCountries',
  TopPages = 'TopPages',
  TopReferers = 'TopReferers',
  View = 'View',
  Visitors = 'Visitors'
}

export type MetricValue = {
  __typename?: 'MetricValue';
  date: Scalars['Date']['output'];
  value: Scalars['PositiveInt']['output'];
};

export type MetricValueResults = {
  __typename?: 'MetricValueResults';
  label?: Maybe<Scalars['String']['output']>;
  values: Array<MetricValue>;
};

export type MetricValuesInput = {
  cssSelector?: InputMaybe<Scalars['String']['input']>;
  endAt?: InputMaybe<Scalars['String']['input']>;
  metricType: MetricType;
  path?: InputMaybe<Scalars['String']['input']>;
  siteId: Scalars['String']['input'];
  startAt: Scalars['String']['input'];
  webflowCollectionId?: InputMaybe<Scalars['String']['input']>;
};

export type Mutation = {
  __typename?: 'Mutation';
  checkScriptHeader: CheckScriptHeaderResults;
  createDashboard: Dashboard;
  createMetric: Metric;
  createToken: Scalars['String']['output'];
  deleteDashboard: Scalars['Boolean']['output'];
  deleteMetric: Scalars['String']['output'];
  deleteSite: Scalars['String']['output'];
  findOrUpdateVisitor: Visitor;
  renewToken: Scalars['String']['output'];
  reportError: Scalars['Boolean']['output'];
  resetCacheBySiteId: Scalars['Boolean']['output'];
  sendMagicLink: Scalars['Boolean']['output'];
  signIn: Scalars['String']['output'];
  signUpWithWebflow: Scalars['String']['output'];
  syncSiteWithWebflow: Scalars['Boolean']['output'];
  syncWebflowSites: Scalars['Boolean']['output'];
  updateDashboard: Dashboard;
  updateMetric: Metric;
  updateSiteById: Site;
  updateSiteGridLayout?: Maybe<Site>;
};


export type MutationCheckScriptHeaderArgs = {
  siteId: Scalars['ID']['input'];
};


export type MutationCreateDashboardArgs = {
  input: CreateDashboardInput;
};


export type MutationCreateMetricArgs = {
  metric: CreateMetricInput;
};


export type MutationCreateTokenArgs = {
  userId: Scalars['String']['input'];
};


export type MutationDeleteDashboardArgs = {
  id: Scalars['String']['input'];
};


export type MutationDeleteMetricArgs = {
  metricId: Scalars['ID']['input'];
};


export type MutationDeleteSiteArgs = {
  siteId: Scalars['ID']['input'];
};


export type MutationFindOrUpdateVisitorArgs = {
  emailAddress?: InputMaybe<Scalars['String']['input']>;
  memberstackId?: InputMaybe<Scalars['String']['input']>;
  outsetaId?: InputMaybe<Scalars['String']['input']>;
  visitorId: Scalars['UUID']['input'];
};


export type MutationReportErrorArgs = {
  input: ReportErrorInput;
};


export type MutationResetCacheBySiteIdArgs = {
  siteId: Scalars['ID']['input'];
};


export type MutationSendMagicLinkArgs = {
  email: Scalars['String']['input'];
};


export type MutationSignInArgs = {
  token: Scalars['String']['input'];
};


export type MutationSignUpWithWebflowArgs = {
  code: Scalars['String']['input'];
};


export type MutationSyncSiteWithWebflowArgs = {
  siteId: Scalars['ID']['input'];
};


export type MutationUpdateDashboardArgs = {
  input: UpdateDashboardInput;
};


export type MutationUpdateMetricArgs = {
  metric: UpdateMetricInput;
};


export type MutationUpdateSiteByIdArgs = {
  input: UpdateSiteByIdInput;
};


export type MutationUpdateSiteGridLayoutArgs = {
  newGridLayout: Array<CreateSiteGridLayoutItemInput>;
  siteId: Scalars['ID']['input'];
};

export type Organisation = {
  __typename?: 'Organisation';
  features: Array<Feature>;
  id: Scalars['ID']['output'];
};

export type PageInfo = {
  __typename?: 'PageInfo';
  hasNextPage: Scalars['Boolean']['output'];
};

export type Pagination = {
  __typename?: 'Pagination';
  hasMore: Scalars['Boolean']['output'];
  total: Scalars['PositiveInt']['output'];
};

export type PaginationInput = {
  cursor?: InputMaybe<Scalars['String']['input']>;
  limit?: InputMaybe<Scalars['PositiveInt']['input']>;
};

export type Query = {
  __typename?: 'Query';
  adminReport: AdminReport;
  chartData: MetricChart;
  dashboard: Dashboard;
  dashboardBySiteId: Array<Dashboard>;
  eventTypes: Array<EventType>;
  features?: Maybe<Features>;
  maintenance: Scalars['Boolean']['output'];
  me?: Maybe<Me>;
  metric: Metric;
  metricByValues: Array<MetricByValue>;
  metricTypes: Array<MetricType>;
  metricValues: Array<MetricValueResults>;
  metricsByDashboardId: Array<Metric>;
  metricsBySiteId: Array<Metric>;
  organisation: Organisation;
  queueEvents?: Maybe<Array<Maybe<QueueEvent>>>;
  site: Site;
  /** @deprecated Use 'site' instead. */
  siteById: Site;
  siteByWebflowId: Site;
  siteHtmlElements: Array<SiteHtmlElement>;
  sites: SitePaginated;
  stripeCustomerPortalLink: Scalars['String']['output'];
  users: UserPaginated;
  visitor?: Maybe<Visitor>;
  visitors: VisitorPaginated;
};


export type QueryChartDataArgs = {
  input: MetricChartInput;
};


export type QueryDashboardArgs = {
  id: Scalars['String']['input'];
};


export type QueryDashboardBySiteIdArgs = {
  siteId: Scalars['String']['input'];
};


export type QueryMetricArgs = {
  id: Scalars['ID']['input'];
};


export type QueryMetricByValuesArgs = {
  filters?: InputMaybe<MetricFilters>;
  input: MetricValuesInput;
};


export type QueryMetricValuesArgs = {
  filters?: InputMaybe<MetricFilters>;
  input: MetricValuesInput;
};


export type QueryMetricsByDashboardIdArgs = {
  dashboardById: Scalars['ID']['input'];
};


export type QueryMetricsBySiteIdArgs = {
  siteId: Scalars['ID']['input'];
};


export type QueryOrganisationArgs = {
  organisationId?: InputMaybe<Scalars['ID']['input']>;
  siteId?: InputMaybe<Scalars['String']['input']>;
};


export type QueryQueueEventsArgs = {
  siteId: Scalars['String']['input'];
};


export type QuerySiteArgs = {
  id: Scalars['ID']['input'];
};


export type QuerySiteByIdArgs = {
  id: Scalars['ID']['input'];
};


export type QuerySiteByWebflowIdArgs = {
  webflowId: Scalars['String']['input'];
};


export type QuerySiteHtmlElementsArgs = {
  siteId: Scalars['ID']['input'];
};


export type QuerySitesArgs = {
  cursor?: InputMaybe<Scalars['String']['input']>;
  filters?: InputMaybe<SitesFilters>;
  first?: InputMaybe<Scalars['PositiveInt']['input']>;
  organisationId: Scalars['String']['input'];
};


export type QueryUsersArgs = {
  cursor?: InputMaybe<Scalars['String']['input']>;
  first?: InputMaybe<Scalars['PositiveInt']['input']>;
  search?: InputMaybe<Scalars['String']['input']>;
};


export type QueryVisitorArgs = {
  id: Scalars['ID']['input'];
};


export type QueryVisitorsArgs = {
  filters: VisitorsFilters;
  first?: InputMaybe<Scalars['PositiveInt']['input']>;
  offset?: InputMaybe<Scalars['PositiveInt']['input']>;
};

export type QueueEvent = {
  __typename?: 'QueueEvent';
  cmsItemIndex?: Maybe<Scalars['Int']['output']>;
  cmsItemSlug?: Maybe<Scalars['String']['output']>;
  cmsListIndex?: Maybe<Scalars['Int']['output']>;
  createdAt?: Maybe<Scalars['String']['output']>;
  cssClass?: Maybe<Scalars['String']['output']>;
  cssId?: Maybe<Scalars['String']['output']>;
  domain?: Maybe<Scalars['String']['output']>;
  eventType?: Maybe<Scalars['String']['output']>;
  formStage?: Maybe<Scalars['String']['output']>;
  id?: Maybe<Scalars['String']['output']>;
  ip?: Maybe<Scalars['String']['output']>;
  path?: Maybe<Scalars['String']['output']>;
  referer?: Maybe<Scalars['String']['output']>;
  siteId?: Maybe<Scalars['String']['output']>;
  userAgent?: Maybe<Scalars['String']['output']>;
  value?: Maybe<Scalars['String']['output']>;
  visitorId?: Maybe<Scalars['String']['output']>;
};

export type ReportErrorInput = {
  error?: InputMaybe<Scalars['JSON']['input']>;
  from: Scalars['String']['input'];
  message?: InputMaybe<Scalars['String']['input']>;
};

export type Site = {
  __typename?: 'Site';
  collections: Array<WebflowCollection>;
  createdAt: Scalars['Date']['output'];
  dashboards?: Maybe<Array<Dashboard>>;
  domains?: Maybe<Array<Scalars['String']['output']>>;
  eventSources?: Maybe<Array<Scalars['String']['output']>>;
  gridLayout?: Maybe<Array<SiteGridLayoutItem>>;
  id: Scalars['ID']['output'];
  isEnabled: Scalars['Boolean']['output'];
  isPublic: Scalars['Boolean']['output'];
  metrics?: Maybe<Array<Metric>>;
  name: Scalars['String']['output'];
  organisationId: Scalars['String']['output'];
  previewUrl?: Maybe<Scalars['String']['output']>;
  shortName?: Maybe<Scalars['String']['output']>;
  totalMetricsCount?: Maybe<Scalars['PositiveInt']['output']>;
  updatedAt: Scalars['Date']['output'];
  webflowId: Scalars['String']['output'];
};


export type SiteEventSourcesArgs = {
  filter?: InputMaybe<Scalars['String']['input']>;
};

export type SiteEdge = {
  __typename?: 'SiteEdge';
  cursor: Scalars['String']['output'];
  node: Site;
};

export type SiteGridLayoutItem = {
  __typename?: 'SiteGridLayoutItem';
  h: Scalars['PositiveInt']['output'];
  id: Scalars['String']['output'];
  w: Scalars['PositiveInt']['output'];
  x: Scalars['PositiveInt']['output'];
  y: Scalars['PositiveInt']['output'];
};

export type SiteHtmlElement = {
  __typename?: 'SiteHtmlElement';
  html: Scalars['String']['output'];
  id: Scalars['String']['output'];
  text?: Maybe<Scalars['String']['output']>;
};

export type SitePaginated = {
  __typename?: 'SitePaginated';
  edges: Array<SiteEdge>;
  pageInfo: PageInfo;
  totalCount: Scalars['PositiveInt']['output'];
};

export type SitesFilters = {
  name?: InputMaybe<Scalars['String']['input']>;
  organisationId?: InputMaybe<Scalars['String']['input']>;
  userId?: InputMaybe<Scalars['String']['input']>;
};

export type UpdateDashboardGridLayoutItem = {
  h: Scalars['PositiveInt']['input'];
  id: Scalars['String']['input'];
  w: Scalars['PositiveInt']['input'];
  x: Scalars['PositiveInt']['input'];
  y: Scalars['PositiveInt']['input'];
};

export type UpdateDashboardInput = {
  gridLayout?: InputMaybe<Array<UpdateDashboardGridLayoutItem>>;
  id: Scalars['String']['input'];
  isPublic?: InputMaybe<Scalars['Boolean']['input']>;
  name?: InputMaybe<Scalars['String']['input']>;
};

export type UpdateMetricInput = {
  breakdownBy?: InputMaybe<MetricChartBreakdownBy>;
  cssSelector?: InputMaybe<Scalars['String']['input']>;
  id: Scalars['ID']['input'];
  metricType?: InputMaybe<MetricType>;
  name?: InputMaybe<Scalars['String']['input']>;
  path?: InputMaybe<Scalars['String']['input']>;
  uniqueVisitor?: InputMaybe<Scalars['Boolean']['input']>;
  webflowCollectionId?: InputMaybe<Scalars['String']['input']>;
};

export type UpdateSiteByIdInput = {
  id: Scalars['String']['input'];
  isPublic?: InputMaybe<Scalars['Boolean']['input']>;
};

export type User = {
  __typename?: 'User';
  createdAt: Scalars['Date']['output'];
  email: Scalars['String']['output'];
  firstname?: Maybe<Scalars['String']['output']>;
  id: Scalars['String']['output'];
  lastname?: Maybe<Scalars['String']['output']>;
};

export type UserEdge = {
  __typename?: 'UserEdge';
  cursor: Scalars['String']['output'];
  node: User;
};

export type UserPaginated = {
  __typename?: 'UserPaginated';
  edges: Array<UserEdge>;
  pageInfo: PageInfo;
  totalCount: Scalars['PositiveInt']['output'];
};

export type Visitor = {
  __typename?: 'Visitor';
  city?: Maybe<Scalars['String']['output']>;
  country?: Maybe<Scalars['String']['output']>;
  device?: Maybe<Scalars['String']['output']>;
  emailAddress?: Maybe<Scalars['String']['output']>;
  events: Array<MetricEvent>;
  id: Scalars['ID']['output'];
  initialReferer?: Maybe<Scalars['String']['output']>;
  lastInteraction: Scalars['Date']['output'];
};

export type VisitorEdge = {
  __typename?: 'VisitorEdge';
  cursor: Scalars['String']['output'];
  node: Visitor;
};

export type VisitorInput = {
  emailAddress?: InputMaybe<Scalars['String']['input']>;
  id: Scalars['UUID']['input'];
  memberstackId?: InputMaybe<Scalars['String']['input']>;
  outsetaId?: InputMaybe<Scalars['String']['input']>;
};

export type VisitorPaginated = {
  __typename?: 'VisitorPaginated';
  edges: Array<VisitorEdge>;
  pageInfo: PageInfo;
  totalCount: Scalars['PositiveInt']['output'];
};

export type VisitorsFilters = {
  emailAddress?: InputMaybe<Scalars['String']['input']>;
  endAt?: InputMaybe<Scalars['Date']['input']>;
  isMember?: InputMaybe<Scalars['Boolean']['input']>;
  siteId: Scalars['String']['input'];
  startAt: Scalars['Date']['input'];
  visitorId?: InputMaybe<Scalars['String']['input']>;
};

export type WebflowCollection = {
  __typename?: 'WebflowCollection';
  fields: Array<WebflowCollectionFields>;
  id: Scalars['String']['output'];
  items: Array<WebflowCollectionItems>;
  name: Scalars['String']['output'];
};

export type WebflowCollectionFields = {
  __typename?: 'WebflowCollectionFields';
  id: Scalars['String']['output'];
  name: Scalars['String']['output'];
  slug: Scalars['String']['output'];
  type: Scalars['String']['output'];
};

export type WebflowCollectionItems = {
  __typename?: 'WebflowCollectionItems';
  id: Scalars['String']['output'];
  name: Scalars['String']['output'];
};

export type WebflowSites = {
  __typename?: 'WebflowSites';
  name: Scalars['String']['output'];
};

export type ChartDataQueryVariables = Exact<{
  input: MetricChartInput;
}>;


export type ChartDataQuery = { __typename?: 'Query', chartData: { __typename?: 'MetricChart', name: string, delta?: number | null | undefined, data: Array<{ __typename?: 'MetricChartData', name: string, values: Array<{ __typename?: 'MetricChartDataValues', label: string, value: number }> }> } };

export type SiteByWebflowIdQueryVariables = Exact<{
  webflowId: Scalars['String']['input'];
}>;


export type SiteByWebflowIdQuery = { __typename?: 'Query', siteByWebflowId: { __typename?: 'Site', id: string } };


export const ChartDataDocument = gql`
    query chartData($input: MetricChartInput!) {
  chartData(input: $input) {
    name
    data {
      name
      values {
        label
        value
      }
    }
    delta
  }
}
    `;

/**
 * __useChartDataQuery__
 *
 * To run a query within a React component, call `useChartDataQuery` and pass it any options that fit your needs.
 * When your component renders, `useChartDataQuery` returns an object from Apollo Client that contains loading, error, and data properties
 * you can use to render your UI.
 *
 * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
 *
 * @example
 * const { data, loading, error } = useChartDataQuery({
 *   variables: {
 *      input: // value for 'input'
 *   },
 * });
 */
export function useChartDataQuery(baseOptions: Apollo.QueryHookOptions<ChartDataQuery, ChartDataQueryVariables>) {
        const options = {...defaultOptions, ...baseOptions}
        return Apollo.useQuery<ChartDataQuery, ChartDataQueryVariables>(ChartDataDocument, options);
      }
export function useChartDataLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<ChartDataQuery, ChartDataQueryVariables>) {
          const options = {...defaultOptions, ...baseOptions}
          return Apollo.useLazyQuery<ChartDataQuery, ChartDataQueryVariables>(ChartDataDocument, options);
        }
export type ChartDataQueryHookResult = ReturnType<typeof useChartDataQuery>;
export type ChartDataLazyQueryHookResult = ReturnType<typeof useChartDataLazyQuery>;
export type ChartDataQueryResult = Apollo.QueryResult<ChartDataQuery, ChartDataQueryVariables>;
export const SiteByWebflowIdDocument = gql`
    query siteByWebflowId($webflowId: String!) {
  siteByWebflowId(webflowId: $webflowId) {
    id
  }
}
    `;

/**
 * __useSiteByWebflowIdQuery__
 *
 * To run a query within a React component, call `useSiteByWebflowIdQuery` and pass it any options that fit your needs.
 * When your component renders, `useSiteByWebflowIdQuery` returns an object from Apollo Client that contains loading, error, and data properties
 * you can use to render your UI.
 *
 * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
 *
 * @example
 * const { data, loading, error } = useSiteByWebflowIdQuery({
 *   variables: {
 *      webflowId: // value for 'webflowId'
 *   },
 * });
 */
export function useSiteByWebflowIdQuery(baseOptions: Apollo.QueryHookOptions<SiteByWebflowIdQuery, SiteByWebflowIdQueryVariables>) {
        const options = {...defaultOptions, ...baseOptions}
        return Apollo.useQuery<SiteByWebflowIdQuery, SiteByWebflowIdQueryVariables>(SiteByWebflowIdDocument, options);
      }
export function useSiteByWebflowIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<SiteByWebflowIdQuery, SiteByWebflowIdQueryVariables>) {
          const options = {...defaultOptions, ...baseOptions}
          return Apollo.useLazyQuery<SiteByWebflowIdQuery, SiteByWebflowIdQueryVariables>(SiteByWebflowIdDocument, options);
        }
export type SiteByWebflowIdQueryHookResult = ReturnType<typeof useSiteByWebflowIdQuery>;
export type SiteByWebflowIdLazyQueryHookResult = ReturnType<typeof useSiteByWebflowIdLazyQuery>;
export type SiteByWebflowIdQueryResult = Apollo.QueryResult<SiteByWebflowIdQuery, SiteByWebflowIdQueryVariables>;