<commit_before>// @flow

export type Auth = {
  token: string,
  workspaceId: string,
  nodeId: string
};

export type Query = {
  name: string,
  query: Object
};

export type GetCustomersOptions = {|
  externalId?: string,
  query?: Query,
  fields?: Array<string>,
  sort?: string,
  direction?: 'asc' | 'desc'
|};

// SDK Customer

export type Tags = {
  auto: Array<string>,
  manual: Array<string>
};

export type OtherContact = {
  name?: string,
  type?: 'MOBILE' | 'PHONE' | 'EMAIL' | 'FAX' | 'OTHER',
  value?: string
};

export type MobileDevice = {
  identifier?: string,
  name?: string,
  type?: 'IOS' | 'GCM' | 'WP'
};

export type Contacts = {
  email?: string,
  fax?: string,
  mobilePhone?: string,
  phone?: string,
  otherContacts?: Array<OtherContact>,
  mobileDevices?: Array<MobileDevice>
};

export type Geo = {
  lat: number,
  lon: number
};

export type Address = {
  street?: string,
  city?: string,
  country?: string,
  province?: string,
  zip?: string,
  geo?: Geo
};

export type Credential = {
  username?: string,
  password?: string
};

export type Education = {
  id: string,
  schoolType?: 'PRIMARY_SCHOOL' | 'SECONDARY_SCHOOL' | 'HIGH_SCHOOL' | 'COLLEGE' | 'OTHER',
  schoolName?: string,
  schoolConcentration?: string,
  startYear?: number,
  endYear?: number,
  isCurrent?: boolean
};

export type Job = {
  id: string,
  companyIndustry?: string,
  companyName?: string,
  jobTitle?: string,
  startDate?: string,
  endDate?: string,
  isCurrent?: boolean
};

export type Like = {
  id: string,
  category?: string,
  name?: string
};

export type Social = {
  facebook?: string,
  google?: string,
  instagram?: string,
  linkedin?: string,
  qzone?: string,
  twitter?: string
};

export type Preference = {
  key: string,
  value: string
};

export type Subscription = {
  id: string,
  name?: string,
  type?: string,
  kind?: 'DIGITAL_MESSAGE' | 'SERVICE' | 'OTHER',
  subscribed?: boolean,
  startDate?: string,
  endDate?: string,
  subscriberId?: string,
  registeredAt?: string,
  updatedAt?: string,
  preferences?: Array<Preference>
};

export type BaseProperties = {
  pictureUrl?: string,
  title?: string,
  prefix?: string,
  firstName?: string,
  lastName?: string,
  middleName?: string,
  gender?: string,
  dob?: string,
  locale?: string,
  timezone?: string,
  contacts?: Contacts,
  address?: Address,
  credential?: Credential,
  educations?: Array<Education>,
  likes?: Array<Like>,
  socialProfile?: Social,
  jobs?: Array<Job>,
  subscriptions?: Array<Subscription>
};

export type CustomerData = {
  externalId?: string,
  base?: BaseProperties,
  extended?: Object,
  extra?: string,
  tags?: Tags
};

export type Customer = CustomerData & {
  id: string,
  registeredAt: Date,
  updatedAt: Date
};

export type EventData = {
  customerId?: string,
  externalId?: string,
  sessionId?: string,
  type: string,
  context: string,
  properties: Object,
  contextInfo?: Object,
  date?: Date
};

export type Event = EventData & {
  id: string,
  registeredAt: Date
};

// API Customer

export type APIMobileDevice = {
  identifier: ?string,
  name: ?string,
  type: null | 'IOS' | 'GCM' | 'WP'
};

export type APIContacts = {
  email: ?string,
  fax: ?string,
  mobilePhone: ?string,
  phone: ?string,
  otherContacts: Array<OtherContact>,
  mobileDevices: Array<APIMobileDevice>
};

export type APIAddress = {
  street: ?string,
  city: ?string,
  country: ?string,
  province: ?string,
  zip: ?string,
  geo: ?Geo
};

export type APICredential = {
  username: string,
  password: string
};

