Skip to content

Commit 32262c2

Browse files
committed
feat: SDK update for version 1.9.1
1 parent adea4c4 commit 32262c2

482 files changed

Lines changed: 13496 additions & 226 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 0 additions & 82 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/documentation.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [0.2.0] - TBD
8+
## [0.3.0] - TBD
99

1010
### Added
1111
- Initial release of Appwrite Rust SDK
12-
- Full support for Appwrite API 1.9.0
12+
- Full support for Appwrite API 1.9.1
1313
- Async/await support with tokio runtime
1414
- Built-in error handling with custom error types
1515
- File upload support with automatic chunking
@@ -32,7 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3232
- Health service with 24 methods
3333
- Locale service with 8 methods
3434
- Messaging service with 56 methods
35-
- Project service with 5 methods
35+
- Project service with 26 methods
3636
- Sites service with 25 methods
3737
- Storage service with 13 methods
3838
- TablesDB service with 69 methods
@@ -332,6 +332,7 @@ The Health service allows you to both validate and monitor your Appwrite server&
332332
- `get_db()` - Check the Appwrite database servers are up and connection is successful.
333333
- `get_pub_sub()` - Check the Appwrite pub-sub servers are up and connection is successful.
334334
- `get_queue_audits()` - Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server.
335+
335336
- `get_queue_builds()` - Get the number of builds that are waiting to be processed in the Appwrite internal queue server.
336337
- `get_queue_certificates()` - Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.
337338
- `get_queue_databases()` - Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.
@@ -433,6 +434,27 @@ The Messaging service allows you to send messages to any provider type (SMTP, pu
433434

434435
#### Project
435436
The Project service allows you to manage all the projects in your Appwrite server.
437+
- `list_keys()` - Get a list of all API keys from the current project.
438+
- `create_key()` - Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.
439+
- `get_key()` - Get a key by its unique ID.
440+
- `update_key()` - Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
441+
- `delete_key()` - Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
442+
- `update_labels()` - Update the project labels. Labels can be used to easily filter projects in an organization.
443+
- `list_platforms()` - Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.
444+
- `create_android_platform()` - Create a new Android platform for your project. Use this endpoint to register a new Android platform where your users will run your application which will interact with the Appwrite API.
445+
- `update_android_platform()` - Update an Android platform by its unique ID. Use this endpoint to update the platform's name or application ID.
446+
- `create_apple_platform()` - Create a new Apple platform for your project. Use this endpoint to register a new Apple platform where your users will run your application which will interact with the Appwrite API.
447+
- `update_apple_platform()` - Update an Apple platform by its unique ID. Use this endpoint to update the platform's name or bundle identifier.
448+
- `create_linux_platform()` - Create a new Linux platform for your project. Use this endpoint to register a new Linux platform where your users will run your application which will interact with the Appwrite API.
449+
- `update_linux_platform()` - Update a Linux platform by its unique ID. Use this endpoint to update the platform's name or package name.
450+
- `create_web_platform()` - Create a new web platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.
451+
- `update_web_platform()` - Update a web platform by its unique ID. Use this endpoint to update the platform's name or hostname.
452+
- `create_windows_platform()` - Create a new Windows platform for your project. Use this endpoint to register a new Windows platform where your users will run your application which will interact with the Appwrite API.
453+
- `update_windows_platform()` - Update a Windows platform by its unique ID. Use this endpoint to update the platform's name or package identifier name.
454+
- `get_platform()` - Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations.
455+
- `delete_platform()` - Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.
456+
- `update_protocol_status()` - Update the status of a specific protocol. Use this endpoint to enable or disable a protocol in your project.
457+
- `update_service_status()` - Update the status of a specific service. Use this endpoint to enable or disable a service in your project.
436458
- `list_variables()` - Get a list of all project environment variables.
437459
- `create_variable()` - Create a new project environment variable. These variables can be accessed by all functions and sites in the project.
438460
- `get_variable()` - Get a variable by its unique ID.
@@ -693,7 +715,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
693715
- `get()` - Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project.
694716
- `update()` - Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.
695717
- `delete()` - Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events.
696-
- `update_signature()` - Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook.
718+
- `update_secret()` - Update the webhook signing key. This endpoint can be used to regenerate the signing key used to sign and validate payload deliveries for a specific webhook.
697719

698720

699721
### Models
@@ -720,6 +742,7 @@ If you want to generate a token for a custom authentication flow, use the [POST
720742
- `DeploymentList` - Deployments List
721743
- `ExecutionList` - Executions List
722744
- `WebhookList` - Webhooks List
745+
- `KeyList` - API Keys List
723746
- `CountryList` - Countries List
724747
- `ContinentList` - Continents List
725748
- `LanguageList` - Languages List
@@ -806,7 +829,18 @@ If you want to generate a token for a custom authentication flow, use the [POST
806829
- `FrameworkAdapter` - Framework Adapter
807830
- `Deployment` - Deployment
808831
- `Execution` - Execution
832+
- `Project` - Project
809833
- `Webhook` - Webhook
834+
- `Key` - Key
835+
- `DevKey` - DevKey
836+
- `MockNumber` - Mock Number
837+
- `AuthProvider` - AuthProvider
838+
- `PlatformWeb` - Platform Web
839+
- `PlatformApple` - Platform Apple
840+
- `PlatformAndroid` - Platform Android
841+
- `PlatformWindows` - Platform Windows
842+
- `PlatformLinux` - Platform Linux
843+
- `PlatformList` - Platforms List
810844
- `Variable` - Variable
811845
- `Country` - Country
812846
- `Continent` - Continent
@@ -832,6 +866,8 @@ If you want to generate a token for a custom authentication flow, use the [POST
832866
- `Target` - Target
833867
- `ActivityEvent` - ActivityEvent
834868
- `BackupArchive` - Archive
869+
- `BillingLimits` - BillingLimits
870+
- `Block` - Block
835871
- `BackupPolicy` - backup
836872
- `BackupRestoration` - Restoration
837873
- `ActivityEventList` - Activity event list
@@ -853,4 +889,4 @@ If you want to generate a token for a custom authentication flow, use the [POST
853889
- File upload examples
854890
- Query builder documentation
855891

856-
[0.2.0]: https://github.com/appwrite/sdk-for-rust/releases/tag/0.2.0
892+
[0.3.0]: https://github.com/appwrite/sdk-for-rust/releases/tag/0.3.0

Cargo.toml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "appwrite"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
edition = "2021"
55
rust-version = "1.83"
66
authors = ["appwrite"]
@@ -18,19 +18,23 @@ autobenches = false
1818

1919
[dependencies]
2020
serde = { version = "1.0.228", features = ["derive"] }
21-
serde_json = "1.0"
21+
serde_json = "1.0.149"
2222
reqwest = { version = "0.12.28", features = ["json", "multipart", "stream"] }
2323
tokio = { version = "1.48.0", features = ["full"] }
24-
url = "2.4"
25-
mime = "0.3"
26-
fastrand = "2.0"
27-
thiserror = "1.0"
28-
bytes = "1.0"
24+
indexmap = ">=2, <2.12"
25+
url = ">=2.4.1, <2.5"
26+
mime = "0.3.17"
27+
fastrand = "=2.0.2"
28+
thiserror = "1.0.69"
29+
bytes = "1.11.1"
2930
arc-swap = "1.8.0"
3031

32+
[target.'cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos"))'.dependencies]
33+
security-framework = ">=3, <3.7"
34+
3135
[dev-dependencies]
32-
tokio-test = "0.4"
33-
wiremock = "0.5"
36+
tokio-test = "=0.4.4"
37+
wiremock = "=0.5.22"
3438

3539
[lib]
3640
name = "appwrite"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Appwrite Rust SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-rust.svg)
4-
![Version](https://img.shields.io/badge/api%20version-1.9.0-blue.svg)
4+
![Version](https://img.shields.io/badge/api%20version-1.9.1-blue.svg)
55
[![Crates.io](https://img.shields.io/crates/v/appwrite.svg)](https://crates.io/crates/appwrite)
66
[![Documentation](https://docs.rs/appwrite/badge.svg)](https://docs.rs/appwrite)
77

@@ -17,7 +17,7 @@ Add this to your `Cargo.toml`:
1717

1818
```toml
1919
[dependencies]
20-
appwrite = "0.2.0"
20+
appwrite = "0.3.0"
2121
tokio = { version = "1.48", features = ["full"] }
2222
```
2323

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
```rust
2+
use appwrite::Client;
3+
use appwrite::services::Account;
4+
5+
#[tokio::main]
6+
async fn main() -> Result<(), Box<dyn std::error::Error>> {
7+
let client = Client::new();
8+
client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1"); // Your API Endpoint
9+
client.set_project("<YOUR_PROJECT_ID>"); // Your project ID
10+
client.set_session(""); // The user session to authenticate with
11+
12+
let account = Account::new(&client);
13+
14+
let result = account.create_anonymous_session().await?;
15+
16+
let _ = result;
17+
18+
Ok(())
19+
}
20+
```
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
```rust
2+
use appwrite::Client;
3+
use appwrite::services::Account;
4+
5+
#[tokio::main]
6+
async fn main() -> Result<(), Box<dyn std::error::Error>> {
7+
let client = Client::new();
8+
client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1"); // Your API Endpoint
9+
client.set_project("<YOUR_PROJECT_ID>"); // Your project ID
10+
client.set_session(""); // The user session to authenticate with
11+
12+
let account = Account::new(&client);
13+
14+
let result = account.create_email_password_session(
15+
"email@example.com",
16+
"password"
17+
).await?;
18+
19+
let _ = result;
20+
21+
Ok(())
22+
}
23+
```
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
```rust
2+
use appwrite::Client;
3+
use appwrite::services::Account;
4+
5+
#[tokio::main]
6+
async fn main() -> Result<(), Box<dyn std::error::Error>> {
7+
let client = Client::new();
8+
client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1"); // Your API Endpoint
9+
client.set_project("<YOUR_PROJECT_ID>"); // Your project ID
10+
client.set_session(""); // The user session to authenticate with
11+
12+
let account = Account::new(&client);
13+
14+
let result = account.create_email_token(
15+
"<USER_ID>",
16+
"email@example.com",
17+
Some(false) // optional
18+
).await?;
19+
20+
let _ = result;
21+
22+
Ok(())
23+
}
24+
```

0 commit comments

Comments
 (0)