-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from appwrite/dev
Dev
- Loading branch information
Showing
290 changed files
with
4,864 additions
and
1,434 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import json | ||
from ..enums.authenticator_type import AuthenticatorType | ||
from ..enums.authentication_factor import AuthenticationFactor | ||
from ..enums.o_auth_provider import OAuthProvider | ||
from ..enums.browser import Browser | ||
from ..enums.credit_card import CreditCard | ||
from ..enums.flag import Flag | ||
from ..enums.relationship_type import RelationshipType | ||
from ..enums.relation_mutate import RelationMutate | ||
from ..enums.index_type import IndexType | ||
from ..enums.runtime import Runtime | ||
from ..enums.execution_method import ExecutionMethod | ||
from ..enums.name import Name | ||
from ..enums.smtp_encryption import SmtpEncryption | ||
from ..enums.compression import Compression | ||
from ..enums.image_gravity import ImageGravity | ||
from ..enums.image_format import ImageFormat | ||
from ..enums.password_hash import PasswordHash | ||
from ..enums.messaging_provider_type import MessagingProviderType | ||
|
||
class ValueClassEncoder(json.JSONEncoder): | ||
def default(self, o): | ||
if isinstance(o, AuthenticatorType): | ||
return o.value | ||
|
||
if isinstance(o, AuthenticationFactor): | ||
return o.value | ||
|
||
if isinstance(o, OAuthProvider): | ||
return o.value | ||
|
||
if isinstance(o, Browser): | ||
return o.value | ||
|
||
if isinstance(o, CreditCard): | ||
return o.value | ||
|
||
if isinstance(o, Flag): | ||
return o.value | ||
|
||
if isinstance(o, RelationshipType): | ||
return o.value | ||
|
||
if isinstance(o, RelationMutate): | ||
return o.value | ||
|
||
if isinstance(o, IndexType): | ||
return o.value | ||
|
||
if isinstance(o, Runtime): | ||
return o.value | ||
|
||
if isinstance(o, ExecutionMethod): | ||
return o.value | ||
|
||
if isinstance(o, Name): | ||
return o.value | ||
|
||
if isinstance(o, SmtpEncryption): | ||
return o.value | ||
|
||
if isinstance(o, Compression): | ||
return o.value | ||
|
||
if isinstance(o, ImageGravity): | ||
return o.value | ||
|
||
if isinstance(o, ImageFormat): | ||
return o.value | ||
|
||
if isinstance(o, PasswordHash): | ||
return o.value | ||
|
||
if isinstance(o, MessagingProviderType): | ||
return o.value | ||
|
||
return super().default(o) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from enum import Enum | ||
|
||
class AuthenticationFactor(Enum): | ||
EMAIL = "email" | ||
PHONE = "phone" | ||
TOTP = "totp" | ||
RECOVERYCODE = "recoverycode" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from enum import Enum | ||
|
||
class AuthenticatorType(Enum): | ||
TOTP = "totp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from enum import Enum | ||
|
||
class Browser(Enum): | ||
AVANT_BROWSER = "aa" | ||
ANDROID_WEBVIEW_BETA = "an" | ||
GOOGLE_CHROME = "ch" | ||
GOOGLE_CHROME_IOS = "ci" | ||
GOOGLE_CHROME_MOBILE = "cm" | ||
CHROMIUM = "cr" | ||
MOZILLA_FIREFOX = "ff" | ||
SAFARI = "sf" | ||
MOBILE_SAFARI = "mf" | ||
MICROSOFT_EDGE = "ps" | ||
MICROSOFT_EDGE_IOS = "oi" | ||
OPERA_MINI = "om" | ||
OPERA = "op" | ||
OPERA_NEXT = "on" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from enum import Enum | ||
|
||
class Compression(Enum): | ||
NONE = "none" | ||
GZIP = "gzip" | ||
ZSTD = "zstd" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from enum import Enum | ||
|
||
class CreditCard(Enum): | ||
AMERICAN_EXPRESS = "amex" | ||
ARGENCARD = "argencard" | ||
CABAL = "cabal" | ||
CONSOSUD = "censosud" | ||
DINERS_CLUB = "diners" | ||
DISCOVER = "discover" | ||
ELO = "elo" | ||
HIPERCARD = "hipercard" | ||
JCB = "jcb" | ||
MASTERCARD = "mastercard" | ||
NARANJA = "naranja" | ||
TARJETA_SHOPPING = "targeta-shopping" | ||
UNION_CHINA_PAY = "union-china-pay" | ||
VISA = "visa" | ||
MIR = "mir" | ||
MAESTRO = "maestro" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from enum import Enum | ||
|
||
class ExecutionMethod(Enum): | ||
GET = "GET" | ||
POST = "POST" | ||
PUT = "PUT" | ||
PATCH = "PATCH" | ||
DELETE = "DELETE" | ||
OPTIONS = "OPTIONS" |
Oops, something went wrong.