Skip to content

Commit f6d0bb3

Browse files
committed
Add array-based enum parameters
1 parent 5004a4b commit f6d0bb3

48 files changed

Lines changed: 418 additions & 101 deletions

Some content is hidden

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

Appwrite/Appwrite.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
<PropertyGroup>
33
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
44
<PackageId>Appwrite</PackageId>
5-
<Version>0.24.0</Version>
5+
<Version>0.25.0</Version>
66
<Authors>Appwrite Team</Authors>
77
<Company>Appwrite Team</Company>
88
<Description>
9-
Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API
9+
Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API
1010
</Description>
1111
<PackageIcon>icon.png</PackageIcon>
1212
<PackageReadmeFile>README.md</PackageReadmeFile>

Appwrite/Client.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ public Client(
6969
_headers = new Dictionary<string, string>()
7070
{
7171
{ "content-type", "application/json" },
72-
{ "user-agent" , $"AppwriteDotNetSDK/0.24.0 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"},
72+
{ "user-agent" , $"AppwriteDotNetSDK/0.25.0 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"},
7373
{ "x-sdk-name", ".NET" },
7474
{ "x-sdk-platform", "server" },
7575
{ "x-sdk-language", "dotnet" },
76-
{ "x-sdk-version", "0.24.0"},
76+
{ "x-sdk-version", "0.25.0"},
7777
{ "X-Appwrite-Response-Format", "1.8.0" }
7878
};
7979

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System;
2+
3+
namespace Appwrite.Enums
4+
{
5+
public class BrowserPermission : IEnum
6+
{
7+
public string Value { get; private set; }
8+
9+
public BrowserPermission(string value)
10+
{
11+
Value = value;
12+
}
13+
14+
public static BrowserPermission Geolocation => new BrowserPermission("geolocation");
15+
public static BrowserPermission Camera => new BrowserPermission("camera");
16+
public static BrowserPermission Microphone => new BrowserPermission("microphone");
17+
public static BrowserPermission Notifications => new BrowserPermission("notifications");
18+
public static BrowserPermission Midi => new BrowserPermission("midi");
19+
public static BrowserPermission Push => new BrowserPermission("push");
20+
public static BrowserPermission ClipboardRead => new BrowserPermission("clipboard-read");
21+
public static BrowserPermission ClipboardWrite => new BrowserPermission("clipboard-write");
22+
public static BrowserPermission PaymentHandler => new BrowserPermission("payment-handler");
23+
public static BrowserPermission Usb => new BrowserPermission("usb");
24+
public static BrowserPermission Bluetooth => new BrowserPermission("bluetooth");
25+
public static BrowserPermission Accelerometer => new BrowserPermission("accelerometer");
26+
public static BrowserPermission Gyroscope => new BrowserPermission("gyroscope");
27+
public static BrowserPermission Magnetometer => new BrowserPermission("magnetometer");
28+
public static BrowserPermission AmbientLightSensor => new BrowserPermission("ambient-light-sensor");
29+
public static BrowserPermission BackgroundSync => new BrowserPermission("background-sync");
30+
public static BrowserPermission PersistentStorage => new BrowserPermission("persistent-storage");
31+
public static BrowserPermission ScreenWakeLock => new BrowserPermission("screen-wake-lock");
32+
public static BrowserPermission WebShare => new BrowserPermission("web-share");
33+
public static BrowserPermission XrSpatialTracking => new BrowserPermission("xr-spatial-tracking");
34+
}
35+
}

Appwrite/Enums/DeploymentStatus.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public DeploymentStatus(string value)
1515
public static DeploymentStatus Processing => new DeploymentStatus("processing");
1616
public static DeploymentStatus Building => new DeploymentStatus("building");
1717
public static DeploymentStatus Ready => new DeploymentStatus("ready");
18+
public static DeploymentStatus Canceled => new DeploymentStatus("canceled");
1819
public static DeploymentStatus Failed => new DeploymentStatus("failed");
1920
}
2021
}

Appwrite/Enums/Name.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public Name(string value)
2121
public static Name V1Webhooks => new Name("v1-webhooks");
2222
public static Name V1Certificates => new Name("v1-certificates");
2323
public static Name V1Builds => new Name("v1-builds");
24+
public static Name V1Screenshots => new Name("v1-screenshots");
2425
public static Name V1Messaging => new Name("v1-messaging");
2526
public static Name V1Migrations => new Name("v1-migrations");
2627
}

Appwrite/Enums/OAuthProvider.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,5 @@ public OAuthProvider(string value)
5050
public static OAuthProvider Yandex => new OAuthProvider("yandex");
5151
public static OAuthProvider Zoho => new OAuthProvider("zoho");
5252
public static OAuthProvider Zoom => new OAuthProvider("zoom");
53-
public static OAuthProvider Mock => new OAuthProvider("mock");
5453
}
5554
}

