|
| 1 | +from typing import Any, Dict, List, Optional, Union, cast |
| 2 | +from pydantic import Field, PrivateAttr |
| 3 | + |
| 4 | +from .base_model import AppwriteModel |
| 5 | +from .app_secret import AppSecret |
| 6 | + |
| 7 | +class App(AppwriteModel): |
| 8 | + """ |
| 9 | + App |
| 10 | +
|
| 11 | + Attributes |
| 12 | + ---------- |
| 13 | + id : str |
| 14 | + App ID. |
| 15 | + createdat : str |
| 16 | + App creation time in ISO 8601 format. |
| 17 | + updatedat : str |
| 18 | + App update date in ISO 8601 format. |
| 19 | + name : str |
| 20 | + Application name. |
| 21 | + description : str |
| 22 | + Application description shown to users during OAuth2 consent. |
| 23 | + clienturi : str |
| 24 | + Application homepage URL shown to users during OAuth2 consent. |
| 25 | + logouri : str |
| 26 | + Application logo URL shown to users during OAuth2 consent. |
| 27 | + privacypolicyurl : str |
| 28 | + Application privacy policy URL shown to users during OAuth2 consent. |
| 29 | + termsurl : str |
| 30 | + Application terms of service URL shown to users during OAuth2 consent. |
| 31 | + contacts : List[Any] |
| 32 | + Application support or security contact emails. |
| 33 | + tagline : str |
| 34 | + Application tagline shown to users during OAuth2 consent. |
| 35 | + tags : List[Any] |
| 36 | + Application tags shown to users during OAuth2 consent. |
| 37 | + images : List[Any] |
| 38 | + Application image URLs shown to users during OAuth2 consent. |
| 39 | + supporturl : str |
| 40 | + Application support URL shown to users during OAuth2 consent. |
| 41 | + datadeletionurl : str |
| 42 | + Application data deletion URL shown to users during OAuth2 consent. |
| 43 | + redirecturis : List[Any] |
| 44 | + List of authorized redirect URIs. These URIs can be used to redirect users after they authenticate. |
| 45 | + postlogoutredirecturis : List[Any] |
| 46 | + List of authorized post-logout redirect URIs for OpenID Connect RP-Initiated Logout. The logout endpoint only redirects users to URIs in this list after ending their session. |
| 47 | + enabled : bool |
| 48 | + Whether the app is enabled or not. |
| 49 | + type : str |
| 50 | + OAuth2 client type. `public` for SPAs, mobile, and native apps that cannot keep a client secret (PKCE required); `confidential` for server-side clients that authenticate with a client secret. |
| 51 | + deviceflow : bool |
| 52 | + Whether this client may use the OAuth2 Device Authorization Grant (RFC 8628). |
| 53 | + teamid : str |
| 54 | + ID of team that owns the application, if owned by team. Otherwise, user ID will be used. |
| 55 | + userid : str |
| 56 | + ID of user who owns the application, if owned by user. Otherwise, team ID will be used. |
| 57 | + secrets : List[AppSecret] |
| 58 | + List of application secrets. |
| 59 | + """ |
| 60 | + id: str = Field(..., alias='$id') |
| 61 | + createdat: str = Field(..., alias='$createdAt') |
| 62 | + updatedat: str = Field(..., alias='$updatedAt') |
| 63 | + name: str = Field(..., alias='name') |
| 64 | + description: str = Field(..., alias='description') |
| 65 | + clienturi: str = Field(..., alias='clientUri') |
| 66 | + logouri: str = Field(..., alias='logoUri') |
| 67 | + privacypolicyurl: str = Field(..., alias='privacyPolicyUrl') |
| 68 | + termsurl: str = Field(..., alias='termsUrl') |
| 69 | + contacts: List[Any] = Field(..., alias='contacts') |
| 70 | + tagline: str = Field(..., alias='tagline') |
| 71 | + tags: List[Any] = Field(..., alias='tags') |
| 72 | + images: List[Any] = Field(..., alias='images') |
| 73 | + supporturl: str = Field(..., alias='supportUrl') |
| 74 | + datadeletionurl: str = Field(..., alias='dataDeletionUrl') |
| 75 | + redirecturis: List[Any] = Field(..., alias='redirectUris') |
| 76 | + postlogoutredirecturis: List[Any] = Field(..., alias='postLogoutRedirectUris') |
| 77 | + enabled: bool = Field(..., alias='enabled') |
| 78 | + type: str = Field(..., alias='type') |
| 79 | + deviceflow: bool = Field(..., alias='deviceFlow') |
| 80 | + teamid: str = Field(..., alias='teamId') |
| 81 | + userid: str = Field(..., alias='userId') |
| 82 | + secrets: List[AppSecret] = Field(..., alias='secrets') |
0 commit comments