Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Appwrite/Appwrite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
<PackageId>Appwrite</PackageId>
<Version>8.3.1</Version>
<Version>8.4.0</Version>
<Authors>Appwrite Team</Authors>
<Company>Appwrite Team</Company>
<Description>
Expand Down
11 changes: 6 additions & 5 deletions Appwrite/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ public Client(
_headers = new Dictionary<string, string>()
{
{ "content-type", "application/json" },
{ "user-agent", $"AppwriteDotNetSDK/8.3.1 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"},
{ "user-agent", $"AppwriteDotNetSDK/8.4.0 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"},
{ "x-sdk-name", ".NET" },
{ "x-sdk-platform", "server" },
{ "x-sdk-language", "dotnet" },
{ "x-sdk-version", "8.3.1"},
{ "x-sdk-version", "8.4.0"},
{ "X-Appwrite-Response-Format", "2.0.0" }
};

Expand Down Expand Up @@ -484,7 +484,8 @@ public async Task<T> ChunkedUpload<T>(
Func<Dictionary<string, object>, T> converter,
string paramName,
string? idParamName = null,
Action<UploadProgress>? onProgress = null) where T : class
Action<UploadProgress>? onProgress = null,
string method = "POST") where T : class
{
if (string.IsNullOrEmpty(paramName))
throw new ArgumentException("Parameter name cannot be null or empty", nameof(paramName));
Expand Down Expand Up @@ -549,7 +550,7 @@ public async Task<T> ChunkedUpload<T>(
parameters[paramName] = content;

return await Call(
method: "POST",
method: method,
path,
headers,
parameters,
Expand Down Expand Up @@ -656,7 +657,7 @@ async Task<byte[]> ReadChunkAsync(long start, long end)
};

var chunkResult = await Call<Dictionary<string, object?>>(
method: "POST",
method: method,
path,
chunkHeaders,
chunkParameters
Expand Down
2 changes: 2 additions & 0 deletions Appwrite/Enums/BillingPlanGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public BillingPlanGroup(string value)
}

public static BillingPlanGroup Starter => new BillingPlanGroup("starter");
public static BillingPlanGroup Free => new BillingPlanGroup("free");
public static BillingPlanGroup Start => new BillingPlanGroup("start");
public static BillingPlanGroup Pro => new BillingPlanGroup("pro");
public static BillingPlanGroup Scale => new BillingPlanGroup("scale");
}
Expand Down
2 changes: 2 additions & 0 deletions Appwrite/Enums/BuildRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public BuildRuntime(string value)
public static BuildRuntime Dart310 => new BuildRuntime("dart-3.10");
public static BuildRuntime Dart311 => new BuildRuntime("dart-3.11");
public static BuildRuntime Dart312 => new BuildRuntime("dart-3.12");
public static BuildRuntime Dart313 => new BuildRuntime("dart-3.13");
public static BuildRuntime Dotnet60 => new BuildRuntime("dotnet-6.0");
public static BuildRuntime Dotnet70 => new BuildRuntime("dotnet-7.0");
public static BuildRuntime Dotnet80 => new BuildRuntime("dotnet-8.0");
Expand Down Expand Up @@ -104,5 +105,6 @@ public BuildRuntime(string value)
public static BuildRuntime Flutter338 => new BuildRuntime("flutter-3.38");
public static BuildRuntime Flutter341 => new BuildRuntime("flutter-3.41");
public static BuildRuntime Flutter344 => new BuildRuntime("flutter-3.44");
public static BuildRuntime Flutter347 => new BuildRuntime("flutter-3.47");
}
}
1 change: 1 addition & 0 deletions Appwrite/Enums/DatabasesIndexType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ public DatabasesIndexType(string value)
public static DatabasesIndexType Fulltext => new DatabasesIndexType("fulltext");
public static DatabasesIndexType Unique => new DatabasesIndexType("unique");
public static DatabasesIndexType Spatial => new DatabasesIndexType("spatial");
public static DatabasesIndexType Trigram => new DatabasesIndexType("trigram");
}
}
19 changes: 19 additions & 0 deletions Appwrite/Enums/DomainRegistrationType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;

