Skip to content

Commit

Permalink
chore: update sdks for appwrite 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
christyjacob4 committed Aug 27, 2024
1 parent ff1e187 commit f110d17
Show file tree
Hide file tree
Showing 46 changed files with 250 additions and 10 deletions.
4 changes: 4 additions & 0 deletions Sources/AppwriteModels/AlgoArgon2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ public class AlgoArgon2 {
/// Algo type.
public let type: String


/// Memory used to compute hash.
public let memoryCost: Int


/// Amount of time consumed to compute hash
public let timeCost: Int


/// Number of threads used to compute hash.
public let threads: Int



init(
type: String,
memoryCost: Int,
Expand Down
1 change: 1 addition & 0 deletions Sources/AppwriteModels/AlgoBcrypt.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public class AlgoBcrypt {
public let type: String



init(
type: String
) {
Expand Down
1 change: 1 addition & 0 deletions Sources/AppwriteModels/AlgoMd5.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public class AlgoMd5 {
public let type: String



init(
type: String
) {
Expand Down
1 change: 1 addition & 0 deletions Sources/AppwriteModels/AlgoPhpass.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public class AlgoPhpass {
public let type: String



init(
type: String
) {
Expand Down
5 changes: 5 additions & 0 deletions Sources/AppwriteModels/AlgoScrypt.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,24 @@ public class AlgoScrypt {
/// Algo type.
public let type: String


/// CPU complexity of computed hash.
public let costCpu: Int


/// Memory complexity of computed hash.
public let costMemory: Int


/// Parallelization of computed hash.
public let costParallel: Int


/// Length used to compute hash.
public let length: Int



init(
type: String,
costCpu: Int,
Expand Down
4 changes: 4 additions & 0 deletions Sources/AppwriteModels/AlgoScryptModified.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ public class AlgoScryptModified {
/// Algo type.
public let type: String


/// Salt used to compute hash.
public let salt: String


/// Separator used to compute hash.
public let saltSeparator: String


/// Key used to compute hash.
public let signerKey: String



init(
type: String,
salt: String,
Expand Down
1 change: 1 addition & 0 deletions Sources/AppwriteModels/AlgoSha.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public class AlgoSha {
public let type: String



init(
type: String
) {
Expand Down
2 changes: 2 additions & 0 deletions Sources/AppwriteModels/Continent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ public class Continent {
/// Continent name.
public let name: String


/// Continent two letter code.
public let code: String



init(
name: String,
code: String
Expand Down
2 changes: 2 additions & 0 deletions Sources/AppwriteModels/ContinentList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ public class ContinentList {
/// Total number of continents documents that matched your query.
public let total: Int


/// List of continents.
public let continents: [Continent]



init(
total: Int,
continents: [Continent]
Expand Down
2 changes: 2 additions & 0 deletions Sources/AppwriteModels/Country.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ public class Country {
/// Country name.
public let name: String


/// Country two-character ISO 3166-1 alpha code.
public let code: String



init(
name: String,
code: String
Expand Down
2 changes: 2 additions & 0 deletions Sources/AppwriteModels/CountryList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ public class CountryList {
/// Total number of countries documents that matched your query.
public let total: Int


/// List of countries.
public let countries: [Country]



init(
total: Int,
countries: [Country]
Expand Down
7 changes: 7 additions & 0 deletions Sources/AppwriteModels/Currency.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,32 @@ public class Currency {
/// Currency symbol.
public let symbol: String


/// Currency name.
public let name: String


/// Currency native symbol.
public let symbolNative: String


/// Number of decimal digits.
public let decimalDigits: Int


/// Currency digit rounding.
public let rounding: Double


/// Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format.
public let code: String


/// Currency plural name
public let namePlural: String



init(
symbol: String,
name: String,
Expand Down
2 changes: 2 additions & 0 deletions Sources/AppwriteModels/CurrencyList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ public class CurrencyList {
/// Total number of currencies documents that matched your query.
public let total: Int


/// List of currencies.
public let currencies: [Currency]



init(
total: Int,
currencies: [Currency]
Expand Down
6 changes: 6 additions & 0 deletions Sources/AppwriteModels/Document.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,27 @@ public class Document<T : Codable> {
/// Document ID.
public let id: String


/// Collection ID.
public let collectionId: String


/// Database ID.
public let databaseId: String


/// Document creation date in ISO 8601 format.
public let createdAt: String


/// Document update date in ISO 8601 format.
public let updatedAt: String


/// Document permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
public let permissions: [Any]


/// Additional properties
public let data: T

Expand Down
2 changes: 2 additions & 0 deletions Sources/AppwriteModels/DocumentList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ public class DocumentList<T : Codable> {
/// Total number of documents documents that matched your query.
public let total: Int


/// List of documents.
public let documents: [Document<T>]



init(
total: Int,
documents: [Document<T>]
Expand Down
21 changes: 19 additions & 2 deletions Sources/AppwriteModels/Execution.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,70 @@ public class Execution {
/// Execution ID.
public let id: String


/// Execution creation date in ISO 8601 format.
public let createdAt: String


/// Execution upate date in ISO 8601 format.
public let updatedAt: String


/// Execution roles.
public let permissions: [Any]


/// Function ID.
public let functionId: String


/// The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.
public let trigger: String


/// The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.
public let status: String


/// HTTP request method type.
public let requestMethod: String


/// 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.
public let requestHeaders: [Headers]


/// HTTP response status code.
public let responseStatusCode: Int


/// HTTP response body. This will return empty unless execution is created as synchronous.
public let responseBody: 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.
public let responseHeaders: [Headers]


/// Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.
public let logs: String


/// Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.
public let errors: String


/// Function execution duration in seconds.
public let duration: Double


/// The scheduled time for execution. If left empty, execution will be queued immediately.
public let scheduledAt: String??
public let scheduledAt: String?



init(
Expand All @@ -73,7 +90,7 @@ public class Execution {
logs: String,
errors: String,
duration: Double,
scheduledAt: String??
scheduledAt: String?
) {
self.id = id
self.createdAt = createdAt
Expand Down
2 changes: 2 additions & 0 deletions Sources/AppwriteModels/ExecutionList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ public class ExecutionList {
/// Total number of executions documents that matched your query.
public let total: Int


/// List of executions.
public let executions: [Execution]



init(
total: Int,
executions: [Execution]
Expand Down
11 changes: 11 additions & 0 deletions Sources/AppwriteModels/File.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,48 @@ public class File {
/// File ID.
public let id: String


/// Bucket ID.
public let bucketId: String


/// File creation date in ISO 8601 format.
public let createdAt: String


/// File update date in ISO 8601 format.
public let updatedAt: String


/// File permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
public let permissions: [Any]


/// File name.
public let name: String


/// File MD5 signature.
public let signature: String


/// File mime type.
public let mimeType: String


/// File original size in bytes.
public let sizeOriginal: Int


/// Total number of chunks available
public let chunksTotal: Int


/// Total number of chunks uploaded
public let chunksUploaded: Int



init(
id: String,
bucketId: String,
Expand Down
2 changes: 2 additions & 0 deletions Sources/AppwriteModels/FileList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ public class FileList {
/// Total number of files documents that matched your query.
public let total: Int


/// List of files.
public let files: [File]



init(
total: Int,
files: [File]
Expand Down
Loading

0 comments on commit f110d17

Please sign in to comment.