Skip to content

Commit e354d40

Browse files
committed
update
1 parent ecd5bec commit e354d40

12 files changed

+12
-0
lines changed

Sources/openai-async-image-swiftui/OpenAIAsyncImage.swift

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import SwiftUI
1010
fileprivate typealias ImageSize = OpenAIImageSize
1111

1212
/// Async image component to load and show OpenAI image from OpenAI image API
13+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1314
public struct OpenAIAsyncImage<Content: View, T: IOpenAILoader>: View {
1415

1516
/// Custom view builder tpl

Sources/openai-async-image-swiftui/enum/AsyncImageErrors.swift

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import Foundation
99

1010
/// Set of errors for ``OpenAIAsyncImage``
11+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1112
enum AsyncImageErrors: Error, Equatable{
1213

1314
/// Could not create Image from uiImage

Sources/openai-async-image-swiftui/enum/ImageState.swift

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import SwiftUI
99

1010
/// Set of states for ``OpenAIAsyncImage``
11+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1112
public enum ImageState{
1213

1314
/// Loading currently

Sources/openai-async-image-swiftui/enum/OpenAIImageSize.swift

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import Foundation
99

1010
/// The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024
11+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1112
public enum OpenAIImageSize: String, Encodable{
1213

1314
case dpi256 = "256x256"

Sources/openai-async-image-swiftui/enum/ResponseFormat.swift

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import Foundation
99

1010
/// Type of response format from OpenAI API
11+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1112
enum ResponseFormat: String,Encodable{
1213

1314
case url = "url"

Sources/openai-async-image-swiftui/environmentKey/OpenAIAsyncImageLoaderKey.swift

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import SwiftUI
99

1010
/// A key for accessing default loader in the environment
11+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1112
public struct OpenAIDefaultLoaderKey : EnvironmentKey{
1213
public typealias Value = OpenAIDefaultLoader
1314

Sources/openai-async-image-swiftui/model/Input.swift

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Foundation
99

1010

1111
/// Input format to OpenAI API
12+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1213
struct Input: Encodable{
1314

1415
/// A text description of the desired image(s). The maximum length is 1000 characters

Sources/openai-async-image-swiftui/model/Output.swift

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import Foundation
99

1010
/// Output format for OpenAI API
11+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1112
struct Output: Decodable{
1213

1314
/// Date and time

Sources/openai-async-image-swiftui/net/OpenAIImageEndpoint.swift

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import Foundation
99

1010
/// Set of specs for acces to OpenAPI image resource
11+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1112
public struct OpenAIImageEndpoint: IOpenAIImageEndpoint{
1213

1314
// MARK: - Static

Sources/openai-async-image-swiftui/protocol/IOpenAIImageEndpoint.swift

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import Foundation
99

1010
/// Defines access API to OpenAI image API
11+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1112
public protocol IOpenAIImageEndpoint{
1213

1314
/// Base url to OpenAPI image resource

Sources/openai-async-image-swiftui/protocol/IOpenAILoader.swift

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import SwiftUI
99

1010
/// Loader for getting images
11+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1112
public protocol IOpenAILoader: ObservableObject{
1213

1314
/// Load image by text

Sources/openai-async-image-swiftui/viewModel/OpenAIDefaultLoader.swift

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import AppKit.NSImage
1717

1818
import SwiftUI
1919

20+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
2021
public final class OpenAIDefaultLoader : IOpenAILoader{
2122

2223
/// Http async client

0 commit comments

Comments
 (0)