Skip to content

Commit 0d35472

Browse files
committed
Add 1.8.x support
1 parent 8c491c4 commit 0d35472

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

Sources/Appwrite/Services/Account.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,15 +1803,19 @@ open class Account: Service {
18031803

18041804
///
18051805
/// Sends the user an email with a secret key for creating a session. If the
1806-
/// provided user ID has not be registered, a new user will be created. Use the
1807-
/// returned user ID and secret and submit a request to the [POST
1806+
/// email address has never been used, a **new account is created** using the
1807+
/// provided `userId`. Otherwise, if the email address is already attached to
1808+
/// an account, the **user ID is ignored**. Then, the user will receive an
1809+
/// email with the one-time password. Use the returned user ID and secret and
1810+
/// submit a request to the [POST
18081811
/// /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
18091812
/// endpoint to complete the login process. The secret sent to the user's email
18101813
/// is valid for 15 minutes.
18111814
///
18121815
/// A user is limited to 10 active sessions at a time by default. [Learn more
18131816
/// about session
18141817
/// limits](https://appwrite.io/docs/authentication-security#limits).
1818+
///
18151819
///
18161820
/// - Parameters:
18171821
/// - userId: String

Sources/AppwriteModels/Execution.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ open class Execution: Codable {
1010
case updatedAt = "$updatedAt"
1111
case permissions = "$permissions"
1212
case functionId = "functionId"
13+
case deploymentId = "deploymentId"
1314
case trigger = "trigger"
1415
case status = "status"
1516
case requestMethod = "requestMethod"
@@ -39,6 +40,9 @@ open class Execution: Codable {
3940
/// Function ID.
4041
public let functionId: String
4142

43+
/// Function's deployment ID used to create the execution.
44+
public let deploymentId: String
45+
4246
/// The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.
4347
public let trigger: String
4448

@@ -82,6 +86,7 @@ open class Execution: Codable {
8286
updatedAt: String,
8387
permissions: [String],
8488
functionId: String,
89+
deploymentId: String,
8590
trigger: String,
8691
status: String,
8792
requestMethod: String,
@@ -100,6 +105,7 @@ open class Execution: Codable {
100105
self.updatedAt = updatedAt
101106
self.permissions = permissions
102107
self.functionId = functionId
108+
self.deploymentId = deploymentId
103109
self.trigger = trigger
104110
self.status = status
105111
self.requestMethod = requestMethod
@@ -122,6 +128,7 @@ open class Execution: Codable {
122128
self.updatedAt = try container.decode(String.self, forKey: .updatedAt)
123129
self.permissions = try container.decode([String].self, forKey: .permissions)
124130
self.functionId = try container.decode(String.self, forKey: .functionId)
131+
self.deploymentId = try container.decode(String.self, forKey: .deploymentId)
125132
self.trigger = try container.decode(String.self, forKey: .trigger)
126133
self.status = try container.decode(String.self, forKey: .status)
127134
self.requestMethod = try container.decode(String.self, forKey: .requestMethod)
@@ -144,6 +151,7 @@ open class Execution: Codable {
144151
try container.encode(updatedAt, forKey: .updatedAt)
145152
try container.encode(permissions, forKey: .permissions)
146153
try container.encode(functionId, forKey: .functionId)
154+
try container.encode(deploymentId, forKey: .deploymentId)
147155
try container.encode(trigger, forKey: .trigger)
148156
try container.encode(status, forKey: .status)
149157
try container.encode(requestMethod, forKey: .requestMethod)
@@ -165,6 +173,7 @@ open class Execution: Codable {
165173
"$updatedAt": updatedAt as Any,
166174
"$permissions": permissions as Any,
167175
"functionId": functionId as Any,
176+
"deploymentId": deploymentId as Any,
168177
"trigger": trigger as Any,
169178
"status": status as Any,
170179
"requestMethod": requestMethod as Any,
@@ -187,6 +196,7 @@ open class Execution: Codable {
187196
updatedAt: map["$updatedAt"] as! String,
188197
permissions: map["$permissions"] as! [String],
189198
functionId: map["functionId"] as! String,
199+
deploymentId: map["deploymentId"] as! String,
190200
trigger: map["trigger"] as! String,
191201
status: map["status"] as! String,
192202
requestMethod: map["requestMethod"] as! String,

0 commit comments

Comments
 (0)