Merge remote-tracking branch 'origin/1.7.x' into feat-csv-export

This commit is contained in:
Jake Barnby 2025-08-06 00:20:02 +12:00
commit 2f5dc7782f
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C
25 changed files with 12266 additions and 1295 deletions

View file

@ -207,7 +207,7 @@ return [
[
'key' => 'web',
'name' => 'Console',
'version' => '',
'version' => '0.1.0',
'url' => '',
'package' => '',
'enabled' => true,

View file

@ -5361,7 +5361,7 @@
"scheduledAt": {
"type": "string",
"description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.",
"x-example": null
"x-example": "<SCHEDULED_AT>"
}
}
}
@ -8033,7 +8033,8 @@
"any": {
"description": "Any",
"type": "object",
"additionalProperties": true
"additionalProperties": true,
"example": []
},
"error": {
"description": "Error",
@ -8065,7 +8066,13 @@
"code",
"type",
"version"
]
],
"example": {
"message": "Not found",
"code": "404",
"type": "not_found",
"version": "1.0"
}
},
"documentList": {
"description": "Documents List",
@ -8089,7 +8096,11 @@
"required": [
"total",
"documents"
]
],
"example": {
"total": 5,
"documents": ""
}
},
"sessionList": {
"description": "Sessions List",
@ -8113,7 +8124,11 @@
"required": [
"total",
"sessions"
]
],
"example": {
"total": 5,
"sessions": ""
}
},
"identityList": {
"description": "Identities List",
@ -8137,7 +8152,11 @@
"required": [
"total",
"identities"
]
],
"example": {
"total": 5,
"identities": ""
}
},
"logList": {
"description": "Logs List",
@ -8161,7 +8180,11 @@
"required": [
"total",
"logs"
]
],
"example": {
"total": 5,
"logs": ""
}
},
"fileList": {
"description": "Files List",
@ -8185,7 +8208,11 @@
"required": [
"total",
"files"
]
],
"example": {
"total": 5,
"files": ""
}
},
"teamList": {
"description": "Teams List",
@ -8209,7 +8236,11 @@
"required": [
"total",
"teams"
]
],
"example": {
"total": 5,
"teams": ""
}
},
"membershipList": {
"description": "Memberships List",
@ -8233,7 +8264,11 @@
"required": [
"total",
"memberships"
]
],
"example": {
"total": 5,
"memberships": ""
}
},
"executionList": {
"description": "Executions List",
@ -8257,7 +8292,11 @@
"required": [
"total",
"executions"
]
],
"example": {
"total": 5,
"executions": ""
}
},
"countryList": {
"description": "Countries List",
@ -8281,7 +8320,11 @@
"required": [
"total",
"countries"
]
],
"example": {
"total": 5,
"countries": ""
}
},
"continentList": {
"description": "Continents List",
@ -8305,7 +8348,11 @@
"required": [
"total",
"continents"
]
],
"example": {
"total": 5,
"continents": ""
}
},
"languageList": {
"description": "Languages List",
@ -8329,7 +8376,11 @@
"required": [
"total",
"languages"
]
],
"example": {
"total": 5,
"languages": ""
}
},
"currencyList": {
"description": "Currencies List",
@ -8353,7 +8404,11 @@
"required": [
"total",
"currencies"
]
],
"example": {
"total": 5,
"currencies": ""
}
},
"phoneList": {
"description": "Phones List",
@ -8377,7 +8432,11 @@
"required": [
"total",
"phones"
]
],
"example": {
"total": 5,
"phones": ""
}
},
"localeCodeList": {
"description": "Locale codes list",
@ -8401,7 +8460,11 @@
"required": [
"total",
"localeCodes"
]
],
"example": {
"total": 5,
"localeCodes": ""
}
},
"document": {
"description": "Document",
@ -8458,7 +8521,23 @@
"$createdAt",
"$updatedAt",
"$permissions"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$sequence": 1,
"$collectionId": "5e5ea5c15117e",
"$databaseId": "5e5ea5c15117e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"$permissions": [
"read(\"any\")"
],
"username": "john.doe",
"email": "john.doe@example.com",
"fullName": "John Doe",
"age": 30,
"isAdmin": false
}
},
"log": {
"description": "Log",
@ -8592,7 +8671,30 @@
"deviceModel",
"countryCode",
"countryName"
]
],
"example": {
"event": "account.sessions.create",
"userId": "610fc2f985ee0",
"userEmail": "john@appwrite.io",
"userName": "John Doe",
"mode": "admin",
"ip": "127.0.0.1",
"time": "2020-10-15T06:38:00.000+00:00",
"osCode": "Mac",
"osName": "Mac",
"osVersion": "Mac",
"clientType": "browser",
"clientCode": "CM",
"clientName": "Chrome Mobile iOS",
"clientVersion": "84.0",
"clientEngine": "WebKit",
"clientEngineVersion": "605.1.15",
"deviceName": "smartphone",
"deviceBrand": "Google",
"deviceModel": "Nexus 5",
"countryCode": "US",
"countryName": "United States"
}
},
"user": {
"description": "User",
@ -8753,7 +8855,33 @@
"prefs",
"targets",
"accessedAt"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"name": "John Doe",
"password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE",
"hash": "argon2",
"hashOptions": {},
"registration": "2020-10-15T06:38:00.000+00:00",
"status": true,
"labels": [
"vip"
],
"passwordUpdate": "2020-10-15T06:38:00.000+00:00",
"email": "john@appwrite.io",
"phone": "+4930901820",
"emailVerification": true,
"phoneVerification": true,
"mfa": true,
"prefs": {
"theme": "pink",
"timezone": "UTC"
},
"targets": [],
"accessedAt": "2020-10-15T06:38:00.000+00:00"
}
},
"algoMd5": {
"description": "AlgoMD5",
@ -8767,7 +8895,10 @@
},
"required": [
"type"
]
],
"example": {
"type": "md5"
}
},
"algoSha": {
"description": "AlgoSHA",
@ -8781,7 +8912,10 @@
},
"required": [
"type"
]
],
"example": {
"type": "sha"
}
},
"algoPhpass": {
"description": "AlgoPHPass",
@ -8795,7 +8929,10 @@
},
"required": [
"type"
]
],
"example": {
"type": "phpass"
}
},
"algoBcrypt": {
"description": "AlgoBcrypt",
@ -8809,7 +8946,10 @@
},
"required": [
"type"
]
],
"example": {
"type": "bcrypt"
}
},
"algoScrypt": {
"description": "AlgoScrypt",
@ -8851,7 +8991,14 @@
"costMemory",
"costParallel",
"length"
]
],
"example": {
"type": "scrypt",
"costCpu": 8,
"costMemory": 14,
"costParallel": 1,
"length": 64
}
},
"algoScryptModified": {
"description": "AlgoScryptModified",
@ -8883,7 +9030,13 @@
"salt",
"saltSeparator",
"signerKey"
]
],
"example": {
"type": "scryptMod",
"salt": "UxLMreBr6tYyjQ==",
"saltSeparator": "Bw==",
"signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ=="
}
},
"algoArgon2": {
"description": "AlgoArgon2",
@ -8918,12 +9071,23 @@
"memoryCost",
"timeCost",
"threads"
]
],
"example": {
"type": "argon2",
"memoryCost": 65536,
"timeCost": 4,
"threads": 3
}
},
"preferences": {
"description": "Preferences",
"type": "object",
"additionalProperties": true
"additionalProperties": true,
"example": {
"language": "en",
"timezone": "UTC",
"darkTheme": true
}
},
"session": {
"description": "Session",
@ -9110,7 +9274,40 @@
"factors",
"secret",
"mfaUpdatedAt"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5bb8c16897e",
"expire": "2020-10-15T06:38:00.000+00:00",
"provider": "email",
"providerUid": "user@example.com",
"providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3",
"providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00",
"providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3",
"ip": "127.0.0.1",
"osCode": "Mac",
"osName": "Mac",
"osVersion": "Mac",
"clientType": "browser",
"clientCode": "CM",
"clientName": "Chrome Mobile iOS",
"clientVersion": "84.0",
"clientEngine": "WebKit",
"clientEngineVersion": "605.1.15",
"deviceName": "smartphone",
"deviceBrand": "Google",
"deviceModel": "Nexus 5",
"countryCode": "US",
"countryName": "United States",
"current": true,
"factors": [
"email"
],
"secret": "5e5bb8c16897e",
"mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00"
}
},
"identity": {
"description": "Identity",
@ -9178,7 +9375,19 @@
"providerAccessToken",
"providerAccessTokenExpiry",
"providerRefreshToken"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5bb8c16897e",
"provider": "email",
"providerUid": "5e5bb8c16897e",
"providerEmail": "user@example.com",
"providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3",
"providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00",
"providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"
}
},
"token": {
"description": "Token",
@ -9222,7 +9431,15 @@
"secret",
"expire",
"phrase"
]
],
"example": {
"$id": "bb8ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5ea5c168bb8",
"secret": "",
"expire": "2020-10-15T06:38:00.000+00:00",
"phrase": "Golden Fox"
}
},
"jwt": {
"description": "JWT",
@ -9236,7 +9453,10 @@
},
"required": [
"jwt"
]
],
"example": {
"jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
},
"locale": {
"description": "Locale",
@ -9286,7 +9506,16 @@
"continent",
"eu",
"currency"
]
],
"example": {
"ip": "127.0.0.1",
"countryCode": "US",
"country": "United States",
"continentCode": "NA",
"continent": "North America",
"eu": false,
"currency": "USD"
}
},
"localeCode": {
"description": "LocaleCode",
@ -9306,7 +9535,11 @@
"required": [
"code",
"name"
]
],
"example": {
"code": "en-us",
"name": "US"
}
},
"file": {
"description": "File",
@ -9388,7 +9621,22 @@
"sizeOriginal",
"chunksTotal",
"chunksUploaded"
]
],
"example": {
"$id": "5e5ea5c16897e",
"bucketId": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"$permissions": [
"read(\"any\")"
],
"name": "Pink.png",
"signature": "5d529fd02b544198ae075bd57c1762bb",
"mimeType": "image\/png",
"sizeOriginal": 17890,
"chunksTotal": 17890,
"chunksUploaded": 17890
}
},
"team": {
"description": "Team",
@ -9439,7 +9687,18 @@
"name",
"total",
"prefs"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"name": "VIP",
"total": 7,
"prefs": {
"theme": "pink",
"timezone": "UTC"
}
}
},
"membership": {
"description": "Membership",
@ -9530,7 +9789,24 @@
"confirm",
"mfa",
"roles"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5ea5c16897e",
"userName": "John Doe",
"userEmail": "john@appwrite.io",
"teamId": "5e5ea5c16897e",
"teamName": "VIP",
"invited": "2020-10-15T06:38:00.000+00:00",
"joined": "2020-10-15T06:38:00.000+00:00",
"confirm": false,
"mfa": false,
"roles": [
"owner"
]
}
},
"execution": {
"description": "Execution",
@ -9661,7 +9937,36 @@
"logs",
"errors",
"duration"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"$permissions": [
"any"
],
"functionId": "5e5ea6g16897e",
"trigger": "http",
"status": "processing",
"requestMethod": "GET",
"requestPath": "\/articles?id=5",
"requestHeaders": [
{
"Content-Type": "application\/json"
}
],
"responseStatusCode": 200,
"responseBody": "",
"responseHeaders": [
{
"Content-Type": "application\/json"
}
],
"logs": "",
"errors": "",
"duration": 0.4,
"scheduledAt": "2020-10-15T06:38:00.000+00:00"
}
},
"country": {
"description": "Country",
@ -9681,7 +9986,11 @@
"required": [
"name",
"code"
]
],
"example": {
"name": "United States",
"code": "US"
}
},
"continent": {
"description": "Continent",
@ -9701,7 +10010,11 @@
"required": [
"name",
"code"
]
],
"example": {
"name": "Europe",
"code": "EU"
}
},
"language": {
"description": "Language",
@ -9727,7 +10040,12 @@
"name",
"code",
"nativeName"
]
],
"example": {
"name": "Italian",
"code": "it",
"nativeName": "Italiano"
}
},
"currency": {
"description": "Currency",
@ -9779,7 +10097,16 @@
"rounding",
"code",
"namePlural"
]
],
"example": {
"symbol": "$",
"name": "US dollar",
"symbolNative": "$",
"decimalDigits": 2,
"rounding": 0,
"code": "USD",
"namePlural": "US dollars"
}
},
"phone": {
"description": "Phone",
@ -9805,7 +10132,12 @@
"code",
"countryCode",
"countryName"
]
],
"example": {
"code": "+1",
"countryCode": "US",
"countryName": "United States"
}
},
"headers": {
"description": "Headers",
@ -9825,7 +10157,11 @@
"required": [
"name",
"value"
]
],
"example": {
"name": "Content-Type",
"value": "application\/json"
}
},
"mfaChallenge": {
"description": "MFA Challenge",
@ -9857,7 +10193,13 @@
"$createdAt",
"userId",
"expire"
]
],
"example": {
"$id": "bb8ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5ea5c168bb8",
"expire": "2020-10-15T06:38:00.000+00:00"
}
},
"mfaRecoveryCodes": {
"description": "MFA Recovery Codes",
@ -9877,7 +10219,13 @@
},
"required": [
"recoveryCodes"
]
],
"example": {
"recoveryCodes": [
"a3kf0-s0cl2",
"s0co1-as98s"
]
}
},
"mfaType": {
"description": "MFAType",
@ -9897,7 +10245,11 @@
"required": [
"secret",
"uri"
]
],
"example": {
"secret": true,
"uri": true
}
},
"mfaFactors": {
"description": "MFAFactors",
@ -9929,7 +10281,13 @@
"phone",
"email",
"recoveryCode"
]
],
"example": {
"totp": true,
"phone": true,
"email": true,
"recoveryCode": true
}
},
"subscriber": {
"description": "Subscriber",
@ -10003,7 +10361,27 @@
"userName",
"topicId",
"providerType"
]
],
"example": {
"$id": "259125845563242502",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"targetId": "259125845563242502",
"target": {
"$id": "259125845563242502",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"providerType": "email",
"providerId": "259125845563242502",
"name": "ageon-app-email",
"identifier": "random-mail@email.org",
"userId": "5e5ea5c16897e"
},
"userId": "5e5ea5c16897e",
"userName": "Aegon Targaryen",
"topicId": "259125845563242502",
"providerType": "email"
}
},
"target": {
"description": "Target",
@ -10065,7 +10443,18 @@
"providerType",
"identifier",
"expired"
]
],
"example": {
"$id": "259125845563242502",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"name": "Apple iPhone 12",
"userId": "259125845563242502",
"providerId": "259125845563242502",
"providerType": "email",
"identifier": "token",
"expired": false
}
}
},
"securitySchemes": {

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -4489,30 +4489,6 @@
}
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
},
{
"name": "createDocuments",
"auth": {
"Admin": [],
"Key": []
},
"parameters": [
"databaseId",
"collectionId",
"documents"
],
"required": [
"databaseId",
"collectionId",
"documents"
],
"responses": [
{
"code": 201,
"model": "#\/components\/schemas\/documentList"
}
],
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
}
],
"auth": {
@ -5385,7 +5361,7 @@
"scheduledAt": {
"type": "string",
"description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.",
"x-example": null
"x-example": "<SCHEDULED_AT>"
}
}
}
@ -8057,7 +8033,8 @@
"any": {
"description": "Any",
"type": "object",
"additionalProperties": true
"additionalProperties": true,
"example": []
},
"error": {
"description": "Error",
@ -8089,7 +8066,13 @@
"code",
"type",
"version"
]
],
"example": {
"message": "Not found",
"code": "404",
"type": "not_found",
"version": "1.0"
}
},
"documentList": {
"description": "Documents List",
@ -8113,7 +8096,11 @@
"required": [
"total",
"documents"
]
],
"example": {
"total": 5,
"documents": ""
}
},
"sessionList": {
"description": "Sessions List",
@ -8137,7 +8124,11 @@
"required": [
"total",
"sessions"
]
],
"example": {
"total": 5,
"sessions": ""
}
},
"identityList": {
"description": "Identities List",
@ -8161,7 +8152,11 @@
"required": [
"total",
"identities"
]
],
"example": {
"total": 5,
"identities": ""
}
},
"logList": {
"description": "Logs List",
@ -8185,7 +8180,11 @@
"required": [
"total",
"logs"
]
],
"example": {
"total": 5,
"logs": ""
}
},
"fileList": {
"description": "Files List",
@ -8209,7 +8208,11 @@
"required": [
"total",
"files"
]
],
"example": {
"total": 5,
"files": ""
}
},
"teamList": {
"description": "Teams List",
@ -8233,7 +8236,11 @@
"required": [
"total",
"teams"
]
],
"example": {
"total": 5,
"teams": ""
}
},
"membershipList": {
"description": "Memberships List",
@ -8257,7 +8264,11 @@
"required": [
"total",
"memberships"
]
],
"example": {
"total": 5,
"memberships": ""
}
},
"executionList": {
"description": "Executions List",
@ -8281,7 +8292,11 @@
"required": [
"total",
"executions"
]
],
"example": {
"total": 5,
"executions": ""
}
},
"countryList": {
"description": "Countries List",
@ -8305,7 +8320,11 @@
"required": [
"total",
"countries"
]
],
"example": {
"total": 5,
"countries": ""
}
},
"continentList": {
"description": "Continents List",
@ -8329,7 +8348,11 @@
"required": [
"total",
"continents"
]
],
"example": {
"total": 5,
"continents": ""
}
},
"languageList": {
"description": "Languages List",
@ -8353,7 +8376,11 @@
"required": [
"total",
"languages"
]
],
"example": {
"total": 5,
"languages": ""
}
},
"currencyList": {
"description": "Currencies List",
@ -8377,7 +8404,11 @@
"required": [
"total",
"currencies"
]
],
"example": {
"total": 5,
"currencies": ""
}
},
"phoneList": {
"description": "Phones List",
@ -8401,7 +8432,11 @@
"required": [
"total",
"phones"
]
],
"example": {
"total": 5,
"phones": ""
}
},
"localeCodeList": {
"description": "Locale codes list",
@ -8425,7 +8460,11 @@
"required": [
"total",
"localeCodes"
]
],
"example": {
"total": 5,
"localeCodes": ""
}
},
"document": {
"description": "Document",
@ -8482,7 +8521,23 @@
"$createdAt",
"$updatedAt",
"$permissions"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$sequence": 1,
"$collectionId": "5e5ea5c15117e",
"$databaseId": "5e5ea5c15117e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"$permissions": [
"read(\"any\")"
],
"username": "john.doe",
"email": "john.doe@example.com",
"fullName": "John Doe",
"age": 30,
"isAdmin": false
}
},
"log": {
"description": "Log",
@ -8616,7 +8671,30 @@
"deviceModel",
"countryCode",
"countryName"
]
],
"example": {
"event": "account.sessions.create",
"userId": "610fc2f985ee0",
"userEmail": "john@appwrite.io",
"userName": "John Doe",
"mode": "admin",
"ip": "127.0.0.1",
"time": "2020-10-15T06:38:00.000+00:00",
"osCode": "Mac",
"osName": "Mac",
"osVersion": "Mac",
"clientType": "browser",
"clientCode": "CM",
"clientName": "Chrome Mobile iOS",
"clientVersion": "84.0",
"clientEngine": "WebKit",
"clientEngineVersion": "605.1.15",
"deviceName": "smartphone",
"deviceBrand": "Google",
"deviceModel": "Nexus 5",
"countryCode": "US",
"countryName": "United States"
}
},
"user": {
"description": "User",
@ -8777,7 +8855,33 @@
"prefs",
"targets",
"accessedAt"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"name": "John Doe",
"password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE",
"hash": "argon2",
"hashOptions": {},
"registration": "2020-10-15T06:38:00.000+00:00",
"status": true,
"labels": [
"vip"
],
"passwordUpdate": "2020-10-15T06:38:00.000+00:00",
"email": "john@appwrite.io",
"phone": "+4930901820",
"emailVerification": true,
"phoneVerification": true,
"mfa": true,
"prefs": {
"theme": "pink",
"timezone": "UTC"
},
"targets": [],
"accessedAt": "2020-10-15T06:38:00.000+00:00"
}
},
"algoMd5": {
"description": "AlgoMD5",
@ -8791,7 +8895,10 @@
},
"required": [
"type"
]
],
"example": {
"type": "md5"
}
},
"algoSha": {
"description": "AlgoSHA",
@ -8805,7 +8912,10 @@
},
"required": [
"type"
]
],
"example": {
"type": "sha"
}
},
"algoPhpass": {
"description": "AlgoPHPass",
@ -8819,7 +8929,10 @@
},
"required": [
"type"
]
],
"example": {
"type": "phpass"
}
},
"algoBcrypt": {
"description": "AlgoBcrypt",
@ -8833,7 +8946,10 @@
},
"required": [
"type"
]
],
"example": {
"type": "bcrypt"
}
},
"algoScrypt": {
"description": "AlgoScrypt",
@ -8875,7 +8991,14 @@
"costMemory",
"costParallel",
"length"
]
],
"example": {
"type": "scrypt",
"costCpu": 8,
"costMemory": 14,
"costParallel": 1,
"length": 64
}
},
"algoScryptModified": {
"description": "AlgoScryptModified",
@ -8907,7 +9030,13 @@
"salt",
"saltSeparator",
"signerKey"
]
],
"example": {
"type": "scryptMod",
"salt": "UxLMreBr6tYyjQ==",
"saltSeparator": "Bw==",
"signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ=="
}
},
"algoArgon2": {
"description": "AlgoArgon2",
@ -8942,12 +9071,23 @@
"memoryCost",
"timeCost",
"threads"
]
],
"example": {
"type": "argon2",
"memoryCost": 65536,
"timeCost": 4,
"threads": 3
}
},
"preferences": {
"description": "Preferences",
"type": "object",
"additionalProperties": true
"additionalProperties": true,
"example": {
"language": "en",
"timezone": "UTC",
"darkTheme": true
}
},
"session": {
"description": "Session",
@ -9134,7 +9274,40 @@
"factors",
"secret",
"mfaUpdatedAt"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5bb8c16897e",
"expire": "2020-10-15T06:38:00.000+00:00",
"provider": "email",
"providerUid": "user@example.com",
"providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3",
"providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00",
"providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3",
"ip": "127.0.0.1",
"osCode": "Mac",
"osName": "Mac",
"osVersion": "Mac",
"clientType": "browser",
"clientCode": "CM",
"clientName": "Chrome Mobile iOS",
"clientVersion": "84.0",
"clientEngine": "WebKit",
"clientEngineVersion": "605.1.15",
"deviceName": "smartphone",
"deviceBrand": "Google",
"deviceModel": "Nexus 5",
"countryCode": "US",
"countryName": "United States",
"current": true,
"factors": [
"email"
],
"secret": "5e5bb8c16897e",
"mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00"
}
},
"identity": {
"description": "Identity",
@ -9202,7 +9375,19 @@
"providerAccessToken",
"providerAccessTokenExpiry",
"providerRefreshToken"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5bb8c16897e",
"provider": "email",
"providerUid": "5e5bb8c16897e",
"providerEmail": "user@example.com",
"providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3",
"providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00",
"providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"
}
},
"token": {
"description": "Token",
@ -9246,7 +9431,15 @@
"secret",
"expire",
"phrase"
]
],
"example": {
"$id": "bb8ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5ea5c168bb8",
"secret": "",
"expire": "2020-10-15T06:38:00.000+00:00",
"phrase": "Golden Fox"
}
},
"jwt": {
"description": "JWT",
@ -9260,7 +9453,10 @@
},
"required": [
"jwt"
]
],
"example": {
"jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
},
"locale": {
"description": "Locale",
@ -9310,7 +9506,16 @@
"continent",
"eu",
"currency"
]
],
"example": {
"ip": "127.0.0.1",
"countryCode": "US",
"country": "United States",
"continentCode": "NA",
"continent": "North America",
"eu": false,
"currency": "USD"
}
},
"localeCode": {
"description": "LocaleCode",
@ -9330,7 +9535,11 @@
"required": [
"code",
"name"
]
],
"example": {
"code": "en-us",
"name": "US"
}
},
"file": {
"description": "File",
@ -9412,7 +9621,22 @@
"sizeOriginal",
"chunksTotal",
"chunksUploaded"
]
],
"example": {
"$id": "5e5ea5c16897e",
"bucketId": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"$permissions": [
"read(\"any\")"
],
"name": "Pink.png",
"signature": "5d529fd02b544198ae075bd57c1762bb",
"mimeType": "image\/png",
"sizeOriginal": 17890,
"chunksTotal": 17890,
"chunksUploaded": 17890
}
},
"team": {
"description": "Team",
@ -9463,7 +9687,18 @@
"name",
"total",
"prefs"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"name": "VIP",
"total": 7,
"prefs": {
"theme": "pink",
"timezone": "UTC"
}
}
},
"membership": {
"description": "Membership",
@ -9554,7 +9789,24 @@
"confirm",
"mfa",
"roles"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5ea5c16897e",
"userName": "John Doe",
"userEmail": "john@appwrite.io",
"teamId": "5e5ea5c16897e",
"teamName": "VIP",
"invited": "2020-10-15T06:38:00.000+00:00",
"joined": "2020-10-15T06:38:00.000+00:00",
"confirm": false,
"mfa": false,
"roles": [
"owner"
]
}
},
"execution": {
"description": "Execution",
@ -9685,7 +9937,36 @@
"logs",
"errors",
"duration"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"$permissions": [
"any"
],
"functionId": "5e5ea6g16897e",
"trigger": "http",
"status": "processing",
"requestMethod": "GET",
"requestPath": "\/articles?id=5",
"requestHeaders": [
{
"Content-Type": "application\/json"
}
],
"responseStatusCode": 200,
"responseBody": "",
"responseHeaders": [
{
"Content-Type": "application\/json"
}
],
"logs": "",
"errors": "",
"duration": 0.4,
"scheduledAt": "2020-10-15T06:38:00.000+00:00"
}
},
"country": {
"description": "Country",
@ -9705,7 +9986,11 @@
"required": [
"name",
"code"
]
],
"example": {
"name": "United States",
"code": "US"
}
},
"continent": {
"description": "Continent",
@ -9725,7 +10010,11 @@
"required": [
"name",
"code"
]
],
"example": {
"name": "Europe",
"code": "EU"
}
},
"language": {
"description": "Language",
@ -9751,7 +10040,12 @@
"name",
"code",
"nativeName"
]
],
"example": {
"name": "Italian",
"code": "it",
"nativeName": "Italiano"
}
},
"currency": {
"description": "Currency",
@ -9803,7 +10097,16 @@
"rounding",
"code",
"namePlural"
]
],
"example": {
"symbol": "$",
"name": "US dollar",
"symbolNative": "$",
"decimalDigits": 2,
"rounding": 0,
"code": "USD",
"namePlural": "US dollars"
}
},
"phone": {
"description": "Phone",
@ -9829,7 +10132,12 @@
"code",
"countryCode",
"countryName"
]
],
"example": {
"code": "+1",
"countryCode": "US",
"countryName": "United States"
}
},
"headers": {
"description": "Headers",
@ -9849,7 +10157,11 @@
"required": [
"name",
"value"
]
],
"example": {
"name": "Content-Type",
"value": "application\/json"
}
},
"mfaChallenge": {
"description": "MFA Challenge",
@ -9881,7 +10193,13 @@
"$createdAt",
"userId",
"expire"
]
],
"example": {
"$id": "bb8ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5ea5c168bb8",
"expire": "2020-10-15T06:38:00.000+00:00"
}
},
"mfaRecoveryCodes": {
"description": "MFA Recovery Codes",
@ -9901,7 +10219,13 @@
},
"required": [
"recoveryCodes"
]
],
"example": {
"recoveryCodes": [
"a3kf0-s0cl2",
"s0co1-as98s"
]
}
},
"mfaType": {
"description": "MFAType",
@ -9921,7 +10245,11 @@
"required": [
"secret",
"uri"
]
],
"example": {
"secret": true,
"uri": true
}
},
"mfaFactors": {
"description": "MFAFactors",
@ -9953,7 +10281,13 @@
"phone",
"email",
"recoveryCode"
]
],
"example": {
"totp": true,
"phone": true,
"email": true,
"recoveryCode": true
}
},
"subscriber": {
"description": "Subscriber",
@ -10027,7 +10361,27 @@
"userName",
"topicId",
"providerType"
]
],
"example": {
"$id": "259125845563242502",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"targetId": "259125845563242502",
"target": {
"$id": "259125845563242502",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"providerType": "email",
"providerId": "259125845563242502",
"name": "ageon-app-email",
"identifier": "random-mail@email.org",
"userId": "5e5ea5c16897e"
},
"userId": "5e5ea5c16897e",
"userName": "Aegon Targaryen",
"topicId": "259125845563242502",
"providerType": "email"
}
},
"target": {
"description": "Target",
@ -10089,7 +10443,18 @@
"providerType",
"identifier",
"expired"
]
],
"example": {
"$id": "259125845563242502",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"name": "Apple iPhone 12",
"userId": "259125845563242502",
"providerId": "259125845563242502",
"providerType": "email",
"identifier": "token",
"expired": false
}
}
},
"securitySchemes": {

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -5461,7 +5461,7 @@
"type": "string",
"description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.",
"default": null,
"x-example": null
"x-example": "<SCHEDULED_AT>"
}
}
}
@ -8094,7 +8094,8 @@
"any": {
"description": "Any",
"type": "object",
"additionalProperties": true
"additionalProperties": true,
"example": []
},
"documentList": {
"description": "Documents List",
@ -8119,7 +8120,11 @@
"required": [
"total",
"documents"
]
],
"example": {
"total": 5,
"documents": ""
}
},
"sessionList": {
"description": "Sessions List",
@ -8144,7 +8149,11 @@
"required": [
"total",
"sessions"
]
],
"example": {
"total": 5,
"sessions": ""
}
},
"identityList": {
"description": "Identities List",
@ -8169,7 +8178,11 @@
"required": [
"total",
"identities"
]
],
"example": {
"total": 5,
"identities": ""
}
},
"logList": {
"description": "Logs List",
@ -8194,7 +8207,11 @@
"required": [
"total",
"logs"
]
],
"example": {
"total": 5,
"logs": ""
}
},
"fileList": {
"description": "Files List",
@ -8219,7 +8236,11 @@
"required": [
"total",
"files"
]
],
"example": {
"total": 5,
"files": ""
}
},
"teamList": {
"description": "Teams List",
@ -8244,7 +8265,11 @@
"required": [
"total",
"teams"
]
],
"example": {
"total": 5,
"teams": ""
}
},
"membershipList": {
"description": "Memberships List",
@ -8269,7 +8294,11 @@
"required": [
"total",
"memberships"
]
],
"example": {
"total": 5,
"memberships": ""
}
},
"executionList": {
"description": "Executions List",
@ -8294,7 +8323,11 @@
"required": [
"total",
"executions"
]
],
"example": {
"total": 5,
"executions": ""
}
},
"countryList": {
"description": "Countries List",
@ -8319,7 +8352,11 @@
"required": [
"total",
"countries"
]
],
"example": {
"total": 5,
"countries": ""
}
},
"continentList": {
"description": "Continents List",
@ -8344,7 +8381,11 @@
"required": [
"total",
"continents"
]
],
"example": {
"total": 5,
"continents": ""
}
},
"languageList": {
"description": "Languages List",
@ -8369,7 +8410,11 @@
"required": [
"total",
"languages"
]
],
"example": {
"total": 5,
"languages": ""
}
},
"currencyList": {
"description": "Currencies List",
@ -8394,7 +8439,11 @@
"required": [
"total",
"currencies"
]
],
"example": {
"total": 5,
"currencies": ""
}
},
"phoneList": {
"description": "Phones List",
@ -8419,7 +8468,11 @@
"required": [
"total",
"phones"
]
],
"example": {
"total": 5,
"phones": ""
}
},
"localeCodeList": {
"description": "Locale codes list",
@ -8444,7 +8497,11 @@
"required": [
"total",
"localeCodes"
]
],
"example": {
"total": 5,
"localeCodes": ""
}
},
"document": {
"description": "Document",
@ -8501,7 +8558,23 @@
"$createdAt",
"$updatedAt",
"$permissions"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$sequence": 1,
"$collectionId": "5e5ea5c15117e",
"$databaseId": "5e5ea5c15117e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"$permissions": [
"read(\"any\")"
],
"username": "john.doe",
"email": "john.doe@example.com",
"fullName": "John Doe",
"age": 30,
"isAdmin": false
}
},
"log": {
"description": "Log",
@ -8635,7 +8708,30 @@
"deviceModel",
"countryCode",
"countryName"
]
],
"example": {
"event": "account.sessions.create",
"userId": "610fc2f985ee0",
"userEmail": "john@appwrite.io",
"userName": "John Doe",
"mode": "admin",
"ip": "127.0.0.1",
"time": "2020-10-15T06:38:00.000+00:00",
"osCode": "Mac",
"osName": "Mac",
"osVersion": "Mac",
"clientType": "browser",
"clientCode": "CM",
"clientName": "Chrome Mobile iOS",
"clientVersion": "84.0",
"clientEngine": "WebKit",
"clientEngineVersion": "605.1.15",
"deviceName": "smartphone",
"deviceBrand": "Google",
"deviceModel": "Nexus 5",
"countryCode": "US",
"countryName": "United States"
}
},
"user": {
"description": "User",
@ -8798,7 +8894,33 @@
"prefs",
"targets",
"accessedAt"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"name": "John Doe",
"password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE",
"hash": "argon2",
"hashOptions": {},
"registration": "2020-10-15T06:38:00.000+00:00",
"status": true,
"labels": [
"vip"
],
"passwordUpdate": "2020-10-15T06:38:00.000+00:00",
"email": "john@appwrite.io",
"phone": "+4930901820",
"emailVerification": true,
"phoneVerification": true,
"mfa": true,
"prefs": {
"theme": "pink",
"timezone": "UTC"
},
"targets": [],
"accessedAt": "2020-10-15T06:38:00.000+00:00"
}
},
"algoMd5": {
"description": "AlgoMD5",
@ -8812,7 +8934,10 @@
},
"required": [
"type"
]
],
"example": {
"type": "md5"
}
},
"algoSha": {
"description": "AlgoSHA",
@ -8826,7 +8951,10 @@
},
"required": [
"type"
]
],
"example": {
"type": "sha"
}
},
"algoPhpass": {
"description": "AlgoPHPass",
@ -8840,7 +8968,10 @@
},
"required": [
"type"
]
],
"example": {
"type": "phpass"
}
},
"algoBcrypt": {
"description": "AlgoBcrypt",
@ -8854,7 +8985,10 @@
},
"required": [
"type"
]
],
"example": {
"type": "bcrypt"
}
},
"algoScrypt": {
"description": "AlgoScrypt",
@ -8896,7 +9030,14 @@
"costMemory",
"costParallel",
"length"
]
],
"example": {
"type": "scrypt",
"costCpu": 8,
"costMemory": 14,
"costParallel": 1,
"length": 64
}
},
"algoScryptModified": {
"description": "AlgoScryptModified",
@ -8928,7 +9069,13 @@
"salt",
"saltSeparator",
"signerKey"
]
],
"example": {
"type": "scryptMod",
"salt": "UxLMreBr6tYyjQ==",
"saltSeparator": "Bw==",
"signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ=="
}
},
"algoArgon2": {
"description": "AlgoArgon2",
@ -8963,12 +9110,23 @@
"memoryCost",
"timeCost",
"threads"
]
],
"example": {
"type": "argon2",
"memoryCost": 65536,
"timeCost": 4,
"threads": 3
}
},
"preferences": {
"description": "Preferences",
"type": "object",
"additionalProperties": true
"additionalProperties": true,
"example": {
"language": "en",
"timezone": "UTC",
"darkTheme": true
}
},
"session": {
"description": "Session",
@ -9155,7 +9313,40 @@
"factors",
"secret",
"mfaUpdatedAt"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5bb8c16897e",
"expire": "2020-10-15T06:38:00.000+00:00",
"provider": "email",
"providerUid": "user@example.com",
"providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3",
"providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00",
"providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3",
"ip": "127.0.0.1",
"osCode": "Mac",
"osName": "Mac",
"osVersion": "Mac",
"clientType": "browser",
"clientCode": "CM",
"clientName": "Chrome Mobile iOS",
"clientVersion": "84.0",
"clientEngine": "WebKit",
"clientEngineVersion": "605.1.15",
"deviceName": "smartphone",
"deviceBrand": "Google",
"deviceModel": "Nexus 5",
"countryCode": "US",
"countryName": "United States",
"current": true,
"factors": [
"email"
],
"secret": "5e5bb8c16897e",
"mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00"
}
},
"identity": {
"description": "Identity",
@ -9223,7 +9414,19 @@
"providerAccessToken",
"providerAccessTokenExpiry",
"providerRefreshToken"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5bb8c16897e",
"provider": "email",
"providerUid": "5e5bb8c16897e",
"providerEmail": "user@example.com",
"providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3",
"providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00",
"providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"
}
},
"token": {
"description": "Token",
@ -9267,7 +9470,15 @@
"secret",
"expire",
"phrase"
]
],
"example": {
"$id": "bb8ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5ea5c168bb8",
"secret": "",
"expire": "2020-10-15T06:38:00.000+00:00",
"phrase": "Golden Fox"
}
},
"jwt": {
"description": "JWT",
@ -9281,7 +9492,10 @@
},
"required": [
"jwt"
]
],
"example": {
"jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
},
"locale": {
"description": "Locale",
@ -9331,7 +9545,16 @@
"continent",
"eu",
"currency"
]
],
"example": {
"ip": "127.0.0.1",
"countryCode": "US",
"country": "United States",
"continentCode": "NA",
"continent": "North America",
"eu": false,
"currency": "USD"
}
},
"localeCode": {
"description": "LocaleCode",
@ -9351,7 +9574,11 @@
"required": [
"code",
"name"
]
],
"example": {
"code": "en-us",
"name": "US"
}
},
"file": {
"description": "File",
@ -9433,7 +9660,22 @@
"sizeOriginal",
"chunksTotal",
"chunksUploaded"
]
],
"example": {
"$id": "5e5ea5c16897e",
"bucketId": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"$permissions": [
"read(\"any\")"
],
"name": "Pink.png",
"signature": "5d529fd02b544198ae075bd57c1762bb",
"mimeType": "image\/png",
"sizeOriginal": 17890,
"chunksTotal": 17890,
"chunksUploaded": 17890
}
},
"team": {
"description": "Team",
@ -9485,7 +9727,18 @@
"name",
"total",
"prefs"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"name": "VIP",
"total": 7,
"prefs": {
"theme": "pink",
"timezone": "UTC"
}
}
},
"membership": {
"description": "Membership",
@ -9576,7 +9829,24 @@
"confirm",
"mfa",
"roles"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5ea5c16897e",
"userName": "John Doe",
"userEmail": "john@appwrite.io",
"teamId": "5e5ea5c16897e",
"teamName": "VIP",
"invited": "2020-10-15T06:38:00.000+00:00",
"joined": "2020-10-15T06:38:00.000+00:00",
"confirm": false,
"mfa": false,
"roles": [
"owner"
]
}
},
"execution": {
"description": "Execution",
@ -9709,7 +9979,36 @@
"logs",
"errors",
"duration"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"$permissions": [
"any"
],
"functionId": "5e5ea6g16897e",
"trigger": "http",
"status": "processing",
"requestMethod": "GET",
"requestPath": "\/articles?id=5",
"requestHeaders": [
{
"Content-Type": "application\/json"
}
],
"responseStatusCode": 200,
"responseBody": "",
"responseHeaders": [
{
"Content-Type": "application\/json"
}
],
"logs": "",
"errors": "",
"duration": 0.4,
"scheduledAt": "2020-10-15T06:38:00.000+00:00"
}
},
"country": {
"description": "Country",
@ -9729,7 +10028,11 @@
"required": [
"name",
"code"
]
],
"example": {
"name": "United States",
"code": "US"
}
},
"continent": {
"description": "Continent",
@ -9749,7 +10052,11 @@
"required": [
"name",
"code"
]
],
"example": {
"name": "Europe",
"code": "EU"
}
},
"language": {
"description": "Language",
@ -9775,7 +10082,12 @@
"name",
"code",
"nativeName"
]
],
"example": {
"name": "Italian",
"code": "it",
"nativeName": "Italiano"
}
},
"currency": {
"description": "Currency",
@ -9827,7 +10139,16 @@
"rounding",
"code",
"namePlural"
]
],
"example": {
"symbol": "$",
"name": "US dollar",
"symbolNative": "$",
"decimalDigits": 2,
"rounding": 0,
"code": "USD",
"namePlural": "US dollars"
}
},
"phone": {
"description": "Phone",
@ -9853,7 +10174,12 @@
"code",
"countryCode",
"countryName"
]
],
"example": {
"code": "+1",
"countryCode": "US",
"countryName": "United States"
}
},
"headers": {
"description": "Headers",
@ -9873,7 +10199,11 @@
"required": [
"name",
"value"
]
],
"example": {
"name": "Content-Type",
"value": "application\/json"
}
},
"mfaChallenge": {
"description": "MFA Challenge",
@ -9905,7 +10235,13 @@
"$createdAt",
"userId",
"expire"
]
],
"example": {
"$id": "bb8ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5ea5c168bb8",
"expire": "2020-10-15T06:38:00.000+00:00"
}
},
"mfaRecoveryCodes": {
"description": "MFA Recovery Codes",
@ -9925,7 +10261,13 @@
},
"required": [
"recoveryCodes"
]
],
"example": {
"recoveryCodes": [
"a3kf0-s0cl2",
"s0co1-as98s"
]
}
},
"mfaType": {
"description": "MFAType",
@ -9945,7 +10287,11 @@
"required": [
"secret",
"uri"
]
],
"example": {
"secret": true,
"uri": true
}
},
"mfaFactors": {
"description": "MFAFactors",
@ -9977,7 +10323,13 @@
"phone",
"email",
"recoveryCode"
]
],
"example": {
"totp": true,
"phone": true,
"email": true,
"recoveryCode": true
}
},
"subscriber": {
"description": "Subscriber",
@ -10052,7 +10404,27 @@
"userName",
"topicId",
"providerType"
]
],
"example": {
"$id": "259125845563242502",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"targetId": "259125845563242502",
"target": {
"$id": "259125845563242502",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"providerType": "email",
"providerId": "259125845563242502",
"name": "ageon-app-email",
"identifier": "random-mail@email.org",
"userId": "5e5ea5c16897e"
},
"userId": "5e5ea5c16897e",
"userName": "Aegon Targaryen",
"topicId": "259125845563242502",
"providerType": "email"
}
},
"target": {
"description": "Target",
@ -10114,7 +10486,18 @@
"providerType",
"identifier",
"expired"
]
],
"example": {
"$id": "259125845563242502",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"name": "Apple iPhone 12",
"userId": "259125845563242502",
"providerId": "259125845563242502",
"providerType": "email",
"identifier": "token",
"expired": false
}
}
},
"externalDocs": {

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -4626,30 +4626,6 @@
}
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
},
{
"name": "createDocuments",
"auth": {
"Admin": [],
"Key": []
},
"parameters": [
"databaseId",
"collectionId",
"documents"
],
"required": [
"databaseId",
"collectionId",
"documents"
],
"responses": [
{
"code": 201,
"model": "#\/definitions\/documentList"
}
],
"description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
}
],
"auth": {
@ -5485,7 +5461,7 @@
"type": "string",
"description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.",
"default": null,
"x-example": null
"x-example": "<SCHEDULED_AT>"
}
}
}
@ -8118,7 +8094,8 @@
"any": {
"description": "Any",
"type": "object",
"additionalProperties": true
"additionalProperties": true,
"example": []
},
"documentList": {
"description": "Documents List",
@ -8143,7 +8120,11 @@
"required": [
"total",
"documents"
]
],
"example": {
"total": 5,
"documents": ""
}
},
"sessionList": {
"description": "Sessions List",
@ -8168,7 +8149,11 @@
"required": [
"total",
"sessions"
]
],
"example": {
"total": 5,
"sessions": ""
}
},
"identityList": {
"description": "Identities List",
@ -8193,7 +8178,11 @@
"required": [
"total",
"identities"
]
],
"example": {
"total": 5,
"identities": ""
}
},
"logList": {
"description": "Logs List",
@ -8218,7 +8207,11 @@
"required": [
"total",
"logs"
]
],
"example": {
"total": 5,
"logs": ""
}
},
"fileList": {
"description": "Files List",
@ -8243,7 +8236,11 @@
"required": [
"total",
"files"
]
],
"example": {
"total": 5,
"files": ""
}
},
"teamList": {
"description": "Teams List",
@ -8268,7 +8265,11 @@
"required": [
"total",
"teams"
]
],
"example": {
"total": 5,
"teams": ""
}
},
"membershipList": {
"description": "Memberships List",
@ -8293,7 +8294,11 @@
"required": [
"total",
"memberships"
]
],
"example": {
"total": 5,
"memberships": ""
}
},
"executionList": {
"description": "Executions List",
@ -8318,7 +8323,11 @@
"required": [
"total",
"executions"
]
],
"example": {
"total": 5,
"executions": ""
}
},
"countryList": {
"description": "Countries List",
@ -8343,7 +8352,11 @@
"required": [
"total",
"countries"
]
],
"example": {
"total": 5,
"countries": ""
}
},
"continentList": {
"description": "Continents List",
@ -8368,7 +8381,11 @@
"required": [
"total",
"continents"
]
],
"example": {
"total": 5,
"continents": ""
}
},
"languageList": {
"description": "Languages List",
@ -8393,7 +8410,11 @@
"required": [
"total",
"languages"
]
],
"example": {
"total": 5,
"languages": ""
}
},
"currencyList": {
"description": "Currencies List",
@ -8418,7 +8439,11 @@
"required": [
"total",
"currencies"
]
],
"example": {
"total": 5,
"currencies": ""
}
},
"phoneList": {
"description": "Phones List",
@ -8443,7 +8468,11 @@
"required": [
"total",
"phones"
]
],
"example": {
"total": 5,
"phones": ""
}
},
"localeCodeList": {
"description": "Locale codes list",
@ -8468,7 +8497,11 @@
"required": [
"total",
"localeCodes"
]
],
"example": {
"total": 5,
"localeCodes": ""
}
},
"document": {
"description": "Document",
@ -8525,7 +8558,23 @@
"$createdAt",
"$updatedAt",
"$permissions"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$sequence": 1,
"$collectionId": "5e5ea5c15117e",
"$databaseId": "5e5ea5c15117e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"$permissions": [
"read(\"any\")"
],
"username": "john.doe",
"email": "john.doe@example.com",
"fullName": "John Doe",
"age": 30,
"isAdmin": false
}
},
"log": {
"description": "Log",
@ -8659,7 +8708,30 @@
"deviceModel",
"countryCode",
"countryName"
]
],
"example": {
"event": "account.sessions.create",
"userId": "610fc2f985ee0",
"userEmail": "john@appwrite.io",
"userName": "John Doe",
"mode": "admin",
"ip": "127.0.0.1",
"time": "2020-10-15T06:38:00.000+00:00",
"osCode": "Mac",
"osName": "Mac",
"osVersion": "Mac",
"clientType": "browser",
"clientCode": "CM",
"clientName": "Chrome Mobile iOS",
"clientVersion": "84.0",
"clientEngine": "WebKit",
"clientEngineVersion": "605.1.15",
"deviceName": "smartphone",
"deviceBrand": "Google",
"deviceModel": "Nexus 5",
"countryCode": "US",
"countryName": "United States"
}
},
"user": {
"description": "User",
@ -8822,7 +8894,33 @@
"prefs",
"targets",
"accessedAt"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"name": "John Doe",
"password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L\/4LdgrVRXxE",
"hash": "argon2",
"hashOptions": {},
"registration": "2020-10-15T06:38:00.000+00:00",
"status": true,
"labels": [
"vip"
],
"passwordUpdate": "2020-10-15T06:38:00.000+00:00",
"email": "john@appwrite.io",
"phone": "+4930901820",
"emailVerification": true,
"phoneVerification": true,
"mfa": true,
"prefs": {
"theme": "pink",
"timezone": "UTC"
},
"targets": [],
"accessedAt": "2020-10-15T06:38:00.000+00:00"
}
},
"algoMd5": {
"description": "AlgoMD5",
@ -8836,7 +8934,10 @@
},
"required": [
"type"
]
],
"example": {
"type": "md5"
}
},
"algoSha": {
"description": "AlgoSHA",
@ -8850,7 +8951,10 @@
},
"required": [
"type"
]
],
"example": {
"type": "sha"
}
},
"algoPhpass": {
"description": "AlgoPHPass",
@ -8864,7 +8968,10 @@
},
"required": [
"type"
]
],
"example": {
"type": "phpass"
}
},
"algoBcrypt": {
"description": "AlgoBcrypt",
@ -8878,7 +8985,10 @@
},
"required": [
"type"
]
],
"example": {
"type": "bcrypt"
}
},
"algoScrypt": {
"description": "AlgoScrypt",
@ -8920,7 +9030,14 @@
"costMemory",
"costParallel",
"length"
]
],
"example": {
"type": "scrypt",
"costCpu": 8,
"costMemory": 14,
"costParallel": 1,
"length": 64
}
},
"algoScryptModified": {
"description": "AlgoScryptModified",
@ -8952,7 +9069,13 @@
"salt",
"saltSeparator",
"signerKey"
]
],
"example": {
"type": "scryptMod",
"salt": "UxLMreBr6tYyjQ==",
"saltSeparator": "Bw==",
"signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ=="
}
},
"algoArgon2": {
"description": "AlgoArgon2",
@ -8987,12 +9110,23 @@
"memoryCost",
"timeCost",
"threads"
]
],
"example": {
"type": "argon2",
"memoryCost": 65536,
"timeCost": 4,
"threads": 3
}
},
"preferences": {
"description": "Preferences",
"type": "object",
"additionalProperties": true
"additionalProperties": true,
"example": {
"language": "en",
"timezone": "UTC",
"darkTheme": true
}
},
"session": {
"description": "Session",
@ -9179,7 +9313,40 @@
"factors",
"secret",
"mfaUpdatedAt"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5bb8c16897e",
"expire": "2020-10-15T06:38:00.000+00:00",
"provider": "email",
"providerUid": "user@example.com",
"providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3",
"providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00",
"providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3",
"ip": "127.0.0.1",
"osCode": "Mac",
"osName": "Mac",
"osVersion": "Mac",
"clientType": "browser",
"clientCode": "CM",
"clientName": "Chrome Mobile iOS",
"clientVersion": "84.0",
"clientEngine": "WebKit",
"clientEngineVersion": "605.1.15",
"deviceName": "smartphone",
"deviceBrand": "Google",
"deviceModel": "Nexus 5",
"countryCode": "US",
"countryName": "United States",
"current": true,
"factors": [
"email"
],
"secret": "5e5bb8c16897e",
"mfaUpdatedAt": "2020-10-15T06:38:00.000+00:00"
}
},
"identity": {
"description": "Identity",
@ -9247,7 +9414,19 @@
"providerAccessToken",
"providerAccessTokenExpiry",
"providerRefreshToken"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5bb8c16897e",
"provider": "email",
"providerUid": "5e5bb8c16897e",
"providerEmail": "user@example.com",
"providerAccessToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3",
"providerAccessTokenExpiry": "2020-10-15T06:38:00.000+00:00",
"providerRefreshToken": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"
}
},
"token": {
"description": "Token",
@ -9291,7 +9470,15 @@
"secret",
"expire",
"phrase"
]
],
"example": {
"$id": "bb8ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5ea5c168bb8",
"secret": "",
"expire": "2020-10-15T06:38:00.000+00:00",
"phrase": "Golden Fox"
}
},
"jwt": {
"description": "JWT",
@ -9305,7 +9492,10 @@
},
"required": [
"jwt"
]
],
"example": {
"jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
},
"locale": {
"description": "Locale",
@ -9355,7 +9545,16 @@
"continent",
"eu",
"currency"
]
],
"example": {
"ip": "127.0.0.1",
"countryCode": "US",
"country": "United States",
"continentCode": "NA",
"continent": "North America",
"eu": false,
"currency": "USD"
}
},
"localeCode": {
"description": "LocaleCode",
@ -9375,7 +9574,11 @@
"required": [
"code",
"name"
]
],
"example": {
"code": "en-us",
"name": "US"
}
},
"file": {
"description": "File",
@ -9457,7 +9660,22 @@
"sizeOriginal",
"chunksTotal",
"chunksUploaded"
]
],
"example": {
"$id": "5e5ea5c16897e",
"bucketId": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"$permissions": [
"read(\"any\")"
],
"name": "Pink.png",
"signature": "5d529fd02b544198ae075bd57c1762bb",
"mimeType": "image\/png",
"sizeOriginal": 17890,
"chunksTotal": 17890,
"chunksUploaded": 17890
}
},
"team": {
"description": "Team",
@ -9509,7 +9727,18 @@
"name",
"total",
"prefs"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"name": "VIP",
"total": 7,
"prefs": {
"theme": "pink",
"timezone": "UTC"
}
}
},
"membership": {
"description": "Membership",
@ -9600,7 +9829,24 @@
"confirm",
"mfa",
"roles"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5ea5c16897e",
"userName": "John Doe",
"userEmail": "john@appwrite.io",
"teamId": "5e5ea5c16897e",
"teamName": "VIP",
"invited": "2020-10-15T06:38:00.000+00:00",
"joined": "2020-10-15T06:38:00.000+00:00",
"confirm": false,
"mfa": false,
"roles": [
"owner"
]
}
},
"execution": {
"description": "Execution",
@ -9733,7 +9979,36 @@
"logs",
"errors",
"duration"
]
],
"example": {
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"$permissions": [
"any"
],
"functionId": "5e5ea6g16897e",
"trigger": "http",
"status": "processing",
"requestMethod": "GET",
"requestPath": "\/articles?id=5",
"requestHeaders": [
{
"Content-Type": "application\/json"
}
],
"responseStatusCode": 200,
"responseBody": "",
"responseHeaders": [
{
"Content-Type": "application\/json"
}
],
"logs": "",
"errors": "",
"duration": 0.4,
"scheduledAt": "2020-10-15T06:38:00.000+00:00"
}
},
"country": {
"description": "Country",
@ -9753,7 +10028,11 @@
"required": [
"name",
"code"
]
],
"example": {
"name": "United States",
"code": "US"
}
},
"continent": {
"description": "Continent",
@ -9773,7 +10052,11 @@
"required": [
"name",
"code"
]
],
"example": {
"name": "Europe",
"code": "EU"
}
},
"language": {
"description": "Language",
@ -9799,7 +10082,12 @@
"name",
"code",
"nativeName"
]
],
"example": {
"name": "Italian",
"code": "it",
"nativeName": "Italiano"
}
},
"currency": {
"description": "Currency",
@ -9851,7 +10139,16 @@
"rounding",
"code",
"namePlural"
]
],
"example": {
"symbol": "$",
"name": "US dollar",
"symbolNative": "$",
"decimalDigits": 2,
"rounding": 0,
"code": "USD",
"namePlural": "US dollars"
}
},
"phone": {
"description": "Phone",
@ -9877,7 +10174,12 @@
"code",
"countryCode",
"countryName"
]
],
"example": {
"code": "+1",
"countryCode": "US",
"countryName": "United States"
}
},
"headers": {
"description": "Headers",
@ -9897,7 +10199,11 @@
"required": [
"name",
"value"
]
],
"example": {
"name": "Content-Type",
"value": "application\/json"
}
},
"mfaChallenge": {
"description": "MFA Challenge",
@ -9929,7 +10235,13 @@
"$createdAt",
"userId",
"expire"
]
],
"example": {
"$id": "bb8ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"userId": "5e5ea5c168bb8",
"expire": "2020-10-15T06:38:00.000+00:00"
}
},
"mfaRecoveryCodes": {
"description": "MFA Recovery Codes",
@ -9949,7 +10261,13 @@
},
"required": [
"recoveryCodes"
]
],
"example": {
"recoveryCodes": [
"a3kf0-s0cl2",
"s0co1-as98s"
]
}
},
"mfaType": {
"description": "MFAType",
@ -9969,7 +10287,11 @@
"required": [
"secret",
"uri"
]
],
"example": {
"secret": true,
"uri": true
}
},
"mfaFactors": {
"description": "MFAFactors",
@ -10001,7 +10323,13 @@
"phone",
"email",
"recoveryCode"
]
],
"example": {
"totp": true,
"phone": true,
"email": true,
"recoveryCode": true
}
},
"subscriber": {
"description": "Subscriber",
@ -10076,7 +10404,27 @@
"userName",
"topicId",
"providerType"
]
],
"example": {
"$id": "259125845563242502",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"targetId": "259125845563242502",
"target": {
"$id": "259125845563242502",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"providerType": "email",
"providerId": "259125845563242502",
"name": "ageon-app-email",
"identifier": "random-mail@email.org",
"userId": "5e5ea5c16897e"
},
"userId": "5e5ea5c16897e",
"userName": "Aegon Targaryen",
"topicId": "259125845563242502",
"providerType": "email"
}
},
"target": {
"description": "Target",
@ -10138,7 +10486,18 @@
"providerType",
"identifier",
"expired"
]
],
"example": {
"$id": "259125845563242502",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"name": "Apple iPhone 12",
"userId": "259125845563242502",
"providerId": "259125845563242502",
"providerType": "email",
"identifier": "token",
"expired": false
}
}
},
"externalDocs": {

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -10,6 +10,7 @@ use Appwrite\URL\URL as URLParse;
use Appwrite\Utopia\Response;
use chillerlan\QRCode\QRCode;
use chillerlan\QRCode\QROptions;
use enshrined\svgSanitize\Sanitizer as SvgSanitizer;
use Utopia\App;
use Utopia\Config\Config;
use Utopia\Database\Database;
@ -362,7 +363,8 @@ App::get('/v1/avatars/favicon')
$client = new Client();
try {
$res = $client
->setAllowRedirects(false)
->setAllowRedirects(true)
->setMaxRedirects(5)
->setUserAgent(\sprintf(
APP_USERAGENT,
System::getEnv('_APP_VERSION', 'UNKNOWN'),
@ -373,15 +375,11 @@ App::get('/v1/avatars/favicon')
throw new Exception(Exception::AVATAR_REMOTE_URL_FAILED);
}
if ($res->getStatusCode() !== 200) {
throw new Exception(Exception::AVATAR_REMOTE_URL_FAILED);
}
$doc = new DOMDocument();
$doc->strictErrorChecking = false;
@$doc->loadHTML($res->getBody());
$links = $doc->getElementsByTagName('link');
$links = $doc->getElementsByTagName('link') ?? [];
$outputHref = '';
$outputExt = '';
$space = 0;
@ -399,6 +397,12 @@ App::get('/v1/avatars/favicon')
$ext = \pathinfo(\parse_url($absolute, PHP_URL_PATH), PATHINFO_EXTENSION);
switch ($ext) {
case 'svg':
// SVG icons are prioritized by assigning the maximum possible value.
$space = PHP_INT_MAX;
$outputHref = $absolute;
$outputExt = $ext;
break;
case 'ico':
case 'png':
case 'jpg':
@ -437,7 +441,8 @@ App::get('/v1/avatars/favicon')
$client = new Client();
try {
$res = $client
->setAllowRedirects(false)
->setAllowRedirects(true)
->setMaxRedirects(5)
->fetch($outputHref);
} catch (\Throwable) {
throw new Exception(Exception::AVATAR_REMOTE_URL_FAILED);
@ -449,14 +454,33 @@ App::get('/v1/avatars/favicon')
$data = $res->getBody();
if ('ico' == $outputExt) { // Skip crop, Imagick isn\'t supporting icon files
if (empty($data) || (\mb_substr($data, 0, 5) === '<html') || \mb_substr($data, 0, 5) === '<!doc') {
if ('ico' === $outputExt) { // Skip crop, Imagick isn\'t supporting icon files
if (
empty($data) ||
stripos($data, '<html') === 0 ||
stripos($data, '<!doc') === 0
) {
throw new Exception(Exception::AVATAR_ICON_NOT_FOUND, 'Favicon not found');
}
$response
->addHeader('Cache-Control', 'private, max-age=2592000') // 30 days
->setContentType('image/x-icon')
->file($data);
return;
}
if ('svg' === $outputExt) { // Skip crop, Imagick isn\'t supporting svg files
$sanitizer = new SvgSanitizer();
$sanitizer->minify(true);
$cleanSvg = $sanitizer->sanitize($data);
if ($cleanSvg === false) {
throw new \Exception('SVG sanitization failed');
}
$response
->addHeader('Cache-Control', 'private, max-age=2592000') // 30 days
->setContentType('image/svg+xml')
->file($cleanSvg);
return;
}
$image = new Image($data);

View file

@ -1380,9 +1380,10 @@ App::get('/robots.txt')
->inject('apiKey')
->action(function (App $utopia, SwooleRequest $swooleRequest, Request $request, Response $response, Log $log, Database $dbForPlatform, callable $getProjectDB, Event $queueForEvents, StatsUsage $queueForStatsUsage, Func $queueForFunctions, Executor $executor, Reader $geodb, callable $isResourceBlocked, string $previewHostname, ?Key $apiKey) {
$host = $request->getHostname() ?? '';
$consoleDomain = System::getEnv('_APP_CONSOLE_DOMAIN', '');
$mainDomain = System::getEnv('_APP_DOMAIN', '');
if (($host === $mainDomain || $host === 'localhost') && empty($previewHostname)) {
if (($host === $consoleDomain || $host === $mainDomain || $host === 'localhost') && empty($previewHostname)) {
$template = new View(__DIR__ . '/../views/general/robots.phtml');
$response->text($template->render(false));
} else {
@ -1413,9 +1414,10 @@ App::get('/humans.txt')
->inject('apiKey')
->action(function (App $utopia, SwooleRequest $swooleRequest, Request $request, Response $response, Log $log, Database $dbForPlatform, callable $getProjectDB, Event $queueForEvents, StatsUsage $queueForStatsUsage, Func $queueForFunctions, Executor $executor, Reader $geodb, callable $isResourceBlocked, string $previewHostname, ?Key $apiKey) {
$host = $request->getHostname() ?? '';
$consoleDomain = System::getEnv('_APP_CONSOLE_DOMAIN', '');
$mainDomain = System::getEnv('_APP_DOMAIN', '');
if (($host === $mainDomain || $host === 'localhost') && empty($previewHostname)) {
if (($host === $consoleDomain || $host === $mainDomain || $host === 'localhost') && empty($previewHostname)) {
$template = new View(__DIR__ . '/../views/general/humans.phtml');
$response->text($template->render(false));
} else {

View file

@ -31,6 +31,7 @@ use Utopia\Database\Helpers\Role;
use Utopia\Database\Validator\Authorization;
use Utopia\Queue\Publisher;
use Utopia\System\System;
use Utopia\Telemetry\Adapter as Telemetry;
use Utopia\Validator\WhiteList;
$parseLabel = function (string $label, array $responsePayload, array $requestParams, Document $user) {
@ -421,7 +422,8 @@ App::init()
->inject('apiKey')
->inject('plan')
->inject('devKey')
->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Publisher $publisher, Event $queueForEvents, Messaging $queueForMessaging, Audit $queueForAudits, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, StatsUsage $queueForStatsUsage, Database $dbForProject, callable $timelimit, Document $resourceToken, string $mode, ?Key $apiKey, array $plan, Document $devKey) use ($usageDatabaseListener, $eventDatabaseListener) {
->inject('telemetry')
->action(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Publisher $publisher, Event $queueForEvents, Messaging $queueForMessaging, Audit $queueForAudits, Delete $queueForDeletes, EventDatabase $queueForDatabase, Build $queueForBuilds, StatsUsage $queueForStatsUsage, Database $dbForProject, callable $timelimit, Document $resourceToken, string $mode, ?Key $apiKey, array $plan, Document $devKey, Telemetry $telemetry) use ($usageDatabaseListener, $eventDatabaseListener) {
$route = $utopia->getRoute();
@ -554,6 +556,7 @@ App::init()
));
$useCache = $route->getLabel('cache', false);
$storageCacheOperationsCounter = $telemetry->createCounter('storage.cache.operations.load');
if ($useCache) {
$route = $utopia->match($request);
$isImageTransformation = $route->getPath() === '/v1/storage/buckets/:bucketId/files/:fileId/preview';
@ -619,10 +622,12 @@ App::init()
->addHeader('Cache-Control', sprintf('private, max-age=%d', $timestamp))
->addHeader('X-Appwrite-Cache', 'hit')
->setContentType($cacheLog->getAttribute('mimeType'));
$storageCacheOperationsCounter->add(1, ['result' => 'hit']);
if (!$isImageTransformation || !$isDisabled) {
$response->send($data);
}
} else {
$storageCacheOperationsCounter->add(1, ['result' => 'miss']);
$response
->addHeader('Cache-Control', 'no-cache, no-store, must-revalidate')
->addHeader('Pragma', 'no-cache')

View file

@ -82,7 +82,8 @@
"adhocore/jwt": "1.1.*",
"spomky-labs/otphp": "^10.0",
"webonyx/graphql-php": "14.11.*",
"league/csv": "9.14.*"
"league/csv": "9.14.*",
"enshrined/svg-sanitize": "0.21.*"
},
"require-dev": {
"ext-fileinfo": "*",

95
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "edbe5912c45e1f467f398541a75a77de",
"content-hash": "7b2ef6192403daf5c492219822ce0aa1",
"packages": [
{
"name": "adhocore/jwt",
@ -69,16 +69,16 @@
},
{
"name": "appwrite/appwrite",
"version": "15.0.0",
"version": "15.1.0",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-for-php.git",
"reference": "deb97b62e0abed8a4fd5c5d48e77365cf89867cf"
"reference": "c438b3885071ac7c0329199dce5e6f6a24dd215b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/deb97b62e0abed8a4fd5c5d48e77365cf89867cf",
"reference": "deb97b62e0abed8a4fd5c5d48e77365cf89867cf",
"url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/c438b3885071ac7c0329199dce5e6f6a24dd215b",
"reference": "c438b3885071ac7c0329199dce5e6f6a24dd215b",
"shasum": ""
},
"require": {
@ -104,10 +104,10 @@
"support": {
"email": "team@appwrite.io",
"issues": "https://github.com/appwrite/sdk-for-php/issues",
"source": "https://github.com/appwrite/sdk-for-php/tree/15.0.0",
"source": "https://github.com/appwrite/sdk-for-php/tree/15.1.0",
"url": "https://appwrite.io/support"
},
"time": "2025-05-18T09:47:10+00:00"
"time": "2025-08-01T04:50:51+00:00"
},
{
"name": "appwrite/php-clamav",
@ -628,6 +628,51 @@
],
"time": "2023-08-10T19:36:49+00:00"
},
{
"name": "enshrined/svg-sanitize",
"version": "0.21.0",
"source": {
"type": "git",
"url": "https://github.com/darylldoyle/svg-sanitizer.git",
"reference": "5e477468fac5c5ce933dce53af3e8e4e58dcccc9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/darylldoyle/svg-sanitizer/zipball/5e477468fac5c5ce933dce53af3e8e4e58dcccc9",
"reference": "5e477468fac5c5ce933dce53af3e8e4e58dcccc9",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"php": "^7.1 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^6.5 || ^8.5"
},
"type": "library",
"autoload": {
"psr-4": {
"enshrined\\svgSanitize\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0-or-later"
],
"authors": [
{
"name": "Daryll Doyle",
"email": "daryll@enshrined.co.uk"
}
],
"description": "An SVG sanitizer for PHP",
"support": {
"issues": "https://github.com/darylldoyle/svg-sanitizer/issues",
"source": "https://github.com/darylldoyle/svg-sanitizer/tree/0.21.0"
},
"time": "2025-01-13T09:32:25+00:00"
},
{
"name": "giggsey/libphonenumber-for-php-lite",
"version": "8.13.36",
@ -3497,16 +3542,16 @@
},
{
"name": "utopia-php/database",
"version": "0.71.10",
"version": "0.71.11",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/database.git",
"reference": "83278d663f9c63c25a11d9e71c7922da7ec48636"
"reference": "644ed827aace63cbdf8c6c64a3998c11b43e3383"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/database/zipball/83278d663f9c63c25a11d9e71c7922da7ec48636",
"reference": "83278d663f9c63c25a11d9e71c7922da7ec48636",
"url": "https://api.github.com/repos/utopia-php/database/zipball/644ed827aace63cbdf8c6c64a3998c11b43e3383",
"reference": "644ed827aace63cbdf8c6c64a3998c11b43e3383",
"shasum": ""
},
"require": {
@ -3547,9 +3592,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/database/issues",
"source": "https://github.com/utopia-php/database/tree/0.71.10"
"source": "https://github.com/utopia-php/database/tree/0.71.11"
},
"time": "2025-07-18T00:05:55+00:00"
"time": "2025-08-05T08:35:29+00:00"
},
{
"name": "utopia-php/detector",
@ -4814,16 +4859,16 @@
"packages-dev": [
{
"name": "appwrite/sdk-generator",
"version": "0.41.27",
"version": "0.41.28",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
"reference": "083fd2e8163d6a4e59ee971ac6cb97277d831dd5"
"reference": "8eace11070264c62c8da3c69498fb8dc98fcfaf7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/083fd2e8163d6a4e59ee971ac6cb97277d831dd5",
"reference": "083fd2e8163d6a4e59ee971ac6cb97277d831dd5",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/8eace11070264c62c8da3c69498fb8dc98fcfaf7",
"reference": "8eace11070264c62c8da3c69498fb8dc98fcfaf7",
"shasum": ""
},
"require": {
@ -4859,9 +4904,9 @@
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
"support": {
"issues": "https://github.com/appwrite/sdk-generator/issues",
"source": "https://github.com/appwrite/sdk-generator/tree/0.41.27"
"source": "https://github.com/appwrite/sdk-generator/tree/0.41.28"
},
"time": "2025-07-31T10:20:46+00:00"
"time": "2025-08-01T11:06:30+00:00"
},
{
"name": "doctrine/annotations",
@ -5280,16 +5325,16 @@
},
{
"name": "myclabs/deep-copy",
"version": "1.13.3",
"version": "1.13.4",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "faed855a7b5f4d4637717c2b3863e277116beb36"
"reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/faed855a7b5f4d4637717c2b3863e277116beb36",
"reference": "faed855a7b5f4d4637717c2b3863e277116beb36",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a",
"reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a",
"shasum": ""
},
"require": {
@ -5328,7 +5373,7 @@
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
"source": "https://github.com/myclabs/DeepCopy/tree/1.13.3"
"source": "https://github.com/myclabs/DeepCopy/tree/1.13.4"
},
"funding": [
{
@ -5336,7 +5381,7 @@
"type": "tidelift"
}
],
"time": "2025-07-05T12:25:42+00:00"
"time": "2025-08-01T08:46:24+00:00"
},
{
"name": "nikic/php-parser",

View file

@ -603,6 +603,7 @@ class OpenAPI3 extends Format
$required = $model->getRequired();
$rules = $model->getRules();
$examples = [];
$output['components']['schemas'][$model->getType()] = [
'description' => $model->getName(),
@ -626,6 +627,8 @@ class OpenAPI3 extends Format
$format = null;
$items = null;
$examples[$name] = $rule['example'] ?? null;
switch ($rule['type']) {
case 'string':
case 'datetime':
@ -714,6 +717,12 @@ class OpenAPI3 extends Format
$output['components']['schemas'][$model->getType()]['properties'][$name]['nullable'] = true;
}
}
if ($model->isAny() && !empty($model->getSampleData())) {
$examples = array_merge($examples, $model->getSampleData());
}
$output['components']['schemas'][$model->getType()]['example'] = $examples;
}
\ksort($output['paths']);

View file

@ -610,6 +610,7 @@ class Swagger2 extends Format
$required = $model->getRequired();
$rules = $model->getRules();
$examples = [];
$output['definitions'][$model->getType()] = [
'description' => $model->getName(),
@ -633,6 +634,8 @@ class Swagger2 extends Format
$format = null;
$items = null;
$examples[$name] = $rule['example'] ?? null;
switch ($rule['type']) {
case 'string':
case 'datetime':
@ -730,6 +733,12 @@ class Swagger2 extends Format
$output['definitions'][$model->getType()]['properties'][$name]['x-nullable'] = true;
}
}
if ($model->isAny() && !empty($model->getSampleData())) {
$examples = array_merge($examples, $model->getSampleData());
}
$output['definitions'][$model->getType()]['example'] = $examples;
}
\ksort($output['paths']);

View file

@ -31,4 +31,14 @@ class Any extends Model
{
return Response::MODEL_ANY;
}
/**
* Get sample data
*
* @return array
*/
public function getSampleData(): array
{
return [];
}
}

View file

@ -95,4 +95,15 @@ class Document extends Any
return $document;
}
public function getSampleData(): array
{
return [
'username' => 'john.doe',
'email' => 'john.doe@example.com',
'fullName' => 'John Doe',
'age' => 30,
'isAdmin' => false,
];
}
}

View file

@ -25,4 +25,13 @@ class Preferences extends Any
{
return Response::MODEL_PREFERENCES;
}
public function getSampleData(): array
{
return [
'language' => 'en',
'timezone' => 'UTC',
'darkTheme' => true,
];
}
}

View file

@ -284,7 +284,17 @@ trait AvatarsBase
]);
$this->assertEquals(200, $response['headers']['status-code']);
$this->assertEquals('image/x-icon', $response['headers']['content-type']);
$this->assertEquals('image/svg+xml', $response['headers']['content-type']);
$this->assertNotEmpty($response['body']);
$response = $this->client->call(Client::METHOD_GET, '/avatars/favicon', [
'x-appwrite-project' => $this->getProject()['$id'],
], [
'url' => 'https://appwrite.io/',
]);
$this->assertEquals(200, $response['headers']['status-code']);
$this->assertEquals('image/svg+xml', $response['headers']['content-type']);
$this->assertNotEmpty($response['body']);
/**

View file

@ -5664,7 +5664,27 @@ trait DatabasesBase
]), ['min' => 7]);
$this->assertEquals(400, $err['headers']['status-code']);
// Test type error on non-numeric attribut
// Test min limit exceeded with custom value
$err = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId . '/count/decrement', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
]), [
'value' => 3,
'min' => 5,
]);
$this->assertEquals(400, $err['headers']['status-code']);
// Test min limit 0
$err = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId . '/count/decrement', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
]), [
'value' => 10,
'min' => 0,
]);
$this->assertEquals(400, $err['headers']['status-code']);
// Test type error on non-numeric attribute
$typeErr = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId . '/count/decrement', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],