Skip to content

Commit 1a0c210

Browse files
committed
feat: check-in generated code
1 parent 4fb133e commit 1a0c210

5 files changed

Lines changed: 100 additions & 2 deletions

File tree

apps/example/.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,3 @@
55
!.yarn/sdks
66
!.yarn/versions
77

8-
swift/Generated/**
9-
kotlin/**/Generated/**
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.callstack.kotlinexample
2+
3+
data class BrownfieldStore (
4+
val counter: Double,
5+
val hasError: Boolean,
6+
val isLoading: Boolean,
7+
val user: User
8+
) {
9+
companion object {
10+
const val STORE_NAME = "BrownfieldStore"
11+
}
12+
}
13+
14+
data class User (
15+
val name: String,
16+
val settings: Settings
17+
)
18+
19+
data class Settings (
20+
val theme: Theme
21+
)
22+
23+
enum class Theme {
24+
Dark,
25+
Light
26+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.callstack.kotlinexample
2+
3+
data class SettingsStore (
4+
val notificationsEnabled: Boolean,
5+
val privacyMode: Boolean,
6+
val theme: Theme
7+
) {
8+
companion object {
9+
const val STORE_NAME = "SettingsStore"
10+
}
11+
}
12+
13+
enum class Theme {
14+
Dark,
15+
Light
16+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import Brownie
2+
3+
// This file was generated from JSON Schema using quicktype, do not modify it directly.
4+
// To parse the JSON, add this file to your project and do:
5+
//
6+
// let brownfieldStore = try? JSONDecoder().decode(BrownfieldStore.self, from: jsonData)
7+
8+
import Foundation
9+
10+
// MARK: - BrownfieldStore
11+
struct BrownfieldStore: Codable {
12+
var counter: Double
13+
var hasError, isLoading: Bool
14+
var user: User
15+
}
16+
17+
// MARK: - User
18+
struct User: Codable {
19+
var name: String
20+
var settings: Settings
21+
}
22+
23+
// MARK: - Settings
24+
struct Settings: Codable {
25+
var theme: Theme
26+
}
27+
28+
enum Theme: String, Codable {
29+
case dark = "dark"
30+
case light = "light"
31+
}
32+
33+
extension BrownfieldStore: BrownieStoreProtocol {
34+
public static let storeName = "BrownfieldStore"
35+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import Brownie
2+
3+
// This file was generated from JSON Schema using quicktype, do not modify it directly.
4+
// To parse the JSON, add this file to your project and do:
5+
//
6+
// let settingsStore = try? JSONDecoder().decode(SettingsStore.self, from: jsonData)
7+
8+
import Foundation
9+
10+
// MARK: - SettingsStore
11+
struct SettingsStore: Codable {
12+
var notificationsEnabled, privacyMode: Bool
13+
var theme: Theme
14+
}
15+
16+
enum Theme: String, Codable {
17+
case dark = "dark"
18+
case light = "light"
19+
}
20+
21+
extension SettingsStore: BrownieStoreProtocol {
22+
public static let storeName = "SettingsStore"
23+
}

0 commit comments

Comments
 (0)