Skip to content

Commit 12009e6

Browse files
committed
chore: regenerate sdks
1 parent 2a8c82e commit 12009e6

File tree

10 files changed

+74
-56
lines changed

10 files changed

+74
-56
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Add the package to your `Package.swift` dependencies:
3131

3232
```swift
3333
dependencies: [
34-
.package(url: "[email protected]:appwrite/sdk-for-apple.git", from: "12.1.0"),
34+
.package(url: "[email protected]:appwrite/sdk-for-apple.git", from: "12.2.0"),
3535
],
3636
```
3737

Sources/Appwrite/Client.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ open class Client {
2323
"x-sdk-name": "Apple",
2424
"x-sdk-platform": "client",
2525
"x-sdk-language": "apple",
26-
"x-sdk-version": "12.1.0",
26+
"x-sdk-version": "12.2.0",
2727
"x-appwrite-response-format": "1.8.0"
2828
]
2929

Sources/Appwrite/Query.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,6 @@ public struct Query : Codable, CustomStringConvertible {
280280
).description
281281
}
282282

283-
public static func orderRandom() -> String {
284-
return Query(
285-
method: "orderRandom"
286-
).description
287-
}
288-
289283
public static func cursorBefore(_ id: String) -> String {
290284
return Query(
291285
method: "cursorBefore",

Sources/Appwrite/Services/Account.swift

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -387,13 +387,13 @@ open class Account: Service {
387387
/// method.
388388
///
389389
/// - Parameters:
390-
/// - type: AppwriteEnums.AuthenticatorType
390+
/// - type: AuthenticatorType
391391
/// - Throws: Exception if the request fails
392392
/// - Returns: AppwriteModels.MfaType
393393
///
394394
@available(*, deprecated, message: "This API has been deprecated since 1.8.0. Please use `Account.createMFAAuthenticator` instead.")
395395
open func createMfaAuthenticator(
396-
type: AppwriteEnums.AuthenticatorType
396+
type: AuthenticatorType
397397
) async throws -> AppwriteModels.MfaType {
398398
let apiPath: String = "/account/mfa/authenticators/{type}"
399399
.replacingOccurrences(of: "{type}", with: type.rawValue)
@@ -424,12 +424,12 @@ open class Account: Service {
424424
/// method.
425425
///
426426
/// - Parameters:
427-
/// - type: AppwriteEnums.AuthenticatorType
427+
/// - type: AuthenticatorType
428428
/// - Throws: Exception if the request fails
429429
/// - Returns: AppwriteModels.MfaType
430430
///
431431
open func createMFAAuthenticator(
432-
type: AppwriteEnums.AuthenticatorType
432+
type: AuthenticatorType
433433
) async throws -> AppwriteModels.MfaType {
434434
let apiPath: String = "/account/mfa/authenticators/{type}"
435435
.replacingOccurrences(of: "{type}", with: type.rawValue)
@@ -459,14 +459,14 @@ open class Account: Service {
459459
/// method.
460460
///
461461
/// - Parameters:
462-
/// - type: AppwriteEnums.AuthenticatorType
462+
/// - type: AuthenticatorType
463463
/// - otp: String
464464
/// - Throws: Exception if the request fails
465465
/// - Returns: AppwriteModels.User<T>
466466
///
467467
@available(*, deprecated, message: "This API has been deprecated since 1.8.0. Please use `Account.updateMFAAuthenticator` instead.")
468468
open func updateMfaAuthenticator<T>(
469-
type: AppwriteEnums.AuthenticatorType,
469+
type: AuthenticatorType,
470470
otp: String,
471471
nestedType: T.Type
472472
) async throws -> AppwriteModels.User<T> {
@@ -500,14 +500,14 @@ open class Account: Service {
500500
/// method.
501501
///
502502
/// - Parameters:
503-
/// - type: AppwriteEnums.AuthenticatorType
503+
/// - type: AuthenticatorType
504504
/// - otp: String
505505
/// - Throws: Exception if the request fails
506506
/// - Returns: AppwriteModels.User<T>
507507
///
508508
@available(*, deprecated, message: "This API has been deprecated since 1.8.0. Please use `Account.updateMFAAuthenticator` instead.")
509509
open func updateMfaAuthenticator(
510-
type: AppwriteEnums.AuthenticatorType,
510+
type: AuthenticatorType,
511511
otp: String
512512
) async throws -> AppwriteModels.User<[String: AnyCodable]> {
513513
return try await updateMfaAuthenticator(
@@ -523,13 +523,13 @@ open class Account: Service {
523523
/// method.
524524
///
525525
/// - Parameters:
526-
/// - type: AppwriteEnums.AuthenticatorType
526+
/// - type: AuthenticatorType
527527
/// - otp: String
528528
/// - Throws: Exception if the request fails
529529
/// - Returns: AppwriteModels.User<T>
530530
///
531531
open func updateMFAAuthenticator<T>(
532-
type: AppwriteEnums.AuthenticatorType,
532+
type: AuthenticatorType,
533533
otp: String,
534534
nestedType: T.Type
535535
) async throws -> AppwriteModels.User<T> {
@@ -563,13 +563,13 @@ open class Account: Service {
563563
/// method.
564564
///
565565
/// - Parameters:
566-
/// - type: AppwriteEnums.AuthenticatorType
566+
/// - type: AuthenticatorType
567567
/// - otp: String
568568
/// - Throws: Exception if the request fails
569569
/// - Returns: AppwriteModels.User<T>
570570
///
571571
open func updateMFAAuthenticator(
572-
type: AppwriteEnums.AuthenticatorType,
572+
type: AuthenticatorType,
573573
otp: String
574574
) async throws -> AppwriteModels.User<[String: AnyCodable]> {
575575
return try await updateMFAAuthenticator(
@@ -583,13 +583,13 @@ open class Account: Service {
583583
/// Delete an authenticator for a user by ID.
584584
///
585585
/// - Parameters:
586-
/// - type: AppwriteEnums.AuthenticatorType
586+
/// - type: AuthenticatorType
587587
/// - Throws: Exception if the request fails
588588
/// - Returns: Any
589589
///
590590
@available(*, deprecated, message: "This API has been deprecated since 1.8.0. Please use `Account.deleteMFAAuthenticator` instead.")
591591
open func deleteMfaAuthenticator(
592-
type: AppwriteEnums.AuthenticatorType
592+
type: AuthenticatorType
593593
) async throws -> Any {
594594
let apiPath: String = "/account/mfa/authenticators/{type}"
595595
.replacingOccurrences(of: "{type}", with: type.rawValue)
@@ -611,12 +611,12 @@ open class Account: Service {
611611
/// Delete an authenticator for a user by ID.
612612
///
613613
/// - Parameters:
614-
/// - type: AppwriteEnums.AuthenticatorType
614+
/// - type: AuthenticatorType
615615
/// - Throws: Exception if the request fails
616616
/// - Returns: Any
617617
///
618618
open func deleteMFAAuthenticator(
619-
type: AppwriteEnums.AuthenticatorType
619+
type: AuthenticatorType
620620
) async throws -> Any {
621621
let apiPath: String = "/account/mfa/authenticators/{type}"
622622
.replacingOccurrences(of: "{type}", with: type.rawValue)
@@ -640,13 +640,13 @@ open class Account: Service {
640640
/// method.
641641
///
642642
/// - Parameters:
643-
/// - factor: AppwriteEnums.AuthenticationFactor
643+
/// - factor: AuthenticationFactor
644644
/// - Throws: Exception if the request fails
645645
/// - Returns: AppwriteModels.MfaChallenge
646646
///
647647
@available(*, deprecated, message: "This API has been deprecated since 1.8.0. Please use `Account.createMFAChallenge` instead.")
648648
open func createMfaChallenge(
649-
factor: AppwriteEnums.AuthenticationFactor
649+
factor: AuthenticationFactor
650650
) async throws -> AppwriteModels.MfaChallenge {
651651
let apiPath: String = "/account/mfa/challenge"
652652

@@ -677,12 +677,12 @@ open class Account: Service {
677677
/// method.
678678
///
679679
/// - Parameters:
680-
/// - factor: AppwriteEnums.AuthenticationFactor
680+
/// - factor: AuthenticationFactor
681681
/// - Throws: Exception if the request fails
682682
/// - Returns: AppwriteModels.MfaChallenge
683683
///
684684
open func createMFAChallenge(
685-
factor: AppwriteEnums.AuthenticationFactor
685+
factor: AuthenticationFactor
686686
) async throws -> AppwriteModels.MfaChallenge {
687687
let apiPath: String = "/account/mfa/challenge"
688688

@@ -1596,7 +1596,7 @@ open class Account: Service {
15961596
///
15971597
///
15981598
/// - Parameters:
1599-
/// - provider: AppwriteEnums.OAuthProvider
1599+
/// - provider: OAuthProvider
16001600
/// - success: String (optional)
16011601
/// - failure: String (optional)
16021602
/// - scopes: [String] (optional)
@@ -1605,7 +1605,7 @@ open class Account: Service {
16051605
///
16061606
@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
16071607
open func createOAuth2Session(
1608-
provider: AppwriteEnums.OAuthProvider,
1608+
provider: OAuthProvider,
16091609
success: String? = nil,
16101610
failure: String? = nil,
16111611
scopes: [String]? = nil
@@ -2101,7 +2101,7 @@ open class Account: Service {
21012101
/// limits](https://appwrite.io/docs/authentication-security#limits).
21022102
///
21032103
/// - Parameters:
2104-
/// - provider: AppwriteEnums.OAuthProvider
2104+
/// - provider: OAuthProvider
21052105
/// - success: String (optional)
21062106
/// - failure: String (optional)
21072107
/// - scopes: [String] (optional)
@@ -2110,7 +2110,7 @@ open class Account: Service {
21102110
///
21112111
@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
21122112
open func createOAuth2Token(
2113-
provider: AppwriteEnums.OAuthProvider,
2113+
provider: OAuthProvider,
21142114
success: String? = nil,
21152115
failure: String? = nil,
21162116
scopes: [String]? = nil

Sources/Appwrite/Services/Avatars.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ open class Avatars: Service {
2121
/// of image returned is 100x100px.
2222
///
2323
/// - Parameters:
24-
/// - code: AppwriteEnums.Browser
24+
/// - code: Browser
2525
/// - width: Int (optional)
2626
/// - height: Int (optional)
2727
/// - quality: Int (optional)
2828
/// - Throws: Exception if the request fails
2929
/// - Returns: ByteBuffer
3030
///
3131
open func getBrowser(
32-
code: AppwriteEnums.Browser,
32+
code: Browser,
3333
width: Int? = nil,
3434
height: Int? = nil,
3535
quality: Int? = nil
@@ -63,15 +63,15 @@ open class Avatars: Service {
6363
///
6464
///
6565
/// - Parameters:
66-
/// - code: AppwriteEnums.CreditCard
66+
/// - code: CreditCard
6767
/// - width: Int (optional)
6868
/// - height: Int (optional)
6969
/// - quality: Int (optional)
7070
/// - Throws: Exception if the request fails
7171
/// - Returns: ByteBuffer
7272
///
7373
open func getCreditCard(
74-
code: AppwriteEnums.CreditCard,
74+
code: CreditCard,
7575
width: Int? = nil,
7676
height: Int? = nil,
7777
quality: Int? = nil
@@ -134,15 +134,15 @@ open class Avatars: Service {
134134
///
135135
///
136136
/// - Parameters:
137-
/// - code: AppwriteEnums.Flag
137+
/// - code: Flag
138138
/// - width: Int (optional)
139139
/// - height: Int (optional)
140140
/// - quality: Int (optional)
141141
/// - Throws: Exception if the request fails
142142
/// - Returns: ByteBuffer
143143
///
144144
open func getFlag(
145-
code: AppwriteEnums.Flag,
145+
code: Flag,
146146
width: Int? = nil,
147147
height: Int? = nil,
148148
quality: Int? = nil

Sources/Appwrite/Services/Functions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ open class Functions: Service {
5555
/// - body: String (optional)
5656
/// - async: Bool (optional)
5757
/// - path: String (optional)
58-
/// - method: AppwriteEnums.ExecutionMethod (optional)
58+
/// - method: ExecutionMethod (optional)
5959
/// - headers: Any (optional)
6060
/// - scheduledAt: String (optional)
6161
/// - Throws: Exception if the request fails
@@ -66,7 +66,7 @@ open class Functions: Service {
6666
body: String? = nil,
6767
async: Bool? = nil,
6868
path: String? = nil,
69-
method: AppwriteEnums.ExecutionMethod? = nil,
69+
method: ExecutionMethod? = nil,
7070
headers: Any? = nil,
7171
scheduledAt: String? = nil
7272
) async throws -> AppwriteModels.Execution {

Sources/Appwrite/Services/Storage.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,15 +267,15 @@ open class Storage: Service {
267267
/// - fileId: String
268268
/// - width: Int (optional)
269269
/// - height: Int (optional)
270-
/// - gravity: AppwriteEnums.ImageGravity (optional)
270+
/// - gravity: ImageGravity (optional)
271271
/// - quality: Int (optional)
272272
/// - borderWidth: Int (optional)
273273
/// - borderColor: String (optional)
274274
/// - borderRadius: Int (optional)
275275
/// - opacity: Double (optional)
276276
/// - rotation: Int (optional)
277277
/// - background: String (optional)
278-
/// - output: AppwriteEnums.ImageFormat (optional)
278+
/// - output: ImageFormat (optional)
279279
/// - token: String (optional)
280280
/// - Throws: Exception if the request fails
281281
/// - Returns: ByteBuffer
@@ -285,15 +285,15 @@ open class Storage: Service {
285285
fileId: String,
286286
width: Int? = nil,
287287
height: Int? = nil,
288-
gravity: AppwriteEnums.ImageGravity? = nil,
288+
gravity: ImageGravity? = nil,
289289
quality: Int? = nil,
290290
borderWidth: Int? = nil,
291291
borderColor: String? = nil,
292292
borderRadius: Int? = nil,
293293
opacity: Double? = nil,
294294
rotation: Int? = nil,
295295
background: String? = nil,
296-
output: AppwriteEnums.ImageFormat? = nil,
296+
output: ImageFormat? = nil,
297297
token: String? = nil
298298
) async throws -> ByteBuffer {
299299
let apiPath: String = "/storage/buckets/{bucketId}/files/{fileId}/preview"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import Foundation
2+
3+
public enum ExecutionStatus: String, CustomStringConvertible {
4+
case waiting = "waiting"
5+
case processing = "processing"
6+
case completed = "completed"
7+
case failed = "failed"
8+
9+
public var description: String {
10+
return rawValue
11+
}
12+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import Foundation
2+
3+
public enum ExecutionTrigger: String, CustomStringConvertible {
4+
case http = "http"
5+
case schedule = "schedule"
6+
case event = "event"
7+
8+
public var description: String {
9+
return rawValue
10+
}
11+
}

0 commit comments

Comments
 (0)