import { DatabaseType } from './enums/database-type.js'; import { AttributeStatus } from './enums/attribute-status.js'; import { ColumnStatus } from './enums/column-status.js'; import { IndexStatus } from './enums/index-status.js'; import { DeploymentStatus } from './enums/deployment-status.js'; import { ExecutionResourceType } from './enums/execution-resource-type.js'; import { ExecutionTrigger } from './enums/execution-trigger.js'; import { ExecutionStatus } from './enums/execution-status.js'; import { ProjectAuthMethodId } from './enums/project-auth-method-id.js'; import { ProjectServiceId } from './enums/project-service-id.js'; import { ProjectProtocolId } from './enums/project-protocol-id.js'; import { OAuth2GooglePrompt } from './enums/o-auth-2-google-prompt.js'; import { OAuth2OidcPrompt } from './enums/o-auth-2-oidc-prompt.js'; import { PlatformType } from './enums/platform-type.js'; import { ProxyRuleDeploymentResourceType } from './enums/proxy-rule-deployment-resource-type.js'; import { ProxyRuleStatus } from './enums/proxy-rule-status.js'; import { MessageStatus } from './enums/message-status.js'; import { BillingPlanGroup } from './enums/billing-plan-group.js'; /** * Appwrite Models */ declare namespace Models { const __default: unique symbol; /** * Rows List */ export type RowList = { /** * Total number of rows that matched your query. */ total: number; /** * List of rows. */ rows: Row[]; }; /** * Documents List */ export type DocumentList = { /** * Total number of documents that matched your query. */ total: number; /** * List of documents. */ documents: Document[]; }; /** * Presences List */ export type PresenceList = { /** * Total number of presences that matched your query. */ total: number; /** * List of presences. */ presences: Presence[]; }; /** * Tables List */ export type TableList = { /** * Total number of tables that matched your query. */ total: number; /** * List of tables. */ tables: Table[]; }; /** * Collections List */ export type CollectionList = { /** * Total number of collections that matched your query. */ total: number; /** * List of collections. */ collections: Collection[]; }; /** * Databases List */ export type DatabaseList = { /** * Total number of databases that matched your query. */ total: number; /** * List of databases. */ databases: Database[]; }; /** * Indexes List */ export type IndexList = { /** * Total number of indexes that matched your query. */ total: number; /** * List of indexes. */ indexes: Index[]; }; /** * Column Indexes List */ export type ColumnIndexList = { /** * Total number of indexes that matched your query. */ total: number; /** * List of indexes. */ indexes: ColumnIndex[]; }; /** * Users List */ export type UserList = { /** * Total number of users that matched your query. */ total: number; /** * List of users. */ users: User[]; }; /** * Sessions List */ export type SessionList = { /** * Total number of sessions that matched your query. */ total: number; /** * List of sessions. */ sessions: Session[]; }; /** * Identities List */ export type IdentityList = { /** * Total number of identities that matched your query. */ total: number; /** * List of identities. */ identities: Identity[]; }; /** * Logs List */ export type LogList = { /** * Total number of logs that matched your query. */ total: number; /** * List of logs. */ logs: Log[]; }; /** * Files List */ export type FileList = { /** * Total number of files that matched your query. */ total: number; /** * List of files. */ files: File[]; }; /** * Buckets List */ export type BucketList = { /** * Total number of buckets that matched your query. */ total: number; /** * List of buckets. */ buckets: Bucket[]; }; /** * Resource Tokens List */ export type ResourceTokenList = { /** * Total number of tokens that matched your query. */ total: number; /** * List of tokens. */ tokens: ResourceToken[]; }; /** * Teams List */ export type TeamList = { /** * Total number of teams that matched your query. */ total: number; /** * List of teams. */ teams: Team[]; }; /** * Memberships List */ export type MembershipList = { /** * Total number of memberships that matched your query. */ total: number; /** * List of memberships. */ memberships: Membership[]; }; /** * Sites List */ export type SiteList = { /** * Total number of sites that matched your query. */ total: number; /** * List of sites. */ sites: Site[]; }; /** * Functions List */ export type FunctionList = { /** * Total number of functions that matched your query. */ total: number; /** * List of functions. */ functions: Function[]; }; /** * Frameworks List */ export type FrameworkList = { /** * Total number of frameworks that matched your query. */ total: number; /** * List of frameworks. */ frameworks: Framework[]; }; /** * Runtimes List */ export type RuntimeList = { /** * Total number of runtimes that matched your query. */ total: number; /** * List of runtimes. */ runtimes: Runtime[]; }; /** * Deployments List */ export type DeploymentList = { /** * Total number of deployments that matched your query. */ total: number; /** * List of deployments. */ deployments: Deployment[]; }; /** * Executions List */ export type ExecutionList = { /** * Total number of executions that matched your query. */ total: number; /** * List of executions. */ executions: Execution[]; }; /** * Projects List */ export type ProjectList = { /** * Total number of projects that matched your query. */ total: number; /** * List of projects. */ projects: Project[]; }; /** * Webhooks List */ export type WebhookList = { /** * Total number of webhooks that matched your query. */ total: number; /** * List of webhooks. */ webhooks: Webhook[]; }; /** * API Keys List */ export type KeyList = { /** * Total number of keys that matched your query. */ total: number; /** * List of keys. */ keys: Key[]; }; /** * Countries List */ export type CountryList = { /** * Total number of countries that matched your query. */ total: number; /** * List of countries. */ countries: Country[]; }; /** * Continents List */ export type ContinentList = { /** * Total number of continents that matched your query. */ total: number; /** * List of continents. */ continents: Continent[]; }; /** * Languages List */ export type LanguageList = { /** * Total number of languages that matched your query. */ total: number; /** * List of languages. */ languages: Language[]; }; /** * Currencies List */ export type CurrencyList = { /** * Total number of currencies that matched your query. */ total: number; /** * List of currencies. */ currencies: Currency[]; }; /** * Phones List */ export type PhoneList = { /** * Total number of phones that matched your query. */ total: number; /** * List of phones. */ phones: Phone[]; }; /** * Variables List */ export type VariableList = { /** * Total number of variables that matched your query. */ total: number; /** * List of variables. */ variables: Variable[]; }; /** * Mock Numbers List */ export type MockNumberList = { /** * Total number of mockNumbers that matched your query. */ total: number; /** * List of mockNumbers. */ mockNumbers: MockNumber[]; }; /** * Policies List */ export type PolicyList = { /** * Total number of policies in the given project. */ total: number; /** * List of policies. */ policies: (Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyMfaFactors | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail | Models.PolicyDenyCorporateEmail)[]; }; /** * Email Templates List */ export type EmailTemplateList = { /** * Total number of templates that matched your query. */ total: number; /** * List of templates. */ templates: EmailTemplate[]; }; /** * Rule List */ export type ProxyRuleList = { /** * Total number of rules that matched your query. */ total: number; /** * List of rules. */ rules: ProxyRule[]; }; /** * Locale codes list */ export type LocaleCodeList = { /** * Total number of localeCodes that matched your query. */ total: number; /** * List of localeCodes. */ localeCodes: LocaleCode[]; }; /** * Provider list */ export type ProviderList = { /** * Total number of providers that matched your query. */ total: number; /** * List of providers. */ providers: Provider[]; }; /** * Message list */ export type MessageList = { /** * Total number of messages that matched your query. */ total: number; /** * List of messages. */ messages: Message[]; }; /** * Topic list */ export type TopicList = { /** * Total number of topics that matched your query. */ total: number; /** * List of topics. */ topics: Topic[]; }; /** * Subscriber list */ export type SubscriberList = { /** * Total number of subscribers that matched your query. */ total: number; /** * List of subscribers. */ subscribers: Subscriber[]; }; /** * Target list */ export type TargetList = { /** * Total number of targets that matched your query. */ total: number; /** * List of targets. */ targets: Target[]; }; /** * Transaction List */ export type TransactionList = { /** * Total number of transactions that matched your query. */ total: number; /** * List of transactions. */ transactions: Transaction[]; }; /** * Specifications List */ export type SpecificationList = { /** * Total number of specifications that matched your query. */ total: number; /** * List of specifications. */ specifications: Specification[]; }; /** * VectorsDB Collections List */ export type VectorsdbCollectionList = { /** * Total number of collections that matched your query. */ total: number; /** * List of collections. */ collections: VectorsdbCollection[]; }; /** * Embedding list */ export type EmbeddingList = { /** * Total number of embeddings that matched your query. */ total: number; /** * List of embeddings. */ embeddings: Embedding[]; }; /** * Insights List */ export type InsightList = { /** * Total number of insights that matched your query. */ total: number; /** * List of insights. */ insights: Insight[]; }; /** * Reports List */ export type ReportList = { /** * Total number of reports that matched your query. */ total: number; /** * List of reports. */ reports: Report[]; }; /** * Database */ export 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 'enabled' or 'disabled'. When disabled, the database is inaccessible to users, but remains accessible to Server SDKs using API keys. */ enabled: boolean; /** * Database type. */ type: DatabaseType; /** * Dedicated database lifecycle status. Null when the database has no valid dedicated backing. */ status?: DatabaseStatus; /** * Underlying engine of the dedicated backing: postgresql, mysql, or mongodb. A managed product (tablesdb, documentsdb, vectorsdb) reports the engine it runs on, so its type and engine can differ. Null when the database has no dedicated backing. */ engine?: string; /** * Compute specification identifier of the dedicated backing, e.g. s-2vcpu-2gb. Null when the database has no dedicated backing. */ specification?: string; /** * Number of secondary high availability replicas, excluding the primary. Null when backing configuration is unavailable. */ replicas?: number; /** * Error message when the dedicated backing failed. Null when the database has no dedicated backing or has not failed. */ error?: string; /** * Container status of the dedicated backing: active or inactive. Null when the database has no dedicated backing or the runtime has not reported one. */ containerStatus?: string; /** * Idle-lifecycle state of the dedicated backing: active, warm, cold, or hibernated. Null when the database has no dedicated backing or the runtime has not reported one. */ lifecycleState?: string; /** * Database backup policies. */ policies?: BackupPolicy[]; /** * Database backup archives. */ archives?: BackupArchive[]; }; /** * Embedding */ export type Embedding = { /** * Embedding model used to generate embeddings. */ model: string; /** * Number of dimensions for each embedding vector. */ dimension: number; /** * Embedding vector values. If an error occurs, this will be an empty array. */ embedding: number[]; /** * Error message if embedding generation fails. Empty string if no error. */ error: string; }; /** * Collection */ export 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 'enabled' or 'disabled'. 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.AttributeBigint | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString)[]; /** * Collection indexes. */ indexes: Index[]; /** * Maximum document size in bytes. Returns 0 when no limit applies. */ bytesMax: number; /** * Currently used document size in bytes based on defined attributes. */ bytesUsed: number; }; /** * Attributes List */ export type AttributeList = { /** * Total number of attributes in the given collection. */ total: number; /** * List of attributes. */ attributes: (Models.AttributeBoolean | Models.AttributeBigint | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString)[]; }; /** * AttributeString */ export type AttributeString = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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; /** * Defines whether this attribute is encrypted or not. */ encrypt?: boolean; }; /** * AttributeInteger */ export type AttributeInteger = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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 | bigint; /** * Maximum value to enforce for new documents. */ max?: number | bigint; /** * Default value for attribute when not provided. Cannot be set when attribute is required. */ default?: number; }; /** * AttributeBigInt */ export type AttributeBigint = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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 | bigint; /** * Maximum value to enforce for new documents. */ max?: number | bigint; /** * Default value for attribute when not provided. Cannot be set when attribute is required. */ default?: number | bigint; }; /** * AttributeFloat */ export type AttributeFloat = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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 */ export type AttributeBoolean = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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 */ export type AttributeEmail = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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 */ export type AttributeEnum = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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 */ export type AttributeIp = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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 */ export type AttributeUrl = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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 */ export type AttributeDatetime = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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 */ export type AttributeRelationship = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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; }; /** * AttributePoint */ export type AttributePoint = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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?: number[]; }; /** * AttributeLine */ export type AttributeLine = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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?: number[][]; }; /** * AttributePolygon */ export type AttributePolygon = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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?: number[][][]; }; /** * AttributeVarchar */ export type AttributeVarchar = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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; /** * Defines whether this attribute is encrypted or not. */ encrypt?: boolean; }; /** * AttributeText */ export type AttributeText = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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?: string; /** * Defines whether this attribute is encrypted or not. */ encrypt?: boolean; }; /** * AttributeMediumtext */ export type AttributeMediumtext = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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?: string; /** * Defines whether this attribute is encrypted or not. */ encrypt?: boolean; }; /** * AttributeLongtext */ export type AttributeLongtext = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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?: string; /** * Defines whether this attribute is encrypted or not. */ encrypt?: boolean; }; /** * VectorsDB Collection */ export type VectorsdbCollection = { /** * 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 'enabled' or 'disabled'. 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.AttributeObject | Models.AttributeVector)[]; /** * Collection indexes. */ indexes: Index[]; /** * Maximum document size in bytes. Returns 0 when no limit applies. */ bytesMax: number; /** * Currently used document size in bytes based on defined attributes. */ bytesUsed: number; /** * Embedding dimension. */ dimension: number; }; /** * AttributeObject */ export type AttributeObject = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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; }; /** * AttributeVector */ export type AttributeVector = { /** * Attribute Key. */ key: string; /** * Attribute type. */ type: string; /** * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: AttributeStatus; /** * 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; /** * Vector dimensions. */ size: number; }; /** * Table */ export type Table = { /** * Table ID. */ $id: string; /** * Table creation date in ISO 8601 format. */ $createdAt: string; /** * Table update date in ISO 8601 format. */ $updatedAt: string; /** * Table permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ $permissions: string[]; /** * Database ID. */ databaseId: string; /** * Table name. */ name: string; /** * Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys. */ enabled: boolean; /** * Whether row-level permissions are enabled. [Learn more about permissions](https://appwrite.io/docs/permissions). */ rowSecurity: boolean; /** * Table columns. */ columns: (Models.ColumnBoolean | Models.ColumnBigint | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[]; /** * Table indexes. */ indexes: ColumnIndex[]; /** * Maximum row size in bytes. Returns 0 when no limit applies. */ bytesMax: number; /** * Currently used row size in bytes based on defined columns. */ bytesUsed: number; }; /** * Columns List */ export type ColumnList = { /** * Total number of columns in the given table. */ total: number; /** * List of columns. */ columns: (Models.ColumnBoolean | Models.ColumnBigint | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[]; }; /** * ColumnString */ export type ColumnString = { /** * Column Key. */ key: string; /** * Column type. */ type: string; /** * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: ColumnStatus; /** * Error message. Displays error generated on failure of creating or deleting an column. */ error: string; /** * Is column required? */ required: boolean; /** * Is column an array? */ array?: boolean; /** * Column creation date in ISO 8601 format. */ $createdAt: string; /** * Column update date in ISO 8601 format. */ $updatedAt: string; /** * Column size. */ size: number; /** * Default value for column when not provided. Cannot be set when column is required. */ default?: string; /** * Defines whether this column is encrypted or not. */ encrypt?: boolean; }; /** * ColumnInteger */ export type ColumnInteger = { /** * Column Key. */ key: string; /** * Column type. */ type: string; /** * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: ColumnStatus; /** * Error message. Displays error generated on failure of creating or deleting an column. */ error: string; /** * Is column required? */ required: boolean; /** * Is column an array? */ array?: boolean; /** * Column creation date in ISO 8601 format. */ $createdAt: string; /** * Column update date in ISO 8601 format. */ $updatedAt: string; /** * Minimum value to enforce for new documents. */ min?: number | bigint; /** * Maximum value to enforce for new documents. */ max?: number | bigint; /** * Default value for column when not provided. Cannot be set when column is required. */ default?: number; }; /** * ColumnBigInt */ export type ColumnBigint = { /** * Column Key. */ key: string; /** * Column type. */ type: string; /** * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: ColumnStatus; /** * Error message. Displays error generated on failure of creating or deleting an column. */ error: string; /** * Is column required? */ required: boolean; /** * Is column an array? */ array?: boolean; /** * Column creation date in ISO 8601 format. */ $createdAt: string; /** * Column update date in ISO 8601 format. */ $updatedAt: string; /** * Minimum value to enforce for new documents. */ min?: number | bigint; /** * Maximum value to enforce for new documents. */ max?: number | bigint; /** * Default value for column when not provided. Cannot be set when column is required. */ default?: number | bigint; }; /** * ColumnFloat */ export type ColumnFloat = { /** * Column Key. */ key: string; /** * Column type. */ type: string; /** * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: ColumnStatus; /** * Error message. Displays error generated on failure of creating or deleting an column. */ error: string; /** * Is column required? */ required: boolean; /** * Is column an array? */ array?: boolean; /** * Column creation date in ISO 8601 format. */ $createdAt: string; /** * Column 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 column when not provided. Cannot be set when column is required. */ default?: number; }; /** * ColumnBoolean */ export type ColumnBoolean = { /** * Column Key. */ key: string; /** * Column type. */ type: string; /** * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: ColumnStatus; /** * Error message. Displays error generated on failure of creating or deleting an column. */ error: string; /** * Is column required? */ required: boolean; /** * Is column an array? */ array?: boolean; /** * Column creation date in ISO 8601 format. */ $createdAt: string; /** * Column update date in ISO 8601 format. */ $updatedAt: string; /** * Default value for column when not provided. Cannot be set when column is required. */ default?: boolean; }; /** * ColumnEmail */ export type ColumnEmail = { /** * Column Key. */ key: string; /** * Column type. */ type: string; /** * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: ColumnStatus; /** * Error message. Displays error generated on failure of creating or deleting an column. */ error: string; /** * Is column required? */ required: boolean; /** * Is column an array? */ array?: boolean; /** * Column creation date in ISO 8601 format. */ $createdAt: string; /** * Column update date in ISO 8601 format. */ $updatedAt: string; /** * String format. */ format: string; /** * Default value for column when not provided. Cannot be set when column is required. */ default?: string; }; /** * ColumnEnum */ export type ColumnEnum = { /** * Column Key. */ key: string; /** * Column type. */ type: string; /** * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: ColumnStatus; /** * Error message. Displays error generated on failure of creating or deleting an column. */ error: string; /** * Is column required? */ required: boolean; /** * Is column an array? */ array?: boolean; /** * Column creation date in ISO 8601 format. */ $createdAt: string; /** * Column update date in ISO 8601 format. */ $updatedAt: string; /** * Array of elements in enumerated type. */ elements: string[]; /** * String format. */ format: string; /** * Default value for column when not provided. Cannot be set when column is required. */ default?: string; }; /** * ColumnIP */ export type ColumnIp = { /** * Column Key. */ key: string; /** * Column type. */ type: string; /** * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: ColumnStatus; /** * Error message. Displays error generated on failure of creating or deleting an column. */ error: string; /** * Is column required? */ required: boolean; /** * Is column an array? */ array?: boolean; /** * Column creation date in ISO 8601 format. */ $createdAt: string; /** * Column update date in ISO 8601 format. */ $updatedAt: string; /** * String format. */ format: string; /** * Default value for column when not provided. Cannot be set when column is required. */ default?: string; }; /** * ColumnURL */ export type ColumnUrl = { /** * Column Key. */ key: string; /** * Column type. */ type: string; /** * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: ColumnStatus; /** * Error message. Displays error generated on failure of creating or deleting an column. */ error: string; /** * Is column required? */ required: boolean; /** * Is column an array? */ array?: boolean; /** * Column creation date in ISO 8601 format. */ $createdAt: string; /** * Column update date in ISO 8601 format. */ $updatedAt: string; /** * String format. */ format: string; /** * Default value for column when not provided. Cannot be set when column is required. */ default?: string; }; /** * ColumnDatetime */ export type ColumnDatetime = { /** * Column Key. */ key: string; /** * Column type. */ type: string; /** * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: ColumnStatus; /** * Error message. Displays error generated on failure of creating or deleting an column. */ error: string; /** * Is column required? */ required: boolean; /** * Is column an array? */ array?: boolean; /** * Column creation date in ISO 8601 format. */ $createdAt: string; /** * Column update date in ISO 8601 format. */ $updatedAt: string; /** * ISO 8601 format. */ format: string; /** * Default value for column when not provided. Only null is optional */ default?: string; }; /** * ColumnRelationship */ export type ColumnRelationship = { /** * Column Key. */ key: string; /** * Column type. */ type: string; /** * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: ColumnStatus; /** * Error message. Displays error generated on failure of creating or deleting an column. */ error: string; /** * Is column required? */ required: boolean; /** * Is column an array? */ array?: boolean; /** * Column creation date in ISO 8601 format. */ $createdAt: string; /** * Column update date in ISO 8601 format. */ $updatedAt: string; /** * The ID of the related table. */ relatedTable: 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; }; /** * ColumnPoint */ export type ColumnPoint = { /** * Column Key. */ key: string; /** * Column type. */ type: string; /** * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: ColumnStatus; /** * Error message. Displays error generated on failure of creating or deleting an column. */ error: string; /** * Is column required? */ required: boolean; /** * Is column an array? */ array?: boolean; /** * Column creation date in ISO 8601 format. */ $createdAt: string; /** * Column update date in ISO 8601 format. */ $updatedAt: string; /** * Default value for column when not provided. Cannot be set when column is required. */ default?: number[]; }; /** * ColumnLine */ export type ColumnLine = { /** * Column Key. */ key: string; /** * Column type. */ type: string; /** * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: ColumnStatus; /** * Error message. Displays error generated on failure of creating or deleting an column. */ error: string; /** * Is column required? */ required: boolean; /** * Is column an array? */ array?: boolean; /** * Column creation date in ISO 8601 format. */ $createdAt: string; /** * Column update date in ISO 8601 format. */ $updatedAt: string; /** * Default value for column when not provided. Cannot be set when column is required. */ default?: number[][]; }; /** * ColumnPolygon */ export type ColumnPolygon = { /** * Column Key. */ key: string; /** * Column type. */ type: string; /** * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: ColumnStatus; /** * Error message. Displays error generated on failure of creating or deleting an column. */ error: string; /** * Is column required? */ required: boolean; /** * Is column an array? */ array?: boolean; /** * Column creation date in ISO 8601 format. */ $createdAt: string; /** * Column update date in ISO 8601 format. */ $updatedAt: string; /** * Default value for column when not provided. Cannot be set when column is required. */ default?: number[][][]; }; /** * ColumnVarchar */ export type ColumnVarchar = { /** * Column Key. */ key: string; /** * Column type. */ type: string; /** * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: ColumnStatus; /** * Error message. Displays error generated on failure of creating or deleting an column. */ error: string; /** * Is column required? */ required: boolean; /** * Is column an array? */ array?: boolean; /** * Column creation date in ISO 8601 format. */ $createdAt: string; /** * Column update date in ISO 8601 format. */ $updatedAt: string; /** * Column size. */ size: number; /** * Default value for column when not provided. Cannot be set when column is required. */ default?: string; /** * Defines whether this column is encrypted or not. */ encrypt?: boolean; }; /** * ColumnText */ export type ColumnText = { /** * Column Key. */ key: string; /** * Column type. */ type: string; /** * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: ColumnStatus; /** * Error message. Displays error generated on failure of creating or deleting an column. */ error: string; /** * Is column required? */ required: boolean; /** * Is column an array? */ array?: boolean; /** * Column creation date in ISO 8601 format. */ $createdAt: string; /** * Column update date in ISO 8601 format. */ $updatedAt: string; /** * Default value for column when not provided. Cannot be set when column is required. */ default?: string; /** * Defines whether this column is encrypted or not. */ encrypt?: boolean; }; /** * ColumnMediumtext */ export type ColumnMediumtext = { /** * Column Key. */ key: string; /** * Column type. */ type: string; /** * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: ColumnStatus; /** * Error message. Displays error generated on failure of creating or deleting an column. */ error: string; /** * Is column required? */ required: boolean; /** * Is column an array? */ array?: boolean; /** * Column creation date in ISO 8601 format. */ $createdAt: string; /** * Column update date in ISO 8601 format. */ $updatedAt: string; /** * Default value for column when not provided. Cannot be set when column is required. */ default?: string; /** * Defines whether this column is encrypted or not. */ encrypt?: boolean; }; /** * ColumnLongtext */ export type ColumnLongtext = { /** * Column Key. */ key: string; /** * Column type. */ type: string; /** * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: ColumnStatus; /** * Error message. Displays error generated on failure of creating or deleting an column. */ error: string; /** * Is column required? */ required: boolean; /** * Is column an array? */ array?: boolean; /** * Column creation date in ISO 8601 format. */ $createdAt: string; /** * Column update date in ISO 8601 format. */ $updatedAt: string; /** * Default value for column when not provided. Cannot be set when column is required. */ default?: string; /** * Defines whether this column is encrypted or not. */ encrypt?: boolean; }; /** * Index */ export type Index = { /** * Index ID. */ $id: string; /** * Index creation date in ISO 8601 format. */ $createdAt: string; /** * Index update date in ISO 8601 format. */ $updatedAt: string; /** * Index key. */ key: string; /** * Index type. */ type: string; /** * Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed` */ status: IndexStatus; /** * 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 */ export type ColumnIndex = { /** * Index ID. */ $id: string; /** * Index creation date in ISO 8601 format. */ $createdAt: string; /** * Index update date in ISO 8601 format. */ $updatedAt: string; /** * 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 columns. */ columns: string[]; /** * Index columns length. */ lengths: number[]; /** * Index orders. */ orders?: string[]; }; /** * Row */ export type Row = { /** * Row ID. */ $id: string; /** * Row sequence ID. */ $sequence: string; /** * Table ID. */ $tableId: string; /** * Database ID. */ $databaseId: string; /** * Row creation date in ISO 8601 format. */ $createdAt: string; /** * Row update date in ISO 8601 format. */ $updatedAt: string; /** * Row permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ $permissions: string[]; }; export type DefaultRow = Row & { [key: string]: any; [__default]: true; }; /** * Document */ export type Document = { /** * Document ID. */ $id: string; /** * Document sequence ID. */ $sequence: 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[]; }; export type DefaultDocument = Document & { [key: string]: any; [__default]: true; }; /** * Presence */ export type Presence = { /** * Presence ID. */ $id: string; /** * Presence creation date in ISO 8601 format. */ $createdAt: string; /** * Presence update date in ISO 8601 format. */ $updatedAt: string; /** * Presence permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ $permissions: string[]; /** * User ID. */ userId: string; /** * Presence status. */ status?: string; /** * Presence source. */ source: string; /** * Presence expiry date in ISO 8601 format. */ expiresAt?: string; /** * Presence metadata. */ metadata?: object; }; /** * Log */ export type Log = { /** * Event name. */ event: string; /** * User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user. */ userId: string; /** * User email of the actor recorded for this log. During impersonation, this is the original impersonator. */ userEmail: string; /** * User name of the actor recorded for this log. During impersonation, this is the original impersonator. */ userName: string; /** * API mode when event triggered. */ mode: string; /** * User type who triggered the audit log. Possible values: user, admin, guest, hidden, keyProject, keyAccount, keyOrganization. */ userType: 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 */ export type User = { /** * 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; /** * Canonical form of the user email address. */ emailCanonical?: string; /** * Whether the user email is from a free email provider. */ emailIsFree?: boolean; /** * Whether the user email is from a disposable email provider. */ emailIsDisposable?: boolean; /** * Whether the user email is from a corporate domain. */ emailIsCorporate?: boolean; /** * Whether the user email is in its canonical form. */ emailIsCanonical?: 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; /** * Whether the user can impersonate other users. */ impersonator?: boolean; /** * ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data. */ impersonatorUserId?: string; }; /** * AlgoMD5 */ export type AlgoMd5 = { /** * Algo type. */ type: string; }; /** * AlgoSHA */ export type AlgoSha = { /** * Algo type. */ type: string; }; /** * AlgoPHPass */ export type AlgoPhpass = { /** * Algo type. */ type: string; }; /** * AlgoBcrypt */ export type AlgoBcrypt = { /** * Algo type. */ type: string; }; /** * AlgoScrypt */ export 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 */ export 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 */ export 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 */ export type Preferences = {}; export type DefaultPreferences = Preferences & { [key: string]: any; [__default]: true; }; /** * Session */ export 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 */ export 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 */ export 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 */ export type Jwt = { /** * JWT encoded string. */ jwt: string; }; /** * Locale */ export 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 "AF" for Africa, "AN" for Antarctica, "AS" for Asia, "EU" for Europe, "NA" for North America, "OC" for Oceania, and "SA" 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; /** * City */ city?: string; /** * Name of timezone */ timeZone?: string; /** * Postal code */ postalCode?: string; /** * Latitude */ latitude?: number; /** * Longitude */ longitude?: number; /** * Autonomous System Number (ASN) of the IP */ autonomousSystemNumber?: string; /** * Organization that owns the ASN */ autonomousSystemOrganization?: string; /** * Internet service provider of the IP */ isp?: string; /** * Connection type of the IP (e.g. cable, cellular, corporate) */ connectionType?: string; /** * User type classification of the IP (e.g. residential, business, hosting) */ connectionUsageType?: string; /** * Registered organization of the IP */ connectionOrganization?: string; }; /** * LocaleCode */ export 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 */ export 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; /** * Virtual folder containing the file, with a trailing slash. Empty for the bucket root. */ folder: string; /** * Full virtual path of the file: the folder followed by the file name. */ key: string; /** * File MD5 signature. */ signature: string; /** * File mime type. */ mimeType: string; /** * File original size in bytes. */ sizeOriginal: number; /** * File actual stored size in bytes after compression and/or encryption. */ sizeActual: number; /** * Total number of chunks available */ chunksTotal: number; /** * Total number of chunks uploaded */ chunksUploaded: number; /** * Whether file contents are encrypted at rest. */ encryption: boolean; /** * Compression algorithm used for the file. Will be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd). */ compression: string; }; /** * Bucket */ export 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 chosen 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; /** * Image transformations are enabled. */ transformations: boolean; /** * Total size of this bucket in bytes. */ totalSize: number; }; /** * ResourceToken */ export 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 */ export type Team = { /** * 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 */ export 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; /** * User phone number. Hide this attribute by toggling membership privacy in the Console. */ userPhone: 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; /** * Most recent access date in ISO 8601 format. Show this attribute by toggling membership privacy in the Console. */ userAccessedAt: string; /** * User list of roles */ roles: string[]; }; /** * Site */ export 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'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; /** * How many days to keep the non-active deployments before they will be automatically deleted. */ deploymentRetention: number; /** * Site'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's latest deployment ID. */ latestDeploymentId: string; /** * Latest deployment creation date in ISO 8601 format. */ latestDeploymentCreatedAt: string; /** * Status of latest deployment. Possible values are "waiting", "processing", "building", "ready", and "failed". */ latestDeploymentStatus: string; /** * Allowed permission scopes. */ scopes: 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; /** * Custom command to use when starting site runtime. */ startCommand: 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; /** * List of branch name patterns that trigger automatic deployments. Supports glob wildcards. Empty list deploys on all branches. */ providerBranches: string[]; /** * List of file path patterns that trigger automatic deployments. Supports glob wildcards. Empty list deploys on all file changes. */ providerPaths: string[]; /** * Machine specification for deployment builds. */ buildSpecification: string; /** * Machine specification for SSR executions. */ runtimeSpecification: 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 */ export 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'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; /** * How many days to keep the non-active deployments before they will be automatically deleted. */ deploymentRetention: number; /** * Function's active deployment ID. */ deploymentId: string; /** * Active deployment creation date in ISO 8601 format. */ deploymentCreatedAt: string; /** * Function's latest deployment ID. */ latestDeploymentId: string; /** * Latest deployment creation date in ISO 8601 format. */ latestDeploymentCreatedAt: string; /** * Status of latest deployment. Possible values are "waiting", "processing", "building", "ready", and "failed". */ 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; /** * List of branch name patterns that trigger automatic deployments. Supports glob wildcards. Empty list deploys on all branches. */ providerBranches: string[]; /** * List of file path patterns that trigger automatic deployments. Supports glob wildcards. Empty list deploys on all file changes. */ providerPaths: string[]; /** * Machine specification for deployment builds. */ buildSpecification: string; /** * Machine specification for executions. */ runtimeSpecification: string; }; /** * Runtime */ export type Runtime = { /** * Runtime ID. */ $id: string; /** * Parent runtime key. */ key: string; /** * Runtime Name. */ name: string; /** * Runtime version. */ version: string; /** * Base Docker image used to build the runtime. */ base: string; /** * Image name of Docker Hub. */ image: string; /** * Name of the logo image. */ logo: string; /** * List of supported architectures. */ supports: string[]; }; /** * Framework */ export type Framework = { /** * Framework key. */ key: string; /** * Framework Name. */ name: string; /** * Default runtime version. */ buildRuntime: string; /** * List of supported runtime versions. */ runtimes: string[]; /** * List of supported adapters. */ adapters: FrameworkAdapter[]; }; /** * Framework Adapter */ export type FrameworkAdapter = { /** * Adapter key. */ key: string; /** * Default command to download dependencies. */ installCommand: string; /** * Default command to build site into output directory. */ buildCommand: string; /** * Default output directory of build. */ outputDirectory: string; /** * Name of fallback file to use instead of 404 page. If null, Appwrite 404 page will be displayed. */ fallbackFile?: string; }; /** * Deployment */ export type Deployment = { /** * Deployment ID. */ $id: string; /** * Deployment creation date in ISO 8601 format. */ $createdAt: string; /** * Deployment update date in ISO 8601 format. */ $updatedAt: string; /** * Type of deployment. */ type: string; /** * Resource ID. */ resourceId: string; /** * Resource type. */ resourceType: string; /** * The entrypoint file to use to execute the deployment code. */ entrypoint: string; /** * The code size in bytes. */ sourceSize: number; /** * The build output size in bytes. */ buildSize: number; /** * The total size in bytes (source and build output). */ totalSize: number; /** * The current build ID. */ buildId: string; /** * Whether the deployment should be automatically activated. */ activate: boolean; /** * Screenshot with light theme preference file ID. */ screenshotLight: string; /** * Screenshot with dark theme preference file ID. */ screenshotDark: string; /** * The deployment status. Possible values are "waiting", "processing", "building", "ready", "canceled" and "failed". */ status: DeploymentStatus; /** * The build logs. */ buildLogs: string; /** * The current build time in seconds. */ buildDuration: number; /** * The name of the vcs provider repository */ providerRepositoryName: string; /** * The name of the vcs provider repository owner */ providerRepositoryOwner: string; /** * The url of the vcs provider repository */ providerRepositoryUrl: string; /** * The commit hash of the vcs commit */ providerCommitHash: string; /** * The url of vcs commit author */ providerCommitAuthorUrl: string; /** * The name of vcs commit author */ providerCommitAuthor: string; /** * The commit message */ providerCommitMessage: string; /** * The url of the vcs commit */ providerCommitUrl: string; /** * The branch of the vcs repository */ providerBranch: string; /** * The branch of the vcs repository */ providerBranchUrl: string; }; /** * Execution */ export type Execution = { /** * Execution ID. */ $id: string; /** * Execution creation date in ISO 8601 format. */ $createdAt: string; /** * Execution update date in ISO 8601 format. */ $updatedAt: string; /** * Execution roles. */ $permissions: string[]; /** * Function or site ID. */ resourceId: string; /** * Execution resource type. */ resourceType: ExecutionResourceType; /** * Deployment ID used to create the execution. */ deploymentId: string; /** * The trigger that caused the resource to execute. Possible values can be: `http`, `schedule`, or `event`. */ trigger: ExecutionTrigger; /** * The status of the resource execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`. */ status: ExecutionStatus; /** * HTTP request method type. */ requestMethod: string; /** * HTTP request path and query. */ requestPath: string; /** * HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous. */ requestHeaders: Headers[]; /** * HTTP response status code. */ responseStatusCode: number; /** * HTTP response body. This will return empty unless execution is created as synchronous. */ responseBody: string; /** * HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous. */ responseHeaders: Headers[]; /** * Resource logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload. */ logs: string; /** * Resource errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload. */ errors: string; /** * Resource(function/site) execution duration in seconds. */ duration: number; /** * The scheduled time for execution. If left empty, execution will be queued immediately. */ scheduledAt?: string; }; /** * Project */ export type Project = { /** * Project ID. */ $id: string; /** * Project creation date in ISO 8601 format. */ $createdAt: string; /** * Project update date in ISO 8601 format. */ $updatedAt: string; /** * Project name. */ name: string; /** * Project team ID. */ teamId: string; /** * Project region */ region: string; /** * Deprecated since 1.9.5: List of dev keys. */ devKeys: DevKey[]; /** * Status for custom SMTP */ smtpEnabled: boolean; /** * SMTP sender name */ smtpSenderName: string; /** * SMTP sender email */ smtpSenderEmail: string; /** * SMTP reply to name */ smtpReplyToName: string; /** * SMTP reply to email */ smtpReplyToEmail: string; /** * SMTP server host name */ smtpHost: string; /** * SMTP server port */ smtpPort: number; /** * SMTP server username */ smtpUsername: string; /** * SMTP server password. This property is write-only and always returned empty. */ smtpPassword: string; /** * SMTP server secure protocol */ smtpSecure: string; /** * Number of times the ping was received for this project. */ pingCount: number; /** * Last ping datetime in ISO 8601 format. */ pingedAt: string; /** * Labels for the project. */ labels: string[]; /** * Project status */ status: string; /** * Stage progress (completed or skipped) with timestamps and actor types, keyed by stage id. */ onboarding: object; /** * List of auth methods. */ authMethods: ProjectAuthMethod[]; /** * List of services. */ services: ProjectService[]; /** * List of protocols. */ protocols: ProjectProtocol[]; /** * Project blocks information */ blocks: Block[]; /** * Last time the project was accessed via console. Used with plan's projectInactivityDays to determine if project is paused. */ consoleAccessedAt: string; /** * Whether WAF enforcement is enabled for the project. */ wafEnabled?: boolean; /** * Billing limits reached */ billingLimits?: BillingLimits; /** * OAuth2 server status */ oAuth2ServerEnabled?: boolean; /** * OAuth2 server authorization URL */ oAuth2ServerAuthorizationUrl?: string; /** * OAuth2 server allowed scopes */ oAuth2ServerScopes?: string[]; /** * OAuth2 server scopes used when an authorization request omits the scope parameter */ oAuth2ServerDefaultScopes?: string[]; /** * Scopes an application may request when installed on a team */ oAuth2ServerInstallationScopes?: string[]; /** * OAuth2 server accepted RFC 9396 authorization_details types */ oAuth2ServerAuthorizationDetailsTypes?: string[]; /** * OAuth2 server access token duration in seconds for confidential clients */ oAuth2ServerAccessTokenDuration?: number; /** * OAuth2 server refresh token duration in seconds for confidential clients */ oAuth2ServerRefreshTokenDuration?: number; /** * OAuth2 server access token duration in seconds for public clients (SPAs, mobile, native) */ oAuth2ServerPublicAccessTokenDuration?: number; /** * OAuth2 server refresh token duration in seconds for public clients (SPAs, mobile, native) */ oAuth2ServerPublicRefreshTokenDuration?: number; /** * OAuth2 server access token duration in seconds for app installation access tokens */ oAuth2ServerInstallationAccessTokenDuration?: number; /** * When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting. */ oAuth2ServerConfidentialPkce?: boolean; /** * URL to your application page where users enter the device flow user code. Empty when the Device Authorization Grant is not configured. */ oAuth2ServerVerificationUrl?: string; /** * Number of characters in the device flow user code, excluding the formatting separator. */ oAuth2ServerUserCodeLength?: number; /** * Character set for device flow user codes: `numeric`, `alphabetic`, or `alphanumeric`. */ oAuth2ServerUserCodeFormat?: string; /** * Lifetime in seconds of device flow device codes and user codes. */ oAuth2ServerDeviceCodeDuration?: number; /** * OAuth2 server discovery URL */ oAuth2ServerDiscoveryUrl?: string; }; /** * ProjectAuthMethod */ export type ProjectAuthMethod = { /** * Auth method ID. */ $id: ProjectAuthMethodId; /** * Auth method status. */ enabled: boolean; }; /** * ProjectService */ export type ProjectService = { /** * Service ID. */ $id: ProjectServiceId; /** * Service status. */ enabled: boolean; }; /** * ProjectProtocol */ export type ProjectProtocol = { /** * Protocol ID. */ $id: ProjectProtocolId; /** * Protocol status. */ enabled: boolean; }; /** * Webhook */ export type Webhook = { /** * Webhook ID. */ $id: string; /** * Webhook creation date in ISO 8601 format. */ $createdAt: string; /** * Webhook update date in ISO 8601 format. */ $updatedAt: string; /** * Webhook name. */ name: string; /** * Webhook URL endpoint. */ url: string; /** * Webhook trigger events. */ events: string[]; /** * Indicates if SSL / TLS certificate verification is enabled. */ tls: boolean; /** * HTTP basic authentication username. */ authUsername: string; /** * HTTP basic authentication password. */ authPassword: string; /** * Signature key which can be used to validate incoming webhook payloads. Only returned on creation and secret rotation. */ secret: string; /** * Indicates if this webhook is enabled. */ enabled: boolean; /** * Webhook error logs from the most recent failure. */ logs: string; /** * Number of consecutive failed webhook attempts. */ attempts: number; }; /** * Key */ export type Key = { /** * Key ID. */ $id: string; /** * Key creation date in ISO 8601 format. */ $createdAt: string; /** * Key update date in ISO 8601 format. */ $updatedAt: string; /** * Key name. */ name: string; /** * Key expiration date in ISO 8601 format. */ expire: string; /** * Allowed permission scopes. */ scopes: string[]; /** * Secret key. */ secret: string; /** * Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours. */ accessedAt: string; /** * List of SDK user agents that used this key. */ sdks: string[]; }; /** * Ephemeral Key */ export type EphemeralKey = { /** * Key ID. */ $id: string; /** * Key creation date in ISO 8601 format. */ $createdAt: string; /** * Key update date in ISO 8601 format. */ $updatedAt: string; /** * Key name. */ name: string; /** * Key expiration date in ISO 8601 format. */ expire: string; /** * Allowed permission scopes. */ scopes: string[]; /** * Secret key. */ secret: string; /** * Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours. */ accessedAt: string; /** * List of SDK user agents that used this key. */ sdks: string[]; }; /** * DevKey */ export type DevKey = { /** * Key ID. */ $id: string; /** * Key creation date in ISO 8601 format. */ $createdAt: string; /** * Key update date in ISO 8601 format. */ $updatedAt: string; /** * Key name. */ name: string; /** * Key expiration date in ISO 8601 format. */ expire: string; /** * Secret key. */ secret: string; /** * Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours. */ accessedAt: string; /** * List of SDK user agents that used this key. */ sdks: string[]; }; /** * Mock Number */ export type MockNumber = { /** * Mock phone number for testing phone authentication. Useful for testing phone authentication without sending an SMS. */ number: string; /** * Mock OTP for the number. */ otp: string; /** * Attribute creation date in ISO 8601 format. */ $createdAt: string; /** * Attribute update date in ISO 8601 format. */ $updatedAt: string; }; /** * OAuth2GitHub */ export type OAuth2Github = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * GitHub OAuth2 client ID. For GitHub Apps, use the "App ID" when both an App ID and client ID are available. */ clientId: string; /** * GitHub OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2Discord */ export type OAuth2Discord = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Discord OAuth2 client ID. */ clientId: string; /** * Discord OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2Figma */ export type OAuth2Figma = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Figma OAuth2 client ID. */ clientId: string; /** * Figma OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2Dropbox */ export type OAuth2Dropbox = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Dropbox OAuth2 app key. */ appKey: string; /** * Dropbox OAuth2 app secret. */ appSecret: string; }; /** * OAuth2Dailymotion */ export type OAuth2Dailymotion = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Dailymotion OAuth2 API key. */ apiKey: string; /** * Dailymotion OAuth2 API secret. */ apiSecret: string; }; /** * OAuth2Bitbucket */ export type OAuth2Bitbucket = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Bitbucket OAuth2 key. */ key: string; /** * Bitbucket OAuth2 secret. */ secret: string; }; /** * OAuth2Bitly */ export type OAuth2Bitly = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Bitly OAuth2 client ID. */ clientId: string; /** * Bitly OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2Box */ export type OAuth2Box = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Box OAuth2 client ID. */ clientId: string; /** * Box OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2Autodesk */ export type OAuth2Autodesk = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Autodesk OAuth2 client ID. */ clientId: string; /** * Autodesk OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2Google */ export type OAuth2Google = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Google OAuth2 client ID. */ clientId: string; /** * Google OAuth2 client secret. */ clientSecret: string; /** * Google OAuth2 prompt values. */ prompt: OAuth2GooglePrompt[]; }; /** * OAuth2Zoom */ export type OAuth2Zoom = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Zoom OAuth2 client ID. */ clientId: string; /** * Zoom OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2Zoho */ export type OAuth2Zoho = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Zoho OAuth2 client ID. */ clientId: string; /** * Zoho OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2Yandex */ export type OAuth2Yandex = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Yandex OAuth2 client ID. */ clientId: string; /** * Yandex OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2X */ export type OAuth2X = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * X OAuth2 customer key. */ customerKey: string; /** * X OAuth2 secret key. */ secretKey: string; }; /** * OAuth2WordPress */ export type OAuth2WordPress = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * WordPress OAuth2 client ID. */ clientId: string; /** * WordPress OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2Twitch */ export type OAuth2Twitch = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Twitch OAuth2 client ID. */ clientId: string; /** * Twitch OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2Stripe */ export type OAuth2Stripe = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Stripe OAuth2 client ID. */ clientId: string; /** * Stripe OAuth2 API secret key. */ apiSecretKey: string; }; /** * OAuth2Spotify */ export type OAuth2Spotify = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Spotify OAuth2 client ID. */ clientId: string; /** * Spotify OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2Slack */ export type OAuth2Slack = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Slack OAuth2 client ID. */ clientId: string; /** * Slack OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2Podio */ export type OAuth2Podio = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Podio OAuth2 client ID. */ clientId: string; /** * Podio OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2Notion */ export type OAuth2Notion = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Notion OAuth2 client ID. */ oauthClientId: string; /** * Notion OAuth2 client secret. */ oauthClientSecret: string; }; /** * OAuth2Salesforce */ export type OAuth2Salesforce = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Salesforce OAuth2 consumer key. */ customerKey: string; /** * Salesforce OAuth2 consumer secret. */ customerSecret: string; }; /** * OAuth2Yahoo */ export type OAuth2Yahoo = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Yahoo OAuth2 client ID. */ clientId: string; /** * Yahoo OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2Cloudflare */ export type OAuth2Cloudflare = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Cloudflare OAuth2 client ID. */ clientId: string; /** * Cloudflare OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2HuggingFace */ export type OAuth2HuggingFace = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Hugging Face OAuth2 client ID. */ clientId: string; /** * Hugging Face OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2Linkedin */ export type OAuth2Linkedin = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * LinkedIn OAuth2 client ID. */ clientId: string; /** * LinkedIn OAuth2 primary client secret. */ primaryClientSecret: string; }; /** * OAuth2Disqus */ export type OAuth2Disqus = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Disqus OAuth2 public key. */ publicKey: string; /** * Disqus OAuth2 secret key. */ secretKey: string; }; /** * OAuth2Amazon */ export type OAuth2Amazon = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Amazon OAuth2 client ID. */ clientId: string; /** * Amazon OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2Etsy */ export type OAuth2Etsy = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Etsy OAuth2 keystring. */ keyString: string; /** * Etsy OAuth2 shared secret. */ sharedSecret: string; }; /** * OAuth2Facebook */ export type OAuth2Facebook = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Facebook OAuth2 app ID. */ appId: string; /** * Facebook OAuth2 app secret. */ appSecret: string; }; /** * OAuth2Tradeshift */ export type OAuth2Tradeshift = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Tradeshift OAuth2 client ID. */ oauth2ClientId: string; /** * Tradeshift OAuth2 client secret. */ oauth2ClientSecret: string; }; /** * OAuth2Paypal */ export type OAuth2Paypal = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * PayPal OAuth2 client ID. */ clientId: string; /** * PayPal OAuth2 secret key. */ secretKey: string; }; /** * OAuth2Gitlab */ export type OAuth2Gitlab = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * GitLab OAuth2 application ID. */ applicationId: string; /** * GitLab OAuth2 secret. */ secret: string; /** * GitLab OAuth2 endpoint URL. Defaults to https://gitlab.com for self-hosted instances. */ endpoint: string; }; /** * OAuth2Appwrite */ export type OAuth2Appwrite = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Appwrite OAuth2 client ID. */ clientId: string; /** * Appwrite OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2Authentik */ export type OAuth2Authentik = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Authentik OAuth2 client ID. */ clientId: string; /** * Authentik OAuth2 client secret. */ clientSecret: string; /** * Authentik OAuth2 endpoint domain. */ endpoint: string; }; /** * OAuth2Auth0 */ export type OAuth2Auth0 = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Auth0 OAuth2 client ID. */ clientId: string; /** * Auth0 OAuth2 client secret. */ clientSecret: string; /** * Auth0 OAuth2 endpoint domain. */ endpoint: string; }; /** * OAuth2FusionAuth */ export type OAuth2FusionAuth = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * FusionAuth OAuth2 client ID. */ clientId: string; /** * FusionAuth OAuth2 client secret. */ clientSecret: string; /** * FusionAuth OAuth2 endpoint domain. */ endpoint: string; }; /** * OAuth2Keycloak */ export type OAuth2Keycloak = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Keycloak OAuth2 client ID. */ clientId: string; /** * Keycloak OAuth2 client secret. */ clientSecret: string; /** * Keycloak OAuth2 endpoint domain. */ endpoint: string; /** * Keycloak OAuth2 realm name. */ realmName: string; }; /** * OAuth2Oidc */ export type OAuth2Oidc = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * OpenID Connect OAuth2 client ID. */ clientId: string; /** * OpenID Connect OAuth2 client secret. */ clientSecret: string; /** * OpenID Connect well-known configuration URL. When set, authorization, token, and user info endpoints can be discovered automatically. */ wellKnownURL: string; /** * OpenID Connect authorization endpoint URL. */ authorizationURL: string; /** * OpenID Connect token endpoint URL. */ tokenURL: string; /** * OpenID Connect user info endpoint URL. */ userInfoURL: string; /** * OpenID Connect prompt values controlling the authentication and consent screens. */ prompt: OAuth2OidcPrompt[]; /** * Maximum authentication age in seconds. When set, the user must have authenticated within this many seconds. */ maxAge?: number; }; /** * OAuth2Okta */ export type OAuth2Okta = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Okta OAuth2 client ID. */ clientId: string; /** * Okta OAuth2 client secret. */ clientSecret: string; /** * Okta OAuth2 domain. */ domain: string; /** * Okta OAuth2 authorization server ID. */ authorizationServerId: string; }; /** * OAuth2Kick */ export type OAuth2Kick = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Kick OAuth2 client ID. */ clientId: string; /** * Kick OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2Apple */ export type OAuth2Apple = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Apple OAuth2 service ID. */ serviceId: string; /** * Apple OAuth2 key ID. */ keyId: string; /** * Apple OAuth2 team ID. */ teamId: string; /** * Apple OAuth2 .p8 private key file contents. The secret key wrapped by the PEM markers is 200 characters long. */ p8File: string; }; /** * OAuth2Microsoft */ export type OAuth2Microsoft = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Microsoft OAuth2 application ID. */ applicationId: string; /** * Microsoft OAuth2 application secret. */ applicationSecret: string; /** * Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID. */ tenant: string; }; /** * OAuth2Resend */ export type OAuth2Resend = { /** * OAuth2 provider ID. */ $id: string; /** * OAuth2 provider is active and can be used to create sessions. */ enabled: boolean; /** * Resend OAuth2 client ID. */ clientId: string; /** * Resend OAuth2 client secret. */ clientSecret: string; }; /** * OAuth2 Providers List */ export type OAuth2ProviderList = { /** * Total number of OAuth2 providers in the given project. */ total: number; /** * List of OAuth2 providers. */ providers: (Models.OAuth2Github | Models.OAuth2Discord | Models.OAuth2Figma | Models.OAuth2Dropbox | Models.OAuth2Dailymotion | Models.OAuth2Bitbucket | Models.OAuth2Bitly | Models.OAuth2Box | Models.OAuth2Autodesk | Models.OAuth2Google | Models.OAuth2Zoom | Models.OAuth2Zoho | Models.OAuth2Yandex | Models.OAuth2X | Models.OAuth2WordPress | Models.OAuth2Twitch | Models.OAuth2Stripe | Models.OAuth2Spotify | Models.OAuth2Slack | Models.OAuth2Podio | Models.OAuth2Notion | Models.OAuth2Salesforce | Models.OAuth2Yahoo | Models.OAuth2Linkedin | Models.OAuth2Disqus | Models.OAuth2Amazon | Models.OAuth2Etsy | Models.OAuth2Facebook | Models.OAuth2Tradeshift | Models.OAuth2Paypal | Models.OAuth2Gitlab | Models.OAuth2Appwrite | Models.OAuth2Authentik | Models.OAuth2Auth0 | Models.OAuth2FusionAuth | Models.OAuth2Keycloak | Models.OAuth2Oidc | Models.OAuth2Apple | Models.OAuth2Okta | Models.OAuth2Kick | Models.OAuth2Microsoft | Models.OAuth2HuggingFace | Models.OAuth2Resend | Models.OAuth2Cloudflare)[]; }; /** * Policy Password Dictionary */ export type PolicyPasswordDictionary = { /** * Policy ID. */ $id: string; /** * Whether password dictionary policy is enabled. */ enabled: boolean; }; /** * Policy Password History */ export type PolicyPasswordHistory = { /** * Policy ID. */ $id: string; /** * Password history length. A value of 0 means the policy is disabled. */ total: number; }; /** * Policy Password Strength */ export type PolicyPasswordStrength = { /** * Policy ID. */ $id: string; /** * Minimum password length required for user passwords. */ min: number; /** * Whether passwords must include at least one uppercase letter. */ uppercase: boolean; /** * Whether passwords must include at least one lowercase letter. */ lowercase: boolean; /** * Whether passwords must include at least one number. */ number: boolean; /** * Whether passwords must include at least one symbol. */ symbols: boolean; }; /** * Policy Password Personal Data */ export type PolicyPasswordPersonalData = { /** * Policy ID. */ $id: string; /** * Whether password personal data policy is enabled. */ enabled: boolean; }; /** * Policy Session Alert */ export type PolicySessionAlert = { /** * Policy ID. */ $id: string; /** * Whether session alert policy is enabled. */ enabled: boolean; }; /** * Policy Session Duration */ export type PolicySessionDuration = { /** * Policy ID. */ $id: string; /** * Session duration in seconds. */ duration: number; }; /** * Policy Session Invalidation */ export type PolicySessionInvalidation = { /** * Policy ID. */ $id: string; /** * Whether session invalidation policy is enabled. */ enabled: boolean; }; /** * Policy Session Limit */ export type PolicySessionLimit = { /** * Policy ID. */ $id: string; /** * Maximum number of sessions allowed per user. A value of 0 means the policy is disabled. */ total: number; }; /** * Policy User Limit */ export type PolicyUserLimit = { /** * Policy ID. */ $id: string; /** * Maximum number of users allowed in the project. A value of 0 means the policy is disabled. */ total: number; }; /** * Policy Membership Privacy */ export type PolicyMembershipPrivacy = { /** * Policy ID. */ $id: string; /** * Whether user ID is visible in memberships. */ userId: boolean; /** * Whether user email is visible in memberships. */ userEmail: boolean; /** * Whether user phone is visible in memberships. */ userPhone: boolean; /** * Whether user name is visible in memberships. */ userName: boolean; /** * Whether user MFA status is visible in memberships. */ userMFA: boolean; /** * Whether user last access time is visible in memberships. */ userAccessedAt: boolean; }; /** * Policy MFA Factors */ export type PolicyMfaFactors = { /** * Policy ID. */ $id: string; /** * Whether TOTP can be used to complete an MFA challenge. */ totp: boolean; /** * Whether email can be used to complete an MFA challenge. */ email: boolean; /** * Whether phone (SMS) can be used to complete an MFA challenge. */ phone: boolean; /** * Whether the custom factor can be used to complete an MFA challenge. */ custom: boolean; }; /** * Platform Web */ export type PlatformWeb = { /** * Platform ID. */ $id: string; /** * Platform creation date in ISO 8601 format. */ $createdAt: string; /** * Platform update date in ISO 8601 format. */ $updatedAt: string; /** * Platform name. */ name: string; /** * Platform type. Possible values are: windows, apple, android, linux, web. */ type: PlatformType; /** * Web app hostname. Empty string for other platforms. */ hostname: string; }; /** * Platform Apple */ export type PlatformApple = { /** * Platform ID. */ $id: string; /** * Platform creation date in ISO 8601 format. */ $createdAt: string; /** * Platform update date in ISO 8601 format. */ $updatedAt: string; /** * Platform name. */ name: string; /** * Platform type. Possible values are: windows, apple, android, linux, web. */ type: PlatformType; /** * Apple bundle identifier. */ bundleIdentifier: string; }; /** * Platform Android */ export type PlatformAndroid = { /** * Platform ID. */ $id: string; /** * Platform creation date in ISO 8601 format. */ $createdAt: string; /** * Platform update date in ISO 8601 format. */ $updatedAt: string; /** * Platform name. */ name: string; /** * Platform type. Possible values are: windows, apple, android, linux, web. */ type: PlatformType; /** * Android application ID. */ applicationId: string; }; /** * Platform Windows */ export type PlatformWindows = { /** * Platform ID. */ $id: string; /** * Platform creation date in ISO 8601 format. */ $createdAt: string; /** * Platform update date in ISO 8601 format. */ $updatedAt: string; /** * Platform name. */ name: string; /** * Platform type. Possible values are: windows, apple, android, linux, web. */ type: PlatformType; /** * Windows package identifier name. */ packageIdentifierName: string; }; /** * Platform Linux */ export type PlatformLinux = { /** * Platform ID. */ $id: string; /** * Platform creation date in ISO 8601 format. */ $createdAt: string; /** * Platform update date in ISO 8601 format. */ $updatedAt: string; /** * Platform name. */ name: string; /** * Platform type. Possible values are: windows, apple, android, linux, web. */ type: PlatformType; /** * Linux package name. */ packageName: string; }; /** * Platforms List */ export type PlatformList = { /** * Total number of platforms in the given project. */ total: number; /** * List of platforms. */ platforms: (Models.PlatformWeb | Models.PlatformApple | Models.PlatformAndroid | Models.PlatformWindows | Models.PlatformLinux)[]; }; /** * Variable */ export type Variable = { /** * Variable ID. */ $id: string; /** * Variable creation date in ISO 8601 format. */ $createdAt: string; /** * Variable creation date in ISO 8601 format. */ $updatedAt: string; /** * Variable key. */ key: string; /** * Variable value. */ value: string; /** * Variable secret flag. Secret variables can only be updated or deleted, but never read. */ secret: boolean; /** * Service to which the variable belongs. Possible values are "project", "function" */ resourceType: string; /** * ID of resource to which the variable belongs. If resourceType is "project", it is empty. If resourceType is "function", it is ID of the function. */ resourceId: string; }; /** * Country */ export type Country = { /** * Country name. */ name: string; /** * Country two-character ISO 3166-1 alpha code. */ code: string; }; /** * Continent */ export type Continent = { /** * Continent name. */ name: string; /** * Continent two letter code. */ code: string; }; /** * Language */ export type Language = { /** * Language name. */ name: string; /** * Language two-character ISO 639-1 codes. */ code: string; /** * Language native name. */ nativeName: string; }; /** * Currency */ export type Currency = { /** * Currency symbol. */ symbol: string; /** * Currency name. */ name: string; /** * Currency native symbol. */ symbolNative: string; /** * Number of decimal digits. */ decimalDigits: number; /** * Currency digit rounding. */ rounding: number; /** * Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format. */ code: string; /** * Currency plural name */ namePlural: string; }; /** * Phone */ export type Phone = { /** * Phone code. */ code: string; /** * Country two-character ISO 3166-1 alpha code. */ countryCode: string; /** * Country name. */ countryName: string; }; /** * Headers */ export type Headers = { /** * Header name. */ name: string; /** * Header value. */ value: string; }; /** * Specification */ export type Specification = { /** * Memory size in MB. */ memory: number; /** * Number of CPUs. */ cpus: number; /** * Is size enabled. */ enabled: boolean; /** * Size slug. */ slug: string; }; /** * Rule */ export type ProxyRule = { /** * Rule ID. */ $id: string; /** * Rule creation date in ISO 8601 format. */ $createdAt: string; /** * Rule update date in ISO 8601 format. */ $updatedAt: string; /** * Domain name. */ domain: string; /** * Action definition for the rule. Possible values are "api", "deployment", or "redirect" */ type: string; /** * Defines how the rule was created. Possible values are "manual" or "deployment" */ trigger: string; /** * URL to redirect to. Used if type is "redirect" */ redirectUrl: string; /** * Status code to apply during redirect. Used if type is "redirect" */ redirectStatusCode: number; /** * ID of deployment. Used if type is "deployment" */ deploymentId: string; /** * Type of deployment. Possible values are "function", "site". Used if rule's type is "deployment". */ deploymentResourceType?: ProxyRuleDeploymentResourceType; /** * ID of deployment's resource (site or function ID). Used if type is "deployment" */ deploymentResourceId: string; /** * Name of Git branch that updates rule. Used if type is "deployment" */ deploymentVcsProviderBranch: string; /** * Domain verification status. Possible values are "unverified", "verifying", "verified" */ status: ProxyRuleStatus; /** * Logs from rule verification or certificate generation. Certificate generation logs are prioritized if both are available. */ logs: string; /** * Certificate auto-renewal date in ISO 8601 format. */ renewAt: string; }; /** * EmailTemplate */ export type EmailTemplate = { /** * Template type */ templateId: string; /** * Template locale */ locale: string; /** * Template message */ message: string; /** * Name of the sender */ senderName: string; /** * Email of the sender */ senderEmail: string; /** * Reply to email address */ replyToEmail: string; /** * Reply to name */ replyToName: string; /** * Email subject */ subject: string; }; /** * MFA Challenge */ export type MfaChallenge = { /** * Token ID. */ $id: string; /** * Token creation date in ISO 8601 format. */ $createdAt: string; /** * User ID. */ userId: string; /** * Token expiration date in ISO 8601 format. */ expire: string; }; /** * MFA Challenge Secret */ export type MfaChallengeSecret = { /** * Token ID. */ $id: string; /** * Token creation date in ISO 8601 format. */ $createdAt: string; /** * User ID. */ userId: string; /** * Token expiration date in ISO 8601 format. */ expire: string; /** * Challenge code to be delivered to the end user through a custom channel. */ code: string; }; /** * MFA Recovery Codes */ export type MfaRecoveryCodes = { /** * Recovery codes. */ recoveryCodes: string[]; }; /** * MFAType */ export type MfaType = { /** * Secret token used for TOTP factor. */ secret: string; /** * URI for authenticator apps. */ uri: string; }; /** * MFAFactors */ export type MfaFactors = { /** * Can TOTP be used for MFA challenge for this account. */ totp: boolean; /** * Can phone (SMS) be used for MFA challenge for this account. */ phone: boolean; /** * Can email be used for MFA challenge for this account. */ email: boolean; /** * Can recovery code be used for MFA challenge for this account. */ recoveryCode: boolean; /** * Can custom factor be used for MFA challenge for this account. */ custom: boolean; }; /** * Provider */ export type Provider = { /** * Provider ID. */ $id: string; /** * Provider creation time in ISO 8601 format. */ $createdAt: string; /** * Provider update date in ISO 8601 format. */ $updatedAt: string; /** * The name for the provider instance. */ name: string; /** * The name of the provider service. */ provider: string; /** * Is provider enabled? */ enabled: boolean; /** * Type of provider. */ type: string; /** * Provider credentials. */ credentials: object; /** * Provider options. */ options?: object; }; /** * Message */ export type Message = { /** * Message ID. */ $id: string; /** * Message creation time in ISO 8601 format. */ $createdAt: string; /** * Message update date in ISO 8601 format. */ $updatedAt: string; /** * Message provider type. */ providerType: string; /** * Topic IDs set as recipients. */ topics: string[]; /** * User IDs set as recipients. */ users: string[]; /** * Target IDs set as recipients. */ targets: string[]; /** * The scheduled time for message. */ scheduledAt?: string; /** * The time when the message was delivered. */ deliveredAt?: string; /** * Delivery errors if any. */ deliveryErrors?: string[]; /** * Number of recipients the message was delivered to. */ deliveredTotal: number; /** * Data of the message. */ data: object; /** * Status of delivery. */ status: MessageStatus; }; /** * Topic */ export type Topic = { /** * Topic ID. */ $id: string; /** * Topic creation time in ISO 8601 format. */ $createdAt: string; /** * Topic update date in ISO 8601 format. */ $updatedAt: string; /** * The name of the topic. */ name: string; /** * Total count of email subscribers subscribed to the topic. */ emailTotal: number; /** * Total count of SMS subscribers subscribed to the topic. */ smsTotal: number; /** * Total count of push subscribers subscribed to the topic. */ pushTotal: number; /** * Subscribe permissions. */ subscribe: string[]; }; /** * Transaction */ export type Transaction = { /** * Transaction ID. */ $id: string; /** * Transaction creation time in ISO 8601 format. */ $createdAt: string; /** * Transaction update date in ISO 8601 format. */ $updatedAt: string; /** * Current status of the transaction. One of: pending, committing, committed, rolled_back, failed. */ status: string; /** * Number of operations in the transaction. */ operations: number; /** * Expiration time in ISO 8601 format. */ expiresAt: string; }; /** * Subscriber */ export type Subscriber = { /** * Subscriber ID. */ $id: string; /** * Subscriber creation time in ISO 8601 format. */ $createdAt: string; /** * Subscriber update date in ISO 8601 format. */ $updatedAt: string; /** * Target ID. */ targetId: string; /** * Target. */ target: Target; /** * Topic ID. */ userId: string; /** * User Name. */ userName: string; /** * Topic ID. */ topicId: string; /** * The target provider type. Can be one of the following: `email`, `sms` or `push`. */ providerType: string; }; /** * Target */ export type Target = { /** * Target ID. */ $id: string; /** * Target creation time in ISO 8601 format. */ $createdAt: string; /** * Target update date in ISO 8601 format. */ $updatedAt: string; /** * Target Name. */ name: string; /** * User ID. */ userId: string; /** * Provider ID. */ providerId?: string; /** * The target provider type. Can be one of the following: `email`, `sms` or `push`. */ providerType: string; /** * The target identifier. */ identifier: string; /** * Is the target expired. */ expired: boolean; }; /** * Insight */ export type Insight = { /** * Insight ID. */ $id: string; /** * Insight creation date in ISO 8601 format. */ $createdAt: string; /** * Insight update date in ISO 8601 format. */ $updatedAt: string; /** * Parent report ID. Insights always belong to a report. */ reportId: string; /** * Insight type. One of databaseIndex (legacy), tablesDBIndex, documentsDBIndex, vectorsDBIndex, databasePerformance, sitePerformance, siteAccessibility, siteSeo, functionPerformance. The index types are engine-specific so each CTA can pair the right service+method (databases.createIndex, tablesDB.createIndex, documentsDB.createIndex, or vectorsDB.createIndex). */ type: string; /** * Insight severity. One of info, warning, critical. */ severity: string; /** * Insight status. One of active, dismissed. */ status: string; /** * Type of the resource the insight is about. Plural noun, e.g. databases, sites, functions. */ resourceType: string; /** * ID of the resource the insight is about. */ resourceId: string; /** * Plural noun for the parent resource that contains the insight's resource, e.g. an insight about a column index on a table → resourceType=indexes, parentResourceType=tables. Empty when the resource has no parent. */ parentResourceType: string; /** * ID of the parent resource. Empty when the resource has no parent. */ parentResourceId: string; /** * Insight title. */ title: string; /** * Short markdown summary describing the insight. */ summary: string; /** * List of call-to-action buttons attached to this insight. */ ctas: InsightCTA[]; /** * Time the insight was analyzed in ISO 8601 format. */ analyzedAt?: string; /** * Time the insight was dismissed in ISO 8601 format. Empty when not dismissed. */ dismissedAt?: string; /** * User ID that dismissed the insight. Empty when not dismissed. */ dismissedBy?: string; }; /** * InsightCTA */ export type InsightCTA = { /** * Human-readable label for the CTA, used in UI. */ label: string; /** * Public API service (SDK namespace) the client should invoke. Must match the engine that owns the resource — for index suggestions: databases (legacy), tablesDB, documentsDB, or vectorsDB. */ service: string; /** * Public API method on the chosen service the client should invoke when this CTA is triggered. */ method: string; /** * Parameter map the client should pass to the service method when this CTA is triggered. Keys match the target API's parameter names (e.g. databaseId/tableId/columns for tablesDB, databaseId/collectionId/attributes for the legacy Databases API). */ params: object; }; /** * Report */ export type Report = { /** * Report ID. */ $id: string; /** * Report creation date in ISO 8601 format. */ $createdAt: string; /** * Report update date in ISO 8601 format. */ $updatedAt: string; /** * ID of the third-party app that submitted the report. */ appId: string; /** * Analyzer that produced this report. e.g. lighthouse, audit, databaseAnalyzer. */ type: string; /** * Short, human-readable title for the report. */ title: string; /** * Markdown summary describing the report. */ summary: string; /** * Plural noun describing what the report analyzes, e.g. databases, sites, urls. */ targetType: string; /** * Free-form target identifier (URL for lighthouse, resource ID for db). */ target: string; /** * Categories covered by the report, e.g. performance, accessibility. */ categories: string[]; /** * Insights nested under this report. */ insights: Insight[]; /** * Time the report was analyzed in ISO 8601 format. */ analyzedAt?: string; }; /** * ActivityEvent */ export type ActivityEvent = { /** * Event ID. */ $id: string; /** * Actor type. */ actorType: string; /** * Actor ID. */ actorId: string; /** * Actor Email. */ actorEmail: string; /** * Actor Name. */ actorName: string; /** * Resource parent. */ resourceParent: string; /** * Resource type. */ resourceType: string; /** * Resource ID. */ resourceId: string; /** * Resource. */ resource: string; /** * Event name. */ event: string; /** * User agent. */ userAgent: string; /** * IP address. */ ip: string; /** * API mode when event triggered. */ mode: string; /** * Location. */ country: string; /** * Continent code. */ continentCode: string; /** * City name. */ city: string; /** * Region/state chain. */ subdivisions: string; /** * Internet service provider. */ isp: string; /** * Autonomous System Number (ASN). */ autonomousSystemNumber: string; /** * Organization that owns the ASN. */ autonomousSystemOrganization: string; /** * Connection type (e.g. cable, cellular, corporate). */ connectionType: string; /** * User type (e.g. residential, business, hosting). */ connectionUsageType: string; /** * Registered organization of the IP. */ connectionOrganization: string; /** * Log creation date in ISO 8601 format. */ time: string; /** * Project ID. */ projectId: string; /** * Team ID. */ teamId: string; /** * Hostname. */ hostname: string; /** * Name of the SDK that triggered the event. */ sdk: string; /** * Version of the SDK that triggered the event. */ sdkVersion: string; }; /** * AdditionalResource */ export type AdditionalResource = { /** * Resource name */ name: string; /** * Resource unit */ unit: string; /** * Price currency */ currency: string; /** * Price */ price: number; /** * Resource value */ value: number; /** * Description on invoice */ invoiceDesc: string; }; /** * Archive */ export type BackupArchive = { /** * Archive ID. */ $id: string; /** * Archive creation time in ISO 8601 format. */ $createdAt: string; /** * Archive update date in ISO 8601 format. */ $updatedAt: string; /** * Archive policy ID. */ policyId: string; /** * Archive size in bytes. */ size: number; /** * The status of the archive creation. Possible values: pending, processing, uploading, completed, failed, skipped. */ status: string; /** * The backup start time. */ startedAt: string; /** * Migration ID. */ migrationId: string; /** * The services that are backed up by this archive. */ services: string[]; /** * The resources that are backed up by this archive. */ resources: string[]; /** * The resource ID to backup. Set only if this archive should backup a single resource. */ resourceId?: string; /** * The resource type to backup. Set only if this archive should backup a single resource. */ resourceType?: string; }; /** * Backup */ export type DedicatedDatabaseBackup = { /** * Backup ID. */ $id: string; /** * Backup creation time in ISO 8601 format. */ $createdAt: string; /** * Database ID this backup belongs to. */ databaseId: string; /** * Project ID. */ projectId: string; /** * Backup policy ID when the backup was created by a schedule. */ policyId: string; /** * Backup trigger. Possible values: manual, schedule. */ trigger: string; /** * Backup type. Possible values: full (complete database snapshot), incremental (changes since last backup), wal (write-ahead log continuous archival). */ type: string; /** * Backup type that was requested. Differs from `type` when the backend could not run the requested type and took a different one instead, in which case `fallbackReason` explains why. Empty for backups taken before the requested type was recorded. */ requestedType: string; /** * Why the backend ran a different backup type than the one requested. Empty when the backup ran as requested. */ fallbackReason: string; /** * Backup status. Possible values: pending (queued for processing), running (currently in progress), completed (successfully finished), failed (encountered an error), verified (integrity check passed). */ status: string; /** * Backup size in bytes. */ sizeBytes: number; /** * Backup start time in ISO 8601 format. */ startedAt?: string; /** * Backup completion time in ISO 8601 format. */ completedAt?: string; /** * Backup verification time in ISO 8601 format. */ verifiedAt?: string; /** * Backup expiration time in ISO 8601 format. */ expiresAt?: string; /** * Transaction-log position the backup anchors at, in the engine's own notation: PostgreSQL `{walSegment}|{lsn}`, MySQL and MariaDB `{binlogFile}|{offset}`, MongoDB `{seconds}|{increment}`. Empty when the backup recorded no position, which is the case for backup types that carry none. */ logPosition?: string; /** * Error message if backup failed. */ error: string; }; /** * BackupList */ export type DedicatedDatabaseBackupList = { /** * Total number of backups. */ total: number; /** * List of backups. */ backups: DedicatedDatabaseBackup[]; }; /** * BackupStorageConfig */ export type DedicatedDatabaseBackupStorage = { /** * Storage provider. Possible values: s3 (Amazon S3 or S3-compatible), gcs (Google Cloud Storage), azure (Azure Blob Storage). */ provider: string; /** * Storage bucket or container name. */ bucket: string; /** * Storage region. */ region: string; /** * Object key prefix for backups. */ prefix: string; /** * Custom endpoint for S3-compatible storage. */ endpoint: string; }; /** * Limits */ export type BillingLimits = { /** * Bandwidth limit */ bandwidth?: number; /** * Storage limit */ storage?: number; /** * Users limit */ users?: number; /** * Executions limit */ executions?: number; /** * GBHours limit */ GBHours?: number; /** * Image transformations limit */ imageTransformations?: number; /** * Auth phone limit */ authPhone?: number; /** * Budget limit percentage */ budgetLimit?: number; }; /** * billingPlan */ export type BillingPlan = { /** * Plan ID. */ $id: string; /** * Plan name */ name: string; /** * Plan description */ desc: string; /** * Plan order */ order: number; /** * Price */ price: number; /** * Trial days */ trial: number; /** * Bandwidth */ bandwidth: number; /** * Storage */ storage: number; /** * Image Transformations */ imageTransformations: number; /** * Screenshots generated */ screenshotsGenerated: number; /** * Members */ members?: number; /** * Webhooks */ webhooks: number; /** * Maximum WAF rules per project */ wafRules: number; /** * Projects */ projects: number; /** * Platforms */ platforms: number; /** * Users */ users: number; /** * Teams */ teams: number; /** * Databases */ databases: number; /** * Database reads per month */ databasesReads: number; /** * Database writes per month */ databasesWrites: number; /** * Database batch size limit */ databasesBatchSize: number; /** * Buckets */ buckets: number; /** * File size */ fileSize: number; /** * Functions */ functions: number; /** * Sites */ sites: number; /** * Function executions */ executions: number; /** * Rolling max executions retained per function/site */ executionsRetentionCount: number; /** * GB hours for functions */ GBHours: number; /** * Realtime connections */ realtime: number; /** * Realtime messages */ realtimeMessages: number; /** * Messages per month */ messages: number; /** * Topics for messaging */ topics: number; /** * SMS authentications per month */ authPhone: number; /** * Custom domains */ domains: number; /** * Activity log days */ activityLogs?: number; /** * Usage history days */ usageLogs: number; /** * Usage log time intervals allowed for this plan (e.g. 15m, 1h, 1d). */ usageLogsIntervals?: string[]; /** * Metrics this plan only records as a total. They cannot be broken down by dimension or filtered, because the stored events cover a fraction of the real traffic. */ usageAggregateOnlyMetrics?: string[]; /** * Number of days of console inactivity before a project is paused. 0 means pausing is disabled. */ projectInactivityDays: number; /** * Alert threshold percentage */ alertLimit: number; /** * Additional resources */ usage: UsageBillingPlan; /** * Addons */ addons: BillingPlanAddon; /** * Budget cap enabled or disabled. */ budgetCapEnabled: boolean; /** * Custom SMTP */ customSmtp: boolean; /** * Appwrite branding in email */ emailBranding: boolean; /** * Does plan require payment method */ requiresPaymentMethod: boolean; /** * Does plan require billing address */ requiresBillingAddress: boolean; /** * Is the billing plan available */ isAvailable: boolean; /** * Can user change the plan themselves */ selfService: boolean; /** * Does plan enable premium support */ premiumSupport: boolean; /** * Does plan support budget cap */ budgeting: boolean; /** * Does plan support mock numbers */ supportsMockNumbers: boolean; /** * Does plan support organization roles */ supportsOrganizationRoles: boolean; /** * Does plan support credit */ supportsCredits: boolean; /** * Does plan support dedicated databases. */ supportsDedicatedDatabases: boolean; /** * Does plan support blocking disposable email addresses. */ supportsDisposableEmailValidation: boolean; /** * Does plan support requiring canonical email addresses. */ supportsCanonicalEmailValidation: boolean; /** * Does plan support blocking free email addresses. */ supportsFreeEmailValidation: boolean; /** * Does plan support restricting sign-ups to corporate email addresses only. */ supportsCorporateEmailValidation: boolean; /** * Does plan support project-specific member roles. */ supportsProjectSpecificRoles: boolean; /** * Does plan support backup policies. */ backupsEnabled?: boolean; /** * Whether usage addons are calculated per project. */ usagePerProject: boolean; /** * Supported addons for this plan */ supportedAddons: BillingPlanSupportedAddons; /** * How many policies does plan support */ backupPolicies?: number; /** * Maximum function and site deployment size in MB */ deploymentSize: number; /** * Maximum function and site deployment size in MB */ buildSize: number; /** * Does the plan support encrypted string attributes or not. */ databasesAllowEncrypt: boolean; /** * Plan specific limits */ limits?: BillingPlanLimits; /** * Group of this billing plan for variants */ group: BillingPlanGroup; /** * Details of the program this plan is a part of. */ program?: Program; /** * Included monthly dedicated-database compute credit in USD. Resets each billing cycle with no roll-over. */ databaseComputeCredit: number; /** * Dedicated database limits available to this plan. */ dedicatedDatabases?: BillingPlanDedicatedDatabaseLimits; }; /** * Addon */ export type BillingPlanAddon = { /** * Addon seats */ seats?: BillingPlanAddonDetails; /** * Addon projects */ projects?: BillingPlanAddonDetails; }; /** * Details */ export type BillingPlanAddonDetails = { /** * Is the addon supported in the plan? */ supported: boolean; /** * Addon plan included value */ planIncluded: number; /** * Addon limit */ limit: number; /** * Addon type */ type: string; /** * Price currency */ currency?: string; /** * Price */ price: number; /** * Resource value */ value: number; /** * Description on invoice */ invoiceDesc: string; }; /** * PlanLimits */ export type BillingPlanLimits = { /** * Credits limit per billing cycle */ credits?: number; /** * Daily credits limit (if applicable) */ dailyCredits?: number; }; /** * dedicatedDatabaseLimits */ export type BillingPlanDedicatedDatabaseLimits = { /** * Minimum CPU allocation in millicores. */ minCpu?: number; /** * Maximum CPU allocation in millicores. */ maxCpu?: number; /** * Minimum memory allocation in megabytes. */ minMemoryMb?: number; /** * Maximum memory allocation in megabytes. */ maxMemoryMb?: number; /** * Minimum storage allocation in gigabytes. */ minStorageGb?: number; /** * Maximum storage allocation in gigabytes. */ maxStorageGb?: number; /** * Maximum number of high-availability replicas per dedicated database. */ maxReplicas?: number; /** * Maximum number of client connections. */ maxConnections?: number; /** * Maximum number of entries allowed in the IP allowlist. */ maxIpAllowlistSize?: number; /** * Maximum number of database extensions that can be enabled. */ maxExtensions?: number; /** * Maximum number of days a backup can be retained. */ maxBackupRetentionDays?: number; /** * Maximum number of days of point-in-time recovery data that can be retained. */ maxPitrRetentionDays?: number; /** * Maximum number of rows a single SQL API query can return. */ maxSqlApiMaxRows?: number; /** * Maximum response size in bytes for a single SQL API query. */ maxSqlApiMaxBytes?: number; /** * Maximum execution time in seconds for a single SQL API query. */ maxSqlApiTimeoutSeconds?: number; /** * Maximum number of SQL statement types that can be permitted through the SQL API. */ maxSqlApiAllowedStatements?: number; /** * SQL statement types permitted through the SQL API. */ allowedSqlStatements?: string[]; /** * Storage classes available for dedicated databases. */ allowedStorageClasses?: string[]; /** * Replica synchronization modes available for dedicated databases. */ allowedSyncModes?: string[]; }; /** * BillingPlanSupportedAddons */ export type BillingPlanSupportedAddons = { /** * Whether the plan supports BAA (Business Associate Agreement) addon */ baa: boolean; /** * Whether the plan supports Premium Geo DB addon (project-level) */ premiumGeoDB: boolean; /** * Whether the plan supports Premium Geo DB addon (organization-level) */ premiumGeoDBOrg: boolean; }; /** * Block */ export type Block = { /** * Block creation date in ISO 8601 format. */ $createdAt: string; /** * Resource type that is blocked */ resourceType: string; /** * Resource identifier that is blocked */ resourceId: string; /** * Block mode. full blocks reads and writes; readOnly blocks writes only. */ mode: string; /** * Reason for the block. Can be null if no reason was provided. */ reason?: string; /** * Block expiration date in ISO 8601 format. Can be null if the block does not expire. */ expiredAt?: string; /** * Name of the project this block applies to. */ projectName: string; /** * Region of the project this block applies to. */ region: string; /** * Name of the organization that owns the project. */ organizationName: string; /** * ID of the organization that owns the project. */ organizationId: string; /** * Billing plan of the organization that owns the project. */ billingPlan: string; }; /** * Branch */ export type DedicatedDatabaseBranch = { /** * Branch identifier. */ branchId: string; /** * Branch name. */ branchName: string; /** * Kubernetes namespace where the branch is deployed. */ namespace: string; /** * Unix timestamp when the branch expires. */ expiresAt: number; /** * Branch hostname for direct connections. */ host: string; /** * Branch port. Null until the backing reports one. */ port: number; /** * Advertised catalog the client connects to. MySQL/MariaDB use default; Postgres uses the routing label. */ database: string; /** * Database username. Shared with the parent database. */ username: string; /** * Database password. Shared with the parent database. */ password: string; /** * Whether SSL is required. */ ssl: boolean; /** * Database engine. Possible values: postgresql, mysql, mongodb. */ engine: string; /** * Full connection string for the branch. */ connectionString: string; }; /** * BranchList */ export type DedicatedDatabaseBranchList = { /** * Total number of branches. */ total: number; /** * List of branches. */ branches: DedicatedDatabaseBranch[]; }; /** * Database Migration */ export type DatabaseMigration = { /** * Database migration ID. */ $id: string; /** * Migration creation time in ISO 8601 format. */ $createdAt: string; /** * Migration update time in ISO 8601 format. */ $updatedAt: string; /** * Project ID that owns the migrating database. */ projectId: string; /** * Logical database ID being migrated. */ databaseId: string; /** * Dedicated compute specification provisioned for the migration target. */ specification: string; /** * Migration phase. Possible values: pending, provisioned, capturing, backfilling, catching_up, verifying, ready_to_cutover, cutover, soaking, done, failed, rolled_back. */ phase: string; /** * Number of times a migration step has failed and been recorded. */ attempt: number; /** * Reason the most recent migration step failed, empty while none has. */ lastError: string; /** * Number of documents still pending replication to the target. */ lagDocuments: number; /** * Highest source changelog sequence applied to the target so far. */ changelogWatermark: number; /** * Time the migrated data was verified against the source in ISO 8601 format. */ verifiedAt: string; /** * Time routing was flipped to the target in ISO 8601 format. */ cutoverAt: string; /** * Time the post-cutover soak window ends in ISO 8601 format. */ soakUntil: string; /** * Whether the migration cuts over automatically once ready. Set when the migration is created and never changed afterwards, so it always reports what was asked for. */ autoCutover: boolean; /** * Whether a cutover has been requested and not yet attempted. Set by the cutover endpoint and cleared when the attempt is made, so a cutover that fails a check parks the migration again rather than retrying on its own. */ cutoverRequested: boolean; /** * Whether the migration is paused. */ paused: boolean; }; /** * DedicatedDatabase */ export type DedicatedDatabase = { /** * Dedicated database ID. */ $id: string; /** * Database creation time in ISO 8601 format. */ $createdAt: string; /** * Database update date in ISO 8601 format. */ $updatedAt: string; /** * Project ID that owns this database. */ projectId: string; /** * Database display name. */ name: string; /** * Product API that owns this database: tablesdb, documentsdb, vectorsdb, mysql, postgresql, or mongodb. */ api: string; /** * Database engine: postgresql, mysql, or mongodb. Null until the backing reports one. */ engine: string; /** * Database engine version. */ version: string; /** * Specification identifier. */ specification: string; /** * Database backend provider. Possible values: edge. */ backend: string; /** * Database hostname for connections. */ hostname: string; /** * Database port for connections. Derived from the engine when the backing has not reported one yet. */ connectionPort: number; /** * Database username for connections. */ connectionUser: string; /** * Database password for connections. */ connectionPassword: string; /** * Committed generation of the primary connection credentials. Null until the rotation contract has been initialized. */ credentialGeneration: number; /** * Full database connection string (URI format). */ connectionString: string; /** * Whether SSL/TLS is required for client connections. */ ssl: boolean; /** * Database status. Possible values: provisioning, ready, inactive, paused, failed, deleted, restoring, scaling. */ status: string; /** * Container status for lifecycle-managed database runtimes: active or inactive. */ containerStatus: string; /** * Last activity timestamp in ISO 8601 format. */ lastAccessedAt?: string; /** * Display-only timestamp when the database is expected to be considered idle (ISO 8601 format). Derived from last activity; lifecycle transitions are driven by lifecycleState. */ idleUntil?: string; /** * Idle-lifecycle state of the database. Possible values: active, warm, cold, hibernated. */ lifecycleState: string; /** * Minutes of inactivity before container scales to zero. */ idleTimeoutMinutes: number; /** * CPU allocated in millicores. */ cpu: number; /** * Memory allocated in MB. */ memory: number; /** * Storage allocated in GB. */ storage: number; /** * Storage class. Currently always 'ssd'; DigitalOcean exposes a single block-storage class. */ storageClass: string; /** * Maximum storage allowed in GB. 0 means use system default. */ storageMaxGb: number; /** * Kubernetes node pool where the database is scheduled. */ nodePool: string; /** * Number of high availability replicas. High availability is enabled when greater than 0. */ replicas: number; /** * Replication sync mode: async, sync, or quorum. */ syncMode: string; /** * Maximum concurrent client connections. This is the limit a client pool may reach; the engine's own max_connections reported by the status endpoint is a smaller backend limit the pooler multiplexes onto and does not constrain a client pool. */ networkMaxConnections: number; /** * Connection idle timeout in seconds. */ networkIdleTimeoutSeconds: number; /** * IP addresses/CIDR ranges allowed to connect. */ networkIPAllowlist: string[]; /** * Whether automatic backups are enabled. */ backupEnabled: boolean; /** * Whether point-in-time recovery is enabled. */ pitr: boolean; /** * Number of days to retain PITR data. */ pitrRetentionDays: number; /** * Whether automatic storage expansion is enabled. */ storageAutoscaling: boolean; /** * Storage usage percentage that triggers automatic expansion. */ storageAutoscalingThresholdPercent: number; /** * Maximum storage size in GB for autoscaling. 0 means no limit. */ storageAutoscalingMaxGb: number; /** * Day of the week for the maintenance window. Possible values: sun, mon, tue, wed, thu, fri, sat. */ maintenanceWindowDay: string; /** * Hour in UTC (0-23) when the maintenance window starts. */ maintenanceWindowHourUtc: number; /** * Whether metrics collection is enabled. */ metricsEnabled: boolean; /** * Whether the SQL API sidecar is enabled for this database. */ sqlApiEnabled: boolean; /** * Statement types accepted by the SQL API. Defaults to read/write DML only; DDL/DCL types (CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE) are opt-in per database. Allowed values: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE. */ sqlApiAllowedStatements: string[]; /** * Maximum rows returned per SQL API execution. Results larger than this are truncated. */ sqlApiMaxRows: number; /** * Maximum serialised SQL API result payload in bytes. Results larger than this are truncated. */ sqlApiMaxBytes: number; /** * Maximum server-side SQL API execution time in seconds before the query is cancelled. */ sqlApiTimeoutSeconds: number; /** * Error message if status is failed. */ error: string; }; /** * Execution */ export type DedicatedDatabaseExecution = { /** * Result rows as a list of column-name => value maps. Empty for non-returning statements. */ rows: Record[]; /** * Number of rows returned (for SELECT) or affected (for INSERT/UPDATE/DELETE). */ rowCount: number; /** * Column metadata in result-set order. */ columns: DedicatedDatabaseExecutionColumn[]; /** * Server-side execution time in milliseconds. */ durationMs: number; /** * True when the configured row or byte cap was hit and the result was truncated. */ truncated: boolean; /** * Serialised payload size in bytes. */ bytes: number; }; /** * ExecutionColumn */ export type DedicatedDatabaseExecutionColumn = { /** * Column name as returned by the database. */ name: string; /** * Engine-specific column type (e.g. int4, text, timestamptz). */ type: string; }; /** * Restoration */ export type DedicatedDatabaseRestoration = { /** * Restoration ID. */ $id: string; /** * Restoration creation time in ISO 8601 format. */ $createdAt: string; /** * Database ID being restored into. */ databaseId: string; /** * Source database ID when restoring a backup into another database. */ sourceDatabaseId: string; /** * Project ID. */ projectId: string; /** * Backup ID used for restoration (null for PITR). */ backupId: string; /** * Restoration type. Possible values: backup (restore from a specific backup snapshot), pitr (point-in-time recovery to a specific timestamp). */ type: string; /** * Restoration status. Possible values: pending (queued for processing), running (currently in progress), completed (successfully finished), failed (encountered an error). */ status: string; /** * Target time for PITR restoration in ISO 8601 format. */ targetTime: string; /** * Restoration start time in ISO 8601 format. */ startedAt: string; /** * Restoration completion time in ISO 8601 format. */ completedAt: string; /** * Error message if restoration failed. */ error: string; }; /** * Status */ export type DatabaseStatus = { /** * Overall health status: healthy, degraded, unhealthy, or unknown when nothing could be measured. */ health: string; /** * Whether the database is ready to accept connections. */ ready: boolean; /** * Database engine: postgresql, mysql, or mongodb. */ engine: string; /** * Database engine version. */ version: string; /** * Database uptime in seconds. */ uptime: number; /** * Connection statistics. */ connections: DatabaseStatusConnections; /** * Requested replication sync mode. Possible values: async, sync, quorum. Compare with effectiveSyncMode for what the primary is enforcing. */ syncMode: string; /** * Replication sync mode the primary is actually enforcing. Null when high availability is disabled or the state could not be read. */ effectiveSyncMode?: string; /** * Whether the enforced replication is weaker than the requested syncMode. */ syncDegraded: boolean; /** * Number of standby acknowledgements the primary waits for before a write is committed. */ syncAcknowledgements: number; /** * Number of standbys registered with the primary for synchronous replication. */ syncStandbyCount: number; /** * Whether the other sync fields are an engine reading rather than a recorded estimate. True when the primary answered what it is enforcing, including when that answer contradicted the record, in which case the contradicted values are replaced by the ones the engine reports. False when the reading could not be taken: the probe did not answer, there was no engine to ask, or the values describe a configuration change just applied rather than anything measured. Absent when no engine was asked at all, so an unprobed database is distinguishable from an unconfirmed one. False never means a standby was found lagging, because it is the absence of a reading rather than a negative one, so draw no conclusion about replication health from it or from a response that omits it. */ syncStateConfirmed?: boolean; /** * List of database replicas and their status. Every configured member appears, including one the backend has not brought up, which is reported as not healthy. */ replicas: DatabaseStatusReplica[]; /** * Storage volume information. */ volumes: DatabaseStatusVolume[]; }; /** * Extensions */ export type DedicatedDatabaseExtensions = { /** * List of installed extensions. */ installed: string[]; /** * List of available extensions that can be installed. */ available: string[]; /** * Curated metadata (display name, description, category) for each available extension. */ metadata: PostgresExtension[]; }; /** * Member */ export type DedicatedDatabaseMember = { /** * Member identifier. */ $id: string; /** * Member role. Possible values: primary (accepts reads and writes), replica (read-only follower), unknown (placement not established; reported while a transition is moving or restarting the topology and this member has not been probed, so no member can be named the write target). */ role: string; /** * Member pod status. Possible values: pending (configured but absent from the backend topology, so nothing is bringing it up), provisioning (pod missing or Pending), starting (Running but not Ready), active (Running and Ready), failed (Failed phase or CrashLoopBackOff container), or the lowercased pod phase reported by the cluster. */ status: string; /** * Whether the engine reports this member's replication stream as up. Null when no reading was taken: a primary has no stream to report, and a member that is not active, or whose probe did not answer, has none yet. False is a reading and null is the absence of one, so the two are not interchangeable. Read it beside lagSeconds before expecting a failover that names no target to find a promotable standby: a member streaming at a known lag is one, and a member reporting null is not evidence either way. */ replicating?: boolean; /** * Replication lag in seconds. Null when the lag is not known: a primary has none to report, and a member the backend has not probed has none yet. Also null against `replicating: true`, for a member that is streaming but whose engine printed no numeric lag. */ lagSeconds?: number; }; /** * Operation */ export type DedicatedDatabaseOperation = { /** * Operation ID. */ $id: string; /** * Operation creation time in ISO 8601 format. */ $createdAt: string; /** * Database ID the operation ran against. */ databaseId: string; /** * Operation type, such as provision, update, credentials-update, restore, pausing, resuming, failover, backup-create or cross-region-enable. */ type: string; /** * Operation status. Possible values: queued (accepted and waiting to resume), running (in progress), completed (finished successfully), failed (ended in an error). */ status: string; /** * Number of times this operation has been attempted. */ attempts: number; /** * Time the operation was requested, in ISO 8601 format. */ requestedAt?: string; /** * Time the operation started, in ISO 8601 format. */ startedAt?: string; /** * Time the operation reached a terminal state, in ISO 8601 format. */ completedAt?: string; /** * Machine-readable failure code. `Interrupted` marks an attempt that ended before its outcome could be confirmed. */ errorCode: string; /** * Failure message if the operation failed. */ errorMessage: string; }; /** * OperationList */ export type DedicatedDatabaseOperationList = { /** * Total number of operations. */ total: number; /** * List of operations. */ operations: DedicatedDatabaseOperation[]; }; /** * Replicas */ export type DedicatedDatabaseReplicas = { /** * Number of configured replicas. Zero means high availability is disabled. */ replicas: number; /** * Requested replication sync mode. Possible values: async (asynchronous, fastest), sync (synchronous, strong consistency), quorum (quorum-based, majority of replicas must confirm). This is what was asked for; compare it with effectiveSyncMode for what the primary is enforcing. */ syncMode: string; /** * Replication sync mode the primary is actually enforcing. Null when high availability is disabled or the state could not be read. A value below the requested syncMode means writes are being acknowledged with weaker durability than configured. */ effectiveSyncMode?: string; /** * Whether the enforced replication is weaker than the requested syncMode. */ syncDegraded: boolean; /** * Number of standby acknowledgements the primary waits for before a write is committed. Zero means writes are acknowledged locally. */ syncAcknowledgements: number; /** * Number of standbys registered with the primary for synchronous replication. */ syncStandbyCount: number; /** * Whether the other sync fields are an engine reading rather than a recorded estimate. True when the primary answered what it is enforcing, including when that answer contradicted the record, in which case the contradicted values are replaced by the ones the engine reports. False when the reading could not be taken: the probe did not answer, there was no engine to ask, or the values describe a configuration change just applied rather than anything measured. Absent when no engine was asked at all, so an unprobed database is distinguishable from an unconfirmed one. False never means a standby was found lagging, because it is the absence of a reading rather than a negative one, so draw no conclusion about replication health from it or from a response that omits it. */ syncStateConfirmed?: boolean; /** * Per-pod statuses for the primary and every replica. */ members: DedicatedDatabaseMember[]; }; /** * Invalidation */ export type ProxyInvalidation = { /** * Domain name. */ domain: string; /** * Invalidation type. Possible values are "tag", "path", or "all". */ type: string; /** * Invalidated reference. Depending on type this is a cache tag name, a URL path, or empty when type is all. */ reference: string; /** * Invalidation status. */ status: string; }; /** * Organization */ export type Organization = { /** * 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; /** * Project budget limit. Null when no budget is set. */ billingBudget?: number; /** * Project budget limit */ budgetAlerts: number[]; /** * Organization's billing plan ID. */ billingPlan: string; /** * Organization's billing plan ID. */ billingPlanId: string; /** * Organization's billing plan. */ billingPlanDetails: BillingPlan; /** * Billing email set for the organization. */ billingEmail: string; /** * Billing cycle start date. */ billingStartDate: string; /** * Current invoice cycle start date. */ billingCurrentInvoiceDate: string; /** * Next invoice cycle start date. */ billingNextInvoiceDate: string; /** * Start date of trial. */ billingTrialStartDate?: string; /** * Number of trial days. */ billingTrialDays: number; /** * Current active aggregation id. */ billingAggregationId: string; /** * Current active aggregation id. */ billingInvoiceId: string; /** * Default payment method. */ paymentMethodId: string; /** * Default payment method. */ billingAddressId?: string; /** * Backup payment method. */ backupPaymentMethodId?: string; /** * Team status. */ status: string; /** * Remarks on team status. */ remarks?: string; /** * Organization agreements */ agreementBAA?: string; /** * Program manager's name. */ programManagerName?: string; /** * Program manager's calendar link. */ programManagerCalendar?: string; /** * Program's discord channel name. */ programDiscordChannelName?: string; /** * Program's discord channel URL. */ programDiscordChannelUrl?: string; /** * Billing limits reached */ billingLimits?: BillingLimits; /** * Billing plan selected for downgrade. */ billingPlanDowngrade?: string; /** * Tax Id */ billingTaxId?: string; /** * Marked for deletion */ markedForDeletion: boolean; /** * Product with which the organization is associated (appwrite or imagine) */ platform: string; /** * Selected projects */ projects: string[]; }; /** * PITRWindows */ export type DedicatedDatabasePITRWindows = { /** * Earliest available recovery point. */ earliest: string; /** * Latest available recovery point. */ latest: string; }; /** * backup */ export type BackupPolicy = { /** * Backup policy ID. */ $id: string; /** * Backup policy name. */ name: string; /** * Policy creation date in ISO 8601 format. */ $createdAt: string; /** * Policy update date in ISO 8601 format. */ $updatedAt: string; /** * The services that are backed up by this policy. */ services: string[]; /** * The resources that are backed up by this policy. */ resources: string[]; /** * The resource ID to backup. Set only if this policy should backup a single resource. */ resourceId?: string; /** * The resource type to backup. Set only if this policy should backup a single resource. */ resourceType?: string; /** * How many days to keep the backup before it will be automatically deleted. */ retention: number; /** * Policy backup schedule in CRON format. */ schedule: string; /** * Backup type. Possible values: full (complete database snapshot), incremental (changes since last backup). */ type: string; /** * Is this policy enabled. */ enabled: boolean; }; /** * Policy Deny Aliased Email */ export type PolicyDenyAliasedEmail = { /** * Policy ID. */ $id: string; /** * Whether the deny aliased email policy is enabled. */ enabled: boolean; }; /** * Policy Deny Disposable Email */ export type PolicyDenyDisposableEmail = { /** * Policy ID. */ $id: string; /** * Whether the deny disposable email policy is enabled. */ enabled: boolean; }; /** * Policy Deny Free Email */ export type PolicyDenyFreeEmail = { /** * Policy ID. */ $id: string; /** * Whether the deny free email policy is enabled. */ enabled: boolean; }; /** * Policy Deny Corporate Email */ export type PolicyDenyCorporateEmail = { /** * Policy ID. */ $id: string; /** * Whether the deny non-corporate email policy is enabled. */ enabled: boolean; }; /** * PoolerConfig */ export type DedicatedDatabasePooler = { /** * Whether connection pooling is enabled. */ enabled: boolean; /** * Connection pool mode. Possible values: transaction (releases connections back to pool after each transaction), session (holds connections for the entire client session). */ mode: string; /** * Client-connection ceiling the pooler accepts. Enforced on MySQL and MariaDB; on PostgreSQL the pooler has no client cap, so this reports the database's advertised networkMaxConnections and cannot be set here. */ maxConnections: number; /** * Default pool size per user. */ defaultPoolSize: number; /** * Pooler listening port. */ port: number; /** * Whether SELECTs are routed to HA replicas while writes and locked reads stay on the primary. Active only when HA is enabled. */ readWriteSplitting: boolean; /** * Effective CPU request applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (5% of DB CPU, floor 100m) unless overridden. */ poolerCpuRequest: string; /** * Effective CPU limit applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (10% of DB CPU, floor 200m) unless overridden. */ poolerCpuLimit: string; /** * Effective memory request applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (7.5% of DB memory, floor 64Mi) unless overridden. */ poolerMemoryRequest: string; /** * Effective memory limit applied to the pooler sidecar container (Kubernetes quantity). Returns the proportional default (15% of DB memory, floor 128Mi) unless overridden. */ poolerMemoryLimit: string; }; /** * Postgres extension */ export type PostgresExtension = { /** * Extension key used with CREATE EXTENSION. */ key: string; /** * Human-readable extension name. */ name: string; /** * Short description of what the extension provides. */ description: string; /** * Category the extension belongs to. */ category: string; }; /** * Program */ export type Program = { /** * Program ID */ $id: string; /** * Program title */ title: string; /** * Program description */ description: string; /** * Program tag for highlighting on console */ tag: string; /** * Program icon for highlighting on console */ icon: string; /** * URL for more information on this program */ url: string; /** * Whether this program is active */ active: boolean; /** * Whether this program is external */ external: boolean; /** * Billing plan ID that this is program is associated with. */ billingPlanId: string; }; /** * Restoration */ export type BackupRestoration = { /** * Restoration ID. */ $id: string; /** * Restoration creation time in ISO 8601 format. */ $createdAt: string; /** * Restoration update date in ISO 8601 format. */ $updatedAt: string; /** * Backup archive ID. */ archiveId: string; /** * Backup policy ID. */ policyId: string; /** * The status of the restoration. Possible values: pending, downloading, processing, completed, failed. */ status: string; /** * The backup start time. */ startedAt: string; /** * Migration ID. */ migrationId: string; /** * The services that are backed up by this policy. */ services: string[]; /** * The resources that are backed up by this policy. */ resources: string[]; /** * Optional data in key-value object. */ options: string; }; /** * Dedicated database restorations list */ export type DedicatedDatabaseRestorationList = { /** * Total number of restorations that matched your query. */ total: number; /** * List of restorations. */ restorations: DedicatedDatabaseRestoration[]; }; /** * Specification */ export type DedicatedDatabaseSpecification = { /** * Specification slug. Use this value when creating a dedicated database. */ slug: string; /** * Human readable specification name. */ name: string; /** * Monthly price of the specification in USD. */ price: number; /** * Allocated CPU in millicores. */ cpu: number; /** * Allocated memory in MB. */ memory: number; /** * Maximum number of concurrent connections. */ maxConnections: number; /** * Included storage in GB before overage charges apply. */ includedStorage: number; /** * Included bandwidth in GB before overage charges apply. */ includedBandwidth: number; /** * Whether the specification is available on the current plan. */ enabled: boolean; }; /** * SpecificationList */ export type DedicatedDatabaseSpecificationList = { /** * List of dedicated database specifications. */ specifications: DedicatedDatabaseSpecification[]; /** * Total number of specifications. */ total: number; /** * Overage and add-on pricing shared across all specifications. */ pricing: DedicatedDatabaseSpecificationPricing; }; /** * SpecificationPricing */ export type DedicatedDatabaseSpecificationPricing = { /** * Price per GB of storage above the included amount, per month, in USD. */ storageOverageRate: number; /** * Price per GB of bandwidth above the included amount, per month, in USD. */ bandwidthOverageRate: number; /** * High availability replica price as a fraction of the specification cost. */ replicaRate: number; /** * Point-in-time recovery price as a fraction of the specification cost. */ pitrRate: number; }; /** * Connections */ export type DatabaseStatusConnections = { /** * Current number of active connections. */ current: number; /** * The engine's own max_connections. On a pooled database this is the backend limit the pooler multiplexes onto, not the ceiling a client pool may reach — that is networkMaxConnections on the database resource. */ max: number; }; /** * Replica */ export type DatabaseStatusReplica = { /** * Member index within the database. Read `role` for which member accepts writes: a failover moves the primary without renumbering the indexes. */ index: number; /** * Member role. Possible values: primary (accepts reads and writes), replica (read-only follower), unknown (placement not established; reported while a transition is moving or restarting the topology, so no member can be named the write target). */ role: string; /** * Whether the replica is healthy. */ healthy: boolean; /** * Whether the engine reports this member's replication stream as up. Null when no reading was taken: a primary has no stream to report, and a member that is not healthy, or whose probe did not answer, has none yet. `healthy` is a reachability probe of the member itself and says nothing about replication, so a healthy member may still not be replicating. */ replicating?: boolean; /** * Replication lag in seconds (null for primary). Also null against `replicating: true`, for a member that is streaming but whose engine printed no numeric lag. */ lagSeconds?: number; }; /** * Volume */ export type DatabaseStatusVolume = { /** * Mount path of the volume. */ path: string; /** * Percentage of storage used. */ usedPercent: string; /** * Available storage space. */ available: string; /** * Whether the volume is mounted. */ mounted: boolean; }; /** * usageBillingPlan */ export type UsageBillingPlan = { /** * Bandwidth additional resources */ bandwidth: AdditionalResource; /** * Executions additional resources */ executions: AdditionalResource; /** * Member additional resources */ member?: AdditionalResource; /** * Realtime additional resources */ realtime: AdditionalResource; /** * Realtime messages additional resources */ realtimeMessages: AdditionalResource; /** * Realtime bandwidth additional resources */ realtimeBandwidth?: AdditionalResource; /** * Storage additional resources */ storage: AdditionalResource; /** * User additional resources */ users: AdditionalResource; /** * GBHour additional resources */ GBHours: AdditionalResource; /** * Image transformation additional resources */ imageTransformations: AdditionalResource; /** * Credits additional resources */ credits?: AdditionalResource; }; /** * App */ export type App = { /** * App ID. */ $id: string; /** * App creation time in ISO 8601 format. */ $createdAt: string; /** * App update date in ISO 8601 format. */ $updatedAt: string; /** * Application name. */ name: string; /** * Application description shown to users during OAuth2 consent. */ description: string; /** * Application homepage URL shown to users during OAuth2 consent. */ clientUri: string; /** * Application logo URL shown to users during OAuth2 consent. */ logoUri: string; /** * Application privacy policy URL shown to users during OAuth2 consent. */ privacyPolicyUrl: string; /** * Application terms of service URL shown to users during OAuth2 consent. */ termsUrl: string; /** * Application support or security contact emails. */ contacts: string[]; /** * Application tagline shown to users during OAuth2 consent. */ tagline: string; /** * Application tags shown to users during OAuth2 consent. */ tags: string[]; /** * Application labels. Read-only for clients; only a server SDK using a project API key can update them. */ labels: string[]; /** * Application image URLs shown to users during OAuth2 consent. */ images: string[]; /** * Application support URL shown to users during OAuth2 consent. */ supportUrl: string; /** * Application data deletion URL shown to users during OAuth2 consent. */ dataDeletionUrl: string; /** * List of authorized redirect URIs. These URIs can be used to redirect users after they authenticate. */ redirectUris: string[]; /** * 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. */ postLogoutRedirectUris: string[]; /** * Whether the app is enabled or not. */ enabled: boolean; /** * 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. */ type: string; /** * Whether this client may use the OAuth2 Device Authorization Grant (RFC 8628). */ deviceFlow: boolean; /** * ID of team that owns the application, if owned by team. Otherwise, user ID will be used. */ teamId: string; /** * ID of user who owns the application, if owned by user. Otherwise, team ID will be used. */ userId: string; /** * Scopes the application requests when installed on a team. Organization-level and project-level scopes only. */ installationScopes: string[]; /** * URL users are redirected to after creating or updating an installation of this application. Empty for no redirect. */ installationRedirectUrl: string; /** * List of application secrets. */ secrets: AppSecret[]; }; /** * AppSecret */ export type AppSecret = { /** * Secret ID. */ $id: string; /** * Secret creation time in ISO 8601 format. */ $createdAt: string; /** * Secret update time in ISO 8601 format. */ $updatedAt: string; /** * Application ID this secret belongs to. */ appId: string; /** * Always empty. The application client secret is returned only once, in the response of the createSecret method. */ secret: string; /** * Last few characters of the client secret, used to help identify it. */ hint: string; /** * ID of the user who created the secret. */ createdById: string; /** * Name of the user who created the secret. */ createdByName: string; /** * Time the secret was last used for authentication in ISO 8601 format. Null if never used. */ lastAccessedAt?: string; }; /** * AppSecretPlaintext */ export type AppSecretPlaintext = { /** * Secret ID. */ $id: string; /** * Secret creation time in ISO 8601 format. */ $createdAt: string; /** * Secret update time in ISO 8601 format. */ $updatedAt: string; /** * Application ID this secret belongs to. */ appId: string; /** * Application client secret. Returned only when the secret is created; subsequent reads always return an empty value. */ secret: string; /** * Last few characters of the client secret, used to help identify it. */ hint: string; /** * ID of the user who created the secret. */ createdById: string; /** * Name of the user who created the secret. */ createdByName: string; /** * Time the secret was last used for authentication in ISO 8601 format. Null if never used. */ lastAccessedAt?: string; }; /** * AppScope */ export type AppScope = { /** * Scope value as requested by apps. */ value: string; /** * Human-readable description of what the scope grants. */ description: string; /** * What the scope grants access to. One of `account`, `project`, or `organization`. Only `project` and `organization` scopes are installable. */ type: string; /** * Scope category, used to group scopes on consent and installation screens. */ category: string; /** * Whether the scope is deprecated. Deprecated scopes can still be requested but should not be offered for new grants. */ deprecated: boolean; }; /** * AppInstallation */ export type AppInstallation = { /** * Installation ID. */ $id: string; /** * Installation creation time in ISO 8601 format. */ $createdAt: string; /** * Installation update time in ISO 8601 format. */ $updatedAt: string; /** * ID of the installed application. */ appId: string; /** * ID of the team the application is installed on. */ teamId: string; /** * Scopes granted to the application. Snapshot of the application's installation scopes taken when the installation was created or last updated. */ scopes: string[]; /** * Authorization details granted to the application. Rich authorization request (RFC 9396) style entries; the Appwrite Console stores authorized project IDs here. */ authorizationDetails: Record[]; /** * ID of the user who created the installation. */ createdById: string; /** * Name of the user who created the installation. */ createdByName: string; /** * Time an access token was last issued for the installation in ISO 8601 format. Null if never used. */ lastAccessedAt?: string; }; /** * AppKey */ export type AppKey = { /** * App key ID. */ $id: string; /** * App key creation time in ISO 8601 format. */ $createdAt: string; /** * App key update time in ISO 8601 format. */ $updatedAt: string; /** * Application ID this app key belongs to. */ appId: string; /** * App key secret. */ secret: string; /** * Last few characters of the app key secret, used to help identify it. */ hint: string; /** * ID of the user who created the app key. */ createdById: string; /** * Name of the user who created the app key. */ createdByName: string; /** * Time the app key was last used for authentication in ISO 8601 format. Null if never used. */ lastAccessedAt?: string; }; /** * OAuth2 Authorize */ export type Oauth2Authorize = { /** * OAuth2 grant ID. Set when the user must give explicit consent; pass it to the approve or reject endpoint. Empty when a redirect URL is returned instead. */ grantId: string; /** * URL the end user should be redirected to when the flow can complete without consent. Empty when consent is still required. */ redirectUrl: string; }; /** * OAuth2 Approve */ export type Oauth2Approve = { /** * URL the end user should be redirected to after the grant is approved, carrying the authorization `code` and/or `id_token` along with the original `state`. */ redirectUrl: string; }; /** * OAuth2 Reject */ export type Oauth2Reject = { /** * URL the end user should be redirected to after the grant is rejected, carrying an `access_denied` error. */ redirectUrl: string; }; /** * OAuth2 Grant */ export type Oauth2Grant = { /** * Grant ID. */ $id: string; /** * Grant creation time in ISO 8601 format. */ $createdAt: string; /** * Grant update date in ISO 8601 format. */ $updatedAt: string; /** * ID of the user the grant belongs to. */ userId: string; /** * ID of the OAuth2 client (app) the grant was requested for. */ appId: string; /** * Requested OAuth2 scopes the user is being asked to consent to. */ scopes: string[]; /** * Requested RFC 8707 resource indicators the user is being asked to consent to. */ resources: string[]; /** * Requested authorization_details the user is being asked to consent to, as a JSON string. Each entry has a `type` plus project-defined fields. */ authorizationDetails: string; /** * OIDC prompt directive the consent screen should honor. Space-separated list of: login, consent, select_account. */ prompt: string; /** * Redirect URI the user will be sent to after the flow completes. */ redirectUri: string; /** * Unix timestamp of when the user last authenticated. */ authTime: number; /** * Grant expiration time in ISO 8601 format. */ expire: string; }; /** * OAuth2 Device Authorization */ export type Oauth2DeviceAuthorization = { /** * Device verification code used by the client to poll the token endpoint. */ device_code: string; /** * Short code the end user enters on the verification page. */ user_code: string; /** * URL where the end user enters the user code. */ verification_uri: string; /** * Verification URL with the user code prefilled as a query parameter. */ verification_uri_complete: string; /** * Lifetime of the device code and user code in seconds. */ expires_in: number; /** * Minimum polling interval for the token endpoint in seconds. */ interval: number; }; /** * OAuth2 PAR */ export type Oauth2PAR = { /** * Authorization request handle to pass to the authorize endpoint. */ request_uri: string; /** * Lifetime of the authorization request handle in seconds. */ expires_in: number; }; /** * OAuth2 Token */ export type Oauth2Token = { /** * OAuth2 access token. */ access_token: string; /** * OAuth2 token type. */ token_type: string; /** * Access token lifetime in seconds. */ expires_in: number; /** * OAuth2 refresh token. */ refresh_token: string; /** * Space-separated scopes granted to the access token. */ scope: string; /** * Granted RFC 9396 authorization details as a JSON string. */ authorization_details?: string; /** * OpenID Connect ID token. Returned when the `openid` scope is granted. */ id_token?: string; }; /** * OAuth2 Consent */ export type Oauth2Consent = { /** * Consent ID. */ $id: string; /** * Consent creation time in ISO 8601 format. */ $createdAt: string; /** * Consent update date in ISO 8601 format. */ $updatedAt: string; /** * ID of the user the consent belongs to. */ userId: string; /** * ID of the registered app the consent was given to. Empty for URL-form (CIMD) clients. */ appId: string; /** * Client ID metadata document URL of the client the consent was given to. Empty for registered apps. */ cimdUrl: string; /** * OAuth2 scopes the user consented to. */ scopes: string[]; /** * RFC 8707 resource indicators the user consented to. */ resources: string[]; /** * Authorization details the user consented to, as a JSON string. Each entry has a `type` plus project-defined fields. */ authorizationDetails: string; /** * Consent expiration time in ISO 8601 format. Empty when the consent has no token-bound expiry yet. */ expire: string; }; /** * OAuth2 Consent Token */ export type Oauth2ConsentToken = { /** * Token family ID. */ $id: string; /** * Token creation time in ISO 8601 format. */ $createdAt: string; /** * Token update date in ISO 8601 format. Refreshing the token family updates this. */ $updatedAt: string; /** * ID of the consent the token family was issued under. */ consentId: string; /** * ID of the user the token family belongs to. */ userId: string; /** * ID of the registered app the token family was issued to. Empty for URL-form (CIMD) clients. */ appId: string; /** * Client ID metadata document URL of the client the token family was issued to. Empty for registered apps. */ cimdUrl: string; /** * OAuth2 scopes granted on the token family. */ scopes: string[]; /** * RFC 8707 resource indicators granted on the token family. */ resources: string[]; /** * Authorization details granted on the token family, as a JSON string. Each entry has a `type` plus project-defined fields. */ authorizationDetails: string; /** * Expiration time of the current access token of this family in ISO 8601 format. */ expire: string; }; /** * OAuth2 Project */ export type Oauth2Project = { /** * Project ID. */ $id: string; /** * Region ID the project is deployed in. */ region: string; /** * API endpoint of the region the project is deployed in. Empty when the region has no public hostname configured. */ endpoint: string; }; /** * OAuth2 Organization */ export type Oauth2Organization = { /** * Organization ID. */ $id: string; }; /** * OAuth2 accessible projects list */ export type Oauth2ProjectList = { /** * Total number of projects that matched your query. */ total: number; /** * List of projects. */ projects: Oauth2Project[]; }; /** * OAuth2 accessible organizations list */ export type Oauth2OrganizationList = { /** * Total number of organizations that matched your query. */ total: number; /** * List of organizations. */ organizations: Oauth2Organization[]; }; /** * OAuth2 consents list */ export type Oauth2ConsentList = { /** * Total number of consents that matched your query. */ total: number; /** * List of consents. */ consents: Oauth2Consent[]; }; /** * OAuth2 consent tokens list */ export type Oauth2ConsentTokenList = { /** * Total number of tokens that matched your query. */ total: number; /** * List of tokens. */ tokens: Oauth2ConsentToken[]; }; /** * Activity event list */ export type ActivityEventList = { /** * Total number of events that matched your query. */ total: number; /** * List of events. */ events: ActivityEvent[]; }; /** * Backup archive list */ export type BackupArchiveList = { /** * Total number of archives that matched your query. */ total: number; /** * List of archives. */ archives: BackupArchive[]; }; /** * Backup policy list */ export type BackupPolicyList = { /** * Total number of policies that matched your query. */ total: number; /** * List of policies. */ policies: BackupPolicy[]; }; /** * Backup restoration list */ export type BackupRestorationList = { /** * Total number of restorations that matched your query. */ total: number; /** * List of restorations. */ restorations: BackupRestoration[]; }; /** * Database Migrations List */ export type DatabaseMigrationList = { /** * Total number of migrations that matched your query. */ total: number; /** * List of migrations. */ migrations: DatabaseMigration[]; }; /** * Dedicated databases list */ export type DedicatedDatabaseList = { /** * Total number of databases that matched your query. */ total: number; /** * List of databases. */ databases: DedicatedDatabase[]; }; /** * Apps list */ export type AppsList = { /** * Total number of apps that matched your query. */ total: number; /** * List of apps. */ apps: App[]; }; /** * App secrets list */ export type AppSecretList = { /** * Total number of secrets that matched your query. */ total: number; /** * List of secrets. */ secrets: AppSecret[]; }; /** * App scopes list */ export type AppScopeList = { /** * Total number of scopes that matched your query. */ total: number; /** * List of scopes. */ scopes: AppScope[]; }; /** * App installations list */ export type AppInstallationList = { /** * Total number of installations that matched your query. */ total: number; /** * List of installations. */ installations: AppInstallation[]; }; /** * App keys list */ export type AppKeyList = { /** * Total number of keys that matched your query. */ total: number; /** * List of keys. */ keys: AppKey[]; }; export { }; } export { Models };