namespace Appwrite.Enums
{
public class DomainRegistrationType : IEnum
{
public string Value { get; private set; }

public DomainRegistrationType(string value)
{
Value = value;
}

public static DomainRegistrationType New => new DomainRegistrationType("new");
public static DomainRegistrationType Transfer => new DomainRegistrationType("transfer");
public static DomainRegistrationType Renewal => new DomainRegistrationType("renewal");
public static DomainRegistrationType Trade => new DomainRegistrationType("trade");
}
}
23 changes: 23 additions & 0 deletions Appwrite/Enums/DomainTransferStatusEnum.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;

namespace Appwrite.Enums
{
public class DomainTransferStatusEnum : IEnum
{
public string Value { get; private set; }

public DomainTransferStatusEnum(string value)
{
Value = value;
}

public static DomainTransferStatusEnum Transferrable => new DomainTransferStatusEnum("transferrable");
public static DomainTransferStatusEnum NotTransferrable => new DomainTransferStatusEnum("not_transferrable");
public static DomainTransferStatusEnum PendingOwner => new DomainTransferStatusEnum("pending_owner");
public static DomainTransferStatusEnum PendingAdmin => new DomainTransferStatusEnum("pending_admin");
public static DomainTransferStatusEnum PendingRegistry => new DomainTransferStatusEnum("pending_registry");
public static DomainTransferStatusEnum Completed => new DomainTransferStatusEnum("completed");
public static DomainTransferStatusEnum Cancelled => new DomainTransferStatusEnum("cancelled");
public static DomainTransferStatusEnum ServiceUnavailable => new DomainTransferStatusEnum("service_unavailable");
}
}
1 change: 1 addition & 0 deletions Appwrite/Enums/Framework.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public Framework(string value)
public static Framework Remix => new Framework("remix");
public static Framework Lynx => new Framework("lynx");
public static Framework Flutter => new Framework("flutter");
public static Framework Jaspr => new Framework("jaspr");
public static Framework ReactNative => new Framework("react-native");
public static Framework Vite => new Framework("vite");
public static Framework Other => new Framework("other");
Expand Down
17 changes: 17 additions & 0 deletions Appwrite/Enums/IdTokenProvider.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;

namespace Appwrite.Enums
{
public class IdTokenProvider : IEnum
{
public string Value { get; private set; }

public IdTokenProvider(string value)
{
Value = value;
}

public static IdTokenProvider Apple => new IdTokenProvider("apple");
public static IdTokenProvider Google => new IdTokenProvider("google");
}
}
1 change: 1 addition & 0 deletions Appwrite/Enums/ImageGravity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public ImageGravity(string value)
Value = value;
}

public static ImageGravity Auto => new ImageGravity("auto");
public static ImageGravity Center => new ImageGravity("center");
public static ImageGravity TopLeft => new ImageGravity("top-left");
public static ImageGravity Top => new ImageGravity("top");
Expand Down
18 changes: 18 additions & 0 deletions Appwrite/Enums/OAuth2Auth0Prompt.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;

namespace Appwrite.Enums
{
public class OAuth2Auth0Prompt : IEnum
{
public string Value { get; private set; }

public OAuth2Auth0Prompt(string value)
{
Value = value;
}

public static OAuth2Auth0Prompt None => new OAuth2Auth0Prompt("none");
public static OAuth2Auth0Prompt Login => new OAuth2Auth0Prompt("login");
public static OAuth2Auth0Prompt Consent => new OAuth2Auth0Prompt("consent");
}
}
17 changes: 17 additions & 0 deletions Appwrite/Enums/OAuth2DiscordPrompt.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;

namespace Appwrite.Enums
{
public class OAuth2DiscordPrompt : IEnum
{
public string Value { get; private set; }

public OAuth2DiscordPrompt(string value)
{
Value = value;
}

public static OAuth2DiscordPrompt None => new OAuth2DiscordPrompt("none");
public static OAuth2DiscordPrompt Consent => new OAuth2DiscordPrompt("consent");
}
}
16 changes: 16 additions & 0 deletions Appwrite/Enums/OAuth2GithubPrompt.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;

namespace Appwrite.Enums
{
public class OAuth2GithubPrompt : IEnum
{
public string Value { get; private set; }

public OAuth2GithubPrompt(string value)
{
Value = value;
}

public static OAuth2GithubPrompt SelectAccount => new OAuth2GithubPrompt("select_account");
}
}
19 changes: 19 additions & 0 deletions Appwrite/Enums/OAuth2KakaoPrompt.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;