export type APIEducation = {
  id: string,
  schoolType: null | 'PRIMARY_SCHOOL' | 'SECONDARY_SCHOOL' | 'HIGH_SCHOOL' | 'COLLEGE' | 'OTHER',
  schoolName: ?string,
  schoolConcentration: ?string,
  startYear: ?number,
  endYear: ?number,
  isCurrent: ?boolean
};

export type APILike = {
  id: string,
  category: ?string,
  name: ?string
};

export type APISocial = {
  facebook: ?string,
  google: ?string,
  instagram: ?string,
  linkedin: ?string,
  qzone: ?string,
  twitter: ?string
};

export type APIJob = {
  id: string,
  companyIndustry: ?string,
  companyName: ?string,
  jobTitle: ?string,
  startDate: ?string,
  endDate: ?string,
  isCurrent: ?boolean
};

export type APISubscription = {
  id: string,
  name: ?string,
  type: ?string,
  kind: null | 'DIGITAL_MESSAGE' | 'SERVICE' | 'OTHER',
  subscribed: ?boolean,
  startDate: ?string,
  endDate: ?string,
  subscriberId: ?string,
  registeredAt: ?string,
  updatedAt: ?string,
  preferences: Array<Preference>
};

export type APIBaseProperties = {
  pictureUrl: ?string,
  title: ?string,
  prefix: ?string,
  firstName: ?string,
  lastName: ?string,
  middleName: ?string,
  gender: ?string,
  dob: ?string,
  locale: ?string,
  timezone: ?string,
  contacts: ?APIContacts,
  address: ?APIAddress,
  credential: ?APICredential,
  educations: Array<APIEducation>,
  likes: Array<APILike>,
  socialProfile: APISocial,
  jobs: Array<APIJob>,
  subscriptions: Array<APISubscription>
};

export type APICustomer = {
  id: string,
  nodeId: string,
  externalId: ?string,
  extra: ?string,
  registeredAt: string,
  updatedAt: string,
  enabled: boolean,
  base: ?APIBaseProperties,
  extended: ?Object,
  tags: ?Tags
};
<commit_msg>Defined date field as date type field.<commit_after>// @flow

export type Auth = {
  token: string,
  workspaceId: string,
  nodeId: string
};

export type Query = {
  name: string,
  query: Object
};

export type GetCustomersOptions = {|
  externalId?: string,
  query?: Query,
  fields?: Array<string>,
  sort?: string,
  direction?: 'asc' | 'desc'
|};

// SDK Customer

export type Tags = {
  auto: Array<string>,
  manual: Array<string>
};

export type OtherContact = {
  name?: string,
  type?: 'MOBILE' | 'PHONE' | 'EMAIL' | 'FAX' | 'OTHER',
  value?: string
};

export type MobileDevice = {
  identifier?: string,
  name?: string,
  type?: 'IOS' | 'GCM' | 'WP'
};

export type Contacts = {
  email?: string,
  fax?: string,
  mobilePhone?: string,
  phone?: string,
  otherContacts?: Array<OtherContact>,
  mobileDevices?: Array<MobileDevice>
};

export type Geo = {
  lat: number,
  lon: number
};

export type Address = {
  street?: string,
  city?: string,
  country?: string,
  province?: string,
  zip?: string,
  geo?: Geo
};

export type Credential = {
  username?: string,
  password?: string
};

export type Education = {
  id: string,
  schoolType?: 'PRIMARY_SCHOOL' | 'SECONDARY_SCHOOL' | 'HIGH_SCHOOL' | 'COLLEGE' | 'OTHER',
  schoolName?: string,
  schoolConcentration?: string,
  startYear?: number,
  endYear?: number,
  isCurrent?: boolean
};

export type Job = {
  id: string,
  companyIndustry?: string,
  companyName?: string,
  jobTitle?: string,
  startDate?: Date,
  endDate?: Date,
  isCurrent?: boolean
};

export type Like = {
  id: string,
  category?: string,
  name?: string
};

export type Social = {
  facebook?: string,
  google?: string,
  instagram?: string,
  linkedin?: string,
  qzone?: string,
  twitter?: string
};

export type Preference = {
  key: string,
  value: string
};