Appwrite/Enums/OrderBy.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
3+
namespace Appwrite.Enums
4+
{
5+
public class OrderBy : IEnum
6+
{
7+
public string Value { get; private set; }
8+
9+
public OrderBy(string value)
10+
{
11+
Value = value;
12+
}
13+
14+
public static OrderBy Asc => new OrderBy("asc");
15+
public static OrderBy Desc => new OrderBy("desc");
16+
}
17+
}

Appwrite/Enums/Output.cs

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

Appwrite/Enums/Roles.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
3+
namespace Appwrite.Enums
4+
{
5+
public class Roles : IEnum
6+
{
7+
public string Value { get; private set; }
8+
9+
public Roles(string value)
10+
{
11+
Value = value;
12+
}
13+
14+
public static Roles Admin => new Roles("admin");
15+
public static Roles Developer => new Roles("developer");
16+
public static Roles Owner => new Roles("owner");
17+
}
18+
}

Appwrite/Enums/Scopes.cs

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
using System;
2+
3+
namespace Appwrite.Enums
4+
{
5+
public class Scopes : IEnum
6+
{
7+
public string Value { get; private set; }
8+
9+
public Scopes(string value)
10+
{
11+
Value = value;
12+
}
13+
14+
public static Scopes SessionsWrite => new Scopes("sessions.write");
15+
public static Scopes UsersRead => new Scopes("users.read");
16+
public static Scopes UsersWrite => new Scopes("users.write");
17+
public static Scopes TeamsRead => new Scopes("teams.read");
18+
public static Scopes TeamsWrite => new Scopes("teams.write");
19+
public static Scopes DatabasesRead => new Scopes("databases.read");
20+
public static Scopes DatabasesWrite => new Scopes("databases.write");
21+
public static Scopes CollectionsRead => new Scopes("collections.read");
22+
public static Scopes CollectionsWrite => new Scopes("collections.write");
23+
public static Scopes TablesRead => new Scopes("tables.read");
24+
public static Scopes TablesWrite => new Scopes("tables.write");
25+
public static Scopes AttributesRead => new Scopes("attributes.read");
26+
public static Scopes AttributesWrite => new Scopes("attributes.write");
27+
public static Scopes ColumnsRead => new Scopes("columns.read");
28+
public static Scopes ColumnsWrite => new Scopes("columns.write");
29+
public static Scopes IndexesRead => new Scopes("indexes.read");
30+
public static Scopes IndexesWrite => new Scopes("indexes.write");
31+
public static Scopes DocumentsRead => new Scopes("documents.read");
32+
public static Scopes DocumentsWrite => new Scopes("documents.write");
33+
public static Scopes RowsRead => new Scopes("rows.read");
34+
public static Scopes RowsWrite => new Scopes("rows.write");
35+
public static Scopes FilesRead => new Scopes("files.read");
36+
public static Scopes FilesWrite => new Scopes("files.write");
37+
public static Scopes BucketsRead => new Scopes("buckets.read");
38+
public static Scopes BucketsWrite => new Scopes("buckets.write");
39+
public static Scopes FunctionsRead => new Scopes("functions.read");
40+
public static Scopes FunctionsWrite => new Scopes("functions.write");
41+
public static Scopes SitesRead => new Scopes("sites.read");
42+
public static Scopes SitesWrite => new Scopes("sites.write");
43+
public static Scopes LogRead => new Scopes("log.read");
44+
public static Scopes LogWrite => new Scopes("log.write");
45+
public static Scopes ExecutionRead => new Scopes("execution.read");
46+
public static Scopes ExecutionWrite => new Scopes("execution.write");
47+
public static Scopes LocaleRead => new Scopes("locale.read");
48+
public static Scopes AvatarsRead => new Scopes("avatars.read");
49+
public static Scopes HealthRead => new Scopes("health.read");
50+
public static Scopes ProvidersRead => new Scopes("providers.read");
51+
public static Scopes ProvidersWrite => new Scopes("providers.write");
52+
public static Scopes MessagesRead => new Scopes("messages.read");
53+
public static Scopes MessagesWrite => new Scopes("messages.write");
54+
public static Scopes TopicsRead => new Scopes("topics.read");
55+
public static Scopes TopicsWrite => new Scopes("topics.write");
56+
public static Scopes SubscribersRead => new Scopes("subscribers.read");
57+
public static Scopes SubscribersWrite => new Scopes("subscribers.write");
58+
public static Scopes TargetsRead => new Scopes("targets.read");
59+
public static Scopes TargetsWrite => new Scopes("targets.write");
60+
public static Scopes RulesRead => new Scopes("rules.read");
61+
public static Scopes RulesWrite => new Scopes("rules.write");
62+
public static Scopes MigrationsRead => new Scopes("migrations.read");
63+
public static Scopes MigrationsWrite => new Scopes("migrations.write");
64+
public static Scopes VcsRead => new Scopes("vcs.read");
65+
public static Scopes VcsWrite => new Scopes("vcs.write");
66+
public static Scopes AssistantRead => new Scopes("assistant.read");
67+
public static Scopes TokensRead => new Scopes("tokens.read");
68+
public static Scopes TokensWrite => new Scopes("tokens.write");
69+
}
70+
}

0 commit comments

Comments
 (0)