namespace Appwrite.Enums
{
public class OAuth2KakaoPrompt : IEnum
{
public string Value { get; private set; }

public OAuth2KakaoPrompt(string value)
{
Value = value;
}

public static OAuth2KakaoPrompt None => new OAuth2KakaoPrompt("none");
public static OAuth2KakaoPrompt Login => new OAuth2KakaoPrompt("login");
public static OAuth2KakaoPrompt Create => new OAuth2KakaoPrompt("create");
public static OAuth2KakaoPrompt SelectAccount => new OAuth2KakaoPrompt("select_account");
}
}
19 changes: 19 additions & 0 deletions Appwrite/Enums/OAuth2MicrosoftPrompt.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;

namespace Appwrite.Enums
{
public class OAuth2MicrosoftPrompt : IEnum
{
public string Value { get; private set; }

public OAuth2MicrosoftPrompt(string value)
{
Value = value;
}

public static OAuth2MicrosoftPrompt None => new OAuth2MicrosoftPrompt("none");
public static OAuth2MicrosoftPrompt Login => new OAuth2MicrosoftPrompt("login");
public static OAuth2MicrosoftPrompt Consent => new OAuth2MicrosoftPrompt("consent");
public static OAuth2MicrosoftPrompt SelectAccount => new OAuth2MicrosoftPrompt("select_account");
}
}
18 changes: 18 additions & 0 deletions Appwrite/Enums/OAuth2OktaPrompt.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;

namespace Appwrite.Enums
{
public class OAuth2OktaPrompt : IEnum
{
public string Value { get; private set; }

public OAuth2OktaPrompt(string value)
{
Value = value;
}

public static OAuth2OktaPrompt None => new OAuth2OktaPrompt("none");
public static OAuth2OktaPrompt Login => new OAuth2OktaPrompt("login");
public static OAuth2OktaPrompt Consent => new OAuth2OktaPrompt("consent");
}
}
17 changes: 17 additions & 0 deletions Appwrite/Enums/OAuth2SalesforcePrompt.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;

namespace Appwrite.Enums
{
public class OAuth2SalesforcePrompt : IEnum
{
public string Value { get; private set; }

public OAuth2SalesforcePrompt(string value)
{
Value = value;
}

public static OAuth2SalesforcePrompt Login => new OAuth2SalesforcePrompt("login");
public static OAuth2SalesforcePrompt Consent => new OAuth2SalesforcePrompt("consent");
}
}
16 changes: 16 additions & 0 deletions Appwrite/Enums/OAuth2ZohoPrompt.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;

