Merge pull request #10249 from appwrite/feat-definition-examples

This commit is contained in:
Christy Jacob 2025-08-04 09:04:33 +04:00 committed by GitHub
commit 19fe5881a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 12137 additions and 1273 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

36
composer.lock generated
View file

@ -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",
@ -4814,16 +4814,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 +4859,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 +5280,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 +5328,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 +5336,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,
];
}
}