diff --git a/README.md b/README.md index 16a3fbc..0fc11c6 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![Swift Package Manager](https://img.shields.io/github/v/release/appwrite/sdk-for-swift.svg?color=green&style=flat-square) ![License](https://img.shields.io/github/license/appwrite/sdk-for-swift.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.4.2-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.4.12-blue.svg?style=flat-square) [![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator) [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) @@ -33,7 +33,7 @@ Add the package to your `Package.swift` dependencies: ```swift dependencies: [ - .package(url: "git@github.com:appwrite/sdk-for-swift.git", from: "4.0.1"), + .package(url: "git@github.com:appwrite/sdk-for-swift.git", from: "4.1.0"), ], ``` diff --git a/Sources/Appwrite/Client.swift b/Sources/Appwrite/Client.swift index 2a124fc..7120259 100644 --- a/Sources/Appwrite/Client.swift +++ b/Sources/Appwrite/Client.swift @@ -23,7 +23,7 @@ open class Client { "x-sdk-name": "Swift", "x-sdk-platform": "server", "x-sdk-language": "swift", - "x-sdk-version": "4.0.1", + "x-sdk-version": "4.1.0", "X-Appwrite-Response-Format": "1.4.0" ] diff --git a/Sources/Appwrite/Query.swift b/Sources/Appwrite/Query.swift index 9fa9893..ce1415d 100644 --- a/Sources/Appwrite/Query.swift +++ b/Sources/Appwrite/Query.swift @@ -33,15 +33,15 @@ public class Query { } public static func between(_ attribute: String, start: Int, end: Int) -> String { - buildQueryWhere(attribute, is: "between", to: [start, end]) + "between(\"\(attribute)\", \(start), \(end))" } public static func between(_ attribute: String, start: Double, end: Double) -> String { - buildQueryWhere(attribute, is: "between", to: [start, end]) + "between(\"\(attribute)\", \(start), \(end))" } public static func between(_ attribute: String, start: String, end: String) -> String { - buildQueryWhere(attribute, is: "between", to: [start, end]) + "between(\"\(attribute)\", \"\(start)\", \"\(end)\")" } public static func startsWith(_ attribute: String, value: String) -> String { diff --git a/Sources/Appwrite/Services/Account.swift b/Sources/Appwrite/Services/Account.swift index 83171f8..41adcb3 100644 --- a/Sources/Appwrite/Services/Account.swift +++ b/Sources/Appwrite/Services/Account.swift @@ -8,7 +8,7 @@ import AppwriteModels open class Account: Service { /// - /// Get Account + /// Get account /// /// Get the currently logged in user. /// @@ -40,7 +40,7 @@ open class Account: Service { } /// - /// Get Account + /// Get account /// /// Get the currently logged in user. /// @@ -55,7 +55,7 @@ open class Account: Service { } /// - /// Update Email + /// Update email /// /// Update currently logged in user account email address. After changing user /// address, the user confirmation status will get reset. A new confirmation @@ -101,7 +101,7 @@ open class Account: Service { } /// - /// Update Email + /// Update email /// /// Update currently logged in user account email address. After changing user /// address, the user confirmation status will get reset. A new confirmation @@ -192,7 +192,7 @@ open class Account: Service { } /// - /// List Logs + /// List logs /// /// Get the list of latest security activity logs for the currently logged in /// user. Each log returns user IP address, location and date and time of log. @@ -228,7 +228,7 @@ open class Account: Service { } /// - /// Update Name + /// Update name /// /// Update currently logged in user account name. /// @@ -264,7 +264,7 @@ open class Account: Service { } /// - /// Update Name + /// Update name /// /// Update currently logged in user account name. /// @@ -282,7 +282,7 @@ open class Account: Service { } /// - /// Update Password + /// Update password /// /// Update currently logged in user password. For validation, user is required /// to pass in the new password, and the old password. For users created with @@ -323,7 +323,7 @@ open class Account: Service { } /// - /// Update Password + /// Update password /// /// Update currently logged in user password. For validation, user is required /// to pass in the new password, and the old password. For users created with @@ -346,12 +346,12 @@ open class Account: Service { } /// - /// Update Phone + /// Update phone /// /// Update the currently logged in user's phone number. After updating the /// phone number, the phone verification status will be reset. A confirmation /// SMS is not sent automatically, however you can use the [POST - /// /account/verification/phone](/docs/client/account#accountCreatePhoneVerification) + /// /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) /// endpoint to send a confirmation SMS. /// /// @param String phone @@ -389,12 +389,12 @@ open class Account: Service { } /// - /// Update Phone + /// Update phone /// /// Update the currently logged in user's phone number. After updating the /// phone number, the phone verification status will be reset. A confirmation /// SMS is not sent automatically, however you can use the [POST - /// /account/verification/phone](/docs/client/account#accountCreatePhoneVerification) + /// /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) /// endpoint to send a confirmation SMS. /// /// @param String phone @@ -414,7 +414,7 @@ open class Account: Service { } /// - /// Get Account Preferences + /// Get account preferences /// /// Get the preferences as a key-value object for the currently logged in user. /// @@ -446,7 +446,7 @@ open class Account: Service { } /// - /// Get Account Preferences + /// Get account preferences /// /// Get the preferences as a key-value object for the currently logged in user. /// @@ -461,7 +461,7 @@ open class Account: Service { } /// - /// Update Preferences + /// Update preferences /// /// Update currently logged in user account preferences. The object you pass is /// stored as is, and replaces any previous value. The maximum allowed prefs @@ -499,7 +499,7 @@ open class Account: Service { } /// - /// Update Preferences + /// Update preferences /// /// Update currently logged in user account preferences. The object you pass is /// stored as is, and replaces any previous value. The maximum allowed prefs @@ -519,16 +519,16 @@ open class Account: Service { } /// - /// Create Password Recovery + /// Create password recovery /// /// Sends the user an email with a temporary secret key for password reset. /// When the user clicks the confirmation link he is redirected back to your /// app password reset URL with the secret key and email address values /// attached to the URL query string. Use the query string params to submit a /// request to the [PUT - /// /account/recovery](/docs/client/account#accountUpdateRecovery) endpoint to - /// complete the process. The verification link sent to the user's email - /// address is valid for 1 hour. + /// /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) + /// endpoint to complete the process. The verification link sent to the user's + /// email address is valid for 1 hour. /// /// @param String email /// @param String url @@ -564,12 +564,13 @@ open class Account: Service { } /// - /// Create Password Recovery (confirmation) + /// Create password recovery (confirmation) /// /// Use this endpoint to complete the user account password reset. Both the /// **userId** and **secret** arguments will be passed as query parameters to /// the redirect URL you have provided when sending your request to the [POST - /// /account/recovery](/docs/client/account#accountCreateRecovery) endpoint. + /// /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) + /// endpoint. /// /// Please note that in order to avoid a [Redirect /// Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) @@ -616,7 +617,7 @@ open class Account: Service { } /// - /// List Sessions + /// List sessions /// /// Get the list of active sessions across different devices for the currently /// logged in user. @@ -648,7 +649,7 @@ open class Account: Service { } /// - /// Delete Sessions + /// Delete sessions /// /// Delete all sessions from the user account and remove any sessions cookies /// from the end client. @@ -674,7 +675,7 @@ open class Account: Service { } /// - /// Get Session + /// Get session /// /// Use this endpoint to get a logged in user's session using a Session ID. /// Inputting 'current' will return the current session being used. @@ -709,7 +710,7 @@ open class Account: Service { } /// - /// Update OAuth Session (Refresh Tokens) + /// Update OAuth session (refresh tokens) /// /// Access tokens have limited lifespan and expire to mitigate security risks. /// If session was created using an OAuth provider, this route can be used to @@ -745,12 +746,13 @@ open class Account: Service { } /// - /// Delete Session + /// Delete session /// /// Logout the user. Use 'current' as the session ID to logout on this device, /// use a session ID to logout on another device. If you're looking to logout /// the user on all devices, use [Delete - /// Sessions](/docs/client/account#accountDeleteSessions) instead. + /// Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) + /// instead. /// /// @param String sessionId /// @throws Exception @@ -776,7 +778,7 @@ open class Account: Service { } /// - /// Update Status + /// Update status /// /// Block the currently logged in user account. Behind the scene, the user /// record is not deleted but permanently blocked from any access. To @@ -810,7 +812,7 @@ open class Account: Service { } /// - /// Update Status + /// Update status /// /// Block the currently logged in user account. Behind the scene, the user /// record is not deleted but permanently blocked from any access. To @@ -827,7 +829,7 @@ open class Account: Service { } /// - /// Create Email Verification + /// Create email verification /// /// Use this endpoint to send a verification message to your user email address /// to confirm they are the valid owners of that address. Both the **userId** @@ -836,8 +838,8 @@ open class Account: Service { /// should redirect the user back to your app and allow you to complete the /// verification process by verifying both the **userId** and **secret** /// parameters. Learn more about how to [complete the verification - /// process](/docs/client/account#accountUpdateEmailVerification). The - /// verification link sent to the user's email address is valid for 7 days. + /// process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). + /// The verification link sent to the user's email address is valid for 7 days. /// /// Please note that in order to avoid a [Redirect /// Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), @@ -876,7 +878,7 @@ open class Account: Service { } /// - /// Create Email Verification (confirmation) + /// Create email verification (confirmation) /// /// Use this endpoint to complete the user email verification process. Use both /// the **userId** and **secret** parameters that were attached to your app URL @@ -917,14 +919,16 @@ open class Account: Service { } /// - /// Create Phone Verification + /// Create phone verification /// /// Use this endpoint to send a verification SMS to the currently logged in /// user. This endpoint is meant for use after updating a user's phone number - /// using the [accountUpdatePhone](/docs/client/account#accountUpdatePhone) + /// using the + /// [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) /// endpoint. Learn more about how to [complete the verification - /// process](/docs/client/account#accountUpdatePhoneVerification). The - /// verification code sent to the user's phone number is valid for 15 minutes. + /// process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). + /// The verification code sent to the user's phone number is valid for 15 + /// minutes. /// /// @throws Exception /// @return array @@ -953,7 +957,7 @@ open class Account: Service { } /// - /// Create Phone Verification (confirmation) + /// Create phone verification (confirmation) /// /// Use this endpoint to complete the user phone verification process. Use the /// **userId** and **secret** that were sent to your user's phone number to diff --git a/Sources/Appwrite/Services/Avatars.swift b/Sources/Appwrite/Services/Avatars.swift index 1d7ca0a..47578cb 100644 --- a/Sources/Appwrite/Services/Avatars.swift +++ b/Sources/Appwrite/Services/Avatars.swift @@ -8,12 +8,13 @@ import AppwriteModels open class Avatars: Service { /// - /// Get Browser Icon + /// Get browser icon /// /// You can use this endpoint to show different browser icons to your users. /// The code argument receives the browser code as it appears in your user [GET - /// /account/sessions](/docs/client/account#accountGetSessions) endpoint. Use - /// width, height and quality arguments to change the output settings. + /// /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) + /// endpoint. Use width, height and quality arguments to change the output + /// settings. /// /// When one dimension is specified and the other is 0, the image is scaled /// with preserved aspect ratio. If both dimensions are 0, the API provides an @@ -52,7 +53,7 @@ open class Avatars: Service { } /// - /// Get Credit Card Icon + /// Get credit card icon /// /// The credit card endpoint will return you the icon of the credit card /// provider you need. Use width, height and quality arguments to change the @@ -96,7 +97,7 @@ open class Avatars: Service { } /// - /// Get Favicon + /// Get favicon /// /// Use this endpoint to fetch the favorite icon (AKA favicon) of any remote /// website URL. @@ -125,12 +126,12 @@ open class Avatars: Service { } /// - /// Get Country Flag + /// Get country flag /// /// You can use this endpoint to show different country flags icons to your /// users. The code argument receives the 2 letter country code. Use width, /// height and quality arguments to change the output settings. Country codes - /// follow the [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) standard. + /// follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard. /// /// When one dimension is specified and the other is 0, the image is scaled /// with preserved aspect ratio. If both dimensions are 0, the API provides an @@ -170,7 +171,7 @@ open class Avatars: Service { } /// - /// Get Image from URL + /// Get image from URL /// /// Use this endpoint to fetch a remote image URL and crop it to any image size /// you want. This endpoint is very useful if you need to crop and display @@ -212,7 +213,7 @@ open class Avatars: Service { } /// - /// Get User Initials + /// Get user initials /// /// Use this endpoint to show your user initials avatar icon on your website or /// app. By default, this route will try to print your logged-in user name or @@ -263,7 +264,7 @@ open class Avatars: Service { } /// - /// Get QR Code + /// Get QR code /// /// Converts a given plain text to a QR code image. You can use the query /// parameters to change the size and style of the resulting image. diff --git a/Sources/Appwrite/Services/Databases.swift b/Sources/Appwrite/Services/Databases.swift index c7f4cd1..62eef02 100644 --- a/Sources/Appwrite/Services/Databases.swift +++ b/Sources/Appwrite/Services/Databases.swift @@ -8,7 +8,7 @@ import AppwriteModels open class Databases: Service { /// - /// List Databases + /// List databases /// /// Get a list of all databases from the current Appwrite project. You can use /// the search parameter to filter your results. @@ -47,7 +47,7 @@ open class Databases: Service { } /// - /// Create Database + /// Create database /// /// Create a new Database. /// @@ -89,7 +89,7 @@ open class Databases: Service { } /// - /// Get Database + /// Get database /// /// Get a database by its unique ID. This endpoint response returns a JSON /// object with the database metadata. @@ -124,7 +124,7 @@ open class Databases: Service { } /// - /// Update Database + /// Update database /// /// Update a database by its unique ID. /// @@ -165,7 +165,7 @@ open class Databases: Service { } /// - /// Delete Database + /// Delete database /// /// Delete a database by its unique ID. Only API keys with with databases.write /// scope can delete a database. @@ -194,7 +194,7 @@ open class Databases: Service { } /// - /// List Collections + /// List collections /// /// Get a list of all collections that belong to the provided databaseId. You /// can use the search parameter to filter your results. @@ -236,12 +236,12 @@ open class Databases: Service { } /// - /// Create Collection + /// Create collection /// /// Create a new Collection. Before using this route, you should create a new /// database resource using either a [server - /// integration](/docs/server/databases#databasesCreateCollection) API or - /// directly from your database console. + /// integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) + /// API or directly from your database console. /// /// @param String databaseId /// @param String collectionId @@ -289,7 +289,7 @@ open class Databases: Service { } /// - /// Get Collection + /// Get collection /// /// Get a collection by its unique ID. This endpoint response returns a JSON /// object with the collection metadata. @@ -327,7 +327,7 @@ open class Databases: Service { } /// - /// Update Collection + /// Update collection /// /// Update a collection by its unique ID. /// @@ -377,7 +377,7 @@ open class Databases: Service { } /// - /// Delete Collection + /// Delete collection /// /// Delete a collection by its unique ID. Only users with write permissions /// have access to delete this resource. @@ -409,7 +409,7 @@ open class Databases: Service { } /// - /// List Attributes + /// List attributes /// /// @param String databaseId /// @param String collectionId @@ -448,7 +448,7 @@ open class Databases: Service { } /// - /// Create Boolean Attribute + /// Create boolean attribute /// /// Create a boolean attribute. /// @@ -499,7 +499,7 @@ open class Databases: Service { } /// - /// Update Boolean Attribute + /// Update boolean attribute /// /// @param String databaseId /// @param String collectionId @@ -544,7 +544,7 @@ open class Databases: Service { } /// - /// Create DateTime Attribute + /// Create datetime attribute /// /// @param String databaseId /// @param String collectionId @@ -592,7 +592,7 @@ open class Databases: Service { } /// - /// Update DateTime Attribute + /// Update dateTime attribute /// /// @param String databaseId /// @param String collectionId @@ -637,7 +637,7 @@ open class Databases: Service { } /// - /// Create Email Attribute + /// Create email attribute /// /// Create an email attribute. /// @@ -688,7 +688,7 @@ open class Databases: Service { } /// - /// Update Email Attribute + /// Update email attribute /// /// Update an email attribute. Changing the `default` value will not update /// already existing documents. @@ -737,7 +737,7 @@ open class Databases: Service { } /// - /// Create Enum Attribute + /// Create enum attribute /// /// @param String databaseId /// @param String collectionId @@ -788,7 +788,7 @@ open class Databases: Service { } /// - /// Update Enum Attribute + /// Update enum attribute /// /// Update an enum attribute. Changing the `default` value will not update /// already existing documents. @@ -840,7 +840,7 @@ open class Databases: Service { } /// - /// Create Float Attribute + /// Create float attribute /// /// Create a float attribute. Optionally, minimum and maximum values can be /// provided. @@ -898,7 +898,7 @@ open class Databases: Service { } /// - /// Update Float Attribute + /// Update float attribute /// /// Update a float attribute. Changing the `default` value will not update /// already existing documents. @@ -953,7 +953,7 @@ open class Databases: Service { } /// - /// Create Integer Attribute + /// Create integer attribute /// /// Create an integer attribute. Optionally, minimum and maximum values can be /// provided. @@ -1011,7 +1011,7 @@ open class Databases: Service { } /// - /// Update Integer Attribute + /// Update integer attribute /// /// Update an integer attribute. Changing the `default` value will not update /// already existing documents. @@ -1066,7 +1066,7 @@ open class Databases: Service { } /// - /// Create IP Address Attribute + /// Create IP address attribute /// /// Create IP address attribute. /// @@ -1117,7 +1117,7 @@ open class Databases: Service { } /// - /// Update IP Address Attribute + /// Update IP address attribute /// /// Update an ip attribute. Changing the `default` value will not update /// already existing documents. @@ -1166,10 +1166,10 @@ open class Databases: Service { } /// - /// Create Relationship Attribute + /// Create relationship attribute /// /// Create relationship attribute. [Learn more about relationship - /// attributes](/docs/databases-relationships#relationship-attributes). + /// attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). /// /// /// @param String databaseId @@ -1224,7 +1224,7 @@ open class Databases: Service { } /// - /// Create String Attribute + /// Create string attribute /// /// Create a string attribute. /// @@ -1281,7 +1281,7 @@ open class Databases: Service { } /// - /// Update String Attribute + /// Update string attribute /// /// Update a string attribute. Changing the `default` value will not update /// already existing documents. @@ -1330,7 +1330,7 @@ open class Databases: Service { } /// - /// Create URL Attribute + /// Create URL attribute /// /// Create a URL attribute. /// @@ -1381,7 +1381,7 @@ open class Databases: Service { } /// - /// Update URL Attribute + /// Update URL attribute /// /// Update an url attribute. Changing the `default` value will not update /// already existing documents. @@ -1430,7 +1430,7 @@ open class Databases: Service { } /// - /// Get Attribute + /// Get attribute /// /// @param String databaseId /// @param String collectionId @@ -1462,7 +1462,7 @@ open class Databases: Service { } /// - /// Delete Attribute + /// Delete attribute /// /// @param String databaseId /// @param String collectionId @@ -1494,10 +1494,10 @@ open class Databases: Service { } /// - /// Update Relationship Attribute + /// Update relationship attribute /// /// Update relationship attribute. [Learn more about relationship - /// attributes](/docs/databases-relationships#relationship-attributes). + /// attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). /// /// /// @param String databaseId @@ -1540,7 +1540,7 @@ open class Databases: Service { } /// - /// List Documents + /// List documents /// /// Get a list of all the user's documents in a given collection. You can use /// the query params to filter your results. @@ -1583,7 +1583,7 @@ open class Databases: Service { } /// - /// List Documents + /// List documents /// /// Get a list of all the user's documents in a given collection. You can use /// the query params to filter your results. @@ -1608,12 +1608,12 @@ open class Databases: Service { } /// - /// Create Document + /// Create document /// /// Create a new Document. Before using this route, you should create a new /// collection resource using either a [server - /// integration](/docs/server/databases#databasesCreateCollection) API or - /// directly from your database console. + /// integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) + /// API or directly from your database console. /// /// @param String databaseId /// @param String collectionId @@ -1659,12 +1659,12 @@ open class Databases: Service { } /// - /// Create Document + /// Create document /// /// Create a new Document. Before using this route, you should create a new /// collection resource using either a [server - /// integration](/docs/server/databases#databasesCreateCollection) API or - /// directly from your database console. + /// integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) + /// API or directly from your database console. /// /// @param String databaseId /// @param String collectionId @@ -1692,7 +1692,7 @@ open class Databases: Service { } /// - /// Get Document + /// Get document /// /// Get a document by its unique ID. This endpoint response returns a JSON /// object with the document data. @@ -1738,7 +1738,7 @@ open class Databases: Service { } /// - /// Get Document + /// Get document /// /// Get a document by its unique ID. This endpoint response returns a JSON /// object with the document data. @@ -1766,7 +1766,7 @@ open class Databases: Service { } /// - /// Update Document + /// Update document /// /// Update a document by its unique ID. Using the patch method you can pass /// only specific fields that will get updated. @@ -1815,7 +1815,7 @@ open class Databases: Service { } /// - /// Update Document + /// Update document /// /// Update a document by its unique ID. Using the patch method you can pass /// only specific fields that will get updated. @@ -1846,7 +1846,7 @@ open class Databases: Service { } /// - /// Delete Document + /// Delete document /// /// Delete a document by its unique ID. /// @@ -1880,7 +1880,7 @@ open class Databases: Service { } /// - /// List Indexes + /// List indexes /// /// @param String databaseId /// @param String collectionId @@ -1919,7 +1919,7 @@ open class Databases: Service { } /// - /// Create Index + /// Create index /// /// @param String databaseId /// @param String collectionId @@ -1967,7 +1967,7 @@ open class Databases: Service { } /// - /// Get Index + /// Get index /// /// @param String databaseId /// @param String collectionId @@ -2005,7 +2005,7 @@ open class Databases: Service { } /// - /// Delete Index + /// Delete index /// /// @param String databaseId /// @param String collectionId diff --git a/Sources/Appwrite/Services/Functions.swift b/Sources/Appwrite/Services/Functions.swift index f0e5e08..510ff38 100644 --- a/Sources/Appwrite/Services/Functions.swift +++ b/Sources/Appwrite/Services/Functions.swift @@ -8,7 +8,7 @@ import AppwriteModels open class Functions: Service { /// - /// List Functions + /// List functions /// /// Get a list of all the project's functions. You can use the query params to /// filter your results. @@ -47,11 +47,12 @@ open class Functions: Service { } /// - /// Create Function + /// Create function /// /// Create a new function. You can pass a list of - /// [permissions](/docs/permissions) to allow different project users or team - /// with access to execute the function using the client API. + /// [permissions](https://appwrite.io/docs/permissions) to allow different + /// project users or team with access to execute the function using the client + /// API. /// /// @param String functionId /// @param String name @@ -172,7 +173,7 @@ open class Functions: Service { } /// - /// Get Function + /// Get function /// /// Get a function by its unique ID. /// @@ -206,7 +207,7 @@ open class Functions: Service { } /// - /// Update Function + /// Update function /// /// Update function by its unique ID. /// @@ -286,7 +287,7 @@ open class Functions: Service { } /// - /// Delete Function + /// Delete function /// /// Delete a function by its unique ID. /// @@ -314,7 +315,7 @@ open class Functions: Service { } /// - /// List Deployments + /// List deployments /// /// Get a list of all the project's code deployments. You can use the query /// params to filter your results. @@ -356,7 +357,7 @@ open class Functions: Service { } /// - /// Create Deployment + /// Create deployment /// /// Create a new function code deployment. Use this endpoint to upload a new /// version of your code function. To execute your newly uploaded code, you'll @@ -365,7 +366,7 @@ open class Functions: Service { /// This endpoint accepts a tar.gz file compressed with your code. Make sure to /// include any dependencies your code has within the compressed file. You can /// learn more about code packaging in the [Appwrite Cloud Functions - /// tutorial](/docs/functions). + /// tutorial](https://appwrite.io/docs/functions). /// /// Use the "command" param to set the entrypoint used to execute your code. /// @@ -417,7 +418,7 @@ open class Functions: Service { } /// - /// Get Deployment + /// Get deployment /// /// Get a code deployment by its unique ID. /// @@ -454,7 +455,7 @@ open class Functions: Service { } /// - /// Update Function Deployment + /// Update function deployment /// /// Update the function code deployment ID using the unique function ID. Use /// this endpoint to switch the code deployment that should be executed by the @@ -493,7 +494,7 @@ open class Functions: Service { } /// - /// Delete Deployment + /// Delete deployment /// /// Delete a code deployment by its unique ID. /// @@ -524,7 +525,7 @@ open class Functions: Service { } /// - /// Create Build + /// Create build /// /// Create a new build for an Appwrite Function deployment. This endpoint can /// be used to retry a failed build. @@ -561,6 +562,9 @@ open class Functions: Service { /// /// Download Deployment /// + /// Get a Deployment's contents by its unique ID. This endpoint supports range + /// requests for partial or streaming file download. + /// /// @param String functionId /// @param String deploymentId /// @throws Exception @@ -584,7 +588,7 @@ open class Functions: Service { } /// - /// List Executions + /// List executions /// /// Get a list of all the current user function execution logs. You can use the /// query params to filter your results. @@ -626,7 +630,7 @@ open class Functions: Service { } /// - /// Create Execution + /// Create execution /// /// Trigger a function execution. The returned object will return you the /// current execution status. You can ping the `Get Execution` endpoint to get @@ -679,7 +683,7 @@ open class Functions: Service { } /// - /// Get Execution + /// Get execution /// /// Get a function execution log by its unique ID. /// @@ -716,7 +720,7 @@ open class Functions: Service { } /// - /// List Variables + /// List variables /// /// Get a list of all variables of a specific function. /// @@ -750,7 +754,7 @@ open class Functions: Service { } /// - /// Create Variable + /// Create variable /// /// Create a new function environment variable. These variables can be accessed /// in the function at runtime as environment variables. @@ -792,7 +796,7 @@ open class Functions: Service { } /// - /// Get Variable + /// Get variable /// /// Get a variable by its unique ID. /// @@ -829,7 +833,7 @@ open class Functions: Service { } /// - /// Update Variable + /// Update variable /// /// Update variable by its unique ID. /// @@ -873,7 +877,7 @@ open class Functions: Service { } /// - /// Delete Variable + /// Delete variable /// /// Delete a variable by its unique ID. /// diff --git a/Sources/Appwrite/Services/Graphql.swift b/Sources/Appwrite/Services/Graphql.swift index 0b78e1a..4c89389 100644 --- a/Sources/Appwrite/Services/Graphql.swift +++ b/Sources/Appwrite/Services/Graphql.swift @@ -8,7 +8,7 @@ import AppwriteModels open class Graphql: Service { /// - /// GraphQL Endpoint + /// GraphQL endpoint /// /// Execute a GraphQL mutation. /// @@ -44,7 +44,7 @@ open class Graphql: Service { } /// - /// GraphQL Endpoint + /// GraphQL endpoint /// /// Execute a GraphQL mutation. /// diff --git a/Sources/Appwrite/Services/Health.swift b/Sources/Appwrite/Services/Health.swift index 92020f4..2bfb68b 100644 --- a/Sources/Appwrite/Services/Health.swift +++ b/Sources/Appwrite/Services/Health.swift @@ -39,7 +39,7 @@ open class Health: Service { } /// - /// Get Antivirus + /// Get antivirus /// /// Check the Appwrite Antivirus server is up and connection is successful. /// @@ -70,7 +70,7 @@ open class Health: Service { } /// - /// Get Cache + /// Get cache /// /// Check the Appwrite in-memory cache servers are up and connection is /// successful. @@ -133,7 +133,7 @@ open class Health: Service { } /// - /// Get PubSub + /// Get pubsub /// /// Check the Appwrite pub-sub servers are up and connection is successful. /// @@ -164,7 +164,7 @@ open class Health: Service { } /// - /// Get Queue + /// Get queue /// /// Check the Appwrite queue messaging servers are up and connection is /// successful. @@ -196,20 +196,60 @@ open class Health: Service { } /// - /// Get Certificates Queue + /// Get builds queue + /// + /// Get the number of builds that are waiting to be processed in the Appwrite + /// internal queue server. + /// + /// @param Int threshold + /// @throws Exception + /// @return array + /// + open func getQueueBuilds( + threshold: Int? = nil + ) async throws -> AppwriteModels.HealthQueue { + let apiPath: String = "/health/queue/builds" + + let apiParams: [String: Any?] = [ + "threshold": threshold + ] + + let apiHeaders: [String: String] = [ + "content-type": "application/json" + ] + + let converter: (Any) -> AppwriteModels.HealthQueue = { response in + return AppwriteModels.HealthQueue.from(map: response as! [String: Any]) + } + + return try await client.call( + method: "GET", + path: apiPath, + headers: apiHeaders, + params: apiParams, + converter: converter + ) + } + + /// + /// Get certificates queue /// /// Get the number of certificates that are waiting to be issued against /// [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue /// server. /// + /// @param Int threshold /// @throws Exception /// @return array /// open func getQueueCertificates( + threshold: Int? = nil ) async throws -> AppwriteModels.HealthQueue { let apiPath: String = "/health/queue/certificates" - let apiParams: [String: Any] = [:] + let apiParams: [String: Any?] = [ + "threshold": threshold + ] let apiHeaders: [String: String] = [ "content-type": "application/json" @@ -229,16 +269,95 @@ open class Health: Service { } /// - /// Get Functions Queue + /// Get databases queue + /// + /// Get the number of database changes that are waiting to be processed in the + /// Appwrite internal queue server. /// + /// @param String name + /// @param Int threshold + /// @throws Exception + /// @return array + /// + open func getQueueDatabases( + name: String? = nil, + threshold: Int? = nil + ) async throws -> AppwriteModels.HealthQueue { + let apiPath: String = "/health/queue/databases" + + let apiParams: [String: Any?] = [ + "name": name, + "threshold": threshold + ] + + let apiHeaders: [String: String] = [ + "content-type": "application/json" + ] + + let converter: (Any) -> AppwriteModels.HealthQueue = { response in + return AppwriteModels.HealthQueue.from(map: response as! [String: Any]) + } + + return try await client.call( + method: "GET", + path: apiPath, + headers: apiHeaders, + params: apiParams, + converter: converter + ) + } + + /// + /// Get deletes queue + /// + /// Get the number of background destructive changes that are waiting to be + /// processed in the Appwrite internal queue server. + /// + /// @param Int threshold + /// @throws Exception + /// @return array + /// + open func getQueueDeletes( + threshold: Int? = nil + ) async throws -> AppwriteModels.HealthQueue { + let apiPath: String = "/health/queue/deletes" + + let apiParams: [String: Any?] = [ + "threshold": threshold + ] + + let apiHeaders: [String: String] = [ + "content-type": "application/json" + ] + + let converter: (Any) -> AppwriteModels.HealthQueue = { response in + return AppwriteModels.HealthQueue.from(map: response as! [String: Any]) + } + + return try await client.call( + method: "GET", + path: apiPath, + headers: apiHeaders, + params: apiParams, + converter: converter + ) + } + + /// + /// Get functions queue + /// + /// @param Int threshold /// @throws Exception /// @return array /// open func getQueueFunctions( + threshold: Int? = nil ) async throws -> AppwriteModels.HealthQueue { let apiPath: String = "/health/queue/functions" - let apiParams: [String: Any] = [:] + let apiParams: [String: Any?] = [ + "threshold": threshold + ] let apiHeaders: [String: String] = [ "content-type": "application/json" @@ -258,19 +377,95 @@ open class Health: Service { } /// - /// Get Logs Queue + /// Get logs queue /// /// Get the number of logs that are waiting to be processed in the Appwrite /// internal queue server. /// + /// @param Int threshold /// @throws Exception /// @return array /// open func getQueueLogs( + threshold: Int? = nil ) async throws -> AppwriteModels.HealthQueue { let apiPath: String = "/health/queue/logs" - let apiParams: [String: Any] = [:] + let apiParams: [String: Any?] = [ + "threshold": threshold + ] + + let apiHeaders: [String: String] = [ + "content-type": "application/json" + ] + + let converter: (Any) -> AppwriteModels.HealthQueue = { response in + return AppwriteModels.HealthQueue.from(map: response as! [String: Any]) + } + + return try await client.call( + method: "GET", + path: apiPath, + headers: apiHeaders, + params: apiParams, + converter: converter + ) + } + + /// + /// Get mails queue + /// + /// Get the number of mails that are waiting to be processed in the Appwrite + /// internal queue server. + /// + /// @param Int threshold + /// @throws Exception + /// @return array + /// + open func getQueueMails( + threshold: Int? = nil + ) async throws -> AppwriteModels.HealthQueue { + let apiPath: String = "/health/queue/mails" + + let apiParams: [String: Any?] = [ + "threshold": threshold + ] + + let apiHeaders: [String: String] = [ + "content-type": "application/json" + ] + + let converter: (Any) -> AppwriteModels.HealthQueue = { response in + return AppwriteModels.HealthQueue.from(map: response as! [String: Any]) + } + + return try await client.call( + method: "GET", + path: apiPath, + headers: apiHeaders, + params: apiParams, + converter: converter + ) + } + + /// + /// Get messaging queue + /// + /// Get the number of messages that are waiting to be processed in the Appwrite + /// internal queue server. + /// + /// @param Int threshold + /// @throws Exception + /// @return array + /// + open func getQueueMessaging( + threshold: Int? = nil + ) async throws -> AppwriteModels.HealthQueue { + let apiPath: String = "/health/queue/messaging" + + let apiParams: [String: Any?] = [ + "threshold": threshold + ] let apiHeaders: [String: String] = [ "content-type": "application/json" @@ -290,19 +485,59 @@ open class Health: Service { } /// - /// Get Webhooks Queue + /// Get migrations queue + /// + /// Get the number of migrations that are waiting to be processed in the + /// Appwrite internal queue server. + /// + /// @param Int threshold + /// @throws Exception + /// @return array + /// + open func getQueueMigrations( + threshold: Int? = nil + ) async throws -> AppwriteModels.HealthQueue { + let apiPath: String = "/health/queue/migrations" + + let apiParams: [String: Any?] = [ + "threshold": threshold + ] + + let apiHeaders: [String: String] = [ + "content-type": "application/json" + ] + + let converter: (Any) -> AppwriteModels.HealthQueue = { response in + return AppwriteModels.HealthQueue.from(map: response as! [String: Any]) + } + + return try await client.call( + method: "GET", + path: apiPath, + headers: apiHeaders, + params: apiParams, + converter: converter + ) + } + + /// + /// Get webhooks queue /// /// Get the number of webhooks that are waiting to be processed in the Appwrite /// internal queue server. /// + /// @param Int threshold /// @throws Exception /// @return array /// open func getQueueWebhooks( + threshold: Int? = nil ) async throws -> AppwriteModels.HealthQueue { let apiPath: String = "/health/queue/webhooks" - let apiParams: [String: Any] = [:] + let apiParams: [String: Any?] = [ + "threshold": threshold + ] let apiHeaders: [String: String] = [ "content-type": "application/json" @@ -322,7 +557,7 @@ open class Health: Service { } /// - /// Get Local Storage + /// Get local storage /// /// Check the Appwrite local storage device is up and connection is successful. /// @@ -353,7 +588,7 @@ open class Health: Service { } /// - /// Get Time + /// Get time /// /// Check the Appwrite server time is synced with Google remote NTP server. We /// use this technology to smoothly handle leap seconds with no disruptive diff --git a/Sources/Appwrite/Services/Locale.swift b/Sources/Appwrite/Services/Locale.swift index 716acb9..a64f8b3 100644 --- a/Sources/Appwrite/Services/Locale.swift +++ b/Sources/Appwrite/Services/Locale.swift @@ -8,7 +8,7 @@ import AppwriteModels open class Locale: Service { /// - /// Get User Locale + /// Get user locale /// /// Get the current user location based on IP. Returns an object with user /// country code, country name, continent name, continent code, ip address and @@ -76,7 +76,7 @@ open class Locale: Service { } /// - /// List Continents + /// List continents /// /// List of all continents. You can use the locale header to get the data in a /// supported language. @@ -108,7 +108,7 @@ open class Locale: Service { } /// - /// List Countries + /// List countries /// /// List of all countries. You can use the locale header to get the data in a /// supported language. @@ -140,7 +140,7 @@ open class Locale: Service { } /// - /// List EU Countries + /// List EU countries /// /// List of all countries that are currently members of the EU. You can use the /// locale header to get the data in a supported language. @@ -172,7 +172,7 @@ open class Locale: Service { } /// - /// List Countries Phone Codes + /// List countries phone codes /// /// List of all countries phone codes. You can use the locale header to get the /// data in a supported language. @@ -204,7 +204,7 @@ open class Locale: Service { } /// - /// List Currencies + /// List currencies /// /// List of all currencies, including currency symbol, name, plural, and /// decimal digits for all major and minor currencies. You can use the locale @@ -237,7 +237,7 @@ open class Locale: Service { } /// - /// List Languages + /// List languages /// /// List of all languages classified by ISO 639-1 including 2-letter code, name /// in English, and name in the respective language. diff --git a/Sources/Appwrite/Services/Storage.swift b/Sources/Appwrite/Services/Storage.swift index 0bf5b24..365b874 100644 --- a/Sources/Appwrite/Services/Storage.swift +++ b/Sources/Appwrite/Services/Storage.swift @@ -109,7 +109,7 @@ open class Storage: Service { } /// - /// Get Bucket + /// Get bucket /// /// Get a storage bucket by its unique ID. This endpoint response returns a /// JSON object with the storage bucket metadata. @@ -144,7 +144,7 @@ open class Storage: Service { } /// - /// Update Bucket + /// Update bucket /// /// Update a storage bucket by its unique ID. /// @@ -206,7 +206,7 @@ open class Storage: Service { } /// - /// Delete Bucket + /// Delete bucket /// /// Delete a storage bucket by its unique ID. /// @@ -234,7 +234,7 @@ open class Storage: Service { } /// - /// List Files + /// List files /// /// Get a list of all the user files. You can use the query params to filter /// your results. @@ -276,12 +276,12 @@ open class Storage: Service { } /// - /// Create File + /// Create file /// /// Create a new file. Before using this route, you should create a new bucket /// resource using either a [server - /// integration](/docs/server/storage#storageCreateBucket) API or directly from - /// your Appwrite console. + /// integration](https://appwrite.io/docs/server/storage#storageCreateBucket) + /// API or directly from your Appwrite console. /// /// Larger files should be uploaded using multiple requests with the /// [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) @@ -342,7 +342,7 @@ open class Storage: Service { } /// - /// Get File + /// Get file /// /// Get a file by its unique ID. This endpoint response returns a JSON object /// with the file metadata. @@ -380,7 +380,7 @@ open class Storage: Service { } /// - /// Update File + /// Update file /// /// Update a file by its unique ID. Only users with write permissions have /// access to update this resource. @@ -457,7 +457,7 @@ open class Storage: Service { } /// - /// Get File for Download + /// Get file for download /// /// Get a file content by its unique ID. The endpoint response return with a /// 'Content-Disposition: attachment' header that tells the browser to start @@ -486,7 +486,7 @@ open class Storage: Service { } /// - /// Get File Preview + /// Get file preview /// /// Get a file preview image. Currently, this method supports preview for image /// files (jpg, png, and gif), other supported formats, like pdf, docs, slides, @@ -553,7 +553,7 @@ open class Storage: Service { } /// - /// Get File for View + /// Get file for view /// /// Get a file content by its unique ID. This endpoint is similar to the /// download method but returns with no 'Content-Disposition: attachment' diff --git a/Sources/Appwrite/Services/Teams.swift b/Sources/Appwrite/Services/Teams.swift index 2b41859..7d783e2 100644 --- a/Sources/Appwrite/Services/Teams.swift +++ b/Sources/Appwrite/Services/Teams.swift @@ -8,7 +8,7 @@ import AppwriteModels open class Teams: Service { /// - /// List Teams + /// List teams /// /// Get a list of all the teams in which the current user is a member. You can /// use the parameters to filter your results. @@ -48,7 +48,7 @@ open class Teams: Service { } /// - /// List Teams + /// List teams /// /// Get a list of all the teams in which the current user is a member. You can /// use the parameters to filter your results. @@ -70,7 +70,7 @@ open class Teams: Service { } /// - /// Create Team + /// Create team /// /// Create a new team. The user who creates the team will automatically be /// assigned as the owner of the team. Only the users with the owner role can @@ -114,7 +114,7 @@ open class Teams: Service { } /// - /// Create Team + /// Create team /// /// Create a new team. The user who creates the team will automatically be /// assigned as the owner of the team. Only the users with the owner role can @@ -140,7 +140,7 @@ open class Teams: Service { } /// - /// Get Team + /// Get team /// /// Get a team by its ID. All team members have read access for this resource. /// @@ -175,7 +175,7 @@ open class Teams: Service { } /// - /// Get Team + /// Get team /// /// Get a team by its ID. All team members have read access for this resource. /// @@ -193,7 +193,7 @@ open class Teams: Service { } /// - /// Update Name + /// Update name /// /// Update the team's name by its unique ID. /// @@ -232,7 +232,7 @@ open class Teams: Service { } /// - /// Update Name + /// Update name /// /// Update the team's name by its unique ID. /// @@ -253,7 +253,7 @@ open class Teams: Service { } /// - /// Delete Team + /// Delete team /// /// Delete a team using its ID. Only team members with the owner role can /// delete the team. @@ -282,7 +282,7 @@ open class Teams: Service { } /// - /// List Team Memberships + /// List team memberships /// /// Use this endpoint to list a team's members using the team's ID. All team /// members have read access to this endpoint. @@ -324,7 +324,7 @@ open class Teams: Service { } /// - /// Create Team Membership + /// Create team membership /// /// Invite a new member to join your team. Provide an ID for existing users, or /// invite unregistered users using an email or phone number. If initiated from @@ -339,8 +339,8 @@ open class Teams: Service { /// /// Use the `url` parameter to redirect the user from the invitation email to /// your app. After the user is redirected, use the [Update Team Membership - /// Status](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow - /// the user to accept the invitation to the team. + /// Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) + /// endpoint to allow the user to accept the invitation to the team. /// /// Please note that to avoid a [Redirect /// Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) @@ -397,7 +397,7 @@ open class Teams: Service { } /// - /// Get Team Membership + /// Get team membership /// /// Get a team member by the membership unique id. All team members have read /// access for this resource. @@ -435,11 +435,11 @@ open class Teams: Service { } /// - /// Update Membership + /// Update membership /// /// Modify the roles of a team member. Only team members with the owner role /// have access to this endpoint. Learn more about [roles and - /// permissions](/docs/permissions). + /// permissions](https://appwrite.io/docs/permissions). /// /// /// @param String teamId @@ -479,7 +479,7 @@ open class Teams: Service { } /// - /// Delete Team Membership + /// Delete team membership /// /// This endpoint allows a user to leave a team or for a team owner to delete /// the membership of any other team member. You can also use this endpoint to @@ -512,7 +512,7 @@ open class Teams: Service { } /// - /// Update Team Membership Status + /// Update team membership status /// /// Use this endpoint to allow a user to accept an invitation to join a team /// after being redirected back to your app from the invitation email received @@ -562,11 +562,11 @@ open class Teams: Service { } /// - /// Get Team Preferences + /// Get team preferences /// /// Get the team's shared preferences by its unique ID. If a preference doesn't /// need to be shared by all team members, prefer storing them in [user - /// preferences](/docs/client/account#accountGetPrefs). + /// preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). /// /// @param String teamId /// @throws Exception @@ -599,11 +599,11 @@ open class Teams: Service { } /// - /// Get Team Preferences + /// Get team preferences /// /// Get the team's shared preferences by its unique ID. If a preference doesn't /// need to be shared by all team members, prefer storing them in [user - /// preferences](/docs/client/account#accountGetPrefs). + /// preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). /// /// @param String teamId /// @throws Exception @@ -619,7 +619,7 @@ open class Teams: Service { } /// - /// Update Preferences + /// Update preferences /// /// Update the team's preferences by its unique ID. The object you pass is /// stored as is and replaces any previous value. The maximum allowed prefs @@ -660,7 +660,7 @@ open class Teams: Service { } /// - /// Update Preferences + /// Update preferences /// /// Update the team's preferences by its unique ID. The object you pass is /// stored as is and replaces any previous value. The maximum allowed prefs diff --git a/Sources/Appwrite/Services/Users.swift b/Sources/Appwrite/Services/Users.swift index c286331..12ec691 100644 --- a/Sources/Appwrite/Services/Users.swift +++ b/Sources/Appwrite/Services/Users.swift @@ -8,7 +8,7 @@ import AppwriteModels open class Users: Service { /// - /// List Users + /// List users /// /// Get a list of all the project's users. You can use the query params to /// filter your results. @@ -48,7 +48,7 @@ open class Users: Service { } /// - /// List Users + /// List users /// /// Get a list of all the project's users. You can use the query params to /// filter your results. @@ -70,7 +70,7 @@ open class Users: Service { } /// - /// Create User + /// Create user /// /// Create a new user. /// @@ -118,7 +118,7 @@ open class Users: Service { } /// - /// Create User + /// Create user /// /// Create a new user. /// @@ -148,12 +148,12 @@ open class Users: Service { } /// - /// Create User with Argon2 Password + /// Create user with Argon2 password /// /// Create a new user. Password provided must be hashed with the /// [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST - /// /users](/docs/server/users#usersCreate) endpoint to create users with a - /// plain text password. + /// /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to + /// create users with a plain text password. /// /// @param String userId /// @param String email @@ -196,12 +196,12 @@ open class Users: Service { } /// - /// Create User with Argon2 Password + /// Create user with Argon2 password /// /// Create a new user. Password provided must be hashed with the /// [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST - /// /users](/docs/server/users#usersCreate) endpoint to create users with a - /// plain text password. + /// /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to + /// create users with a plain text password. /// /// @param String userId /// @param String email @@ -226,12 +226,12 @@ open class Users: Service { } /// - /// Create User with Bcrypt Password + /// Create user with bcrypt password /// /// Create a new user. Password provided must be hashed with the /// [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST - /// /users](/docs/server/users#usersCreate) endpoint to create users with a - /// plain text password. + /// /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to + /// create users with a plain text password. /// /// @param String userId /// @param String email @@ -274,12 +274,12 @@ open class Users: Service { } /// - /// Create User with Bcrypt Password + /// Create user with bcrypt password /// /// Create a new user. Password provided must be hashed with the /// [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST - /// /users](/docs/server/users#usersCreate) endpoint to create users with a - /// plain text password. + /// /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to + /// create users with a plain text password. /// /// @param String userId /// @param String email @@ -370,12 +370,12 @@ open class Users: Service { } /// - /// Create User with MD5 Password + /// Create user with MD5 password /// /// Create a new user. Password provided must be hashed with the /// [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST - /// /users](/docs/server/users#usersCreate) endpoint to create users with a - /// plain text password. + /// /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to + /// create users with a plain text password. /// /// @param String userId /// @param String email @@ -418,12 +418,12 @@ open class Users: Service { } /// - /// Create User with MD5 Password + /// Create user with MD5 password /// /// Create a new user. Password provided must be hashed with the /// [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST - /// /users](/docs/server/users#usersCreate) endpoint to create users with a - /// plain text password. + /// /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to + /// create users with a plain text password. /// /// @param String userId /// @param String email @@ -448,12 +448,12 @@ open class Users: Service { } /// - /// Create User with PHPass Password + /// Create user with PHPass password /// /// Create a new user. Password provided must be hashed with the /// [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST - /// /users](/docs/server/users#usersCreate) endpoint to create users with a - /// plain text password. + /// /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to + /// create users with a plain text password. /// /// @param String userId /// @param String email @@ -496,12 +496,12 @@ open class Users: Service { } /// - /// Create User with PHPass Password + /// Create user with PHPass password /// /// Create a new user. Password provided must be hashed with the /// [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST - /// /users](/docs/server/users#usersCreate) endpoint to create users with a - /// plain text password. + /// /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to + /// create users with a plain text password. /// /// @param String userId /// @param String email @@ -526,12 +526,12 @@ open class Users: Service { } /// - /// Create User with Scrypt Password + /// Create user with Scrypt password /// /// Create a new user. Password provided must be hashed with the /// [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST - /// /users](/docs/server/users#usersCreate) endpoint to create users with a - /// plain text password. + /// /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to + /// create users with a plain text password. /// /// @param String userId /// @param String email @@ -589,12 +589,12 @@ open class Users: Service { } /// - /// Create User with Scrypt Password + /// Create user with Scrypt password /// /// Create a new user. Password provided must be hashed with the /// [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST - /// /users](/docs/server/users#usersCreate) endpoint to create users with a - /// plain text password. + /// /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to + /// create users with a plain text password. /// /// @param String userId /// @param String email @@ -634,12 +634,13 @@ open class Users: Service { } /// - /// Create User with Scrypt Modified Password + /// Create user with Scrypt modified password /// /// Create a new user. Password provided must be hashed with the [Scrypt /// Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) - /// algorithm. Use the [POST /users](/docs/server/users#usersCreate) endpoint - /// to create users with a plain text password. + /// algorithm. Use the [POST + /// /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to + /// create users with a plain text password. /// /// @param String userId /// @param String email @@ -691,12 +692,13 @@ open class Users: Service { } /// - /// Create User with Scrypt Modified Password + /// Create user with Scrypt modified password /// /// Create a new user. Password provided must be hashed with the [Scrypt /// Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) - /// algorithm. Use the [POST /users](/docs/server/users#usersCreate) endpoint - /// to create users with a plain text password. + /// algorithm. Use the [POST + /// /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to + /// create users with a plain text password. /// /// @param String userId /// @param String email @@ -730,12 +732,12 @@ open class Users: Service { } /// - /// Create User with SHA Password + /// Create user with SHA password /// /// Create a new user. Password provided must be hashed with the /// [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use - /// the [POST /users](/docs/server/users#usersCreate) endpoint to create users - /// with a plain text password. + /// the [POST /users](https://appwrite.io/docs/server/users#usersCreate) + /// endpoint to create users with a plain text password. /// /// @param String userId /// @param String email @@ -781,12 +783,12 @@ open class Users: Service { } /// - /// Create User with SHA Password + /// Create user with SHA password /// /// Create a new user. Password provided must be hashed with the /// [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use - /// the [POST /users](/docs/server/users#usersCreate) endpoint to create users - /// with a plain text password. + /// the [POST /users](https://appwrite.io/docs/server/users#usersCreate) + /// endpoint to create users with a plain text password. /// /// @param String userId /// @param String email @@ -814,7 +816,7 @@ open class Users: Service { } /// - /// Get User + /// Get user /// /// Get a user by its unique ID. /// @@ -849,7 +851,7 @@ open class Users: Service { } /// - /// Get User + /// Get user /// /// Get a user by its unique ID. /// @@ -867,12 +869,13 @@ open class Users: Service { } /// - /// Delete User + /// Delete user /// /// Delete a user by its unique ID, thereby releasing it's ID. Since ID is /// released and can be reused, all user-related resources like documents or /// storage files should be deleted before user deletion. If you want to keep - /// ID reserved, use the [updateStatus](/docs/server/users#usersUpdateStatus) + /// ID reserved, use the + /// [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) /// endpoint instead. /// /// @param String userId @@ -899,7 +902,7 @@ open class Users: Service { } /// - /// Update Email + /// Update email /// /// Update the user email by its unique ID. /// @@ -938,7 +941,7 @@ open class Users: Service { } /// - /// Update Email + /// Update email /// /// Update the user email by its unique ID. /// @@ -959,14 +962,14 @@ open class Users: Service { } /// - /// Update User Labels + /// Update user labels /// /// Update the user labels by its unique ID. /// /// Labels can be used to grant access to resources. While teams are a way for /// user's to share access to a resource, labels can be defined by the /// developer to grant access without an invitation. See the [Permissions - /// docs](/docs/permissions) for more info. + /// docs](https://appwrite.io/docs/permissions) for more info. /// /// @param String userId /// @param [String] labels @@ -1003,14 +1006,14 @@ open class Users: Service { } /// - /// Update User Labels + /// Update user labels /// /// Update the user labels by its unique ID. /// /// Labels can be used to grant access to resources. While teams are a way for /// user's to share access to a resource, labels can be defined by the /// developer to grant access without an invitation. See the [Permissions - /// docs](/docs/permissions) for more info. + /// docs](https://appwrite.io/docs/permissions) for more info. /// /// @param String userId /// @param [String] labels @@ -1029,7 +1032,7 @@ open class Users: Service { } /// - /// List User Logs + /// List user logs /// /// Get the user activity logs list by its unique ID. /// @@ -1067,7 +1070,7 @@ open class Users: Service { } /// - /// List User Memberships + /// List user memberships /// /// Get the user membership list by its unique ID. /// @@ -1101,7 +1104,7 @@ open class Users: Service { } /// - /// Update Name + /// Update name /// /// Update the user name by its unique ID. /// @@ -1140,7 +1143,7 @@ open class Users: Service { } /// - /// Update Name + /// Update name /// /// Update the user name by its unique ID. /// @@ -1161,7 +1164,7 @@ open class Users: Service { } /// - /// Update Password + /// Update password /// /// Update the user password by its unique ID. /// @@ -1200,7 +1203,7 @@ open class Users: Service { } /// - /// Update Password + /// Update password /// /// Update the user password by its unique ID. /// @@ -1221,7 +1224,7 @@ open class Users: Service { } /// - /// Update Phone + /// Update phone /// /// Update the user phone by its unique ID. /// @@ -1260,7 +1263,7 @@ open class Users: Service { } /// - /// Update Phone + /// Update phone /// /// Update the user phone by its unique ID. /// @@ -1281,7 +1284,7 @@ open class Users: Service { } /// - /// Get User Preferences + /// Get user preferences /// /// Get the user preferences by its unique ID. /// @@ -1316,7 +1319,7 @@ open class Users: Service { } /// - /// Get User Preferences + /// Get user preferences /// /// Get the user preferences by its unique ID. /// @@ -1334,7 +1337,7 @@ open class Users: Service { } /// - /// Update User Preferences + /// Update user preferences /// /// Update the user preferences by its unique ID. The object you pass is stored /// as is, and replaces any previous value. The maximum allowed prefs size is @@ -1375,7 +1378,7 @@ open class Users: Service { } /// - /// Update User Preferences + /// Update user preferences /// /// Update the user preferences by its unique ID. The object you pass is stored /// as is, and replaces any previous value. The maximum allowed prefs size is @@ -1398,7 +1401,7 @@ open class Users: Service { } /// - /// List User Sessions + /// List user sessions /// /// Get the user sessions list by its unique ID. /// @@ -1432,7 +1435,7 @@ open class Users: Service { } /// - /// Delete User Sessions + /// Delete user sessions /// /// Delete all user's sessions by using the user's unique ID. /// @@ -1460,7 +1463,7 @@ open class Users: Service { } /// - /// Delete User Session + /// Delete user session /// /// Delete a user sessions by its unique ID. /// @@ -1491,7 +1494,7 @@ open class Users: Service { } /// - /// Update User Status + /// Update user status /// /// Update the user status by its unique ID. Use this endpoint as an /// alternative to deleting a user if you want to keep user's ID reserved. @@ -1531,7 +1534,7 @@ open class Users: Service { } /// - /// Update User Status + /// Update user status /// /// Update the user status by its unique ID. Use this endpoint as an /// alternative to deleting a user if you want to keep user's ID reserved. @@ -1553,7 +1556,7 @@ open class Users: Service { } /// - /// Update Email Verification + /// Update email verification /// /// Update the user email verification status by its unique ID. /// @@ -1592,7 +1595,7 @@ open class Users: Service { } /// - /// Update Email Verification + /// Update email verification /// /// Update the user email verification status by its unique ID. /// @@ -1613,7 +1616,7 @@ open class Users: Service { } /// - /// Update Phone Verification + /// Update phone verification /// /// Update the user phone verification status by its unique ID. /// @@ -1652,7 +1655,7 @@ open class Users: Service { } /// - /// Update Phone Verification + /// Update phone verification /// /// Update the user phone verification status by its unique ID. /// diff --git a/Sources/AppwriteModels/Bucket.swift b/Sources/AppwriteModels/Bucket.swift index 71f6e7d..9986ae6 100644 --- a/Sources/AppwriteModels/Bucket.swift +++ b/Sources/AppwriteModels/Bucket.swift @@ -13,10 +13,10 @@ public class Bucket { /// Bucket update date in ISO 8601 format. public let updatedAt: String - /// Bucket permissions. [Learn more about permissions](/docs/permissions). + /// Bucket permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). public let permissions: [Any] - /// Whether file-level security is enabled. [Learn more about permissions](/docs/permissions). + /// Whether file-level security is enabled. [Learn more about permissions](https://appwrite.io/docs/permissions). public let fileSecurity: Bool /// Bucket name. diff --git a/Sources/AppwriteModels/Collection.swift b/Sources/AppwriteModels/Collection.swift index 7ab9c1c..7ff6243 100644 --- a/Sources/AppwriteModels/Collection.swift +++ b/Sources/AppwriteModels/Collection.swift @@ -13,7 +13,7 @@ public class Collection { /// Collection update date in ISO 8601 format. public let updatedAt: String - /// Collection permissions. [Learn more about permissions](/docs/permissions). + /// Collection permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). public let permissions: [Any] /// Database ID. @@ -25,7 +25,7 @@ public class Collection { /// Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys. public let enabled: Bool - /// Whether document-level permissions are enabled. [Learn more about permissions](/docs/permissions). + /// Whether document-level permissions are enabled. [Learn more about permissions](https://appwrite.io/docs/permissions). public let documentSecurity: Bool /// Collection attributes. diff --git a/Sources/AppwriteModels/Document.swift b/Sources/AppwriteModels/Document.swift index 462091c..94069f9 100644 --- a/Sources/AppwriteModels/Document.swift +++ b/Sources/AppwriteModels/Document.swift @@ -19,7 +19,7 @@ public class Document { /// Document update date in ISO 8601 format. public let updatedAt: String - /// Document permissions. [Learn more about permissions](/docs/permissions). + /// Document permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). public let permissions: [Any] /// Additional properties diff --git a/Sources/AppwriteModels/File.swift b/Sources/AppwriteModels/File.swift index 3555f23..04a5b89 100644 --- a/Sources/AppwriteModels/File.swift +++ b/Sources/AppwriteModels/File.swift @@ -16,7 +16,7 @@ public class File { /// File update date in ISO 8601 format. public let updatedAt: String - /// File permissions. [Learn more about permissions](/docs/permissions). + /// File permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). public let permissions: [Any] /// File name. diff --git a/docs/examples/health/get-queue-builds.md b/docs/examples/health/get-queue-builds.md new file mode 100644 index 0000000..5c8ac11 --- /dev/null +++ b/docs/examples/health/get-queue-builds.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueBuilds() + diff --git a/docs/examples/health/get-queue-databases.md b/docs/examples/health/get-queue-databases.md new file mode 100644 index 0000000..a35bd6b --- /dev/null +++ b/docs/examples/health/get-queue-databases.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueDatabases() + diff --git a/docs/examples/health/get-queue-deletes.md b/docs/examples/health/get-queue-deletes.md new file mode 100644 index 0000000..fc0ec10 --- /dev/null +++ b/docs/examples/health/get-queue-deletes.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueDeletes() + diff --git a/docs/examples/health/get-queue-mails.md b/docs/examples/health/get-queue-mails.md new file mode 100644 index 0000000..a9177a7 --- /dev/null +++ b/docs/examples/health/get-queue-mails.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueMails() + diff --git a/docs/examples/health/get-queue-messaging.md b/docs/examples/health/get-queue-messaging.md new file mode 100644 index 0000000..04e3643 --- /dev/null +++ b/docs/examples/health/get-queue-messaging.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueMessaging() + diff --git a/docs/examples/health/get-queue-migrations.md b/docs/examples/health/get-queue-migrations.md new file mode 100644 index 0000000..6b28b4e --- /dev/null +++ b/docs/examples/health/get-queue-migrations.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint + .setProject("5df5acd0d48c2") // Your project ID + .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueMigrations() +