Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Add the package to your `Package.swift` dependencies:

```swift
dependencies: [
.package(url: "[email protected]:appwrite/sdk-for-swift.git", from: "12.0.0"),
.package(url: "[email protected]:appwrite/sdk-for-swift.git", from: "12.1.0"),
],
```

Expand Down
2 changes: 1 addition & 1 deletion Sources/Appwrite/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ open class Client {
"x-sdk-name": "Swift",
"x-sdk-platform": "server",
"x-sdk-language": "swift",
"x-sdk-version": "12.0.0",
"x-sdk-version": "12.1.0",
"x-appwrite-response-format": "1.8.0"
]

Expand Down
6 changes: 6 additions & 0 deletions Sources/Appwrite/Query.swift
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,12 @@ public struct Query : Codable, CustomStringConvertible {
).description
}

public static func orderRandom() -> String {
return Query(
method: "orderRandom"
).description
}

public static func cursorBefore(_ id: String) -> String {
return Query(
method: "cursorBefore",
Expand Down
20 changes: 10 additions & 10 deletions Sources/AppwriteModels/Deployment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ open class Deployment: Codable {
case providerRepositoryName = "providerRepositoryName"
case providerRepositoryOwner = "providerRepositoryOwner"
case providerRepositoryUrl = "providerRepositoryUrl"
case providerBranch = "providerBranch"
case providerCommitHash = "providerCommitHash"
case providerCommitAuthorUrl = "providerCommitAuthorUrl"
case providerCommitAuthor = "providerCommitAuthor"
case providerCommitMessage = "providerCommitMessage"
case providerCommitUrl = "providerCommitUrl"
case providerBranch = "providerBranch"
case providerBranchUrl = "providerBranchUrl"
}

Expand Down Expand Up @@ -94,9 +94,6 @@ open class Deployment: Codable {
/// The url of the vcs provider repository
public let providerRepositoryUrl: String

/// The branch of the vcs repository
public let providerBranch: String

/// The commit hash of the vcs commit
public let providerCommitHash: String

Expand All @@ -112,6 +109,9 @@ open class Deployment: Codable {
/// The url of the vcs commit
public let providerCommitUrl: String

/// The branch of the vcs repository
public let providerBranch: String

/// The branch of the vcs repository
public let providerBranchUrl: String

Expand All @@ -137,12 +137,12 @@ open class Deployment: Codable {
providerRepositoryName: String,
providerRepositoryOwner: String,
providerRepositoryUrl: String,
providerBranch: String,
providerCommitHash: String,
providerCommitAuthorUrl: String,
providerCommitAuthor: String,
providerCommitMessage: String,
providerCommitUrl: String,
providerBranch: String,
providerBranchUrl: String
) {
self.id = id
Expand All @@ -165,12 +165,12 @@ open class Deployment: Codable {
self.providerRepositoryName = providerRepositoryName
self.providerRepositoryOwner = providerRepositoryOwner
self.providerRepositoryUrl = providerRepositoryUrl
self.providerBranch = providerBranch
self.providerCommitHash = providerCommitHash
self.providerCommitAuthorUrl = providerCommitAuthorUrl
self.providerCommitAuthor = providerCommitAuthor
self.providerCommitMessage = providerCommitMessage
self.providerCommitUrl = providerCommitUrl
self.providerBranch = providerBranch
self.providerBranchUrl = providerBranchUrl
}

Expand All @@ -197,12 +197,12 @@ open class Deployment: Codable {
self.providerRepositoryName = try container.decode(String.self, forKey: .providerRepositoryName)
self.providerRepositoryOwner = try container.decode(String.self, forKey: .providerRepositoryOwner)
self.providerRepositoryUrl = try container.decode(String.self, forKey: .providerRepositoryUrl)
self.providerBranch = try container.decode(String.self, forKey: .providerBranch)
self.providerCommitHash = try container.decode(String.self, forKey: .providerCommitHash)
self.providerCommitAuthorUrl = try container.decode(String.self, forKey: .providerCommitAuthorUrl)
self.providerCommitAuthor = try container.decode(String.self, forKey: .providerCommitAuthor)
self.providerCommitMessage = try container.decode(String.self, forKey: .providerCommitMessage)
self.providerCommitUrl = try container.decode(String.self, forKey: .providerCommitUrl)
self.providerBranch = try container.decode(String.self, forKey: .providerBranch)
self.providerBranchUrl = try container.decode(String.self, forKey: .providerBranchUrl)
}

Expand All @@ -229,12 +229,12 @@ open class Deployment: Codable {
try container.encode(providerRepositoryName, forKey: .providerRepositoryName)
try container.encode(providerRepositoryOwner, forKey: .providerRepositoryOwner)
try container.encode(providerRepositoryUrl, forKey: .providerRepositoryUrl)
try container.encode(providerBranch, forKey: .providerBranch)
try container.encode(providerCommitHash, forKey: .providerCommitHash)
try container.encode(providerCommitAuthorUrl, forKey: .providerCommitAuthorUrl)
try container.encode(providerCommitAuthor, forKey: .providerCommitAuthor)
try container.encode(providerCommitMessage, forKey: .providerCommitMessage)
try container.encode(providerCommitUrl, forKey: .providerCommitUrl)
try container.encode(providerBranch, forKey: .providerBranch)
try container.encode(providerBranchUrl, forKey: .providerBranchUrl)
}

Expand All @@ -260,12 +260,12 @@ open class Deployment: Codable {
"providerRepositoryName": providerRepositoryName as Any,
"providerRepositoryOwner": providerRepositoryOwner as Any,
"providerRepositoryUrl": providerRepositoryUrl as Any,
"providerBranch": providerBranch as Any,
"providerCommitHash": providerCommitHash as Any,
"providerCommitAuthorUrl": providerCommitAuthorUrl as Any,
"providerCommitAuthor": providerCommitAuthor as Any,
"providerCommitMessage": providerCommitMessage as Any,
"providerCommitUrl": providerCommitUrl as Any,
"providerBranch": providerBranch as Any,
"providerBranchUrl": providerBranchUrl as Any
]
}
Expand All @@ -292,12 +292,12 @@ open class Deployment: Codable {
providerRepositoryName: map["providerRepositoryName"] as! String,
providerRepositoryOwner: map["providerRepositoryOwner"] as! String,
providerRepositoryUrl: map["providerRepositoryUrl"] as! String,
providerBranch: map["providerBranch"] as! String,
providerCommitHash: map["providerCommitHash"] as! String,
providerCommitAuthorUrl: map["providerCommitAuthorUrl"] as! String,
providerCommitAuthor: map["providerCommitAuthor"] as! String,
providerCommitMessage: map["providerCommitMessage"] as! String,
providerCommitUrl: map["providerCommitUrl"] as! String,
providerBranch: map["providerBranch"] as! String,
providerBranchUrl: map["providerBranchUrl"] as! String
)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/AppwriteModels/Execution.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ open class Execution: Codable {
/// HTTP request path and query.
public let requestPath: String

/// HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
/// HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
public let requestHeaders: [Headers]

/// HTTP response status code.
Expand Down
2 changes: 1 addition & 1 deletion Sources/AppwriteModels/HealthAntivirus.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ open class HealthAntivirus: Codable {
/// Antivirus version.
public let version: String

/// Antivirus status. Possible values can are: `disabled`, `offline`, `online`
/// Antivirus status. Possible values are: `disabled`, `offline`, `online`
public let status: String


Expand Down
2 changes: 1 addition & 1 deletion Sources/AppwriteModels/HealthStatus.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ open class HealthStatus: Codable {
/// Duration in milliseconds how long the health check took.
public let ping: Int

/// Service status. Possible values can are: `pass`, `fail`
/// Service status. Possible values are: `pass`, `fail`
public let status: String


Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/create-line-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ let attributeLine = try await databases.createLineAttribute(
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: [[1,2], [3, 4]] // optional
default: [[1, 2], [3, 4], [5, 6]] // optional
)

2 changes: 1 addition & 1 deletion docs/examples/databases/create-point-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ let attributePoint = try await databases.createPointAttribute(
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: [[1,2], [3, 4]] // optional
default: [1, 2] // optional
)

2 changes: 1 addition & 1 deletion docs/examples/databases/create-polygon-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ let attributePolygon = try await databases.createPolygonAttribute(
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: [[1,2], [3, 4]] // optional
default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional
)

2 changes: 1 addition & 1 deletion docs/examples/databases/update-line-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let attributeLine = try await databases.updateLineAttribute(
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: [[1,2], [3, 4]], // optional
default: [[1, 2], [3, 4], [5, 6]], // optional
newKey: "" // optional
)

2 changes: 1 addition & 1 deletion docs/examples/databases/update-point-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let attributePoint = try await databases.updatePointAttribute(
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: [[1,2], [3, 4]], // optional
default: [1, 2], // optional
newKey: "" // optional
)

2 changes: 1 addition & 1 deletion docs/examples/databases/update-polygon-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let attributePolygon = try await databases.updatePolygonAttribute(
collectionId: "<COLLECTION_ID>",
key: "",
required: false,
default: [[1,2], [3, 4]], // optional
default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // optional
newKey: "" // optional
)

2 changes: 1 addition & 1 deletion docs/examples/tablesdb/create-line-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ let columnLine = try await tablesDB.createLineColumn(
tableId: "<TABLE_ID>",
key: "",
required: false,
default: [[1,2], [3, 4]] // optional
default: [[1, 2], [3, 4], [5, 6]] // optional
)

2 changes: 1 addition & 1 deletion docs/examples/tablesdb/create-point-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ let columnPoint = try await tablesDB.createPointColumn(
tableId: "<TABLE_ID>",
key: "",
required: false,
default: [[1,2], [3, 4]] // optional
default: [1, 2] // optional
)

2 changes: 1 addition & 1 deletion docs/examples/tablesdb/create-polygon-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ let columnPolygon = try await tablesDB.createPolygonColumn(
tableId: "<TABLE_ID>",
key: "",
required: false,
default: [[1,2], [3, 4]] // optional
default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional
)

2 changes: 1 addition & 1 deletion docs/examples/tablesdb/update-line-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let columnLine = try await tablesDB.updateLineColumn(
tableId: "<TABLE_ID>",
key: "",
required: false,
default: [[1,2], [3, 4]], // optional
default: [[1, 2], [3, 4], [5, 6]], // optional
newKey: "" // optional
)

2 changes: 1 addition & 1 deletion docs/examples/tablesdb/update-point-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let columnPoint = try await tablesDB.updatePointColumn(
tableId: "<TABLE_ID>",
key: "",
required: false,
default: [[1,2], [3, 4]], // optional
default: [1, 2], // optional
newKey: "" // optional
)

2 changes: 1 addition & 1 deletion docs/examples/tablesdb/update-polygon-column.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let columnPolygon = try await tablesDB.updatePolygonColumn(
tableId: "<TABLE_ID>",
key: "",
required: false,
default: [[1,2], [3, 4]], // optional
default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // optional
newKey: "" // optional
)