Skip to content

Commit a90938d

Browse files
committed
regen
1 parent 4932e60 commit a90938d

File tree

14 files changed

+23
-12
lines changed

14 files changed

+23
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## 13.3.1
4+
5+
* Fix `onOpen` callback not being called when the websocket connection is established
6+
37
## 13.3.0
48

59
* Add `onOpen`, `onClose` and `onError` callbacks to `Realtime` service

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: "git@github.com:appwrite/sdk-for-apple.git", from: "13.3.0"),
34+
.package(url: "git@github.com:appwrite/sdk-for-apple.git", from: "13.3.1"),
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": "13.3.0",
26+
"x-sdk-version": "13.3.1",
2727
"x-appwrite-response-format": "1.8.0"
2828
]
2929

Sources/Appwrite/WebSockets/WebSocketClient.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,13 @@ public class WebSocketClient {
297297
self.channel = channel
298298
}
299299

300-
return channel.pipeline.addHandler(handler)
300+
return channel.pipeline.addHandler(handler).map {
301+
if let delegate = self.delegate {
302+
delegate.onOpen(channel: channel)
303+
} else {
304+
self.onOpen(channel)
305+
}
306+
}
301307
}
302308

303309
// MARK: - Close connection

Sources/AppwriteEnums/ExecutionStatus.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ public enum ExecutionStatus: String, CustomStringConvertible {
55
case processing = "processing"
66
case completed = "completed"
77
case failed = "failed"
8+
case scheduled = "scheduled"
89

910
public var description: String {
1011
return rawValue

Sources/AppwriteModels/Execution.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ open class Execution: Codable {
4747
/// The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.
4848
public let trigger: AppwriteEnums.ExecutionTrigger
4949

50-
/// The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.
50+
/// The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.
5151
public let status: AppwriteEnums.ExecutionStatus
5252

5353
/// HTTP request method type.

docs/examples/databases/create-document.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let document = try await databases.createDocument(
1717
"age": 30,
1818
"isAdmin": false
1919
],
20-
permissions: ["read("any")"], // optional
20+
permissions: [Permission.read(Role.any())], // optional
2121
transactionId: "<TRANSACTION_ID>" // optional
2222
)
2323

docs/examples/databases/update-document.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let document = try await databases.updateDocument(
1111
collectionId: "<COLLECTION_ID>",
1212
documentId: "<DOCUMENT_ID>",
1313
data: [:], // optional
14-
permissions: ["read("any")"], // optional
14+
permissions: [Permission.read(Role.any())], // optional
1515
transactionId: "<TRANSACTION_ID>" // optional
1616
)
1717

docs/examples/databases/upsert-document.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let document = try await databases.upsertDocument(
1111
collectionId: "<COLLECTION_ID>",
1212
documentId: "<DOCUMENT_ID>",
1313
data: [:],
14-
permissions: ["read("any")"], // optional
14+
permissions: [Permission.read(Role.any())], // optional
1515
transactionId: "<TRANSACTION_ID>" // optional
1616
)
1717

docs/examples/storage/create-file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ let file = try await storage.createFile(
1010
bucketId: "<BUCKET_ID>",
1111
fileId: "<FILE_ID>",
1212
file: InputFile.fromPath("file.png"),
13-
permissions: ["read("any")"] // optional
13+
permissions: [Permission.read(Role.any())] // optional
1414
)
1515

0 commit comments

Comments
 (0)