namespace Appwrite.Enums
{
public class OAuth2ZohoPrompt : IEnum
{
public string Value { get; private set; }

public OAuth2ZohoPrompt(string value)
{
Value = value;
}

public static OAuth2ZohoPrompt Consent => new OAuth2ZohoPrompt("consent");
}
}
3 changes: 3 additions & 0 deletions Appwrite/Enums/OAuthProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public OAuthProvider(string value)
public static OAuthProvider Gitlab => new OAuthProvider("gitlab");
public static OAuthProvider Google => new OAuthProvider("google");
public static OAuthProvider Huggingface => new OAuthProvider("huggingface");
public static OAuthProvider Kakao => new OAuthProvider("kakao");
public static OAuthProvider Keycloak => new OAuthProvider("keycloak");
public static OAuthProvider Kick => new OAuthProvider("kick");
public static OAuthProvider Linkedin => new OAuthProvider("linkedin");
Expand All @@ -48,9 +49,11 @@ public OAuthProvider(string value)
public static OAuthProvider Slack => new OAuthProvider("slack");
public static OAuthProvider Spotify => new OAuthProvider("spotify");
public static OAuthProvider Stripe => new OAuthProvider("stripe");
public static OAuthProvider Tiktok => new OAuthProvider("tiktok");
public static OAuthProvider Tradeshift => new OAuthProvider("tradeshift");
public static OAuthProvider TradeshiftBox => new OAuthProvider("tradeshiftBox");
public static OAuthProvider Twitch => new OAuthProvider("twitch");
public static OAuthProvider Webflow => new OAuthProvider("webflow");
public static OAuthProvider Wordpress => new OAuthProvider("wordpress");
public static OAuthProvider X => new OAuthProvider("x");
public static OAuthProvider Yahoo => new OAuthProvider("yahoo");
Expand Down
2 changes: 2 additions & 0 deletions Appwrite/Enums/ProjectEmailTemplateId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ public ProjectEmailTemplateId(string value)
public static ProjectEmailTemplateId MfaChallenge => new ProjectEmailTemplateId("mfaChallenge");
public static ProjectEmailTemplateId SessionAlert => new ProjectEmailTemplateId("sessionAlert");
public static ProjectEmailTemplateId OtpSession => new ProjectEmailTemplateId("otpSession");
public static ProjectEmailTemplateId OtpVerification => new ProjectEmailTemplateId("otpVerification");
public static ProjectEmailTemplateId OtpRecovery => new ProjectEmailTemplateId("otpRecovery");
}
}
4 changes: 4 additions & 0 deletions Appwrite/Enums/ProjectKeyScopes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public ProjectKeyScopes(string value)
public static ProjectKeyScopes WebhooksWrite => new ProjectKeyScopes("webhooks.write");
public static ProjectKeyScopes LocaleRead => new ProjectKeyScopes("locale.read");
public static ProjectKeyScopes AvatarsRead => new ProjectKeyScopes("avatars.read");
public static ProjectKeyScopes AvatarsWrite => new ProjectKeyScopes("avatars.write");
public static ProjectKeyScopes HealthRead => new ProjectKeyScopes("health.read");
public static ProjectKeyScopes AssistantRead => new ProjectKeyScopes("assistant.read");
public static ProjectKeyScopes MigrationsRead => new ProjectKeyScopes("migrations.read");
Expand All @@ -115,6 +116,7 @@ public ProjectKeyScopes(string value)
public static ProjectKeyScopes ReportsWrite => new ProjectKeyScopes("reports.write");
public static ProjectKeyScopes PresencesRead => new ProjectKeyScopes("presences.read");
public static ProjectKeyScopes PresencesWrite => new ProjectKeyScopes("presences.write");
public static ProjectKeyScopes DedicatedDatabasesExecute => new ProjectKeyScopes("dedicatedDatabases.execute");
public static ProjectKeyScopes BackupsPoliciesRead => new ProjectKeyScopes("backups.policies.read");
public static ProjectKeyScopes BackupsPoliciesWrite => new ProjectKeyScopes("backups.policies.write");
public static ProjectKeyScopes ArchivesRead => new ProjectKeyScopes("archives.read");
Expand All @@ -132,5 +134,7 @@ public ProjectKeyScopes(string value)
public static ProjectKeyScopes Oauth2Read => new ProjectKeyScopes("oauth2.read");
public static ProjectKeyScopes Oauth2Write => new ProjectKeyScopes("oauth2.write");
public static ProjectKeyScopes Oauth2Introspect => new ProjectKeyScopes("oauth2.introspect");
public static ProjectKeyScopes AnalyticsRead => new ProjectKeyScopes("analytics.read");
public static ProjectKeyScopes AnalyticsWrite => new ProjectKeyScopes("analytics.write");
}
}
18 changes: 18 additions & 0 deletions Appwrite/Enums/ProjectOAuth2Auth0Prompt.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;

namespace Appwrite.Enums
{
public class ProjectOAuth2Auth0Prompt : IEnum
{
public string Value { get; private set; }

public ProjectOAuth2Auth0Prompt(string value)
{
Value = value;
}

public static ProjectOAuth2Auth0Prompt None => new ProjectOAuth2Auth0Prompt("none");
public static ProjectOAuth2Auth0Prompt Login => new ProjectOAuth2Auth0Prompt("login");
public static ProjectOAuth2Auth0Prompt Consent => new ProjectOAuth2Auth0Prompt("consent");
}
}
17 changes: 17 additions & 0 deletions Appwrite/Enums/ProjectOAuth2DiscordPrompt.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;

namespace Appwrite.Enums
{
public class ProjectOAuth2DiscordPrompt : IEnum
{
public string Value { get; private set; }

public ProjectOAuth2DiscordPrompt(string value)
{
Value = value;
}

public static ProjectOAuth2DiscordPrompt None => new ProjectOAuth2DiscordPrompt("none");
public static ProjectOAuth2DiscordPrompt Consent => new ProjectOAuth2DiscordPrompt("consent");
}
}
Loading