forked from scribe-org/Scribe-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLanguageData.swift
More file actions
32 lines (26 loc) · 836 Bytes
/
LanguageData.swift
File metadata and controls
32 lines (26 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// SPDX-License-Identifier: GPL-3.0-or-later
import Foundation
/// LanguageData represents the structure of the data received from the API,
/// including the language, contract information, and the data tables.
typealias RowData = [String: String?]
typealias Table = [RowData]
struct DataResponse: Decodable {
let language: String
let contract: Contract
let data: [String: Table]
}
struct Contract: Decodable {
let version: String
let updatedAt: String
let fields: [String: [String: String]]
enum CodingKeys: String, CodingKey {
case version
case updatedAt = "updated_at"
case fields
}
}
/// Represents the structure of the data version information received from the API.
struct DataVersionResponse: Decodable {
let language: String
let versions: [String: String]
}