export type Subscription = {
  id: string,
  name?: string,
  type?: string,
  kind?: 'DIGITAL_MESSAGE' | 'SERVICE' | 'OTHER',
  subscribed?: boolean,
  startDate?: Date,
  endDate?: Date,
  subscriberId?: string,
  registeredAt?: Date,
  updatedAt?: Date,
  preferences?: Array<Preference>
};

export type BaseProperties = {
  pictureUrl?: string,
  title?: string,
  prefix?: string,
  firstName?: string,
  lastName?: string,
  middleName?: string,
  gender?: string,
  dob?: string,
  locale?: string,
  timezone?: string,
  contacts?: Contacts,
  address?: Address,
  credential?: Credential,
  educations?: Array<Education>,
  likes?: Array<Like>,
  socialProfile?: Social,
  jobs?: Array<Job>,
  subscriptions?: Array<Subscription>
};

export type CustomerData = {
  externalId?: string,
  base?: BaseProperties,
  extended?: Object,
  extra?: string,
  tags?: Tags
};

export type Customer = CustomerData & {
  id: string,
  registeredAt: Date,
  updatedAt: Date
};

export type EventData = {
  customerId?: string,
  externalId?: string,
  sessionId?: string,
  type: string,
  context: string,
  properties: Object,
  contextInfo?: Object,
  date?: Date
};

export type Event = EventData & {
  id: string,
  registeredAt: Date
};

// API Customer

export type APIMobileDevice = {
  identifier: ?string,
  name: ?string,
  type: null | 'IOS' | 'GCM' | 'WP'
};

export type APIContacts = {
  email: ?string,
  fax: ?string,
  mobilePhone: ?string,
  phone: ?string,
  otherContacts: Array<OtherContact>,
  mobileDevices: Array<APIMobileDevice>
};

export type APIAddress = {
  street: ?string,
  city: ?string,
  country: ?string,
  province: ?string,
  zip: ?string,
  geo: ?Geo
};

export type APICredential = {
  username: string,
  password: string
};

export type APIEducation = {
  id: string,
  schoolType: null | 'PRIMARY_SCHOOL' | 'SECONDARY_SCHOOL' | 'HIGH_SCHOOL' | 'COLLEGE' | 'OTHER',
  schoolName: ?string,
  schoolConcentration: ?string,
  startYear: ?number,
  endYear: ?number,
  isCurrent: ?boolean
};

export type APILike = {
  id: string,
  category: ?string,
  name: ?string
};

export type APISocial = {
  facebook: ?string,
  google: ?string,
  instagram: ?string,
  linkedin: ?string,
  qzone: ?string,
  twitter: ?string
};

export type APIJob = {
  id: string,
  companyIndustry: ?string,
  companyName: ?string,
  jobTitle: ?string,
  startDate: ?string,
  endDate: ?string,
  isCurrent: ?boolean
};

export type APISubscription = {
  id: string,
  name: ?string,
  type: ?string,
  kind: null | 'DIGITAL_MESSAGE' | 'SERVICE' | 'OTHER',
  subscribed: ?boolean,
  startDate: ?string,
  endDate: ?string,
  subscriberId: ?string,
  registeredAt: ?string,
  updatedAt: ?string,
  preferences: Array<Preference>
};

export type APIBaseProperties = {
  pictureUrl: ?string,
  title: ?string,
  prefix: ?string,
  firstName: ?string,
  lastName: ?string,
  middleName: ?string,
  gender: ?string,
  dob: ?string,
  locale: ?string,
  timezone: ?string,
  contacts: ?APIContacts,
  address: ?APIAddress,
  credential: ?APICredential,
  educations: Array<APIEducation>,
  likes: Array<APILike>,
  socialProfile: APISocial,
  jobs: Array<APIJob>,
  subscriptions: Array<APISubscription>
};

export type APICustomer = {
  id: string,
  nodeId: string,
  externalId: ?string,
  extra: ?string,
  registeredAt: string,
  updatedAt: string,
  enabled: boolean,
  base: ?APIBaseProperties,
  extended: ?Object,
  tags: ?Tags
};

{'fraction_non_alphanumeric': 0.13987275662330262, 'fraction_numerical': 0.0, 'mean_word_length': 4.083011583011583, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1143457', 'n_tokens_mistral': 3696, 'n_tokens_neox': 3657, 'n_words': 1002}