UNPKG

node-appwrite

Version:

Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API

2,033 lines 68.5 kB
/** * Appwrite Models */ declare namespace Models { /** * Documents List */ type DocumentList<Document extends Models.Document> = { /** * Total number of documents documents that matched your query. */ total: number; /** * List of documents. */ documents: Document[]; }; /** * Collections List */ type CollectionList = { /** * Total number of collections documents that matched your query. */ total: number; /** * List of collections. */ collections: Collection[]; }; /** * Databases List */ type DatabaseList = { /** * Total number of databases documents that matched your query. */ total: number; /** * List of databases. */ databases: Database[]; }; /** * Indexes List */ type IndexList = { /** * Total number of indexes documents that matched your query. */ total: number; /** * List of indexes. */ indexes: Index[]; }; /** * Users List */ type UserList<Preferences extends Models.Preferences> = { /** * Total number of users documents that matched your query. */ total: number; /** * List of users. */ users: User<Preferences>[]; }; /** * Sessions List */ type SessionList = { /** * Total number of sessions documents that matched your query. */ total: number; /** * List of sessions. */ sessions: Session[]; }; /** * Identities List */ type IdentityList = { /** * Total number of identities documents that matched your query. */ total: number; /** * List of identities. */ identities: Identity[]; }; /** * Logs List */ type LogList = { /** * Total number of logs documents that matched your query. */ total: number; /** * List of logs. */ logs: Log[]; }; /** * Files List */ type FileList = { /** * Total number of files documents that matched your query. */ total: number; /** * List of files. */ files: File[]; }; /** * Buckets List */ type BucketList = { /** * Total number of buckets documents that matched your query. */ total: number; /** * List of buckets. */ buckets: Bucket[]; }; /** * Resource Tokens List */ type ResourceTokenList = { /** * Total number of tokens documents that matched your query. */ total: number; /** * List of tokens. */ tokens: ResourceToken[]; }; /** * Teams List */ type TeamList<Preferences extends Models.Preferences> = { /** * Total number of teams documents that matched your query. */ total: number; /** * List of teams. */ teams: Team<Preferences>[]; }; /** * Memberships List */ type MembershipList = { /** * Total number of memberships documents that matched your query. */ total: number; /** * List of memberships. */ memberships: Membership[]; }; /** * Sites List */ type SiteList = { /** * Total number of sites documents that matched your query. */ total: number; /** * List of sites. */ sites: Site[]; }; /** * Functions List */ type FunctionList = { /** * Total number of functions documents that matched your query. */ total: number; /** * List of functions. */ functions: Function[]; }; /** * Frameworks List */ type FrameworkList = { /** * Total number of frameworks documents that matched your query. */ total: number; /** * List of frameworks. */ frameworks: Framework[]; }; /** * Runtimes List */ type RuntimeList = { /** * Total number of runtimes documents that matched your query. */ total: number; /** * List of runtimes. */ runtimes: Runtime[]; }; /** * Deployments List */ type DeploymentList = { /** * Total number of deployments documents that matched your query. */ total: number; /** * List of deployments. */ deployments: Deployment[]; }; /** * Executions List */ type ExecutionList = { /** * Total number of executions documents that matched your query. */ total: number; /** * List of executions. */ executions: Execution[]; }; /** * Countries List */ type CountryList = { /** * Total number of countries documents that matched your query. */ total: number; /** * List of countries. */ countries: Country[]; }; /** * Continents List */ type ContinentList = { /** * Total number of continents documents that matched your query. */ total: number; /** * List of continents. */ continents: Continent[]; }; /** * Languages List */ type LanguageList = { /** * Total number of languages documents that matched your query. */ total: number; /** * List of languages. */ languages: Language[]; }; /** * Currencies List */ type CurrencyList = { /** * Total number of currencies documents that matched your query. */ total: number; /** * List of currencies. */ currencies: Currency[]; }; /** * Phones List */ type PhoneList = { /** * Total number of phones documents that matched your query. */ total: number; /** * List of phones. */ phones: Phone[]; }; /** * Variables List */ type VariableList = { /** * Total number of variables documents that matched your query. */ total: number; /** * List of variables. */ variables: Variable[]; }; /** * Locale codes list */ type LocaleCodeList = { /** * Total number of localeCodes documents that matched your query. */ total: number; /** * List of localeCodes. */ localeCodes: LocaleCode[]; }; /** * Provider list */ type ProviderList = { /** * Total number of providers documents that matched your query. */ total: number; /** * List of providers. */ providers: Provider[]; }; /** * Message list */ type MessageList = { /** * Total number of messages documents that matched your query. */ total: number; /** * List of messages. */ messages: Message[]; }; /** * Topic list */ type TopicList = { /** * Total number of topics documents that matched your query. */ total: number; /** * List of topics. */ topics: Topic[]; }; /** * Subscriber list */ type SubscriberList = { /** * Total number of subscribers documents that matched your query. */ total: number; /** * List of subscribers. */ subscribers: Subscriber[]; }; /** * Target list */ type TargetList = { /** * Total number of targets documents that matched your query. */ total: number; /** * List of targets. */ targets: Target[]; }; /** * Specifications List */ type SpecificationList = { /** * Total number of specifications documents that matched your query. */ total: number; /** * List of specifications. */ specifications: Specification[]; }; /** * Database */ type Database = { /** * Database ID. */ $id: string; /** * Database name. */ name: string; /** * Database creation date in ISO 8601 format. */ $createdAt: string; /** * Database update date in ISO 8601 format. */ $updatedAt: string; /** * If database is enabled. Can be &#039;enabled&#039; or &#039;disabled&#039;. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys. */ enabled: boolean; }; /** * Collection */ type Collection = { /** * Collection ID. */ $id: string; /** * Collection creation date in ISO 8601 format. */ $createdAt: string; /** * Collection update date in ISO 8601 format. */ $updatedAt: string; /** * Collection permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ $permissions: string[]; /** * Database ID. */ databaseId: string; /** * Collection name. */ name: string; /** * Collection enabled. Can be &#039;enabled&#039; or &#039;disabled&#039;. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys. */ enabled: boolean; /** * Whether document-level permissions are enabled. [Learn more about permissions](https://appwrite.io/docs/permissions). */ documentSecurity: boolean; /** * Collection attributes. */ attributes: (Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributeString)[]; /** * Collection indexes. */ indexes: Index[]; }; /** * Attributes List */ type AttributeList = { /** * Total number of attributes in the given collection. */ total: number; /** * List of attributes. */ attributes: (Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributeString)[]; }; /** * AttributeString */ type AttributeString = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: string; /** * Error message. Displays error generated on failure of creating or deleting an attribute. */ error: string; /** * Is attribute required? */ required: boolean; /** * Is attribute an array? */ array?: boolean; /** * Attribute creation date in ISO 8601 format. */ $createdAt: string; /** * Attribute update date in ISO 8601 format. */ $updatedAt: string; /** * Attribute size. */ size: number; /** * Default value for attribute when not provided. Cannot be set when attribute is required. */ default?: string; }; /** * AttributeInteger */ type AttributeInteger = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: string; /** * Error message. Displays error generated on failure of creating or deleting an attribute. */ error: string; /** * Is attribute required? */ required: boolean; /** * Is attribute an array? */ array?: boolean; /** * Attribute creation date in ISO 8601 format. */ $createdAt: string; /** * Attribute update date in ISO 8601 format. */ $updatedAt: string; /** * Minimum value to enforce for new documents. */ min?: number; /** * Maximum value to enforce for new documents. */ max?: number; /** * Default value for attribute when not provided. Cannot be set when attribute is required. */ default?: number; }; /** * AttributeFloat */ type AttributeFloat = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: string; /** * Error message. Displays error generated on failure of creating or deleting an attribute. */ error: string; /** * Is attribute required? */ required: boolean; /** * Is attribute an array? */ array?: boolean; /** * Attribute creation date in ISO 8601 format. */ $createdAt: string; /** * Attribute update date in ISO 8601 format. */ $updatedAt: string; /** * Minimum value to enforce for new documents. */ min?: number; /** * Maximum value to enforce for new documents. */ max?: number; /** * Default value for attribute when not provided. Cannot be set when attribute is required. */ default?: number; }; /** * AttributeBoolean */ type AttributeBoolean = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: string; /** * Error message. Displays error generated on failure of creating or deleting an attribute. */ error: string; /** * Is attribute required? */ required: boolean; /** * Is attribute an array? */ array?: boolean; /** * Attribute creation date in ISO 8601 format. */ $createdAt: string; /** * Attribute update date in ISO 8601 format. */ $updatedAt: string; /** * Default value for attribute when not provided. Cannot be set when attribute is required. */ default?: boolean; }; /** * AttributeEmail */ type AttributeEmail = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: string; /** * Error message. Displays error generated on failure of creating or deleting an attribute. */ error: string; /** * Is attribute required? */ required: boolean; /** * Is attribute an array? */ array?: boolean; /** * Attribute creation date in ISO 8601 format. */ $createdAt: string; /** * Attribute update date in ISO 8601 format. */ $updatedAt: string; /** * String format. */ format: string; /** * Default value for attribute when not provided. Cannot be set when attribute is required. */ default?: string; }; /** * AttributeEnum */ type AttributeEnum = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: string; /** * Error message. Displays error generated on failure of creating or deleting an attribute. */ error: string; /** * Is attribute required? */ required: boolean; /** * Is attribute an array? */ array?: boolean; /** * Attribute creation date in ISO 8601 format. */ $createdAt: string; /** * Attribute update date in ISO 8601 format. */ $updatedAt: string; /** * Array of elements in enumerated type. */ elements: string[]; /** * String format. */ format: string; /** * Default value for attribute when not provided. Cannot be set when attribute is required. */ default?: string; }; /** * AttributeIP */ type AttributeIp = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: string; /** * Error message. Displays error generated on failure of creating or deleting an attribute. */ error: string; /** * Is attribute required? */ required: boolean; /** * Is attribute an array? */ array?: boolean; /** * Attribute creation date in ISO 8601 format. */ $createdAt: string; /** * Attribute update date in ISO 8601 format. */ $updatedAt: string; /** * String format. */ format: string; /** * Default value for attribute when not provided. Cannot be set when attribute is required. */ default?: string; }; /** * AttributeURL */ type AttributeUrl = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: string; /** * Error message. Displays error generated on failure of creating or deleting an attribute. */ error: string; /** * Is attribute required? */ required: boolean; /** * Is attribute an array? */ array?: boolean; /** * Attribute creation date in ISO 8601 format. */ $createdAt: string; /** * Attribute update date in ISO 8601 format. */ $updatedAt: string; /** * String format. */ format: string; /** * Default value for attribute when not provided. Cannot be set when attribute is required. */ default?: string; }; /** * AttributeDatetime */ type AttributeDatetime = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: string; /** * Error message. Displays error generated on failure of creating or deleting an attribute. */ error: string; /** * Is attribute required? */ required: boolean; /** * Is attribute an array? */ array?: boolean; /** * Attribute creation date in ISO 8601 format. */ $createdAt: string; /** * Attribute update date in ISO 8601 format. */ $updatedAt: string; /** * ISO 8601 format. */ format: string; /** * Default value for attribute when not provided. Only null is optional */ default?: string; }; /** * AttributeRelationship */ type AttributeRelationship = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: string; /** * Error message. Displays error generated on failure of creating or deleting an attribute. */ error: string; /** * Is attribute required? */ required: boolean; /** * Is attribute an array? */ array?: boolean; /** * Attribute creation date in ISO 8601 format. */ $createdAt: string; /** * Attribute update date in ISO 8601 format. */ $updatedAt: string; /** * The ID of the related collection. */ relatedCollection: string; /** * The type of the relationship. */ relationType: string; /** * Is the relationship two-way? */ twoWay: boolean; /** * The key of the two-way relationship. */ twoWayKey: string; /** * How deleting the parent document will propagate to child documents. */ onDelete: string; /** * Whether this is the parent or child side of the relationship */ side: string; }; /** * Index */ type Index = { /** * Index Key. */ key: string; /** * Index type. */ type: string; /** * Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: string; /** * Error message. Displays error generated on failure of creating or deleting an index. */ error: string; /** * Index attributes. */ attributes: string[]; /** * Index attributes length. */ lengths: number[]; /** * Index orders. */ orders?: string[]; /** * Index creation date in ISO 8601 format. */ $createdAt: string; /** * Index update date in ISO 8601 format. */ $updatedAt: string; }; /** * Document */ type Document = { /** * Document ID. */ $id: string; /** * Collection ID. */ $collectionId: string; /** * Database ID. */ $databaseId: string; /** * Document creation date in ISO 8601 format. */ $createdAt: string; /** * Document update date in ISO 8601 format. */ $updatedAt: string; /** * Document permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ $permissions: string[]; [key: string]: any; }; /** * Log */ type Log = { /** * Event name. */ event: string; /** * User ID. */ userId: string; /** * User Email. */ userEmail: string; /** * User Name. */ userName: string; /** * API mode when event triggered. */ mode: string; /** * IP session in use when the session was created. */ ip: string; /** * Log creation date in ISO 8601 format. */ time: string; /** * Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json). */ osCode: string; /** * Operating system name. */ osName: string; /** * Operating system version. */ osVersion: string; /** * Client type. */ clientType: string; /** * Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json). */ clientCode: string; /** * Client name. */ clientName: string; /** * Client version. */ clientVersion: string; /** * Client engine name. */ clientEngine: string; /** * Client engine name. */ clientEngineVersion: string; /** * Device name. */ deviceName: string; /** * Device brand name. */ deviceBrand: string; /** * Device model name. */ deviceModel: string; /** * Country two-character ISO 3166-1 alpha code. */ countryCode: string; /** * Country name. */ countryName: string; }; /** * User */ type User<Preferences extends Models.Preferences> = { /** * User ID. */ $id: string; /** * User creation date in ISO 8601 format. */ $createdAt: string; /** * User update date in ISO 8601 format. */ $updatedAt: string; /** * User name. */ name: string; /** * Hashed user password. */ password?: string; /** * Password hashing algorithm. */ hash?: string; /** * Password hashing algorithm configuration. */ hashOptions?: object; /** * User registration date in ISO 8601 format. */ registration: string; /** * User status. Pass `true` for enabled and `false` for disabled. */ status: boolean; /** * Labels for the user. */ labels: string[]; /** * Password update time in ISO 8601 format. */ passwordUpdate: string; /** * User email address. */ email: string; /** * User phone number in E.164 format. */ phone: string; /** * Email verification status. */ emailVerification: boolean; /** * Phone verification status. */ phoneVerification: boolean; /** * Multi factor authentication status. */ mfa: boolean; /** * User preferences as a key-value object */ prefs: Preferences; /** * A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider. */ targets: Target[]; /** * Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours. */ accessedAt: string; }; /** * AlgoMD5 */ type AlgoMd5 = { /** * Algo type. */ type: string; }; /** * AlgoSHA */ type AlgoSha = { /** * Algo type. */ type: string; }; /** * AlgoPHPass */ type AlgoPhpass = { /** * Algo type. */ type: string; }; /** * AlgoBcrypt */ type AlgoBcrypt = { /** * Algo type. */ type: string; }; /** * AlgoScrypt */ type AlgoScrypt = { /** * Algo type. */ type: string; /** * CPU complexity of computed hash. */ costCpu: number; /** * Memory complexity of computed hash. */ costMemory: number; /** * Parallelization of computed hash. */ costParallel: number; /** * Length used to compute hash. */ length: number; }; /** * AlgoScryptModified */ type AlgoScryptModified = { /** * Algo type. */ type: string; /** * Salt used to compute hash. */ salt: string; /** * Separator used to compute hash. */ saltSeparator: string; /** * Key used to compute hash. */ signerKey: string; }; /** * AlgoArgon2 */ type AlgoArgon2 = { /** * Algo type. */ type: string; /** * Memory used to compute hash. */ memoryCost: number; /** * Amount of time consumed to compute hash */ timeCost: number; /** * Number of threads used to compute hash. */ threads: number; }; /** * Preferences */ type Preferences = { [key: string]: any; }; /** * Session */ type Session = { /** * Session ID. */ $id: string; /** * Session creation date in ISO 8601 format. */ $createdAt: string; /** * Session update date in ISO 8601 format. */ $updatedAt: string; /** * User ID. */ userId: string; /** * Session expiration date in ISO 8601 format. */ expire: string; /** * Session Provider. */ provider: string; /** * Session Provider User ID. */ providerUid: string; /** * Session Provider Access Token. */ providerAccessToken: string; /** * The date of when the access token expires in ISO 8601 format. */ providerAccessTokenExpiry: string; /** * Session Provider Refresh Token. */ providerRefreshToken: string; /** * IP in use when the session was created. */ ip: string; /** * Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json). */ osCode: string; /** * Operating system name. */ osName: string; /** * Operating system version. */ osVersion: string; /** * Client type. */ clientType: string; /** * Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json). */ clientCode: string; /** * Client name. */ clientName: string; /** * Client version. */ clientVersion: string; /** * Client engine name. */ clientEngine: string; /** * Client engine name. */ clientEngineVersion: string; /** * Device name. */ deviceName: string; /** * Device brand name. */ deviceBrand: string; /** * Device model name. */ deviceModel: string; /** * Country two-character ISO 3166-1 alpha code. */ countryCode: string; /** * Country name. */ countryName: string; /** * Returns true if this the current user session. */ current: boolean; /** * Returns a list of active session factors. */ factors: string[]; /** * Secret used to authenticate the user. Only included if the request was made with an API key */ secret: string; /** * Most recent date in ISO 8601 format when the session successfully passed MFA challenge. */ mfaUpdatedAt: string; }; /** * Identity */ type Identity = { /** * Identity ID. */ $id: string; /** * Identity creation date in ISO 8601 format. */ $createdAt: string; /** * Identity update date in ISO 8601 format. */ $updatedAt: string; /** * User ID. */ userId: string; /** * Identity Provider. */ provider: string; /** * ID of the User in the Identity Provider. */ providerUid: string; /** * Email of the User in the Identity Provider. */ providerEmail: string; /** * Identity Provider Access Token. */ providerAccessToken: string; /** * The date of when the access token expires in ISO 8601 format. */ providerAccessTokenExpiry: string; /** * Identity Provider Refresh Token. */ providerRefreshToken: string; }; /** * Token */ type Token = { /** * Token ID. */ $id: string; /** * Token creation date in ISO 8601 format. */ $createdAt: string; /** * User ID. */ userId: string; /** * Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload. */ secret: string; /** * Token expiration date in ISO 8601 format. */ expire: string; /** * Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email. */ phrase: string; }; /** * JWT */ type Jwt = { /** * JWT encoded string. */ jwt: string; }; /** * Locale */ type Locale = { /** * User IP address. */ ip: string; /** * Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) two-character format */ countryCode: string; /** * Country name. This field support localization. */ country: string; /** * Continent code. A two character continent code &quot;AF&quot; for Africa, &quot;AN&quot; for Antarctica, &quot;AS&quot; for Asia, &quot;EU&quot; for Europe, &quot;NA&quot; for North America, &quot;OC&quot; for Oceania, and &quot;SA&quot; for South America. */ continentCode: string; /** * Continent name. This field support localization. */ continent: string; /** * True if country is part of the European Union. */ eu: boolean; /** * Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format */ currency: string; }; /** * LocaleCode */ type LocaleCode = { /** * Locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) */ code: string; /** * Locale name */ name: string; }; /** * File */ type File = { /** * File ID. */ $id: string; /** * Bucket ID. */ bucketId: string; /** * File creation date in ISO 8601 format. */ $createdAt: string; /** * File update date in ISO 8601 format. */ $updatedAt: string; /** * File permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ $permissions: string[]; /** * File name. */ name: string; /** * File MD5 signature. */ signature: string; /** * File mime type. */ mimeType: string; /** * File original size in bytes. */ sizeOriginal: number; /** * Total number of chunks available */ chunksTotal: number; /** * Total number of chunks uploaded */ chunksUploaded: number; }; /** * Bucket */ type Bucket = { /** * Bucket ID. */ $id: string; /** * Bucket creation time in ISO 8601 format. */ $createdAt: string; /** * Bucket update date in ISO 8601 format. */ $updatedAt: string; /** * Bucket permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ $permissions: string[]; /** * Whether file-level security is enabled. [Learn more about permissions](https://appwrite.io/docs/permissions). */ fileSecurity: boolean; /** * Bucket name. */ name: string; /** * Bucket enabled. */ enabled: boolean; /** * Maximum file size supported. */ maximumFileSize: number; /** * Allowed file extensions. */ allowedFileExtensions: string[]; /** * Compression algorithm choosen for compression. Will be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd). */ compression: string; /** * Bucket is encrypted. */ encryption: boolean; /** * Virus scanning is enabled. */ antivirus: boolean; }; /** * ResourceToken */ type ResourceToken = { /** * Token ID. */ $id: string; /** * Token creation date in ISO 8601 format. */ $createdAt: string; /** * Resource ID. */ resourceId: string; /** * Resource type. */ resourceType: string; /** * Token expiration date in ISO 8601 format. */ expire: string; /** * JWT encoded string. */ secret: string; /** * Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours. */ accessedAt: string; }; /** * Team */ type Team<Preferences extends Models.Preferences> = { /** * Team ID. */ $id: string; /** * Team creation date in ISO 8601 format. */ $createdAt: string; /** * Team update date in ISO 8601 format. */ $updatedAt: string; /** * Team name. */ name: string; /** * Total number of team members. */ total: number; /** * Team preferences as a key-value object */ prefs: Preferences; }; /** * Membership */ type Membership = { /** * Membership ID. */ $id: string; /** * Membership creation date in ISO 8601 format. */ $createdAt: string; /** * Membership update date in ISO 8601 format. */ $updatedAt: string; /** * User ID. */ userId: string; /** * User name. Hide this attribute by toggling membership privacy in the Console. */ userName: string; /** * User email address. Hide this attribute by toggling membership privacy in the Console. */ userEmail: string; /** * Team ID. */ teamId: string; /** * Team name. */ teamName: string; /** * Date, the user has been invited to join the team in ISO 8601 format. */ invited: string; /** * Date, the user has accepted the invitation to join the team in ISO 8601 format. */ joined: string; /** * User confirmation status, true if the user has joined the team or false otherwise. */ confirm: boolean; /** * Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console. */ mfa: boolean; /** * User list of roles */ roles: string[]; }; /** * Site */ type Site = { /** * Site ID. */ $id: string; /** * Site creation date in ISO 8601 format. */ $createdAt: string; /** * Site update date in ISO 8601 format. */ $updatedAt: string; /** * Site name. */ name: string; /** * Site enabled. */ enabled: boolean; /** * Is the site deployed with the latest configuration? This is set to false if you&#039;ve changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the site to update it with the latest configuration. */ live: boolean; /** * When disabled, request logs will exclude logs and errors, and site responses will be slightly faster. */ logging: boolean; /** * Site framework. */ framework: string; /** * Site&#039;s active deployment ID. */ deploymentId: string; /** * Active deployment creation date in ISO 8601 format. */ deploymentCreatedAt: string; /** * Screenshot of active deployment with light theme preference file ID. */ deploymentScreenshotLight: string; /** * Screenshot of active deployment with dark theme preference file ID. */ deploymentScreenshotDark: string; /** * Site&#039;s latest deployment ID. */ latestDeploymentId: string; /** * Latest deployment creation date in ISO 8601 format. */ latestDeploymentCreatedAt: string; /** * Status of latest deployment. Possible values are &quot;waiting&quot;, &quot;processing&quot;, &quot;building&quot;, &quot;ready&quot;, and &quot;failed&quot;. */ latestDeploymentStatus: string; /** * Site variables. */ vars: Variable[]; /** * Site request timeout in seconds. */ timeout: number; /** * The install command used to install the site dependencies. */ installCommand: string; /** * The build command used to build the site. */ buildCommand: string; /** * The directory where the site build output is located. */ outputDirectory: string; /** * Site VCS (Version Control System) installation id. */ installationId: string; /** * VCS (Version Control System) Repository ID */ providerRepositoryId: string; /** * VCS (Version Control System) branch name */ providerBranch: string; /** * Path to site in VCS (Version Control System) repository */ providerRootDirectory: string; /** * Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests */ providerSilentMode: boolean; /** * Machine specification for builds and executions. */ specification: string; /** * Site build runtime. */ buildRuntime: string; /** * Site framework adapter. */ adapter: string; /** * Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed. */ fallbackFile: string; }; /** * Function */ type Function = { /** * Function ID. */ $id: string; /** * Function creation date in ISO 8601 format. */ $createdAt: string; /** * Function update date in ISO 8601 format. */ $updatedAt: string; /** * Execution permissions. */ execute: string[]; /** * Function name. */ name: string; /** * Function enabled. */ enabled: boolean; /** * Is the function deployed with the latest configuration? This is set to false if you&#039;ve changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration. */ live: boolean; /** * When disabled, executions will exclude logs and errors, and will be slightly faster. */ logging: boolean; /** * Function execution and build runtime. */ runtime: string; /** * Function&#039;s active deployment ID. */ deploymentId: string; /** * Active deployment creation date in ISO 8601 format. */ deploymentCreatedAt: string; /** * Function&#039;s latest deployment ID. */ latestDeploymentId: string; /** * Latest deployment creation date in ISO 8601 format. */ latestDeploymentCreatedAt: string; /** * Status of latest deployment. Possible values are &quot;waiting&quot;, &quot;processing&quot;, &quot;building&quot;, &quot;ready&quot;, and &quot;failed&quot;. */ latestDeploymentStatus: string; /** * Allowed permission scopes. */ scopes: string[]; /** * Function variables. */ vars: Variable[]; /** * Function trigger events. */ events: string[]; /** * Function execution schedule in CRON format. */ schedule: string; /** * Function execution timeout in seconds. */ timeout: number; /** * The entrypoint file used to execute the deployment. */ entrypoint: string; /** * The build command used to build the deployment. */ commands: string; /** * Version of Open Runtimes used for the function. */ version: string; /** * Function VCS (Version Control System) installation id. */ installationId: string; /** * VCS (Version Control System) Repository ID */ providerRepositoryId: string; /** * VCS (Version Control System) branch name */ providerBranch: string; /** * Path to function in VCS (Version Control System) repository */ providerRootDirectory: string; /** * Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests */ providerSilentMode: boolean; /** * Machine specificatio