<commit_before>import cloneDeep from 'lodash/cloneDeep'
import { AxiosInstance } from 'axios'
import { freezeSys, toPlainObject } from 'contentful-sdk-core'
import { Except, SetOptional } from 'type-fest'
import enhanceWithMethods from '../enhance-with-methods'
import { wrapCollection } from '../common-utils'
import { createUpdateEntity, createDeleteEntity } from '../instance-actions'
import { MetaSysProps, DefaultElements } from '../common-types'

export type LocaleProps = {
  sys: MetaSysProps
  /**
   * Locale name
   */
  name: string
  /**
   * Locale code (example: en-us)
   */
  code: string
  /**
   * Locale code to fallback to when there is not content for the current locale
   */
  fallbackCode: string
  /**
   *  If the content under this locale should be available on the CDA (for public reading)
   */
  contentDeliveryApi: boolean
  /**
   * If the content under this locale should be available on the CMA (for editing)
   */
  contentManagementApi: boolean
  /**
   * If this is the default locale
   */
  default: boolean
  /**
   * If the locale needs to be filled in on entries or not
   */
  optional: boolean
}

export type CreateLocaleProps = SetOptional<
  Except<LocaleProps, 'sys'>,<commit_msg>fix: correct fallbackCode type for Locale (#553)<commit_after>import cloneDeep from 'lodash/cloneDeep'
import { AxiosInstance } from 'axios'
import { freezeSys, toPlainObject } from 'contentful-sdk-core'
import { Except, SetOptional } from 'type-fest'
import enhanceWithMethods from '../enhance-with-methods'
import { wrapCollection } from '../common-utils'
import { createUpdateEntity, createDeleteEntity } from '../instance-actions'
import { MetaSysProps, DefaultElements } from '../common-types'

export type LocaleProps = {
  sys: MetaSysProps
  /**
   * Locale name
   */
  name: string
  /**
   * Locale code (example: en-us)
   */
  code: string
  /**
   * Locale code to fallback to when there is not content for the current locale
   */
  fallbackCode: string | null
  /**
   *  If the content under this locale should be available on the CDA (for public reading)
   */
  contentDeliveryApi: boolean
  /**
   * If the content under this locale should be available on the CMA (for editing)
   */
  contentManagementApi: boolean
  /**
   * If this is the default locale
   */
  default: boolean
  /**
   * If the locale needs to be filled in on entries or not
   */
  optional: boolean
}

export type CreateLocaleProps = SetOptional<
  Except<LocaleProps, 'sys'>,
{'fraction_non_alphanumeric': 0.10208166533226581, 'fraction_numerical': 0.0012009607686148918, 'mean_word_length': 3.438721136767318, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '4786206', 'n_tokens_mistral': 726, 'n_tokens_neox': 719, 'n_words': 262}