From e0eab8196098eb8a7c4317ac74f265e2c8d719c1 Mon Sep 17 00:00:00 2001 From: Underthestars-zhy Date: Tue, 2 May 2023 20:33:44 +0800 Subject: [PATCH] bug fix --- .../MobbinExtenions/FlowTreeStructure.swift | 2 +- Sources/MobbinAPI/Model/Token.swift | 6 +++--- Sources/MobbinAPI/Model/Tree.swift | 2 +- Sources/MobbinAPI/Model/UserInfo.swift | 18 +++++++++--------- Sources/MobbinAPI/Model/Version.swift | 6 +++--- Sources/MobbinAPI/Model/Workspace.swift | 6 +++--- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Sources/MobbinAPI/MobbinExtenions/FlowTreeStructure.swift b/Sources/MobbinAPI/MobbinExtenions/FlowTreeStructure.swift index 926eef8..736982b 100644 --- a/Sources/MobbinAPI/MobbinExtenions/FlowTreeStructure.swift +++ b/Sources/MobbinAPI/MobbinExtenions/FlowTreeStructure.swift @@ -8,7 +8,7 @@ import Foundation extension MobbinAPI { - func generateTreeSturctureFlow(from flows: [Flow], parent: String? = nil) -> [Tree] { + public func generateTreeSturctureFlow(from flows: [Flow], parent: String? = nil) -> [Tree] { let topLevelFlows = flows.filter { $0.parentAppSectionId == parent } diff --git a/Sources/MobbinAPI/Model/Token.swift b/Sources/MobbinAPI/Model/Token.swift index e30b38a..732a167 100644 --- a/Sources/MobbinAPI/Model/Token.swift +++ b/Sources/MobbinAPI/Model/Token.swift @@ -9,9 +9,9 @@ import Foundation import SwiftyJSON public struct Token: Codable { - var accessToken: String - var refreshToken: String - var generatedTime: Date + public var accessToken: String + public var refreshToken: String + public var generatedTime: Date public init(accessToken: String, refreshToken: String) { self.accessToken = accessToken diff --git a/Sources/MobbinAPI/Model/Tree.swift b/Sources/MobbinAPI/Model/Tree.swift index 1717ccd..60b78ec 100644 --- a/Sources/MobbinAPI/Model/Tree.swift +++ b/Sources/MobbinAPI/Model/Tree.swift @@ -7,6 +7,6 @@ import Foundation -enum Tree { +public enum Tree { case children(Item, [Self]) } diff --git a/Sources/MobbinAPI/Model/UserInfo.swift b/Sources/MobbinAPI/Model/UserInfo.swift index 632981f..f4cecaa 100644 --- a/Sources/MobbinAPI/Model/UserInfo.swift +++ b/Sources/MobbinAPI/Model/UserInfo.swift @@ -8,15 +8,15 @@ import Foundation public struct UserInfo: Codable { - let id: String - let aud: String - let role: String - let email: String - let emailConfirmedAt: Date - let recoverySentAt: Date - let lastSignInAt: Date - let avatarUrl: URL - let fullName: String + public let id: String + public let aud: String + public let role: String + public let email: String + public let emailConfirmedAt: Date + public let recoverySentAt: Date + public let lastSignInAt: Date + public let avatarUrl: URL + public let fullName: String public init(id: String, aud: String, role: String, email: String, emailConfirmedAt: Date, recoverySentAt: Date, lastSignInAt: Date, avatarUrl: URL, fullName: String) { self.id = id diff --git a/Sources/MobbinAPI/Model/Version.swift b/Sources/MobbinAPI/Model/Version.swift index 1135cc6..5c50107 100644 --- a/Sources/MobbinAPI/Model/Version.swift +++ b/Sources/MobbinAPI/Model/Version.swift @@ -8,7 +8,7 @@ import Foundation public struct Version { - let id: String - let createdAt: Date - let publishedAt: Date + public let id: String + public let createdAt: Date + public let publishedAt: Date } diff --git a/Sources/MobbinAPI/Model/Workspace.swift b/Sources/MobbinAPI/Model/Workspace.swift index 4a8ee84..e15bdd2 100644 --- a/Sources/MobbinAPI/Model/Workspace.swift +++ b/Sources/MobbinAPI/Model/Workspace.swift @@ -8,7 +8,7 @@ import Foundation public struct Workspace { - let name: String - let id: String - let type: String + public let name: String + public let id: String + public let type: String }