Skip to content

Commit

Permalink
Add .spi.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
grdsdev committed Oct 31, 2023
1 parent f9d2573 commit cb0c6a6
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .spi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version: 1
external_links:
documentation: "https://supabase.com/docs/reference/swift"
2 changes: 1 addition & 1 deletion Examples/ProductSample/Data/AuthenticationRepository.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation
import Supabase

protocol AuthenticationRepository {
protocol AuthenticationRepository: Sendable {
var currentUserID: UUID { get async throws }

func authStateListener() async -> AsyncStream<AuthenticationState>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation
import Storage

protocol ProductImageStorageRepository {
protocol ProductImageStorageRepository: Sendable {
func uploadImage(_ params: ImageUploadParams) async throws -> String
func downloadImage(_ key: ImageKey) async throws -> Data
}
Expand Down
2 changes: 1 addition & 1 deletion Examples/ProductSample/Data/ProductRepository.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct InsertProductDto: Encodable {
}
}

protocol ProductRepository {
protocol ProductRepository: Sendable {
func createProduct(_ product: InsertProductDto) async throws
func getProducts() async throws -> [Product]
func getProduct(id: Product.ID) async throws -> Product
Expand Down
6 changes: 3 additions & 3 deletions Examples/ProductSample/Domain/UseCases/UseCase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import Foundation
import Storage

protocol UseCase<Input, Output> {
associatedtype Input
associatedtype Output
protocol UseCase<Input, Output>: Sendable {
associatedtype Input: Sendable
associatedtype Output: Sendable

func execute(input: Input) -> Output
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Supabase/SupabaseClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Foundation
let version = _Helpers.version

/// Supabase Client.
public class SupabaseClient {
public final class SupabaseClient {
let options: SupabaseClientOptions
let supabaseURL: URL
let supabaseKey: String
Expand Down
8 changes: 4 additions & 4 deletions Sources/Supabase/Types.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import Foundation
import GoTrue

public struct SupabaseClientOptions {
public struct SupabaseClientOptions: Sendable {
public let db: DatabaseOptions
public let auth: AuthOptions
public let global: GlobalOptions

public struct DatabaseOptions {
public struct DatabaseOptions: Sendable {
/// The Postgres schema which your tables belong to. Must be on the list of exposed schemas in
/// Supabase. Defaults to `public`.
public let schema: String
Expand All @@ -16,7 +16,7 @@ public struct SupabaseClientOptions {
}
}

public struct AuthOptions {
public struct AuthOptions: Sendable {
/// A storage provider. Used to store the logged-in session.
public let storage: GoTrueLocalStorage?

Expand All @@ -30,7 +30,7 @@ public struct SupabaseClientOptions {
}
}

public struct GlobalOptions {
public struct GlobalOptions: Sendable {
public let headers: [String: String]
public let session: URLSession

Expand Down

0 comments on commit cb0c6a6

Please sign in to comment.