From 6eb887e46e0bdfa1bd3265e676d76a017b7fb1d4 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Fri, 5 Jun 2026 13:42:04 +0530 Subject: [PATCH] chore: update .NET SDK to 5.1.0 --- Appwrite/Appwrite.csproj | 2 +- Appwrite/Client.cs | 36 +-- Appwrite/Converters/ValueClassConverter.cs | 4 +- Appwrite/Enums/ProjectKeyScopes.cs | 2 + Appwrite/Enums/ProjectPolicyId.cs | 1 + Appwrite/Extensions/Extensions.cs | 26 +++ Appwrite/Models/ActivityEvent.cs | 6 +- Appwrite/Models/ActivityEventList.cs | 2 +- Appwrite/Models/AttributeBigint.cs | 20 +- Appwrite/Models/AttributeBoolean.cs | 12 +- Appwrite/Models/AttributeDatetime.cs | 10 +- Appwrite/Models/AttributeEmail.cs | 10 +- Appwrite/Models/AttributeEnum.cs | 10 +- Appwrite/Models/AttributeFloat.cs | 20 +- Appwrite/Models/AttributeInteger.cs | 20 +- Appwrite/Models/AttributeIp.cs | 10 +- Appwrite/Models/AttributeLine.cs | 12 +- Appwrite/Models/AttributeLongtext.cs | 14 +- Appwrite/Models/AttributeMediumtext.cs | 14 +- Appwrite/Models/AttributePoint.cs | 12 +- Appwrite/Models/AttributePolygon.cs | 12 +- Appwrite/Models/AttributeRelationship.cs | 4 +- Appwrite/Models/AttributeString.cs | 14 +- Appwrite/Models/AttributeText.cs | 14 +- Appwrite/Models/AttributeUrl.cs | 10 +- Appwrite/Models/AttributeVarchar.cs | 14 +- Appwrite/Models/BackupArchiveList.cs | 2 +- Appwrite/Models/BackupPolicyList.cs | 2 +- Appwrite/Models/BackupRestorationList.cs | 2 +- Appwrite/Models/BillingLimits.cs | 32 ++- Appwrite/Models/BucketList.cs | 2 +- Appwrite/Models/Collection.cs | 2 +- Appwrite/Models/CollectionList.cs | 2 +- Appwrite/Models/ColumnBigint.cs | 20 +- Appwrite/Models/ColumnBoolean.cs | 12 +- Appwrite/Models/ColumnDatetime.cs | 10 +- Appwrite/Models/ColumnEmail.cs | 10 +- Appwrite/Models/ColumnEnum.cs | 10 +- Appwrite/Models/ColumnFloat.cs | 20 +- Appwrite/Models/ColumnIndex.cs | 4 +- Appwrite/Models/ColumnIndexList.cs | 2 +- Appwrite/Models/ColumnInteger.cs | 20 +- Appwrite/Models/ColumnIp.cs | 10 +- Appwrite/Models/ColumnLine.cs | 12 +- Appwrite/Models/ColumnLongtext.cs | 14 +- Appwrite/Models/ColumnMediumtext.cs | 14 +- Appwrite/Models/ColumnPoint.cs | 12 +- Appwrite/Models/ColumnPolygon.cs | 12 +- Appwrite/Models/ColumnRelationship.cs | 4 +- Appwrite/Models/ColumnString.cs | 14 +- Appwrite/Models/ColumnText.cs | 14 +- Appwrite/Models/ColumnUrl.cs | 10 +- Appwrite/Models/ColumnVarchar.cs | 14 +- Appwrite/Models/ContinentList.cs | 2 +- Appwrite/Models/CountryList.cs | 2 +- Appwrite/Models/CurrencyList.cs | 2 +- Appwrite/Models/Database.cs | 4 +- Appwrite/Models/DatabaseList.cs | 2 +- Appwrite/Models/DeploymentList.cs | 2 +- Appwrite/Models/DocumentList.cs | 2 +- Appwrite/Models/EmailTemplateList.cs | 2 +- Appwrite/Models/Execution.cs | 4 +- Appwrite/Models/ExecutionList.cs | 2 +- Appwrite/Models/FileList.cs | 2 +- Appwrite/Models/Framework.cs | 2 +- Appwrite/Models/FrameworkList.cs | 2 +- Appwrite/Models/Function.cs | 2 +- Appwrite/Models/FunctionList.cs | 2 +- Appwrite/Models/Headers.cs | 6 +- Appwrite/Models/HealthStatusList.cs | 2 +- Appwrite/Models/IdentityList.cs | 2 +- Appwrite/Models/Index.cs | 4 +- Appwrite/Models/IndexList.cs | 2 +- Appwrite/Models/Insight.cs | 2 +- Appwrite/Models/InsightCTA.cs | 6 +- Appwrite/Models/InsightList.cs | 2 +- Appwrite/Models/KeyList.cs | 2 +- Appwrite/Models/LanguageList.cs | 2 +- Appwrite/Models/LocaleCodeList.cs | 2 +- Appwrite/Models/Log.cs | 6 +- Appwrite/Models/LogList.cs | 2 +- Appwrite/Models/MembershipList.cs | 2 +- Appwrite/Models/Message.cs | 4 +- Appwrite/Models/MessageList.cs | 2 +- Appwrite/Models/MockNumberList.cs | 2 +- Appwrite/Models/PhoneList.cs | 2 +- Appwrite/Models/PolicyPasswordStrength.cs | 68 ++++++ Appwrite/Models/PresenceList.cs | 2 +- Appwrite/Models/Project.cs | 109 +++++++-- Appwrite/Models/ProjectList.cs | 2 +- Appwrite/Models/Provider.cs | 6 +- Appwrite/Models/ProviderList.cs | 2 +- Appwrite/Models/ProxyRuleList.cs | 2 +- Appwrite/Models/Report.cs | 2 +- Appwrite/Models/ReportList.cs | 2 +- Appwrite/Models/ResourceTokenList.cs | 2 +- Appwrite/Models/RowList.cs | 2 +- Appwrite/Models/Runtime.cs | 6 +- Appwrite/Models/RuntimeList.cs | 2 +- Appwrite/Models/SessionList.cs | 2 +- Appwrite/Models/Site.cs | 2 +- Appwrite/Models/SiteList.cs | 2 +- Appwrite/Models/SpecificationList.cs | 2 +- Appwrite/Models/Subscriber.cs | 2 +- Appwrite/Models/SubscriberList.cs | 2 +- Appwrite/Models/Table.cs | 2 +- Appwrite/Models/TableList.cs | 2 +- Appwrite/Models/TargetList.cs | 2 +- Appwrite/Models/Team.cs | 2 +- Appwrite/Models/TeamList.cs | 2 +- Appwrite/Models/TopicList.cs | 2 +- Appwrite/Models/TransactionList.cs | 2 +- Appwrite/Models/UsageEvent.cs | 12 +- Appwrite/Models/UsageEventList.cs | 2 +- Appwrite/Models/UsageGauge.cs | 6 +- Appwrite/Models/UsageGaugeList.cs | 2 +- Appwrite/Models/User.cs | 8 +- Appwrite/Models/UserList.cs | 2 +- Appwrite/Models/Variable.cs | 6 +- Appwrite/Models/VariableList.cs | 2 +- Appwrite/Models/WebhookList.cs | 2 +- Appwrite/Services/Account.cs | 54 +++++ Appwrite/Services/Activities.cs | 2 + Appwrite/Services/Advisor.cs | 5 + Appwrite/Services/Avatars.cs | 8 + Appwrite/Services/Backups.cs | 12 + Appwrite/Services/Databases.cs | 215 ++++++++++++------ Appwrite/Services/Functions.cs | 40 +++- Appwrite/Services/Graphql.cs | 2 + Appwrite/Services/Health.cs | 59 +++++ Appwrite/Services/Locale.cs | 8 + Appwrite/Services/Messaging.cs | 174 ++++++++++++-- Appwrite/Services/Organization.cs | 10 + Appwrite/Services/Presences.cs | 5 + Appwrite/Services/Project.cs | 209 +++++++++++++++-- Appwrite/Services/Proxy.cs | 8 + Appwrite/Services/Sites.cs | 33 ++- Appwrite/Services/Storage.cs | 13 ++ Appwrite/Services/TablesDB.cs | 215 ++++++++++++------ Appwrite/Services/Teams.cs | 13 ++ Appwrite/Services/Tokens.cs | 5 + Appwrite/Services/Usage.cs | 2 + Appwrite/Services/Users.cs | 49 ++++ Appwrite/Services/Webhooks.cs | 6 + CHANGELOG.md | 12 +- README.md | 6 +- docs/examples/account/update-password.md | 2 +- docs/examples/health/get-audits-db.md | 14 ++ .../examples/messaging/create-ses-provider.md | 24 ++ .../examples/messaging/update-ses-provider.md | 24 ++ .../project/update-o-auth-2-server.md | 22 ++ .../update-password-strength-policy.md | 19 ++ 152 files changed, 1724 insertions(+), 500 deletions(-) create mode 100644 Appwrite/Models/PolicyPasswordStrength.cs create mode 100644 docs/examples/health/get-audits-db.md create mode 100644 docs/examples/messaging/create-ses-provider.md create mode 100644 docs/examples/messaging/update-ses-provider.md create mode 100644 docs/examples/project/update-o-auth-2-server.md create mode 100644 docs/examples/project/update-password-strength-policy.md diff --git a/Appwrite/Appwrite.csproj b/Appwrite/Appwrite.csproj index c4322a6a..08124b8f 100644 --- a/Appwrite/Appwrite.csproj +++ b/Appwrite/Appwrite.csproj @@ -2,7 +2,7 @@ netstandard2.0;net462 Appwrite - 5.0.0 + 5.1.0 Appwrite Team Appwrite Team diff --git a/Appwrite/Client.cs b/Appwrite/Client.cs index 7bcc1a52..753520b7 100644 --- a/Appwrite/Client.cs +++ b/Appwrite/Client.cs @@ -20,6 +20,11 @@ public class Client public string Endpoint => _endpoint; public Dictionary Config => _config; + public string GetConfig(string key) + { + return _config.TryGetValue(key, out var value) ? value : ""; + } + private HttpClient _http; private HttpClient _httpForRedirect; private readonly Dictionary _headers; @@ -71,11 +76,11 @@ public Client( _headers = new Dictionary() { { "content-type", "application/json" }, - { "user-agent" , $"AppwriteDotNetSDK/5.0.0 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"}, + { "user-agent" , $"AppwriteDotNetSDK/5.1.0 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"}, { "x-sdk-name", ".NET" }, { "x-sdk-platform", "server" }, { "x-sdk-language", "dotnet" }, - { "x-sdk-version", "5.0.0"}, + { "x-sdk-version", "5.1.0"}, { "X-Appwrite-Response-Format", "1.9.5" } }; @@ -113,15 +118,14 @@ public Client SetEndpoint(string endpoint) /// Your project ID public Client SetProject(string value) { - _config.Add("project", value); - AddHeader("X-Appwrite-Project", value); + _config["project"] = value; return this; } /// Your secret API key public Client SetKey(string value) { - _config.Add("key", value); + _config["key"] = value; AddHeader("X-Appwrite-Key", value); return this; @@ -129,14 +133,14 @@ public Client SetKey(string value) { /// Your secret JSON Web Token public Client SetJWT(string value) { - _config.Add("jWT", value); + _config["jWT"] = value; AddHeader("X-Appwrite-JWT", value); return this; } public Client SetLocale(string value) { - _config.Add("locale", value); + _config["locale"] = value; AddHeader("X-Appwrite-Locale", value); return this; @@ -144,7 +148,7 @@ public Client SetLocale(string value) { /// The user session to authenticate with public Client SetSession(string value) { - _config.Add("session", value); + _config["session"] = value; AddHeader("X-Appwrite-Session", value); return this; @@ -152,7 +156,7 @@ public Client SetSession(string value) { /// The user agent string of the client that made the request public Client SetForwardedUserAgent(string value) { - _config.Add("forwardedUserAgent", value); + _config["forwardedUserAgent"] = value; AddHeader("X-Forwarded-User-Agent", value); return this; @@ -160,7 +164,7 @@ public Client SetForwardedUserAgent(string value) { /// Your secret dev API key public Client SetDevKey(string value) { - _config.Add("devKey", value); + _config["devKey"] = value; AddHeader("X-Appwrite-Dev-Key", value); return this; @@ -168,7 +172,7 @@ public Client SetDevKey(string value) { /// The user cookie to authenticate with. Used by SDKs that forward an incoming Cookie header in server-side runtimes. public Client SetCookie(string value) { - _config.Add("cookie", value); + _config["cookie"] = value; AddHeader("Cookie", value); return this; @@ -176,7 +180,7 @@ public Client SetCookie(string value) { /// Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data. public Client SetImpersonateUserId(string value) { - _config.Add("impersonateUserId", value); + _config["impersonateUserId"] = value; AddHeader("X-Appwrite-Impersonate-User-Id", value); return this; @@ -184,7 +188,7 @@ public Client SetImpersonateUserId(string value) { /// Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data. public Client SetImpersonateUserEmail(string value) { - _config.Add("impersonateUserEmail", value); + _config["impersonateUserEmail"] = value; AddHeader("X-Appwrite-Impersonate-User-Email", value); return this; @@ -192,7 +196,7 @@ public Client SetImpersonateUserEmail(string value) { /// Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data. public Client SetImpersonateUserPhone(string value) { - _config.Add("impersonateUserPhone", value); + _config["impersonateUserPhone"] = value; AddHeader("X-Appwrite-Impersonate-User-Phone", value); return this; @@ -218,8 +222,8 @@ private HttpRequestMessage PrepareRequest( { var methodGet = "GET".Equals(method, StringComparison.OrdinalIgnoreCase); - var queryString = methodGet ? - "?" + parameters.ToQueryString() : + var queryString = methodGet && parameters.Count > 0 ? + (path.Contains("?") ? "&" : "?") + parameters.ToQueryString() : string.Empty; var request = new HttpRequestMessage( diff --git a/Appwrite/Converters/ValueClassConverter.cs b/Appwrite/Converters/ValueClassConverter.cs index 9445990e..26cf46c8 100644 --- a/Appwrite/Converters/ValueClassConverter.cs +++ b/Appwrite/Converters/ValueClassConverter.cs @@ -7,12 +7,12 @@ namespace Appwrite.Converters { public class ValueClassConverter : JsonConverter { - public override bool CanConvert(Type objectType) + public override bool CanConvert(System.Type objectType) { return typeof(IEnum).IsAssignableFrom(objectType); } - public override object Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override object Read(ref Utf8JsonReader reader, System.Type typeToConvert, JsonSerializerOptions options) { var value = reader.GetString(); var constructor = typeToConvert.GetConstructor(new[] { typeof(string) }); diff --git a/Appwrite/Enums/ProjectKeyScopes.cs b/Appwrite/Enums/ProjectKeyScopes.cs index fdd4af24..219422bc 100644 --- a/Appwrite/Enums/ProjectKeyScopes.cs +++ b/Appwrite/Enums/ProjectKeyScopes.cs @@ -104,6 +104,8 @@ public ProjectKeyScopes(string value) public static ProjectKeyScopes DomainsRead => new ProjectKeyScopes("domains.read"); public static ProjectKeyScopes DomainsWrite => new ProjectKeyScopes("domains.write"); public static ProjectKeyScopes EventsRead => new ProjectKeyScopes("events.read"); + public static ProjectKeyScopes AppsRead => new ProjectKeyScopes("apps.read"); + public static ProjectKeyScopes AppsWrite => new ProjectKeyScopes("apps.write"); public static ProjectKeyScopes UsageRead => new ProjectKeyScopes("usage.read"); } } diff --git a/Appwrite/Enums/ProjectPolicyId.cs b/Appwrite/Enums/ProjectPolicyId.cs index 8b632ffe..39f655e9 100644 --- a/Appwrite/Enums/ProjectPolicyId.cs +++ b/Appwrite/Enums/ProjectPolicyId.cs @@ -13,6 +13,7 @@ public ProjectPolicyId(string value) public static ProjectPolicyId PasswordDictionary => new ProjectPolicyId("password-dictionary"); public static ProjectPolicyId PasswordHistory => new ProjectPolicyId("password-history"); + public static ProjectPolicyId PasswordStrength => new ProjectPolicyId("password-strength"); public static ProjectPolicyId PasswordPersonalData => new ProjectPolicyId("password-personal-data"); public static ProjectPolicyId SessionAlert => new ProjectPolicyId("session-alert"); public static ProjectPolicyId SessionDuration => new ProjectPolicyId("session-duration"); diff --git a/Appwrite/Extensions/Extensions.cs b/Appwrite/Extensions/Extensions.cs index 6ec9f8b7..9ca30f00 100644 --- a/Appwrite/Extensions/Extensions.cs +++ b/Appwrite/Extensions/Extensions.cs @@ -87,6 +87,32 @@ public static string ToQueryString(this Dictionary parameters) return Uri.EscapeUriString(string.Join("&", query)); } + public static Dictionary FromQueryString(this string queryString) + { + var query = new Dictionary(); + var trimmed = (queryString ?? string.Empty).TrimStart('?'); + + if (string.IsNullOrEmpty(trimmed)) + { + return query; + } + + foreach (var pair in trimmed.Split(new[] { '&' }, StringSplitOptions.RemoveEmptyEntries)) + { + var parts = pair.Split(new[] { '=' }, 2); + var key = Uri.UnescapeDataString(parts[0]); + + if (string.IsNullOrEmpty(key)) + { + continue; + } + + query[key] = parts.Length > 1 ? Uri.UnescapeDataString(parts[1]) : string.Empty; + } + + return query; + } + private static readonly IDictionary Mappings = new Dictionary(StringComparer.InvariantCultureIgnoreCase) { #region Mime Types diff --git a/Appwrite/Models/ActivityEvent.cs b/Appwrite/Models/ActivityEvent.cs index affe7782..dcd88607 100644 --- a/Appwrite/Models/ActivityEvent.cs +++ b/Appwrite/Models/ActivityEvent.cs @@ -117,7 +117,7 @@ public ActivityEvent( string resourceType, string resourceId, string resource, - string xevent, + string @event, string userAgent, string ip, string mode, @@ -151,7 +151,7 @@ string countryName ResourceType = resourceType; ResourceId = resourceId; Resource = resource; - Event = xevent; + Event = @event; UserAgent = userAgent; Ip = ip; Mode = mode; @@ -186,7 +186,7 @@ string countryName resourceType: map["resourceType"].ToString(), resourceId: map["resourceId"].ToString(), resource: map["resource"].ToString(), - xevent: map["event"].ToString(), + @event: map["event"].ToString(), userAgent: map["userAgent"].ToString(), ip: map["ip"].ToString(), mode: map["mode"].ToString(), diff --git a/Appwrite/Models/ActivityEventList.cs b/Appwrite/Models/ActivityEventList.cs index ebcbc311..1d42c21b 100644 --- a/Appwrite/Models/ActivityEventList.cs +++ b/Appwrite/Models/ActivityEventList.cs @@ -28,7 +28,7 @@ List 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() + events: map["events"].ConvertToList>().Select(it => Appwrite.Models.ActivityEvent.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/AttributeBigint.cs b/Appwrite/Models/AttributeBigint.cs index 57af8244..dc1feff9 100644 --- a/Appwrite/Models/AttributeBigint.cs +++ b/Appwrite/Models/AttributeBigint.cs @@ -55,7 +55,7 @@ public AttributeBigint( string updatedAt, long? min, long? max, - long? xdefault + long? @default ) { Key = key; @@ -68,7 +68,7 @@ public AttributeBigint( UpdatedAt = updatedAt; Min = min; Max = max; - Default = xdefault; + Default = @default; } public static AttributeBigint From(Dictionary map) => new AttributeBigint( @@ -77,12 +77,20 @@ public AttributeBigint( status: new AttributeStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - min: map["min"] == null ? null : Convert.ToInt64(map["min"]), - max: map["max"] == null ? null : Convert.ToInt64(map["max"]), - xdefault: map["default"] == null ? null : Convert.ToInt64(map["default"]) + min: map.TryGetValue("min", out var numberRaw9) && numberRaw9 != null + ? Convert.ToInt64(numberRaw9) + : null, + max: map.TryGetValue("max", out var numberRaw10) && numberRaw10 != null + ? Convert.ToInt64(numberRaw10) + : null, + @default: map.TryGetValue("default", out var numberRaw11) && numberRaw11 != null + ? Convert.ToInt64(numberRaw11) + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/AttributeBoolean.cs b/Appwrite/Models/AttributeBoolean.cs index c8d3dd33..1c955c6d 100644 --- a/Appwrite/Models/AttributeBoolean.cs +++ b/Appwrite/Models/AttributeBoolean.cs @@ -47,7 +47,7 @@ public AttributeBoolean( bool? array, string createdAt, string updatedAt, - bool? xdefault + bool? @default ) { Key = key; @@ -58,7 +58,7 @@ public AttributeBoolean( Array = array; CreatedAt = createdAt; UpdatedAt = updatedAt; - Default = xdefault; + Default = @default; } public static AttributeBoolean From(Dictionary map) => new AttributeBoolean( @@ -67,10 +67,14 @@ public AttributeBoolean( status: new AttributeStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: (bool?)map["default"] + @default: map.TryGetValue("default", out var boolRaw9) && boolRaw9 != null + ? (bool?)boolRaw9 + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/AttributeDatetime.cs b/Appwrite/Models/AttributeDatetime.cs index 29953390..4eeb1701 100644 --- a/Appwrite/Models/AttributeDatetime.cs +++ b/Appwrite/Models/AttributeDatetime.cs @@ -51,7 +51,7 @@ public AttributeDatetime( string createdAt, string updatedAt, string format, - string? xdefault + string? @default ) { Key = key; @@ -63,7 +63,7 @@ public AttributeDatetime( CreatedAt = createdAt; UpdatedAt = updatedAt; Format = format; - Default = xdefault; + Default = @default; } public static AttributeDatetime From(Dictionary map) => new AttributeDatetime( @@ -72,11 +72,13 @@ public AttributeDatetime( status: new AttributeStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), format: map["format"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/AttributeEmail.cs b/Appwrite/Models/AttributeEmail.cs index b3a3ae71..7ea11286 100644 --- a/Appwrite/Models/AttributeEmail.cs +++ b/Appwrite/Models/AttributeEmail.cs @@ -51,7 +51,7 @@ public AttributeEmail( string createdAt, string updatedAt, string format, - string? xdefault + string? @default ) { Key = key; @@ -63,7 +63,7 @@ public AttributeEmail( CreatedAt = createdAt; UpdatedAt = updatedAt; Format = format; - Default = xdefault; + Default = @default; } public static AttributeEmail From(Dictionary map) => new AttributeEmail( @@ -72,11 +72,13 @@ public AttributeEmail( status: new AttributeStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), format: map["format"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/AttributeEnum.cs b/Appwrite/Models/AttributeEnum.cs index 205029df..474baaa6 100644 --- a/Appwrite/Models/AttributeEnum.cs +++ b/Appwrite/Models/AttributeEnum.cs @@ -55,7 +55,7 @@ public AttributeEnum( string updatedAt, List elements, string format, - string? xdefault + string? @default ) { Key = key; @@ -68,7 +68,7 @@ public AttributeEnum( UpdatedAt = updatedAt; Elements = elements; Format = format; - Default = xdefault; + Default = @default; } public static AttributeEnum From(Dictionary map) => new AttributeEnum( @@ -77,12 +77,14 @@ public AttributeEnum( status: new AttributeStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), elements: map["elements"].ConvertToList(), format: map["format"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/AttributeFloat.cs b/Appwrite/Models/AttributeFloat.cs index 9eb04346..21353a09 100644 --- a/Appwrite/Models/AttributeFloat.cs +++ b/Appwrite/Models/AttributeFloat.cs @@ -55,7 +55,7 @@ public AttributeFloat( string updatedAt, double? min, double? max, - double? xdefault + double? @default ) { Key = key; @@ -68,7 +68,7 @@ public AttributeFloat( UpdatedAt = updatedAt; Min = min; Max = max; - Default = xdefault; + Default = @default; } public static AttributeFloat From(Dictionary map) => new AttributeFloat( @@ -77,12 +77,20 @@ public AttributeFloat( status: new AttributeStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - min: map["min"] == null ? null : Convert.ToDouble(map["min"]), - max: map["max"] == null ? null : Convert.ToDouble(map["max"]), - xdefault: map["default"] == null ? null : Convert.ToDouble(map["default"]) + min: map.TryGetValue("min", out var numberRaw9) && numberRaw9 != null + ? Convert.ToDouble(numberRaw9) + : null, + max: map.TryGetValue("max", out var numberRaw10) && numberRaw10 != null + ? Convert.ToDouble(numberRaw10) + : null, + @default: map.TryGetValue("default", out var numberRaw11) && numberRaw11 != null + ? Convert.ToDouble(numberRaw11) + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/AttributeInteger.cs b/Appwrite/Models/AttributeInteger.cs index c2c5031c..37718dce 100644 --- a/Appwrite/Models/AttributeInteger.cs +++ b/Appwrite/Models/AttributeInteger.cs @@ -55,7 +55,7 @@ public AttributeInteger( string updatedAt, long? min, long? max, - long? xdefault + long? @default ) { Key = key; @@ -68,7 +68,7 @@ public AttributeInteger( UpdatedAt = updatedAt; Min = min; Max = max; - Default = xdefault; + Default = @default; } public static AttributeInteger From(Dictionary map) => new AttributeInteger( @@ -77,12 +77,20 @@ public AttributeInteger( status: new AttributeStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - min: map["min"] == null ? null : Convert.ToInt64(map["min"]), - max: map["max"] == null ? null : Convert.ToInt64(map["max"]), - xdefault: map["default"] == null ? null : Convert.ToInt64(map["default"]) + min: map.TryGetValue("min", out var numberRaw9) && numberRaw9 != null + ? Convert.ToInt64(numberRaw9) + : null, + max: map.TryGetValue("max", out var numberRaw10) && numberRaw10 != null + ? Convert.ToInt64(numberRaw10) + : null, + @default: map.TryGetValue("default", out var numberRaw11) && numberRaw11 != null + ? Convert.ToInt64(numberRaw11) + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/AttributeIp.cs b/Appwrite/Models/AttributeIp.cs index 67f962e1..85368219 100644 --- a/Appwrite/Models/AttributeIp.cs +++ b/Appwrite/Models/AttributeIp.cs @@ -51,7 +51,7 @@ public AttributeIp( string createdAt, string updatedAt, string format, - string? xdefault + string? @default ) { Key = key; @@ -63,7 +63,7 @@ public AttributeIp( CreatedAt = createdAt; UpdatedAt = updatedAt; Format = format; - Default = xdefault; + Default = @default; } public static AttributeIp From(Dictionary map) => new AttributeIp( @@ -72,11 +72,13 @@ public AttributeIp( status: new AttributeStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), format: map["format"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/AttributeLine.cs b/Appwrite/Models/AttributeLine.cs index d06412e6..1c6cb2fc 100644 --- a/Appwrite/Models/AttributeLine.cs +++ b/Appwrite/Models/AttributeLine.cs @@ -47,7 +47,7 @@ public AttributeLine( bool? array, string createdAt, string updatedAt, - List? xdefault + List? @default ) { Key = key; @@ -58,7 +58,7 @@ public AttributeLine( Array = array; CreatedAt = createdAt; UpdatedAt = updatedAt; - Default = xdefault; + Default = @default; } public static AttributeLine From(Dictionary map) => new AttributeLine( @@ -67,10 +67,14 @@ public AttributeLine( status: new AttributeStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: map["default"].ConvertToList() + @default: map.TryGetValue("default", out var arrayRaw9) && arrayRaw9 != null + ? arrayRaw9.ConvertToList() + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/AttributeLongtext.cs b/Appwrite/Models/AttributeLongtext.cs index 25838e9f..0efc01f6 100644 --- a/Appwrite/Models/AttributeLongtext.cs +++ b/Appwrite/Models/AttributeLongtext.cs @@ -50,7 +50,7 @@ public AttributeLongtext( bool? array, string createdAt, string updatedAt, - string? xdefault, + string? @default, bool? encrypt ) { @@ -62,7 +62,7 @@ public AttributeLongtext( Array = array; CreatedAt = createdAt; UpdatedAt = updatedAt; - Default = xdefault; + Default = @default; Encrypt = encrypt; } @@ -72,11 +72,15 @@ public AttributeLongtext( status: new AttributeStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null, - encrypt: (bool?)map["encrypt"] + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null, + encrypt: map.TryGetValue("encrypt", out var boolRaw10) && boolRaw10 != null + ? (bool?)boolRaw10 + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/AttributeMediumtext.cs b/Appwrite/Models/AttributeMediumtext.cs index 66901984..e21bb3f3 100644 --- a/Appwrite/Models/AttributeMediumtext.cs +++ b/Appwrite/Models/AttributeMediumtext.cs @@ -50,7 +50,7 @@ public AttributeMediumtext( bool? array, string createdAt, string updatedAt, - string? xdefault, + string? @default, bool? encrypt ) { @@ -62,7 +62,7 @@ public AttributeMediumtext( Array = array; CreatedAt = createdAt; UpdatedAt = updatedAt; - Default = xdefault; + Default = @default; Encrypt = encrypt; } @@ -72,11 +72,15 @@ public AttributeMediumtext( status: new AttributeStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null, - encrypt: (bool?)map["encrypt"] + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null, + encrypt: map.TryGetValue("encrypt", out var boolRaw10) && boolRaw10 != null + ? (bool?)boolRaw10 + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/AttributePoint.cs b/Appwrite/Models/AttributePoint.cs index ff82ef38..b8b70a96 100644 --- a/Appwrite/Models/AttributePoint.cs +++ b/Appwrite/Models/AttributePoint.cs @@ -47,7 +47,7 @@ public AttributePoint( bool? array, string createdAt, string updatedAt, - List? xdefault + List? @default ) { Key = key; @@ -58,7 +58,7 @@ public AttributePoint( Array = array; CreatedAt = createdAt; UpdatedAt = updatedAt; - Default = xdefault; + Default = @default; } public static AttributePoint From(Dictionary map) => new AttributePoint( @@ -67,10 +67,14 @@ public AttributePoint( status: new AttributeStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: map["default"].ConvertToList() + @default: map.TryGetValue("default", out var arrayRaw9) && arrayRaw9 != null + ? arrayRaw9.ConvertToList() + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/AttributePolygon.cs b/Appwrite/Models/AttributePolygon.cs index 49de322c..668ef205 100644 --- a/Appwrite/Models/AttributePolygon.cs +++ b/Appwrite/Models/AttributePolygon.cs @@ -47,7 +47,7 @@ public AttributePolygon( bool? array, string createdAt, string updatedAt, - List? xdefault + List? @default ) { Key = key; @@ -58,7 +58,7 @@ public AttributePolygon( Array = array; CreatedAt = createdAt; UpdatedAt = updatedAt; - Default = xdefault; + Default = @default; } public static AttributePolygon From(Dictionary map) => new AttributePolygon( @@ -67,10 +67,14 @@ public AttributePolygon( status: new AttributeStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: map["default"].ConvertToList() + @default: map.TryGetValue("default", out var arrayRaw9) && arrayRaw9 != null + ? arrayRaw9.ConvertToList() + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/AttributeRelationship.cs b/Appwrite/Models/AttributeRelationship.cs index 0877d54c..b94014f8 100644 --- a/Appwrite/Models/AttributeRelationship.cs +++ b/Appwrite/Models/AttributeRelationship.cs @@ -92,7 +92,9 @@ string side status: new AttributeStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), relatedCollection: map["relatedCollection"].ToString(), diff --git a/Appwrite/Models/AttributeString.cs b/Appwrite/Models/AttributeString.cs index 6c64cf72..28f3019a 100644 --- a/Appwrite/Models/AttributeString.cs +++ b/Appwrite/Models/AttributeString.cs @@ -54,7 +54,7 @@ public AttributeString( string createdAt, string updatedAt, long size, - string? xdefault, + string? @default, bool? encrypt ) { @@ -67,7 +67,7 @@ public AttributeString( CreatedAt = createdAt; UpdatedAt = updatedAt; Size = size; - Default = xdefault; + Default = @default; Encrypt = encrypt; } @@ -77,12 +77,16 @@ public AttributeString( status: new AttributeStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), size: Convert.ToInt64(map["size"]), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null, - encrypt: (bool?)map["encrypt"] + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null, + encrypt: map.TryGetValue("encrypt", out var boolRaw11) && boolRaw11 != null + ? (bool?)boolRaw11 + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/AttributeText.cs b/Appwrite/Models/AttributeText.cs index 340188a5..79c8828c 100644 --- a/Appwrite/Models/AttributeText.cs +++ b/Appwrite/Models/AttributeText.cs @@ -50,7 +50,7 @@ public AttributeText( bool? array, string createdAt, string updatedAt, - string? xdefault, + string? @default, bool? encrypt ) { @@ -62,7 +62,7 @@ public AttributeText( Array = array; CreatedAt = createdAt; UpdatedAt = updatedAt; - Default = xdefault; + Default = @default; Encrypt = encrypt; } @@ -72,11 +72,15 @@ public AttributeText( status: new AttributeStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null, - encrypt: (bool?)map["encrypt"] + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null, + encrypt: map.TryGetValue("encrypt", out var boolRaw10) && boolRaw10 != null + ? (bool?)boolRaw10 + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/AttributeUrl.cs b/Appwrite/Models/AttributeUrl.cs index 85cae6b0..0114ec52 100644 --- a/Appwrite/Models/AttributeUrl.cs +++ b/Appwrite/Models/AttributeUrl.cs @@ -51,7 +51,7 @@ public AttributeUrl( string createdAt, string updatedAt, string format, - string? xdefault + string? @default ) { Key = key; @@ -63,7 +63,7 @@ public AttributeUrl( CreatedAt = createdAt; UpdatedAt = updatedAt; Format = format; - Default = xdefault; + Default = @default; } public static AttributeUrl From(Dictionary map) => new AttributeUrl( @@ -72,11 +72,13 @@ public AttributeUrl( status: new AttributeStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), format: map["format"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/AttributeVarchar.cs b/Appwrite/Models/AttributeVarchar.cs index a115a81d..5d16aa0a 100644 --- a/Appwrite/Models/AttributeVarchar.cs +++ b/Appwrite/Models/AttributeVarchar.cs @@ -54,7 +54,7 @@ public AttributeVarchar( string createdAt, string updatedAt, long size, - string? xdefault, + string? @default, bool? encrypt ) { @@ -67,7 +67,7 @@ public AttributeVarchar( CreatedAt = createdAt; UpdatedAt = updatedAt; Size = size; - Default = xdefault; + Default = @default; Encrypt = encrypt; } @@ -77,12 +77,16 @@ public AttributeVarchar( status: new AttributeStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), size: Convert.ToInt64(map["size"]), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null, - encrypt: (bool?)map["encrypt"] + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null, + encrypt: map.TryGetValue("encrypt", out var boolRaw11) && boolRaw11 != null + ? (bool?)boolRaw11 + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/BackupArchiveList.cs b/Appwrite/Models/BackupArchiveList.cs index 1da7ece7..75c928e0 100644 --- a/Appwrite/Models/BackupArchiveList.cs +++ b/Appwrite/Models/BackupArchiveList.cs @@ -28,7 +28,7 @@ List archives public static BackupArchiveList From(Dictionary map) => new BackupArchiveList( total: Convert.ToInt64(map["total"]), - archives: map["archives"].ConvertToList>().Select(it => BackupArchive.From(map: it)).ToList() + archives: map["archives"].ConvertToList>().Select(it => Appwrite.Models.BackupArchive.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/BackupPolicyList.cs b/Appwrite/Models/BackupPolicyList.cs index 6ebcfcf3..76229f0d 100644 --- a/Appwrite/Models/BackupPolicyList.cs +++ b/Appwrite/Models/BackupPolicyList.cs @@ -28,7 +28,7 @@ List policies public static BackupPolicyList From(Dictionary map) => new BackupPolicyList( total: Convert.ToInt64(map["total"]), - policies: map["policies"].ConvertToList>().Select(it => BackupPolicy.From(map: it)).ToList() + policies: map["policies"].ConvertToList>().Select(it => Appwrite.Models.BackupPolicy.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/BackupRestorationList.cs b/Appwrite/Models/BackupRestorationList.cs index 13e0b459..e2041667 100644 --- a/Appwrite/Models/BackupRestorationList.cs +++ b/Appwrite/Models/BackupRestorationList.cs @@ -28,7 +28,7 @@ List restorations public static BackupRestorationList From(Dictionary map) => new BackupRestorationList( total: Convert.ToInt64(map["total"]), - restorations: map["restorations"].ConvertToList>().Select(it => BackupRestoration.From(map: it)).ToList() + restorations: map["restorations"].ConvertToList>().Select(it => Appwrite.Models.BackupRestoration.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/BillingLimits.cs b/Appwrite/Models/BillingLimits.cs index 2a794ebc..2080e773 100644 --- a/Appwrite/Models/BillingLimits.cs +++ b/Appwrite/Models/BillingLimits.cs @@ -57,14 +57,30 @@ public BillingLimits( } public static BillingLimits From(Dictionary map) => new BillingLimits( - bandwidth: map["bandwidth"] == null ? null : Convert.ToInt64(map["bandwidth"]), - storage: map["storage"] == null ? null : Convert.ToInt64(map["storage"]), - users: map["users"] == null ? null : Convert.ToInt64(map["users"]), - executions: map["executions"] == null ? null : Convert.ToInt64(map["executions"]), - gBHours: map["GBHours"] == null ? null : Convert.ToInt64(map["GBHours"]), - imageTransformations: map["imageTransformations"] == null ? null : Convert.ToInt64(map["imageTransformations"]), - authPhone: map["authPhone"] == null ? null : Convert.ToInt64(map["authPhone"]), - budgetLimit: map["budgetLimit"] == null ? null : Convert.ToInt64(map["budgetLimit"]) + bandwidth: map.TryGetValue("bandwidth", out var numberRaw1) && numberRaw1 != null + ? Convert.ToInt64(numberRaw1) + : null, + storage: map.TryGetValue("storage", out var numberRaw2) && numberRaw2 != null + ? Convert.ToInt64(numberRaw2) + : null, + users: map.TryGetValue("users", out var numberRaw3) && numberRaw3 != null + ? Convert.ToInt64(numberRaw3) + : null, + executions: map.TryGetValue("executions", out var numberRaw4) && numberRaw4 != null + ? Convert.ToInt64(numberRaw4) + : null, + gBHours: map.TryGetValue("GBHours", out var numberRaw5) && numberRaw5 != null + ? Convert.ToInt64(numberRaw5) + : null, + imageTransformations: map.TryGetValue("imageTransformations", out var numberRaw6) && numberRaw6 != null + ? Convert.ToInt64(numberRaw6) + : null, + authPhone: map.TryGetValue("authPhone", out var numberRaw7) && numberRaw7 != null + ? Convert.ToInt64(numberRaw7) + : null, + budgetLimit: map.TryGetValue("budgetLimit", out var numberRaw8) && numberRaw8 != null + ? Convert.ToInt64(numberRaw8) + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/BucketList.cs b/Appwrite/Models/BucketList.cs index 8bc7d34d..194dea04 100644 --- a/Appwrite/Models/BucketList.cs +++ b/Appwrite/Models/BucketList.cs @@ -28,7 +28,7 @@ List buckets public static BucketList From(Dictionary map) => new BucketList( total: Convert.ToInt64(map["total"]), - buckets: map["buckets"].ConvertToList>().Select(it => Bucket.From(map: it)).ToList() + buckets: map["buckets"].ConvertToList>().Select(it => Appwrite.Models.Bucket.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Collection.cs b/Appwrite/Models/Collection.cs index eeb75480..018c2136 100644 --- a/Appwrite/Models/Collection.cs +++ b/Appwrite/Models/Collection.cs @@ -86,7 +86,7 @@ long bytesUsed enabled: (bool)map["enabled"], documentSecurity: (bool)map["documentSecurity"], attributes: map["attributes"].ConvertToList(), - indexes: map["indexes"].ConvertToList>().Select(it => Index.From(map: it)).ToList(), + indexes: map["indexes"].ConvertToList>().Select(it => Appwrite.Models.Index.From(map: it)).ToList(), bytesMax: Convert.ToInt64(map["bytesMax"]), bytesUsed: Convert.ToInt64(map["bytesUsed"]) ); diff --git a/Appwrite/Models/CollectionList.cs b/Appwrite/Models/CollectionList.cs index a0fb972d..646ddb5c 100644 --- a/Appwrite/Models/CollectionList.cs +++ b/Appwrite/Models/CollectionList.cs @@ -28,7 +28,7 @@ List collections public static CollectionList From(Dictionary map) => new CollectionList( total: Convert.ToInt64(map["total"]), - collections: map["collections"].ConvertToList>().Select(it => Collection.From(map: it)).ToList() + collections: map["collections"].ConvertToList>().Select(it => Appwrite.Models.Collection.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnBigint.cs b/Appwrite/Models/ColumnBigint.cs index fa9e7bda..d4408c40 100644 --- a/Appwrite/Models/ColumnBigint.cs +++ b/Appwrite/Models/ColumnBigint.cs @@ -55,7 +55,7 @@ public ColumnBigint( string updatedAt, long? min, long? max, - long? xdefault + long? @default ) { Key = key; @@ -68,7 +68,7 @@ public ColumnBigint( UpdatedAt = updatedAt; Min = min; Max = max; - Default = xdefault; + Default = @default; } public static ColumnBigint From(Dictionary map) => new ColumnBigint( @@ -77,12 +77,20 @@ public ColumnBigint( status: new ColumnStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - min: map["min"] == null ? null : Convert.ToInt64(map["min"]), - max: map["max"] == null ? null : Convert.ToInt64(map["max"]), - xdefault: map["default"] == null ? null : Convert.ToInt64(map["default"]) + min: map.TryGetValue("min", out var numberRaw9) && numberRaw9 != null + ? Convert.ToInt64(numberRaw9) + : null, + max: map.TryGetValue("max", out var numberRaw10) && numberRaw10 != null + ? Convert.ToInt64(numberRaw10) + : null, + @default: map.TryGetValue("default", out var numberRaw11) && numberRaw11 != null + ? Convert.ToInt64(numberRaw11) + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnBoolean.cs b/Appwrite/Models/ColumnBoolean.cs index 8b086a1a..57fcb64e 100644 --- a/Appwrite/Models/ColumnBoolean.cs +++ b/Appwrite/Models/ColumnBoolean.cs @@ -47,7 +47,7 @@ public ColumnBoolean( bool? array, string createdAt, string updatedAt, - bool? xdefault + bool? @default ) { Key = key; @@ -58,7 +58,7 @@ public ColumnBoolean( Array = array; CreatedAt = createdAt; UpdatedAt = updatedAt; - Default = xdefault; + Default = @default; } public static ColumnBoolean From(Dictionary map) => new ColumnBoolean( @@ -67,10 +67,14 @@ public ColumnBoolean( status: new ColumnStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: (bool?)map["default"] + @default: map.TryGetValue("default", out var boolRaw9) && boolRaw9 != null + ? (bool?)boolRaw9 + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnDatetime.cs b/Appwrite/Models/ColumnDatetime.cs index c907e815..1baefc45 100644 --- a/Appwrite/Models/ColumnDatetime.cs +++ b/Appwrite/Models/ColumnDatetime.cs @@ -51,7 +51,7 @@ public ColumnDatetime( string createdAt, string updatedAt, string format, - string? xdefault + string? @default ) { Key = key; @@ -63,7 +63,7 @@ public ColumnDatetime( CreatedAt = createdAt; UpdatedAt = updatedAt; Format = format; - Default = xdefault; + Default = @default; } public static ColumnDatetime From(Dictionary map) => new ColumnDatetime( @@ -72,11 +72,13 @@ public ColumnDatetime( status: new ColumnStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), format: map["format"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnEmail.cs b/Appwrite/Models/ColumnEmail.cs index e479615f..9a907a84 100644 --- a/Appwrite/Models/ColumnEmail.cs +++ b/Appwrite/Models/ColumnEmail.cs @@ -51,7 +51,7 @@ public ColumnEmail( string createdAt, string updatedAt, string format, - string? xdefault + string? @default ) { Key = key; @@ -63,7 +63,7 @@ public ColumnEmail( CreatedAt = createdAt; UpdatedAt = updatedAt; Format = format; - Default = xdefault; + Default = @default; } public static ColumnEmail From(Dictionary map) => new ColumnEmail( @@ -72,11 +72,13 @@ public ColumnEmail( status: new ColumnStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), format: map["format"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnEnum.cs b/Appwrite/Models/ColumnEnum.cs index 4bdce016..f99c8f3f 100644 --- a/Appwrite/Models/ColumnEnum.cs +++ b/Appwrite/Models/ColumnEnum.cs @@ -55,7 +55,7 @@ public ColumnEnum( string updatedAt, List elements, string format, - string? xdefault + string? @default ) { Key = key; @@ -68,7 +68,7 @@ public ColumnEnum( UpdatedAt = updatedAt; Elements = elements; Format = format; - Default = xdefault; + Default = @default; } public static ColumnEnum From(Dictionary map) => new ColumnEnum( @@ -77,12 +77,14 @@ public ColumnEnum( status: new ColumnStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), elements: map["elements"].ConvertToList(), format: map["format"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnFloat.cs b/Appwrite/Models/ColumnFloat.cs index 70035ae9..75e6c747 100644 --- a/Appwrite/Models/ColumnFloat.cs +++ b/Appwrite/Models/ColumnFloat.cs @@ -55,7 +55,7 @@ public ColumnFloat( string updatedAt, double? min, double? max, - double? xdefault + double? @default ) { Key = key; @@ -68,7 +68,7 @@ public ColumnFloat( UpdatedAt = updatedAt; Min = min; Max = max; - Default = xdefault; + Default = @default; } public static ColumnFloat From(Dictionary map) => new ColumnFloat( @@ -77,12 +77,20 @@ public ColumnFloat( status: new ColumnStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - min: map["min"] == null ? null : Convert.ToDouble(map["min"]), - max: map["max"] == null ? null : Convert.ToDouble(map["max"]), - xdefault: map["default"] == null ? null : Convert.ToDouble(map["default"]) + min: map.TryGetValue("min", out var numberRaw9) && numberRaw9 != null + ? Convert.ToDouble(numberRaw9) + : null, + max: map.TryGetValue("max", out var numberRaw10) && numberRaw10 != null + ? Convert.ToDouble(numberRaw10) + : null, + @default: map.TryGetValue("default", out var numberRaw11) && numberRaw11 != null + ? Convert.ToDouble(numberRaw11) + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnIndex.cs b/Appwrite/Models/ColumnIndex.cs index 09c0dcd8..531ec4af 100644 --- a/Appwrite/Models/ColumnIndex.cs +++ b/Appwrite/Models/ColumnIndex.cs @@ -76,7 +76,9 @@ public ColumnIndex( error: map["error"].ToString(), columns: map["columns"].ConvertToList(), lengths: map["lengths"].ConvertToList(), - orders: map["orders"].ConvertToList() + orders: map.TryGetValue("orders", out var arrayRaw10) && arrayRaw10 != null + ? arrayRaw10.ConvertToList() + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnIndexList.cs b/Appwrite/Models/ColumnIndexList.cs index d81be7e6..40c90198 100644 --- a/Appwrite/Models/ColumnIndexList.cs +++ b/Appwrite/Models/ColumnIndexList.cs @@ -28,7 +28,7 @@ List indexes public static ColumnIndexList From(Dictionary map) => new ColumnIndexList( total: Convert.ToInt64(map["total"]), - indexes: map["indexes"].ConvertToList>().Select(it => ColumnIndex.From(map: it)).ToList() + indexes: map["indexes"].ConvertToList>().Select(it => Appwrite.Models.ColumnIndex.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnInteger.cs b/Appwrite/Models/ColumnInteger.cs index ea651eba..52b99cd7 100644 --- a/Appwrite/Models/ColumnInteger.cs +++ b/Appwrite/Models/ColumnInteger.cs @@ -55,7 +55,7 @@ public ColumnInteger( string updatedAt, long? min, long? max, - long? xdefault + long? @default ) { Key = key; @@ -68,7 +68,7 @@ public ColumnInteger( UpdatedAt = updatedAt; Min = min; Max = max; - Default = xdefault; + Default = @default; } public static ColumnInteger From(Dictionary map) => new ColumnInteger( @@ -77,12 +77,20 @@ public ColumnInteger( status: new ColumnStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - min: map["min"] == null ? null : Convert.ToInt64(map["min"]), - max: map["max"] == null ? null : Convert.ToInt64(map["max"]), - xdefault: map["default"] == null ? null : Convert.ToInt64(map["default"]) + min: map.TryGetValue("min", out var numberRaw9) && numberRaw9 != null + ? Convert.ToInt64(numberRaw9) + : null, + max: map.TryGetValue("max", out var numberRaw10) && numberRaw10 != null + ? Convert.ToInt64(numberRaw10) + : null, + @default: map.TryGetValue("default", out var numberRaw11) && numberRaw11 != null + ? Convert.ToInt64(numberRaw11) + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnIp.cs b/Appwrite/Models/ColumnIp.cs index fa3b2fdb..dac7ded9 100644 --- a/Appwrite/Models/ColumnIp.cs +++ b/Appwrite/Models/ColumnIp.cs @@ -51,7 +51,7 @@ public ColumnIp( string createdAt, string updatedAt, string format, - string? xdefault + string? @default ) { Key = key; @@ -63,7 +63,7 @@ public ColumnIp( CreatedAt = createdAt; UpdatedAt = updatedAt; Format = format; - Default = xdefault; + Default = @default; } public static ColumnIp From(Dictionary map) => new ColumnIp( @@ -72,11 +72,13 @@ public ColumnIp( status: new ColumnStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), format: map["format"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnLine.cs b/Appwrite/Models/ColumnLine.cs index bfaa7588..865acd0a 100644 --- a/Appwrite/Models/ColumnLine.cs +++ b/Appwrite/Models/ColumnLine.cs @@ -47,7 +47,7 @@ public ColumnLine( bool? array, string createdAt, string updatedAt, - List? xdefault + List? @default ) { Key = key; @@ -58,7 +58,7 @@ public ColumnLine( Array = array; CreatedAt = createdAt; UpdatedAt = updatedAt; - Default = xdefault; + Default = @default; } public static ColumnLine From(Dictionary map) => new ColumnLine( @@ -67,10 +67,14 @@ public ColumnLine( status: new ColumnStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: map["default"].ConvertToList() + @default: map.TryGetValue("default", out var arrayRaw9) && arrayRaw9 != null + ? arrayRaw9.ConvertToList() + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnLongtext.cs b/Appwrite/Models/ColumnLongtext.cs index 7abaa3f7..304da072 100644 --- a/Appwrite/Models/ColumnLongtext.cs +++ b/Appwrite/Models/ColumnLongtext.cs @@ -50,7 +50,7 @@ public ColumnLongtext( bool? array, string createdAt, string updatedAt, - string? xdefault, + string? @default, bool? encrypt ) { @@ -62,7 +62,7 @@ public ColumnLongtext( Array = array; CreatedAt = createdAt; UpdatedAt = updatedAt; - Default = xdefault; + Default = @default; Encrypt = encrypt; } @@ -72,11 +72,15 @@ public ColumnLongtext( status: new ColumnStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null, - encrypt: (bool?)map["encrypt"] + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null, + encrypt: map.TryGetValue("encrypt", out var boolRaw10) && boolRaw10 != null + ? (bool?)boolRaw10 + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnMediumtext.cs b/Appwrite/Models/ColumnMediumtext.cs index 11b608a3..f54b9e3c 100644 --- a/Appwrite/Models/ColumnMediumtext.cs +++ b/Appwrite/Models/ColumnMediumtext.cs @@ -50,7 +50,7 @@ public ColumnMediumtext( bool? array, string createdAt, string updatedAt, - string? xdefault, + string? @default, bool? encrypt ) { @@ -62,7 +62,7 @@ public ColumnMediumtext( Array = array; CreatedAt = createdAt; UpdatedAt = updatedAt; - Default = xdefault; + Default = @default; Encrypt = encrypt; } @@ -72,11 +72,15 @@ public ColumnMediumtext( status: new ColumnStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null, - encrypt: (bool?)map["encrypt"] + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null, + encrypt: map.TryGetValue("encrypt", out var boolRaw10) && boolRaw10 != null + ? (bool?)boolRaw10 + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnPoint.cs b/Appwrite/Models/ColumnPoint.cs index ebacb58f..76a1aa7d 100644 --- a/Appwrite/Models/ColumnPoint.cs +++ b/Appwrite/Models/ColumnPoint.cs @@ -47,7 +47,7 @@ public ColumnPoint( bool? array, string createdAt, string updatedAt, - List? xdefault + List? @default ) { Key = key; @@ -58,7 +58,7 @@ public ColumnPoint( Array = array; CreatedAt = createdAt; UpdatedAt = updatedAt; - Default = xdefault; + Default = @default; } public static ColumnPoint From(Dictionary map) => new ColumnPoint( @@ -67,10 +67,14 @@ public ColumnPoint( status: new ColumnStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: map["default"].ConvertToList() + @default: map.TryGetValue("default", out var arrayRaw9) && arrayRaw9 != null + ? arrayRaw9.ConvertToList() + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnPolygon.cs b/Appwrite/Models/ColumnPolygon.cs index dccd7b80..811e614b 100644 --- a/Appwrite/Models/ColumnPolygon.cs +++ b/Appwrite/Models/ColumnPolygon.cs @@ -47,7 +47,7 @@ public ColumnPolygon( bool? array, string createdAt, string updatedAt, - List? xdefault + List? @default ) { Key = key; @@ -58,7 +58,7 @@ public ColumnPolygon( Array = array; CreatedAt = createdAt; UpdatedAt = updatedAt; - Default = xdefault; + Default = @default; } public static ColumnPolygon From(Dictionary map) => new ColumnPolygon( @@ -67,10 +67,14 @@ public ColumnPolygon( status: new ColumnStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: map["default"].ConvertToList() + @default: map.TryGetValue("default", out var arrayRaw9) && arrayRaw9 != null + ? arrayRaw9.ConvertToList() + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnRelationship.cs b/Appwrite/Models/ColumnRelationship.cs index 92064657..6cf3d2dc 100644 --- a/Appwrite/Models/ColumnRelationship.cs +++ b/Appwrite/Models/ColumnRelationship.cs @@ -92,7 +92,9 @@ string side status: new ColumnStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), relatedTable: map["relatedTable"].ToString(), diff --git a/Appwrite/Models/ColumnString.cs b/Appwrite/Models/ColumnString.cs index 6ce830f9..f4bdbff9 100644 --- a/Appwrite/Models/ColumnString.cs +++ b/Appwrite/Models/ColumnString.cs @@ -54,7 +54,7 @@ public ColumnString( string createdAt, string updatedAt, long size, - string? xdefault, + string? @default, bool? encrypt ) { @@ -67,7 +67,7 @@ public ColumnString( CreatedAt = createdAt; UpdatedAt = updatedAt; Size = size; - Default = xdefault; + Default = @default; Encrypt = encrypt; } @@ -77,12 +77,16 @@ public ColumnString( status: new ColumnStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), size: Convert.ToInt64(map["size"]), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null, - encrypt: (bool?)map["encrypt"] + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null, + encrypt: map.TryGetValue("encrypt", out var boolRaw11) && boolRaw11 != null + ? (bool?)boolRaw11 + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnText.cs b/Appwrite/Models/ColumnText.cs index eeed46d6..75cdc4a5 100644 --- a/Appwrite/Models/ColumnText.cs +++ b/Appwrite/Models/ColumnText.cs @@ -50,7 +50,7 @@ public ColumnText( bool? array, string createdAt, string updatedAt, - string? xdefault, + string? @default, bool? encrypt ) { @@ -62,7 +62,7 @@ public ColumnText( Array = array; CreatedAt = createdAt; UpdatedAt = updatedAt; - Default = xdefault; + Default = @default; Encrypt = encrypt; } @@ -72,11 +72,15 @@ public ColumnText( status: new ColumnStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null, - encrypt: (bool?)map["encrypt"] + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null, + encrypt: map.TryGetValue("encrypt", out var boolRaw10) && boolRaw10 != null + ? (bool?)boolRaw10 + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnUrl.cs b/Appwrite/Models/ColumnUrl.cs index 0a028b47..092029b0 100644 --- a/Appwrite/Models/ColumnUrl.cs +++ b/Appwrite/Models/ColumnUrl.cs @@ -51,7 +51,7 @@ public ColumnUrl( string createdAt, string updatedAt, string format, - string? xdefault + string? @default ) { Key = key; @@ -63,7 +63,7 @@ public ColumnUrl( CreatedAt = createdAt; UpdatedAt = updatedAt; Format = format; - Default = xdefault; + Default = @default; } public static ColumnUrl From(Dictionary map) => new ColumnUrl( @@ -72,11 +72,13 @@ public ColumnUrl( status: new ColumnStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), format: map["format"].ToString(), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ColumnVarchar.cs b/Appwrite/Models/ColumnVarchar.cs index 62a42c4a..f37860b7 100644 --- a/Appwrite/Models/ColumnVarchar.cs +++ b/Appwrite/Models/ColumnVarchar.cs @@ -54,7 +54,7 @@ public ColumnVarchar( string createdAt, string updatedAt, long size, - string? xdefault, + string? @default, bool? encrypt ) { @@ -67,7 +67,7 @@ public ColumnVarchar( CreatedAt = createdAt; UpdatedAt = updatedAt; Size = size; - Default = xdefault; + Default = @default; Encrypt = encrypt; } @@ -77,12 +77,16 @@ public ColumnVarchar( status: new ColumnStatus(map["status"].ToString()!), error: map["error"].ToString(), required: (bool)map["required"], - array: (bool?)map["array"], + array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null + ? (bool?)boolRaw6 + : null, createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), size: Convert.ToInt64(map["size"]), - xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null, - encrypt: (bool?)map["encrypt"] + @default: map.TryGetValue("default", out var @default) ? @default?.ToString() : null, + encrypt: map.TryGetValue("encrypt", out var boolRaw11) && boolRaw11 != null + ? (bool?)boolRaw11 + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ContinentList.cs b/Appwrite/Models/ContinentList.cs index 410bbefb..8b5ea8b1 100644 --- a/Appwrite/Models/ContinentList.cs +++ b/Appwrite/Models/ContinentList.cs @@ -28,7 +28,7 @@ List continents public static ContinentList From(Dictionary map) => new ContinentList( total: Convert.ToInt64(map["total"]), - continents: map["continents"].ConvertToList>().Select(it => Continent.From(map: it)).ToList() + continents: map["continents"].ConvertToList>().Select(it => Appwrite.Models.Continent.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/CountryList.cs b/Appwrite/Models/CountryList.cs index 74724f40..9478a37a 100644 --- a/Appwrite/Models/CountryList.cs +++ b/Appwrite/Models/CountryList.cs @@ -28,7 +28,7 @@ List countries public static CountryList From(Dictionary map) => new CountryList( total: Convert.ToInt64(map["total"]), - countries: map["countries"].ConvertToList>().Select(it => Country.From(map: it)).ToList() + countries: map["countries"].ConvertToList>().Select(it => Appwrite.Models.Country.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/CurrencyList.cs b/Appwrite/Models/CurrencyList.cs index 419b6c09..ce71e185 100644 --- a/Appwrite/Models/CurrencyList.cs +++ b/Appwrite/Models/CurrencyList.cs @@ -28,7 +28,7 @@ List currencies public static CurrencyList From(Dictionary map) => new CurrencyList( total: Convert.ToInt64(map["total"]), - currencies: map["currencies"].ConvertToList>().Select(it => Currency.From(map: it)).ToList() + currencies: map["currencies"].ConvertToList>().Select(it => Appwrite.Models.Currency.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Database.cs b/Appwrite/Models/Database.cs index 89a958c2..2ff2a2ec 100644 --- a/Appwrite/Models/Database.cs +++ b/Appwrite/Models/Database.cs @@ -63,8 +63,8 @@ List archives updatedAt: map["$updatedAt"].ToString(), enabled: (bool)map["enabled"], type: new DatabaseType(map["type"].ToString()!), - policies: map["policies"].ConvertToList>().Select(it => BackupPolicy.From(map: it)).ToList(), - archives: map["archives"].ConvertToList>().Select(it => BackupArchive.From(map: it)).ToList() + policies: map["policies"].ConvertToList>().Select(it => Appwrite.Models.BackupPolicy.From(map: it)).ToList(), + archives: map["archives"].ConvertToList>().Select(it => Appwrite.Models.BackupArchive.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/DatabaseList.cs b/Appwrite/Models/DatabaseList.cs index 55d34525..28d782e3 100644 --- a/Appwrite/Models/DatabaseList.cs +++ b/Appwrite/Models/DatabaseList.cs @@ -28,7 +28,7 @@ List databases public static DatabaseList From(Dictionary map) => new DatabaseList( total: Convert.ToInt64(map["total"]), - databases: map["databases"].ConvertToList>().Select(it => Database.From(map: it)).ToList() + databases: map["databases"].ConvertToList>().Select(it => Appwrite.Models.Database.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/DeploymentList.cs b/Appwrite/Models/DeploymentList.cs index a26f4e43..45c56994 100644 --- a/Appwrite/Models/DeploymentList.cs +++ b/Appwrite/Models/DeploymentList.cs @@ -28,7 +28,7 @@ List deployments public static DeploymentList From(Dictionary map) => new DeploymentList( total: Convert.ToInt64(map["total"]), - deployments: map["deployments"].ConvertToList>().Select(it => Deployment.From(map: it)).ToList() + deployments: map["deployments"].ConvertToList>().Select(it => Appwrite.Models.Deployment.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/DocumentList.cs b/Appwrite/Models/DocumentList.cs index 689733a6..77c02b71 100644 --- a/Appwrite/Models/DocumentList.cs +++ b/Appwrite/Models/DocumentList.cs @@ -28,7 +28,7 @@ List documents public static DocumentList From(Dictionary map) => new DocumentList( total: Convert.ToInt64(map["total"]), - documents: map["documents"].ConvertToList>().Select(it => Document.From(map: it)).ToList() + documents: map["documents"].ConvertToList>().Select(it => Appwrite.Models.Document.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/EmailTemplateList.cs b/Appwrite/Models/EmailTemplateList.cs index 5e9ada6f..59cd2ce8 100644 --- a/Appwrite/Models/EmailTemplateList.cs +++ b/Appwrite/Models/EmailTemplateList.cs @@ -28,7 +28,7 @@ List templates public static EmailTemplateList From(Dictionary map) => new EmailTemplateList( total: Convert.ToInt64(map["total"]), - templates: map["templates"].ConvertToList>().Select(it => EmailTemplate.From(map: it)).ToList() + templates: map["templates"].ConvertToList>().Select(it => Appwrite.Models.EmailTemplate.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Execution.cs b/Appwrite/Models/Execution.cs index db0271eb..04c39e47 100644 --- a/Appwrite/Models/Execution.cs +++ b/Appwrite/Models/Execution.cs @@ -117,10 +117,10 @@ public Execution( status: new ExecutionStatus(map["status"].ToString()!), requestMethod: map["requestMethod"].ToString(), requestPath: map["requestPath"].ToString(), - requestHeaders: map["requestHeaders"].ConvertToList>().Select(it => Headers.From(map: it)).ToList(), + requestHeaders: map["requestHeaders"].ConvertToList>().Select(it => Appwrite.Models.Headers.From(map: it)).ToList(), responseStatusCode: Convert.ToInt64(map["responseStatusCode"]), responseBody: map["responseBody"].ToString(), - responseHeaders: map["responseHeaders"].ConvertToList>().Select(it => Headers.From(map: it)).ToList(), + responseHeaders: map["responseHeaders"].ConvertToList>().Select(it => Appwrite.Models.Headers.From(map: it)).ToList(), logs: map["logs"].ToString(), errors: map["errors"].ToString(), duration: Convert.ToDouble(map["duration"]), diff --git a/Appwrite/Models/ExecutionList.cs b/Appwrite/Models/ExecutionList.cs index 353076c9..413253f2 100644 --- a/Appwrite/Models/ExecutionList.cs +++ b/Appwrite/Models/ExecutionList.cs @@ -28,7 +28,7 @@ List executions public static ExecutionList From(Dictionary map) => new ExecutionList( total: Convert.ToInt64(map["total"]), - executions: map["executions"].ConvertToList>().Select(it => Execution.From(map: it)).ToList() + executions: map["executions"].ConvertToList>().Select(it => Appwrite.Models.Execution.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/FileList.cs b/Appwrite/Models/FileList.cs index 88a6b6b9..aed1cb81 100644 --- a/Appwrite/Models/FileList.cs +++ b/Appwrite/Models/FileList.cs @@ -28,7 +28,7 @@ List files public static FileList From(Dictionary map) => new FileList( total: Convert.ToInt64(map["total"]), - files: map["files"].ConvertToList>().Select(it => File.From(map: it)).ToList() + files: map["files"].ConvertToList>().Select(it => Appwrite.Models.File.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Framework.cs b/Appwrite/Models/Framework.cs index aaf075e2..9486fee5 100644 --- a/Appwrite/Models/Framework.cs +++ b/Appwrite/Models/Framework.cs @@ -46,7 +46,7 @@ List adapters name: map["name"].ToString(), buildRuntime: map["buildRuntime"].ToString(), runtimes: map["runtimes"].ConvertToList(), - adapters: map["adapters"].ConvertToList>().Select(it => FrameworkAdapter.From(map: it)).ToList() + adapters: map["adapters"].ConvertToList>().Select(it => Appwrite.Models.FrameworkAdapter.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/FrameworkList.cs b/Appwrite/Models/FrameworkList.cs index 855c4399..6b652bae 100644 --- a/Appwrite/Models/FrameworkList.cs +++ b/Appwrite/Models/FrameworkList.cs @@ -28,7 +28,7 @@ List frameworks public static FrameworkList From(Dictionary map) => new FrameworkList( total: Convert.ToInt64(map["total"]), - frameworks: map["frameworks"].ConvertToList>().Select(it => Framework.From(map: it)).ToList() + frameworks: map["frameworks"].ConvertToList>().Select(it => Appwrite.Models.Framework.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Function.cs b/Appwrite/Models/Function.cs index 1069280f..0de4c5f5 100644 --- a/Appwrite/Models/Function.cs +++ b/Appwrite/Models/Function.cs @@ -193,7 +193,7 @@ string runtimeSpecification latestDeploymentCreatedAt: map["latestDeploymentCreatedAt"].ToString(), latestDeploymentStatus: map["latestDeploymentStatus"].ToString(), scopes: map["scopes"].ConvertToList(), - vars: map["vars"].ConvertToList>().Select(it => Variable.From(map: it)).ToList(), + vars: map["vars"].ConvertToList>().Select(it => Appwrite.Models.Variable.From(map: it)).ToList(), events: map["events"].ConvertToList(), schedule: map["schedule"].ToString(), timeout: Convert.ToInt64(map["timeout"]), diff --git a/Appwrite/Models/FunctionList.cs b/Appwrite/Models/FunctionList.cs index b07d1714..0fd99836 100644 --- a/Appwrite/Models/FunctionList.cs +++ b/Appwrite/Models/FunctionList.cs @@ -28,7 +28,7 @@ List functions public static FunctionList From(Dictionary map) => new FunctionList( total: Convert.ToInt64(map["total"]), - functions: map["functions"].ConvertToList>().Select(it => Function.From(map: it)).ToList() + functions: map["functions"].ConvertToList>().Select(it => Appwrite.Models.Function.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Headers.cs b/Appwrite/Models/Headers.cs index 27224459..c1429470 100644 --- a/Appwrite/Models/Headers.cs +++ b/Appwrite/Models/Headers.cs @@ -19,16 +19,16 @@ public class Headers public Headers( string name, - string xvalue + string @value ) { Name = name; - Value = xvalue; + Value = @value; } public static Headers From(Dictionary map) => new Headers( name: map["name"].ToString(), - xvalue: map["value"].ToString() + @value: map["value"].ToString() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/HealthStatusList.cs b/Appwrite/Models/HealthStatusList.cs index 4689c3ab..f7b147c3 100644 --- a/Appwrite/Models/HealthStatusList.cs +++ b/Appwrite/Models/HealthStatusList.cs @@ -28,7 +28,7 @@ List statuses public static HealthStatusList From(Dictionary map) => new HealthStatusList( total: Convert.ToInt64(map["total"]), - statuses: map["statuses"].ConvertToList>().Select(it => HealthStatus.From(map: it)).ToList() + statuses: map["statuses"].ConvertToList>().Select(it => Appwrite.Models.HealthStatus.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/IdentityList.cs b/Appwrite/Models/IdentityList.cs index 2d339bfa..e4b93420 100644 --- a/Appwrite/Models/IdentityList.cs +++ b/Appwrite/Models/IdentityList.cs @@ -28,7 +28,7 @@ List identities public static IdentityList From(Dictionary map) => new IdentityList( total: Convert.ToInt64(map["total"]), - identities: map["identities"].ConvertToList>().Select(it => Identity.From(map: it)).ToList() + identities: map["identities"].ConvertToList>().Select(it => Appwrite.Models.Identity.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Index.cs b/Appwrite/Models/Index.cs index fde67d90..12f897d7 100644 --- a/Appwrite/Models/Index.cs +++ b/Appwrite/Models/Index.cs @@ -76,7 +76,9 @@ public Index( error: map["error"].ToString(), attributes: map["attributes"].ConvertToList(), lengths: map["lengths"].ConvertToList(), - orders: map["orders"].ConvertToList() + orders: map.TryGetValue("orders", out var arrayRaw10) && arrayRaw10 != null + ? arrayRaw10.ConvertToList() + : null ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/IndexList.cs b/Appwrite/Models/IndexList.cs index db68fd98..844cd16b 100644 --- a/Appwrite/Models/IndexList.cs +++ b/Appwrite/Models/IndexList.cs @@ -28,7 +28,7 @@ List indexes public static IndexList From(Dictionary map) => new IndexList( total: Convert.ToInt64(map["total"]), - indexes: map["indexes"].ConvertToList>().Select(it => Index.From(map: it)).ToList() + indexes: map["indexes"].ConvertToList>().Select(it => Appwrite.Models.Index.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Insight.cs b/Appwrite/Models/Insight.cs index b06702d0..0676bf17 100644 --- a/Appwrite/Models/Insight.cs +++ b/Appwrite/Models/Insight.cs @@ -115,7 +115,7 @@ public Insight( parentResourceId: map["parentResourceId"].ToString(), title: map["title"].ToString(), summary: map["summary"].ToString(), - ctas: map["ctas"].ConvertToList>().Select(it => InsightCTA.From(map: it)).ToList(), + ctas: map["ctas"].ConvertToList>().Select(it => Appwrite.Models.InsightCTA.From(map: it)).ToList(), analyzedAt: map.TryGetValue("analyzedAt", out var analyzedAt) ? analyzedAt?.ToString() : null, dismissedAt: map.TryGetValue("dismissedAt", out var dismissedAt) ? dismissedAt?.ToString() : null, dismissedBy: map.TryGetValue("dismissedBy", out var dismissedBy) ? dismissedBy?.ToString() : null diff --git a/Appwrite/Models/InsightCTA.cs b/Appwrite/Models/InsightCTA.cs index cf683a04..516cae98 100644 --- a/Appwrite/Models/InsightCTA.cs +++ b/Appwrite/Models/InsightCTA.cs @@ -27,20 +27,20 @@ public InsightCTA( string label, string service, string method, - object xparams + object @params ) { Label = label; Service = service; Method = method; - Params = xparams; + Params = @params; } public static InsightCTA From(Dictionary map) => new InsightCTA( label: map["label"].ToString(), service: map["service"].ToString(), method: map["method"].ToString(), - xparams: map["params"].ToString() + @params: map["params"].ToString() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/InsightList.cs b/Appwrite/Models/InsightList.cs index 5b6b33f2..a7a12f50 100644 --- a/Appwrite/Models/InsightList.cs +++ b/Appwrite/Models/InsightList.cs @@ -28,7 +28,7 @@ List insights public static InsightList From(Dictionary map) => new InsightList( total: Convert.ToInt64(map["total"]), - insights: map["insights"].ConvertToList>().Select(it => Insight.From(map: it)).ToList() + insights: map["insights"].ConvertToList>().Select(it => Appwrite.Models.Insight.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/KeyList.cs b/Appwrite/Models/KeyList.cs index 60f098d7..c7dfdfb5 100644 --- a/Appwrite/Models/KeyList.cs +++ b/Appwrite/Models/KeyList.cs @@ -28,7 +28,7 @@ List keys public static KeyList From(Dictionary map) => new KeyList( total: Convert.ToInt64(map["total"]), - keys: map["keys"].ConvertToList>().Select(it => Key.From(map: it)).ToList() + keys: map["keys"].ConvertToList>().Select(it => Appwrite.Models.Key.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/LanguageList.cs b/Appwrite/Models/LanguageList.cs index 84c731b0..cd57fa8f 100644 --- a/Appwrite/Models/LanguageList.cs +++ b/Appwrite/Models/LanguageList.cs @@ -28,7 +28,7 @@ List languages public static LanguageList From(Dictionary map) => new LanguageList( total: Convert.ToInt64(map["total"]), - languages: map["languages"].ConvertToList>().Select(it => Language.From(map: it)).ToList() + languages: map["languages"].ConvertToList>().Select(it => Appwrite.Models.Language.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/LocaleCodeList.cs b/Appwrite/Models/LocaleCodeList.cs index f9df12ee..98f712ea 100644 --- a/Appwrite/Models/LocaleCodeList.cs +++ b/Appwrite/Models/LocaleCodeList.cs @@ -28,7 +28,7 @@ List localeCodes public static LocaleCodeList From(Dictionary map) => new LocaleCodeList( total: Convert.ToInt64(map["total"]), - localeCodes: map["localeCodes"].ConvertToList>().Select(it => LocaleCode.From(map: it)).ToList() + localeCodes: map["localeCodes"].ConvertToList>().Select(it => Appwrite.Models.LocaleCode.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Log.cs b/Appwrite/Models/Log.cs index a8867445..5ff3b420 100644 --- a/Appwrite/Models/Log.cs +++ b/Appwrite/Models/Log.cs @@ -78,7 +78,7 @@ public class Log public string CountryName { get; private set; } public Log( - string xevent, + string @event, string userId, string userEmail, string userName, @@ -102,7 +102,7 @@ public Log( string countryName ) { - Event = xevent; + Event = @event; UserId = userId; UserEmail = userEmail; UserName = userName; @@ -127,7 +127,7 @@ string countryName } public static Log From(Dictionary map) => new Log( - xevent: map["event"].ToString(), + @event: map["event"].ToString(), userId: map["userId"].ToString(), userEmail: map["userEmail"].ToString(), userName: map["userName"].ToString(), diff --git a/Appwrite/Models/LogList.cs b/Appwrite/Models/LogList.cs index cd508f35..e8c583fc 100644 --- a/Appwrite/Models/LogList.cs +++ b/Appwrite/Models/LogList.cs @@ -28,7 +28,7 @@ List logs public static LogList From(Dictionary map) => new LogList( total: Convert.ToInt64(map["total"]), - logs: map["logs"].ConvertToList>().Select(it => Log.From(map: it)).ToList() + logs: map["logs"].ConvertToList>().Select(it => Appwrite.Models.Log.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/MembershipList.cs b/Appwrite/Models/MembershipList.cs index d7d84433..5bc5acbe 100644 --- a/Appwrite/Models/MembershipList.cs +++ b/Appwrite/Models/MembershipList.cs @@ -28,7 +28,7 @@ List memberships public static MembershipList From(Dictionary map) => new MembershipList( total: Convert.ToInt64(map["total"]), - memberships: map["memberships"].ConvertToList>().Select(it => Membership.From(map: it)).ToList() + memberships: map["memberships"].ConvertToList>().Select(it => Appwrite.Models.Membership.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Message.cs b/Appwrite/Models/Message.cs index 1b9f64ec..b90570b6 100644 --- a/Appwrite/Models/Message.cs +++ b/Appwrite/Models/Message.cs @@ -91,7 +91,9 @@ MessageStatus status targets: map["targets"].ConvertToList(), scheduledAt: map.TryGetValue("scheduledAt", out var scheduledAt) ? scheduledAt?.ToString() : null, deliveredAt: map.TryGetValue("deliveredAt", out var deliveredAt) ? deliveredAt?.ToString() : null, - deliveryErrors: map["deliveryErrors"].ConvertToList(), + deliveryErrors: map.TryGetValue("deliveryErrors", out var arrayRaw10) && arrayRaw10 != null + ? arrayRaw10.ConvertToList() + : null, deliveredTotal: Convert.ToInt64(map["deliveredTotal"]), data: map["data"].ToString(), status: new MessageStatus(map["status"].ToString()!) diff --git a/Appwrite/Models/MessageList.cs b/Appwrite/Models/MessageList.cs index ef05fbab..0cbc300c 100644 --- a/Appwrite/Models/MessageList.cs +++ b/Appwrite/Models/MessageList.cs @@ -28,7 +28,7 @@ List messages public static MessageList From(Dictionary map) => new MessageList( total: Convert.ToInt64(map["total"]), - messages: map["messages"].ConvertToList>().Select(it => Message.From(map: it)).ToList() + messages: map["messages"].ConvertToList>().Select(it => Appwrite.Models.Message.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/MockNumberList.cs b/Appwrite/Models/MockNumberList.cs index cac7baab..b89caed0 100644 --- a/Appwrite/Models/MockNumberList.cs +++ b/Appwrite/Models/MockNumberList.cs @@ -28,7 +28,7 @@ List mockNumbers public static MockNumberList From(Dictionary map) => new MockNumberList( total: Convert.ToInt64(map["total"]), - mockNumbers: map["mockNumbers"].ConvertToList>().Select(it => MockNumber.From(map: it)).ToList() + mockNumbers: map["mockNumbers"].ConvertToList>().Select(it => Appwrite.Models.MockNumber.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/PhoneList.cs b/Appwrite/Models/PhoneList.cs index 83b1844e..44010bf8 100644 --- a/Appwrite/Models/PhoneList.cs +++ b/Appwrite/Models/PhoneList.cs @@ -28,7 +28,7 @@ List phones public static PhoneList From(Dictionary map) => new PhoneList( total: Convert.ToInt64(map["total"]), - phones: map["phones"].ConvertToList>().Select(it => Phone.From(map: it)).ToList() + phones: map["phones"].ConvertToList>().Select(it => Appwrite.Models.Phone.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/PolicyPasswordStrength.cs b/Appwrite/Models/PolicyPasswordStrength.cs new file mode 100644 index 00000000..cec65dea --- /dev/null +++ b/Appwrite/Models/PolicyPasswordStrength.cs @@ -0,0 +1,68 @@ + +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 PolicyPasswordStrength + { + [JsonPropertyName("$id")] + public string Id { get; private set; } + + [JsonPropertyName("min")] + public long Min { get; private set; } + + [JsonPropertyName("uppercase")] + public bool Uppercase { get; private set; } + + [JsonPropertyName("lowercase")] + public bool Lowercase { get; private set; } + + [JsonPropertyName("number")] + public bool Number { get; private set; } + + [JsonPropertyName("symbols")] + public bool Symbols { get; private set; } + + public PolicyPasswordStrength( + string id, + long min, + bool uppercase, + bool lowercase, + bool number, + bool symbols + ) + { + Id = id; + Min = min; + Uppercase = uppercase; + Lowercase = lowercase; + Number = number; + Symbols = symbols; + } + + public static PolicyPasswordStrength From(Dictionary map) => new PolicyPasswordStrength( + id: map["$id"].ToString(), + min: Convert.ToInt64(map["min"]), + uppercase: (bool)map["uppercase"], + lowercase: (bool)map["lowercase"], + number: (bool)map["number"], + symbols: (bool)map["symbols"] + ); + + public Dictionary ToMap() => new Dictionary() + { + { "$id", Id }, + { "min", Min }, + { "uppercase", Uppercase }, + { "lowercase", Lowercase }, + { "number", Number }, + { "symbols", Symbols } + }; + } +} diff --git a/Appwrite/Models/PresenceList.cs b/Appwrite/Models/PresenceList.cs index e17a36cb..0eea5827 100644 --- a/Appwrite/Models/PresenceList.cs +++ b/Appwrite/Models/PresenceList.cs @@ -28,7 +28,7 @@ List presences public static PresenceList From(Dictionary map) => new PresenceList( total: Convert.ToInt64(map["total"]), - presences: map["presences"].ConvertToList>().Select(it => Presence.From(map: it)).ToList() + presences: map["presences"].ConvertToList>().Select(it => Appwrite.Models.Presence.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Project.cs b/Appwrite/Models/Project.cs index c106bb0e..54354db1 100644 --- a/Appwrite/Models/Project.cs +++ b/Appwrite/Models/Project.cs @@ -26,6 +26,9 @@ public class Project [JsonPropertyName("teamId")] public string TeamId { get; private set; } + [JsonPropertyName("region")] + public string Region { get; private set; } + [JsonPropertyName("devKeys")] public List DevKeys { get; private set; } @@ -80,24 +83,49 @@ public class Project [JsonPropertyName("protocols")] public List Protocols { get; private set; } - [JsonPropertyName("region")] - public string Region { get; private set; } - - [JsonPropertyName("billingLimits")] - public BillingLimits? BillingLimits { get; private set; } - [JsonPropertyName("blocks")] public List Blocks { get; private set; } [JsonPropertyName("consoleAccessedAt")] public string ConsoleAccessedAt { get; private set; } + [JsonPropertyName("billingLimits")] + public BillingLimits? BillingLimits { get; private set; } + + [JsonPropertyName("oAuth2ServerEnabled")] + public bool OAuth2ServerEnabled { get; private set; } + + [JsonPropertyName("oAuth2ServerAuthorizationUrl")] + public string OAuth2ServerAuthorizationUrl { get; private set; } + + [JsonPropertyName("oAuth2ServerScopes")] + public List OAuth2ServerScopes { get; private set; } + + [JsonPropertyName("oAuth2ServerAccessTokenDuration")] + public long OAuth2ServerAccessTokenDuration { get; private set; } + + [JsonPropertyName("oAuth2ServerRefreshTokenDuration")] + public long OAuth2ServerRefreshTokenDuration { get; private set; } + + [JsonPropertyName("oAuth2ServerPublicAccessTokenDuration")] + public long OAuth2ServerPublicAccessTokenDuration { get; private set; } + + [JsonPropertyName("oAuth2ServerPublicRefreshTokenDuration")] + public long OAuth2ServerPublicRefreshTokenDuration { get; private set; } + + [JsonPropertyName("oAuth2ServerConfidentialPkce")] + public bool OAuth2ServerConfidentialPkce { get; private set; } + + [JsonPropertyName("oAuth2ServerDiscoveryUrl")] + public string OAuth2ServerDiscoveryUrl { get; private set; } + public Project( string id, string createdAt, string updatedAt, string name, string teamId, + string region, List devKeys, bool smtpEnabled, string smtpSenderName, @@ -116,10 +144,18 @@ public Project( List authMethods, List services, List protocols, - string region, - BillingLimits? billingLimits, List blocks, - string consoleAccessedAt + string consoleAccessedAt, + BillingLimits? billingLimits, + bool oAuth2ServerEnabled, + string oAuth2ServerAuthorizationUrl, + List oAuth2ServerScopes, + long oAuth2ServerAccessTokenDuration, + long oAuth2ServerRefreshTokenDuration, + long oAuth2ServerPublicAccessTokenDuration, + long oAuth2ServerPublicRefreshTokenDuration, + bool oAuth2ServerConfidentialPkce, + string oAuth2ServerDiscoveryUrl ) { Id = id; @@ -127,6 +163,7 @@ string consoleAccessedAt UpdatedAt = updatedAt; Name = name; TeamId = teamId; + Region = region; DevKeys = devKeys; SmtpEnabled = smtpEnabled; SmtpSenderName = smtpSenderName; @@ -145,10 +182,18 @@ string consoleAccessedAt AuthMethods = authMethods; Services = services; Protocols = protocols; - Region = region; - BillingLimits = billingLimits; Blocks = blocks; ConsoleAccessedAt = consoleAccessedAt; + BillingLimits = billingLimits; + OAuth2ServerEnabled = oAuth2ServerEnabled; + OAuth2ServerAuthorizationUrl = oAuth2ServerAuthorizationUrl; + OAuth2ServerScopes = oAuth2ServerScopes; + OAuth2ServerAccessTokenDuration = oAuth2ServerAccessTokenDuration; + OAuth2ServerRefreshTokenDuration = oAuth2ServerRefreshTokenDuration; + OAuth2ServerPublicAccessTokenDuration = oAuth2ServerPublicAccessTokenDuration; + OAuth2ServerPublicRefreshTokenDuration = oAuth2ServerPublicRefreshTokenDuration; + OAuth2ServerConfidentialPkce = oAuth2ServerConfidentialPkce; + OAuth2ServerDiscoveryUrl = oAuth2ServerDiscoveryUrl; } public static Project From(Dictionary map) => new Project( @@ -157,7 +202,8 @@ string consoleAccessedAt updatedAt: map["$updatedAt"].ToString(), name: map["name"].ToString(), teamId: map["teamId"].ToString(), - devKeys: map["devKeys"].ConvertToList>().Select(it => DevKey.From(map: it)).ToList(), + region: map["region"].ToString(), + devKeys: map["devKeys"].ConvertToList>().Select(it => Appwrite.Models.DevKey.From(map: it)).ToList(), smtpEnabled: (bool)map["smtpEnabled"], smtpSenderName: map["smtpSenderName"].ToString(), smtpSenderEmail: map["smtpSenderEmail"].ToString(), @@ -172,13 +218,23 @@ string consoleAccessedAt pingedAt: map["pingedAt"].ToString(), labels: map["labels"].ConvertToList(), status: map["status"].ToString(), - authMethods: map["authMethods"].ConvertToList>().Select(it => ProjectAuthMethod.From(map: it)).ToList(), - services: map["services"].ConvertToList>().Select(it => ProjectService.From(map: it)).ToList(), - protocols: map["protocols"].ConvertToList>().Select(it => ProjectProtocol.From(map: it)).ToList(), - region: map["region"].ToString(), - billingLimits: BillingLimits.From(map: map["billingLimits"] is JsonElement jsonObj25 ? jsonObj25.Deserialize>()! : (Dictionary)map["billingLimits"]), - blocks: map["blocks"].ConvertToList>().Select(it => Block.From(map: it)).ToList(), - consoleAccessedAt: map["consoleAccessedAt"].ToString() + authMethods: map["authMethods"].ConvertToList>().Select(it => Appwrite.Models.ProjectAuthMethod.From(map: it)).ToList(), + services: map["services"].ConvertToList>().Select(it => Appwrite.Models.ProjectService.From(map: it)).ToList(), + protocols: map["protocols"].ConvertToList>().Select(it => Appwrite.Models.ProjectProtocol.From(map: it)).ToList(), + blocks: map["blocks"].ConvertToList>().Select(it => Appwrite.Models.Block.From(map: it)).ToList(), + consoleAccessedAt: map["consoleAccessedAt"].ToString(), + billingLimits: map.TryGetValue("billingLimits", out var objectRaw27) && objectRaw27 != null + ? Appwrite.Models.BillingLimits.From(map: objectRaw27 is JsonElement jsonObj27 ? jsonObj27.Deserialize>()! : (Dictionary)objectRaw27) + : null, + oAuth2ServerEnabled: (bool)map["oAuth2ServerEnabled"], + oAuth2ServerAuthorizationUrl: map["oAuth2ServerAuthorizationUrl"].ToString(), + oAuth2ServerScopes: map["oAuth2ServerScopes"].ConvertToList(), + oAuth2ServerAccessTokenDuration: Convert.ToInt64(map["oAuth2ServerAccessTokenDuration"]), + oAuth2ServerRefreshTokenDuration: Convert.ToInt64(map["oAuth2ServerRefreshTokenDuration"]), + oAuth2ServerPublicAccessTokenDuration: Convert.ToInt64(map["oAuth2ServerPublicAccessTokenDuration"]), + oAuth2ServerPublicRefreshTokenDuration: Convert.ToInt64(map["oAuth2ServerPublicRefreshTokenDuration"]), + oAuth2ServerConfidentialPkce: (bool)map["oAuth2ServerConfidentialPkce"], + oAuth2ServerDiscoveryUrl: map["oAuth2ServerDiscoveryUrl"].ToString() ); public Dictionary ToMap() => new Dictionary() @@ -188,6 +244,7 @@ string consoleAccessedAt { "$updatedAt", UpdatedAt }, { "name", Name }, { "teamId", TeamId }, + { "region", Region }, { "devKeys", DevKeys?.Select(it => it.ToMap()).ToList() }, { "smtpEnabled", SmtpEnabled }, { "smtpSenderName", SmtpSenderName }, @@ -206,10 +263,18 @@ string consoleAccessedAt { "authMethods", AuthMethods?.Select(it => it.ToMap()).ToList() }, { "services", Services?.Select(it => it.ToMap()).ToList() }, { "protocols", Protocols?.Select(it => it.ToMap()).ToList() }, - { "region", Region }, - { "billingLimits", BillingLimits?.ToMap() }, { "blocks", Blocks?.Select(it => it.ToMap()).ToList() }, - { "consoleAccessedAt", ConsoleAccessedAt } + { "consoleAccessedAt", ConsoleAccessedAt }, + { "billingLimits", BillingLimits?.ToMap() }, + { "oAuth2ServerEnabled", OAuth2ServerEnabled }, + { "oAuth2ServerAuthorizationUrl", OAuth2ServerAuthorizationUrl }, + { "oAuth2ServerScopes", OAuth2ServerScopes }, + { "oAuth2ServerAccessTokenDuration", OAuth2ServerAccessTokenDuration }, + { "oAuth2ServerRefreshTokenDuration", OAuth2ServerRefreshTokenDuration }, + { "oAuth2ServerPublicAccessTokenDuration", OAuth2ServerPublicAccessTokenDuration }, + { "oAuth2ServerPublicRefreshTokenDuration", OAuth2ServerPublicRefreshTokenDuration }, + { "oAuth2ServerConfidentialPkce", OAuth2ServerConfidentialPkce }, + { "oAuth2ServerDiscoveryUrl", OAuth2ServerDiscoveryUrl } }; } } diff --git a/Appwrite/Models/ProjectList.cs b/Appwrite/Models/ProjectList.cs index d98bcdae..a7af4a1e 100644 --- a/Appwrite/Models/ProjectList.cs +++ b/Appwrite/Models/ProjectList.cs @@ -28,7 +28,7 @@ List projects public static ProjectList From(Dictionary map) => new ProjectList( total: Convert.ToInt64(map["total"]), - projects: map["projects"].ConvertToList>().Select(it => Project.From(map: it)).ToList() + projects: map["projects"].ConvertToList>().Select(it => Appwrite.Models.Project.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Provider.cs b/Appwrite/Models/Provider.cs index 05896ee6..2f4671de 100644 --- a/Appwrite/Models/Provider.cs +++ b/Appwrite/Models/Provider.cs @@ -24,7 +24,7 @@ public class Provider public string Name { get; private set; } [JsonPropertyName("provider")] - public string MessagingProvider { get; private set; } + public string XProvider { get; private set; } [JsonPropertyName("enabled")] public bool Enabled { get; private set; } @@ -54,7 +54,7 @@ public Provider( CreatedAt = createdAt; UpdatedAt = updatedAt; Name = name; - MessagingProvider = provider; + XProvider = provider; Enabled = enabled; Type = type; Credentials = credentials; @@ -79,7 +79,7 @@ public Provider( { "$createdAt", CreatedAt }, { "$updatedAt", UpdatedAt }, { "name", Name }, - { "provider", MessagingProvider }, + { "provider", XProvider }, { "enabled", Enabled }, { "type", Type }, { "credentials", Credentials }, diff --git a/Appwrite/Models/ProviderList.cs b/Appwrite/Models/ProviderList.cs index 4e1fc825..82692000 100644 --- a/Appwrite/Models/ProviderList.cs +++ b/Appwrite/Models/ProviderList.cs @@ -28,7 +28,7 @@ List providers public static ProviderList From(Dictionary map) => new ProviderList( total: Convert.ToInt64(map["total"]), - providers: map["providers"].ConvertToList>().Select(it => Provider.From(map: it)).ToList() + providers: map["providers"].ConvertToList>().Select(it => Appwrite.Models.Provider.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ProxyRuleList.cs b/Appwrite/Models/ProxyRuleList.cs index 47c13270..3a828399 100644 --- a/Appwrite/Models/ProxyRuleList.cs +++ b/Appwrite/Models/ProxyRuleList.cs @@ -28,7 +28,7 @@ List rules public static ProxyRuleList From(Dictionary map) => new ProxyRuleList( total: Convert.ToInt64(map["total"]), - rules: map["rules"].ConvertToList>().Select(it => ProxyRule.From(map: it)).ToList() + rules: map["rules"].ConvertToList>().Select(it => Appwrite.Models.ProxyRule.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Report.cs b/Appwrite/Models/Report.cs index f22bbacc..d08b0c7c 100644 --- a/Appwrite/Models/Report.cs +++ b/Appwrite/Models/Report.cs @@ -87,7 +87,7 @@ public Report( targetType: map["targetType"].ToString(), target: map["target"].ToString(), categories: map["categories"].ConvertToList(), - insights: map["insights"].ConvertToList>().Select(it => Insight.From(map: it)).ToList(), + insights: map["insights"].ConvertToList>().Select(it => Appwrite.Models.Insight.From(map: it)).ToList(), analyzedAt: map.TryGetValue("analyzedAt", out var analyzedAt) ? analyzedAt?.ToString() : null ); diff --git a/Appwrite/Models/ReportList.cs b/Appwrite/Models/ReportList.cs index 9b84c9d5..5815d359 100644 --- a/Appwrite/Models/ReportList.cs +++ b/Appwrite/Models/ReportList.cs @@ -28,7 +28,7 @@ List reports public static ReportList From(Dictionary map) => new ReportList( total: Convert.ToInt64(map["total"]), - reports: map["reports"].ConvertToList>().Select(it => Report.From(map: it)).ToList() + reports: map["reports"].ConvertToList>().Select(it => Appwrite.Models.Report.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/ResourceTokenList.cs b/Appwrite/Models/ResourceTokenList.cs index faa3057f..c3df017c 100644 --- a/Appwrite/Models/ResourceTokenList.cs +++ b/Appwrite/Models/ResourceTokenList.cs @@ -28,7 +28,7 @@ List tokens public static ResourceTokenList From(Dictionary map) => new ResourceTokenList( total: Convert.ToInt64(map["total"]), - tokens: map["tokens"].ConvertToList>().Select(it => ResourceToken.From(map: it)).ToList() + tokens: map["tokens"].ConvertToList>().Select(it => Appwrite.Models.ResourceToken.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/RowList.cs b/Appwrite/Models/RowList.cs index c4a66e90..40d9e5dd 100644 --- a/Appwrite/Models/RowList.cs +++ b/Appwrite/Models/RowList.cs @@ -28,7 +28,7 @@ List rows public static RowList From(Dictionary map) => new RowList( total: Convert.ToInt64(map["total"]), - rows: map["rows"].ConvertToList>().Select(it => Row.From(map: it)).ToList() + rows: map["rows"].ConvertToList>().Select(it => Appwrite.Models.Row.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Runtime.cs b/Appwrite/Models/Runtime.cs index 346e624d..d1f5617e 100644 --- a/Appwrite/Models/Runtime.cs +++ b/Appwrite/Models/Runtime.cs @@ -40,7 +40,7 @@ public Runtime( string key, string name, string version, - string xbase, + string @base, string image, string logo, List supports @@ -50,7 +50,7 @@ List supports Key = key; Name = name; Version = version; - Base = xbase; + Base = @base; Image = image; Logo = logo; Supports = supports; @@ -61,7 +61,7 @@ List supports key: map["key"].ToString(), name: map["name"].ToString(), version: map["version"].ToString(), - xbase: map["base"].ToString(), + @base: map["base"].ToString(), image: map["image"].ToString(), logo: map["logo"].ToString(), supports: map["supports"].ConvertToList() diff --git a/Appwrite/Models/RuntimeList.cs b/Appwrite/Models/RuntimeList.cs index 9248086c..afee94f6 100644 --- a/Appwrite/Models/RuntimeList.cs +++ b/Appwrite/Models/RuntimeList.cs @@ -28,7 +28,7 @@ List runtimes public static RuntimeList From(Dictionary map) => new RuntimeList( total: Convert.ToInt64(map["total"]), - runtimes: map["runtimes"].ConvertToList>().Select(it => Runtime.From(map: it)).ToList() + runtimes: map["runtimes"].ConvertToList>().Select(it => Appwrite.Models.Runtime.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/SessionList.cs b/Appwrite/Models/SessionList.cs index 6978e0e3..24cd303d 100644 --- a/Appwrite/Models/SessionList.cs +++ b/Appwrite/Models/SessionList.cs @@ -28,7 +28,7 @@ List sessions public static SessionList From(Dictionary map) => new SessionList( total: Convert.ToInt64(map["total"]), - sessions: map["sessions"].ConvertToList>().Select(it => Session.From(map: it)).ToList() + sessions: map["sessions"].ConvertToList>().Select(it => Appwrite.Models.Session.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Site.cs b/Appwrite/Models/Site.cs index 53d59737..1d1a70c4 100644 --- a/Appwrite/Models/Site.cs +++ b/Appwrite/Models/Site.cs @@ -203,7 +203,7 @@ string fallbackFile latestDeploymentId: map["latestDeploymentId"].ToString(), latestDeploymentCreatedAt: map["latestDeploymentCreatedAt"].ToString(), latestDeploymentStatus: map["latestDeploymentStatus"].ToString(), - vars: map["vars"].ConvertToList>().Select(it => Variable.From(map: it)).ToList(), + vars: map["vars"].ConvertToList>().Select(it => Appwrite.Models.Variable.From(map: it)).ToList(), timeout: Convert.ToInt64(map["timeout"]), installCommand: map["installCommand"].ToString(), buildCommand: map["buildCommand"].ToString(), diff --git a/Appwrite/Models/SiteList.cs b/Appwrite/Models/SiteList.cs index 7e42b9b9..87edfc43 100644 --- a/Appwrite/Models/SiteList.cs +++ b/Appwrite/Models/SiteList.cs @@ -28,7 +28,7 @@ List sites public static SiteList From(Dictionary map) => new SiteList( total: Convert.ToInt64(map["total"]), - sites: map["sites"].ConvertToList>().Select(it => Site.From(map: it)).ToList() + sites: map["sites"].ConvertToList>().Select(it => Appwrite.Models.Site.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/SpecificationList.cs b/Appwrite/Models/SpecificationList.cs index 8f2f4f1c..de2cf105 100644 --- a/Appwrite/Models/SpecificationList.cs +++ b/Appwrite/Models/SpecificationList.cs @@ -28,7 +28,7 @@ List specifications public static SpecificationList From(Dictionary map) => new SpecificationList( total: Convert.ToInt64(map["total"]), - specifications: map["specifications"].ConvertToList>().Select(it => Specification.From(map: it)).ToList() + specifications: map["specifications"].ConvertToList>().Select(it => Appwrite.Models.Specification.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Subscriber.cs b/Appwrite/Models/Subscriber.cs index 05893f5e..c148c477 100644 --- a/Appwrite/Models/Subscriber.cs +++ b/Appwrite/Models/Subscriber.cs @@ -66,7 +66,7 @@ string providerType createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), targetId: map["targetId"].ToString(), - target: Target.From(map: map["target"] is JsonElement jsonObj5 ? jsonObj5.Deserialize>()! : (Dictionary)map["target"]), + target: Appwrite.Models.Target.From(map: map["target"] is JsonElement jsonObj5 ? jsonObj5.Deserialize>()! : (Dictionary)map["target"]), userId: map["userId"].ToString(), userName: map["userName"].ToString(), topicId: map["topicId"].ToString(), diff --git a/Appwrite/Models/SubscriberList.cs b/Appwrite/Models/SubscriberList.cs index 9dc04dac..08174a95 100644 --- a/Appwrite/Models/SubscriberList.cs +++ b/Appwrite/Models/SubscriberList.cs @@ -28,7 +28,7 @@ List subscribers public static SubscriberList From(Dictionary map) => new SubscriberList( total: Convert.ToInt64(map["total"]), - subscribers: map["subscribers"].ConvertToList>().Select(it => Subscriber.From(map: it)).ToList() + subscribers: map["subscribers"].ConvertToList>().Select(it => Appwrite.Models.Subscriber.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Table.cs b/Appwrite/Models/Table.cs index 2102bd26..915b914f 100644 --- a/Appwrite/Models/Table.cs +++ b/Appwrite/Models/Table.cs @@ -86,7 +86,7 @@ long bytesUsed enabled: (bool)map["enabled"], rowSecurity: (bool)map["rowSecurity"], columns: map["columns"].ConvertToList(), - indexes: map["indexes"].ConvertToList>().Select(it => ColumnIndex.From(map: it)).ToList(), + indexes: map["indexes"].ConvertToList>().Select(it => Appwrite.Models.ColumnIndex.From(map: it)).ToList(), bytesMax: Convert.ToInt64(map["bytesMax"]), bytesUsed: Convert.ToInt64(map["bytesUsed"]) ); diff --git a/Appwrite/Models/TableList.cs b/Appwrite/Models/TableList.cs index 1b75900c..88475ca1 100644 --- a/Appwrite/Models/TableList.cs +++ b/Appwrite/Models/TableList.cs @@ -28,7 +28,7 @@ List tables public static TableList From(Dictionary map) => new TableList( total: Convert.ToInt64(map["total"]), - tables: map["tables"].ConvertToList>().Select(it => Table.From(map: it)).ToList() + tables: map["tables"].ConvertToList>().Select(it => Appwrite.Models.Table.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/TargetList.cs b/Appwrite/Models/TargetList.cs index b4d6ea15..010c502b 100644 --- a/Appwrite/Models/TargetList.cs +++ b/Appwrite/Models/TargetList.cs @@ -28,7 +28,7 @@ List targets public static TargetList From(Dictionary map) => new TargetList( total: Convert.ToInt64(map["total"]), - targets: map["targets"].ConvertToList>().Select(it => Target.From(map: it)).ToList() + targets: map["targets"].ConvertToList>().Select(it => Appwrite.Models.Target.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Team.cs b/Appwrite/Models/Team.cs index 24336007..49fac256 100644 --- a/Appwrite/Models/Team.cs +++ b/Appwrite/Models/Team.cs @@ -52,7 +52,7 @@ Preferences prefs updatedAt: map["$updatedAt"].ToString(), name: map["name"].ToString(), total: Convert.ToInt64(map["total"]), - prefs: Preferences.From(map: map["prefs"] is JsonElement jsonObj6 ? jsonObj6.Deserialize>()! : (Dictionary)map["prefs"]) + prefs: Appwrite.Models.Preferences.From(map: map["prefs"] is JsonElement jsonObj6 ? jsonObj6.Deserialize>()! : (Dictionary)map["prefs"]) ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/TeamList.cs b/Appwrite/Models/TeamList.cs index 6340b4c2..dec7c3c7 100644 --- a/Appwrite/Models/TeamList.cs +++ b/Appwrite/Models/TeamList.cs @@ -28,7 +28,7 @@ List teams public static TeamList From(Dictionary map) => new TeamList( total: Convert.ToInt64(map["total"]), - teams: map["teams"].ConvertToList>().Select(it => Team.From(map: it)).ToList() + teams: map["teams"].ConvertToList>().Select(it => Appwrite.Models.Team.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/TopicList.cs b/Appwrite/Models/TopicList.cs index 1899a24f..607c7807 100644 --- a/Appwrite/Models/TopicList.cs +++ b/Appwrite/Models/TopicList.cs @@ -28,7 +28,7 @@ List topics public static TopicList From(Dictionary map) => new TopicList( total: Convert.ToInt64(map["total"]), - topics: map["topics"].ConvertToList>().Select(it => Topic.From(map: it)).ToList() + topics: map["topics"].ConvertToList>().Select(it => Appwrite.Models.Topic.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/TransactionList.cs b/Appwrite/Models/TransactionList.cs index 259810d0..9c1df55a 100644 --- a/Appwrite/Models/TransactionList.cs +++ b/Appwrite/Models/TransactionList.cs @@ -28,7 +28,7 @@ List transactions public static TransactionList From(Dictionary map) => new TransactionList( total: Convert.ToInt64(map["total"]), - transactions: map["transactions"].ConvertToList>().Select(it => Transaction.From(map: it)).ToList() + transactions: map["transactions"].ConvertToList>().Select(it => Appwrite.Models.Transaction.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/UsageEvent.cs b/Appwrite/Models/UsageEvent.cs index 4a86884f..2d881278 100644 --- a/Appwrite/Models/UsageEvent.cs +++ b/Appwrite/Models/UsageEvent.cs @@ -43,9 +43,9 @@ public class UsageEvent public UsageEvent( string metric, - long xvalue, + long @value, string time, - string xpath, + string @path, string method, string status, string resourceType, @@ -55,9 +55,9 @@ string userAgent ) { Metric = metric; - Value = xvalue; + Value = @value; Time = time; - Path = xpath; + Path = @path; Method = method; Status = status; ResourceType = resourceType; @@ -68,9 +68,9 @@ string userAgent public static UsageEvent From(Dictionary map) => new UsageEvent( metric: map["metric"].ToString(), - xvalue: Convert.ToInt64(map["value"]), + @value: Convert.ToInt64(map["value"]), time: map["time"].ToString(), - xpath: map["path"].ToString(), + @path: map["path"].ToString(), method: map["method"].ToString(), status: map["status"].ToString(), resourceType: map["resourceType"].ToString(), diff --git a/Appwrite/Models/UsageEventList.cs b/Appwrite/Models/UsageEventList.cs index fe49e548..d2439cf0 100644 --- a/Appwrite/Models/UsageEventList.cs +++ b/Appwrite/Models/UsageEventList.cs @@ -28,7 +28,7 @@ List events public static UsageEventList From(Dictionary map) => new UsageEventList( total: Convert.ToInt64(map["total"]), - events: map["events"].ConvertToList>().Select(it => UsageEvent.From(map: it)).ToList() + events: map["events"].ConvertToList>().Select(it => Appwrite.Models.UsageEvent.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/UsageGauge.cs b/Appwrite/Models/UsageGauge.cs index c81e6e21..3bd12d75 100644 --- a/Appwrite/Models/UsageGauge.cs +++ b/Appwrite/Models/UsageGauge.cs @@ -28,14 +28,14 @@ public class UsageGauge public UsageGauge( string metric, - long xvalue, + long @value, string time, string resourceType, string resourceId ) { Metric = metric; - Value = xvalue; + Value = @value; Time = time; ResourceType = resourceType; ResourceId = resourceId; @@ -43,7 +43,7 @@ string resourceId public static UsageGauge From(Dictionary map) => new UsageGauge( metric: map["metric"].ToString(), - xvalue: Convert.ToInt64(map["value"]), + @value: Convert.ToInt64(map["value"]), time: map["time"].ToString(), resourceType: map["resourceType"].ToString(), resourceId: map["resourceId"].ToString() diff --git a/Appwrite/Models/UsageGaugeList.cs b/Appwrite/Models/UsageGaugeList.cs index 55292ca5..206ed720 100644 --- a/Appwrite/Models/UsageGaugeList.cs +++ b/Appwrite/Models/UsageGaugeList.cs @@ -28,7 +28,7 @@ List gauges public static UsageGaugeList From(Dictionary map) => new UsageGaugeList( total: Convert.ToInt64(map["total"]), - gauges: map["gauges"].ConvertToList>().Select(it => UsageGauge.From(map: it)).ToList() + gauges: map["gauges"].ConvertToList>().Select(it => Appwrite.Models.UsageGauge.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/User.cs b/Appwrite/Models/User.cs index 76312574..5276bdc4 100644 --- a/Appwrite/Models/User.cs +++ b/Appwrite/Models/User.cs @@ -138,10 +138,12 @@ public User( emailVerification: (bool)map["emailVerification"], phoneVerification: (bool)map["phoneVerification"], mfa: (bool)map["mfa"], - prefs: Preferences.From(map: map["prefs"] is JsonElement jsonObj17 ? jsonObj17.Deserialize>()! : (Dictionary)map["prefs"]), - targets: map["targets"].ConvertToList>().Select(it => Target.From(map: it)).ToList(), + prefs: Appwrite.Models.Preferences.From(map: map["prefs"] is JsonElement jsonObj17 ? jsonObj17.Deserialize>()! : (Dictionary)map["prefs"]), + targets: map["targets"].ConvertToList>().Select(it => Appwrite.Models.Target.From(map: it)).ToList(), accessedAt: map["accessedAt"].ToString(), - impersonator: (bool?)map["impersonator"], + impersonator: map.TryGetValue("impersonator", out var boolRaw20) && boolRaw20 != null + ? (bool?)boolRaw20 + : null, impersonatorUserId: map.TryGetValue("impersonatorUserId", out var impersonatorUserId) ? impersonatorUserId?.ToString() : null ); diff --git a/Appwrite/Models/UserList.cs b/Appwrite/Models/UserList.cs index cba21971..8b5683f5 100644 --- a/Appwrite/Models/UserList.cs +++ b/Appwrite/Models/UserList.cs @@ -28,7 +28,7 @@ List users public static UserList From(Dictionary map) => new UserList( total: Convert.ToInt64(map["total"]), - users: map["users"].ConvertToList>().Select(it => User.From(map: it)).ToList() + users: map["users"].ConvertToList>().Select(it => Appwrite.Models.User.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/Variable.cs b/Appwrite/Models/Variable.cs index 3175f599..edcb5c90 100644 --- a/Appwrite/Models/Variable.cs +++ b/Appwrite/Models/Variable.cs @@ -40,7 +40,7 @@ public Variable( string createdAt, string updatedAt, string key, - string xvalue, + string @value, bool secret, string resourceType, string resourceId @@ -50,7 +50,7 @@ string resourceId CreatedAt = createdAt; UpdatedAt = updatedAt; Key = key; - Value = xvalue; + Value = @value; Secret = secret; ResourceType = resourceType; ResourceId = resourceId; @@ -61,7 +61,7 @@ string resourceId createdAt: map["$createdAt"].ToString(), updatedAt: map["$updatedAt"].ToString(), key: map["key"].ToString(), - xvalue: map["value"].ToString(), + @value: map["value"].ToString(), secret: (bool)map["secret"], resourceType: map["resourceType"].ToString(), resourceId: map["resourceId"].ToString() diff --git a/Appwrite/Models/VariableList.cs b/Appwrite/Models/VariableList.cs index 0fb00428..ea107dad 100644 --- a/Appwrite/Models/VariableList.cs +++ b/Appwrite/Models/VariableList.cs @@ -28,7 +28,7 @@ List variables public static VariableList From(Dictionary map) => new VariableList( total: Convert.ToInt64(map["total"]), - variables: map["variables"].ConvertToList>().Select(it => Variable.From(map: it)).ToList() + variables: map["variables"].ConvertToList>().Select(it => Appwrite.Models.Variable.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Models/WebhookList.cs b/Appwrite/Models/WebhookList.cs index 71a7b4fb..ece56990 100644 --- a/Appwrite/Models/WebhookList.cs +++ b/Appwrite/Models/WebhookList.cs @@ -28,7 +28,7 @@ List webhooks public static WebhookList From(Dictionary map) => new WebhookList( total: Convert.ToInt64(map["total"]), - webhooks: map["webhooks"].ConvertToList>().Select(it => Webhook.From(map: it)).ToList() + webhooks: map["webhooks"].ConvertToList>().Select(it => Appwrite.Models.Webhook.From(map: it)).ToList() ); public Dictionary ToMap() => new Dictionary() diff --git a/Appwrite/Services/Account.cs b/Appwrite/Services/Account.cs index b2f0b91a..338429fd 100644 --- a/Appwrite/Services/Account.cs +++ b/Appwrite/Services/Account.cs @@ -27,6 +27,7 @@ public Account(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -68,6 +69,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -109,6 +111,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -143,6 +146,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -175,6 +179,7 @@ public Task DeleteIdentity(string identityId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -207,6 +212,7 @@ public Task DeleteIdentity(string identityId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -242,6 +248,7 @@ static Models.JWT Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -274,6 +281,7 @@ static Models.LogList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -311,6 +319,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -347,6 +356,7 @@ static Models.MfaType Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -384,6 +394,7 @@ static Models.MfaType Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -420,6 +431,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -454,6 +466,7 @@ public Task DeleteMfaAuthenticator(Appwrite.Enums.AuthenticatorType type var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -482,6 +495,7 @@ public Task DeleteMFAAuthenticator(Appwrite.Enums.AuthenticatorType type var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -513,6 +527,7 @@ public Task DeleteMFAAuthenticator(Appwrite.Enums.AuthenticatorType type var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -548,6 +563,7 @@ static Models.MfaChallenge Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -587,6 +603,7 @@ static Models.MfaChallenge Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -625,6 +642,7 @@ static Models.Session Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -658,6 +676,7 @@ static Models.Session Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -689,6 +708,7 @@ static Models.MfaFactors Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -724,6 +744,7 @@ static Models.MfaFactors Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -758,6 +779,7 @@ static Models.MfaRecoveryCodes Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -794,6 +816,7 @@ static Models.MfaRecoveryCodes Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -830,6 +853,7 @@ static Models.MfaRecoveryCodes Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -866,6 +890,7 @@ static Models.MfaRecoveryCodes Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -901,6 +926,7 @@ static Models.MfaRecoveryCodes Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -934,6 +960,7 @@ static Models.MfaRecoveryCodes Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -970,6 +997,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1008,6 +1036,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1040,6 +1069,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -1074,6 +1104,7 @@ static Models.Preferences Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1115,6 +1146,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1159,6 +1191,7 @@ static Models.Token Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1192,6 +1225,7 @@ static Models.Token Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -1224,6 +1258,7 @@ public Task DeleteSessions() var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1257,6 +1292,7 @@ public Task DeleteSessions() var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1296,6 +1332,7 @@ static Models.Session Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1333,6 +1370,7 @@ static Models.Session Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1370,6 +1408,7 @@ static Models.Session Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1406,6 +1445,7 @@ static Models.Session Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1440,6 +1480,7 @@ static Models.Session Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -1474,6 +1515,7 @@ static Models.Session Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1511,6 +1553,7 @@ public Task DeleteSession(string sessionId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1540,6 +1583,7 @@ public Task DeleteSession(string sessionId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1588,6 +1632,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1637,6 +1682,7 @@ static Models.Token Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1686,6 +1732,7 @@ public Task CreateOAuth2Token(Appwrite.Enums.OAuthProvider provider, str var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -1723,6 +1770,7 @@ public Task CreateOAuth2Token(Appwrite.Enums.OAuthProvider provider, str var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1770,6 +1818,7 @@ static Models.Token Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1818,6 +1867,7 @@ static Models.Token Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1855,6 +1905,7 @@ static Models.Token Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1893,6 +1944,7 @@ static Models.Token Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1932,6 +1984,7 @@ static Models.Token Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1969,6 +2022,7 @@ static Models.Token Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; diff --git a/Appwrite/Services/Activities.cs b/Appwrite/Services/Activities.cs index ac259afa..58f62df8 100644 --- a/Appwrite/Services/Activities.cs +++ b/Appwrite/Services/Activities.cs @@ -28,6 +28,7 @@ public Activities(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -61,6 +62,7 @@ static Models.ActivityEventList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; diff --git a/Appwrite/Services/Advisor.cs b/Appwrite/Services/Advisor.cs index ae97ea66..847dc0d1 100644 --- a/Appwrite/Services/Advisor.cs +++ b/Appwrite/Services/Advisor.cs @@ -31,6 +31,7 @@ public Advisor(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -65,6 +66,7 @@ static Models.ReportList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -99,6 +101,7 @@ public Task DeleteReport(string reportId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -131,6 +134,7 @@ public Task DeleteReport(string reportId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -165,6 +169,7 @@ static Models.InsightList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; diff --git a/Appwrite/Services/Avatars.cs b/Appwrite/Services/Avatars.cs index 027313d2..60f46d16 100644 --- a/Appwrite/Services/Avatars.cs +++ b/Appwrite/Services/Avatars.cs @@ -40,6 +40,7 @@ public Task GetBrowser(Appwrite.Enums.Browser code, long? width = null, var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -78,6 +79,7 @@ public Task GetCreditCard(Appwrite.Enums.CreditCard code, long? width = var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -108,6 +110,7 @@ public Task GetFavicon(string url) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -147,6 +150,7 @@ public Task GetFlag(Appwrite.Enums.Flag code, long? width = null, long? var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -186,6 +190,7 @@ public Task GetImage(string url, long? width = null, long? height = null var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -231,6 +236,7 @@ public Task GetInitials(string? name = null, long? width = null, long? h var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -263,6 +269,7 @@ public Task GetQR(string text, long? size = null, long? margin = null, b var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -318,6 +325,7 @@ public Task GetScreenshot(string url, object? headers = null, long? view var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; diff --git a/Appwrite/Services/Backups.cs b/Appwrite/Services/Backups.cs index e8a6f682..180d5c4d 100644 --- a/Appwrite/Services/Backups.cs +++ b/Appwrite/Services/Backups.cs @@ -28,6 +28,7 @@ public Backups(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -61,6 +62,7 @@ static Models.BackupArchiveList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -94,6 +96,7 @@ static Models.BackupArchive Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -126,6 +129,7 @@ public Task DeleteArchive(string archiveId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -154,6 +158,7 @@ public Task DeleteArchive(string archiveId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -192,6 +197,7 @@ static Models.BackupPolicyList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -225,6 +231,7 @@ static Models.BackupPolicy Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -261,6 +268,7 @@ static Models.BackupPolicy Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -294,6 +302,7 @@ public Task DeletePolicy(string policyId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -325,6 +334,7 @@ public Task DeletePolicy(string policyId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -358,6 +368,7 @@ static Models.BackupRestoration Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -390,6 +401,7 @@ static Models.BackupRestorationList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; diff --git a/Appwrite/Services/Databases.cs b/Appwrite/Services/Databases.cs index af59c832..5af68af2 100644 --- a/Appwrite/Services/Databases.cs +++ b/Appwrite/Services/Databases.cs @@ -32,6 +32,7 @@ public Databases(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -68,6 +69,7 @@ static Models.DatabaseList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -101,6 +103,7 @@ static Models.Database Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -133,6 +136,7 @@ static Models.TransactionList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -166,6 +170,7 @@ static Models.Transaction Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -200,6 +205,7 @@ static Models.Transaction Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -233,6 +239,7 @@ public Task DeleteTransaction(string transactionId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -262,6 +269,7 @@ public Task DeleteTransaction(string transactionId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -297,6 +305,7 @@ static Models.Transaction Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -332,6 +341,7 @@ static Models.Database Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -367,6 +377,7 @@ public Task Delete(string databaseId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -400,6 +411,7 @@ public Task Delete(string databaseId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -443,6 +455,7 @@ static Models.CollectionList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -479,6 +492,7 @@ static Models.Collection Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -518,6 +532,7 @@ static Models.Collection Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -554,6 +569,7 @@ public Task DeleteCollection(string databaseId, string collectionId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -586,6 +602,7 @@ public Task DeleteCollection(string databaseId, string collectionId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -610,7 +627,7 @@ static Models.AttributeList Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.createBigIntColumn` instead.")] - public Task CreateBigIntAttribute(string databaseId, string collectionId, string key, bool required, long? min = null, long? max = null, long? xdefault = null, bool? array = null) + public Task CreateBigIntAttribute(string databaseId, string collectionId, string key, bool required, long? min = null, long? max = null, long? @default = null, bool? array = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/bigint" .Replace("{databaseId}", databaseId) @@ -622,12 +639,13 @@ static Models.AttributeList Convert(Dictionary it) { "required", required }, { "min", min }, { "max", max }, - { "default", xdefault }, + { "default", @default }, { "array", array } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -653,7 +671,7 @@ static Models.AttributeBigint Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.updateBigIntColumn` instead.")] - public Task UpdateBigIntAttribute(string databaseId, string collectionId, string key, bool required, long xdefault, long? min = null, long? max = null, string? newKey = null) + public Task UpdateBigIntAttribute(string databaseId, string collectionId, string key, bool required, long @default, long? min = null, long? max = null, string? newKey = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/bigint/{key}" .Replace("{databaseId}", databaseId) @@ -665,12 +683,13 @@ static Models.AttributeBigint Convert(Dictionary it) { "required", required }, { "min", min }, { "max", max }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -695,7 +714,7 @@ static Models.AttributeBigint Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.createBooleanColumn` instead.")] - public Task CreateBooleanAttribute(string databaseId, string collectionId, string key, bool required, bool? xdefault = null, bool? array = null) + public Task CreateBooleanAttribute(string databaseId, string collectionId, string key, bool required, bool? @default = null, bool? array = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/boolean" .Replace("{databaseId}", databaseId) @@ -705,12 +724,13 @@ static Models.AttributeBigint Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -735,7 +755,7 @@ static Models.AttributeBoolean Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.updateBooleanColumn` instead.")] - public Task UpdateBooleanAttribute(string databaseId, string collectionId, string key, bool required, bool xdefault, string? newKey = null) + public Task UpdateBooleanAttribute(string databaseId, string collectionId, string key, bool required, bool @default, string? newKey = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}" .Replace("{databaseId}", databaseId) @@ -745,12 +765,13 @@ static Models.AttributeBoolean Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -774,7 +795,7 @@ static Models.AttributeBoolean Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.createDatetimeColumn` instead.")] - public Task CreateDatetimeAttribute(string databaseId, string collectionId, string key, bool required, string? xdefault = null, bool? array = null) + public Task CreateDatetimeAttribute(string databaseId, string collectionId, string key, bool required, string? @default = null, bool? array = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/datetime" .Replace("{databaseId}", databaseId) @@ -784,12 +805,13 @@ static Models.AttributeBoolean Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -814,7 +836,7 @@ static Models.AttributeDatetime Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.updateDatetimeColumn` instead.")] - public Task UpdateDatetimeAttribute(string databaseId, string collectionId, string key, bool required, string xdefault, string? newKey = null) + public Task UpdateDatetimeAttribute(string databaseId, string collectionId, string key, bool required, string @default, string? newKey = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}" .Replace("{databaseId}", databaseId) @@ -824,12 +846,13 @@ static Models.AttributeDatetime Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -854,7 +877,7 @@ static Models.AttributeDatetime Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.createEmailColumn` instead.")] - public Task CreateEmailAttribute(string databaseId, string collectionId, string key, bool required, string? xdefault = null, bool? array = null) + public Task CreateEmailAttribute(string databaseId, string collectionId, string key, bool required, string? @default = null, bool? array = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/email" .Replace("{databaseId}", databaseId) @@ -864,12 +887,13 @@ static Models.AttributeDatetime Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -895,7 +919,7 @@ static Models.AttributeEmail Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.updateEmailColumn` instead.")] - public Task UpdateEmailAttribute(string databaseId, string collectionId, string key, bool required, string xdefault, string? newKey = null) + public Task UpdateEmailAttribute(string databaseId, string collectionId, string key, bool required, string @default, string? newKey = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/email/{key}" .Replace("{databaseId}", databaseId) @@ -905,12 +929,13 @@ static Models.AttributeEmail Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -936,7 +961,7 @@ static Models.AttributeEmail Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.createEnumColumn` instead.")] - public Task CreateEnumAttribute(string databaseId, string collectionId, string key, List elements, bool required, string? xdefault = null, bool? array = null) + public Task CreateEnumAttribute(string databaseId, string collectionId, string key, List elements, bool required, string? @default = null, bool? array = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/enum" .Replace("{databaseId}", databaseId) @@ -947,12 +972,13 @@ static Models.AttributeEmail Convert(Dictionary it) { "key", key }, { "elements", elements }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -978,7 +1004,7 @@ static Models.AttributeEnum Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.updateEnumColumn` instead.")] - public Task UpdateEnumAttribute(string databaseId, string collectionId, string key, List elements, bool required, string xdefault, string? newKey = null) + public Task UpdateEnumAttribute(string databaseId, string collectionId, string key, List elements, bool required, string @default, string? newKey = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}" .Replace("{databaseId}", databaseId) @@ -989,12 +1015,13 @@ static Models.AttributeEnum Convert(Dictionary it) { { "elements", elements }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1020,7 +1047,7 @@ static Models.AttributeEnum Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.createFloatColumn` instead.")] - public Task CreateFloatAttribute(string databaseId, string collectionId, string key, bool required, double? min = null, double? max = null, double? xdefault = null, bool? array = null) + public Task CreateFloatAttribute(string databaseId, string collectionId, string key, bool required, double? min = null, double? max = null, double? @default = null, bool? array = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/float" .Replace("{databaseId}", databaseId) @@ -1032,12 +1059,13 @@ static Models.AttributeEnum Convert(Dictionary it) { "required", required }, { "min", min }, { "max", max }, - { "default", xdefault }, + { "default", @default }, { "array", array } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1063,7 +1091,7 @@ static Models.AttributeFloat Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.updateFloatColumn` instead.")] - public Task UpdateFloatAttribute(string databaseId, string collectionId, string key, bool required, double xdefault, double? min = null, double? max = null, string? newKey = null) + public Task UpdateFloatAttribute(string databaseId, string collectionId, string key, bool required, double @default, double? min = null, double? max = null, string? newKey = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}" .Replace("{databaseId}", databaseId) @@ -1075,12 +1103,13 @@ static Models.AttributeFloat Convert(Dictionary it) { "required", required }, { "min", min }, { "max", max }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1106,7 +1135,7 @@ static Models.AttributeFloat Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.createIntegerColumn` instead.")] - public Task CreateIntegerAttribute(string databaseId, string collectionId, string key, bool required, long? min = null, long? max = null, long? xdefault = null, bool? array = null) + public Task CreateIntegerAttribute(string databaseId, string collectionId, string key, bool required, long? min = null, long? max = null, long? @default = null, bool? array = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/integer" .Replace("{databaseId}", databaseId) @@ -1118,12 +1147,13 @@ static Models.AttributeFloat Convert(Dictionary it) { "required", required }, { "min", min }, { "max", max }, - { "default", xdefault }, + { "default", @default }, { "array", array } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1149,7 +1179,7 @@ static Models.AttributeInteger Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.updateIntegerColumn` instead.")] - public Task UpdateIntegerAttribute(string databaseId, string collectionId, string key, bool required, long xdefault, long? min = null, long? max = null, string? newKey = null) + public Task UpdateIntegerAttribute(string databaseId, string collectionId, string key, bool required, long @default, long? min = null, long? max = null, string? newKey = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}" .Replace("{databaseId}", databaseId) @@ -1161,12 +1191,13 @@ static Models.AttributeInteger Convert(Dictionary it) { "required", required }, { "min", min }, { "max", max }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1191,7 +1222,7 @@ static Models.AttributeInteger Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.createIpColumn` instead.")] - public Task CreateIpAttribute(string databaseId, string collectionId, string key, bool required, string? xdefault = null, bool? array = null) + public Task CreateIpAttribute(string databaseId, string collectionId, string key, bool required, string? @default = null, bool? array = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/ip" .Replace("{databaseId}", databaseId) @@ -1201,12 +1232,13 @@ static Models.AttributeInteger Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1232,7 +1264,7 @@ static Models.AttributeIp Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.updateIpColumn` instead.")] - public Task UpdateIpAttribute(string databaseId, string collectionId, string key, bool required, string xdefault, string? newKey = null) + public Task UpdateIpAttribute(string databaseId, string collectionId, string key, bool required, string @default, string? newKey = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}" .Replace("{databaseId}", databaseId) @@ -1242,12 +1274,13 @@ static Models.AttributeIp Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1271,7 +1304,7 @@ static Models.AttributeIp Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.createLineColumn` instead.")] - public Task CreateLineAttribute(string databaseId, string collectionId, string key, bool required, List? xdefault = null) + public Task CreateLineAttribute(string databaseId, string collectionId, string key, bool required, List? @default = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/line" .Replace("{databaseId}", databaseId) @@ -1281,11 +1314,12 @@ static Models.AttributeIp Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault } + { "default", @default } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1310,7 +1344,7 @@ static Models.AttributeLine Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.updateLineColumn` instead.")] - public Task UpdateLineAttribute(string databaseId, string collectionId, string key, bool required, List? xdefault = null, string? newKey = null) + public Task UpdateLineAttribute(string databaseId, string collectionId, string key, bool required, List? @default = null, string? newKey = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/line/{key}" .Replace("{databaseId}", databaseId) @@ -1320,12 +1354,13 @@ static Models.AttributeLine Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1349,7 +1384,7 @@ static Models.AttributeLine Convert(Dictionary it) /// /// /// - public Task CreateLongtextAttribute(string databaseId, string collectionId, string key, bool required, string? xdefault = null, bool? array = null, bool? encrypt = null) + public Task CreateLongtextAttribute(string databaseId, string collectionId, string key, bool required, string? @default = null, bool? array = null, bool? encrypt = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/longtext" .Replace("{databaseId}", databaseId) @@ -1359,13 +1394,14 @@ static Models.AttributeLine Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array }, { "encrypt", encrypt } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1390,7 +1426,7 @@ static Models.AttributeLongtext Convert(Dictionary it) /// /// /// - public Task UpdateLongtextAttribute(string databaseId, string collectionId, string key, bool required, string xdefault, string? newKey = null) + public Task UpdateLongtextAttribute(string databaseId, string collectionId, string key, bool required, string @default, string? newKey = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/longtext/{key}" .Replace("{databaseId}", databaseId) @@ -1400,12 +1436,13 @@ static Models.AttributeLongtext Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1429,7 +1466,7 @@ static Models.AttributeLongtext Convert(Dictionary it) /// /// /// - public Task CreateMediumtextAttribute(string databaseId, string collectionId, string key, bool required, string? xdefault = null, bool? array = null, bool? encrypt = null) + public Task CreateMediumtextAttribute(string databaseId, string collectionId, string key, bool required, string? @default = null, bool? array = null, bool? encrypt = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext" .Replace("{databaseId}", databaseId) @@ -1439,13 +1476,14 @@ static Models.AttributeLongtext Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array }, { "encrypt", encrypt } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1470,7 +1508,7 @@ static Models.AttributeMediumtext Convert(Dictionary it) /// /// /// - public Task UpdateMediumtextAttribute(string databaseId, string collectionId, string key, bool required, string xdefault, string? newKey = null) + public Task UpdateMediumtextAttribute(string databaseId, string collectionId, string key, bool required, string @default, string? newKey = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext/{key}" .Replace("{databaseId}", databaseId) @@ -1480,12 +1518,13 @@ static Models.AttributeMediumtext Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1509,7 +1548,7 @@ static Models.AttributeMediumtext Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.createPointColumn` instead.")] - public Task CreatePointAttribute(string databaseId, string collectionId, string key, bool required, List? xdefault = null) + public Task CreatePointAttribute(string databaseId, string collectionId, string key, bool required, List? @default = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/point" .Replace("{databaseId}", databaseId) @@ -1519,11 +1558,12 @@ static Models.AttributeMediumtext Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault } + { "default", @default } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1548,7 +1588,7 @@ static Models.AttributePoint Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.updatePointColumn` instead.")] - public Task UpdatePointAttribute(string databaseId, string collectionId, string key, bool required, List? xdefault = null, string? newKey = null) + public Task UpdatePointAttribute(string databaseId, string collectionId, string key, bool required, List? @default = null, string? newKey = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}" .Replace("{databaseId}", databaseId) @@ -1558,12 +1598,13 @@ static Models.AttributePoint Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1587,7 +1628,7 @@ static Models.AttributePoint Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.createPolygonColumn` instead.")] - public Task CreatePolygonAttribute(string databaseId, string collectionId, string key, bool required, List? xdefault = null) + public Task CreatePolygonAttribute(string databaseId, string collectionId, string key, bool required, List? @default = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/polygon" .Replace("{databaseId}", databaseId) @@ -1597,11 +1638,12 @@ static Models.AttributePoint Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault } + { "default", @default } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1626,7 +1668,7 @@ static Models.AttributePolygon Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.updatePolygonColumn` instead.")] - public Task UpdatePolygonAttribute(string databaseId, string collectionId, string key, bool required, List? xdefault = null, string? newKey = null) + public Task UpdatePolygonAttribute(string databaseId, string collectionId, string key, bool required, List? @default = null, string? newKey = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}" .Replace("{databaseId}", databaseId) @@ -1636,12 +1678,13 @@ static Models.AttributePolygon Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1685,6 +1728,7 @@ static Models.AttributePolygon Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1725,6 +1769,7 @@ static Models.AttributeRelationship Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1749,7 +1794,7 @@ static Models.AttributeRelationship Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.createStringColumn` instead.")] - public Task CreateStringAttribute(string databaseId, string collectionId, string key, long size, bool required, string? xdefault = null, bool? array = null, bool? encrypt = null) + public Task CreateStringAttribute(string databaseId, string collectionId, string key, long size, bool required, string? @default = null, bool? array = null, bool? encrypt = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/string" .Replace("{databaseId}", databaseId) @@ -1760,13 +1805,14 @@ static Models.AttributeRelationship Convert(Dictionary it) { "key", key }, { "size", size }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array }, { "encrypt", encrypt } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1792,7 +1838,7 @@ static Models.AttributeString Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.updateStringColumn` instead.")] - public Task UpdateStringAttribute(string databaseId, string collectionId, string key, bool required, string xdefault, long? size = null, string? newKey = null) + public Task UpdateStringAttribute(string databaseId, string collectionId, string key, bool required, string @default, long? size = null, string? newKey = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}" .Replace("{databaseId}", databaseId) @@ -1802,13 +1848,14 @@ static Models.AttributeString Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "size", size }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1832,7 +1879,7 @@ static Models.AttributeString Convert(Dictionary it) /// /// /// - public Task CreateTextAttribute(string databaseId, string collectionId, string key, bool required, string? xdefault = null, bool? array = null, bool? encrypt = null) + public Task CreateTextAttribute(string databaseId, string collectionId, string key, bool required, string? @default = null, bool? array = null, bool? encrypt = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/text" .Replace("{databaseId}", databaseId) @@ -1842,13 +1889,14 @@ static Models.AttributeString Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array }, { "encrypt", encrypt } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1873,7 +1921,7 @@ static Models.AttributeText Convert(Dictionary it) /// /// /// - public Task UpdateTextAttribute(string databaseId, string collectionId, string key, bool required, string xdefault, string? newKey = null) + public Task UpdateTextAttribute(string databaseId, string collectionId, string key, bool required, string @default, string? newKey = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/text/{key}" .Replace("{databaseId}", databaseId) @@ -1883,12 +1931,13 @@ static Models.AttributeText Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1913,7 +1962,7 @@ static Models.AttributeText Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.createUrlColumn` instead.")] - public Task CreateUrlAttribute(string databaseId, string collectionId, string key, bool required, string? xdefault = null, bool? array = null) + public Task CreateUrlAttribute(string databaseId, string collectionId, string key, bool required, string? @default = null, bool? array = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/url" .Replace("{databaseId}", databaseId) @@ -1923,12 +1972,13 @@ static Models.AttributeText Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1954,7 +2004,7 @@ static Models.AttributeUrl Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.updateUrlColumn` instead.")] - public Task UpdateUrlAttribute(string databaseId, string collectionId, string key, bool required, string xdefault, string? newKey = null) + public Task UpdateUrlAttribute(string databaseId, string collectionId, string key, bool required, string @default, string? newKey = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}" .Replace("{databaseId}", databaseId) @@ -1964,12 +2014,13 @@ static Models.AttributeUrl Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1993,7 +2044,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, bool? encrypt = null) + public Task CreateVarcharAttribute(string databaseId, string collectionId, string key, long size, bool required, string? @default = null, bool? array = null, bool? encrypt = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/varchar" .Replace("{databaseId}", databaseId) @@ -2004,13 +2055,14 @@ static Models.AttributeUrl Convert(Dictionary it) { "key", key }, { "size", size }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array }, { "encrypt", encrypt } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2035,7 +2087,7 @@ static Models.AttributeVarchar Convert(Dictionary it) /// /// /// - public Task UpdateVarcharAttribute(string databaseId, string collectionId, string key, bool required, string xdefault, long? size = null, string? newKey = null) + public Task UpdateVarcharAttribute(string databaseId, string collectionId, string key, bool required, string @default, long? size = null, string? newKey = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/varchar/{key}" .Replace("{databaseId}", databaseId) @@ -2045,13 +2097,14 @@ static Models.AttributeVarchar Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "size", size }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2088,6 +2141,7 @@ public Task GetAttribute(string databaseId, string collectionId, string var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -2163,6 +2217,7 @@ public Task DeleteAttribute(string databaseId, string collectionId, stri var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2198,6 +2253,7 @@ public Task DeleteAttribute(string databaseId, string collectionId, stri var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -2239,6 +2295,7 @@ static Models.DocumentList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2279,6 +2336,7 @@ static Models.Document Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2320,6 +2378,7 @@ static Models.DocumentList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2360,6 +2419,7 @@ static Models.DocumentList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2398,6 +2458,7 @@ static Models.DocumentList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2437,6 +2498,7 @@ static Models.DocumentList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -2478,6 +2540,7 @@ static Models.Document Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2518,6 +2581,7 @@ static Models.Document Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2555,6 +2619,7 @@ public Task DeleteDocument(string databaseId, string collectionId, strin var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2573,7 +2638,7 @@ public Task DeleteDocument(string databaseId, string collectionId, strin /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.decrementRowColumn` instead.")] - public Task DecrementDocumentAttribute(string databaseId, string collectionId, string documentId, string attribute, double? xvalue = null, double? min = null, string? transactionId = null) + public Task DecrementDocumentAttribute(string databaseId, string collectionId, string documentId, string attribute, double? @value = null, double? min = null, string? transactionId = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement" .Replace("{databaseId}", databaseId) @@ -2583,13 +2648,14 @@ public Task DeleteDocument(string databaseId, string collectionId, strin var apiParameters = new Dictionary() { - { "value", xvalue }, + { "value", @value }, { "min", min }, { "transactionId", transactionId } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2613,7 +2679,7 @@ static Models.Document Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.incrementRowColumn` instead.")] - public Task IncrementDocumentAttribute(string databaseId, string collectionId, string documentId, string attribute, double? xvalue = null, double? max = null, string? transactionId = null) + public Task IncrementDocumentAttribute(string databaseId, string collectionId, string documentId, string attribute, double? @value = null, double? max = null, string? transactionId = null) { var apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment" .Replace("{databaseId}", databaseId) @@ -2623,13 +2689,14 @@ static Models.Document Convert(Dictionary it) var apiParameters = new Dictionary() { - { "value", xvalue }, + { "value", @value }, { "max", max }, { "transactionId", transactionId } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2667,6 +2734,7 @@ static Models.Document Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -2708,6 +2776,7 @@ static Models.IndexList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2744,6 +2813,7 @@ static Models.Index Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -2779,6 +2849,7 @@ public Task DeleteIndex(string databaseId, string collectionId, string k var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; diff --git a/Appwrite/Services/Functions.cs b/Appwrite/Services/Functions.cs index c29c2af9..fe1987ed 100644 --- a/Appwrite/Services/Functions.cs +++ b/Appwrite/Services/Functions.cs @@ -31,6 +31,7 @@ public Functions(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -87,6 +88,7 @@ static Models.FunctionList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -119,6 +121,7 @@ static Models.Function Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -150,6 +153,7 @@ static Models.RuntimeList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -182,6 +186,7 @@ static Models.SpecificationList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -235,6 +240,7 @@ static Models.Function Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -268,6 +274,7 @@ public Task Delete(string functionId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -298,6 +305,7 @@ public Task Delete(string functionId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -335,6 +343,7 @@ static Models.Function Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -380,6 +389,7 @@ static Models.DeploymentList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "multipart/form-data" } }; @@ -424,6 +434,7 @@ static Models.Deployment Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -467,6 +478,7 @@ static Models.Deployment Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -505,6 +517,7 @@ static Models.Deployment Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -539,6 +552,7 @@ static Models.Deployment Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -572,6 +586,7 @@ public Task DeleteDeployment(string functionId, string deploymentId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -604,6 +619,7 @@ public Task GetDeploymentDownload(string functionId, string deploymentId var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -636,6 +652,7 @@ public Task GetDeploymentDownload(string functionId, string deploymentId var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -672,6 +689,7 @@ static Models.Deployment Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -696,7 +714,7 @@ static Models.ExecutionList Convert(Dictionary it) /// function execution process will start asynchronously. /// /// - public Task CreateExecution(string functionId, string? body = null, bool? xasync = null, string? xpath = null, Appwrite.Enums.ExecutionMethod? method = null, object? headers = null, string? scheduledAt = null) + public Task CreateExecution(string functionId, string? body = null, bool? @async = null, string? @path = null, Appwrite.Enums.ExecutionMethod? method = null, object? headers = null, string? scheduledAt = null) { var apiPath = "/functions/{functionId}/executions" .Replace("{functionId}", functionId); @@ -704,8 +722,8 @@ static Models.ExecutionList Convert(Dictionary it) var apiParameters = new Dictionary() { { "body", body }, - { "async", xasync }, - { "path", xpath }, + { "async", @async }, + { "path", @path }, { "method", method?.Value }, { "headers", headers }, { "scheduledAt", scheduledAt } @@ -713,6 +731,7 @@ static Models.ExecutionList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -747,6 +766,7 @@ static Models.Execution Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -780,6 +800,7 @@ public Task DeleteExecution(string functionId, string executionId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -810,6 +831,7 @@ public Task DeleteExecution(string functionId, string executionId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -832,7 +854,7 @@ static Models.VariableList Convert(Dictionary it) /// in the function at runtime as environment variables. /// /// - public Task CreateVariable(string functionId, string variableId, string key, string xvalue, bool? secret = null) + public Task CreateVariable(string functionId, string variableId, string key, string @value, bool? secret = null) { var apiPath = "/functions/{functionId}/variables" .Replace("{functionId}", functionId); @@ -841,12 +863,13 @@ static Models.VariableList Convert(Dictionary it) { { "variableId", variableId }, { "key", key }, - { "value", xvalue }, + { "value", @value }, { "secret", secret } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -881,6 +904,7 @@ static Models.Variable Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -902,7 +926,7 @@ static Models.Variable Convert(Dictionary it) /// Update variable by its unique ID. /// /// - public Task UpdateVariable(string functionId, string variableId, string? key = null, string? xvalue = null, bool? secret = null) + public Task UpdateVariable(string functionId, string variableId, string? key = null, string? @value = null, bool? secret = null) { var apiPath = "/functions/{functionId}/variables/{variableId}" .Replace("{functionId}", functionId) @@ -911,12 +935,13 @@ static Models.Variable Convert(Dictionary it) var apiParameters = new Dictionary() { { "key", key }, - { "value", xvalue }, + { "value", @value }, { "secret", secret } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -951,6 +976,7 @@ public Task DeleteVariable(string functionId, string variableId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; diff --git a/Appwrite/Services/Graphql.cs b/Appwrite/Services/Graphql.cs index 65703bde..2aebacce 100644 --- a/Appwrite/Services/Graphql.cs +++ b/Appwrite/Services/Graphql.cs @@ -28,6 +28,7 @@ public Task Query(object query) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "x-sdk-graphql", "true" }, { "content-type", "application/json" } }; @@ -62,6 +63,7 @@ public Task Mutation(object query) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "x-sdk-graphql", "true" }, { "content-type", "application/json" } }; diff --git a/Appwrite/Services/Health.cs b/Appwrite/Services/Health.cs index 4ac8691d..01af8330 100644 --- a/Appwrite/Services/Health.cs +++ b/Appwrite/Services/Health.cs @@ -27,6 +27,7 @@ public Health(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -58,6 +59,7 @@ static Models.HealthStatus Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -75,6 +77,41 @@ static Models.HealthAntivirus Convert(Dictionary it) } + /// + /// Check the database that backs the audit and activity store. When the + /// connection is reachable the endpoint returns a passing status with its + /// response time. + /// + /// + /// + public Task GetAuditsDB() + { + var apiPath = "/health/audits-db"; + + var apiParameters = new Dictionary() + { + }; + + var apiHeaders = new Dictionary() + { + { "X-Appwrite-Project", _client.GetConfig("project") } + }; + + + static Models.HealthStatusList Convert(Dictionary it) + { + return Models.HealthStatusList.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); + + } + /// /// Check the Appwrite in-memory cache servers are up and connection is /// successful. @@ -90,6 +127,7 @@ static Models.HealthAntivirus Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -122,6 +160,7 @@ static Models.HealthStatusList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -157,6 +196,7 @@ static Models.HealthCertificate Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -188,6 +228,7 @@ static Models.HealthStatus Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -219,6 +260,7 @@ static Models.HealthStatusList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -253,6 +295,7 @@ static Models.HealthStatusList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -286,6 +329,7 @@ static Models.HealthQueue Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -320,6 +364,7 @@ static Models.HealthQueue Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -354,6 +399,7 @@ static Models.HealthQueue Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -387,6 +433,7 @@ static Models.HealthQueue Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -421,6 +468,7 @@ static Models.HealthQueue Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -454,6 +502,7 @@ static Models.HealthQueue Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -487,6 +536,7 @@ static Models.HealthQueue Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -520,6 +570,7 @@ static Models.HealthQueue Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -553,6 +604,7 @@ static Models.HealthQueue Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -586,6 +638,7 @@ static Models.HealthQueue Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -619,6 +672,7 @@ static Models.HealthQueue Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -652,6 +706,7 @@ static Models.HealthQueue Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -685,6 +740,7 @@ static Models.HealthQueue Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -716,6 +772,7 @@ static Models.HealthQueue Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -747,6 +804,7 @@ static Models.HealthStatus Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -784,6 +842,7 @@ static Models.HealthStatus Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; diff --git a/Appwrite/Services/Locale.cs b/Appwrite/Services/Locale.cs index 2d199bc2..9f065f56 100644 --- a/Appwrite/Services/Locale.cs +++ b/Appwrite/Services/Locale.cs @@ -32,6 +32,7 @@ public Locale(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -64,6 +65,7 @@ static Models.Locale Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -96,6 +98,7 @@ static Models.LocaleCodeList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -128,6 +131,7 @@ static Models.ContinentList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -160,6 +164,7 @@ static Models.CountryList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -192,6 +197,7 @@ static Models.CountryList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -225,6 +231,7 @@ static Models.PhoneList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -257,6 +264,7 @@ static Models.CurrencyList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; diff --git a/Appwrite/Services/Messaging.cs b/Appwrite/Services/Messaging.cs index 397db8d6..000f9dff 100644 --- a/Appwrite/Services/Messaging.cs +++ b/Appwrite/Services/Messaging.cs @@ -30,6 +30,7 @@ public Messaging(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -73,6 +74,7 @@ static Models.MessageList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -120,6 +122,7 @@ static Models.Message Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -171,6 +174,7 @@ static Models.Message Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -225,6 +229,7 @@ static Models.Message Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -265,6 +270,7 @@ static Models.Message Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -304,6 +310,7 @@ static Models.Message Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -347,6 +354,7 @@ static Models.Message Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -389,6 +397,7 @@ static Models.Message Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -423,6 +432,7 @@ static Models.Message Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -456,6 +466,7 @@ public Task Delete(string messageId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -486,6 +497,7 @@ public Task Delete(string messageId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -520,6 +532,7 @@ static Models.LogList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -554,6 +567,7 @@ static Models.TargetList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -594,6 +608,7 @@ static Models.ProviderList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -634,6 +649,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -675,6 +691,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -715,6 +732,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -752,6 +770,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -788,6 +807,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -825,6 +845,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -861,6 +882,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -903,6 +925,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -945,6 +968,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -983,6 +1007,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1021,6 +1046,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1061,6 +1087,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1101,6 +1128,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1141,6 +1169,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1181,6 +1210,93 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, + { "content-type", "application/json" } + }; + + + static Models.Provider Convert(Dictionary it) + { + return Models.Provider.From(map: it); + } + + return _client.Call( + method: "PATCH", + path: apiPath, + headers: apiHeaders, + parameters: apiParameters.Where(it => it.Value != null).ToDictionary(it => it.Key, it => it.Value)!, + convert: Convert); + + } + + /// + /// Create a new Amazon SES provider. + /// + /// + public Task CreateSesProvider(string providerId, string name, string? accessKey = null, string? secretKey = null, string? region = null, string? fromName = null, string? fromEmail = null, string? replyToName = null, string? replyToEmail = null, bool? enabled = null) + { + var apiPath = "/messaging/providers/ses"; + + var apiParameters = new Dictionary() + { + { "providerId", providerId }, + { "name", name }, + { "accessKey", accessKey }, + { "secretKey", secretKey }, + { "region", region }, + { "fromName", fromName }, + { "fromEmail", fromEmail }, + { "replyToName", replyToName }, + { "replyToEmail", replyToEmail }, + { "enabled", enabled } + }; + + var apiHeaders = new Dictionary() + { + { "X-Appwrite-Project", _client.GetConfig("project") }, + { "content-type", "application/json" } + }; + + + static Models.Provider Convert(Dictionary it) + { + return Models.Provider.From(map: it); + } + + return _client.Call( + method: "POST", + path: apiPath, + headers: apiHeaders, + parameters: apiParameters.Where(it => it.Value != null).ToDictionary(it => it.Key, it => it.Value)!, + convert: Convert); + + } + + /// + /// Update an Amazon SES provider by its unique ID. + /// + /// + public Task UpdateSesProvider(string providerId, string? name = null, bool? enabled = null, string? accessKey = null, string? secretKey = null, string? region = null, string? fromName = null, string? fromEmail = null, string? replyToName = null, string? replyToEmail = null) + { + var apiPath = "/messaging/providers/ses/{providerId}" + .Replace("{providerId}", providerId); + + var apiParameters = new Dictionary() + { + { "name", name }, + { "enabled", enabled }, + { "accessKey", accessKey }, + { "secretKey", secretKey }, + { "region", region }, + { "fromName", fromName }, + { "fromEmail", fromEmail }, + { "replyToName", replyToName }, + { "replyToEmail", replyToEmail } + }; + + var apiHeaders = new Dictionary() + { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1228,6 +1344,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1274,6 +1391,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1321,6 +1439,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1367,6 +1486,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1389,7 +1509,7 @@ static Models.Provider Convert(Dictionary it) /// Create a new Telesign provider. /// /// - public Task CreateTelesignProvider(string providerId, string name, string? xfrom = null, string? customerId = null, string? apiKey = null, bool? enabled = null) + public Task CreateTelesignProvider(string providerId, string name, string? @from = null, string? customerId = null, string? apiKey = null, bool? enabled = null) { var apiPath = "/messaging/providers/telesign"; @@ -1397,7 +1517,7 @@ static Models.Provider Convert(Dictionary it) { { "providerId", providerId }, { "name", name }, - { "from", xfrom }, + { "from", @from }, { "customerId", customerId }, { "apiKey", apiKey }, { "enabled", enabled } @@ -1405,6 +1525,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1427,7 +1548,7 @@ static Models.Provider Convert(Dictionary it) /// Update a Telesign provider by its unique ID. /// /// - public Task UpdateTelesignProvider(string providerId, string? name = null, bool? enabled = null, string? customerId = null, string? apiKey = null, string? xfrom = null) + public Task UpdateTelesignProvider(string providerId, string? name = null, bool? enabled = null, string? customerId = null, string? apiKey = null, string? @from = null) { var apiPath = "/messaging/providers/telesign/{providerId}" .Replace("{providerId}", providerId); @@ -1438,11 +1559,12 @@ static Models.Provider Convert(Dictionary it) { "enabled", enabled }, { "customerId", customerId }, { "apiKey", apiKey }, - { "from", xfrom } + { "from", @from } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1465,7 +1587,7 @@ static Models.Provider Convert(Dictionary it) /// Create a new Textmagic provider. /// /// - public Task CreateTextmagicProvider(string providerId, string name, string? xfrom = null, string? username = null, string? apiKey = null, bool? enabled = null) + public Task CreateTextmagicProvider(string providerId, string name, string? @from = null, string? username = null, string? apiKey = null, bool? enabled = null) { var apiPath = "/messaging/providers/textmagic"; @@ -1473,7 +1595,7 @@ static Models.Provider Convert(Dictionary it) { { "providerId", providerId }, { "name", name }, - { "from", xfrom }, + { "from", @from }, { "username", username }, { "apiKey", apiKey }, { "enabled", enabled } @@ -1481,6 +1603,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1503,7 +1626,7 @@ static Models.Provider Convert(Dictionary it) /// Update a Textmagic provider by its unique ID. /// /// - public Task UpdateTextmagicProvider(string providerId, string? name = null, bool? enabled = null, string? username = null, string? apiKey = null, string? xfrom = null) + public Task UpdateTextmagicProvider(string providerId, string? name = null, bool? enabled = null, string? username = null, string? apiKey = null, string? @from = null) { var apiPath = "/messaging/providers/textmagic/{providerId}" .Replace("{providerId}", providerId); @@ -1514,11 +1637,12 @@ static Models.Provider Convert(Dictionary it) { "enabled", enabled }, { "username", username }, { "apiKey", apiKey }, - { "from", xfrom } + { "from", @from } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1541,7 +1665,7 @@ static Models.Provider Convert(Dictionary it) /// Create a new Twilio provider. /// /// - public Task CreateTwilioProvider(string providerId, string name, string? xfrom = null, string? accountSid = null, string? authToken = null, bool? enabled = null) + public Task CreateTwilioProvider(string providerId, string name, string? @from = null, string? accountSid = null, string? authToken = null, bool? enabled = null) { var apiPath = "/messaging/providers/twilio"; @@ -1549,7 +1673,7 @@ static Models.Provider Convert(Dictionary it) { { "providerId", providerId }, { "name", name }, - { "from", xfrom }, + { "from", @from }, { "accountSid", accountSid }, { "authToken", authToken }, { "enabled", enabled } @@ -1557,6 +1681,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1579,7 +1704,7 @@ static Models.Provider Convert(Dictionary it) /// Update a Twilio provider by its unique ID. /// /// - public Task UpdateTwilioProvider(string providerId, string? name = null, bool? enabled = null, string? accountSid = null, string? authToken = null, string? xfrom = null) + public Task UpdateTwilioProvider(string providerId, string? name = null, bool? enabled = null, string? accountSid = null, string? authToken = null, string? @from = null) { var apiPath = "/messaging/providers/twilio/{providerId}" .Replace("{providerId}", providerId); @@ -1590,11 +1715,12 @@ static Models.Provider Convert(Dictionary it) { "enabled", enabled }, { "accountSid", accountSid }, { "authToken", authToken }, - { "from", xfrom } + { "from", @from } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1617,7 +1743,7 @@ static Models.Provider Convert(Dictionary it) /// Create a new Vonage provider. /// /// - public Task CreateVonageProvider(string providerId, string name, string? xfrom = null, string? apiKey = null, string? apiSecret = null, bool? enabled = null) + public Task CreateVonageProvider(string providerId, string name, string? @from = null, string? apiKey = null, string? apiSecret = null, bool? enabled = null) { var apiPath = "/messaging/providers/vonage"; @@ -1625,7 +1751,7 @@ static Models.Provider Convert(Dictionary it) { { "providerId", providerId }, { "name", name }, - { "from", xfrom }, + { "from", @from }, { "apiKey", apiKey }, { "apiSecret", apiSecret }, { "enabled", enabled } @@ -1633,6 +1759,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1655,7 +1782,7 @@ static Models.Provider Convert(Dictionary it) /// Update a Vonage provider by its unique ID. /// /// - public Task UpdateVonageProvider(string providerId, string? name = null, bool? enabled = null, string? apiKey = null, string? apiSecret = null, string? xfrom = null) + public Task UpdateVonageProvider(string providerId, string? name = null, bool? enabled = null, string? apiKey = null, string? apiSecret = null, string? @from = null) { var apiPath = "/messaging/providers/vonage/{providerId}" .Replace("{providerId}", providerId); @@ -1666,11 +1793,12 @@ static Models.Provider Convert(Dictionary it) { "enabled", enabled }, { "apiKey", apiKey }, { "apiSecret", apiSecret }, - { "from", xfrom } + { "from", @from } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1705,6 +1833,7 @@ static Models.Provider Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -1737,6 +1866,7 @@ public Task DeleteProvider(string providerId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1767,6 +1897,7 @@ public Task DeleteProvider(string providerId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -1801,6 +1932,7 @@ static Models.LogList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -1835,6 +1967,7 @@ static Models.LogList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -1869,6 +2002,7 @@ static Models.TopicList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1903,6 +2037,7 @@ static Models.Topic Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -1938,6 +2073,7 @@ static Models.Topic Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1971,6 +2107,7 @@ public Task DeleteTopic(string topicId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2001,6 +2138,7 @@ public Task DeleteTopic(string topicId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -2036,6 +2174,7 @@ static Models.LogList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -2070,6 +2209,7 @@ static Models.SubscriberList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2105,6 +2245,7 @@ static Models.Subscriber Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -2138,6 +2279,7 @@ public Task DeleteSubscriber(string topicId, string subscriberId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; diff --git a/Appwrite/Services/Organization.cs b/Appwrite/Services/Organization.cs index 299b9a4f..74e21021 100644 --- a/Appwrite/Services/Organization.cs +++ b/Appwrite/Services/Organization.cs @@ -29,6 +29,7 @@ public Organization(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -64,6 +65,7 @@ static Models.KeyList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -98,6 +100,7 @@ static Models.Key Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -134,6 +137,7 @@ static Models.Key Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -168,6 +172,7 @@ public Task DeleteKey(string keyId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -199,6 +204,7 @@ public Task DeleteKey(string keyId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -233,6 +239,7 @@ static Models.ProjectList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -266,6 +273,7 @@ static Models.Project Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -299,6 +307,7 @@ static Models.Project Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -332,6 +341,7 @@ public Task DeleteProject(string projectId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; diff --git a/Appwrite/Services/Presences.cs b/Appwrite/Services/Presences.cs index 3a0b8b05..67b1870b 100644 --- a/Appwrite/Services/Presences.cs +++ b/Appwrite/Services/Presences.cs @@ -31,6 +31,7 @@ public Presences(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -65,6 +66,7 @@ static Models.PresenceList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -103,6 +105,7 @@ static Models.Presence Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -144,6 +147,7 @@ static Models.Presence Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -178,6 +182,7 @@ public Task Delete(string presenceId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; diff --git a/Appwrite/Services/Project.cs b/Appwrite/Services/Project.cs index 8f18a6a3..6fd17fd0 100644 --- a/Appwrite/Services/Project.cs +++ b/Appwrite/Services/Project.cs @@ -27,6 +27,7 @@ public Project(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -58,6 +59,7 @@ public Task Delete() var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -88,6 +90,7 @@ public Task Delete() var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -122,6 +125,7 @@ static Models.Project Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -161,6 +165,7 @@ static Models.KeyList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -199,6 +204,7 @@ static Models.Key Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -232,6 +238,7 @@ static Models.EphemeralKey Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -268,6 +275,7 @@ static Models.Key Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -302,6 +310,7 @@ public Task DeleteKey(string keyId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -331,6 +340,7 @@ public Task DeleteKey(string keyId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -366,6 +376,7 @@ static Models.Project Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -400,6 +411,7 @@ static Models.MockNumberList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -434,6 +446,7 @@ static Models.MockNumber Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -468,6 +481,7 @@ static Models.MockNumber Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -502,6 +516,7 @@ public Task DeleteMockPhone(string number) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -533,6 +548,7 @@ public Task DeleteMockPhone(string number) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -550,6 +566,47 @@ static Models.OAuth2ProviderList Convert(Dictionary it) } + /// + /// Update the OAuth2 server (OIDC provider) configuration. + /// + /// + public Task UpdateOAuth2Server(bool enabled, string authorizationUrl, List? scopes = null, long? accessTokenDuration = null, long? refreshTokenDuration = null, long? publicAccessTokenDuration = null, long? publicRefreshTokenDuration = null, bool? confidentialPkce = null) + { + var apiPath = "/project/oauth2-server"; + + var apiParameters = new Dictionary() + { + { "enabled", enabled }, + { "authorizationUrl", authorizationUrl }, + { "scopes", scopes }, + { "accessTokenDuration", accessTokenDuration }, + { "refreshTokenDuration", refreshTokenDuration }, + { "publicAccessTokenDuration", publicAccessTokenDuration }, + { "publicRefreshTokenDuration", publicRefreshTokenDuration }, + { "confidentialPkce", confidentialPkce } + }; + + var apiHeaders = new Dictionary() + { + { "X-Appwrite-Project", _client.GetConfig("project") }, + { "content-type", "application/json" } + }; + + + static Models.Project Convert(Dictionary it) + { + return Models.Project.From(map: it); + } + + return _client.Call( + method: "PUT", + path: apiPath, + headers: apiHeaders, + parameters: apiParameters.Where(it => it.Value != null).ToDictionary(it => it.Key, it => it.Value)!, + convert: Convert); + + } + /// /// Update the project OAuth2 Amazon configuration. /// @@ -567,6 +624,7 @@ static Models.OAuth2ProviderList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -604,6 +662,7 @@ static Models.OAuth2Amazon Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -640,6 +699,7 @@ static Models.OAuth2Apple Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -676,6 +736,7 @@ static Models.OAuth2Auth0 Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -711,6 +772,7 @@ static Models.OAuth2Authentik Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -746,6 +808,7 @@ static Models.OAuth2Autodesk Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -781,6 +844,7 @@ static Models.OAuth2Bitbucket Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -816,6 +880,7 @@ static Models.OAuth2Bitly Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -851,6 +916,7 @@ static Models.OAuth2Box Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -886,6 +952,7 @@ static Models.OAuth2Dailymotion Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -921,6 +988,7 @@ static Models.OAuth2Discord Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -956,6 +1024,7 @@ static Models.OAuth2Disqus Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -991,6 +1060,7 @@ static Models.OAuth2Dropbox Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1026,6 +1096,7 @@ static Models.OAuth2Etsy Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1061,6 +1132,7 @@ static Models.OAuth2Facebook Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1097,6 +1169,7 @@ static Models.OAuth2Figma Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1132,6 +1205,7 @@ static Models.OAuth2FusionAuth Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1168,6 +1242,7 @@ static Models.OAuth2Github Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1204,6 +1279,7 @@ static Models.OAuth2Gitlab Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1241,6 +1317,7 @@ static Models.OAuth2Google Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1276,6 +1353,7 @@ static Models.OAuth2Keycloak Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1311,6 +1389,7 @@ static Models.OAuth2Kick Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1347,6 +1426,7 @@ static Models.OAuth2Linkedin Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1382,6 +1462,7 @@ static Models.OAuth2Microsoft Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1421,6 +1502,7 @@ static Models.OAuth2Notion Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1458,6 +1540,7 @@ static Models.OAuth2Oidc Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1493,6 +1576,7 @@ static Models.OAuth2Okta Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1528,6 +1612,7 @@ static Models.OAuth2Paypal Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1563,6 +1648,7 @@ static Models.OAuth2Paypal Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1598,6 +1684,7 @@ static Models.OAuth2Podio Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1633,6 +1720,7 @@ static Models.OAuth2Salesforce Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1668,6 +1756,7 @@ static Models.OAuth2Slack Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1703,6 +1792,7 @@ static Models.OAuth2Spotify Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1738,6 +1828,7 @@ static Models.OAuth2Stripe Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1773,6 +1864,7 @@ static Models.OAuth2Tradeshift Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1808,6 +1900,7 @@ static Models.OAuth2Tradeshift Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1843,6 +1936,7 @@ static Models.OAuth2Twitch Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1878,6 +1972,7 @@ static Models.OAuth2WordPress Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1913,6 +2008,7 @@ static Models.OAuth2X Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1948,6 +2044,7 @@ static Models.OAuth2Yahoo Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1983,6 +2080,7 @@ static Models.OAuth2Yandex Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2018,6 +2116,7 @@ static Models.OAuth2Zoho Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2052,6 +2151,7 @@ public Task GetOAuth2Provider(Appwrite.Enums.ProjectOAuthProviderId prov var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -2246,6 +2346,7 @@ static object Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -2282,6 +2383,7 @@ static Models.PlatformList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2318,6 +2420,7 @@ static Models.PlatformAndroid Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2355,6 +2458,7 @@ static Models.PlatformAndroid Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2391,6 +2495,7 @@ static Models.PlatformApple Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2428,6 +2533,7 @@ static Models.PlatformApple Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2464,6 +2570,7 @@ static Models.PlatformLinux Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2501,6 +2608,7 @@ static Models.PlatformLinux Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2537,6 +2645,7 @@ static Models.PlatformWeb Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2574,6 +2683,7 @@ static Models.PlatformWeb Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2610,6 +2720,7 @@ static Models.PlatformWindows Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2644,6 +2755,7 @@ public Task GetPlatform(string platformId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -2697,6 +2809,7 @@ public Task DeletePlatform(string platformId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2726,6 +2839,7 @@ public Task DeletePlatform(string platformId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -2759,6 +2873,7 @@ static Models.PolicyList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2793,6 +2908,7 @@ static Models.Project Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2827,6 +2943,7 @@ static Models.Project Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2866,6 +2983,7 @@ static Models.Project Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2901,6 +3019,7 @@ static Models.Project Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2942,6 +3061,7 @@ static Models.Project Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2978,6 +3098,7 @@ static Models.Project Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2996,6 +3117,44 @@ static Models.Project Convert(Dictionary it) } + /// + /// Update the password strength requirements for users in the project. + /// + /// + public Task UpdatePasswordStrengthPolicy(long? min = null, bool? uppercase = null, bool? lowercase = null, bool? number = null, bool? symbols = null) + { + var apiPath = "/project/policies/password-strength"; + + var apiParameters = new Dictionary() + { + { "min", min }, + { "uppercase", uppercase }, + { "lowercase", lowercase }, + { "number", number }, + { "symbols", symbols } + }; + + var apiHeaders = new Dictionary() + { + { "X-Appwrite-Project", _client.GetConfig("project") }, + { "content-type", "application/json" } + }; + + + static Models.PolicyPasswordStrength Convert(Dictionary it) + { + return Models.PolicyPasswordStrength.From(map: it); + } + + return _client.Call( + method: "PATCH", + path: apiPath, + headers: apiHeaders, + parameters: apiParameters.Where(it => it.Value != null).ToDictionary(it => it.Key, it => it.Value)!, + convert: Convert); + + } + /// /// Updating this policy allows you to control if email alert is sent upon /// session creation. When enabled, and user signs into their account, they @@ -3015,6 +3174,7 @@ static Models.Project Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -3049,6 +3209,7 @@ static Models.Project Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -3084,6 +3245,7 @@ static Models.Project Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -3118,6 +3280,7 @@ static Models.Project Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -3153,6 +3316,7 @@ static Models.Project Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -3187,6 +3351,7 @@ public Task GetPolicy(Appwrite.Enums.ProjectPolicyId policyId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -3200,43 +3365,47 @@ static object Convert(Dictionary it) { return Appwrite.Models.PolicyPasswordHistory.From(map: it); } - if (it.TryGetValue("$id", out var idValue3) && idValue3?.ToString() == "password-personal-data") + if (it.TryGetValue("$id", out var idValue3) && idValue3?.ToString() == "password-strength") + { + return Appwrite.Models.PolicyPasswordStrength.From(map: it); + } + if (it.TryGetValue("$id", out var idValue4) && idValue4?.ToString() == "password-personal-data") { return Appwrite.Models.PolicyPasswordPersonalData.From(map: it); } - if (it.TryGetValue("$id", out var idValue4) && idValue4?.ToString() == "session-alert") + if (it.TryGetValue("$id", out var idValue5) && idValue5?.ToString() == "session-alert") { return Appwrite.Models.PolicySessionAlert.From(map: it); } - if (it.TryGetValue("$id", out var idValue5) && idValue5?.ToString() == "session-duration") + if (it.TryGetValue("$id", out var idValue6) && idValue6?.ToString() == "session-duration") { return Appwrite.Models.PolicySessionDuration.From(map: it); } - if (it.TryGetValue("$id", out var idValue6) && idValue6?.ToString() == "session-invalidation") + if (it.TryGetValue("$id", out var idValue7) && idValue7?.ToString() == "session-invalidation") { return Appwrite.Models.PolicySessionInvalidation.From(map: it); } - if (it.TryGetValue("$id", out var idValue7) && idValue7?.ToString() == "session-limit") + if (it.TryGetValue("$id", out var idValue8) && idValue8?.ToString() == "session-limit") { return Appwrite.Models.PolicySessionLimit.From(map: it); } - if (it.TryGetValue("$id", out var idValue8) && idValue8?.ToString() == "user-limit") + if (it.TryGetValue("$id", out var idValue9) && idValue9?.ToString() == "user-limit") { return Appwrite.Models.PolicyUserLimit.From(map: it); } - if (it.TryGetValue("$id", out var idValue9) && idValue9?.ToString() == "membership-privacy") + if (it.TryGetValue("$id", out var idValue10) && idValue10?.ToString() == "membership-privacy") { return Appwrite.Models.PolicyMembershipPrivacy.From(map: it); } - if (it.TryGetValue("$id", out var idValue10) && idValue10?.ToString() == "deny-aliased-email") + if (it.TryGetValue("$id", out var idValue11) && idValue11?.ToString() == "deny-aliased-email") { return Appwrite.Models.PolicyDenyAliasedEmail.From(map: it); } - if (it.TryGetValue("$id", out var idValue11) && idValue11?.ToString() == "deny-disposable-email") + if (it.TryGetValue("$id", out var idValue12) && idValue12?.ToString() == "deny-disposable-email") { return Appwrite.Models.PolicyDenyDisposableEmail.From(map: it); } - if (it.TryGetValue("$id", out var idValue12) && idValue12?.ToString() == "deny-free-email") + if (it.TryGetValue("$id", out var idValue13) && idValue13?.ToString() == "deny-free-email") { return Appwrite.Models.PolicyDenyFreeEmail.From(map: it); } @@ -3269,6 +3438,7 @@ static object Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -3304,6 +3474,7 @@ static Models.Project Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -3348,6 +3519,7 @@ static Models.Project Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -3381,6 +3553,7 @@ public Task CreateSMTPTest(List emails) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -3412,6 +3585,7 @@ public Task CreateSMTPTest(List emails) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -3452,6 +3626,7 @@ static Models.EmailTemplateList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -3488,6 +3663,7 @@ static Models.EmailTemplate Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -3521,6 +3697,7 @@ static Models.EmailTemplate Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -3543,7 +3720,7 @@ static Models.VariableList Convert(Dictionary it) /// by all functions and sites in the project. /// /// - public Task CreateVariable(string variableId, string key, string xvalue, bool? secret = null) + public Task CreateVariable(string variableId, string key, string @value, bool? secret = null) { var apiPath = "/project/variables"; @@ -3551,12 +3728,13 @@ static Models.VariableList Convert(Dictionary it) { { "variableId", variableId }, { "key", key }, - { "value", xvalue }, + { "value", @value }, { "secret", secret } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -3590,6 +3768,7 @@ static Models.Variable Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -3611,7 +3790,7 @@ static Models.Variable Convert(Dictionary it) /// Update variable by its unique ID. /// /// - public Task UpdateVariable(string variableId, string? key = null, string? xvalue = null, bool? secret = null) + public Task UpdateVariable(string variableId, string? key = null, string? @value = null, bool? secret = null) { var apiPath = "/project/variables/{variableId}" .Replace("{variableId}", variableId); @@ -3619,12 +3798,13 @@ static Models.Variable Convert(Dictionary it) var apiParameters = new Dictionary() { { "key", key }, - { "value", xvalue }, + { "value", @value }, { "secret", secret } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -3658,6 +3838,7 @@ public Task DeleteVariable(string variableId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; diff --git a/Appwrite/Services/Proxy.cs b/Appwrite/Services/Proxy.cs index 0b1c471d..95bbbd96 100644 --- a/Appwrite/Services/Proxy.cs +++ b/Appwrite/Services/Proxy.cs @@ -30,6 +30,7 @@ public Proxy(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -65,6 +66,7 @@ static Models.ProxyRuleList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -103,6 +105,7 @@ static Models.ProxyRule Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -144,6 +147,7 @@ static Models.ProxyRule Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -182,6 +186,7 @@ static Models.ProxyRule Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -215,6 +220,7 @@ static Models.ProxyRule Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -247,6 +253,7 @@ public Task DeleteRule(string ruleId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -278,6 +285,7 @@ public Task DeleteRule(string ruleId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; diff --git a/Appwrite/Services/Sites.cs b/Appwrite/Services/Sites.cs index 092ba003..23f17e94 100644 --- a/Appwrite/Services/Sites.cs +++ b/Appwrite/Services/Sites.cs @@ -31,6 +31,7 @@ public Sites(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -85,6 +86,7 @@ static Models.SiteList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -118,6 +120,7 @@ static Models.Site Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -149,6 +152,7 @@ static Models.FrameworkList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -181,6 +185,7 @@ static Models.SpecificationList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -235,6 +240,7 @@ static Models.Site Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -268,6 +274,7 @@ public Task Delete(string siteId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -298,6 +305,7 @@ public Task Delete(string siteId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -335,6 +343,7 @@ static Models.Site Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -374,6 +383,7 @@ static Models.DeploymentList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "multipart/form-data" } }; @@ -417,6 +427,7 @@ static Models.Deployment Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -460,6 +471,7 @@ static Models.Deployment Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -498,6 +510,7 @@ static Models.Deployment Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -532,6 +545,7 @@ static Models.Deployment Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -565,6 +579,7 @@ public Task DeleteDeployment(string siteId, string deploymentId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -597,6 +612,7 @@ public Task GetDeploymentDownload(string siteId, string deploymentId, Ap var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -629,6 +645,7 @@ public Task GetDeploymentDownload(string siteId, string deploymentId, Ap var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -665,6 +682,7 @@ static Models.Deployment Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -698,6 +716,7 @@ static Models.ExecutionList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -731,6 +750,7 @@ public Task DeleteLog(string siteId, string logId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -761,6 +781,7 @@ public Task DeleteLog(string siteId, string logId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -783,7 +804,7 @@ static Models.VariableList Convert(Dictionary it) /// and runtime (server-side rendering) as environment variables. /// /// - public Task CreateVariable(string siteId, string variableId, string key, string xvalue, bool? secret = null) + public Task CreateVariable(string siteId, string variableId, string key, string @value, bool? secret = null) { var apiPath = "/sites/{siteId}/variables" .Replace("{siteId}", siteId); @@ -792,12 +813,13 @@ static Models.VariableList Convert(Dictionary it) { { "variableId", variableId }, { "key", key }, - { "value", xvalue }, + { "value", @value }, { "secret", secret } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -832,6 +854,7 @@ static Models.Variable Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -853,7 +876,7 @@ static Models.Variable Convert(Dictionary it) /// Update variable by its unique ID. /// /// - public Task UpdateVariable(string siteId, string variableId, string? key = null, string? xvalue = null, bool? secret = null) + public Task UpdateVariable(string siteId, string variableId, string? key = null, string? @value = null, bool? secret = null) { var apiPath = "/sites/{siteId}/variables/{variableId}" .Replace("{siteId}", siteId) @@ -862,12 +885,13 @@ static Models.Variable Convert(Dictionary it) var apiParameters = new Dictionary() { { "key", key }, - { "value", xvalue }, + { "value", @value }, { "secret", secret } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -902,6 +926,7 @@ public Task DeleteVariable(string siteId, string variableId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; diff --git a/Appwrite/Services/Storage.cs b/Appwrite/Services/Storage.cs index 78617f82..fed8a691 100644 --- a/Appwrite/Services/Storage.cs +++ b/Appwrite/Services/Storage.cs @@ -31,6 +31,7 @@ public Storage(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -73,6 +74,7 @@ static Models.BucketList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -107,6 +109,7 @@ static Models.Bucket Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -149,6 +152,7 @@ static Models.Bucket Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -182,6 +186,7 @@ public Task DeleteBucket(string bucketId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -214,6 +219,7 @@ public Task DeleteBucket(string bucketId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -266,6 +272,7 @@ static Models.FileList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "multipart/form-data" } }; @@ -306,6 +313,7 @@ static Models.File Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -342,6 +350,7 @@ static Models.File Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -377,6 +386,7 @@ public Task DeleteFile(string bucketId, string fileId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -409,6 +419,7 @@ public Task GetFileDownload(string bucketId, string fileId, string? toke var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -453,6 +464,7 @@ public Task GetFilePreview(string bucketId, string fileId, long? width = var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -484,6 +496,7 @@ public Task GetFileView(string bucketId, string fileId, string? token = var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; diff --git a/Appwrite/Services/TablesDB.cs b/Appwrite/Services/TablesDB.cs index 10639e46..f34ee786 100644 --- a/Appwrite/Services/TablesDB.cs +++ b/Appwrite/Services/TablesDB.cs @@ -31,6 +31,7 @@ public TablesDB(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -66,6 +67,7 @@ static Models.DatabaseList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -99,6 +101,7 @@ static Models.Database Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -131,6 +134,7 @@ static Models.TransactionList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -164,6 +168,7 @@ static Models.Transaction Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -198,6 +203,7 @@ static Models.Transaction Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -231,6 +237,7 @@ public Task DeleteTransaction(string transactionId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -260,6 +267,7 @@ public Task DeleteTransaction(string transactionId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -294,6 +302,7 @@ static Models.Transaction Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -328,6 +337,7 @@ static Models.Database Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -362,6 +372,7 @@ public Task Delete(string databaseId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -394,6 +405,7 @@ public Task Delete(string databaseId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -436,6 +448,7 @@ static Models.TableList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -471,6 +484,7 @@ static Models.Table Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -509,6 +523,7 @@ static Models.Table Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -544,6 +559,7 @@ public Task DeleteTable(string databaseId, string tableId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -575,6 +591,7 @@ public Task DeleteTable(string databaseId, string tableId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -598,7 +615,7 @@ static Models.ColumnList Convert(Dictionary it) /// /// /// - public Task CreateBigIntColumn(string databaseId, string tableId, string key, bool required, long? min = null, long? max = null, long? xdefault = null, bool? array = null) + public Task CreateBigIntColumn(string databaseId, string tableId, string key, bool required, long? min = null, long? max = null, long? @default = null, bool? array = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/bigint" .Replace("{databaseId}", databaseId) @@ -610,12 +627,13 @@ static Models.ColumnList Convert(Dictionary it) { "required", required }, { "min", min }, { "max", max }, - { "default", xdefault }, + { "default", @default }, { "array", array } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -640,7 +658,7 @@ static Models.ColumnBigint Convert(Dictionary it) /// /// /// - public Task UpdateBigIntColumn(string databaseId, string tableId, string key, bool required, long xdefault, long? min = null, long? max = null, string? newKey = null) + public Task UpdateBigIntColumn(string databaseId, string tableId, string key, bool required, long @default, long? min = null, long? max = null, string? newKey = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/bigint/{key}" .Replace("{databaseId}", databaseId) @@ -652,12 +670,13 @@ static Models.ColumnBigint Convert(Dictionary it) { "required", required }, { "min", min }, { "max", max }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -681,7 +700,7 @@ static Models.ColumnBigint Convert(Dictionary it) /// /// /// - public Task CreateBooleanColumn(string databaseId, string tableId, string key, bool required, bool? xdefault = null, bool? array = null) + public Task CreateBooleanColumn(string databaseId, string tableId, string key, bool required, bool? @default = null, bool? array = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/boolean" .Replace("{databaseId}", databaseId) @@ -691,12 +710,13 @@ static Models.ColumnBigint Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -720,7 +740,7 @@ static Models.ColumnBoolean Convert(Dictionary it) /// already existing rows. /// /// - public Task UpdateBooleanColumn(string databaseId, string tableId, string key, bool required, bool xdefault, string? newKey = null) + public Task UpdateBooleanColumn(string databaseId, string tableId, string key, bool required, bool @default, string? newKey = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key}" .Replace("{databaseId}", databaseId) @@ -730,12 +750,13 @@ static Models.ColumnBoolean Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -758,7 +779,7 @@ static Models.ColumnBoolean Convert(Dictionary it) /// Create a date time column according to the ISO 8601 standard. /// /// - public Task CreateDatetimeColumn(string databaseId, string tableId, string key, bool required, string? xdefault = null, bool? array = null) + public Task CreateDatetimeColumn(string databaseId, string tableId, string key, bool required, string? @default = null, bool? array = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/datetime" .Replace("{databaseId}", databaseId) @@ -768,12 +789,13 @@ static Models.ColumnBoolean Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -797,7 +819,7 @@ static Models.ColumnDatetime Convert(Dictionary it) /// already existing rows. /// /// - public Task UpdateDatetimeColumn(string databaseId, string tableId, string key, bool required, string xdefault, string? newKey = null) + public Task UpdateDatetimeColumn(string databaseId, string tableId, string key, bool required, string @default, string? newKey = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key}" .Replace("{databaseId}", databaseId) @@ -807,12 +829,13 @@ static Models.ColumnDatetime Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -836,7 +859,7 @@ static Models.ColumnDatetime Convert(Dictionary it) /// /// /// - public Task CreateEmailColumn(string databaseId, string tableId, string key, bool required, string? xdefault = null, bool? array = null) + public Task CreateEmailColumn(string databaseId, string tableId, string key, bool required, string? @default = null, bool? array = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/email" .Replace("{databaseId}", databaseId) @@ -846,12 +869,13 @@ static Models.ColumnDatetime Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -876,7 +900,7 @@ static Models.ColumnEmail Convert(Dictionary it) /// /// /// - public Task UpdateEmailColumn(string databaseId, string tableId, string key, bool required, string xdefault, string? newKey = null) + public Task UpdateEmailColumn(string databaseId, string tableId, string key, bool required, string @default, string? newKey = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/email/{key}" .Replace("{databaseId}", databaseId) @@ -886,12 +910,13 @@ static Models.ColumnEmail Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -915,7 +940,7 @@ static Models.ColumnEmail Convert(Dictionary it) /// accepted values for this column. /// /// - public Task CreateEnumColumn(string databaseId, string tableId, string key, List elements, bool required, string? xdefault = null, bool? array = null) + public Task CreateEnumColumn(string databaseId, string tableId, string key, List elements, bool required, string? @default = null, bool? array = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/enum" .Replace("{databaseId}", databaseId) @@ -926,12 +951,13 @@ static Models.ColumnEmail Convert(Dictionary it) { "key", key }, { "elements", elements }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -956,7 +982,7 @@ static Models.ColumnEnum Convert(Dictionary it) /// /// /// - public Task UpdateEnumColumn(string databaseId, string tableId, string key, List elements, bool required, string xdefault, string? newKey = null) + public Task UpdateEnumColumn(string databaseId, string tableId, string key, List elements, bool required, string @default, string? newKey = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key}" .Replace("{databaseId}", databaseId) @@ -967,12 +993,13 @@ static Models.ColumnEnum Convert(Dictionary it) { { "elements", elements }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -997,7 +1024,7 @@ static Models.ColumnEnum Convert(Dictionary it) /// /// /// - public Task CreateFloatColumn(string databaseId, string tableId, string key, bool required, double? min = null, double? max = null, double? xdefault = null, bool? array = null) + public Task CreateFloatColumn(string databaseId, string tableId, string key, bool required, double? min = null, double? max = null, double? @default = null, bool? array = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/float" .Replace("{databaseId}", databaseId) @@ -1009,12 +1036,13 @@ static Models.ColumnEnum Convert(Dictionary it) { "required", required }, { "min", min }, { "max", max }, - { "default", xdefault }, + { "default", @default }, { "array", array } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1039,7 +1067,7 @@ static Models.ColumnFloat Convert(Dictionary it) /// /// /// - public Task UpdateFloatColumn(string databaseId, string tableId, string key, bool required, double xdefault, double? min = null, double? max = null, string? newKey = null) + public Task UpdateFloatColumn(string databaseId, string tableId, string key, bool required, double @default, double? min = null, double? max = null, string? newKey = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/float/{key}" .Replace("{databaseId}", databaseId) @@ -1051,12 +1079,13 @@ static Models.ColumnFloat Convert(Dictionary it) { "required", required }, { "min", min }, { "max", max }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1081,7 +1110,7 @@ static Models.ColumnFloat Convert(Dictionary it) /// /// /// - public Task CreateIntegerColumn(string databaseId, string tableId, string key, bool required, long? min = null, long? max = null, long? xdefault = null, bool? array = null) + public Task CreateIntegerColumn(string databaseId, string tableId, string key, bool required, long? min = null, long? max = null, long? @default = null, bool? array = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/integer" .Replace("{databaseId}", databaseId) @@ -1093,12 +1122,13 @@ static Models.ColumnFloat Convert(Dictionary it) { "required", required }, { "min", min }, { "max", max }, - { "default", xdefault }, + { "default", @default }, { "array", array } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1123,7 +1153,7 @@ static Models.ColumnInteger Convert(Dictionary it) /// /// /// - public Task UpdateIntegerColumn(string databaseId, string tableId, string key, bool required, long xdefault, long? min = null, long? max = null, string? newKey = null) + public Task UpdateIntegerColumn(string databaseId, string tableId, string key, bool required, long @default, long? min = null, long? max = null, string? newKey = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key}" .Replace("{databaseId}", databaseId) @@ -1135,12 +1165,13 @@ static Models.ColumnInteger Convert(Dictionary it) { "required", required }, { "min", min }, { "max", max }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1164,7 +1195,7 @@ static Models.ColumnInteger Convert(Dictionary it) /// /// /// - public Task CreateIpColumn(string databaseId, string tableId, string key, bool required, string? xdefault = null, bool? array = null) + public Task CreateIpColumn(string databaseId, string tableId, string key, bool required, string? @default = null, bool? array = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/ip" .Replace("{databaseId}", databaseId) @@ -1174,12 +1205,13 @@ static Models.ColumnInteger Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1204,7 +1236,7 @@ static Models.ColumnIp Convert(Dictionary it) /// /// /// - public Task UpdateIpColumn(string databaseId, string tableId, string key, bool required, string xdefault, string? newKey = null) + public Task UpdateIpColumn(string databaseId, string tableId, string key, bool required, string @default, string? newKey = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key}" .Replace("{databaseId}", databaseId) @@ -1214,12 +1246,13 @@ static Models.ColumnIp Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1242,7 +1275,7 @@ static Models.ColumnIp Convert(Dictionary it) /// Create a geometric line column. /// /// - public Task CreateLineColumn(string databaseId, string tableId, string key, bool required, List? xdefault = null) + public Task CreateLineColumn(string databaseId, string tableId, string key, bool required, List? @default = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/line" .Replace("{databaseId}", databaseId) @@ -1252,11 +1285,12 @@ static Models.ColumnIp Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault } + { "default", @default } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1280,7 +1314,7 @@ static Models.ColumnLine Convert(Dictionary it) /// existing rows. /// /// - public Task UpdateLineColumn(string databaseId, string tableId, string key, bool required, List? xdefault = null, string? newKey = null) + public Task UpdateLineColumn(string databaseId, string tableId, string key, bool required, List? @default = null, string? newKey = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/line/{key}" .Replace("{databaseId}", databaseId) @@ -1290,12 +1324,13 @@ static Models.ColumnLine Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1319,7 +1354,7 @@ static Models.ColumnLine Convert(Dictionary it) /// /// /// - public Task CreateLongtextColumn(string databaseId, string tableId, string key, bool required, string? xdefault = null, bool? array = null, bool? encrypt = null) + public Task CreateLongtextColumn(string databaseId, string tableId, string key, bool required, string? @default = null, bool? array = null, bool? encrypt = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/longtext" .Replace("{databaseId}", databaseId) @@ -1329,13 +1364,14 @@ static Models.ColumnLine Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array }, { "encrypt", encrypt } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1360,7 +1396,7 @@ static Models.ColumnLongtext Convert(Dictionary it) /// /// /// - public Task UpdateLongtextColumn(string databaseId, string tableId, string key, bool required, string xdefault, string? newKey = null) + public Task UpdateLongtextColumn(string databaseId, string tableId, string key, bool required, string @default, string? newKey = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/longtext/{key}" .Replace("{databaseId}", databaseId) @@ -1370,12 +1406,13 @@ static Models.ColumnLongtext Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1399,7 +1436,7 @@ static Models.ColumnLongtext Convert(Dictionary it) /// /// /// - public Task CreateMediumtextColumn(string databaseId, string tableId, string key, bool required, string? xdefault = null, bool? array = null, bool? encrypt = null) + public Task CreateMediumtextColumn(string databaseId, string tableId, string key, bool required, string? @default = null, bool? array = null, bool? encrypt = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext" .Replace("{databaseId}", databaseId) @@ -1409,13 +1446,14 @@ static Models.ColumnLongtext Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array }, { "encrypt", encrypt } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1440,7 +1478,7 @@ static Models.ColumnMediumtext Convert(Dictionary it) /// /// /// - public Task UpdateMediumtextColumn(string databaseId, string tableId, string key, bool required, string xdefault, string? newKey = null) + public Task UpdateMediumtextColumn(string databaseId, string tableId, string key, bool required, string @default, string? newKey = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext/{key}" .Replace("{databaseId}", databaseId) @@ -1450,12 +1488,13 @@ static Models.ColumnMediumtext Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1478,7 +1517,7 @@ static Models.ColumnMediumtext Convert(Dictionary it) /// Create a geometric point column. /// /// - public Task CreatePointColumn(string databaseId, string tableId, string key, bool required, List? xdefault = null) + public Task CreatePointColumn(string databaseId, string tableId, string key, bool required, List? @default = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/point" .Replace("{databaseId}", databaseId) @@ -1488,11 +1527,12 @@ static Models.ColumnMediumtext Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault } + { "default", @default } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1516,7 +1556,7 @@ static Models.ColumnPoint Convert(Dictionary it) /// existing rows. /// /// - public Task UpdatePointColumn(string databaseId, string tableId, string key, bool required, List? xdefault = null, string? newKey = null) + public Task UpdatePointColumn(string databaseId, string tableId, string key, bool required, List? @default = null, string? newKey = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}" .Replace("{databaseId}", databaseId) @@ -1526,12 +1566,13 @@ static Models.ColumnPoint Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1554,7 +1595,7 @@ static Models.ColumnPoint Convert(Dictionary it) /// Create a geometric polygon column. /// /// - public Task CreatePolygonColumn(string databaseId, string tableId, string key, bool required, List? xdefault = null) + public Task CreatePolygonColumn(string databaseId, string tableId, string key, bool required, List? @default = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/polygon" .Replace("{databaseId}", databaseId) @@ -1564,11 +1605,12 @@ static Models.ColumnPoint Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault } + { "default", @default } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1592,7 +1634,7 @@ static Models.ColumnPolygon Convert(Dictionary it) /// already existing rows. /// /// - public Task UpdatePolygonColumn(string databaseId, string tableId, string key, bool required, List? xdefault = null, string? newKey = null) + public Task UpdatePolygonColumn(string databaseId, string tableId, string key, bool required, List? @default = null, string? newKey = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}" .Replace("{databaseId}", databaseId) @@ -1602,12 +1644,13 @@ static Models.ColumnPolygon Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1650,6 +1693,7 @@ static Models.ColumnPolygon Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1674,7 +1718,7 @@ static Models.ColumnRelationship Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.9.0. Please use `TablesDB.createTextColumn` instead.")] - public Task CreateStringColumn(string databaseId, string tableId, string key, long size, bool required, string? xdefault = null, bool? array = null, bool? encrypt = null) + public Task CreateStringColumn(string databaseId, string tableId, string key, long size, bool required, string? @default = null, bool? array = null, bool? encrypt = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/string" .Replace("{databaseId}", databaseId) @@ -1685,13 +1729,14 @@ static Models.ColumnRelationship Convert(Dictionary it) { "key", key }, { "size", size }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array }, { "encrypt", encrypt } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1717,7 +1762,7 @@ static Models.ColumnString Convert(Dictionary it) /// /// [Obsolete("This API has been deprecated since 1.8.0. Please use `TablesDB.updateTextColumn` instead.")] - public Task UpdateStringColumn(string databaseId, string tableId, string key, bool required, string xdefault, long? size = null, string? newKey = null) + public Task UpdateStringColumn(string databaseId, string tableId, string key, bool required, string @default, long? size = null, string? newKey = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/string/{key}" .Replace("{databaseId}", databaseId) @@ -1727,13 +1772,14 @@ static Models.ColumnString Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "size", size }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1757,7 +1803,7 @@ static Models.ColumnString Convert(Dictionary it) /// /// /// - public Task CreateTextColumn(string databaseId, string tableId, string key, bool required, string? xdefault = null, bool? array = null, bool? encrypt = null) + public Task CreateTextColumn(string databaseId, string tableId, string key, bool required, string? @default = null, bool? array = null, bool? encrypt = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/text" .Replace("{databaseId}", databaseId) @@ -1767,13 +1813,14 @@ static Models.ColumnString Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array }, { "encrypt", encrypt } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1798,7 +1845,7 @@ static Models.ColumnText Convert(Dictionary it) /// /// /// - public Task UpdateTextColumn(string databaseId, string tableId, string key, bool required, string xdefault, string? newKey = null) + public Task UpdateTextColumn(string databaseId, string tableId, string key, bool required, string @default, string? newKey = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/text/{key}" .Replace("{databaseId}", databaseId) @@ -1808,12 +1855,13 @@ static Models.ColumnText Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1837,7 +1885,7 @@ static Models.ColumnText Convert(Dictionary it) /// /// /// - public Task CreateUrlColumn(string databaseId, string tableId, string key, bool required, string? xdefault = null, bool? array = null) + public Task CreateUrlColumn(string databaseId, string tableId, string key, bool required, string? @default = null, bool? array = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/url" .Replace("{databaseId}", databaseId) @@ -1847,12 +1895,13 @@ static Models.ColumnText Convert(Dictionary it) { { "key", key }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1877,7 +1926,7 @@ static Models.ColumnUrl Convert(Dictionary it) /// /// /// - public Task UpdateUrlColumn(string databaseId, string tableId, string key, bool required, string xdefault, string? newKey = null) + public Task UpdateUrlColumn(string databaseId, string tableId, string key, bool required, string @default, string? newKey = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/url/{key}" .Replace("{databaseId}", databaseId) @@ -1887,12 +1936,13 @@ static Models.ColumnUrl Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1916,7 +1966,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, bool? encrypt = null) + public Task CreateVarcharColumn(string databaseId, string tableId, string key, long size, bool required, string? @default = null, bool? array = null, bool? encrypt = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/varchar" .Replace("{databaseId}", databaseId) @@ -1927,13 +1977,14 @@ static Models.ColumnUrl Convert(Dictionary it) { "key", key }, { "size", size }, { "required", required }, - { "default", xdefault }, + { "default", @default }, { "array", array }, { "encrypt", encrypt } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1958,7 +2009,7 @@ static Models.ColumnVarchar Convert(Dictionary it) /// /// /// - public Task UpdateVarcharColumn(string databaseId, string tableId, string key, bool required, string xdefault, long? size = null, string? newKey = null) + public Task UpdateVarcharColumn(string databaseId, string tableId, string key, bool required, string @default, long? size = null, string? newKey = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/columns/varchar/{key}" .Replace("{databaseId}", databaseId) @@ -1968,13 +2019,14 @@ static Models.ColumnVarchar Convert(Dictionary it) var apiParameters = new Dictionary() { { "required", required }, - { "default", xdefault }, + { "default", @default }, { "size", size }, { "newKey", newKey } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2010,6 +2062,7 @@ public Task GetColumn(string databaseId, string tableId, string key) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -2084,6 +2137,7 @@ public Task DeleteColumn(string databaseId, string tableId, string key) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2118,6 +2172,7 @@ public Task DeleteColumn(string databaseId, string tableId, string key) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2154,6 +2209,7 @@ static Models.ColumnRelationship Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -2194,6 +2250,7 @@ static Models.ColumnIndexList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2229,6 +2286,7 @@ static Models.ColumnIndex Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -2263,6 +2321,7 @@ public Task DeleteIndex(string databaseId, string tableId, string key) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2297,6 +2356,7 @@ public Task DeleteIndex(string databaseId, string tableId, string key) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -2337,6 +2397,7 @@ static Models.RowList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2376,6 +2437,7 @@ static Models.Row Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2416,6 +2478,7 @@ static Models.RowList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2454,6 +2517,7 @@ static Models.RowList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2491,6 +2555,7 @@ static Models.RowList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2529,6 +2594,7 @@ static Models.RowList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -2569,6 +2635,7 @@ static Models.Row Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2608,6 +2675,7 @@ static Models.Row Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2644,6 +2712,7 @@ public Task DeleteRow(string databaseId, string tableId, string rowId, s var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2661,7 +2730,7 @@ public Task DeleteRow(string databaseId, string tableId, string rowId, s /// Decrement a specific column of a row by a given value. /// /// - public Task DecrementRowColumn(string databaseId, string tableId, string rowId, string column, double? xvalue = null, double? min = null, string? transactionId = null) + public Task DecrementRowColumn(string databaseId, string tableId, string rowId, string column, double? @value = null, double? min = null, string? transactionId = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement" .Replace("{databaseId}", databaseId) @@ -2671,13 +2740,14 @@ public Task DeleteRow(string databaseId, string tableId, string rowId, s var apiParameters = new Dictionary() { - { "value", xvalue }, + { "value", @value }, { "min", min }, { "transactionId", transactionId } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -2700,7 +2770,7 @@ static Models.Row Convert(Dictionary it) /// Increment a specific column of a row by a given value. /// /// - public Task IncrementRowColumn(string databaseId, string tableId, string rowId, string column, double? xvalue = null, double? max = null, string? transactionId = null) + public Task IncrementRowColumn(string databaseId, string tableId, string rowId, string column, double? @value = null, double? max = null, string? transactionId = null) { var apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment" .Replace("{databaseId}", databaseId) @@ -2710,13 +2780,14 @@ static Models.Row Convert(Dictionary it) var apiParameters = new Dictionary() { - { "value", xvalue }, + { "value", @value }, { "max", max }, { "transactionId", transactionId } }; var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; diff --git a/Appwrite/Services/Teams.cs b/Appwrite/Services/Teams.cs index d6d7a981..a04f23ae 100644 --- a/Appwrite/Services/Teams.cs +++ b/Appwrite/Services/Teams.cs @@ -31,6 +31,7 @@ public Teams(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -67,6 +68,7 @@ static Models.TeamList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -100,6 +102,7 @@ static Models.Team Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -133,6 +136,7 @@ static Models.Team Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -167,6 +171,7 @@ public Task Delete(string teamId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -200,6 +205,7 @@ public Task Delete(string teamId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -258,6 +264,7 @@ static Models.MembershipList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -294,6 +301,7 @@ static Models.Membership Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -331,6 +339,7 @@ static Models.Membership Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -367,6 +376,7 @@ public Task DeleteMembership(string teamId, string membershipId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -404,6 +414,7 @@ public Task DeleteMembership(string teamId, string membershipId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -439,6 +450,7 @@ static Models.Membership Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -474,6 +486,7 @@ static Models.Preferences Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; diff --git a/Appwrite/Services/Tokens.cs b/Appwrite/Services/Tokens.cs index c597e933..cc334ab9 100644 --- a/Appwrite/Services/Tokens.cs +++ b/Appwrite/Services/Tokens.cs @@ -32,6 +32,7 @@ public Tokens(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -67,6 +68,7 @@ static Models.ResourceTokenList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -100,6 +102,7 @@ static Models.ResourceToken Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -134,6 +137,7 @@ static Models.ResourceToken Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -167,6 +171,7 @@ public Task Delete(string tokenId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; diff --git a/Appwrite/Services/Usage.cs b/Appwrite/Services/Usage.cs index 305abac9..6fba966f 100644 --- a/Appwrite/Services/Usage.cs +++ b/Appwrite/Services/Usage.cs @@ -40,6 +40,7 @@ public Usage(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -83,6 +84,7 @@ static Models.UsageEventList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; diff --git a/Appwrite/Services/Users.cs b/Appwrite/Services/Users.cs index a84d4c35..3fd10ad1 100644 --- a/Appwrite/Services/Users.cs +++ b/Appwrite/Services/Users.cs @@ -31,6 +31,7 @@ public Users(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -67,6 +68,7 @@ static Models.UserList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -106,6 +108,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -145,6 +148,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -180,6 +184,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -212,6 +217,7 @@ public Task DeleteIdentity(string identityId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -246,6 +252,7 @@ public Task DeleteIdentity(string identityId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -285,6 +292,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -329,6 +337,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -372,6 +381,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -412,6 +422,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -445,6 +456,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -482,6 +494,7 @@ public Task Delete(string userId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -511,6 +524,7 @@ public Task Delete(string userId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -550,6 +564,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -587,6 +602,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -626,6 +642,7 @@ static Models.JWT Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -661,6 +678,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -696,6 +714,7 @@ static Models.LogList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -730,6 +749,7 @@ static Models.MembershipList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -764,6 +784,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -799,6 +820,7 @@ public Task DeleteMfaAuthenticator(string userId, Appwrite.Enums.Authent var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -828,6 +850,7 @@ public Task DeleteMFAAuthenticator(string userId, Appwrite.Enums.Authent var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -857,6 +880,7 @@ public Task DeleteMFAAuthenticator(string userId, Appwrite.Enums.Authent var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -889,6 +913,7 @@ static Models.MfaFactors Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -925,6 +950,7 @@ static Models.MfaFactors Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -960,6 +986,7 @@ static Models.MfaRecoveryCodes Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -996,6 +1023,7 @@ static Models.MfaRecoveryCodes Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1032,6 +1060,7 @@ static Models.MfaRecoveryCodes Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1069,6 +1098,7 @@ static Models.MfaRecoveryCodes Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1105,6 +1135,7 @@ static Models.MfaRecoveryCodes Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1139,6 +1170,7 @@ static Models.MfaRecoveryCodes Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1173,6 +1205,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1207,6 +1240,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1240,6 +1274,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -1275,6 +1310,7 @@ static Models.Preferences Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1309,6 +1345,7 @@ static Models.Preferences Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -1346,6 +1383,7 @@ static Models.SessionList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1379,6 +1417,7 @@ public Task DeleteSessions(string userId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1408,6 +1447,7 @@ public Task DeleteSession(string userId, string sessionId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1438,6 +1478,7 @@ public Task DeleteSession(string userId, string sessionId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1473,6 +1514,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -1510,6 +1552,7 @@ static Models.TargetList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1544,6 +1587,7 @@ static Models.Target Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -1580,6 +1624,7 @@ static Models.Target Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1614,6 +1659,7 @@ public Task DeleteTarget(string userId, string targetId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1648,6 +1694,7 @@ public Task DeleteTarget(string userId, string targetId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1682,6 +1729,7 @@ static Models.Token Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -1716,6 +1764,7 @@ static Models.User Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; diff --git a/Appwrite/Services/Webhooks.cs b/Appwrite/Services/Webhooks.cs index 748e00bf..bdfb6be1 100644 --- a/Appwrite/Services/Webhooks.cs +++ b/Appwrite/Services/Webhooks.cs @@ -30,6 +30,7 @@ public Webhooks(Client client) : base(client) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -71,6 +72,7 @@ static Models.WebhookList Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -105,6 +107,7 @@ static Models.Webhook Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") } }; @@ -145,6 +148,7 @@ static Models.Webhook Convert(Dictionary it) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -179,6 +183,7 @@ public Task Delete(string webhookId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; @@ -210,6 +215,7 @@ public Task Delete(string webhookId) var apiHeaders = new Dictionary() { + { "X-Appwrite-Project", _client.GetConfig("project") }, { "content-type", "application/json" } }; diff --git a/CHANGELOG.md b/CHANGELOG.md index 33af5020..a87c1618 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Change Log +## 5.1.0 + +* Added: `createSesProvider` and `updateSesProvider` to `messaging` +* Added: `updateOAuth2Server` to `project` for OAuth2 server settings +* Added: `updatePasswordStrengthPolicy` and `PolicyPasswordStrength` to `project` +* Added: `getAuditsDB` health check to `health` +* Added: `password-strength` to `ProjectPolicyId` +* Added: `apps.read` and `apps.write` to `ProjectKeyScopes` + + ## 5.0.0 * Breaking: Removed `githubImagine` and `googleImagine` from `ProjectOAuthProviderId` @@ -8,7 +18,7 @@ * Added: `Organization` service for managing projects and API keys * Added: `PolicyDenyAliasedEmail`, `PolicyDenyDisposableEmail`, and `PolicyDenyFreeEmail` policy models * Added: `deny-aliased-email`, `deny-disposable-email`, and `deny-free-email` to `ProjectPolicyId` -* Added: `BrowserTheme`, `HealthQueueName`, `OrganizationKeyScopes`, and `Region` enums +* Replaced: `BrowserTheme`, `HealthQueueName`, `OrganizationKeyScopes`, and `Region` enums * Added: `dart-3.12` and `flutter-3.44` runtimes * Added: `ProjectList` model and new attributes on `Function`, `Site`, and `UsageGauge` * Updated: `functions`, `sites`, `usage`, `health`, and `avatars` services diff --git a/README.md b/README.md index 6403b42a..6d03fb5f 100644 --- a/README.md +++ b/README.md @@ -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 5.0.0 +Install-Package Appwrite -Version 5.1.0 # or .NET CLI -dotnet add package Appwrite --version 5.0.0 +dotnet add package Appwrite --version 5.1.0 ``` diff --git a/docs/examples/account/update-password.md b/docs/examples/account/update-password.md index 4c468ddc..5d0c5d7e 100644 --- a/docs/examples/account/update-password.md +++ b/docs/examples/account/update-password.md @@ -12,5 +12,5 @@ Account account = new Account(client); User result = await account.UpdatePassword( password: "", - oldPassword: "password" // optional + oldPassword: "" // optional );``` diff --git a/docs/examples/health/get-audits-db.md b/docs/examples/health/get-audits-db.md new file mode 100644 index 00000000..1bf229a5 --- /dev/null +++ b/docs/examples/health/get-audits-db.md @@ -0,0 +1,14 @@ +```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); + +HealthStatusList result = await health.GetAuditsDB(); +``` diff --git a/docs/examples/messaging/create-ses-provider.md b/docs/examples/messaging/create-ses-provider.md new file mode 100644 index 00000000..5750c3a6 --- /dev/null +++ b/docs/examples/messaging/create-ses-provider.md @@ -0,0 +1,24 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateSesProvider( + providerId: "", + name: "", + accessKey: "", // optional + secretKey: "", // optional + region: "", // optional + fromName: "", // optional + fromEmail: "email@example.com", // optional + replyToName: "", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +);``` diff --git a/docs/examples/messaging/update-ses-provider.md b/docs/examples/messaging/update-ses-provider.md new file mode 100644 index 00000000..32a67f01 --- /dev/null +++ b/docs/examples/messaging/update-ses-provider.md @@ -0,0 +1,24 @@ +```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 + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateSesProvider( + providerId: "", + name: "", // optional + enabled: false, // optional + accessKey: "", // optional + secretKey: "", // optional + region: "", // optional + fromName: "", // optional + fromEmail: "email@example.com", // optional + replyToName: "", // optional + replyToEmail: "" // optional +);``` diff --git a/docs/examples/project/update-o-auth-2-server.md b/docs/examples/project/update-o-auth-2-server.md new file mode 100644 index 00000000..2734038b --- /dev/null +++ b/docs/examples/project/update-o-auth-2-server.md @@ -0,0 +1,22 @@ +```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 + +Project project = new Project(client); + +Project result = await project.UpdateOAuth2Server( + enabled: false, + authorizationUrl: "https://example.com", + scopes: new List(), // optional + accessTokenDuration: 60, // optional + refreshTokenDuration: 60, // optional + publicAccessTokenDuration: 60, // optional + publicRefreshTokenDuration: 60, // optional + confidentialPkce: false // optional +);``` diff --git a/docs/examples/project/update-password-strength-policy.md b/docs/examples/project/update-password-strength-policy.md new file mode 100644 index 00000000..6394609b --- /dev/null +++ b/docs/examples/project/update-password-strength-policy.md @@ -0,0 +1,19 @@ +```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 + +Project project = new Project(client); + +PolicyPasswordStrength result = await project.UpdatePasswordStrengthPolicy( + min: 8, // optional + uppercase: false, // optional + lowercase: false, // optional + number: false, // optional + symbols: false // optional +);```