From d9a640a4fdb891952631f455034fb1488599c7c6 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 19 Feb 2026 10:30:06 +0000 Subject: [PATCH 1/4] regenerate --- Appwrite/Appwrite.csproj | 2 +- Appwrite/Client.cs | 4 +- Appwrite/Enums/BuildRuntime.cs | 20 ++ Appwrite/Enums/Runtime.cs | 20 ++ Appwrite/Enums/Scopes.cs | 3 + Appwrite/Models/ActivityEvent.cs | 249 ++++++++++++++++++ Appwrite/Models/ActivityEventList.cs | 39 +++ Appwrite/Models/AttributeLongtext.cs | 13 +- Appwrite/Models/AttributeMediumtext.cs | 13 +- Appwrite/Models/AttributeText.cs | 13 +- Appwrite/Models/AttributeVarchar.cs | 13 +- Appwrite/Models/ColumnLongtext.cs | 13 +- Appwrite/Models/ColumnMediumtext.cs | 13 +- Appwrite/Models/ColumnText.cs | 13 +- Appwrite/Models/ColumnVarchar.cs | 13 +- Appwrite/Query.cs | 23 ++ Appwrite/Services/Activities.cs | 79 ++++++ Appwrite/Services/Databases.cs | 20 +- Appwrite/Services/TablesDB.cs | 20 +- CHANGELOG.md | 25 -- README.md | 8 +- .../get-event.md} | 6 +- .../list-events.md} | 6 +- .../databases/create-longtext-attribute.md | 3 +- .../databases/create-mediumtext-attribute.md | 3 +- .../databases/create-text-attribute.md | 3 +- .../databases/create-varchar-attribute.md | 3 +- .../get-queue-billing-project-aggregation.md | 15 -- .../health/get-queue-priority-builds.md | 15 -- .../health/get-queue-region-manager.md | 15 -- .../tablesdb/create-longtext-column.md | 3 +- .../tablesdb/create-mediumtext-column.md | 3 +- docs/examples/tablesdb/create-text-column.md | 3 +- .../tablesdb/create-varchar-column.md | 3 +- 34 files changed, 566 insertions(+), 131 deletions(-) create mode 100644 Appwrite/Models/ActivityEvent.cs create mode 100644 Appwrite/Models/ActivityEventList.cs create mode 100644 Appwrite/Services/Activities.cs rename docs/examples/{health/get-queue-threats.md => activities/get-event.md} (70%) rename docs/examples/{health/get-queue-billing-team-aggregation.md => activities/list-events.md} (69%) delete mode 100644 docs/examples/health/get-queue-billing-project-aggregation.md delete mode 100644 docs/examples/health/get-queue-priority-builds.md delete mode 100644 docs/examples/health/get-queue-region-manager.md diff --git a/Appwrite/Appwrite.csproj b/Appwrite/Appwrite.csproj index 942fe653..a5d8d3d0 100644 --- a/Appwrite/Appwrite.csproj +++ b/Appwrite/Appwrite.csproj @@ -2,7 +2,7 @@ netstandard2.0;net462 Appwrite - 0.26.0 + 0.27.0 Appwrite Team Appwrite Team diff --git a/Appwrite/Client.cs b/Appwrite/Client.cs index 2c535750..ee93af48 100644 --- a/Appwrite/Client.cs +++ b/Appwrite/Client.cs @@ -69,11 +69,11 @@ public Client( _headers = new Dictionary() { { "content-type", "application/json" }, - { "user-agent" , $"AppwriteDotNetSDK/0.26.0 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"}, + { "user-agent" , $"AppwriteDotNetSDK/0.27.0 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"}, { "x-sdk-name", ".NET" }, { "x-sdk-platform", "server" }, { "x-sdk-language", "dotnet" }, - { "x-sdk-version", "0.26.0"}, + { "x-sdk-version", "0.27.0"}, { "X-Appwrite-Response-Format", "1.8.0" } }; diff --git a/Appwrite/Enums/BuildRuntime.cs b/Appwrite/Enums/BuildRuntime.cs index c6c549aa..1617eceb 100644 --- a/Appwrite/Enums/BuildRuntime.cs +++ b/Appwrite/Enums/BuildRuntime.cs @@ -18,24 +18,35 @@ public BuildRuntime(string value) public static BuildRuntime Node200 => new BuildRuntime("node-20.0"); public static BuildRuntime Node210 => new BuildRuntime("node-21.0"); public static BuildRuntime Node22 => new BuildRuntime("node-22"); + public static BuildRuntime Node23 => new BuildRuntime("node-23"); + public static BuildRuntime Node24 => new BuildRuntime("node-24"); + public static BuildRuntime Node25 => new BuildRuntime("node-25"); public static BuildRuntime Php80 => new BuildRuntime("php-8.0"); public static BuildRuntime Php81 => new BuildRuntime("php-8.1"); public static BuildRuntime Php82 => new BuildRuntime("php-8.2"); public static BuildRuntime Php83 => new BuildRuntime("php-8.3"); + public static BuildRuntime Php84 => new BuildRuntime("php-8.4"); public static BuildRuntime Ruby30 => new BuildRuntime("ruby-3.0"); public static BuildRuntime Ruby31 => new BuildRuntime("ruby-3.1"); public static BuildRuntime Ruby32 => new BuildRuntime("ruby-3.2"); public static BuildRuntime Ruby33 => new BuildRuntime("ruby-3.3"); + public static BuildRuntime Ruby34 => new BuildRuntime("ruby-3.4"); + public static BuildRuntime Ruby40 => new BuildRuntime("ruby-4.0"); public static BuildRuntime Python38 => new BuildRuntime("python-3.8"); public static BuildRuntime Python39 => new BuildRuntime("python-3.9"); public static BuildRuntime Python310 => new BuildRuntime("python-3.10"); public static BuildRuntime Python311 => new BuildRuntime("python-3.11"); public static BuildRuntime Python312 => new BuildRuntime("python-3.12"); + public static BuildRuntime Python313 => new BuildRuntime("python-3.13"); + public static BuildRuntime Python314 => new BuildRuntime("python-3.14"); public static BuildRuntime PythonMl311 => new BuildRuntime("python-ml-3.11"); public static BuildRuntime PythonMl312 => new BuildRuntime("python-ml-3.12"); + public static BuildRuntime PythonMl313 => new BuildRuntime("python-ml-3.13"); public static BuildRuntime Deno140 => new BuildRuntime("deno-1.40"); public static BuildRuntime Deno146 => new BuildRuntime("deno-1.46"); public static BuildRuntime Deno20 => new BuildRuntime("deno-2.0"); + public static BuildRuntime Deno25 => new BuildRuntime("deno-2.5"); + public static BuildRuntime Deno26 => new BuildRuntime("deno-2.6"); public static BuildRuntime Dart215 => new BuildRuntime("dart-2.15"); public static BuildRuntime Dart216 => new BuildRuntime("dart-2.16"); public static BuildRuntime Dart217 => new BuildRuntime("dart-2.17"); @@ -51,25 +62,34 @@ public BuildRuntime(string value) public static BuildRuntime Dotnet60 => new BuildRuntime("dotnet-6.0"); public static BuildRuntime Dotnet70 => new BuildRuntime("dotnet-7.0"); public static BuildRuntime Dotnet80 => new BuildRuntime("dotnet-8.0"); + public static BuildRuntime Dotnet10 => new BuildRuntime("dotnet-10"); public static BuildRuntime Java80 => new BuildRuntime("java-8.0"); public static BuildRuntime Java110 => new BuildRuntime("java-11.0"); public static BuildRuntime Java170 => new BuildRuntime("java-17.0"); public static BuildRuntime Java180 => new BuildRuntime("java-18.0"); public static BuildRuntime Java210 => new BuildRuntime("java-21.0"); public static BuildRuntime Java22 => new BuildRuntime("java-22"); + public static BuildRuntime Java25 => new BuildRuntime("java-25"); public static BuildRuntime Swift55 => new BuildRuntime("swift-5.5"); public static BuildRuntime Swift58 => new BuildRuntime("swift-5.8"); public static BuildRuntime Swift59 => new BuildRuntime("swift-5.9"); public static BuildRuntime Swift510 => new BuildRuntime("swift-5.10"); + public static BuildRuntime Swift62 => new BuildRuntime("swift-6.2"); public static BuildRuntime Kotlin16 => new BuildRuntime("kotlin-1.6"); public static BuildRuntime Kotlin18 => new BuildRuntime("kotlin-1.8"); public static BuildRuntime Kotlin19 => new BuildRuntime("kotlin-1.9"); public static BuildRuntime Kotlin20 => new BuildRuntime("kotlin-2.0"); + public static BuildRuntime Kotlin23 => new BuildRuntime("kotlin-2.3"); public static BuildRuntime Cpp17 => new BuildRuntime("cpp-17"); public static BuildRuntime Cpp20 => new BuildRuntime("cpp-20"); public static BuildRuntime Bun10 => new BuildRuntime("bun-1.0"); public static BuildRuntime Bun11 => new BuildRuntime("bun-1.1"); + public static BuildRuntime Bun12 => new BuildRuntime("bun-1.2"); + public static BuildRuntime Bun13 => new BuildRuntime("bun-1.3"); public static BuildRuntime Go123 => new BuildRuntime("go-1.23"); + public static BuildRuntime Go124 => new BuildRuntime("go-1.24"); + public static BuildRuntime Go125 => new BuildRuntime("go-1.25"); + public static BuildRuntime Go126 => new BuildRuntime("go-1.26"); public static BuildRuntime Static1 => new BuildRuntime("static-1"); public static BuildRuntime Flutter324 => new BuildRuntime("flutter-3.24"); public static BuildRuntime Flutter327 => new BuildRuntime("flutter-3.27"); diff --git a/Appwrite/Enums/Runtime.cs b/Appwrite/Enums/Runtime.cs index 2573c6c4..6c5f4f4d 100644 --- a/Appwrite/Enums/Runtime.cs +++ b/Appwrite/Enums/Runtime.cs @@ -18,24 +18,35 @@ public Runtime(string value) public static Runtime Node200 => new Runtime("node-20.0"); public static Runtime Node210 => new Runtime("node-21.0"); public static Runtime Node22 => new Runtime("node-22"); + public static Runtime Node23 => new Runtime("node-23"); + public static Runtime Node24 => new Runtime("node-24"); + public static Runtime Node25 => new Runtime("node-25"); public static Runtime Php80 => new Runtime("php-8.0"); public static Runtime Php81 => new Runtime("php-8.1"); public static Runtime Php82 => new Runtime("php-8.2"); public static Runtime Php83 => new Runtime("php-8.3"); + public static Runtime Php84 => new Runtime("php-8.4"); public static Runtime Ruby30 => new Runtime("ruby-3.0"); public static Runtime Ruby31 => new Runtime("ruby-3.1"); public static Runtime Ruby32 => new Runtime("ruby-3.2"); public static Runtime Ruby33 => new Runtime("ruby-3.3"); + public static Runtime Ruby34 => new Runtime("ruby-3.4"); + public static Runtime Ruby40 => new Runtime("ruby-4.0"); public static Runtime Python38 => new Runtime("python-3.8"); public static Runtime Python39 => new Runtime("python-3.9"); public static Runtime Python310 => new Runtime("python-3.10"); public static Runtime Python311 => new Runtime("python-3.11"); public static Runtime Python312 => new Runtime("python-3.12"); + public static Runtime Python313 => new Runtime("python-3.13"); + public static Runtime Python314 => new Runtime("python-3.14"); public static Runtime PythonMl311 => new Runtime("python-ml-3.11"); public static Runtime PythonMl312 => new Runtime("python-ml-3.12"); + public static Runtime PythonMl313 => new Runtime("python-ml-3.13"); public static Runtime Deno140 => new Runtime("deno-1.40"); public static Runtime Deno146 => new Runtime("deno-1.46"); public static Runtime Deno20 => new Runtime("deno-2.0"); + public static Runtime Deno25 => new Runtime("deno-2.5"); + public static Runtime Deno26 => new Runtime("deno-2.6"); public static Runtime Dart215 => new Runtime("dart-2.15"); public static Runtime Dart216 => new Runtime("dart-2.16"); public static Runtime Dart217 => new Runtime("dart-2.17"); @@ -51,25 +62,34 @@ public Runtime(string value) public static Runtime Dotnet60 => new Runtime("dotnet-6.0"); public static Runtime Dotnet70 => new Runtime("dotnet-7.0"); public static Runtime Dotnet80 => new Runtime("dotnet-8.0"); + public static Runtime Dotnet10 => new Runtime("dotnet-10"); public static Runtime Java80 => new Runtime("java-8.0"); public static Runtime Java110 => new Runtime("java-11.0"); public static Runtime Java170 => new Runtime("java-17.0"); public static Runtime Java180 => new Runtime("java-18.0"); public static Runtime Java210 => new Runtime("java-21.0"); public static Runtime Java22 => new Runtime("java-22"); + public static Runtime Java25 => new Runtime("java-25"); public static Runtime Swift55 => new Runtime("swift-5.5"); public static Runtime Swift58 => new Runtime("swift-5.8"); public static Runtime Swift59 => new Runtime("swift-5.9"); public static Runtime Swift510 => new Runtime("swift-5.10"); + public static Runtime Swift62 => new Runtime("swift-6.2"); public static Runtime Kotlin16 => new Runtime("kotlin-1.6"); public static Runtime Kotlin18 => new Runtime("kotlin-1.8"); public static Runtime Kotlin19 => new Runtime("kotlin-1.9"); public static Runtime Kotlin20 => new Runtime("kotlin-2.0"); + public static Runtime Kotlin23 => new Runtime("kotlin-2.3"); public static Runtime Cpp17 => new Runtime("cpp-17"); public static Runtime Cpp20 => new Runtime("cpp-20"); public static Runtime Bun10 => new Runtime("bun-1.0"); public static Runtime Bun11 => new Runtime("bun-1.1"); + public static Runtime Bun12 => new Runtime("bun-1.2"); + public static Runtime Bun13 => new Runtime("bun-1.3"); public static Runtime Go123 => new Runtime("go-1.23"); + public static Runtime Go124 => new Runtime("go-1.24"); + public static Runtime Go125 => new Runtime("go-1.25"); + public static Runtime Go126 => new Runtime("go-1.26"); public static Runtime Static1 => new Runtime("static-1"); public static Runtime Flutter324 => new Runtime("flutter-3.24"); public static Runtime Flutter327 => new Runtime("flutter-3.27"); diff --git a/Appwrite/Enums/Scopes.cs b/Appwrite/Enums/Scopes.cs index 992d13c8..813361dd 100644 --- a/Appwrite/Enums/Scopes.cs +++ b/Appwrite/Enums/Scopes.cs @@ -59,6 +59,8 @@ public Scopes(string value) public static Scopes TargetsWrite => new Scopes("targets.write"); public static Scopes RulesRead => new Scopes("rules.read"); public static Scopes RulesWrite => new Scopes("rules.write"); + public static Scopes SchedulesRead => new Scopes("schedules.read"); + public static Scopes SchedulesWrite => new Scopes("schedules.write"); public static Scopes MigrationsRead => new Scopes("migrations.read"); public static Scopes MigrationsWrite => new Scopes("migrations.write"); public static Scopes VcsRead => new Scopes("vcs.read"); @@ -74,5 +76,6 @@ public Scopes(string value) public static Scopes RestorationsWrite => new Scopes("restorations.write"); public static Scopes DomainsRead => new Scopes("domains.read"); public static Scopes DomainsWrite => new Scopes("domains.write"); + public static Scopes EventsRead => new Scopes("events.read"); } } diff --git a/Appwrite/Models/ActivityEvent.cs b/Appwrite/Models/ActivityEvent.cs new file mode 100644 index 00000000..c0aaa139 --- /dev/null +++ b/Appwrite/Models/ActivityEvent.cs @@ -0,0 +1,249 @@ + +using System; +using System.Linq; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Appwrite.Enums; +using Appwrite.Extensions; + +namespace Appwrite.Models +{ + public class ActivityEvent + { + [JsonPropertyName("$id")] + public string Id { get; private set; } + + [JsonPropertyName("userType")] + public string UserType { get; private set; } + + [JsonPropertyName("userId")] + public string UserId { get; private set; } + + [JsonPropertyName("userEmail")] + public string UserEmail { get; private set; } + + [JsonPropertyName("userName")] + public string UserName { get; private set; } + + [JsonPropertyName("resourceParent")] + public string ResourceParent { get; private set; } + + [JsonPropertyName("resourceType")] + public string ResourceType { get; private set; } + + [JsonPropertyName("resourceId")] + public string ResourceId { get; private set; } + + [JsonPropertyName("resource")] + public string Resource { get; private set; } + + [JsonPropertyName("event")] + public string Event { get; private set; } + + [JsonPropertyName("userAgent")] + public string UserAgent { get; private set; } + + [JsonPropertyName("ip")] + public string Ip { get; private set; } + + [JsonPropertyName("mode")] + public string Mode { get; private set; } + + [JsonPropertyName("country")] + public string Country { get; private set; } + + [JsonPropertyName("time")] + public string Time { get; private set; } + + [JsonPropertyName("projectId")] + public string ProjectId { get; private set; } + + [JsonPropertyName("teamId")] + public string TeamId { get; private set; } + + [JsonPropertyName("hostname")] + public string Hostname { get; private set; } + + [JsonPropertyName("osCode")] + public string OsCode { get; private set; } + + [JsonPropertyName("osName")] + public string OsName { get; private set; } + + [JsonPropertyName("osVersion")] + public string OsVersion { get; private set; } + + [JsonPropertyName("clientType")] + public string ClientType { get; private set; } + + [JsonPropertyName("clientCode")] + public string ClientCode { get; private set; } + + [JsonPropertyName("clientName")] + public string ClientName { get; private set; } + + [JsonPropertyName("clientVersion")] + public string ClientVersion { get; private set; } + + [JsonPropertyName("clientEngine")] + public string ClientEngine { get; private set; } + + [JsonPropertyName("clientEngineVersion")] + public string ClientEngineVersion { get; private set; } + + [JsonPropertyName("deviceName")] + public string DeviceName { get; private set; } + + [JsonPropertyName("deviceBrand")] + public string DeviceBrand { get; private set; } + + [JsonPropertyName("deviceModel")] + public string DeviceModel { get; private set; } + + [JsonPropertyName("countryCode")] + public string CountryCode { get; private set; } + + [JsonPropertyName("countryName")] + public string CountryName { get; private set; } + + public ActivityEvent( + string id, + string userType, + string userId, + string userEmail, + string userName, + string resourceParent, + string resourceType, + string resourceId, + string resource, + string xevent, + string userAgent, + string ip, + string mode, + string country, + string time, + string projectId, + string teamId, + string hostname, + string osCode, + string osName, + string osVersion, + string clientType, + string clientCode, + string clientName, + string clientVersion, + string clientEngine, + string clientEngineVersion, + string deviceName, + string deviceBrand, + string deviceModel, + string countryCode, + string countryName + ) { + Id = id; + UserType = userType; + UserId = userId; + UserEmail = userEmail; + UserName = userName; + ResourceParent = resourceParent; + ResourceType = resourceType; + ResourceId = resourceId; + Resource = resource; + Event = xevent; + UserAgent = userAgent; + Ip = ip; + Mode = mode; + Country = country; + Time = time; + ProjectId = projectId; + TeamId = teamId; + Hostname = hostname; + OsCode = osCode; + OsName = osName; + OsVersion = osVersion; + ClientType = clientType; + ClientCode = clientCode; + ClientName = clientName; + ClientVersion = clientVersion; + ClientEngine = clientEngine; + ClientEngineVersion = clientEngineVersion; + DeviceName = deviceName; + DeviceBrand = deviceBrand; + DeviceModel = deviceModel; + CountryCode = countryCode; + CountryName = countryName; + } + + public static ActivityEvent From(Dictionary map) => new ActivityEvent( + id: map["$id"].ToString(), + userType: map["userType"].ToString(), + userId: map["userId"].ToString(), + userEmail: map["userEmail"].ToString(), + userName: map["userName"].ToString(), + resourceParent: map["resourceParent"].ToString(), + resourceType: map["resourceType"].ToString(), + resourceId: map["resourceId"].ToString(), + resource: map["resource"].ToString(), + xevent: map["event"].ToString(), + userAgent: map["userAgent"].ToString(), + ip: map["ip"].ToString(), + mode: map["mode"].ToString(), + country: map["country"].ToString(), + time: map["time"].ToString(), + projectId: map["projectId"].ToString(), + teamId: map["teamId"].ToString(), + hostname: map["hostname"].ToString(), + osCode: map["osCode"].ToString(), + osName: map["osName"].ToString(), + osVersion: map["osVersion"].ToString(), + clientType: map["clientType"].ToString(), + clientCode: map["clientCode"].ToString(), + clientName: map["clientName"].ToString(), + clientVersion: map["clientVersion"].ToString(), + clientEngine: map["clientEngine"].ToString(), + clientEngineVersion: map["clientEngineVersion"].ToString(), + deviceName: map["deviceName"].ToString(), + deviceBrand: map["deviceBrand"].ToString(), + deviceModel: map["deviceModel"].ToString(), + countryCode: map["countryCode"].ToString(), + countryName: map["countryName"].ToString() + ); + + public Dictionary ToMap() => new Dictionary() + { + { "$id", Id }, + { "userType", UserType }, + { "userId", UserId }, + { "userEmail", UserEmail }, + { "userName", UserName }, + { "resourceParent", ResourceParent }, + { "resourceType", ResourceType }, + { "resourceId", ResourceId }, + { "resource", Resource }, + { "event", Event }, + { "userAgent", UserAgent }, + { "ip", Ip }, + { "mode", Mode }, + { "country", Country }, + { "time", Time }, + { "projectId", ProjectId }, + { "teamId", TeamId }, + { "hostname", Hostname }, + { "osCode", OsCode }, + { "osName", OsName }, + { "osVersion", OsVersion }, + { "clientType", ClientType }, + { "clientCode", ClientCode }, + { "clientName", ClientName }, + { "clientVersion", ClientVersion }, + { "clientEngine", ClientEngine }, + { "clientEngineVersion", ClientEngineVersion }, + { "deviceName", DeviceName }, + { "deviceBrand", DeviceBrand }, + { "deviceModel", DeviceModel }, + { "countryCode", CountryCode }, + { "countryName", CountryName } + }; + } +} diff --git a/Appwrite/Models/ActivityEventList.cs b/Appwrite/Models/ActivityEventList.cs new file mode 100644 index 00000000..e8eed6ee --- /dev/null +++ b/Appwrite/Models/ActivityEventList.cs @@ -0,0 +1,39 @@ + +using System; +using System.Linq; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Appwrite.Enums; +using Appwrite.Extensions; + +namespace Appwrite.Models +{ + public class ActivityEventList + { + [JsonPropertyName("total")] + public long Total { get; private set; } + + [JsonPropertyName("events")] + public List Events { get; private set; } + + public ActivityEventList( + long total, + List events + ) { + Total = total; + Events = events; + } + + public static ActivityEventList From(Dictionary map) => new ActivityEventList( + total: Convert.ToInt64(map["total"]), + events: map["events"].ConvertToList>().Select(it => ActivityEvent.From(map: it)).ToList() + ); + + public Dictionary ToMap() => new Dictionary() + { + { "total", Total }, + { "events", Events.Select(it => it.ToMap()) } + }; + } +} diff --git a/Appwrite/Models/AttributeLongtext.cs b/Appwrite/Models/AttributeLongtext.cs index 6fee316f..9a317a67 100644 --- a/Appwrite/Models/AttributeLongtext.cs +++ b/Appwrite/Models/AttributeLongtext.cs @@ -38,6 +38,9 @@ public class AttributeLongtext [JsonPropertyName("default")] public string? Default { get; private set; } + [JsonPropertyName("encrypt")] + public bool? Encrypt { get; private set; } + public AttributeLongtext( string key, string type, @@ -47,7 +50,8 @@ public AttributeLongtext( bool? array, string createdAt, string updatedAt, - string? xdefault + string? xdefault, + bool? encrypt ) { Key = key; Type = type; @@ -58,6 +62,7 @@ public AttributeLongtext( CreatedAt = createdAt; UpdatedAt = updatedAt; Default = xdefault; + Encrypt = encrypt; } public static AttributeLongtext From(Dictionary map) => new AttributeLongtext( @@ -69,7 +74,8 @@ public AttributeLongtext( array: (bool?)map["array"], createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null + xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null, + encrypt: (bool?)map["encrypt"] ); public Dictionary ToMap() => new Dictionary() @@ -82,7 +88,8 @@ public AttributeLongtext( { "array", Array }, { "$createdAt", CreatedAt }, { "$updatedAt", UpdatedAt }, - { "default", Default } + { "default", Default }, + { "encrypt", Encrypt } }; } } diff --git a/Appwrite/Models/AttributeMediumtext.cs b/Appwrite/Models/AttributeMediumtext.cs index 34cf36ab..3da64f7f 100644 --- a/Appwrite/Models/AttributeMediumtext.cs +++ b/Appwrite/Models/AttributeMediumtext.cs @@ -38,6 +38,9 @@ public class AttributeMediumtext [JsonPropertyName("default")] public string? Default { get; private set; } + [JsonPropertyName("encrypt")] + public bool? Encrypt { get; private set; } + public AttributeMediumtext( string key, string type, @@ -47,7 +50,8 @@ public AttributeMediumtext( bool? array, string createdAt, string updatedAt, - string? xdefault + string? xdefault, + bool? encrypt ) { Key = key; Type = type; @@ -58,6 +62,7 @@ public AttributeMediumtext( CreatedAt = createdAt; UpdatedAt = updatedAt; Default = xdefault; + Encrypt = encrypt; } public static AttributeMediumtext From(Dictionary map) => new AttributeMediumtext( @@ -69,7 +74,8 @@ public AttributeMediumtext( array: (bool?)map["array"], createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null + xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null, + encrypt: (bool?)map["encrypt"] ); public Dictionary ToMap() => new Dictionary() @@ -82,7 +88,8 @@ public AttributeMediumtext( { "array", Array }, { "$createdAt", CreatedAt }, { "$updatedAt", UpdatedAt }, - { "default", Default } + { "default", Default }, + { "encrypt", Encrypt } }; } } diff --git a/Appwrite/Models/AttributeText.cs b/Appwrite/Models/AttributeText.cs index a53091da..f4ee6301 100644 --- a/Appwrite/Models/AttributeText.cs +++ b/Appwrite/Models/AttributeText.cs @@ -38,6 +38,9 @@ public class AttributeText [JsonPropertyName("default")] public string? Default { get; private set; } + [JsonPropertyName("encrypt")] + public bool? Encrypt { get; private set; } + public AttributeText( string key, string type, @@ -47,7 +50,8 @@ public AttributeText( bool? array, string createdAt, string updatedAt, - string? xdefault + string? xdefault, + bool? encrypt ) { Key = key; Type = type; @@ -58,6 +62,7 @@ public AttributeText( CreatedAt = createdAt; UpdatedAt = updatedAt; Default = xdefault; + Encrypt = encrypt; } public static AttributeText From(Dictionary map) => new AttributeText( @@ -69,7 +74,8 @@ public AttributeText( array: (bool?)map["array"], createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null + xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null, + encrypt: (bool?)map["encrypt"] ); public Dictionary ToMap() => new Dictionary() @@ -82,7 +88,8 @@ public AttributeText( { "array", Array }, { "$createdAt", CreatedAt }, { "$updatedAt", UpdatedAt }, - { "default", Default } + { "default", Default }, + { "encrypt", Encrypt } }; } } diff --git a/Appwrite/Models/AttributeVarchar.cs b/Appwrite/Models/AttributeVarchar.cs index d4be3902..65961286 100644 --- a/Appwrite/Models/AttributeVarchar.cs +++ b/Appwrite/Models/AttributeVarchar.cs @@ -41,6 +41,9 @@ public class AttributeVarchar [JsonPropertyName("default")] public string? Default { get; private set; } + [JsonPropertyName("encrypt")] + public bool? Encrypt { get; private set; } + public AttributeVarchar( string key, string type, @@ -51,7 +54,8 @@ public AttributeVarchar( string createdAt, string updatedAt, long size, - string? xdefault + string? xdefault, + bool? encrypt ) { Key = key; Type = type; @@ -63,6 +67,7 @@ public AttributeVarchar( UpdatedAt = updatedAt; Size = size; Default = xdefault; + Encrypt = encrypt; } public static AttributeVarchar From(Dictionary map) => new AttributeVarchar( @@ -75,7 +80,8 @@ public AttributeVarchar( createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), size: Convert.ToInt64(map["size"]), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null + xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null, + encrypt: (bool?)map["encrypt"] ); public Dictionary ToMap() => new Dictionary() @@ -89,7 +95,8 @@ public AttributeVarchar( { "$createdAt", CreatedAt }, { "$updatedAt", UpdatedAt }, { "size", Size }, - { "default", Default } + { "default", Default }, + { "encrypt", Encrypt } }; } } diff --git a/Appwrite/Models/ColumnLongtext.cs b/Appwrite/Models/ColumnLongtext.cs index 64fc4a08..9f92a0dc 100644 --- a/Appwrite/Models/ColumnLongtext.cs +++ b/Appwrite/Models/ColumnLongtext.cs @@ -38,6 +38,9 @@ public class ColumnLongtext [JsonPropertyName("default")] public string? Default { get; private set; } + [JsonPropertyName("encrypt")] + public bool? Encrypt { get; private set; } + public ColumnLongtext( string key, string type, @@ -47,7 +50,8 @@ public ColumnLongtext( bool? array, string createdAt, string updatedAt, - string? xdefault + string? xdefault, + bool? encrypt ) { Key = key; Type = type; @@ -58,6 +62,7 @@ public ColumnLongtext( CreatedAt = createdAt; UpdatedAt = updatedAt; Default = xdefault; + Encrypt = encrypt; } public static ColumnLongtext From(Dictionary map) => new ColumnLongtext( @@ -69,7 +74,8 @@ public ColumnLongtext( array: (bool?)map["array"], createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null + xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null, + encrypt: (bool?)map["encrypt"] ); public Dictionary ToMap() => new Dictionary() @@ -82,7 +88,8 @@ public ColumnLongtext( { "array", Array }, { "$createdAt", CreatedAt }, { "$updatedAt", UpdatedAt }, - { "default", Default } + { "default", Default }, + { "encrypt", Encrypt } }; } } diff --git a/Appwrite/Models/ColumnMediumtext.cs b/Appwrite/Models/ColumnMediumtext.cs index c97a816c..addb85d9 100644 --- a/Appwrite/Models/ColumnMediumtext.cs +++ b/Appwrite/Models/ColumnMediumtext.cs @@ -38,6 +38,9 @@ public class ColumnMediumtext [JsonPropertyName("default")] public string? Default { get; private set; } + [JsonPropertyName("encrypt")] + public bool? Encrypt { get; private set; } + public ColumnMediumtext( string key, string type, @@ -47,7 +50,8 @@ public ColumnMediumtext( bool? array, string createdAt, string updatedAt, - string? xdefault + string? xdefault, + bool? encrypt ) { Key = key; Type = type; @@ -58,6 +62,7 @@ public ColumnMediumtext( CreatedAt = createdAt; UpdatedAt = updatedAt; Default = xdefault; + Encrypt = encrypt; } public static ColumnMediumtext From(Dictionary map) => new ColumnMediumtext( @@ -69,7 +74,8 @@ public ColumnMediumtext( array: (bool?)map["array"], createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null + xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null, + encrypt: (bool?)map["encrypt"] ); public Dictionary ToMap() => new Dictionary() @@ -82,7 +88,8 @@ public ColumnMediumtext( { "array", Array }, { "$createdAt", CreatedAt }, { "$updatedAt", UpdatedAt }, - { "default", Default } + { "default", Default }, + { "encrypt", Encrypt } }; } } diff --git a/Appwrite/Models/ColumnText.cs b/Appwrite/Models/ColumnText.cs index 193721f9..041505d6 100644 --- a/Appwrite/Models/ColumnText.cs +++ b/Appwrite/Models/ColumnText.cs @@ -38,6 +38,9 @@ public class ColumnText [JsonPropertyName("default")] public string? Default { get; private set; } + [JsonPropertyName("encrypt")] + public bool? Encrypt { get; private set; } + public ColumnText( string key, string type, @@ -47,7 +50,8 @@ public ColumnText( bool? array, string createdAt, string updatedAt, - string? xdefault + string? xdefault, + bool? encrypt ) { Key = key; Type = type; @@ -58,6 +62,7 @@ public ColumnText( CreatedAt = createdAt; UpdatedAt = updatedAt; Default = xdefault; + Encrypt = encrypt; } public static ColumnText From(Dictionary map) => new ColumnText( @@ -69,7 +74,8 @@ public ColumnText( array: (bool?)map["array"], createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null + xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null, + encrypt: (bool?)map["encrypt"] ); public Dictionary ToMap() => new Dictionary() @@ -82,7 +88,8 @@ public ColumnText( { "array", Array }, { "$createdAt", CreatedAt }, { "$updatedAt", UpdatedAt }, - { "default", Default } + { "default", Default }, + { "encrypt", Encrypt } }; } } diff --git a/Appwrite/Models/ColumnVarchar.cs b/Appwrite/Models/ColumnVarchar.cs index 03256f37..1c0262b7 100644 --- a/Appwrite/Models/ColumnVarchar.cs +++ b/Appwrite/Models/ColumnVarchar.cs @@ -41,6 +41,9 @@ public class ColumnVarchar [JsonPropertyName("default")] public string? Default { get; private set; } + [JsonPropertyName("encrypt")] + public bool? Encrypt { get; private set; } + public ColumnVarchar( string key, string type, @@ -51,7 +54,8 @@ public ColumnVarchar( string createdAt, string updatedAt, long size, - string? xdefault + string? xdefault, + bool? encrypt ) { Key = key; Type = type; @@ -63,6 +67,7 @@ public ColumnVarchar( UpdatedAt = updatedAt; Size = size; Default = xdefault; + Encrypt = encrypt; } public static ColumnVarchar From(Dictionary map) => new ColumnVarchar( @@ -75,7 +80,8 @@ public ColumnVarchar( createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), size: Convert.ToInt64(map["size"]), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null + xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null, + encrypt: (bool?)map["encrypt"] ); public Dictionary ToMap() => new Dictionary() @@ -89,7 +95,8 @@ public ColumnVarchar( { "$createdAt", CreatedAt }, { "$updatedAt", UpdatedAt }, { "size", Size }, - { "default", Default } + { "default", Default }, + { "encrypt", Encrypt } }; } } diff --git a/Appwrite/Query.cs b/Appwrite/Query.cs index d47fcdbd..b74f0f28 100644 --- a/Appwrite/Query.cs +++ b/Appwrite/Query.cs @@ -180,10 +180,33 @@ public static string Offset(int offset) { return new Query("offset", null, offset).ToString(); } + /// + /// Filter resources where attribute contains the specified value. + /// For string attributes, checks if the string contains the substring. + /// + /// For array attributes, use or instead. public static string Contains(string attribute, object value) { return new Query("contains", attribute, value).ToString(); } + /// + /// Filter resources where attribute contains ANY of the specified values. + /// For array and relationship attributes, matches documents where the attribute + /// contains at least one of the given values. + /// + public static string ContainsAny(string attribute, IList value) { + return new Query("containsAny", attribute, value).ToString(); + } + + /// + /// Filter resources where attribute contains ALL of the specified values. + /// For array and relationship attributes, matches documents where the attribute + /// contains every one of the given values. + /// + public static string ContainsAll(string attribute, IList value) { + return new Query("containsAll", attribute, value).ToString(); + } + public static string NotContains(string attribute, object value) { return new Query("notContains", attribute, value).ToString(); } diff --git a/Appwrite/Services/Activities.cs b/Appwrite/Services/Activities.cs new file mode 100644 index 00000000..ef2a9812 --- /dev/null +++ b/Appwrite/Services/Activities.cs @@ -0,0 +1,79 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Appwrite.Models; +using Appwrite.Enums; + +namespace Appwrite.Services +{ + public class Activities : Service + { + public Activities(Client client) : base(client) + { + } + + /// + /// List all events for selected filters. + /// + /// + public Task ListEvents(string? queries = null) + { + var apiPath = "/activities/events"; + + var apiParameters = new Dictionary() + { + { "queries", queries } + }; + + var apiHeaders = new Dictionary() + { + }; + + + static Models.ActivityEventList Convert(Dictionary it) => + Models.ActivityEventList.From(map: it); + + return _client.Call( + method: "GET", + path: apiPath, + headers: apiHeaders, + parameters: apiParameters.Where(it => it.Value != null).ToDictionary(it => it.Key, it => it.Value)!, + convert: Convert); + + } + + /// + /// Get event by ID. + /// + /// + /// + public Task GetEvent(string eventId) + { + var apiPath = "/activities/events/{eventId}" + .Replace("{eventId}", eventId); + + var apiParameters = new Dictionary() + { + }; + + var apiHeaders = new Dictionary() + { + }; + + + static Models.ActivityEvent Convert(Dictionary it) => + Models.ActivityEvent.From(map: it); + + return _client.Call( + method: "GET", + path: apiPath, + headers: apiHeaders, + parameters: apiParameters.Where(it => it.Value != null).ToDictionary(it => it.Key, it => it.Value)!, + convert: Convert); + + } + + } +} diff --git a/Appwrite/Services/Databases.cs b/Appwrite/Services/Databases.cs index 978e54ba..4b27a287 100644 --- a/Appwrite/Services/Databases.cs +++ b/Appwrite/Services/Databases.cs @@ -1203,7 +1203,7 @@ static Models.AttributeLine Convert(Dictionary it) => /// /// /// - public Task CreateLongtextAttribute(string databaseId, string collectionId, string key, bool required, string? xdefault = null, bool? array = null) + public Task CreateLongtextAttribute(string databaseId, string collectionId, string key, bool required, string? xdefault = null, bool? array = null, bool? encrypt = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/longtext" .Replace("{databaseId}", databaseId) @@ -1214,7 +1214,8 @@ static Models.AttributeLine Convert(Dictionary it) => { "key", key }, { "required", required }, { "default", xdefault }, - { "array", array } + { "array", array }, + { "encrypt", encrypt } }; var apiHeaders = new Dictionary() @@ -1278,7 +1279,7 @@ static Models.AttributeLongtext Convert(Dictionary it) => /// /// /// - public Task CreateMediumtextAttribute(string databaseId, string collectionId, string key, bool required, string? xdefault = null, bool? array = null) + public Task CreateMediumtextAttribute(string databaseId, string collectionId, string key, bool required, string? xdefault = null, bool? array = null, bool? encrypt = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext" .Replace("{databaseId}", databaseId) @@ -1289,7 +1290,8 @@ static Models.AttributeLongtext Convert(Dictionary it) => { "key", key }, { "required", required }, { "default", xdefault }, - { "array", array } + { "array", array }, + { "encrypt", encrypt } }; var apiHeaders = new Dictionary() @@ -1622,7 +1624,7 @@ static Models.AttributeString Convert(Dictionary it) => /// /// /// - public Task CreateTextAttribute(string databaseId, string collectionId, string key, bool required, string? xdefault = null, bool? array = null) + public Task CreateTextAttribute(string databaseId, string collectionId, string key, bool required, string? xdefault = null, bool? array = null, bool? encrypt = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/text" .Replace("{databaseId}", databaseId) @@ -1633,7 +1635,8 @@ static Models.AttributeString Convert(Dictionary it) => { "key", key }, { "required", required }, { "default", xdefault }, - { "array", array } + { "array", array }, + { "encrypt", encrypt } }; var apiHeaders = new Dictionary() @@ -1774,7 +1777,7 @@ static Models.AttributeUrl Convert(Dictionary it) => /// /// /// - public Task CreateVarcharAttribute(string databaseId, string collectionId, string key, long size, bool required, string? xdefault = null, bool? array = null) + public Task CreateVarcharAttribute(string databaseId, string collectionId, string key, long size, bool required, string? xdefault = null, bool? array = null, bool? encrypt = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/varchar" .Replace("{databaseId}", databaseId) @@ -1786,7 +1789,8 @@ static Models.AttributeUrl Convert(Dictionary it) => { "size", size }, { "required", required }, { "default", xdefault }, - { "array", array } + { "array", array }, + { "encrypt", encrypt } }; var apiHeaders = new Dictionary() diff --git a/Appwrite/Services/TablesDB.cs b/Appwrite/Services/TablesDB.cs index cc052cec..b0ae6e50 100644 --- a/Appwrite/Services/TablesDB.cs +++ b/Appwrite/Services/TablesDB.cs @@ -1175,7 +1175,7 @@ static Models.ColumnLine Convert(Dictionary it) => /// /// /// - public Task CreateLongtextColumn(string databaseId, string tableId, string key, bool required, string? xdefault = null, bool? array = null) + public Task CreateLongtextColumn(string databaseId, string tableId, string key, bool required, string? xdefault = null, bool? array = null, bool? encrypt = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/longtext" .Replace("{databaseId}", databaseId) @@ -1186,7 +1186,8 @@ static Models.ColumnLine Convert(Dictionary it) => { "key", key }, { "required", required }, { "default", xdefault }, - { "array", array } + { "array", array }, + { "encrypt", encrypt } }; var apiHeaders = new Dictionary() @@ -1250,7 +1251,7 @@ static Models.ColumnLongtext Convert(Dictionary it) => /// /// /// - public Task CreateMediumtextColumn(string databaseId, string tableId, string key, bool required, string? xdefault = null, bool? array = null) + public Task CreateMediumtextColumn(string databaseId, string tableId, string key, bool required, string? xdefault = null, bool? array = null, bool? encrypt = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext" .Replace("{databaseId}", databaseId) @@ -1261,7 +1262,8 @@ static Models.ColumnLongtext Convert(Dictionary it) => { "key", key }, { "required", required }, { "default", xdefault }, - { "array", array } + { "array", array }, + { "encrypt", encrypt } }; var apiHeaders = new Dictionary() @@ -1589,7 +1591,7 @@ static Models.ColumnString Convert(Dictionary it) => /// /// /// - public Task CreateTextColumn(string databaseId, string tableId, string key, bool required, string? xdefault = null, bool? array = null) + public Task CreateTextColumn(string databaseId, string tableId, string key, bool required, string? xdefault = null, bool? array = null, bool? encrypt = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/text" .Replace("{databaseId}", databaseId) @@ -1600,7 +1602,8 @@ static Models.ColumnString Convert(Dictionary it) => { "key", key }, { "required", required }, { "default", xdefault }, - { "array", array } + { "array", array }, + { "encrypt", encrypt } }; var apiHeaders = new Dictionary() @@ -1739,7 +1742,7 @@ static Models.ColumnUrl Convert(Dictionary it) => /// /// /// - public Task CreateVarcharColumn(string databaseId, string tableId, string key, long size, bool required, string? xdefault = null, bool? array = null) + public Task CreateVarcharColumn(string databaseId, string tableId, string key, long size, bool required, string? xdefault = null, bool? array = null, bool? encrypt = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/varchar" .Replace("{databaseId}", databaseId) @@ -1751,7 +1754,8 @@ static Models.ColumnUrl Convert(Dictionary it) => { "size", size }, { "required", required }, { "default", xdefault }, - { "array", array } + { "array", array }, + { "encrypt", encrypt } }; var apiHeaders = new Dictionary() diff --git a/CHANGELOG.md b/CHANGELOG.md index 9075836e..1401108b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,30 +1,5 @@ # Change Log -## 0.26.0 - -* Add `dart-3.10` and `flutter-3.38` to `BuildRuntime` and `Runtime` enums -* Add `bytesMax` and `bytesUsed` properties to `Collection` and `Table` models -* Fix `Roles` enum removed from Teams service; `roles` parameter now accepts `IReadOnlyList` -* Add support for the new `Backups` service - -## 0.25.0 - -* Add array-based enum parameters (e.g., `permissions: IReadOnlyList`). -* Breaking change: `Output` enum has been removed; use `ImageFormat` instead. -* Add `getQueueAudits` support to `Health` service. -* Add longtext/mediumtext/text/varchar attribute and column helpers to `Databases` and `TablesDB` services. - -## 0.24.0 - -* Added ability to create columns and indexes synchronously while creating a table - -## 0.23.0 - -* Rename `VCSDeploymentType` enum to `VCSReferenceType` -* Change `CreateTemplateDeployment` method signature: replace `Version` parameter with `Type` (TemplateReferenceType) and `Reference` parameters -* Add `GetScreenshot` method to `Avatars` service -* Add `Theme`, `Timezone` and `Output` enums - ## 0.22.0 * Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance diff --git a/README.md b/README.md index 69fdb20e..e8a63c12 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![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) -**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-dotnet/releases).** +**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-dotnet/releases).** Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the .NET SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) @@ -17,17 +17,17 @@ Appwrite is an open-source backend as a service server that abstracts and simpli Add this reference to your project's `.csproj` file: ```xml - + ``` You can install packages from the command line: ```powershell # Package Manager -Install-Package Appwrite -Version 0.26.0 +Install-Package Appwrite -Version 0.27.0 # or .NET CLI -dotnet add package Appwrite --version 0.26.0 +dotnet add package Appwrite --version 0.27.0 ``` diff --git a/docs/examples/health/get-queue-threats.md b/docs/examples/activities/get-event.md similarity index 70% rename from docs/examples/health/get-queue-threats.md rename to docs/examples/activities/get-event.md index daa6efce..0855c8b4 100644 --- a/docs/examples/health/get-queue-threats.md +++ b/docs/examples/activities/get-event.md @@ -8,8 +8,8 @@ Client client = new Client() .SetProject("") // Your project ID .SetKey(""); // Your secret API key -Health health = new Health(client); +Activities activities = new Activities(client); -HealthQueue result = await health.GetQueueThreats( - threshold: 0 // optional +ActivityEvent result = await activities.GetEvent( + eventId: "" );``` diff --git a/docs/examples/health/get-queue-billing-team-aggregation.md b/docs/examples/activities/list-events.md similarity index 69% rename from docs/examples/health/get-queue-billing-team-aggregation.md rename to docs/examples/activities/list-events.md index 5d78abb1..817589b9 100644 --- a/docs/examples/health/get-queue-billing-team-aggregation.md +++ b/docs/examples/activities/list-events.md @@ -8,8 +8,8 @@ Client client = new Client() .SetProject("") // Your project ID .SetKey(""); // Your secret API key -Health health = new Health(client); +Activities activities = new Activities(client); -HealthQueue result = await health.GetQueueBillingTeamAggregation( - threshold: 0 // optional +ActivityEventList result = await activities.ListEvents( + queries: "" // optional );``` diff --git a/docs/examples/databases/create-longtext-attribute.md b/docs/examples/databases/create-longtext-attribute.md index 55e8573f..95bc8112 100644 --- a/docs/examples/databases/create-longtext-attribute.md +++ b/docs/examples/databases/create-longtext-attribute.md @@ -16,5 +16,6 @@ AttributeLongtext result = await databases.CreateLongtextAttribute( key: "", required: false, default: "", // optional - array: false // optional + array: false, // optional + encrypt: false // optional );``` diff --git a/docs/examples/databases/create-mediumtext-attribute.md b/docs/examples/databases/create-mediumtext-attribute.md index e5c7906b..c2e321f0 100644 --- a/docs/examples/databases/create-mediumtext-attribute.md +++ b/docs/examples/databases/create-mediumtext-attribute.md @@ -16,5 +16,6 @@ AttributeMediumtext result = await databases.CreateMediumtextAttribute( key: "", required: false, default: "", // optional - array: false // optional + array: false, // optional + encrypt: false // optional );``` diff --git a/docs/examples/databases/create-text-attribute.md b/docs/examples/databases/create-text-attribute.md index 93aeaa54..c31955d7 100644 --- a/docs/examples/databases/create-text-attribute.md +++ b/docs/examples/databases/create-text-attribute.md @@ -16,5 +16,6 @@ AttributeText result = await databases.CreateTextAttribute( key: "", required: false, default: "", // optional - array: false // optional + array: false, // optional + encrypt: false // optional );``` diff --git a/docs/examples/databases/create-varchar-attribute.md b/docs/examples/databases/create-varchar-attribute.md index 7f6573ae..215c6a71 100644 --- a/docs/examples/databases/create-varchar-attribute.md +++ b/docs/examples/databases/create-varchar-attribute.md @@ -17,5 +17,6 @@ AttributeVarchar result = await databases.CreateVarcharAttribute( size: 1, required: false, default: "", // optional - array: false // optional + array: false, // optional + encrypt: false // optional );``` diff --git a/docs/examples/health/get-queue-billing-project-aggregation.md b/docs/examples/health/get-queue-billing-project-aggregation.md deleted file mode 100644 index e4fcd6ef..00000000 --- a/docs/examples/health/get-queue-billing-project-aggregation.md +++ /dev/null @@ -1,15 +0,0 @@ -```csharp -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("") // Your project ID - .SetKey(""); // Your secret API key - -Health health = new Health(client); - -HealthQueue result = await health.GetQueueBillingProjectAggregation( - threshold: 0 // optional -);``` diff --git a/docs/examples/health/get-queue-priority-builds.md b/docs/examples/health/get-queue-priority-builds.md deleted file mode 100644 index cf1796f8..00000000 --- a/docs/examples/health/get-queue-priority-builds.md +++ /dev/null @@ -1,15 +0,0 @@ -```csharp -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("") // Your project ID - .SetKey(""); // Your secret API key - -Health health = new Health(client); - -HealthQueue result = await health.GetQueuePriorityBuilds( - threshold: 0 // optional -);``` diff --git a/docs/examples/health/get-queue-region-manager.md b/docs/examples/health/get-queue-region-manager.md deleted file mode 100644 index 29c6f16b..00000000 --- a/docs/examples/health/get-queue-region-manager.md +++ /dev/null @@ -1,15 +0,0 @@ -```csharp -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("") // Your project ID - .SetKey(""); // Your secret API key - -Health health = new Health(client); - -HealthQueue result = await health.GetQueueRegionManager( - threshold: 0 // optional -);``` diff --git a/docs/examples/tablesdb/create-longtext-column.md b/docs/examples/tablesdb/create-longtext-column.md index 99442d56..9846702d 100644 --- a/docs/examples/tablesdb/create-longtext-column.md +++ b/docs/examples/tablesdb/create-longtext-column.md @@ -16,5 +16,6 @@ ColumnLongtext result = await tablesDB.CreateLongtextColumn( key: "", required: false, default: "", // optional - array: false // optional + array: false, // optional + encrypt: false // optional );``` diff --git a/docs/examples/tablesdb/create-mediumtext-column.md b/docs/examples/tablesdb/create-mediumtext-column.md index 05362521..8d69db7d 100644 --- a/docs/examples/tablesdb/create-mediumtext-column.md +++ b/docs/examples/tablesdb/create-mediumtext-column.md @@ -16,5 +16,6 @@ ColumnMediumtext result = await tablesDB.CreateMediumtextColumn( key: "", required: false, default: "", // optional - array: false // optional + array: false, // optional + encrypt: false // optional );``` diff --git a/docs/examples/tablesdb/create-text-column.md b/docs/examples/tablesdb/create-text-column.md index aeb50d31..efde4ad8 100644 --- a/docs/examples/tablesdb/create-text-column.md +++ b/docs/examples/tablesdb/create-text-column.md @@ -16,5 +16,6 @@ ColumnText result = await tablesDB.CreateTextColumn( key: "", required: false, default: "", // optional - array: false // optional + array: false, // optional + encrypt: false // optional );``` diff --git a/docs/examples/tablesdb/create-varchar-column.md b/docs/examples/tablesdb/create-varchar-column.md index 83a37c4c..5656c9c2 100644 --- a/docs/examples/tablesdb/create-varchar-column.md +++ b/docs/examples/tablesdb/create-varchar-column.md @@ -17,5 +17,6 @@ ColumnVarchar result = await tablesDB.CreateVarcharColumn( size: 1, required: false, default: "", // optional - array: false // optional + array: false, // optional + encrypt: false // optional );``` From f258bbfd17f7aad4e2f1281e056630e0d7a44e0d Mon Sep 17 00:00:00 2001 From: root Date: Thu, 19 Feb 2026 11:06:57 +0000 Subject: [PATCH 2/4] release --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1401108b..6b2396f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 0.27.0 + +* Added broad new runtime options across multiple languages (Node 23, 24, 25; PHP 8.4; Ruby 3.4 and 4.0; Python 3.13 and 3.14; Python ML 3.13 and 3.14; Deno 2.5 and 2.6; Go 1.23–1.26; Bun 1.2 and 1.3; Java 25; Kotlin 2.3; Swift 6.2; and Dotnet 10). +* Introduced new API access scopes: schedules.read, schedules.write, and events.read for finer-grained permissions. +* Encryption support added to text attributes: AttributeLongtext and AttributeMediumtext now include an optional Encrypt boolean property, with mapping to and from API payloads. +* Minor model/serialization updates to accommodate the new encrypt field across longtext and mediumtext attributes. + ## 0.22.0 * Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance From 430594017c01d28ac4642f149d1ef34468ed1b83 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 19 Feb 2026 11:21:40 +0000 Subject: [PATCH 3/4] regen --- CHANGELOG.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b2396f8..c1ddc0e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,30 @@ * Encryption support added to text attributes: AttributeLongtext and AttributeMediumtext now include an optional Encrypt boolean property, with mapping to and from API payloads. * Minor model/serialization updates to accommodate the new encrypt field across longtext and mediumtext attributes. +## 0.26.0 + +* Add `dart-3.10` and `flutter-3.38` to `BuildRuntime` and `Runtime` enums +* Add `bytesMax` and `bytesUsed` properties to `Collection` and `Table` models +* Fix `Roles` enum removed from Teams service; `roles` parameter now accepts `IReadOnlyList` + +## 0.25.0 + +* Add array-based enum parameters (e.g., `permissions: IReadOnlyList`). +* Breaking change: `Output` enum has been removed; use `ImageFormat` instead. +* Add `getQueueAudits` support to `Health` service. +* Add longtext/mediumtext/text/varchar attribute and column helpers to `Databases` and `TablesDB` services. + +## 0.24.0 + +* Added ability to create columns and indexes synchronously while creating a table + +## 0.23.0 + +* Rename `VCSDeploymentType` enum to `VCSReferenceType` +* Change `CreateTemplateDeployment` method signature: replace `Version` parameter with `Type` (TemplateReferenceType) and `Reference` parameters +* Add `GetScreenshot` method to `Avatars` service +* Add `Theme`, `Timezone` and `Output` enums + ## 0.22.0 * Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance From 0520786ad2b7e45859c5828f7428d0742584da7f Mon Sep 17 00:00:00 2001 From: root Date: Thu, 19 Feb 2026 11:42:29 +0000 Subject: [PATCH 4/4] add missing entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1ddc0e8..a63cd25c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ * Add `dart-3.10` and `flutter-3.38` to `BuildRuntime` and `Runtime` enums * Add `bytesMax` and `bytesUsed` properties to `Collection` and `Table` models * Fix `Roles` enum removed from Teams service; `roles` parameter now accepts `IReadOnlyList` +* Add support for the new `Backups` service ## 0.25.0