Skip to content

Commit db285e8

Browse files
committed
Fixes for nested query parsing and MFA route authentication types
1 parent 866a2d6 commit db285e8

File tree

5 files changed

+11
-25
lines changed

5 files changed

+11
-25
lines changed

Sources/AppwriteModels/Message.swift

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ public class Message {
4343
/// Status of delivery.
4444
public let status: String
4545

46-
/// Message description.
47-
public let description: String??
48-
4946

5047
init(
5148
id: String,
@@ -60,8 +57,7 @@ public class Message {
6057
deliveryErrors: [Any]??,
6158
deliveredTotal: Int,
6259
data: Any,
63-
status: String,
64-
description: String??
60+
status: String
6561
) {
6662
self.id = id
6763
self.createdAt = createdAt
@@ -76,7 +72,6 @@ public class Message {
7672
self.deliveredTotal = deliveredTotal
7773
self.data = data
7874
self.status = status
79-
self.description = description
8075
}
8176

8277
public func toMap() -> [String: Any] {
@@ -93,8 +88,7 @@ public class Message {
9388
"deliveryErrors": deliveryErrors as Any,
9489
"deliveredTotal": deliveredTotal as Any,
9590
"data": data as Any,
96-
"status": status as Any,
97-
"description": description as Any
91+
"status": status as Any
9892
]
9993
}
10094

@@ -112,8 +106,7 @@ public class Message {
112106
deliveryErrors: map["deliveryErrors"] as? [Any]?,
113107
deliveredTotal: map["deliveredTotal"] as! Int,
114108
data: map["data"] as! Any,
115-
status: map["status"] as! String,
116-
description: map["description"] as? String?
109+
status: map["status"] as! String
117110
)
118111
}
119112
}

Sources/AppwriteModels/Session.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public class Session {
8080
public let current: Bool
8181

8282
/// Returns a list of active session factors.
83-
public let factors: Int
83+
public let factors: [Any]
8484

8585
/// Secret used to authenticate the user. Only included if the request was made with an API key
8686
public let secret: String
@@ -112,7 +112,7 @@ public class Session {
112112
countryCode: String,
113113
countryName: String,
114114
current: Bool,
115-
factors: Int,
115+
factors: [Any],
116116
secret: String
117117
) {
118118
self.id = id
@@ -203,7 +203,7 @@ public class Session {
203203
countryCode: map["countryCode"] as! String,
204204
countryName: map["countryName"] as! String,
205205
current: map["current"] as! Bool,
206-
factors: map["factors"] as! Int,
206+
factors: map["factors"] as! [Any],
207207
secret: map["secret"] as! String
208208
)
209209
}

Sources/AppwriteModels/Topic.swift

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,19 @@ public class Topic {
1919
/// Total count of subscribers subscribed to topic.
2020
public let total: Int
2121

22-
/// Description of the topic.
23-
public let description: String??
24-
2522

2623
init(
2724
id: String,
2825
createdAt: String,
2926
updatedAt: String,
3027
name: String,
31-
total: Int,
32-
description: String??
28+
total: Int
3329
) {
3430
self.id = id
3531
self.createdAt = createdAt
3632
self.updatedAt = updatedAt
3733
self.name = name
3834
self.total = total
39-
self.description = description
4035
}
4136

4237
public func toMap() -> [String: Any] {
@@ -45,8 +40,7 @@ public class Topic {
4540
"$createdAt": createdAt as Any,
4641
"$updatedAt": updatedAt as Any,
4742
"name": name as Any,
48-
"total": total as Any,
49-
"description": description as Any
43+
"total": total as Any
5044
]
5145
}
5246

@@ -56,8 +50,7 @@ public class Topic {
5650
createdAt: map["$createdAt"] as! String,
5751
updatedAt: map["$updatedAt"] as! String,
5852
name: map["name"] as! String,
59-
total: map["total"] as! Int,
60-
description: map["description"] as? String?
53+
total: map["total"] as! Int
6154
)
6255
}
6356
}

docs/examples/users/delete-authenticator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import AppwriteEnums
44
let client = Client()
55
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
66
.setProject("5df5acd0d48c2") // Your project ID
7-
.setSession("") // The user session to authenticate with
7+
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
88

99
let users = Users(client)
1010

docs/examples/users/list-providers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Appwrite
33
let client = Client()
44
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
55
.setProject("5df5acd0d48c2") // Your project ID
6-
.setSession("") // The user session to authenticate with
6+
.setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
77

88
let users = Users(client)
99

0 commit comments

Comments
 (0)