# ===============================================
# LOCALIZATION
# ===============================================

extend type Query {
  locales: [LocalizationLocale]
  translations(locale: String!, namespace: String!): [Translation]
}

extend type Mutation {
  downloadLocale(
    locale: String!
  ): DefaultResponse

  updateLocale(
    locale: String!
    autoUpdate: Boolean!
    namespacing: Boolean!
    namespaces: [String]!
  ): DefaultResponse
}

# -----------------------------------------------
# TYPES
# -----------------------------------------------

type LocalizationLocale {
  availability: Int
  code: String
  createdAt: Date
  installDate: Date
  isInstalled: Boolean
  isRTL: Boolean
  name: String
  nativeName: String
  updatedAt: Date
}

type Translation {
  key: String
  value: String
}
