Authentication is complete. If this does not happen automatically, please\\nclose the window.\\n\", \"The redirection URL passed to the authentication service must be the same as the URL on which the application is running (schema, host, port if necessary), and the path must point to created HTML file, /auth.html in this case. The callbackUrlScheme parameter of the authenticate() method does not take into account, so it is possible to use a schema for native platforms in the code.\", \" Flutter Web Cross-Domain Communication & Cookies While running Flutter Web, make sure your Appwrite server and your Flutter client use the same top-level domain and protocol (HTTP or HTTPS) to communicate. When communicating between different domains or protocols, you may receive HTTP status error 401 because some modern browsers block cross-site or insecure cookies for enhanced privacy. In production, Appwrite allows you set multiple custom-domains for each project.\"]}, {\"level\": 3, \"title\": \"Windows\", \"body\": [\"For Windows add your app name and package name, Your package name is generally the name in your pubspec.yaml file. If you cannot find the correct package name, run the application in windows, and make any request with proper exception handling, you should get the application id needed to add in the received error message.\"]}, {\"level\": 2, \"title\": \"Get Appwrite Flutter SDK\", \"body\": [\"Add Appwrite SDK to your package's pubspec.yaml file (view example):\", \" dependencies:\\n appwrite: ^9.0.0\", \"You can also install the SDK using the Dart package manager from your terminal:\", \" flutter pub add appwrite\"]}, {\"level\": 2, \"title\": \"Init your SDK\", \"body\": [\"Initialize your SDK with your endpoint and project ID, which can be found on your project settings page. It's usually a good practice to initialize the Client and make it available across the app using the state management solution of your choice, as the Client is required for making any calls to the Appwrite API.\", \" import 'package:appwrite/appwrite.dart';\\n\\nClient client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your Appwrite Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\", \"Before sending any API calls to your new Appwrite project, make sure your mobile device or emulator has network access to your Appwrite project's hostname or IP address.\"]}, {\"level\": 2, \"title\": \"Make Your First Request\", \"body\": [\"After your SDK configuration is set, access any of the Appwrite services and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the API References section.\", \" // Register User\\nAccount account = Account(client);\\n\\nfinal user = await account.create(\\n userId: ID.unique(),\\n email: 'me@appwrite.io',\\n password: 'password',\\n name: 'My Name'\\n);\\n\"]}, {\"level\": 2, \"title\": \"Listen to Changes\", \"body\": [\"If you want to listen to changes in realtime from Appwrite, you can subscribe to a variety of channels and receive updates within milliseconds. Full documentation for Realtime can be found here.\", \" // Subscribe to files channel\\nfinal realtime = Realtime(client);\\nfinal subscription = realtime.subscribe(['files']);\\n\\nsubscription.stream.listen((response) {\\n if (response.events.contains('buckets.*.files.*.create') {\\n // Log when a new file is uploaded\\n print(response.payload);\\n }\\n});\\n\"]}, {\"level\": 2, \"title\": \"Full Example\", \"body\": [\" import 'package:appwrite/appwrite.dart';\\n\\nClient client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your Appwrite Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nAccount account = Account(client);\\n\\nfinal user = await account.create(\\n userId: ID.unique(),\\n email: 'me@appwrite.io',\\n password: 'password',\\n name: 'My Name'\\n);\\n\\n// Subscribe to files channel\\nfinal realtime = Realtime(client);\\nfinal subscription = realtime.subscribe(['files']);\\n\\nsubscription.stream.listen((response) {\\n if (response.events.contains('buckets.*.files.*.create')) {\\n // Log when a new file is uploaded\\n print(response.payload);\\n }\\n});\\n\"]}]", "metadata": {"source": "https://appwrite.io/docs/getting-started-for-flutter"}}
\ No newline at end of file
diff --git a/docs/ee438ef6-1f0c-11ee-98fa-00155da08df7.json b/docs/ee438ef6-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..5c8157b
--- /dev/null
+++ b/docs/ee438ef6-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Getting Started for Apple \", \"body\": [\"Appwrite is a development platform that provides a powerful API and management console to get your next project up and running quickly.\", \"Create your first project now and start building on Appwrite Cloud.\"]}, {\"level\": 2, \"title\": \"Add your Apple Platform\", \"body\": [\"To init your SDK and start interacting with Appwrite services, you need to add a new Apple platform to your project. To add a new platform, go to your Appwrite console, choose the project you created in the step before, and click the 'Add Platform' button. Only API requests initiated from platforms added to your Appwrite project will be accepted. This prevents unauthorized apps from accessing your Appwrite project.\", \"From the options, choose to add a new Apple platform, select the iOS, macOS, watchOS or tvOS tab and add your app name and bundle identifier, Your bundle identifier can be found at the top of the General tab in your project settings, or in your Info.plist file. By registering your new app platform, you are allowing your app to communicate with the Appwrite API.\"]}, {\"level\": 2, \"title\": \"Get Appwrite Apple SDK\", \"body\": []}, {\"level\": 3, \"title\": \"Using Xcode\", \"body\": [\" Select File > Add Packages Search for the Appwrite SDK with the URL https://github.com/appwrite/sdk-for-apple In the right panel, select your target project and add your desired version rules Select Add Package and wait for package resolution to complete Make sure the Appwrite package product is checked and select Add Package again\"]}, {\"level\": 3, \"title\": \"Using Swift Packages\", \"body\": [\"Add the following to your Package.swift file: \", \" dependencies: [\\n .package(\\n name: \\\"Appwrite\\\",\\n url: \\\"https://github.com/appwrite/sdk-for-swift\\\",\\n .exact(\\\"2.0.0\\\")\\n )\\n]')\", \"Then add the dependency to your target:\", \" targets: [\\n .target(\\n name: \\\"[YOUR_TARGET]\\\",\\n dependencies: [\\n \\\"Appwrite\\\"\\n ]\\n )\\n]\"]}, {\"level\": 3, \"title\": \"OAuth Callback\", \"body\": [\"In order to capture the Appwrite OAuth callback url, the following URL scheme needs to added to your `Info.plist`\", \" \"]}, {\"level\": 2, \"title\": \"Client Authentication\", \"body\": [\"You can create account sessions with POST requests to the Account API. Sessions are persisted using secured cookies. You can learn more about session persistence in the Authentication Guide.\", \"The example below shows creating an account session with the Create Account Session with Email endpoint.\", \" POST /v1/account/sessions/email HTTP/1.1\\nContent-Type: application/json\\nX-Appwrite-Project: [PROJECT_ID]\\n\\n{\\n \\\"email\\\": \\\"example@email.com\\\",\\n \\\"password\\\": \\\"password\\\"\\n}\", \" You can find the cookies used to persist the new session in the response headers.\", \" Set-Cookie: a_session_61e71ec784ab035f7259_legacy=eyJ0...aSJ9; expires=Tue, 19-Dec-2023 21:26:51 GMT; path=/; domain=.cloud.appwrite.io; secure; httponly\\nSet-Cookie: a_session_61e71ec784ab035f7259=eyJ0...aSJ9; expires=Tue, 19-Dec-2023 21:26:51 GMT; path=/; domain=.cloud.appwrite.io; secure; httponly; samesite=None\", \"These cookies are used in subsequent requests to authenticate the user.\", \" GET /v1/account HTTP/1.1\\nCookie: a_session_61e71ec784ab035f7259_legacy=eyJ0...aSJ9; a_session_61e71ec784ab035f7259=eyJ0...aSJ9\\nContent-Type: application/json\\nX-Appwrite-Project: [PROJECT_ID]\"]}, {\"level\": 2, \"title\": \"Server Authentication\", \"body\": [\"Server integrations use API keys to authenticate and are typically used for backend applications.\", \"Server APIs are authenticated with API keys instead of account sessions. Simply pass an API key in the X-Appwrite-key: [API-KEY] header with the appropriate scopes.\", \" GET /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1\\nContent-Type: application/json\\nX-Appwrite-Project: [PROJECT_ID]\\nX-Appwrite-Key: [API_KEY]\"]}, {\"level\": 2, \"title\": \"JWT Authentication\", \"body\": [\"JWT authentication is frequently used by server applications to act on behalf of a user. Users generate tokens using the Create JWT endpoint. When issuing requests authenticated with a JWT, Appwrite will treat the request like it is from the authenticated user.\", \" GET /v1/account HTTP/1.1\\nContent-Type: application/json\\nX-Appwrite-Project: [PROJECT_ID]\\nX-Appwrite-JWT: [TOKEN]\"]}, {\"level\": 2, \"title\": \"File Handling\", \"body\": [\"Appwrite implements resumable, chunked uploads for files larger than 5MB. Chunked uploads send files in chunks of 5MB to reduce memory footprint and increase resilience when handling large files. Appwrite SDKs will automatically handle chunked uploads, but it is possible to implement this with the REST API directly.\", \"Upload endpoints in Appwrite, such as Create File and Create Deployment, are different from other endpoints. These endpoints take multipart form data instead of JSON data. To implement chunked uploads, you will need to implement the following headers:\", \" Header Description X-Appwrite-Project: [PROJECT-ID] required Contains the ID of your Appwrite Project to the REST API. Content-Type: multipart/form-data; boundary=[FORM-BOUNDARY] required Contains the content type of the HTTP request and provides a boundary that is used to parse the form data. Content-Range: bytes [BYTE-RANGE] required Contains information about which bytes are being transmitted in this chunk, with the format [FIRST-BYTE]-[LAST-BYTE]/[TOTAL-BYTES]. X-Appwrite-ID: [FILE-ID] required Contains ID of the file this chunk belongs to. X-Appwrite-Key: [API-KEY] optional Used for authentication in server integrations. Do not use API keys in client applications. \", \"The multipart form data is structured as follows:\", \" Key Value File Name Description fileId optional [FILE-ID] n/a Contains the file ID of the new file. Only used by file chunks following the first chunk uploaded. file required [CHUNK-DATA] [FILE-NAME] Contains file chunk data. permissions required [PERMISSION ARRAY] n/a Contains an array of permission strings about who can access the new file. \", \"While cURL and fetch are great tools to explore other REST endpoints, it's impractical to use for chunked file uploads because you need to split files into chunks.\", \"The multipart form data posted to file upload endpoints have the following format:\", \" POST /v1/storage/buckets/default/files HTTP/1.1\\nContent-Type: multipart/form-data; boundary=----WebKitFormBoundarye0m6iNBQNHlzTpVM\\nX-Appwrite-Project: demo-project\\nContent-Range: bytes 10485760-12582912/12582912\\nX-Appwrite-ID: 6369b0bc1dcf4ff59051\\n\\n------WebKitFormBoundarye0m6iNBQNHlzTpVM\\nContent-Disposition: form-data; name=\\\"fileId\\\"\\n\\nunique()\\n------WebKitFormBoundarye0m6iNBQNHlzTpVM\\nContent-Disposition: form-data; name=\\\"file\\\"; filename=\\\"file.txt\\\"\\nContent-Type: application/octet-stream\\n\\n[CHUNKED-DATA]\\n------WebKitFormBoundarye0m6iNBQNHlzTpVM\\nContent-Disposition: form-data; name=\\\"permissions[]\\\"\\n\\nread(\\\"user:627a958ded6424a98a9f\\\")\\n------WebKitFormBoundarye0m6iNBQNHlzTpVM--\"]}, {\"level\": 2, \"title\": \"Permissions\", \"body\": [\"Appwrite SDKs have helpers to generate permission strings, but when using Appwrite without SDKs, you'd need to create the strings yourself.\"]}, {\"level\": 3, \"title\": \"Permission Types\", \"body\": [\" SDK Permission String Permission.read() read(\\\"[PERMISSION_ROLE]\\\") Permission.create() create(\\\"[PERMISSION_ROLE]\\\") Permission.update() update(\\\"[PERMISSION_ROLE]\\\") Permission.delete() delete(\\\"[PERMISSION_ROLE]\\\") Permission.write() write(\\\"[PERMISSION_ROLE]\\\") \"]}, {\"level\": 3, \"title\": \"Permission Roles\", \"body\": [\" SDK Role String Role.any() any Role.guests() guests Role.users() users Role.users([STATUS]) users/[STATUS] Role.user([USER_ID]) user:[USER_ID] Role.user([USER_ID], [STATUS]) user:[USER_ID]/[STATUS] Role.team([TEAM_ID]) team:[TEAM_ID] Role.team([TEAM_ID], [ROLE]) team:[TEAM_ID]/[ROLE] Role.member([MEMBERSHIP_ID]) member:[MEMBERSHIP_ID] \", \" Learn more about permissions\"]}, {\"level\": 2, \"title\": \"Unique ID\", \"body\": [\"Appwrite's SDKs have a helper ID.unique() to generate unique IDs. When using Appwrite without an SDK, pass the string \\\"unique()\\\" into the ID parameter.\"]}, {\"level\": 2, \"title\": \"Query Methods\", \"body\": [\"Appwrite's SDKs provide a Query class to generate query strings. When using Appwrite without an SDK, you can template your own strings with the format below.\", \"Query strings are passed to Appwrite using the queries parameter. You can attach multiple query strings by including the array parameter multiple times in the query string: queries[]=\\\"...\\\"&queries[]=\\\"...\\\"\", \" Query Method Query String select select([attribute]) equal equal(\\\"attribute\\\", [value]) notEqual notEqual(\\\"attribute\\\", [value]) lessThan lessThan(\\\"attribute\\\", [value]) lessThanEqual lessThanEqual(\\\"attribute\\\", [value]) greaterThan greaterThan(\\\"attribute\\\", [value]) greaterThanEqual greaterThanEqual(\\\"attribute\\\", [value]) between between(\\\"attribute\\\", lowerBound, upperBound) isNull isNull(\\\"attribute\\\") isNotNull isNotNull(\\\"attribute\\\") startsWith startsWith(\\\"attribute\\\", [value]) endsWith endsWith(\\\"attribute\\\", [value]) search search(\\\"attribute\\\", [value]) orderDesc orderDesc(\\\"attribute\\\") orderAsc orderAsc(\\\"attribute\\\") cursorAfter cursorAfter(\\\"documentId\\\") cursorBefore cursorBefore(\\\"documentId\\\") limit limit(0) offset offset(0) \", \" Best Practice When using greater than, greater than or equal to, less than, or less than or equal to, it is not recommended to pass in multiple values. While the API will accept multiple values and return results with or logic, it's best practice to pass in only one value for performance reasons.\"]}]", "metadata": {"source": "https://appwrite.io/docs/rest"}}
\ No newline at end of file
diff --git a/docs/ee43a314-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43a314-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..438d002
--- /dev/null
+++ b/docs/ee43a314-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" GraphQL \", \"body\": [\"Appwrite supports multiple protocols for accessing the server, including REST, GraphQL, and Realtime.\", \"The GraphQL API allows you to query and mutate any resource type on your Appwrite server through the endpoint /v1/graphql. Every endpoint available through REST is available through GraphQL, except for OAuth.\"]}, {\"level\": 2, \"title\": \"Requests\", \"body\": [\"Although every query executes through the same endpoint, there are multiple ways to make a GraphQL request. All requests, however, share a common structure.\", \" Name Type Description query required string The GraphQL query to execute. operationName optional string If the query contains several named operations, controls which one to execute. variables optional object An object containing variable names and values for the query. Variables are made available to your query with the $ prefix. \", \" GraphQL Model Parameters In Appwrite's GraphQL API, all internal model parameters are prefixed with _ instead of $ because $ is reserved by GraphQL. For example, $collectionId in the REST API would be referenced as _collectionId in the GraphQL API.\"]}, {\"level\": 3, \"title\": \"GET Requests\", \"body\": [\"You can execute a GraphQL query via a GET request, passing a query and optionally operationName and variables as query parameters.\"]}, {\"level\": 3, \"title\": \"POST Requests\", \"body\": [\"There are multiple ways to make a GraphQL POST request, differentiated by content type.\"]}, {\"level\": 4, \"title\": \"JSON\", \"body\": [\"There are two ways to make requests with the application/json content type. You can send a JSON object containing a query and optionally operationName and variables, or an array of objects with the same structure.\", \" Object {\\n \\\"query\\\": \\\"\\\",\\n \\\"operationName\\\": \\\"\\\",\\n \\\"variables\\\": {}\\n} Array [\\n {\\n \\\"query\\\": \\\"\\\",\\n \\\"operationName\\\": \\\"\\\",\\n \\\"variables\\\": {}\\n }\\n] \"]}, {\"level\": 4, \"title\": \"GraphQL\", \"body\": [\"The application/graphql content type can be used to send a query as the raw POST body.\", \" query GetAccount {\\n accountGet {\\n _id\\n email\\n }\\n}\"]}, {\"level\": 4, \"title\": \"Multipart Form Data\", \"body\": [\"The multipart/form-data content type can be used to upload files via GraphQL. In this case, the form data must include the following parts in addition to the files to upload:\", \" Name Type Description operations required string JSON encoded GraphQL query and optionally operation name and variables. File variables should contain null values. map required string JSON encoded map of form-data filenames to the operations dot-path to inject the file to, e.g. variables.file. \"]}, {\"level\": 2, \"title\": \"Responses\", \"body\": [\"A response to a GraphQL request will have the following structure:\", \" Name Type Description data object The data returned by the query, maps requested field names to their results. errors object[] An array of errors that occurred during the request. \", \"The data object will contain a map of requested field names to their results. If no data is returned, the object will not be present in the response.\", \"The errors array will contain error objects, each with their own message and path. The path will contain the field key that is null due to the error. If no errors occur, the array will not be present in the response.\"]}, {\"level\": 2, \"title\": \"Authentication\", \"body\": [\"GraphQL authenticates using Appwrite accounts and sessions. Both accounts and sessions can be created with GraphQL using the accountCreate, accountCreateEmailSession, accountCreateAnonymousSession, or accountCreatePhoneSession mutations.\", \"More information and examples of authenticating users can be found in the dedicated authentication guide.\"]}, {\"level\": 2, \"title\": \"GraphQL vs REST\", \"body\": [\"There are two main features that make GraphQL appealing when compared to the REST API: selection sets and query batching.\"]}, {\"level\": 3, \"title\": \"Selection Sets\", \"body\": [\"Selection sets can be used to tell a GraphQL API exactly which fields of a particular resource you would like to receive in the response. The server will respond with only those fields, nothing more, nothing less. This gives you full control over what data comes into your application.\", \"For example, to retrieve only the email of a currently authenticated user, you could query the accountGet field, passing only email as the field selection set.\", \" query GetAccount {\\n accountGet {\\n _id\\n email\\n }\\n}\", \"Given this query, the GraphQL API will respond with:\", \" {\\n \\\"data\\\": {\\n \\\"accountGet\\\": {\\n \\\"_id\\\": \\\"...\\\",\\n \\\"email\\\": \\\"...\\\"\\n }\\n }\\n}\", \"This can be a useful feature for performance, network efficiency, and app responsiveness. As the processing happens on the server, the bandwidth consumed for the request can be dramatically reduced.\"]}, {\"level\": 3, \"title\": \"Query Batching\", \"body\": [\"GraphQL allows sending multiple queries or mutations in the same request. There are two different ways to batch queries. The simplest way is to include multiple fields in a single query or mutation.\", \" query GetAccountAndLocale {\\n accountGet {\\n _id\\n email\\n }\\n localeGet {\\n ip\\n }\\n}\", \"If both field executions succeed, the response will contain a data key for each field, containing the values of the selected fields.\", \" {\\n \\\"data\\\": {\\n \\\"accountGet\\\": {\\n \\\"_id\\\": \\\"...\\\",\\n \\\"email\\\": \\\"...\\\"\\n },\\n \\\"localeGet\\\": {\\n \\\"ip\\\": \\\"...\\\"\\n }\\n }\\n}\", \"If there was no authenticated user, the accountGet field would fail to resolve. In such a case the value of the data key for that field will be null, and an object will be added to the errors array instead.\", \" {\\n \\\"data\\\": {\\n \\\"accountGet\\\": null,\\n \\\"localeGet\\\": {\\n \\\"ip\\\": \\\"...\\\",\\n \\\"country\\\": \\\"...\\\"\\n }\\n },\\n \\\"errors\\\": [\\n {\\n \\\"message\\\": \\\"User (role: guest) missing scope (account)\\\",\\n \\\"path\\\": [\\\"accountGet\\\"]\\n }\\n ]\\n}\", \"Batching with a single query or mutation has some down-sides. You can not mix and match queries and mutations within the same request unless you provide an operationName, in which case you can only execute one query per request.\", \"Additionally, all variables must be passed in the same object, which can be cumbersome and hard to maintain.\", \"The second way to batch is to pass an array of queries or mutations in the request. In this way, you can execute queries and mutations and keep variables separated for each.\", \" [\\n {\\n \\\"query\\\": \\\"query GetAccount { accountGet{ email } }\\\",\\n },\\n {\\n \\\"query\\\": \\\"query GetLocale { localeGet { ip } }\\\"\\n }\\n]\", \"This allows you to execute complex actions in a single network request.\"]}]", "metadata": {"source": "https://appwrite.io/docs/graphql"}}
\ No newline at end of file
diff --git a/docs/ee43a6b6-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43a6b6-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..8861ee0
--- /dev/null
+++ b/docs/ee43a6b6-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Realtime \", \"body\": [\"Appwrite supports multiple protocols for accessing the server, including REST, GraphQL, and Realtime.\", \"Realtime allows you to listen to any events on the server-side in realtime using the subscribe method.\", \"Instead of requesting new data via HTTP, the subscription will receive new data every time it changes, any connected client receives that update within milliseconds via a WebSocket connection.\", \"This lets you build an interactive and responsive user experience by providing information from all of Appwrite's services in realtime. The example below shows subscribing to realtime events for file uploads.\", \" Web import { Client } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\n// Subscribe to files channel\\nclient.subscribe('files', response => {\\n if(response.events.includes('buckets.*.files.*.create')) {\\n // Log when a new file is uploaded\\n console.log(response.payload);\\n }\\n}); Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\nfinal realtime = Realtime(client);\\n\\n// Subscribe to files channel\\nfinal subscription = realtime.subscribe(['files']);\\n\\nsubscription.stream.listen((response) {\\n if(response.events.contains('buckets.*.files.*.create')) {\\n // Log when a new file is uploaded\\n print(response.payload);\\n }\\n}); Android import io.appwrite.Client\\nimport io.appwrite.services.Realtime\\n\\nval client = Client(context)\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\nval realtime = Realtime(client)\\n\\n// Subscribe to files channel\\nlet subscription = realtime.subscribe(\\\"files\\\") {\\n if(it.events.contains(\\\"buckets.*.files.*.create\\\")) {\\n // Log when a new file is uploaded\\n print(it.payload.toString());\\n }\\n} Apple import Appwrite\\nimport AppwriteModels\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\nlet realtime = Realtime(client)\\n\\n// Subscribe to files channel\\nlet subscription = realtime.subscribe(channels: [\\\"files\\\"]) { response in\\n if (message.events!.contains(\\\"buckets.*.files.*.create\\\")) {\\n // Log when a new file is uploaded\\n print(String(describing: response))\\n }\\n} \", \"To subscribe to updates from different resources, you need to specify one or more channels. The channels offer a wide and powerful selection that will allow you to listen to all possible resources. This allows you to receive updates not only from the database, but from all the services that Appwrite offers.\", \"If you subscribe to a channel, you will receive callbacks for a variety of events related to the channel. The events attribute in the callback can be used to filter and respond to specific events in a channel.\", \"All possible events can be found here.\", \" Permissions All subscriptions are secured by the permissions system offered by Appwrite, meaning a user will only receive updates to resources they have permission to access. Using Role.any() on read permissions will allow any client to receive updates.\"]}, {\"level\": 2, \"title\": \"Authentication\", \"body\": [\"Realtime authenticates using an existing user session. If you authenticate after creating a subscription, the subscription will not receive updates for the newly authenticated user. You will need to re-create the subscription to work with the new user.\", \"More information and examples of authenticating users can be found in the dedicated authentication guide.\"]}, {\"level\": 2, \"title\": \"Examples\", \"body\": [\"The examples below will show you how you can use Realtime in various ways.\"]}, {\"level\": 3, \"title\": \"Subscribe to a Channel\", \"body\": [\"In this example we are subscribing to all updates related to our account by using the account channel. This will be triggered by any update related to the authenticated user, like updating the user's name or e-mail address.\", \" Web import { Client } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\nclient.subscribe('account', response => {\\n // Callback will be executed on all account events.\\n console.log(response);\\n}); Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\nfinal realtime = Realtime(client);\\n\\nfinal subscription = realtime.subscribe(['account']);\\n\\nsubscription.stream.listen((response) {\\n // Callback will be executed on all account events.\\n print(response);\\n}) Android import io.appwrite.Client\\nimport io.appwrite.services.Realtime\\n\\nval client = Client(context)\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\nval realtime = Realtime(client)\\n\\nval subscription = realtime.subscribe(\\\"account\\\") {\\n // Callback will be executed on all account events.\\n print(it.payload.toString())\\n} Apple import Appwrite\\nimport AppwriteModels\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\nlet realtime = Realtime(client)\\n\\nlet subscription = realtime.subscribe(channel: \\\"account\\\", callback: { response in\\n // Callback will be executed on all account events.\\n print(String(describing: response))\\n}) \"]}, {\"level\": 3, \"title\": \"Subscribe to Multiple Channels\", \"body\": [\"You can also listen to multiple channels at once by passing an array of channels. This will trigger the callback for any events for all channels passed.\", \"In this example we are listening to the document A and all files by subscribing to the databases.A.collections.A.documents.A and files channels.\", \" Web import { Client } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\nclient.subscribe(['collections.A.documents.A', 'files'], response => {\\n // Callback will be executed on changes for documents A and all files.\\n console.log(response);\\n}); Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\nfinal realtime = Realtime(client);\\n\\nfinal subscription = realtime.subscribe(['databases.A.collections.A.documents.A', 'files']);\\n\\nsubscription.stream.listen((response) {\\n // Callback will be executed on changes for documents A and all files.\\n print(response);\\n}) Android import io.appwrite.Client\\nimport io.appwrite.services.Realtime\\n\\nval client = Client(context)\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\nval realtime = Realtime(client)\\n\\nrealtime.subscribe(\\\"databases.A.collections.A.documents.A\\\", \\\"files\\\") {\\n // Callback will be executed on changes for documents A and all files.\\n print(it.toString())\\n} Apple import Appwrite\\nimport AppwriteModels\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\nlet realtime = Realtime(client)\\n\\nrealtime.subscribe(channels: [\\\"databases.A.collections.A.documents.A\\\", \\\"files\\\"]) { response in\\n // Callback will be executed on changes for documents A and all files.\\n print(String(describing: response))\\n} \"]}, {\"level\": 3, \"title\": \"Unsubscribe\", \"body\": [\"If you no longer want to receive updates from a subscription, you can unsubscribe so that your callbacks are no longer called. Leaving old subscriptions alive and resubscribing can result in duplicate subscriptions and cause race conditions.\", \" Web import { Client } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\nconst unsubscribe = client.subscribe('files', response => {\\n // Callback will be executed on changes for all files.\\n console.log(response);\\n});\\n\\n// Closes the subscription.\\nunsubscribe(); Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\nfinal realtime = Realtime(client);\\n\\nfinal subscription = realtime.subscribe(['files']);\\n\\nsubscription.stream.listen((response) {\\n // Callback will be executed on changes for all files.\\n print(response);\\n})\\n\\n// Closes the subscription.\\nsubscription.close(); Android import io.appwrite.Client\\nimport io.appwrite.services.Realtime\\n\\nval client = Client(context)\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\nval realtime = Realtime(client)\\n\\nval subscription = realtime.subscribe(\\\"files\\\") {\\n // Callback will be executed on changes for all files.\\n print(param.toString())\\n}\\n\\n// Closes the subscription.\\nsubscription.close() Apple \\nlet client = Client()\\nlet realtime = Realtime(client)\\n\\nlet subscription = realtime.subscribe(channel: \\\"files\\\") { response in\\n // Callback will be executed on changes for all files.\\n print(response.toString())\\n}\\n\\n// Closes the subscription.\\nsubscription.close() \"]}, {\"level\": 2, \"title\": \"Payload\", \"body\": [\"The payload from the subscription will contain following properties:\", \" Name Type Description events string[] The system events that triggered this update. channels string[] An array of channels that can receive this message. timestamp string The ISO 8601 timestamp in UTC timezone from the server to ensure consistency across all client platforms and real-time technologies. payload object Payload contains the data equal to the response model. \", \"If you subscribe to the documents channel and a document the user is allowed to read is updated, you will receive an object containing information about the event and the updated document.\", \"The response will look like this:\", \" {\\n \\\"events\\\": [\\n \\\"databases.default.collections.sample.documents.63c98b9baea0938e1206.update\\\",\\n \\\"databases.*.collections.*.documents.*.update\\\",\\n \\\"databases.default.collections.*.documents.63c98b9baea0938e1206.update\\\",\\n \\\"databases.*.collections.*.documents.63c98b9baea0938e1206.update\\\",\\n \\\"databases.*.collections.sample.documents.63c98b9baea0938e1206.update\\\",\\n \\\"databases.default.collections.sample.documents.*.update\\\",\\n \\\"databases.*.collections.sample.documents.*.update\\\",\\n \\\"databases.default.collections.*.documents.*.update\\\",\\n \\\"databases.default.collections.sample.documents.63c98b9baea0938e1206\\\",\\n \\\"databases.*.collections.*.documents.*\\\",\\n \\\"databases.default.collections.*.documents.63c98b9baea0938e1206\\\",\\n \\\"databases.*.collections.*.documents.63c98b9baea0938e1206\\\",\\n \\\"databases.*.collections.sample.documents.63c98b9baea0938e1206\\\",\\n \\\"databases.default.collections.sample.documents.*\\\",\\n \\\"databases.*.collections.sample.documents.*\\\",\\n \\\"databases.default.collections.*.documents.*\\\",\\n \\\"databases.default.collections.sample\\\",\\n \\\"databases.*.collections.*\\\",\\n \\\"databases.default.collections.*\\\",\\n \\\"databases.*.collections.sample\\\",\\n \\\"databases.default\\\",\\n \\\"databases.*\\\"\\n ],\\n \\\"channels\\\": [\\n \\\"documents\\\",\\n \\\"databases.default.collections.sample.documents\\\",\\n \\\"databases.default.collections.sample.documents.63c98b9baea0938e1206\\\"\\n ],\\n \\\"timestamp\\\": \\\"2023-01-19 18:30:04.051\\\",\\n \\\"payload\\\": {\\n \\\"ip\\\": \\\"127.0.0.1\\\",\\n \\\"stringArray\\\": [\\n \\\"sss\\\"\\n ],\\n \\\"email\\\": \\\"joe@example.com\\\",\\n \\\"stringRequired\\\": \\\"req\\\",\\n \\\"float\\\": 3.3,\\n \\\"boolean\\\": false,\\n \\\"integer\\\": 3,\\n \\\"enum\\\": \\\"apple\\\",\\n \\\"stringDefault\\\": \\\"default\\\",\\n \\\"datetime\\\": \\\"2023-01-19T10:27:09.428+00:00\\\",\\n \\\"url\\\": \\\"https://appwrite.io\\\",\\n \\\"$id\\\": \\\"63c98b9baea0938e1206\\\",\\n \\\"$createdAt\\\": \\\"2023-01-19T18:27:39.715+00:00\\\",\\n \\\"$updatedAt\\\": \\\"2023-01-19T18:30:04.040+00:00\\\",\\n \\\"$permissions\\\": [],\\n \\\"$collectionId\\\": \\\"sample\\\",\\n \\\"$databaseId\\\": \\\"default\\\"\\n }\\n}\"]}, {\"level\": 2, \"title\": \"Channels\", \"body\": [\"A list of all channels available you can subscribe to:\", \" Channel Description account All account related events (session create, name update...) databases.[ID].collections.[ID].documents Any create/update/delete events to any document in a collection documents Any create/update/delete events to any document databases.[ID].collections.[ID].documents.[ID] Any update/delete events to a given document files Any create/update/delete events to any file buckets.[ID].files.[ID] Any update/delete events to a given file of the given bucket buckets.[ID].files Any update/delete events to any file of the given bucket teams Any create/update/delete events to a any team teams.[ID] Any update/delete events to a given team memberships Any create/update/delete events to a any membership memberships.[ID] Any update/delete events to a given membership executions Any update to executions executions.[ID] Any update to a given execution functions.[ID] Any execution event to a given function \"]}, {\"level\": 2, \"title\": \"Custom Endpoint\", \"body\": [\"The SDK will guess the endpoint of the Realtime API when setting the endpoint of your Appwrite instance. If you are running Appwrite with a custom proxy and changed the route of the Realtime API, you can call the setEndpointRealtime method on the Client SDK and set your new endpoint value.\", \"By default the endpoint is wss://cloud.appwrite.io/v1/realtime.\", \" Web import { Client } from \\\"appwrite\\\";\\nconst client = new Client();\\n\\nclient.setEndpointRealtime('cloud.appwrite.io'); Flutter final client = Client();\\nclient.setEndpointRealtime('cloud.appwrite.io'); Android val client = Client(context)\\nclient.setEndpointRealtime(\\\"cloud.appwrite.io\\\") Apple let client = Client()\\nclient.setEndpointRealtime(\\\"cloud.appwrite.io\\\") \"]}, {\"level\": 2, \"title\": \"Known Limitations\", \"body\": []}, {\"level\": 3, \"title\": \"Rapid Subscriptions Changes\", \"body\": [\"The SDK creates a single WebSocket connection for all subscribed channels. Each time a channel is added or unsubscribed - the SDK currently creates a completely new connection and terminates the old one. Therefore, subscriptions to channels should always be done in conjunction with state management so as not to be unnecessarily built up several times by multiple components' life cycles.\"]}]", "metadata": {"source": "https://appwrite.io/docs/realtime"}}
\ No newline at end of file
diff --git a/docs/ee43ab70-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43ab70-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..a5a3ea6
--- /dev/null
+++ b/docs/ee43ab70-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[]", "metadata": {"source": "https://appwrite.io/docs/client/account"}}
\ No newline at end of file
diff --git a/docs/ee43ad00-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43ad00-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..72bf55c
--- /dev/null
+++ b/docs/ee43ad00-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[]", "metadata": {"source": "https://appwrite.io/docs/server/users"}}
\ No newline at end of file
diff --git a/docs/ee43ae68-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43ae68-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..a5475f1
--- /dev/null
+++ b/docs/ee43ae68-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[]", "metadata": {"source": "https://appwrite.io/docs/client/teams"}}
\ No newline at end of file
diff --git a/docs/ee43b17e-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43b17e-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..e1bc8b5
--- /dev/null
+++ b/docs/ee43b17e-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[]", "metadata": {"source": "https://appwrite.io/docs/client/databases"}}
\ No newline at end of file
diff --git a/docs/ee43b3c2-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43b3c2-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..6478d70
--- /dev/null
+++ b/docs/ee43b3c2-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[]", "metadata": {"source": "https://appwrite.io/docs/client/storage"}}
\ No newline at end of file
diff --git a/docs/ee43b534-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43b534-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..6b02cc0
--- /dev/null
+++ b/docs/ee43b534-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[]", "metadata": {"source": "https://appwrite.io/docs/client/functions"}}
\ No newline at end of file
diff --git a/docs/ee43b6f6-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43b6f6-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..9aadaf2
--- /dev/null
+++ b/docs/ee43b6f6-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[]", "metadata": {"source": "https://appwrite.io/docs/client/locale"}}
\ No newline at end of file
diff --git a/docs/ee43b87c-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43b87c-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..e18a956
--- /dev/null
+++ b/docs/ee43b87c-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[]", "metadata": {"source": "https://appwrite.io/docs/client/avatars"}}
\ No newline at end of file
diff --git a/docs/ee43b9ee-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43b9ee-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..0e5bf73
--- /dev/null
+++ b/docs/ee43b9ee-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[]", "metadata": {"source": "https://appwrite.io/docs/server/health"}}
\ No newline at end of file
diff --git a/docs/8c288a5e-f62c-11ed-8355-0242c0a89002.json b/docs/ee43bb56-1f0c-11ee-98fa-00155da08df7.json
similarity index 100%
rename from docs/8c288a5e-f62c-11ed-8355-0242c0a89002.json
rename to docs/ee43bb56-1f0c-11ee-98fa-00155da08df7.json
diff --git a/docs/ee43bdb8-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43bdb8-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..8205af3
--- /dev/null
+++ b/docs/ee43bdb8-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Queries \", \"body\": [\"Many list endpoints in Appwrite allow you to filter, sort, and paginate results using queries. Appwrite provides a common set of syntax to build queries.\"]}, {\"level\": 2, \"title\": \"Query Compatibility\", \"body\": [\"Each list endpoint supports different query operations. You can find the supported query methods and attributes in the References section of the Appwrite documentation.\"]}, {\"level\": 2, \"title\": \"Query Class\", \"body\": [\"Appwrite SDKs provide a Query class to help you build queries. The Query class has a method for each type of supported query.\", \" Query Method SDK Method Example Description Select Query.select([\\\"name\\\", \\\"title\\\"]) Select which attributes should be returned from a document. Equal Query.equal(\\\"title\\\", [\\\"Iron Man\\\"]) Returns document if attribute is equal to any value in the provided array. Not Equal Query.notEqual(\\\"title\\\", [\\\"Iron Man\\\"]) Returns document if attribute is not equal to any value in the provided array. Less Than Query.lessThan(\\\"score\\\", 10) Returns document if attribute is less than the provided value. Less Than or Equal Query.lessThanEqual(\\\"score\\\", 10) Returns document if attribute is less than or equal to the provided value. Greater Than Query.greaterThan(\\\"score\\\", 10) Returns document if attribute is greater than the provided value. Greater Than or Equal Query.greaterThanEqual(\\\"score\\\", 10) Returns document if attribute is greater than or equal to the provided value. Between Query.between(\\\"price\\\", 5, 10) Returns document if attribute value falls between the two values. The boundary values are inclusive and can be strings or numbers. Is Null Query.isNull(\\\"name\\\") Returns documents where attribute value is null. Is Not Null Query.isNotNull(\\\"name\\\") Returns documents where attribute value is not null. Starts With Query.startsWith(\\\"name\\\", \\\"Once upon a time\\\") Returns documents if a string attributes starts with a substring. Ends With Query.endsWith(\\\"name\\\", \\\"happily ever after.\\\") Returns documents if a string attributes ends with a substring. Search Query.search(\\\"text\\\", \\\"key words\\\") Searches string attributes for provided keywords. Requires a Full-text index on queried attributes. Order Descending Query.orderDesc(\\\"attribute\\\") Orders results in descending order by attribute. Attribute must be indexed. Pass in an empty string to return in natural order. Order Ascending Query.orderAsc(\\\"attribute\\\") Orders results in ascending order by attribute. Attribute must be indexed. Pass in an empty string to return in natural order. Limit Query.limit(25) Limits the number of results returned by the query. Used for pagination. If the limit query is not used, the limit defaults to 25 results. Offset Query.offset(0) Offset the results returned by skipping some of the results. Used for pagination. Cursor After Query.cursorAfter(\\\"62a7...f620\\\") Places the cursor after the specified resource ID. Used for pagination. Cursor Before Query.cursorBefore(\\\"62a7...a600\\\") Places the cursor before the specified resource ID. Used for pagination. \"]}, {\"level\": 2, \"title\": \"Building Queries\", \"body\": [\" Queries are passed to an endpoint through the queries parameter as an array of query strings, which can be generated using the Query class.\", \"Each query method is logically separated via AND operations. For OR operation, pass multiple values into the query method separated by commas. For example Query.equal('title', ['Avatar', 'Lord of the Rings']) will fetch the movies \\\"Avatar\\\" or \\\"Lord of the Rings\\\".\", \" Web import { Client, Databases, Query } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\nconst databases = new Databases(client);\\n\\ndatabases.listDocuments(\\n '[DATABASE_ID]',\\n '[COLLECTION_ID]',\\n [\\n Query.equal('title', ['Avatar', 'Lord of the Rings']),\\n Query.greaterThan('year', 1999)\\n ]\\n); Flutter import 'package:appwrite/appwrite.dart';\\n\\nvoid main() async {\\n final client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\n final databases = Databases(client);\\n\\n try {\\n final documents = await databases.listDocuments(\\n '[DATABASE_ID]',\\n '[COLLECTION_ID]',\\n [\\n Query.equal('title', ['Avatar', 'Lord of the Rings']),\\n Query.greaterThan('year', 1999)\\n ]\\n );\\n } on AppwriteException catch(e) {\\n print(e);\\n }\\n} Android import io.appwrite.Client\\nimport io.appwrite.Query\\nimport io.appwrite.services.Databases\\n\\nsuspend fun main() {\\n val client = Client(applicationContext)\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\n val databases = Databases(client)\\n\\n try {\\n val documents = databases.listDocuments(\\n databaseId = \\\"[DATABASE_ID]\\\",\\n collectionId = \\\"[COLLECTION_ID]\\\",\\n queries = listOf(\\n Query.equal(\\\"title\\\", listOf(\\\"Avatar\\\", \\\"Lord of the Rings\\\")),\\n Query.greaterThan(\\\"year\\\", 1999)\\n )\\n )\\n } catch (e: AppwriteException) {\\n Log.e(\\\"Appwrite\\\", e.message)\\n }\\n} Apple import Appwrite\\nimport AppwriteModels\\n\\nfunc main() async throws {\\n let client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\n let databases = Databases(client)\\n\\n do {\\n let documents = try await databases.listDocuments(\\n databaseId: \\\"[DATABASE_ID]\\\",\\n collectionId: \\\"[COLLECTION_ID]\\\",\\n queries: [\\n Query.equal(\\\"title\\\", [\\\"Avatar\\\", \\\"Lord of the Rings\\\"]),\\n Query.greaterThan(\\\"year\\\", 1999)\\n ]\\n )\\n } catch {\\n print(error.localizedDescription)\\n }\\n} GraphQL query {\\n databasesListDocuments(\\n databaseId: \\\"[DATABASE_ID]\\\",\\n collectionId: \\\"[COLLECTION_ID]\\\"\\n queries: [\\\"equal(\\\\\\\"title\\\\\\\", [\\\\\\\"Avatar\\\\\\\", \\\\\\\"Lord of the Rings\\\\\\\"])\\\", \\\"greaterThan(\\\\\\\"year\\\\\\\", 1999)\\\"]\\n ) {\\n total\\n documents {\\n _id\\n data\\n }\\n }\\n} \"]}]", "metadata": {"source": "https://appwrite.io/docs/databases-queries"}}
\ No newline at end of file
diff --git a/docs/ee43bfe8-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43bfe8-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..2ac826f
--- /dev/null
+++ b/docs/ee43bfe8-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Pagination \", \"body\": [\" Pagination is the process of dividing data into discrete pages. In Appwrite, it is achieved by using an offset or a cursor, which both come with their own use case and benefits.\"]}, {\"level\": 2, \"title\": \"Offset Pagination\", \"body\": [\" Using Query.limit() and Query.offset() you can achieve one of the most common approaches to pagination. With Query.limit() you can define to how many documents that can be returned from one request. The Query.offset() is simply the number of records you wish to skip before selecting records.\", \" Web import { Client, Databases, Query } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\nconst databases = new Databases(client);\\n \\n// Page 1\\nconst page1 = await databases.listDocuments(\\n '[DATABASE_ID]',\\n '[COLLECTION_ID]',\\n [\\n Query.limit(25),\\n Query.offset(0)\\n ]\\n);\\n\\n// Page 2\\nconst page2 = await databases.listDocuments(\\n '[DATABASE_ID]',\\n '[COLLECTION_ID]',\\n [\\n Query.limit(25),\\n Query.offset(25)\\n ]\\n); Flutter import 'package:appwrite/appwrite.dart';\\n\\nvoid main() async {\\n final client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\n final databases = Databases(client);\\n\\n final page1 = await databases.listDocuments(\\n databaseId: '[DATABASE_ID]',\\n collectionId: '[COLLECTION_ID]',\\n queries: [\\n Query.limit(25),\\n Query.offset(0)\\n ]\\n );\\n\\n final page2 = await databases.listDocuments(\\n databaseId: '[DATABASE_ID]',\\n collectionId: '[COLLECTION_ID]',\\n queries: [\\n Query.limit(25),\\n Query.offset(25)\\n ]\\n );\\n}\\n Android import io.appwrite.Client\\nimport io.appwrite.Query\\nimport io.appwrite.services.Databases\\n\\nsuspend fun main() {\\n val client = Client(applicationContext)\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\n val databases = Databases(client)\\n\\n val page1 = databases.listDocuments(\\n databaseId = \\\"[DATABASE_ID]\\\",\\n collectionId = \\\"[COLLECTION_ID]\\\",\\n queries = [\\n Query.limit(25),\\n Query.offset(0)\\n ]\\n )\\n\\n val page2 = databases.listDocuments(\\n databaseId = \\\"[DATABASE_ID]\\\",\\n collectionId = \\\"[COLLECTION_ID]\\\",\\n queries = [\\n Query.limit(25),\\n Query.offset(25)\\n ]\\n )\\n} Apple import Appwrite\\nimport AppwriteModels\\n\\nfunc main() async throws {\\n let client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\n let databases = Databases(client)\\n\\n let page1 = try await databases.listDocuments(\\n databaseId: \\\"[DATABASE_ID]\\\",\\n collectionId: \\\"[COLLECTION_ID]\\\",\\n queries: [\\n Query.limit(25),\\n Query.offset(0)\\n ]\\n )\\n\\n let page2 = try await databases.listDocuments(\\n databaseId: \\\"[DATABASE_ID]\\\",\\n collectionId: \\\"[COLLECTION_ID]\\\",\\n queries: [\\n Query.limit(25),\\n Query.offset(25)\\n ]\\n )\\n} \", \" The request gets slower as the number of records increases because the database has to read up to the offset number of rows to know where it should start selecting data. Also when there is data added in high frequency - the individual pages might skip results.\"]}, {\"level\": 2, \"title\": \"Cursor Pagination\", \"body\": [\" The cursor is a unique identifier for a document that points to where the next page should start. After reading a page of documents, pass the last document's ID into the Query.cursorAfter(lastId) query method to get the next page of documents. Pass the first document's ID into the Query.cursorBefore(firstId) query method to retrieve the previous page.\", \" Web import { Databases, Query } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\");\\n\\nconst databases = new Databases(client);\\n\\n// Page 1\\nconst page1 = await databases.listDocuments(\\n '[DATABASE_ID]',\\n '[COLLECTION_ID]',\\n [\\n Query.limit(25),\\n ]\\n);\\n\\nconst lastId = page1.documents[page1.documents.length - 1].$id;\\n\\n// Page 2\\nconst page2 = await databases.listDocuments(\\n '[DATABASE_ID]',\\n '[COLLECTION_ID]',\\n [\\n Query.limit(25),\\n Query.cursorAfter(lastId),\\n ]\\n); Flutter import 'package:appwrite/appwrite.dart';\\n\\nvoid main() async {\\n final client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\n final databases = Databases(client);\\n\\n final page1 = await databases.listDocuments(\\n databaseId: '[DATABASE_ID]',\\n collectionId: '[COLLECTION_ID]',\\n queries: [\\n Query.limit(25)\\n ]\\n );\\n\\n final lastId = page1.documents[page1.documents.length - 1].$id;\\n\\n final page2 = await databases.listDocuments(\\n databaseId: '[DATABASE_ID]',\\n collectionId: '[COLLECTION_ID]',\\n queries: [\\n Query.limit(25),\\n Query.cursorAfter(lastId)\\n ]\\n );\\n\\n}\\n Android import android.util.Log\\nimport io.appwrite.AppwriteException\\nimport io.appwrite.Client\\nimport io.appwrite.Query\\nimport io.appwrite.services.Databases\\n\\nsuspend fun main() {\\n val client = Client(applicationContext)\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\n val databases = Databases(client)\\n\\n val page1 = databases.listDocuments(\\n databaseId = \\\"[DATABASE_ID]\\\",\\n collectionId = \\\"[COLLECTION_ID]\\\",\\n queries = [\\n Query.limit(25)\\n ]\\n )\\n\\n val lastId = page1.documents[page1.documents.size - 1].$id\\n\\n val page2 = databases.listDocuments(\\n databaseId = \\\"[DATABASE_ID]\\\",\\n collectionId = \\\"[COLLECTION_ID]\\\",\\n queries = [\\n Query.limit(25),\\n Query.cursorAfter(lastId)\\n ]\\n )\\n} Apple import Appwrite\\nimport AppwriteModels\\n\\nfunc main() async throws {\\n let client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\n let databases = Databases(client)\\n\\n let page1 = try await databases.listDocuments(\\n databaseId: \\\"[DATABASE_ID]\\\",\\n collectionId: \\\"[COLLECTION_ID]\\\",\\n queries: [\\n Query.limit(25)\\n ]\\n )\\n\\n let lastId = page1.documents[page1.documents.count - 1].$id\\n\\n let page2 = try await databases.listDocuments(\\n databaseId: \\\"[DATABASE_ID]\\\",\\n collectionId: \\\"[COLLECTION_ID]\\\",\\n queries: [\\n Query.limit(25),\\n Query.cursorAfter(lastId)\\n ]\\n )\\n} \"]}]", "metadata": {"source": "https://appwrite.io/docs/databases-pagination"}}
\ No newline at end of file
diff --git a/docs/ee43c218-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43c218-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..e7c9b5d
--- /dev/null
+++ b/docs/ee43c218-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Relationships (Beta) \", \"body\": [\"Relationships describe how documents in different collections are associated, so that related documents can be read, updated, or deleted together. Entities in real-life often associate with each other in an organic and logical way, like a person and their dog, an album and its songs, or friends in a social network. These types of association between entities can be modeled in Appwrite using relationships.\", \" Beta Feature Appwrite Relationships is a beta feature. The API and behavior are subject to change in future versions.\"]}, {\"level\": 2, \"title\": \"When to Use a Relationship\", \"body\": [\"Relationships help reduce redundant information. For example, a user can create many posts in your app. You can model this without relationships by keeping a copy of the user's information in all the documents representing posts, but this creates a lot of duplicate information in your database about the user.\"]}, {\"level\": 3, \"title\": \"Benefits of Relationships\", \"body\": [\"Duplicated records waste storage, but more importantly, makes the database much harder to maintain. If the user changes their user name, you will have to update dozens or hundreds of records, a problem commonly known as an update anomaly in databases. You can avoid duplicate information by storing users and posts in separate collections and relating a user and their posts through a relationship.\"]}, {\"level\": 3, \"title\": \"Tradeoff\", \"body\": [\"Consider using relationships when the same information is found in multiple places to avoid duplicates. However, relationships come with the tradeoff of slowing down queries. For applications where the best read and write performance is important, it may be acceptable to tolerate duplicate data.\"]}, {\"level\": 2, \"title\": \"Configurable Options\", \"body\": []}, {\"level\": 3, \"title\": \"Directionality\", \"body\": [\"Appwrite relationships can be one-way or two-way.\", \" Type Description One-way The relationship is only visible to one side of the relation. This is similar to a tree data structure, where a tree has a reference to all of its leaves, but each leaf does not have a reference to its tree root. Two-way The relationship is visible to both sides of the relationship. This is similar to a graph data structure, where each node has references to all its edges, and all its edges can reference the nodes it connects. \"]}, {\"level\": 3, \"title\": \"Types\", \"body\": [\"Appwrite provides four different relationship types to enforce different associative rules between documents.\", \" Type Description One-to-one A document can only be related to one and only one document. If you try to relate multiple documents in a one-to-one relationship, Appwrite throws an error. For example, one user has one profile. One-to-many A document can be related to many other documents. For example, one user can create many posts. Many-to-one Many documents can be related to a single document. For example, many posts can share one author. Many-to-many A document can be related to many other documents. For example, a user can have many friends, and many users can share the same friend. \"]}, {\"level\": 3, \"title\": \"On-Delete Behavior\", \"body\": [\" Appwrite also allows you to define the behavior of a relationship when a document is deleted.\", \" Type Description Restrict If a document has at least one related document, it cannot be deleted. Cascade If a document has related documents, when it is deleted, the related documents are also deleted. Set null If a document has related documents, when it is deleted, the related documents are kept with their relationship attribute set to null. \"]}, {\"level\": 2, \"title\": \"Relationship Attributes\", \"body\": [\"Relationships are represented in a collection using relationship attributes. The relationship attribute contains the ID of related documents, which it references during read, update, and delete operations. This attribute is null if a document has no related documents.\"]}, {\"level\": 2, \"title\": \"Creating Relationships in the Appwrite Console\", \"body\": [\"You can create relationships in the Appwrite Console by adding a relationship attribute to a collection.\", \" In your project, navigate to Databases > Select your database > Select your collection > Attributes > Create attribute. Select Relationship as the attribute type. In the Relationship modal, select the relationship type and pick the related collection and attributes. Pick relationship attribute key(s) to represent the related collection. Relationship attribute keys are used to reference the related collection in queries, so pick something that's intuitive and easy to remember. Select desired on delete behavior. Click the Create button to create the relationship.\"]}, {\"level\": 2, \"title\": \"Creating Relationships Programmatically\", \"body\": [\" Node.js const { Client, Databases } = require('node-appwrite');\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nconst databases = new Databases(client);\\n\\ndatabases.createRelationshipAttribute(\\n 'marvel', // Database ID\\n 'movies', // Collection ID\\n 'reviews', // Related collection ID\\n 'oneToMany', // Relationship type\\n true, // Is two-way\\n 'reviews', // Attribute key \\n 'movie', // Two-way attribute key\\n 'cascade' // On delete action\\n); PHP use \\\\Appwrite\\\\Client;\\nuse \\\\Appwrite\\\\Services\\\\Databases;\\n\\n$client = (new Client())\\n ->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n ->setProject('[PROJECT_ID]'); // Your project ID\\n\\n$databases = new Databases($client);\\n\\n$databases->createRelationshipAttribute(\\n databaseId: 'marvel', // Database ID\\n collectionId: 'movies', // Collection ID\\n relatedCollectionId: 'reviews', // Related collection ID\\n type: 'oneToMany', // Relationship type\\n twoWay: true, // Is two-way\\n key: 'reviews', // Attribute key \\n twoWayKey: 'movie', // Two-way attribute key\\n onDelete: 'cascade' // On delete action\\n); Python from appwrite.client import Client\\nfrom appwrite.services.databases import Databases\\n\\nclient = (Client()\\n .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint\\n .set_project('[PROJECT_ID]')) # Your project ID\\n\\ndatabases = Databases(client)\\n\\ndatabases.create_relationship_attribute(\\n database_id='marvel', # Database ID \\n collection_id='movies', # Collection ID\\n related_collection_id='reviews', # Related collection ID \\n type='oneToMany', # Relationship type\\n two_way=True, # Is two-way\\n key='reviews', # Attribute key \\n two_way_key='movie', # Two-way attribute key\\n on_delete='cascade' # On delete action\\n) Ruby require 'appwrite'\\n\\ninclude Appwrite\\n\\nclient = Client.new\\n .set_endpoint('https://cloud.appwrite.io/v1')# Your API Endpoint\\n .set_project('[PROJECT_ID]') # Your project ID\\n\\ndatabases = Databases.new(client)\\n\\ndatabases.create_relationship_attribute(\\n database_id: 'marvel', # Database ID \\n collection_id: 'movies', # Collection ID \\n related_collection_id: 'reviews', # Related collection ID \\n type: 'oneToMany', # Relationship type\\n two_way: true, # Is two-way\\n key: 'reviews', # Attribute key \\n two_way_key: 'movie', # Two-way attribute key \\n on_delete: 'cascade' # On delete action\\n) Deno import { Client, Databases } from \\\"https://deno.land/x/appwrite/mod.ts\\\";\\n\\nconst client = new Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\"); // Your project ID\\n\\nconst databases = new Databases(client);\\n\\ndatabases.createRelationshipAttribute(\\n \\\"marvel\\\", // Database ID \\n \\\"movies\\\", // Collection ID \\n \\\"reviews\\\", // Related collection ID \\n \\\"oneToMany\\\", // Relationship type \\n true, // Is two-way \\n \\\"reviews\\\", // Attribute key \\n \\\"movie\\\", // Two-way attribute key \\n \\\"cascade\\\" // On delete action \\n); Dart import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nfinal databases = Databases(client);\\n\\nawait databases.createRelationshipAttribute(\\n databaseId: 'marvel', // Database ID \\n collectionId: 'movies', // Collection ID \\n relatedCollectionId: 'reviews', // Related collection ID \\n type: 'oneToMany', // Relationship type \\n twoWay: true, // Is two-way \\n key: 'reviews', // Attribute key \\n twoWayKey: 'movie', // Two-way attribute key \\n onDelete: 'cascade', // On delete action \\n); Kotlin import io.appwrite.Client\\nimport io.appwrite.services.Databases\\n\\nval client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nval databases = Databases(client)\\n\\ndatabases.createRelationshipAttribute(\\n databaseId = \\\"marvel\\\", // Database ID \\n collectionId = \\\"movies\\\", // Collection ID \\n relatedCollectionId = \\\"reviews\\\", // Related collection ID \\n type = \\\"oneToMany\\\", // Relationship type \\n twoWay = true, // Is two-way \\n key = \\\"reviews\\\", // Attribute key \\n twoWayKey = \\\"movie\\\", // Two-way attribute key \\n onDelete = \\\"cascade\\\" // On delete action \\n) Swift import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nlet databases = Databases(client)\\n\\ndatabases.createRelationshipAttribute(\\n databaseId: \\\"marvel\\\", // Database ID \\n collectionId: \\\"movies\\\", // Collection ID \\n relatedCollectionId: \\\"reviews\\\", // Related collection ID \\n type: \\\"oneToMany\\\", // Relationship type \\n twoWay: true, // Is two-way \\n key: \\\"reviews\\\", // Attribute key \\n twoWayKey: \\\"movie\\\", // Two-way attribute key \\n onDelete: \\\"cascade\\\" // On delete action \\n) \", \"The above example adds a relationship between the collections movies and reviews. A relationship attribute with the key reviews is added to the movies collection and another relationship attribute with the key movie is added to the reviews collection.\"]}, {\"level\": 2, \"title\": \"Creating Documents\", \"body\": [\"If a collection has relationship attributes, you can create documents in two ways.\"]}, {\"level\": 3, \"title\": \"Creating Child Documents\", \"body\": [\"You can create both the parent and child at once in a relationship by nesting data.\", \" Web const { Client, Databases, ID } = require('node-appwrite');\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nconst databases = new Databases(client);\\n\\nawait databases.createDocument(\\n 'marvel',\\n 'movies',\\n ID.unique(),\\n {\\n title: 'Spiderman',\\n year: 2002,\\n reviews: [\\n { author: 'Bob', text: 'Great movie!' },\\n { author: 'Alice', text: 'Loved it!' }\\n ]\\n }\\n) Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nfinal databases = Databases(client);\\n\\nawait databases.createDocument(\\n databaseId: 'marvel',\\n collectionId: 'movies',\\n documentId: ID.unique(),\\n data: {\\n 'title': 'Spiderman',\\n 'year': 2002,\\n 'reviews': [\\n { 'author': 'Bob', 'text': 'Great movie!' },\\n { 'author': 'Alice', 'text': 'Loved it!' }\\n ]\\n },\\n); Apple import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nlet databases = Database(client: client)\\n\\ndatabases.createDocument(\\n databaseId: \\\"marvel\\\",\\n collectionId: \\\"movies\\\",\\n documentId: ID.unique(),\\n data: [\\n \\\"title\\\": \\\"Spiderman\\\",\\n \\\"year\\\": 2002,\\n \\\"reviews\\\": [\\n [ \\\"author\\\": \\\"Bob\\\", \\\"text\\\": \\\"Great movie!\\\" ],\\n [ \\\"author\\\": \\\"Alice\\\", \\\"text\\\": \\\"Loved it!\\\" ]\\n ]\\n ]\\n) Android import io.appwrite.Client\\nimport io.appwrite.services.Database\\nimport io.appwrite.ID\\n\\nval client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nval databases = Database(client)\\n\\ndatabases.createDocument(\\n databaseId = \\\"marvel\\\",\\n collectionId = \\\"movies\\\",\\n documentId = ID.unique(),\\n data = mapOf(\\n \\\"title\\\" to \\\"Spiderman\\\",\\n \\\"year\\\" to 2002,\\n \\\"reviews\\\" to listOf(\\n mapOf(\\\"author\\\" to \\\"Bob\\\", \\\"text\\\" to \\\"Great movie!\\\"),\\n mapOf(\\\"author\\\" to \\\"Alice\\\", \\\"text\\\" to \\\"Loved it!\\\")\\n )\\n )\\n) \", \"If a nested child document is included and no child document ID is provided, the child document will be given a unique ID.\", \"If a nested child document is included and no conflicting child document ID exists, the child document will be created.\", \"If a nested child document is included and the child document ID already exists, the child document will be updated.\"]}, {\"level\": 3, \"title\": \"Reference Child Documents\", \"body\": [\"If the child documents are already present in the related collection, you can create the parent and reference the child documents using their IDs.\", \" Web const { Client, Databases, ID } = require('node-appwrite');\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nconst databases = new Databases(client);\\n\\nawait databases.createDocument(\\n 'marvel',\\n 'movies',\\n ID.unique(),\\n {\\n title: 'Spiderman',\\n year: 2002,\\n reviews: [\\n 'review1',\\n 'review2'\\n ]\\n }\\n) Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint \\n .setProject('[PROJECT_ID]'); // Your project ID \\n\\nfinal databases = Databases(client);\\n\\nawait databases.createDocument(\\n databaseId: 'marvel',\\n collectionId: 'movies',\\n documentId: ID.unique(),\\n data: {\\n 'title': 'Spiderman',\\n 'year': 2002,\\n 'reviews': [\\n 'review1',\\n 'review2'\\n ]\\n },\\n); Apple import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint \\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID \\n\\nlet databases = Database(client: client)\\n\\ndatabases.createDocument(\\n databaseId: \\\"marvel\\\",\\n collectionId: \\\"movies\\\",\\n documentId: ID.unique(),\\n data: [\\n \\\"title\\\": \\\"Spiderman\\\",\\n \\\"year\\\": 2002,\\n \\\"reviews\\\": [\\n \\\"review1\\\",\\n \\\"review2\\\"\\n ]\\n ]\\n) Android import io.appwrite.Client\\nimport io.appwrite.services.Database\\nimport io.appwrite.ID\\n\\nval client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint \\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID \\n\\nval databases = Database(client)\\n\\ndatabases.createDocument(\\n databaseId = \\\"marvel\\\",\\n collectionId = \\\"movies\\\",\\n documentId = ID.unique(),\\n data = mapOf(\\n \\\"title\\\" to \\\"Spiderman\\\",\\n \\\"year\\\" to 2002,\\n \\\"reviews\\\" to listOf(\\n \\\"review1\\\",\\n \\\"review2\\\"\\n )\\n )\\n) \"]}, {\"level\": 2, \"title\": \"Querying\", \"body\": [\"Querying is currently not available in the beta version of Appwrite Relationships but will be added in a later version.\"]}, {\"level\": 2, \"title\": \"Updating Relationships\", \"body\": [\"Relationships can be updated by updating the relationship attribute.\", \" Web const { Client, Databases } = require('node-appwrite');\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nconst databases = new Databases(client);\\n\\nawait databases.updateDocument(\\n 'marvel',\\n 'movies',\\n 'spiderman',\\n {\\n title: 'Spiderman',\\n year: 2002,\\n reviews: [\\n 'review4',\\n 'review5'\\n ]\\n }\\n); Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\nfinal databases = Databases(client);\\n\\nawait databases.updateDocument(\\n databaseId: 'marvel',\\n collectionId: 'movies',\\n documentId: 'spiderman',\\n data: {\\n 'title': 'Spiderman',\\n 'year': 2002,\\n 'reviews': [\\n 'review4',\\n 'review5'\\n ]\\n },\\n); Apple import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\nlet databases = Database(client: client)\\n\\ndatabases.updateDocument(\\n databaseId: \\\"marvel\\\",\\n collectionId: \\\"movies\\\",\\n documentId: \\\"spiderman\\\",\\n data: [\\n \\\"title\\\": \\\"Spiderman\\\",\\n \\\"year\\\": 2002,\\n \\\"reviews\\\": [\\n \\\"review4\\\",\\n \\\"review5\\\"\\n ]\\n ]\\n) Android import io.appwrite.Client\\nimport io.appwrite.services.Database\\n\\nval client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\nval databases = Database(client)\\n\\ndatabases.updateDocument(\\n databaseId = \\\"marvel\\\",\\n collectionId = \\\"movies\\\",\\n documentId = \\\"spiderman\\\",\\n data = mapOf(\\n \\\"title\\\" to \\\"Spiderman\\\",\\n \\\"year\\\" to 2002,\\n \\\"reviews\\\" to listOf(\\n \\\"review4\\\",\\n \\\"review5\\\"\\n )\\n )\\n) \"]}, {\"level\": 2, \"title\": \"Deleting Relationships\", \"body\": []}, {\"level\": 3, \"title\": \"Unlink Relationships, Retain Documents\", \"body\": [\"If you need to unlink documents in a relationship but retain the documents, you can do this by updating the relationship attribute and removing the ID of the related document.\", \"If a document can be related to only one document, you can delete the relationship by setting the relationship attribute to null.\", \"If a document can be related to more than one document, you can delete the relationship by setting the relationship attribute to an empty list.\"]}, {\"level\": 3, \"title\": \"Deleting Relationships and Documents\", \"body\": [\"If you need to delete the documents as well as unlink the relationship, the approach depends on the on-delete behavior of a relationship.\", \"If the on-delete behavior is restrict, the link between the documents needs to be deleted first before the documents can be deleted individually.\", \"If the on-delete behavior is set null, deleting a document will leave related documents in place with their relationship attribute set to null. If you wish to also delete related documents, they must be deleted individually.\", \"If the on-delete behavior is cascade, deleting the parent documents also deletes related child documents, except for many-to-one relationships. In many-to-one relationships, there are multiple parent documents related to a single child document, and when the child document is deleted, the parents are deleted in cascade.\", \" Web const { Client, Databases } = require('node-appwrite');\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nconst databases = new Databases(client);\\n\\nawait databases.deleteDocument(\\n 'marvel',\\n 'movies',\\n 'spiderman'\\n); Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\nfinal databases = Databases(client);\\n\\nawait databases.deleteDocument(\\n databaseId: 'marvel',\\n collectionId: 'movies',\\n documentId: 'spiderman'\\n); Apple import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\nlet databases = Database(client: client)\\n\\ndatabases.deleteDocument(\\n databaseId: \\\"marvel\\\",\\n collectionId: \\\"movies\\\",\\n documentId: \\\"spiderman\\\"\\n) Android import io.appwrite.Client\\nimport io.appwrite.services.Database\\n\\nval client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\nval databases = Database(client)\\n\\ndatabases.deleteDocument(\\n databaseId = \\\"marvel\\\",\\n collectionId = \\\"movies\\\",\\n documentId = \\\"spiderman\\\"\\n) \"]}, {\"level\": 2, \"title\": \"Permissions\", \"body\": [\"To access documents in a relationship, you must have permission to access both the parent and child documents.\", \"When creating both the parent and child documents, the child document will inherit permissions from its parent.\", \"You can also provide explicit permissions to the child document if they should be different from their parent.\", \" Web const { Client, Databases, ID } = require('node-appwrite');\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nconst databases = new Databases(client);\\n\\nawait databases.createDocument(\\n 'marvel',\\n 'movies',\\n ID.unique(),\\n {\\n title: 'Spiderman',\\n year: 2002,\\n reviews: [\\n { \\n author: 'Bob', \\n text: 'Great movie!',\\n $permissions: [\\n Permission.read(Role.any())\\n ]\\n },\\n ]\\n }\\n) Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\nfinal databases = Databases(client);\\n\\nawait databases.createDocument(\\n databaseId: 'marvel',\\n collectionId: 'movies',\\n documentId: ID.unique(),\\n data: {\\n 'title': 'Spiderman',\\n 'year': 2002,\\n 'reviews': [\\n { \\n 'author': 'Bob', \\n 'text:' 'Great movie!',\\n '\\\\$permissions': [\\n Permission.read(Role.any())\\n ]\\n },\\n ]\\n },\\n); Apple import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\nlet databases = Database(client: client)\\n\\ndatabases.createDocument(\\n databaseId: \\\"marvel\\\",\\n collectionId: \\\"movies\\\",\\n documentId: ID.unique(),\\n data: [\\n \\\"title\\\": \\\"Spiderman\\\",\\n \\\"year\\\": 2002,\\n \\\"reviews\\\": [\\n [ \\n \\\"author\\\": \\\"Bob\\\",\\n \\\"text\\\": \\\"Great movie!\\\",\\n \\\"$permissions\\\": [\\n Permission.read(Role.any())\\n ]\\n ],\\n ]\\n ]\\n) Android import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\nlet databases = Database(client: client)\\n\\ndatabases.createDocument(\\n databaseId: \\\"marvel\\\",\\n collectionId: \\\"movies\\\",\\n documentId: ID.unique(),\\n data: [\\n \\\"title\\\": \\\"Spiderman\\\",\\n \\\"year\\\": 2002,\\n \\\"reviews\\\": [\\n [ \\n \\\"author\\\": \\\"Bob\\\",\\n \\\"text\\\": \\\"Great movie!\\\",\\n \\\"$permissions\\\": [\\n Permission.read(Role.any())\\n ]\\n ],\\n ]\\n ]\\n) \", \"When creating, updating, or deleting in a relationship, you must have permission to access all documents referenced. If the user does not have read permission to any document, an exception will be thrown.\"]}]", "metadata": {"source": "https://appwrite.io/docs/databases-relationships"}}
\ No newline at end of file
diff --git a/docs/8c294318-f62c-11ed-8355-0242c0a89002.json b/docs/ee43c63c-1f0c-11ee-98fa-00155da08df7.json
similarity index 100%
rename from docs/8c294318-f62c-11ed-8355-0242c0a89002.json
rename to docs/ee43c63c-1f0c-11ee-98fa-00155da08df7.json
diff --git a/docs/ee43c9fc-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43c9fc-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..58590ba
--- /dev/null
+++ b/docs/ee43c9fc-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Authentication \", \"body\": [\" Appwrite provides authentication for many different use cases to fit the needs of developers. Appwrite manages authentication with a combination of accounts and sessions. Accounts can be created in many different ways, such as through an anonymous session, email and password, OAuth authentication, magic URLs, and more.\"]}, {\"level\": 2, \"title\": \"Account vs Users API\", \"body\": [\" The Account API operates in the scope of the currently logged-in account and is usually used in a frontend or mobile app. The Users API is used in backend integrations and uses an API key with access to all your project users.\", \" Some of the Account API methods are available from Server SDKs when you authenticate with a JWT. This allows your Server SDK to perform actions on behalf of a user.\"]}, {\"level\": 2, \"title\": \"Create An Account\", \"body\": [\" A user account in Appwrite is the primary way to access information for a given project. Accounts can be created in many different ways, including email & password, anonymous sessions, OAuth2, phone authentication, and more. Applications can create and manage sessions through the REST API or Client SDKs.\"]}, {\"level\": 3, \"title\": \"Email\", \"body\": [\" Creating an account via email and password is one of the most common ways to sign up for an application. Appwrite provides email and password authentication out of the box. Using one of Appwrite's Client SDKs, or the REST APIs directly, you can create an account using an email address and password in your application.\", \" Passwords are hashed with Argon2, a resilient and secure password hashing algorithm.\", \" The example below shows you how to create an account:\", \" Web import { Client, Account, ID } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nconst account = new Account(client);\\n\\nconst promise = account.create(\\n ID.unique(),\\n 'team@appwrite.io',\\n 'password'\\n);\\n\\npromise.then(function (response) {\\n console.log(response);\\n}, function (error) {\\n console.log(error);\\n}); Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nfinal account = Account(client);\\n\\nfinal user = await account.create(\\n userId: ID.unique(),\\n email: 'team@appwrite.io',\\n password: 'password',\\n); Android import io.appwrite.Client\\nimport io.appwrite.services.Account\\nimport io.appwrite.ID\\n\\nval client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nval account = Account(client)\\n\\nval user = account.create(\\n userId = ID.unique(),\\n email = \\\"team@appwrite.io\\\",\\n password = \\\"password\\\"\\n) Apple import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nlet account = Account(client)\\n\\nlet user = try await account.create(\\n userId: ID.unique(),\\n email: \\\"team@appwrite.io\\\",\\n password: \\\"password\\\"\\n) GraphQL \\nmutation {\\n accountCreate(userId: \\\"unique()\\\", email: \\\"team@appwrite.io\\\", password: \\\"password\\\") {\\n _id\\n email\\n name\\n }\\n} \", \" After an account is created, it can be verified through the account verification route provided by the Appwrite Accounts API. The user doesn't need to be verified to log in, but you can restrict resource access to verified users only using permissions.\"]}, {\"level\": 3, \"title\": \"Anonymous User\", \"body\": [\"Anonymous authentication allows users of your application to create a temporary valid session without creating an account. The session has an expiration time of one year. If an account is created while an anonymous session is active, it will be attached to the existing anonymous session.\", \" Web import { Client, Account } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nconst account = new Account(client);\\n\\nconst promise = account.createAnonymousSession();\\n\\npromise.then(function (response) {\\n console.log(response);\\n}, function (error) {\\n console.log(error);\\n}); Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nfinal account = Account(client);\\n\\nfinal user = await account.createAnonymousSession(); Android import io.appwrite.Client\\nimport io.appwrite.services.Account\\n\\nval client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nval account = Account(client)\\n\\nval user = account.createAnonymousSession() Apple import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nlet account = Account(client)\\n\\nlet user = try await account.createAnonymousSession() GraphQL \\nmutation {\\n accountCreateAnonymousSession {\\n _id\\n userId\\n provider\\n expire\\n }\\n} \"]}, {\"level\": 3, \"title\": \"OAuth\", \"body\": [\" OAuth is another way to authenticate a user using a multistep process. When using OAuth to authenticate, the authentication request is initiated from the client application. The user is then redirected to an OAuth2 provider to complete the authentication step, and finally, the user is redirected back to the client application. This provides integration with many third-party services that provide their own OAuth integration as a more secure approach than providing a username/password directly.\", \" In applications with first-party redirects, using OAuth2 for authentication is preferred. \", \" The example below shows you how to authenticate with OAuth2 using Amazon's OAuth system.\", \" Web import { Client, Account } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nconst account = new Account(client);\\n\\n// Go to OAuth provider login page\\naccount.createOAuth2Session('amazon'); Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nfinal account = Account(client);\\n\\n// Go to OAuth provider login page\\nawait account.createOAuth2Session(provider: 'amazon'); Android import io.appwrite.Client\\nimport io.appwrite.services.Account\\n\\nval client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nval account = Account(client)\\n\\n// Go to OAuth provider login page\\naccount.createOAuth2Session(provider = \\\"amazon\\\") Apple import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nlet account = Account(client)\\n\\n// Go to OAuth provider login page\\ntry await account.createOAuth2Session(provider: \\\"amazon\\\") GraphQL OAuth is not available through the GraphQL API. You can use the REST API or any Client SDK instead. \", \" If there is already an active anonymous session, the new session will be attached to it. If there are no active sessions, the server will attempt to look for an account with the same email address as the email received from the OAuth2 provider and attach the new session to the existing account. If no matching account is found - the server will create a new account.\"]}, {\"level\": 3, \"title\": \"Phone\", \"body\": [\" Phone authentication is done using a two-step authentication process. When using phone authentication, the authentication request is initiated from the client application and an SMS is sent to the user with a secret key for creating a session. \", \" The example below shows you how to initiate a phone authentication request.\", \" Web import { Client, Account, ID } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nconst account = new Account(client);\\n\\nconst promise = account.createPhoneSession(\\n ID.unique(),\\n '+16171234567'\\n);\\n\\npromise.then(function (response) {\\n console.log(response);\\n}, function (error) {\\n console.log(error);\\n});\\n\\n Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nfinal account = Account(client);\\n\\nfinal session = await account.createPhoneSession(\\n userId: ID.unique(),\\n phone: '+16171234567'\\n); Android import io.appwrite.Client\\nimport io.appwrite.services.Account\\nimport io.appwrite.ID\\n\\nval client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nval account = Account(client)\\n\\nval session = account.createPhoneSession(\\n userId = ID.unique(),\\n phone = \\\"+16171234567\\\"\\n) Apple import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nlet account = Account(client)\\n\\nlet session = try await account.createPhoneSession(\\n userId: ID.unique(),\\n phone: \\\"+16171234567\\\"\\n) GraphQL mutation {\\n accountCreatePhoneSession(userId: \\\"unique()\\\", phone: \\\"+16171234567\\\") {\\n _id\\n userId\\n secret\\n expire\\n }\\n} \", \" After initiation, the returned user ID and secret are used to confirm the user. The secret will be a 6-digit number in the SMS message sent to the user.\", \" Web import { Client, Account, ID } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nconst account = new Account(client);\\n\\nconst promise = account.updatePhoneSession(\\n '[USER_ID]',\\n '[SECRET]'\\n);\\n\\npromise.then(function (response) {\\n console.log(response);\\n}, function (error) {\\n console.log(error);\\n}); Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nfinal account = Account(client);\\n\\nfinal session = await account.updatePhoneSession(\\n userId: '[USER_ID]',\\n secret: '[SECRET]'\\n); Android import io.appwrite.Client\\nimport io.appwrite.services.Account\\nimport io.appwrite.ID\\n\\nval client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nval account = Account(client)\\n\\nval session = account.updatePhoneSession(\\n userId = \\\"[USER_ID]\\\",\\n secret = \\\"[SECRET]\\\"\\n) Apple import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nlet account = Account(client)\\n\\nlet session = try await account.updatePhoneSession(\\n userId: \\\"[USER_ID]\\\",\\n secret: \\\"[SECRET]\\\"\\n) GraphQL \\nmutation {\\n accountUpdatePhoneSession(userId: \\\"[USER_ID]\\\", secret: \\\"[SECRET]\\\") {\\n _id\\n userId\\n provider\\n expire\\n }\\n} \", \" After the secret is verified, a session will be created.\"]}, {\"level\": 3, \"title\": \"Magic URL\", \"body\": [\" Magic URL authentication allows a user to sign in without a password. Magic URL authentication sends the user an email with a secret key for creating a new session. If the provided email does not belong to an existing user, the provided user ID is used to create a new user. If the account already exists, the provided user ID is ignored \", \" Only redirect URLs to domains added as a platform on your Appwrite console will be accepted. URLs not added as a platform are rejected to protect against redirect attacks.\", \" Magic URL authentication can be initiated like this: \", \" Web import { Client, Account, ID } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nconst account = new Account(client);\\n\\nconst promise = account.createMagicURLSession(ID.unique(), 'email@example.com');\\n\\npromise.then(function (response) {\\n console.log(response);\\n}, function (error) {\\n console.log(error);\\n}); Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nfinal account = Account(client);\\n\\nfinal user = await account.createMagicURLSession(\\n userId: ID.unique(),\\n email: 'email@example.com',\\n); Android import io.appwrite.Client\\nimport io.appwrite.services.Account\\n\\nval client = Client(context)\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nval account = Account(client)\\n\\nval user = account.createMagicURLSession(\\n userId = ID.unique(),\\n email = \\\"email@example.com\\\"\\n) Apple import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nlet account = Account(client)\\n\\nlet user = try await account.createMagicURLSession(\\n userId: ID.unique(),\\n email: \\\"email@example.com\\\"\\n) GraphQL mutation {\\n accountCreateMagicURLSession(\\n userId: \\\"unique()\\\",\\n email: \\\"email@example.com\\\"\\n ) {\\n _id\\n _createdAt\\n userId\\n secret\\n expire\\n }\\n} \", \" After receiving your secret from an email, you can create a new Magic URL session like this:\", \" Web import { Client, Account } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nconst account = new Account(client);\\n\\nconst promise = account.updateMagicURLSession('[USER_ID]', '[SECRET]');\\n\\npromise.then(function (response) {\\n console.log(response);\\n}, function (error) {\\n console.log(error);\\n}); Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nfinal account = Account(client);\\n\\nfinal user = await account.updateMagicURLSession(\\n userId: '[USER_ID]',\\n secret: '[SECRET]',\\n); Android import io.appwrite.Client\\nimport io.appwrite.services.Account\\n\\nval client = Client(context)\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nval account = Account(client)\\n\\nval user = account.updateMagicURLSession(\\n userId = '[USER_ID]',\\n secret = '[SECRET]'\\n) Apple import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nlet account = Account(client)\\n\\nlet user = try await account.updateMagicURLSession(\\n userId: '[USER_ID]',\\n secret: \\\"[SECRET]\\\"\\n) GraphQL mutation {\\n accountUpdateMagicURLSession(\\n userId: \\\"[USER_ID]\\\",\\n secret: \\\"[SECRET]\\\"\\n ) {\\n _id\\n _createdAt\\n userId\\n expire\\n provider\\n }\\n} \"]}, {\"level\": 2, \"title\": \"Login\", \"body\": [\" Logging in with an email and password is one of the most common ways to login into an application. \", \" The example below shows you how to create a session:\", \" Web import { Client, Account } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nconst account = new Account(client);\\n\\nconst promise = account.createEmailSession(\\n 'team@appwrite.io',\\n 'password'\\n);\\n\\npromise.then(function (response) {\\n console.log(response);\\n}, function (error) {\\n console.log(error);\\n}); Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nfinal account = Account(client);\\n\\nfinal session = await account.createEmailSession(\\n email: 'team@appwrite.io',\\n password: 'password'\\n); Android import io.appwrite.Client\\nimport io.appwrite.services.Account\\n\\nval client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nval account = Account(client)\\n\\nval session = account.createEmailSession(\\n email = \\\"team@appwrite.io\\\",\\n password = \\\"password\\\"\\n) Apple import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nlet account = Account(client)\\n\\nlet session = try await account.createEmailSession(\\n email: \\\"team@appwrite.io\\\",\\n password: \\\"password\\\"\\n) GraphQL mutation {\\n accountCreateEmailSession(email: \\\"team@appwrite.io\\\", password: \\\"password\\\") {\\n _id\\n userId\\n provider\\n expire\\n }\\n} \", \" When a user tries to access restricted resources, you can check if they have a valid, active session. The Account Service provides a get() method that checks whether the current user session is active and returns the account information if successful.\", \" The example below shows you how to check whether there is an active session:\", \" Web import { Client, Account } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nconst account = new Account(client);\\n\\nconst promise = account.get();\\n\\npromise.then(function (response) {\\n console.log(response);\\n}, function (error) {\\n console.log(error);\\n}); Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nfinal account = Account(client);\\n\\nfinal session = await account.get(); Android import io.appwrite.Client\\nimport io.appwrite.services.Account\\n\\nval client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nval account = Account(client)\\n\\nval session = account.get() Apple import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nlet account = Account(client)\\n\\nlet session = try await account.get() GraphQL query {\\n accountGet {\\n _id\\n email\\n name\\n status\\n }\\n} \", \" An authenticated session in Appwrite lasts for 1 year and is then automatically expired.\"]}, {\"level\": 3, \"title\": \"Password Recovery\", \"body\": [\" If a user forgets their password, they can initiate a password recovery flow to recover their password. The Create Password Recovery endpoint sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link, they are redirected back to the password reset URL with the secret key and email address values attached to the URL as query strings. \", \" Only redirect URLs to domains added as a platform on your Appwrite console will be accepted. URLs not added as a platform are rejected to protect against redirect attacks.\", \" Web import { Client, Account } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nconst account = new Account(client);\\n\\nconst promise = account.createPasswordRecovery('email@example.com', 'https://example.com');\\n\\npromise.then(function (response) {\\n console.log(response);\\n}, function (error) {\\n console.log(error);\\n}); Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nfinal account = Account(client);\\n\\nfinal user = account.createRecovery(\\n email: 'email@example.com',\\n url: 'https://example.com',\\n); Android import io.appwrite.Client\\nimport io.appwrite.services.Account\\n\\nval client = Client(context)\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nval account = Account(client)\\n\\nval response = account.createRecovery(\\n email = \\\"email@example.com\\\",\\n url = \\\"https://example.com\\\"\\n) Apple import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nlet account = Account(client)\\n\\nlet token = try await account.createRecovery(\\n email: \\\"email@example.com\\\",\\n url: \\\"https://example.com\\\"\\n) GraphQL mutation {\\n accountCreateRecovery(\\n email: \\\"email@example.com\\\",\\n url: \\\"https://example.com\\\"\\n ) {\\n _id\\n _createdAt\\n userId\\n secret\\n expire\\n }\\n} \", \"After receiving a email with the secret attached to the redirect link, submit a request to the Create Password Recovery (confirmation) endpoint to complete the recovery flow. The verification link sent to the user's email address is valid for 1 hour.\", \" Web import { Client, Account } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nconst account = new Account(client);\\n\\nconst promise = account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password');\\n\\npromise.then(function (response) {\\n console.log(response);\\n}, function (error) {\\n console.log(error);\\n}); Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nfinal account = Account(client);\\n\\nfinal user = await account.updateRecovery(\\n userId: '[USER_ID]',\\n secret: '[SECRET]',\\n password: 'password'\\n passwordAgain: 'password'\\n); Android import io.appwrite.Client\\nimport io.appwrite.services.Account\\n\\nval client = Client(context)\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nval account = Account(client)\\n\\nval token = account.updateRecovery(\\n userId = \\\"[USER_ID]\\\",\\n secret = \\\"[SECRET]\\\",\\n password = \\\"password\\\",\\n passwordAgain = \\\"password\\\"\\n) Apple import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nlet account = Account(client)\\n\\nlet token = try await account.updateRecovery(\\n userId: \\\"[USER_ID]\\\",\\n secret: \\\"[SECRET]\\\",\\n password: \\\"password\\\",\\n passwordAgain: \\\"password\\\"\\n) GraphQL mutation {\\n accountUpdateRecovery(\\n userId: \\\"[USER_ID]\\\",\\n secret: \\\"[SECRET]\\\",\\n password: \\\"password\\\",\\n passwordAgain: \\\"password\\\"\\n ) {\\n _id\\n _createdAt\\n userId\\n secret\\n expire\\n }\\n} \"]}]", "metadata": {"source": "https://appwrite.io/docs/authentication"}}
\ No newline at end of file
diff --git a/docs/ee43ceca-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43ceca-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..10153aa
--- /dev/null
+++ b/docs/ee43ceca-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Client to Server Auth \", \"body\": [\" You can extend Appwrite's APIs by building backend apps using Server SDKs. To secure your backend app's APIs, client apps must prove their identity against your backend app before accessing sensitive information. You can secure these APIs and enforce access permissions in your backend app by using JWT authentication.\", \" If you are already authenticated on your client-side app and need your backend app to act on behalf of the user, this guide will walk you through the process.\"]}, {\"level\": 2, \"title\": \"Proof of Identity\", \"body\": [\"Before making requests to your backend APIs, your client application needs to first create a session directly with Appwrite using the account service. This session will act like an ID card for the user and can be used to access resources in Appwrite. The client will only receive information accessible to the user based on the resources's permissions.\", \"When you build backend APIs to extend Appwrite's functionality, these APIs should still respect access permissions to keep user data secure. Appwrite's backend SDKs allows you to securely act on behalf of a user with the same permissions by using JWT authentication.\"]}, {\"level\": 2, \"title\": \"JWT Authentication\", \"body\": [\"JSON Web Tokens (JWTs) are a secure means to transfer information or claims between two parties. JWT act like temporary copies of the user's ID card that allow Appwrite's Server SDKs to access information oh behalf of a user.\", \"You need to create a session using the Client SDKs before generating a JWT. The JWT will be a stateless proof of claim for the identity of the authenticated user and expire after 15 minutes or when the session is deleted.\", \"You can generate a JWT like this:\", \" Web import { Client, Account } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nconst account = new Account(client);\\n\\nconst promise = account.createJWT();\\n\\npromise.then(function (response) {\\n console.log(response);\\n}, function (error) {\\n console.log(error);\\n}); Flutter import 'package:appwrite/appwrite.dart';\\n\\nfinal client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]'); // Your project ID\\n\\nfinal account = Account(client);\\n\\nfinal jwt = await account.createJWT();\\n\\n Android import io.appwrite.Client\\nimport io.appwrite.services.Account\\n\\nval client = Client(context)\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nval account = Account(client)\\n\\nval jwt = account.createJWT() Apple import Appwrite\\n\\nlet client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n\\nlet account = Account(client)\\n\\nlet jwt = try await account.createJWT() GraphQL mutation {\\n accountCreateJWT {\\n jwt\\n }\\n} \", \"Your server application can use the JWT to act on behalf of the user by creating a Client instance with the JWT for each request it receives. To keep your API secure, discard the client object after each request.\", \" Node.js const { Client } = require('node-appwrite');\\n\\nconst client = new Client();\\n\\nclient\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]') // Your project ID\\n .setJWT('eyJJ9.eyJ...886ca'); // Your secret JSON Web Token PHP use Appwrite\\\\Client;\\n\\n$client = new Client();\\n\\n$client\\n ->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n ->setProject('[PROJECT_ID]') // Your project ID\\n ->setJWT('eyJJ9.eyJ...886ca'); // Your secret JSON Web Token Python from appwrite.client import Client\\n\\nclient = Client()\\n\\n(client\\n .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint\\n .set_project('[PROJECT_ID]') # Your project ID\\n .set_jwt('eyJJ9.eyJ...886ca') # Your secret JSON Web Token\\n) Ruby require 'appwrite'\\n\\ninclude Appwrite\\n\\nclient = Client.new\\n\\nclient\\n .set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint\\n .set_project('[PROJECT_ID]') # Your project ID\\n .set_jwt('eyJJ9.eyJ...886ca') # Your secret JSON Web Token Deno import { Client } from \\\"https://deno.land/x/appwrite/mod.ts\\\";\\n\\nlet client = new Client();\\n\\nclient\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]') // Your project ID\\n .setJWT('eyJJ9.eyJ...886ca'); // Your secret JSON Web Token Dart import 'package:dart_appwrite/dart_appwrite.dart';\\n\\nfinal client = Client();\\n\\nclient\\n .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint\\n .setProject('[PROJECT_ID]') // Your project ID\\n .setJWT('eyJJ9.eyJ...886ca'); // Your secret JSON Web Token Kotlin import io.appwrite.Client\\n\\nval client = Client()\\n\\nclient\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n .setJWT(\\\"eyJJ9.eyJ...886ca\\\") // Your secret JSON Web Token Swift import Appwrite\\n\\nlet client = Client()\\n\\nclient\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\") // Your API Endpoint\\n .setProject(\\\"[PROJECT_ID]\\\") // Your project ID\\n .setJWT(\\\"eyJJ9.eyJ...886ca\\\") // Your secret JSON Web Token \"]}, {\"level\": 2, \"title\": \"When Should I Use JWT Auth?\", \"body\": [\"JWT auth is useful when you need your backend app's Server SDK to be restricted by the same set of permissions.\", \"If your backend app's Server SDK is using an API key, it will fetch all resources regardless of permissions. This means the Server SDK might fetch files and documents your user should not be able to see, which is not helpful when you need to act on behalf of a user.\", \"If your backend app's Server SDK is using a JWT, it will only fetch resources your user has permissions to access.\"]}]", "metadata": {"source": "https://appwrite.io/docs/authentication-server"}}
\ No newline at end of file
diff --git a/docs/ee43d1f4-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43d1f4-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..cc4c1b5
--- /dev/null
+++ b/docs/ee43d1f4-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Security \", \"body\": [\" Appwrite provides many security features to keep both your Appwrite project and your user's information secure.\"]}, {\"level\": 2, \"title\": \"Persistence\", \"body\": [\" Appwrite handles the persistence of the session in a consistent way across SDKs. After authenticating with an SDK, the SDK will persist the session so that the user will not need to log in again the next time they open the app. The mechanism for persistence depends on the SDK.\", \" Best Practice Only keep user sessions active as long as needed and only maintain one instance of the Client SDK in your app to avoid conflicting session data.\", \" SDK Persistence Method Web Uses a secure session cookie and falls back to local storage when a session cookie is not available. Flutter Uses a session cookie stored in Application Documents through the path_provider package. Apple Uses a session cookie stored in UserDefaults. Android Uses a session cookie stored in SharedPreferences. \"]}, {\"level\": 2, \"title\": \"Session Limits\", \"body\": [\"In Appwrite versions 1.2 and above, you can limit the number of active sessions created per user to prevent the accumulation of unused but active sessions. New sessions created by the same user past the session limit deletes the oldest session.\", \"You can change the session limit in the Security tab of the Auth Service in your Appwrite Console. The default session limit is 10 with a maximum configurable limit of 100.\"]}, {\"level\": 2, \"title\": \"Security\", \"body\": [\" Security is very important to protect users' data and privacy. Appwrite uses a permissions model coupled with user sessions to ensure users need correct permissions to access resources. With all Appwrite services, including databases and storage, access is granted at the collection, bucket, document, or file level. These permissions are enforced for client SDKs and server SDKs when using JWT, but are ignored when using a server SDK with an API key.\"]}, {\"level\": 2, \"title\": \"Password History\", \"body\": [\"Password history prevents users from reusing recent passwords. This protects user accounts from security risks by enforcing a new password everytime it's changed.\", \"Password history can be enabled in the Auth service's Security tab on the Appwrite console. You can choose how many previous passwords to remember up to a maximum of 20 and block users from reusing them.\"]}]", "metadata": {"source": "https://appwrite.io/docs/authentication-security"}}
\ No newline at end of file
diff --git a/docs/8c2a1004-f62c-11ed-8355-0242c0a89002.json b/docs/ee43d3f2-1f0c-11ee-98fa-00155da08df7.json
similarity index 100%
rename from docs/8c2a1004-f62c-11ed-8355-0242c0a89002.json
rename to docs/ee43d3f2-1f0c-11ee-98fa-00155da08df7.json
diff --git a/docs/ee43d942-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43d942-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..90f0b0d
--- /dev/null
+++ b/docs/ee43d942-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" API Keys \", \"body\": [\"Using your API Keys, you can access Appwrite services using the SDK of your choice. To create a new API key, go to your API keys tab in your project setting using your Appwrite console and click the 'Add API Key' button.\", \"When adding a new API Key, you can choose which scope to grant your application. If you need to replace your API Key, create a new key, update your app credentials and, once ready, delete your old key.\", \" Best Practice It is a best practice to grant only the scopes you need to meet your project's goals to an API key. API keys should be treated as a secret. Never share the API key and keep API keys out of client applications.\"]}]", "metadata": {"source": "https://appwrite.io/docs/keys"}}
\ No newline at end of file
diff --git a/docs/ee43db90-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43db90-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..f04e3b4
--- /dev/null
+++ b/docs/ee43db90-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Permissions \", \"body\": [\"Appwrite permission mechanism offers a simple, yet flexible way to manage which users, teams, or roles can access a specific resource in your project, like documents and files.\", \"Using permissions, you can decide that only user A and user B will have read and update access to a specific database document, while user C and team X will be the only ones with delete access.\", \"As the name suggests, read permission allows a user to read a resource, create allows users to create new resources, update allows a user to make changes to a resource, and delete allows the user to remove the resource.\", \"All permissions can be granted to individuals or groups of users, entire teams, or only to team members with a specific role. Permission can also be granted based on authentication status such as to all users, only authenticated users, or only guest users.\", \"A project user can only grant a resource with permissions that they own. For example, if a user is trying to share a document with a team that they are not a member of, they will encounter a 401 not authorized error. If your app needs users to grant access to teams they're not a member of, you can create Appwrite Functions with a Server SDK to achieve this functionality.\", \" Appwrite Resource An Appwrite resource can be a database, collection, document, bucket, or file. Each resource has its own set of permissions to define who can interact with it. Using the Appwrite permissions mechanism, you can grant resource access to users, teams, and members with different roles.\"]}, {\"level\": 2, \"title\": \"Default Values\", \"body\": [\"When not providing a resource with read or write permissions, the default value will be empty. When a read or write permissions is missing, no one will be granted access control to the resource.\"]}, {\"level\": 2, \"title\": \"Server Integration\", \"body\": [\"Server integrations can be used for increased flexibility. When using a Server SDK in combination with the proper API key scopes, you can have any type of access to any of your project resources regardless of their permissions.\", \"Using the server integration flexibility, you can change resource permissions, share resources between different users and teams, or edit and delete them without any limitations.\"]}, {\"level\": 2, \"title\": \"Permission Types\", \"body\": [\"In Client and Server SDKs, you will find a Permission class with helper methods for each role described below.\", \" Type Description Permission.read() Access to read a resource. Permission.create() Access to create new resources. Does not apply to files or documents. Applying this type of access to files or documents results in an error. Permission.update() Access to change a resource, but not remove or create new resources. Does not apply to functions. Permission.delete() Access to remove a resource. Does not apply to functions. Permission.write() Alias to grant create, update, and delete access for collections and buckets and update and delete access for documents and files. \"]}, {\"level\": 2, \"title\": \"Permission Roles\", \"body\": [\"In Client and Server SDKs, you will find a Role class with helper methods for each role described below.\", \" Type Description Role.any() Grants access to anyone. Role.guests() Grants access to any guest user without a session. Authenticated users don't have access to this role. Role.users([STATUS]) Grants access to any authenticated or anonymous user. You can optionally pass the verified or unverified string to target specific types of users. Role.user([USER_ID], [STATUS]) Grants access to a specific user by user ID. You can optionally pass the verified or unverified string to target specific types of users. Role.team([TEAM_ID]) Grants access to any member of the specific team. To gain access to this permission, the user must be the team creator (owner), or receive and accept an invitation to join this team. Role.team([TEAM_ID], [ROLE]) Grants access to any member who possesses a specific role in a team. To gain access to this permission, the user must be a member of the specific team and have the given role assigned to them. Team roles can be assigned when inviting a user to become a team member. Role.member([MEMBERSHIP_ID]) Grants access to a specific member of a team. When the member is removed from the team, they will no longer have access. \"]}, {\"level\": 2, \"title\": \"Examples\", \"body\": [\"The examples below will show you how you can use the different Appwrite permissions to manage access control to your project resources.\", \"The following examples are using the Appwrite Web SDK but can be applied similarly to any of the other Appwrite SDKs.\"]}, {\"level\": 3, \"title\": \"Example #1 - Basic Usage\", \"body\": [\"In the following example, we are creating a document that can be read by anyone, edited by writers or admins, and deleted by administrators or a user with the user ID user:5c1f88b42259e.\", \" import { Client, Databases, Permission, Role } from \\\"appwrite\\\";\\n \\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\nconst databases = new Databases(client);\\n\\nlet promise = databases.createDocument(\\n '[DATABASE_ID]',\\n '[COLLECTION_ID]',\\n {'actorName': 'Chris Evans', 'height': 183},\\n [\\n Permission.read(Role.any()), // Anyone can view this document\\n Permission.update(Role.team(\\\"writers\\\")), // Writers can update this document\\n Permission.update(Role.team(\\\"admin\\\")), // Admins can update this document\\n Permission.delete(Role.user(\\\"5c1f88b42259e\\\")) // User 5c1f88b42259e can delete this document\\n Permission.delete(Role.team(\\\"admin\\\")) // Admins can delete this document\\n ]\\n);\\n\\npromise.then(function (response) {\\n console.log(response);\\n}, function (error) {\\n console.log(error);\\n});\"]}]", "metadata": {"source": "https://appwrite.io/docs/permissions"}}
\ No newline at end of file
diff --git a/docs/ee43df5a-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43df5a-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..9c2d69c
--- /dev/null
+++ b/docs/ee43df5a-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Events \", \"body\": [\"Appwrite provides a variety of events that allows your application to react to changes as they happen. A event will fire when a change occurs in your Appwrite project, like when a new user registers or a new file is uploaded to Appwrite. You can subscribe to these events to with Appwrite Functions, Realtime, or Webhooks.\", \"You can subscribe to events for specific resources using their ID or subscribe to changes of all resources of the same type by using a wildcard character * instead of an ID. You can also filter for events of specific actions like create, update, or delete. You can find a list of events for Storage, Databases, Functions, and Authentication services below.\"]}, {\"level\": 2, \"title\": \"Storage Service\", \"body\": [\" Name Payload Description buckets.* Bucket Object This event triggers on any buckets event. buckets.*.create Bucket Object This event triggers when a bucket is created. buckets.*.delete Bucket Object This event triggers when a bucket is deleted. buckets.*.files.* File Object This event triggers on any files event. buckets.*.files.*.create File Object This event triggers when a file is created. buckets.*.files.*.delete File Object This event triggers when a file is deleted. buckets.*.files.*.update File Object This event triggers when a file is updated. buckets.*.update Bucket Object This event triggers when a bucket is updated. \"]}, {\"level\": 2, \"title\": \"Databases Service\", \"body\": [\" Name Payload Description databases.* Database Object This event triggers on any database event. databases.*.collections.* Collection Object This event triggers on any collection event. databases.*.collections.*.attributes Attribute Object This event triggers on any attributes event. databases.*.collections.*.attributes.*.create Attribute Object This event triggers when an attribute is created. databases.*.collections.*.attributes.*.delete Attribute Object This event triggers when an attribute is deleted. databases.*.collections.*.create Collection Object This event triggers when a collection is created. databases.*.collections.*.delete Collection Object This event triggers when a collection is deleted. databases.*.collections.*.documents Document Object This event triggers on any documents event. databases.*.collections.*.documents.*.create Document Object This event triggers when a document is created. databases.*.collections.*.documents.*.delete Document Object This event triggers when a document is deleted. databases.*.collections.*.documents.*.update Document Object This event triggers when a document is updated. databases.*.collections.*.indexes Index Object This event triggers on any indexes event. databases.*.collections.*.indexes.*.create Index Object This event triggers when an index is created. databases.*.collections.*.indexes.*.delete Index Object This event triggers when an index is deleted. databases.*.collections.*.update Collection Object This event triggers when a collection is updated. databases.*.create Database Object This event triggers when a database is created. databases.*.delete Database Object This event triggers when a database is deleted. databases.*.update Database Object This event triggers when a database is updated. \"]}, {\"level\": 2, \"title\": \"Functions Service\", \"body\": [\" Name Payload Description functions.* Function Object This event triggers on any functions event. functions.*.create Function Object This event triggers when a function is created. functions.*.delete Function Object This event triggers when a function is deleted. functions.*.deployments.* Deployment Object This event triggers on any deployments event. functions.*.deployments.*.create Deployment Object This event triggers when a deployment is created. functions.*.deployments.*.delete Deployment Object This event triggers when a deployment is deleted. functions.*.deployments.*.update Deployment Object This event triggers when a deployment is updated. functions.*.executions.* Execution Object This event triggers on any executions event. functions.*.executions.*.create Execution Object This event triggers when an execution is created. functions.*.executions.*.delete Execution Object This event triggers when an execution is deleted. functions.*.executions.*.update Execution Object This event triggers when an execution is updated. functions.*.update Function Object This event triggers when a function is updated. \"]}, {\"level\": 2, \"title\": \"Authentication Service\", \"body\": [\" Name Payload Description teams.* Team Object This event triggers on any teams event. teams.*.create Team Object This event triggers when a team is created. teams.*.delete Team Object This event triggers when a team is deleted. teams.*.memberships.* Membership Object This event triggers on any team memberships event. teams.*.memberships.*.create Membership Object This event triggers when a membership is created. teams.*.memberships.*.delete Membership Object This event triggers when a membership is deleted. teams.*.memberships.*.update Membership Object This event triggers when a membership is updated. teams.*.memberships.*.update.*.status Membership Object This event triggers when a team memberships status is updated. teams.*.update Team Object This event triggers when a team is updated. teams.*.update.*.prefs Team Object This event triggers when a team's preferences are updated. users.* User Object This event triggers on any user's event. users.*.create User Object This event triggers when a user is created. users.*.delete User Object This event triggers when a user is deleted. users.*.recovery.* Token Object This event triggers on any user's recovery token event. users.*.recovery.*.create Token Object This event triggers when a recovery token for a user is created. users.*.recovery.*.update Token Object This event triggers when a recovery token for a user is validated. users.*.sessions.* Session Object This event triggers on any user's sessions event. users.*.sessions.*.create Session Object This event triggers when a session for a user is created. users.*.sessions.*.delete Session Object This event triggers when a session for a user is deleted. users.*.update User Object This event triggers when a user is updated. users.*.update.*.email User Object This event triggers when a user's email address is updated. users.*.update.*.name User Object This event triggers when a user's name is updated. users.*.update.*.password User Object This event triggers when a user's password is updated. users.*.update.*.prefs User Object This event triggers when a user's preferences is updated. users.*.update.*.status User Object This event triggers when a user's status is updated. users.*.verification.* Token Object This event triggers on any user's verification token event. users.*.verification.*.create Token Object This event triggers when a verification token for a user is created. users.*.verification.*.update Token Object This event triggers when a verification token for a user is validated. \"]}]", "metadata": {"source": "https://appwrite.io/docs/events"}}
\ No newline at end of file
diff --git a/docs/ee43e1bc-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43e1bc-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..7470779
--- /dev/null
+++ b/docs/ee43e1bc-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Queries \", \"body\": [\"Many list endpoints in Appwrite allow you to filter, sort, and paginate results using queries. Appwrite provides a common set of syntax to build queries.\"]}, {\"level\": 2, \"title\": \"Query Compatibility\", \"body\": [\"Each list endpoint supports different query operations. You can find the supported query methods and attributes in the References section of the Appwrite documentation.\"]}, {\"level\": 2, \"title\": \"Query Class\", \"body\": [\"Appwrite SDKs provide a Query class to help you build queries. The Query class has a method for each type of supported query.\", \" Query Method SDK Method Example Description Select Query.select([\\\"name\\\", \\\"title\\\"]) Select which attributes should be returned from a document. Equal Query.equal(\\\"title\\\", [\\\"Iron Man\\\"]) Returns document if attribute is equal to any value in the provided array. Not Equal Query.notEqual(\\\"title\\\", [\\\"Iron Man\\\"]) Returns document if attribute is not equal to any value in the provided array. Less Than Query.lessThan(\\\"score\\\", 10) Returns document if attribute is less than the provided value. Less Than or Equal Query.lessThanEqual(\\\"score\\\", 10) Returns document if attribute is less than or equal to the provided value. Greater Than Query.greaterThan(\\\"score\\\", 10) Returns document if attribute is greater than the provided value. Greater Than or Equal Query.greaterThanEqual(\\\"score\\\", 10) Returns document if attribute is greater than or equal to the provided value. Between Query.between(\\\"price\\\", 5, 10) Returns document if attribute value falls between the two values. The boundary values are inclusive and can be strings or numbers. Is Null Query.isNull(\\\"name\\\") Returns documents where attribute value is null. Is Not Null Query.isNotNull(\\\"name\\\") Returns documents where attribute value is not null. Starts With Query.startsWith(\\\"name\\\", \\\"Once upon a time\\\") Returns documents if a string attributes starts with a substring. Ends With Query.endsWith(\\\"name\\\", \\\"happily ever after.\\\") Returns documents if a string attributes ends with a substring. Search Query.search(\\\"text\\\", \\\"key words\\\") Searches string attributes for provided keywords. Requires a Full-text index on queried attributes. Order Descending Query.orderDesc(\\\"attribute\\\") Orders results in descending order by attribute. Attribute must be indexed. Pass in an empty string to return in natural order. Order Ascending Query.orderAsc(\\\"attribute\\\") Orders results in ascending order by attribute. Attribute must be indexed. Pass in an empty string to return in natural order. Limit Query.limit(25) Limits the number of results returned by the query. Used for pagination. If the limit query is not used, the limit defaults to 25 results. Offset Query.offset(0) Offset the results returned by skipping some of the results. Used for pagination. Cursor After Query.cursorAfter(\\\"62a7...f620\\\") Places the cursor after the specified resource ID. Used for pagination. Cursor Before Query.cursorBefore(\\\"62a7...a600\\\") Places the cursor before the specified resource ID. Used for pagination. \"]}, {\"level\": 2, \"title\": \"Building Queries\", \"body\": [\" Queries are passed to an endpoint through the queries parameter as an array of query strings, which can be generated using the Query class.\", \"Each query method is logically separated via AND operations. For OR operation, pass multiple values into the query method separated by commas. For example Query.equal('title', ['Avatar', 'Lord of the Rings']) will fetch the movies \\\"Avatar\\\" or \\\"Lord of the Rings\\\".\", \" Web import { Client, Databases, Query } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\nconst databases = new Databases(client);\\n\\ndatabases.listDocuments(\\n '[DATABASE_ID]',\\n '[COLLECTION_ID]',\\n [\\n Query.equal('title', ['Avatar', 'Lord of the Rings']),\\n Query.greaterThan('year', 1999)\\n ]\\n); Flutter import 'package:appwrite/appwrite.dart';\\n\\nvoid main() async {\\n final client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\n final databases = Databases(client);\\n\\n try {\\n final documents = await databases.listDocuments(\\n '[DATABASE_ID]',\\n '[COLLECTION_ID]',\\n [\\n Query.equal('title', ['Avatar', 'Lord of the Rings']),\\n Query.greaterThan('year', 1999)\\n ]\\n );\\n } on AppwriteException catch(e) {\\n print(e);\\n }\\n} Android import io.appwrite.Client\\nimport io.appwrite.Query\\nimport io.appwrite.services.Databases\\n\\nsuspend fun main() {\\n val client = Client(applicationContext)\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\n val databases = Databases(client)\\n\\n try {\\n val documents = databases.listDocuments(\\n databaseId = \\\"[DATABASE_ID]\\\",\\n collectionId = \\\"[COLLECTION_ID]\\\",\\n queries = listOf(\\n Query.equal(\\\"title\\\", listOf(\\\"Avatar\\\", \\\"Lord of the Rings\\\")),\\n Query.greaterThan(\\\"year\\\", 1999)\\n )\\n )\\n } catch (e: AppwriteException) {\\n Log.e(\\\"Appwrite\\\", e.message)\\n }\\n} Apple import Appwrite\\nimport AppwriteModels\\n\\nfunc main() async throws {\\n let client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\n let databases = Databases(client)\\n\\n do {\\n let documents = try await databases.listDocuments(\\n databaseId: \\\"[DATABASE_ID]\\\",\\n collectionId: \\\"[COLLECTION_ID]\\\",\\n queries: [\\n Query.equal(\\\"title\\\", [\\\"Avatar\\\", \\\"Lord of the Rings\\\"]),\\n Query.greaterThan(\\\"year\\\", 1999)\\n ]\\n )\\n } catch {\\n print(error.localizedDescription)\\n }\\n} GraphQL query {\\n databasesListDocuments(\\n databaseId: \\\"[DATABASE_ID]\\\",\\n collectionId: \\\"[COLLECTION_ID]\\\"\\n queries: [\\\"equal(\\\\\\\"title\\\\\\\", [\\\\\\\"Avatar\\\\\\\", \\\\\\\"Lord of the Rings\\\\\\\"])\\\", \\\"greaterThan(\\\\\\\"year\\\\\\\", 1999)\\\"]\\n ) {\\n total\\n documents {\\n _id\\n data\\n }\\n }\\n} \"]}]", "metadata": {"source": "https://appwrite.io/docs/queries"}}
\ No newline at end of file
diff --git a/docs/ee43e608-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43e608-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..7de11a6
--- /dev/null
+++ b/docs/ee43e608-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Pagination \", \"body\": [\" Pagination is the process of dividing data into discrete pages. In Appwrite, it is achieved by using an offset or a cursor, which both come with their own use case and benefits.\"]}, {\"level\": 2, \"title\": \"Offset Pagination\", \"body\": [\" Using Query.limit() and Query.offset() you can achieve one of the most common approaches to pagination. With Query.limit() you can define to how many documents that can be returned from one request. The Query.offset() is simply the number of records you wish to skip before selecting records.\", \" Web import { Client, Databases, Query } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\nconst databases = new Databases(client);\\n \\n// Page 1\\nconst page1 = await databases.listDocuments(\\n '[DATABASE_ID]',\\n '[COLLECTION_ID]',\\n [\\n Query.limit(25),\\n Query.offset(0)\\n ]\\n);\\n\\n// Page 2\\nconst page2 = await databases.listDocuments(\\n '[DATABASE_ID]',\\n '[COLLECTION_ID]',\\n [\\n Query.limit(25),\\n Query.offset(25)\\n ]\\n); Flutter import 'package:appwrite/appwrite.dart';\\n\\nvoid main() async {\\n final client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\n final databases = Databases(client);\\n\\n final page1 = await databases.listDocuments(\\n databaseId: '[DATABASE_ID]',\\n collectionId: '[COLLECTION_ID]',\\n queries: [\\n Query.limit(25),\\n Query.offset(0)\\n ]\\n );\\n\\n final page2 = await databases.listDocuments(\\n databaseId: '[DATABASE_ID]',\\n collectionId: '[COLLECTION_ID]',\\n queries: [\\n Query.limit(25),\\n Query.offset(25)\\n ]\\n );\\n}\\n Android import io.appwrite.Client\\nimport io.appwrite.Query\\nimport io.appwrite.services.Databases\\n\\nsuspend fun main() {\\n val client = Client(applicationContext)\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\n val databases = Databases(client)\\n\\n val page1 = databases.listDocuments(\\n databaseId = \\\"[DATABASE_ID]\\\",\\n collectionId = \\\"[COLLECTION_ID]\\\",\\n queries = [\\n Query.limit(25),\\n Query.offset(0)\\n ]\\n )\\n\\n val page2 = databases.listDocuments(\\n databaseId = \\\"[DATABASE_ID]\\\",\\n collectionId = \\\"[COLLECTION_ID]\\\",\\n queries = [\\n Query.limit(25),\\n Query.offset(25)\\n ]\\n )\\n} Apple import Appwrite\\nimport AppwriteModels\\n\\nfunc main() async throws {\\n let client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\n let databases = Databases(client)\\n\\n let page1 = try await databases.listDocuments(\\n databaseId: \\\"[DATABASE_ID]\\\",\\n collectionId: \\\"[COLLECTION_ID]\\\",\\n queries: [\\n Query.limit(25),\\n Query.offset(0)\\n ]\\n )\\n\\n let page2 = try await databases.listDocuments(\\n databaseId: \\\"[DATABASE_ID]\\\",\\n collectionId: \\\"[COLLECTION_ID]\\\",\\n queries: [\\n Query.limit(25),\\n Query.offset(25)\\n ]\\n )\\n} \", \" The request gets slower as the number of records increases because the database has to read up to the offset number of rows to know where it should start selecting data. Also when there is data added in high frequency - the individual pages might skip results.\"]}, {\"level\": 2, \"title\": \"Cursor Pagination\", \"body\": [\" The cursor is a unique identifier for a document that points to where the next page should start. After reading a page of documents, pass the last document's ID into the Query.cursorAfter(lastId) query method to get the next page of documents. Pass the first document's ID into the Query.cursorBefore(firstId) query method to retrieve the previous page.\", \" Web import { Databases, Query } from \\\"appwrite\\\";\\n\\nconst client = new Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\");\\n\\nconst databases = new Databases(client);\\n\\n// Page 1\\nconst page1 = await databases.listDocuments(\\n '[DATABASE_ID]',\\n '[COLLECTION_ID]',\\n [\\n Query.limit(25),\\n ]\\n);\\n\\nconst lastId = page1.documents[page1.documents.length - 1].$id;\\n\\n// Page 2\\nconst page2 = await databases.listDocuments(\\n '[DATABASE_ID]',\\n '[COLLECTION_ID]',\\n [\\n Query.limit(25),\\n Query.cursorAfter(lastId),\\n ]\\n); Flutter import 'package:appwrite/appwrite.dart';\\n\\nvoid main() async {\\n final client = Client()\\n .setEndpoint('https://cloud.appwrite.io/v1')\\n .setProject('[PROJECT_ID]');\\n\\n final databases = Databases(client);\\n\\n final page1 = await databases.listDocuments(\\n databaseId: '[DATABASE_ID]',\\n collectionId: '[COLLECTION_ID]',\\n queries: [\\n Query.limit(25)\\n ]\\n );\\n\\n final lastId = page1.documents[page1.documents.length - 1].$id;\\n\\n final page2 = await databases.listDocuments(\\n databaseId: '[DATABASE_ID]',\\n collectionId: '[COLLECTION_ID]',\\n queries: [\\n Query.limit(25),\\n Query.cursorAfter(lastId)\\n ]\\n );\\n\\n}\\n Android import android.util.Log\\nimport io.appwrite.AppwriteException\\nimport io.appwrite.Client\\nimport io.appwrite.Query\\nimport io.appwrite.services.Databases\\n\\nsuspend fun main() {\\n val client = Client(applicationContext)\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\n val databases = Databases(client)\\n\\n val page1 = databases.listDocuments(\\n databaseId = \\\"[DATABASE_ID]\\\",\\n collectionId = \\\"[COLLECTION_ID]\\\",\\n queries = [\\n Query.limit(25)\\n ]\\n )\\n\\n val lastId = page1.documents[page1.documents.size - 1].$id\\n\\n val page2 = databases.listDocuments(\\n databaseId = \\\"[DATABASE_ID]\\\",\\n collectionId = \\\"[COLLECTION_ID]\\\",\\n queries = [\\n Query.limit(25),\\n Query.cursorAfter(lastId)\\n ]\\n )\\n} Apple import Appwrite\\nimport AppwriteModels\\n\\nfunc main() async throws {\\n let client = Client()\\n .setEndpoint(\\\"https://cloud.appwrite.io/v1\\\")\\n .setProject(\\\"[PROJECT_ID]\\\")\\n\\n let databases = Databases(client)\\n\\n let page1 = try await databases.listDocuments(\\n databaseId: \\\"[DATABASE_ID]\\\",\\n collectionId: \\\"[COLLECTION_ID]\\\",\\n queries: [\\n Query.limit(25)\\n ]\\n )\\n\\n let lastId = page1.documents[page1.documents.count - 1].$id\\n\\n let page2 = try await databases.listDocuments(\\n databaseId: \\\"[DATABASE_ID]\\\",\\n collectionId: \\\"[COLLECTION_ID]\\\",\\n queries: [\\n Query.limit(25),\\n Query.cursorAfter(lastId)\\n ]\\n )\\n} \"]}]", "metadata": {"source": "https://appwrite.io/docs/pagination"}}
\ No newline at end of file
diff --git a/docs/ee43e888-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43e888-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..de32660
--- /dev/null
+++ b/docs/ee43e888-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Webhooks \", \"body\": [\"Webhooks allow you to build or set up integrations which subscribe to certain events on Appwrite. When one of those events is triggered, we'll send an HTTP POST payload to the webhook's configured URL. Webhooks can be used to purge cache from CDN, calculate data or send a Slack notification. You're only limited by your imagination.\"]}, {\"level\": 2, \"title\": \"Add Your Webhook\", \"body\": [\"You can set your webhook by adding it from your Appwrite project dashboard. You can access your webhooks settings from your project dashboard or on the left navigation panel. Click the 'Add Webhook' button and choose your webhook name and the events that should trigger it. You can also set an optional basic HTTP authentication username and password to protect your endpoint from unauthorized access. \"]}, {\"level\": 2, \"title\": \"Payload\", \"body\": [\"Each event type has a specific payload format with the relevant event information. All event payloads mirror the payloads for the API payload which parallel to the event types.\"]}, {\"level\": 2, \"title\": \"Headers\", \"body\": [\"HTTP requests made to your webhook's configured URL endpoint will contain several special headers:\", \" Header Description X-Appwrite-Webhook-Id version >= 0.7 The ID of the Webhook who triggered the event. X-Appwrite-Webhook-Events Names of the events that triggered this delivery. X-Appwrite-Webhook-Name Name of the webhook as specified in your app settings and events list. X-Appwrite-Webhook-User-Id version >= 0.7 The user ID of the user who triggered the event. Returns an empty string if an API key triggered the event.Note that events like `account.create` or `account.sessions.create` are performed by guest users and will not return any user ID. If you still need the user ID for these events, you can find it in the event payload. X-Appwrite-Webhook-Project-Id version >= 0.7 The ID of the project who owns the Webhook and API call. X-Appwrite-Webhook-Signature version >= 0.15.0 The HMAC-SHA1 signature of the payload. This is used to verify the authenticity of the payload. User-Agent Each request made by Appwrite will be 'Appwrite-Server'. \"]}, {\"level\": 2, \"title\": \"Verification\", \"body\": [\"Webhooks can be verified by using the X-Appwrite-Webhook-Signature header. This is the HMAC-SHA1\\nsignature of the payload. You can find the signature key in your webhooks properties in the dashboard. To generate this hash you append\\nthe payload to the end of webhook URL (make sure there are no spaces in between) and then use the HMAC-SHA1 algorithm to generate the signature.\\nAfter you've generated the signature, compare it to the \\\"X-Appwrite-Webhook-Signature\\\" header value. If they match, the payload is valid and you can trust it came from\\nyour Appwrite instance. \"]}]", "metadata": {"source": "https://appwrite.io/docs/webhooks"}}
\ No newline at end of file
diff --git a/docs/ee43ea4a-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43ea4a-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..5089037
--- /dev/null
+++ b/docs/ee43ea4a-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Custom Domains \", \"body\": [\"Appwrite custom domains feature allows you to use your self-owned domain name as your Appwrite API endpoint. A recent change made in modern browsers will not allow your web app to use 3rd party cookies. This change is done to protect your users' privacy from malicious web tracking services.\", \"When accessing Appwrite from a 3rd party domain, like appwrite.io or example.com, some browsers will treat our secure cookies as 3rd party cookies and block them, as a fallback Appwrite will store your users' sessions on the browser localStorage.\", \"Using localStorage is very convenient to help you get started quickly with Appwrite, but it is not the best practice for your users' security. The browser localStorage can't protect your users' sessions from being hijacked by a 3rd party script or an XSS vulnerability in your web app.\", \"To overcome these issues and make sure your web application works securely on all browsers, Appwrite allows you to access the Appwrite API using your own private custom domain. When accessing Appwrite from the same domain as the one your app uses, Appwrite cookies will no longer be treated as 3rd party cookies by any browser and will store your users' sessions securely.\", \"For example, if your app runs on\\u00a0my-app.com,\\u00a0you can set the subdomain\\u00a0appwrite.my-app.com\\u00a0to access the Appwrite API. This will allow browsers to respect the Appwrite sessions cookies as they are set on the same domain as your app.\"]}, {\"level\": 2, \"title\": \"Add Your Domain\", \"body\": [\"You can set your domain name by adding it to your Appwrite project settings page under the 'Custom Domains' tab. After you added your new domain to your project settings from the dashboard, you will need to create a new CNAME DNS record at your DNS provider dashboard.\"]}, {\"level\": 2, \"title\": \"Add a CNAME Record\", \"body\": [\"A CNAME record (or a Canonical Name record) is a type of resource record in the Domain Name System (DNS), which maps one domain name (an alias) to another.\", \"Every DNS host has its own way of updating DNS settings, and, unfortunately, their dashboard interfaces usually aren't the most intuitive. We recommend that you read the help documentation of your DNS host, also do not hesitate to contact their support for help with their interface and settings.\", \"Below, you'll find a list of registrars and links to their DNS setting documentation. If your domain provider isn't listed above, please contact us, and we'll include their settings as well.\", \" Provider Settings IONOS \\u00a0 (ionos.com) Settings\\u00a0\\u00a0\\u00a0\\u00a0 101domain \\u00a0 (101domain.com) Settings\\u00a0\\u00a0\\u00a0\\u00a0 123 Reg \\u00a0 (123-reg.co.uk) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 AWS Route 53 \\u00a0 (aws.amazon.com) Settings\\u00a0\\u00a0\\u00a0\\u00a0 Alfahosting \\u00a0 (alfahosting.de) Settings\\u00a0\\u00a0\\u00a0\\u00a0 Binero \\u00a0 (binero.se) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 Settings\\u00a0\\u00a0\\u00a0\\u00a0 Bluehost \\u00a0 (bluehost.com) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 Settings\\u00a0\\u00a0\\u00a0\\u00a0 ClouDNS \\u00a0 (cloudns.net) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 Cloudflare \\u00a0 (cloudflare.com) Settings\\u00a0\\u00a0\\u00a0\\u00a0 Crazydomains \\u00a0 (crazydomains.com) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 DNS Made Easy \\u00a0 (dnsmadeeasy.com) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 DNSimple \\u00a0 (dnsimple.com) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 DigitalOcean \\u00a0 (digitalocean.com) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 Settings\\u00a0\\u00a0\\u00a0\\u00a0 DreamHost \\u00a0 (dreamhost.com) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 Freeparking \\u00a0 (freeparking.co.nz) Settings\\u00a0\\u00a0\\u00a0\\u00a0 Gandi \\u00a0 (gandi.net) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 Godaddy \\u00a0 (godaddy.com) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 Google Domains \\u00a0 (domains.google) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 Host Europe \\u00a0 (hosteurope.de) Settings\\u00a0\\u00a0\\u00a0\\u00a0 Hover \\u00a0 (hover.com) Settings\\u00a0\\u00a0\\u00a0\\u00a0 Media Temple \\u00a0 (mediatemple.net) Settings\\u00a0\\u00a0\\u00a0\\u00a0 NS1 \\u00a0 (ns1.com) Settings\\u00a0\\u00a0\\u00a0\\u00a0 Name.com \\u00a0 (name.com) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 NameSilo \\u00a0 (namesilo.com) Settings\\u00a0\\u00a0\\u00a0\\u00a0 Namecheap \\u00a0 (namecheap.com) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 Network Solutions \\u00a0 (networksolutions.com) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 OVH \\u00a0 (ovh.com) Settings\\u00a0\\u00a0\\u00a0\\u00a0 One.com \\u00a0 (one.com) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 Wix \\u00a0 (wix.com) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 Yahoo \\u00a0 (smallbusiness.yahoo.net) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 enom \\u00a0 (enom.com) Settings\\u00a0\\u00a0\\u00a0\\u00a0 iPage \\u00a0 (ipage.com) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 inmotion \\u00a0 (inmotionhosting.com) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 iwantmyname \\u00a0 (iwantmyname.com) A Record\\u00a0\\u00a0\\u00a0\\u00a0 CNAME Record\\u00a0\\u00a0\\u00a0\\u00a0 Settings\\u00a0\\u00a0\\u00a0\\u00a0 \"]}, {\"level\": 2, \"title\": \"Confirm and Verify Your Domain\", \"body\": [\"Once you added your new CNAME record to your DNS settings, you will need to verify your new domain name from your Appwrite console. Enter your custom domains tab from your project settings, click the DNS Settings link and click on the 'Confirm and Verify\\\" button. If everything went well, Appwrite will approve your domain and generate a new SSL certificate for it in the background.\"]}, {\"level\": 2, \"title\": \"Enjoy your Free SSL Certificate\", \"body\": [\"Appwrite uses Let's Encrypt service to generate free and automated SSL certificates for your custom domains. Once your domain is verified, it will take the Appwrite server a few seconds to create a new SSL certificate for it. Once done, you will see your domain TLS setting marked as 'Enabled' in your Appwrite dashboard, and you will be able to connect the Appwrite API using your new domain.\"]}]", "metadata": {"source": "https://appwrite.io/docs/custom-domains"}}
\ No newline at end of file
diff --git a/docs/ee43ec66-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43ec66-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..153c670
--- /dev/null
+++ b/docs/ee43ec66-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Response Codes \", \"body\": [\"Appwrite uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, invalid input, etc.). Codes in the 5xx range indicate an error with the Appwrite server, but these are rare.\", \" Code Text Description 200 OK Success! 201 Created The requested resource has been created successfully. 202 Accepted The requested change has been accepted for processing but has not been completed. 204 No Content The server has successfully fulfilled the request and that there is no additional content to send in the response payload body. This status will usually return on successful delete operations. 301 Moved Permanently The URL of the requested resource has been changed permanently. The new URL is given in the response. 304 Not Modified There was no new data to return. 400 Bad Request The request was invalid or cannot be otherwise served. An accompanying error message will explain further. Requests with wrong or invalid input will yield this response. 401 Unauthorized Missing or incorrect authentication credentials can happen when the API key or user permission is not sufficient. 403 Forbidden The request is understood, but it has been refused, or access is not allowed. An accompanying error message will explain why. Make sure to register your app in your project's dashboard platform list. 404 Not Found The URI requested is invalid or the resource requested, such as a user, does not exist. 409 Conflict This response is sent when a request conflicts with the current state of the server. This status code will usually appear when you're trying to create an already existing resource. 413 Payload Too Large This indicates that the request entity is larger than limits defined by server. This status code will usually appear happen when uploading a file or function that is too large 416 Invalid Range Invalid value in the range or content-range headers. Usually returned while uploading or downloading files using range header but the provided range value is not valid. 429 Too Many Requests Returned in when a request cannot be served due to the application's rate limit having been exhausted for the resource. See Rate Limits 500 Internal Server Error Something is broken. Contact our team, or raise a GitHub issue. 501 Not Implemented The feature is not implemented. Usually returned when the project owner has disabled an auth method or an entire service. 503 Service Unavailable The Appwrite servers are up but overloaded with requests. Try again later. 504 Gateway timeout The Appwrite servers are up, but the request couldn't be serviced due to some failure within the stack. Try again later. \"]}, {\"level\": 2, \"title\": \"Error Messages\", \"body\": [\"When the Appwrite APIs return error messages, it does so in JSON format. For example, an error might look like this:\", \" {\\n \\\"message\\\": \\\"Invalid id: Parameter must be a valid number\\\",\\n \\\"type\\\": \\\"argument_invalid\\\",\\n \\\"code\\\": 400\\n}\\n\"]}]", "metadata": {"source": "https://appwrite.io/docs/response-codes"}}
\ No newline at end of file
diff --git a/docs/ee43ee1e-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43ee1e-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..44584a2
--- /dev/null
+++ b/docs/ee43ee1e-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Rate Limits \", \"body\": [\"Some of Appwrite's API endpoints have a rate limit to avoid abuse or brute-force attacks against Appwrite's REST API. Each Appwrite route documentation has information about any rate limits that might apply to them.\", \"Rate limits only apply to Client SDKs. Rate limits do not apply when accessing Appwrite with a Server SDK authenticated using an API key.\", \"You can check the returned HTTP headers of any API request to see your current rate limit status:\", \" HTTP/1.1 200\\nDate: Mon, 01 Jul 2013 17:27:06 GMT\\nStatus: 200\\nX-RateLimit-Limit: 60\\nX-RateLimit-Remaining: 56\\nX-RateLimit-Reset: 1372700873\\n\", \"The headers tell you everything you need to know about your current rate limit status:\", \" Header Description X-RateLimit-Limit The maximum number of requests that the consumer is permitted to make per hour. X-RateLimit-Remaining The number of requests remaining in the current rate limit window. X-RateLimit-Reset The time at which the current rate limit window resets in UTC epoch seconds. \", \"If you need the time in a different format, any modern programming language can get the job done. For example, if you open up the console on your web browser, you can easily get the reset time as a JavaScript Date object, You can also read more about Unix Time.\", \" new Date(1372700873 * 1000) // => Mon Jul 01 2013 13:47:53 GMT-0400 (EDT)\", \"Once you go over the rate limit you will receive an error response:\", \" HTTP/1.1 429\\nDate: Tue, 20 Aug 2013 14:50:41 GMT\\nStatus: 429\\nX-RateLimit-Limit: 60\\nX-RateLimit-Remaining: 0\\nX-RateLimit-Reset: 1377013266\\n{\\n \\\"message\\\": \\\"Too many requests\\\",\\n \\\"code\\\": 429\\n}\\n\"]}]", "metadata": {"source": "https://appwrite.io/docs/rate-limits"}}
\ No newline at end of file
diff --git a/docs/ee43efae-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43efae-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..8f6b630
--- /dev/null
+++ b/docs/ee43efae-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Self-Hosting \", \"body\": [\"Appwrite was designed from the ground up with self-hosting in mind. You can install and run Appwrite on any operating system that can run a Docker CLI. Self-hosted Appwrite instances can be configured flexibly with access to the same features found on Appwrite Cloud.\"]}, {\"level\": 2, \"title\": \"System Requirements\", \"body\": [\"Appwrite is designed to run well on both small and large deployments. The minimum requirements to run Appwrite are as little as 1 CPU core and 2GB of RAM, and an operating system that supports Docker.\", \"Appwrite requires Docker Compose Version 2. To install Appwrite, make sure your Docker installation is updated to support Composer V2.\", \" Upgrading From Older Versions If you are migrating from an older version of Appwrite, you need to follow the migration instructions.\"]}, {\"level\": 2, \"title\": \"Install with Docker\", \"body\": [\"The easiest way to start running your Appwrite server is by running our Docker installer tool from your terminal. Before running the installation command, make sure you have Docker CLI installed on your host machine.\", \"You will be prompted to configure the following during the setup command:\", \" Your Appwrite instance's HTTP and HTTPS ports. Your Appwrite instance's secret key which used to encrypt sensitive data. Your Appwrite instance's main hostname. Appwrite will generate a certificate using this hostname. Your Appwrite instance's DNS A record hostname. Typically set to the same value as your Appwrite instance's hostname.\"]}, {\"level\": 3, \"title\": \"Unix\", \"body\": [\" docker run -it --rm \\\\\\n --volume /var/run/docker.sock:/var/run/docker.sock \\\\\\n --volume \\\"$(pwd)\\\"/appwrite:/usr/src/code/appwrite:rw \\\\\\n --entrypoint=\\\"install\\\" \\\\\\n appwrite/appwrite:1.3.7\"]}, {\"level\": 3, \"title\": \"Windows\", \"body\": [\"Hyper-V and Containers Windows features must be enabled to run Appwrite on Windows with Docker. If you don't have these features available, you can install Docker Desktop which uses Virtualbox to run Appwrite on a Virtual Machine.\", \" CMD docker run -it --rm ^\\n --volume //var/run/docker.sock:/var/run/docker.sock ^\\n --volume \\\"%cd%\\\"/appwrite:/usr/src/code/appwrite:rw ^\\n --entrypoint=\\\"install\\\" ^\\n appwrite/appwrite:1.3.7 PowerShell docker run -it --rm `\\n --volume /var/run/docker.sock:/var/run/docker.sock `\\n --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `\\n --entrypoint=\\\"install\\\" `\\n appwrite/appwrite:1.3.7 \"]}, {\"level\": 2, \"title\": \"One-Click Setups\", \"body\": [\" In addition to running Appwrite locally, you can also launch Appwrite using a pre-configured setup. This allows you to get up and running with Appwrite quickly without installing Docker on your local machine.\", \"Choose from one of the providers below:\", \" Provider DigitalOcean Click to Install Gitpod Click to Install \"]}, {\"level\": 2, \"title\": \"Next Steps\", \"body\": [\"Self-hosting Appwrite gives you more configurable options. You can customize Appwrite with your choice of S3 compatible storage adaptors, email and SMS providers, functions runtimes, and more.\", \" Learn about configuring Appwrite\", \"Self-hosted Appwrite instances can be made production ready. To run Appwrite successfully in a production environment, you should follow a few basic concepts and best practices.\", \" Learn about Appwrite in production\"]}, {\"level\": 2, \"title\": \"Manual (using docker-compose.yml)\", \"body\": [\"For advanced Docker users, the manual installation might seem more familiar. To set up Appwrite manually, download the Appwrite base docker-compose.yml and .env files, then move them inside a directory named appwrite. After the download completes, update the different environment variables as you wish in the .env file and start the Appwrite stack using the following Docker command:\", \" docker compose up -d --remove-orphans\", \"Once the Docker installation completes, go to your machine's hostname or IP address on your browser to access the Appwrite console. Please note that on hosts that are not Linux-native, the server might take a few minutes to start after installation completes.\"]}, {\"level\": 2, \"title\": \"Stop\", \"body\": [\"You can stop your Appwrite containers by using the following command executed from the same directory as your docker-compose.yml file.\", \" docker compose stop\"]}]", "metadata": {"source": "https://appwrite.io/docs/self-hosting"}}
\ No newline at end of file
diff --git a/docs/ee43f170-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43f170-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..e31bf89
--- /dev/null
+++ b/docs/ee43f170-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Configuration \", \"body\": [\" Self-hosting allows you to customize Appwrite to meet your needs and preferences. Here's a list of things you will need to set up before developing with Appwrite. Before you start, back up your .env and docker-compose.yml files.\"]}, {\"level\": 2, \"title\": \"Local Development\", \"body\": [\"Self-hosting Appwrite for development lets you quickly prototype on your local machine. Since localhost is only a loopback address that points back at your development machine, there are some caveats you should be aware of when working with localhost.\", \"Appwrite generates a self-signed certificate for development on localhost, as connecting to unsecured HTTP is not allowed by default. If you're developing client apps on localhost, set setSelfSigned(true) while initializing your Appwrite client.\", \"If you're using an Android emulator to test your Flutter or Android apps, you can access localhost of your machine using the special alias IP 10.0.2.2.\", \"If you're testing your Flutter, Android, or iOS app on a mobile device, you will not be able to access the localhost of your PC or Mac. When testing with a physical device, you may use a service like ngrok to proxy the Appwrite instance.\"]}, {\"level\": 2, \"title\": \"Setup Email and SMS Delivery\", \"body\": [\" Appwrite requires an SMTP service to deliver emails. Email delivery is required for features like password recovery, account verification, MagicURL authentication, and team invites. You can use a third-party SMTP service or host your own SMTP server.\", \" Set up email delivery\", \" Appwrite supports multiple third-party SMS delivery providers. SMS delivery is required for phone authentication.\", \" Set up SMS delivery\"]}, {\"level\": 2, \"title\": \"Configure Function Runtimes\", \"body\": [\" Not all function runtimes are enabled by default. Enable the runtimes that you need and disable unused runtimes to save disk space on your server. To enable a runtime, add it to the _APP_FUNCTIONS_RUNTIMES environment variable as a comma separated list. \", \" The example below would enable Dart 2.15, .NET 6.0, and Java 18 runtimes.\", \" _APP_FUNCTIONS_RUNTIMES=dart-2.15, dotnet-6.0, java-18.0\", \"You can find a full list of supported runtimes on the environment variables page.\", \"You can also configure the maximum timeout that can be set on individual Appwrite functions. The maximum configurable timeout can be increased by changing the _APP_FUNCTIONS_TIMEOUT environment variable. This environment variable changes the configurable maximum but does not alter existing individual configurations.\"]}, {\"level\": 2, \"title\": \"Storage Adaptors\", \"body\": [\"Appwrite's Storage Service can be configured to store files locally, or with self-hosted and cloud storage services. By default, Appwrite's Storage Service stores files on your server's local storage. If you expect large volumes of data or the need to have scalable data storage, you may choose to use a separate storage service.\", \"Appwrite supports AWS S3, Digital Ocean Spaces, Backblaze, Linode, and Wasabi as storage adaptors. Some of these services can be self-hosted, just like Appwrite.\", \"You can select which storage adaptor to use by setting the _APP_STORAGE_DEVICE environment variable. Valid values are local, s3, dospaces, backblaze, linode and wasabi. Each storage adaptor requires its own set of additional environment variables to configure.\", \"The maximum size for individual file uploads is controlled by the _APP_STORAGE_LIMIT environment variable, which defaults to 30 MB. See Environment Variables for more information.\", \" Configure storage adaptors\"]}, {\"level\": 2, \"title\": \"Applying Changes\", \"body\": [\"After editing your docker-compose.yml or .env files, you will need to recreate your Appwrite stack by running the following compose command in your terminal.\", \" docker compose up -d\", \"You can verify if the changes have been successfully applied by running this command:\", \" docker compose exec appwrite vars\"]}]", "metadata": {"source": "https://appwrite.io/docs/configuration"}}
\ No newline at end of file
diff --git a/docs/ee43f3aa-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43f3aa-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..9c4cf18
--- /dev/null
+++ b/docs/ee43f3aa-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Environment Variables \", \"body\": [\"Appwrite environment variables allow you to edit your server setup configuration and customize it. You can easily change the environment variables by changing them when running Appwrite using Docker CLI or Docker Compose.\", \"Updating your Appwrite environment variables requires you to edit your Appwrite .env file. Your Docker files should be located inside the \\\"appwrite\\\" folder at the location where you first run the Appwrite installation script. It's recommended to use the .env file as a central point for updating your Appwrite configuration rather than changing them directly in your docker-compose.yml file.\", \"After editing your docker-compose.yml or .env files, you will need to recreate your Appwrite stack by running the following compose command in your terminal:\", \" docker compose up -d\", \"You can verify if the changes have been successfully applied by running this command:\", \" docker compose exec appwrite vars\", \"All Options:\", \" General Redis MariaDB InfluxDB StatsD SMTP Phone Storage Functions Maintenance GraphQL \"]}, {\"level\": 2, \"title\": \"General\", \"body\": [\" Name Description _APP_ENV Set your server running environment. By default, the var is set to 'development'. When deploying to production, change it to: 'production'. _APP_LOCALE Set your Appwrite's locale. By default, the locale is set to 'en'. _APP_OPTIONS_ABUSE Allows you to disable abuse checks and API rate limiting. By default, set to 'enabled'. To cancel the abuse checking, set to 'disabled'. It is not recommended to disable this check-in a production environment. _APP_OPTIONS_FORCE_HTTPS Allows you to force HTTPS connection to your API. This feature redirects any HTTP call to HTTPS and adds the 'Strict-Transport-Security' header to all HTTP responses. By default, set to 'enabled'. To disable, set to 'disabled'. This feature will work only when your ports are set to default 80 and 443. _APP_OPENSSL_KEY_V1 This is your server private secret key that is used to encrypt all sensitive data on your server. Appwrite server encrypts all secret data on your server like webhooks, HTTP passwords, user sessions, and storage files. The var is not set by default, if you wish to take advantage of Appwrite encryption capabilities you should change it and make sure to keep it a secret and have a backup for it. _APP_DOMAIN Your Appwrite domain address. When setting a public suffix domain, Appwrite will attempt to issue a valid SSL certificate automatically. When used with a dev domain, Appwrite will assign a self-signed SSL certificate. The default value is 'localhost'. _APP_DOMAIN_TARGET A DNS A record hostname to serve as a CNAME target for your Appwrite custom domains. You can use the same value as used for the Appwrite '_APP_DOMAIN' variable. The default value is 'localhost'. _APP_CONSOLE_WHITELIST_ROOT version >= 0.8.0 This option allows you to disable the creation of new users on the Appwrite console. When enabled only 1 user will be able to use the registration form. New users can be added by inviting them to your project. By default this option is enabled. _APP_CONSOLE_WHITELIST_EMAILS This option allows you to limit creation of new users on the Appwrite console. This option is very useful for small teams or sole developers. To enable it, pass a list of allowed email addresses separated by a comma. _APP_CONSOLE_WHITELIST_IPS This last option allows you to limit creation of users in Appwrite console for users sharing the same set of IP addresses. This option is very useful for team working with a VPN service or a company IP.To enable/activate this option, pass a list of allowed IP addresses separated by a comma. _APP_SYSTEM_EMAIL_NAME version >= 0.7.0 This is the sender name value that will appear on email messages sent to developers from the Appwrite console. The default value is: 'Appwrite'. You can use url encoded strings for spaces and special chars. _APP_SYSTEM_EMAIL_ADDRESS version >= 0.7.0 This is the sender email address that will appear on email messages sent to developers from the Appwrite console. The default value is 'team@appwrite.io'. You should choose an email address that is allowed to be used from your SMTP server to avoid the server email ending in the users' SPAM folders. _APP_SYSTEM_RESPONSE_FORMAT version >= 0.7.0 Use this environment variable to set the default Appwrite HTTP response format to support an older version of Appwrite. This option is useful to overcome breaking changes between versions. You can also use the X-Appwrite-Response-Format HTTP request header to overwrite the response for a specific request. This variable accepts any valid Appwrite version. To use the current version format, leave the value of the variable empty. _APP_SYSTEM_SECURITY_EMAIL_ADDRESS version >= 0.7.0 This is the email address used to issue SSL certificates for custom domains or the user agent in your webhooks payload. _APP_USAGE_STATS version >= 0.7.0 This variable allows you to disable the collection and displaying of usage stats. This value is set to 'enabled' by default, to disable the usage stats set the value to 'disabled'. When disabled, it's recommended to turn off the Worker Usage, Influxdb and Telegraf containers for better resource usage. _APP_LOGGING_PROVIDER version >= 0.12.0 This variable allows you to enable logging errors to 3rd party providers. This value is empty by default, to enable the logger set the value to one of 'sentry', 'raygun', 'appSignal', 'logOwl' _APP_LOGGING_CONFIG version >= 0.12.0 This variable configures authentication to 3rd party error logging providers. If using Sentry, this should be 'SENTRY_API_KEY;SENTRY_APP_ID'. If using Raygun, this should be Raygun API key. If using AppSignal, this should be AppSignal API key. If using LogOwl, this should be LogOwl Service Ticket. _APP_USAGE_AGGREGATION_INTERVAL version >= 1.1.0 Interval value containing the number of seconds that the Appwrite usage process should wait before aggregating stats and syncing it to Database from TimeSeries data. The default value is 30 seconds. Reintroduced in 1.1.0. _APP_USAGE_TIMESERIES_INTERVAL version >= 1.0.0 Deprecated since 1.1.0 use _APP_USAGE_AGGREGATION_INTERVAL instead. _APP_USAGE_DATABASE_INTERVAL version >= 1.0.0 Deprecated since 1.1.0 use _APP_USAGE_AGGREGATION_INTERVAL instead. _APP_WORKER_PER_CORE version >= 0.13.0 Internal Worker per core for the API, Realtime and Executor containers. Can be configured to optimize performance. \"]}, {\"level\": 2, \"title\": \"Redis\", \"body\": [\"Appwrite uses a Redis server for managing cache, queues and scheduled tasks. The Redis env vars are used to allow Appwrite server to connect to the Redis container.\", \" Name Description _APP_REDIS_HOST Redis server hostname address. Default value is: 'redis'. _APP_REDIS_PORT Redis server TCP port. Default value is: '6379'. _APP_REDIS_USER version >= 0.7 Redis server user. This is an optional variable. Default value is an empty string. _APP_REDIS_PASS version >= 0.7 Redis server password. This is an optional variable. Default value is an empty string. \"]}, {\"level\": 2, \"title\": \"MariaDB\", \"body\": [\"Appwrite is using a MariaDB server for managing persistent database data. The MariaDB env vars are used to allow Appwrite server to connect to the MariaDB container.\", \" Name Description _APP_DB_HOST MariaDB server host name address. Default value is: 'mariadb'. _APP_DB_PORT MariaDB server TCP port. Default value is: '3306'. _APP_DB_SCHEMA MariaDB server database schema. Default value is: 'appwrite'. _APP_DB_USER MariaDB server user name. Default value is: 'user'. _APP_DB_PASS MariaDB server user password. Default value is: 'password'. _APP_DB_ROOT_PASS MariaDB server root password. Default value is: 'rootsecretpassword'. \"]}, {\"level\": 2, \"title\": \"InfluxDB\", \"body\": [\"Appwrite uses an InfluxDB server for managing time-series data and server stats. The InfluxDB env vars are used to allow Appwrite server to connect to the InfluxDB container.\", \" Name Description _APP_INFLUXDB_HOST InfluxDB server host name address. Default value is: 'influxdb'. _APP_INFLUXDB_PORT InfluxDB server TCP port. Default value is: '8086'. \"]}, {\"level\": 2, \"title\": \"StatsD\", \"body\": [\"Appwrite uses a StatsD server for aggregating and sending stats data over a fast UDP connection. The StatsD env vars are used to allow Appwrite server to connect to the StatsD container.\", \" Name Description _APP_STATSD_HOST StatsD server host name address. Default value is: 'telegraf'. _APP_STATSD_PORT StatsD server TCP port. Default value is: '8125'. \"]}, {\"level\": 2, \"title\": \"SMTP\", \"body\": [\"Appwrite is using an SMTP server for emailing your projects users and server admins. The SMTP env vars are used to allow Appwrite server to connect to the SMTP container.If running in production, it might be easier to use a 3rd party SMTP server as it might be a little more difficult to set up a production SMTP server that will not send all your emails into your user\\\\'s SPAM folder.\", \" Name Description _APP_SMTP_HOST SMTP server host name address. Use an empty string to disable all mail sending from the server. The default value for this variable is an empty string _APP_SMTP_PORT SMTP server TCP port. Empty by default. _APP_SMTP_SECURE SMTP secure connection protocol. Empty by default, change to 'tls' if running on a secure connection. _APP_SMTP_USERNAME SMTP server user name. Empty by default. _APP_SMTP_PASSWORD SMTP server user password. Empty by default. \"]}, {\"level\": 2, \"title\": \"Phone\", \"body\": [\" Name Description _APP_SMS_PROVIDER version >= 0.15.0 Provider used for delivering SMS for Phone authentication. Use the following format: 'sms://[USER]:[SECRET]@[PROVIDER]'. Available providers are twilio, text-magic, telesign, msg91, and vonage. _APP_SMS_FROM version >= 0.15.0 Phone number used for sending out messages. Must start with a leading '+' and maximum of 15 digits without spaces (+123456789). \"]}, {\"level\": 2, \"title\": \"Storage\", \"body\": [\" Name Description _APP_STORAGE_LIMIT version >= 0.7.0 Maximum file size allowed for file upload. The default value is 30MB. You should pass your size limit value in bytes. _APP_STORAGE_PREVIEW_LIMIT version >= 0.13.4 Maximum file size allowed for file image preview. The default value is 20MB. You should pass your size limit value in bytes. _APP_STORAGE_ANTIVIRUS This variable allows you to disable the internal anti-virus scans. This value is set to 'disabled' by default, to enable the scans set the value to 'enabled'. Before enabling, you must add the ClamAV service and depend on it on main Appwrite service. _APP_STORAGE_ANTIVIRUS_HOST version >= 0.7.0 ClamAV server host name address. Default value is: 'clamav'. _APP_STORAGE_ANTIVIRUS_PORT version >= 0.7.0 ClamAV server TCP port. Default value is: '3310'. _APP_STORAGE_DEVICE version >= 0.13.0 Select default storage device. The default value is 'local'. List of supported adapters are 'local', 's3', 'dospaces', 'backblaze', 'linode' and 'wasabi'. _APP_STORAGE_S3_ACCESS_KEY version >= 0.13.0 AWS S3 storage access key. Required when the storage adapter is set to S3. You can get your access key from your AWS console _APP_STORAGE_S3_SECRET version >= 0.13.0 AWS S3 storage secret key. Required when the storage adapter is set to S3. You can get your secret key from your AWS console. _APP_STORAGE_S3_REGION version >= 0.13.0 AWS S3 storage region. Required when storage adapter is set to S3. You can find your region info for your bucket from AWS console. _APP_STORAGE_S3_BUCKET version >= 0.13.0 AWS S3 storage bucket. Required when storage adapter is set to S3. You can create buckets in your AWS console. _APP_STORAGE_DO_SPACES_ACCESS_KEY version >= 0.13.0 DigitalOcean spaces access key. Required when the storage adapter is set to DOSpaces. You can get your access key from your DigitalOcean console. _APP_STORAGE_DO_SPACES_SECRET version >= 0.13.0 DigitalOcean spaces secret key. Required when the storage adapter is set to DOSpaces. You can get your secret key from your DigitalOcean console. _APP_STORAGE_DO_SPACES_REGION version >= 0.13.0 DigitalOcean spaces region. Required when storage adapter is set to DOSpaces. You can find your region info for your space from DigitalOcean console. _APP_STORAGE_DO_SPACES_BUCKET version >= 0.13.0 DigitalOcean spaces bucket. Required when storage adapter is set to DOSpaces. You can create spaces in your DigitalOcean console. _APP_STORAGE_BACKBLAZE_ACCESS_KEY version >= 0.14.2 Backblaze access key. Required when the storage adapter is set to Backblaze. Your Backblaze keyID will be your access key. You can get your keyID from your Backblaze console. _APP_STORAGE_BACKBLAZE_SECRET version >= 0.14.2 Backblaze secret key. Required when the storage adapter is set to Backblaze. Your Backblaze applicationKey will be your secret key. You can get your applicationKey from your Backblaze console. _APP_STORAGE_BACKBLAZE_REGION version >= 0.14.2 Backblaze region. Required when storage adapter is set to Backblaze. You can find your region info from your Backblaze console. _APP_STORAGE_BACKBLAZE_BUCKET version >= 0.14.2 Backblaze bucket. Required when storage adapter is set to Backblaze. You can create your bucket from your Backblaze console. _APP_STORAGE_LINODE_ACCESS_KEY version >= 0.14.2 Linode object storage access key. Required when the storage adapter is set to Linode. You can get your access key from your Linode console. _APP_STORAGE_LINODE_SECRET version >= 0.14.2 Linode object storage secret key. Required when the storage adapter is set to Linode. You can get your secret key from your Linode console. _APP_STORAGE_LINODE_REGION version >= 0.14.2 Linode object storage region. Required when storage adapter is set to Linode. You can find your region info from your Linode console. _APP_STORAGE_LINODE_BUCKET version >= 0.14.2 Linode object storage bucket. Required when storage adapter is set to Linode. You can create buckets in your Linode console. _APP_STORAGE_WASABI_ACCESS_KEY version >= 0.14.2 Wasabi access key. Required when the storage adapter is set to Wasabi. You can get your access key from your Wasabi console. _APP_STORAGE_WASABI_SECRET version >= 0.14.2 Wasabi secret key. Required when the storage adapter is set to Wasabi. You can get your secret key from your Wasabi console. _APP_STORAGE_WASABI_REGION version >= 0.14.2 Wasabi region. Required when storage adapter is set to Wasabi. You can find your region info from your Wasabi console. _APP_STORAGE_WASABI_BUCKET version >= 0.14.2 Wasabi bucket. Required when storage adapter is set to Wasabi. You can create buckets in your Wasabi console. \"]}, {\"level\": 2, \"title\": \"Functions\", \"body\": [\" Name Description _APP_FUNCTIONS_SIZE_LIMIT version >= 0.13.0 The maximum size deployment in bytes. The default value is 30MB. _APP_FUNCTIONS_TIMEOUT version >= 0.7.0 The maximum number of seconds allowed as a timeout value when creating a new function. The default value is 900 seconds. This is the global limit, timeout for individual functions are configured in the function's settings or in appwrite.json. _APP_FUNCTIONS_BUILD_TIMEOUT version >= 0.13.0 The maximum number of seconds allowed as a timeout value when building a new function. The default value is 900 seconds. _APP_FUNCTIONS_CONTAINERS version >= 0.7.0 The maximum number of containers Appwrite is allowed to keep alive in the background for function environments. Running containers allow faster execution time as there is no need to recreate each container every time a function gets executed. The default value is 10. _APP_FUNCTIONS_CPUS version >= 0.7.0 The maximum number of CPU core a single cloud function is allowed to use. Please note that setting a value higher than available cores will result in a function error, which might result in an error. The default value is empty. When it's empty, CPU limit will be disabled. _APP_FUNCTIONS_MEMORY version >= 0.7.0 The maximum amount of memory a single cloud function is allowed to use in megabytes. The default value is empty. When it's empty, memory limit will be disabled. _APP_FUNCTIONS_MEMORY_SWAP version >= 0.7.0 The maximum amount of swap memory a single cloud function is allowed to use in megabytes. The default value is empty. When it's empty, swap memory limit will be disabled. _APP_FUNCTIONS_RUNTIMES version >= 0.8.0 This option allows you to enable or disable runtime environments for cloud functions. Disable unused runtimes to save disk space.To enable cloud function runtimes, pass a list of enabled environments separated by a comma.Currently, supported environments are: node-14.5, node-16.0, node-18.0, php-8.0, php-8.1, ruby-3.0, ruby-3.1, python-3.8, python-3.9, python-3.10, deno-1.21, deno-1.24, dart-2.15, dart-2.16, dart-2.17, dotnet-3.1, dotnet-6.0, java-8.0, java-11.0, java-17.0, java-18.0, swift-5.5, kotlin-1.6, cpp-17.0 _APP_EXECUTOR_SECRET version >= 0.13.0 The secret key used by Appwrite to communicate with the function executor. Make sure to change this! _APP_EXECUTOR_HOST version >= 0.13.0 The host used by Appwrite to communicate with the function executor! _APP_EXECUTOR_RUNTIME_NETWORK version >= 0.13.0 Deprecated with 0.14.0, use 'OPEN_RUNTIMES_NETWORK' instead! _APP_FUNCTIONS_ENVS version >= 0.7.0 Deprecated with 0.8.0, use '_APP_FUNCTIONS_RUNTIMES' instead! _APP_FUNCTIONS_INACTIVE_THRESHOLD version >= 0.13.0 The minimum time a function must be inactive before it can be shut down and cleaned up. This feature is intended to clean up unused containers. Containers may remain active for longer than the interval before being shut down, as Appwrite only cleans up unused containers every hour. If no value is provided, the default is 60 seconds. DOCKERHUB_PULL_USERNAME version >= 0.10.0 The username for hub.docker.com. This variable is used to pull images from hub.docker.com. DOCKERHUB_PULL_PASSWORD version >= 0.10.0 The password for hub.docker.com. This variable is used to pull images from hub.docker.com. DOCKERHUB_PULL_EMAIL version >= 0.10.0 The email for hub.docker.com. This variable is used to pull images from hub.docker.com. OPEN_RUNTIMES_NETWORK version >= 0.13.0 The docker network used for communication between the executor and runtimes. Change this if you have altered the default network names. \"]}, {\"level\": 2, \"title\": \"Maintenance\", \"body\": [\" Name Description _APP_MAINTENANCE_INTERVAL version >= 0.7.0 Interval value containing the number of seconds that the Appwrite maintenance process should wait before executing system cleanups and optimizations. The default value is 86400 seconds (1 day). _APP_MAINTENANCE_RETENTION_CACHE version >= 1.0.0 The maximum duration (in seconds) upto which to retain cached files. The default value is 2592000 seconds (30 days). _APP_MAINTENANCE_RETENTION_EXECUTION version >= 0.7.0 The maximum duration (in seconds) upto which to retain execution logs. The default value is 1209600 seconds (14 days). _APP_MAINTENANCE_RETENTION_AUDIT version >= 0.7.0 IThe maximum duration (in seconds) upto which to retain audit logs. The default value is 1209600 seconds (14 days). _APP_MAINTENANCE_RETENTION_ABUSE version >= 0.7.0 The maximum duration (in seconds) upto which to retain abuse logs. The default value is 86400 seconds (1 day). _APP_MAINTENANCE_RETENTION_USAGE_HOURLY The maximum duration (in seconds) upto which to retain hourly usage metrics. The default value is 8640000 seconds (100 days). \"]}]", "metadata": {"source": "https://appwrite.io/docs/environment-variables"}}
\ No newline at end of file
diff --git a/docs/ee43f6a2-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43f6a2-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..26e890f
--- /dev/null
+++ b/docs/ee43f6a2-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Email Delivery \", \"body\": [\"Appwrite v0.7 and above come with support for easy integrations with 3rd party SMTP providers. In order for emails to work, you will need to setup proper SMTP configuration as described below.\", \"Because email deliverability can be both tricky and hard, it is often easier to delegate this responsibility to a 3rd-party SMTP provider. These providers help you abstract the complexity of passing SPAM filters by doing a lot of the advanced configuration and validation for you.\", \"In this document, you will learn how to connect a 3rd party SMTP provider like MailGun or SendGrid with Appwrite to help you get better email deliverability.\"]}, {\"level\": 2, \"title\": \"Update Your .env File\", \"body\": [\"At this stage, we assume that you have already installed Appwrite. Else, you can follow our Self Hosting Guide for the installation. Appwrite offers multiple environment variables to customize your server setup to your needs. To configure Appwrite to use your own SMTP server, you need to set the following environment variables in the hidden .env file that comes with your Appwrite installation.\", \"_APP_SMTP_HOST - SMTP server host name address. Use an empty string to disable all mail sending from the server. The default value for this variable is an empty string\", \"_APP_SMTP_PORT - SMTP server TCP port. Empty by default.\", \"_APP_SMTP_SECURE - SMTP secure connection protocol. Empty by default, change to 'tls' if running on a secure connection. Valid values are empty, 'tls', and 'ssl'.\", \"_APP_SMTP_USERNAME - SMTP server user name. Empty by default.\", \"_APP_SMTP_PASSWORD - SMTP server user password. Empty by default.\", \"_APP_SYSTEM_EMAIL_ADDRESS - Configured sender email address, \\\"team@appwrite.io\\\" by default. This is the email address seen by recipients.\", \"Here's a sample configuration if you're using SendGrid as your SMTP provider. \", \" _APP_SMTP_HOST=smtp.sendgrid.net\\n_APP_SMTP_PORT=587\\n_APP_SMTP_SECURE=tls\\n_APP_SMTP_USERNAME=YOUR-SMTP-USERNAME\\n_APP_SMTP_PASSWORD=YOUR-SMTP-PASSWORD\\n_APP_SYSTEM_EMAIL_ADDRESS=YOUR-SENDER-EMAIL\"]}, {\"level\": 2, \"title\": \"Restart Your Appwrite Server\", \"body\": [\"Once you've updated your .env file, you need to restart your Appwrite instance. Navigate to the directory containing the docker-compose.yml file of your Appwrite instance and run the following command from your terminal:\", \" docker compose up -d\"]}]", "metadata": {"source": "https://appwrite.io/docs/email-delivery"}}
\ No newline at end of file
diff --git a/docs/ee43f850-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43f850-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..11b9d72
--- /dev/null
+++ b/docs/ee43f850-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" SMS Delivery \", \"body\": [\"Appwrite supports phone authentication, which allows users to create accounts and log in using SMS messages. Appwrite requires an SMS provider to be setup before using Phone authentication.\"]}, {\"level\": 2, \"title\": \"SMS Providers\", \"body\": [\"Appwrite supports a growing list of SMS providers that you can choose from. Choose one from the list below and set up an account.\", \" SMS Provider Create Account Get Credentials Twilio Website Documentation TextMagic Website Documentation Telesign Website Documentation MSG91 Website Documentation Vonage Website Documentation \"]}, {\"level\": 2, \"title\": \"Update Your .env File\", \"body\": [\"You will need to configure these environment variables and restart your Appwrite containers before you can use phone authentication.\", \" Provider _APP_SMS_PROVIDER _APP_SMS_FROM Twilio sms://[ACCOUNT SID]:[AUTH TOKEN]@twilio [TWILIO PHONE NUMBER] TextMagic sms://[USERNAME]:[API KEY]@text-magic [PHONE NUMBER OR SENDER ID] TeleSign sms://[CUSTOMER ID]:[API KEY]@telesign [TELESIGN PHONE NUMBER] MSG91 sms://[SENDER ID]:[AUTH KEY]@MSG91 [FLOW ID] Vonage sms://[API KEY]:[API SECRET]@vonage [PHONE NUMBER OR BRAND NAME] \"]}]", "metadata": {"source": "https://appwrite.io/docs/sms-delivery"}}
\ No newline at end of file
diff --git a/docs/ee43f9d6-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43f9d6-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..c9260d4
--- /dev/null
+++ b/docs/ee43f9d6-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Certificates \", \"body\": [\"Appwrite uses Let's Encrypt to auto-generate TLS certificates for your Appwrite instance to ensure your API traffic is appropriately encrypted. For Appwrite to properly generate certificates, a few conditions need to be met.\", \"You need to use a public-facing domain with a known TLD pointing to your Appwrite instance.Your _APP_ENV environment variable should be set for production mode. The default Appwrite setup comes with this predefined setting, so you should be OK unless you change it.You need to ensure you have a valid email address set on _APP_SYSTEM_SECURITY_EMAIL_ADDRESS. The default setup comes with certs@appwrite.io as the default value. While this address will work, it's recommended to change it to your own email.Currently, Appwrite is using the ACME HTTP challenge to issue an TLS certificate. This forces us to generate certificates for port 443 when the challenge itself is performed on port 80. At this point, other ports will not work. To overcome this limit, you can set Appwrite on a separate sub-domain or use your own certificate or proxy server in front of Appwrite.\"]}, {\"level\": 2, \"title\": \"Debugging\", \"body\": [\"If you're still struggling with your certificates, check the Appwrite certificates worker log. You can do that with the following command:\", \" docker compose logs appwrite-worker-certificates\"]}, {\"level\": 2, \"title\": \"Generation Cycle\", \"body\": [\"Appwrite auto-generates a certificate for your main domain when you first visit it. If your browser shows an insecure connection warning, you must proceed to trigger certificate generation. The domain in environment variable _APP_DOMAIN is considered your main domain. If you didn't set this variable, the first domain you visit would be marked as the main domain for your Appwrite instance. Appwrite follows this concept of the main domain to prevent generating certificates for domains you don't own. Keep in mind that you can always add additional domains as Custom Domains in your project settings to enable certificate generation for any domain.\", \"Certificate renewal is done as a part of the Appwrite maintenance task. Unless modified with environment variable _APP_MAINTENANCE_INTERVAL, this task runs every 24 hours. During this task, Appwrite looks for certificates due for renewal and renews them. One maintenance cycle only attempts to renew up to 200 certificates to respect the Let's Encrypt API limit. Every Let's Encrypt certificate is valid for 90 days, but Appwrite starts to renew them 30 days before the expiration.\", \"There are many reasons why certificate generation could fail, such as incorrect DNS settings, hitting Let's Encrypt API limit, or a failed HTTP ACME challenge. Every certificate generation failure is attempted again in the next renewal cycle, but only up to 5 attempts. If you need to run certificate generation for a domain beyond the attempts limit, you can use the manual generation method. \"]}, {\"level\": 2, \"title\": \"Manual Generation\", \"body\": [\"Since Appwrite generates and renews certificates automatically, a manual generation is seldom required. A manual generation can be useful when you hit the API limit and don't want to wait for the next maintenance cycle to renew the certificate. Use the following command to generate a certificate for your main domain:\", \" docker compose exec appwrite ssl\", \"If you want to generate a certificate for a specific domain, pass it as a parameter into the command:\", \" docker compose exec appwrite ssl domain=\\\"api.myapp.com\\\"\"]}]", "metadata": {"source": "https://appwrite.io/docs/certificates"}}
\ No newline at end of file
diff --git a/docs/ee43fb84-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43fb84-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..481e304
--- /dev/null
+++ b/docs/ee43fb84-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Debugging \", \"body\": [\"Appwrite comes with a few built-in tools and methods that easily debug and investigate issues on your Appwrite stack environment.\"]}, {\"level\": 2, \"title\": \"Doctor CLI \\u00a0available from >= v0.7\", \"body\": [\"The doctor CLI helps you validate your server health and best practices. Using the Doctor CLI, you can verify your server configuration for best practices, validate your Appwrite stack connectivity and storage read and write access, and available storage space.\", \"To run the Doctor check, simply run the following command from your terminal. You might need to replace 'appwrite' with your Appwrite Docker container ID. To find out what's your container ID, you can run `docker ps` command (more on that, in the next section).\", \" docker exec appwrite doctor\"]}, {\"level\": 2, \"title\": \"Logs\", \"body\": [\"Checking your Appwrite containers can be a great way to pinpoint where and what exactly happens inside your Appwrite services. You can list your Appwrite containers using the following command in your terminal:\", \" docker ps\", \"The output of this command will show you a list of all your running Docker containers, their ID's, uptime, and open ports. You can use each container ID to get a list of all the container `stdout` and `stderr` logs by using the following command:\", \" docker logs [CONTAINER-ID]\"]}, {\"level\": 2, \"title\": \"Status Codes\", \"body\": [\"Appwrite uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, invalid input, etc.). Codes in the 5xx range indicate an error with the Appwrite server, but these are rare.\", \"Learn more about Appwrite status codes\"]}]", "metadata": {"source": "https://appwrite.io/docs/debugging"}}
\ No newline at end of file
diff --git a/docs/ee43fdbe-1f0c-11ee-98fa-00155da08df7.json b/docs/ee43fdbe-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..84a0afb
--- /dev/null
+++ b/docs/ee43fdbe-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Upgrade \", \"body\": [\"To upgrade your Appwrite server from an older version, you should use the Appwrite migration tool after you have installed the new version. The migration tool will adjust your Appwrite data to the new version's structure to make sure your Appwrite data is compatible with any internal changes. \", \"As of version 0.14, Appwrite requires Docker Compose Version 2. To upgrade Appwrite, make sure your Docker installation is updated to support Composer V2.\", \" A Note About Migration At present, we support migrations only to the immediately higher versions, i.e from 0.6 to 0.7 and 0.7 to 0.8 and so on. So if you're trying to migrate from 0.6 to 0.8, you will first need to migrate to 0.7 and then to 0.8 It is highly recommended to backup your server data before running the migration. It is recommended to run the migration process on a dev instance and make sure your application is working well and that you have checked for any breaking changes in the new version changelog.\", \"The first step is to install the latest version of Appwrite. Head to the directory where you ran your previous Appwrite install command. \", \" parent_directory <= you run the command in this directory\\n \\u2514\\u2500\\u2500 appwrite\\n \\u2514\\u2500\\u2500 docker-compose.yml\", \"This is the parent directory where you will find the appwrite directory, inside which there are docker-compose.yml and .env files.\"]}, {\"level\": 3, \"title\": \"Installing the Next Version\", \"body\": [\" Unix docker run -it --rm \\\\\\n --volume /var/run/docker.sock:/var/run/docker.sock \\\\\\n --volume \\\"$(pwd)\\\"/appwrite:/usr/src/code/appwrite:rw \\\\\\n --entrypoint=\\\"install\\\" \\\\\\n appwrite/appwrite:1.3.7 CMD docker run -it --rm ^\\n --volume //var/run/docker.sock:/var/run/docker.sock ^\\n --volume \\\"%cd%\\\"/appwrite:/usr/src/code/appwrite:rw ^\\n --entrypoint=\\\"install\\\" ^\\n appwrite/appwrite:1.3.7 PowerShell docker run -it --rm `\\n --volume /var/run/docker.sock:/var/run/docker.sock `\\n --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `\\n --entrypoint=\\\"install\\\" `\\n appwrite/appwrite:1.3.7 \", \"This will pull the docker-compose.yml file for the new version and perform the installation. Once the setup completes, verify that you have the latest version of Appwrite.\", \" docker ps | grep appwrite/appwrite\", \"Verify that the STATUS doesn't have any errors and all the appwrite/appwrite containers have version : 1.3.7\"]}]", "metadata": {"source": "https://appwrite.io/docs/upgrade"}}
\ No newline at end of file
diff --git a/docs/ee44000c-1f0c-11ee-98fa-00155da08df7.json b/docs/ee44000c-1f0c-11ee-98fa-00155da08df7.json
new file mode 100644
index 0000000..4ebf854
--- /dev/null
+++ b/docs/ee44000c-1f0c-11ee-98fa-00155da08df7.json
@@ -0,0 +1 @@
+{"page_content": "[{\"level\": 1, \"title\": \" Production \", \"body\": [\"Appwrite default setup is designed to help you get started quickly with using the Appwrite server. To run Appwrite successfully in a production environment, you should follow a few basic concepts and best practices. This document assumes you have some very basic understanding of Docker and Docker Compose command-line tools.\"]}, {\"level\": 2, \"title\": \"Encryption\", \"body\": [\"By default, the Appwrite setup doesn't come with a uniquely generated encryption key. This key is used to store your files and sensitive data like webhook passwords or API keys in a safe way. To take advantage of this feature, you must generate a unique key and set it as the value of the _APP_OPENSSL_KEY_V1 environment variable.\", \"Make sure to keep this key in a safe place and never make it publicly accessible. There are many online resources with methods of keeping your secret keys safe in your servers.\", \" Best Practice You should always prefer https over http in production environments. This keeps your APIs secure and prevents any redirects from interfering with your requests.\"]}, {\"level\": 2, \"title\": \"Limit Console Access\", \"body\": [\"By default, anyone can signup for your Appwrite server, create projects, and use your computing power. While this is great for testing around or running your Appwrite service in a network isolated environment, it is highly not recommended for public production use.\", \"We are providing three different methods to limit access to your Appwrite console. You can either set a list of IPs or email address which users are allowed to signup from. You can choose one or multiple restriction methods to apply.\"]}, {\"level\": 2, \"title\": \"Scaling\", \"body\": [\"Appwrite was built with scalability in mind. Appwrite can scale both horizontally and vertically.\", \"Appwrite uses a few containers to run, where each container has its job. Most of the Appwrite containers are stateless, and in order to scale them, all you need is to replicate them and setup a load balancer to distribute their load.\", \"If you decide to set up a load balancer for a specific container, make sure that the containers that are trying to communicate with it are accessing it through a load balancer and not directly. All connections between Appwrite different containers are set using Docker environment variables.\", \"There are three Appwrite containers that do keep their state. MariaDB, Redis, and InfluxDB containers are used for storing data, cache and pub/sub messaging, and usage stats (in this order). To scale them out, all you need to do is set up a standard cluster (same as you would with any other app using these technologies) according to your needs and performance.\"]}, {\"level\": 2, \"title\": \"Enable Rate Limits\", \"body\": [\"If you disabled rate limits during development, make sure you re-enable them when moving to production environments. Rate limiting can be enabled by setting the _APP_OPTIONS_ABUSE environment variable to enabled.\", \"Learn more about environment variables\"]}, {\"level\": 2, \"title\": \"Emails\", \"body\": [\"Sending emails is hard. There are a lot of spam rules and configurations to master in order to set up a functional SMTP server. While it is okay to use a self-hosted SMTP server during development, you should use a third-party SMTP provider for production so your email doesn't get labeled as spam.\", \"You can change Appwrite's SMTP settings and credentials to any 3rd party provider you like that supports SMTP integration using our Docker environment variables. Most SMTP providers offer a decent free tier to get started with.\"]}, {\"level\": 2, \"title\": \"Backups\", \"body\": [\"Backups are highly recommended for any production environment. Currently, there is no built-in script we provide to do this automatically. To be able to backup your Appwrite server data, stats, and files, you will need to do the following.\", \" Create a script to backups and restore your MariaDB Appwrite schema. Note that trying to backup MariaDB using a docker volume backup can result in a corrupted copy of your data. It is recommended to use MariaDB or MySQL built-in tools for this. Create a script to backups and restore your InfluxDB stats. If you don't care much about your server stats, you can skip this. Create a script to backup Appwrite storage volume. There are many online resources explaining different ways to backup a docker volume. When running on multiple servers, it is very recommended to use an attachable storage point. Some cloud providers offer integrated backups to such attachable mount like GCP, AWS, DigitalOcean, and the list continues.\"]}]", "metadata": {"source": "https://appwrite.io/docs/production"}}
\ No newline at end of file
diff --git a/embeddings.js b/embeddings.js
index eaf1f1d..69f81d8 100644
--- a/embeddings.js
+++ b/embeddings.js
@@ -1,12 +1,10 @@
-import { loadQAStuffChain } from "langchain/chains";
-
-import { FaissStore } from "langchain/vectorstores/faiss";
-
import fs from "fs";
import { globSync } from "glob";
+
+import { loadQAStuffChain } from "langchain/chains";
+import { FaissStore } from "langchain/vectorstores/faiss";
import { OpenAIEmbeddings } from "langchain/embeddings/openai";
import { OpenAIChat } from "langchain/llms/openai";
-
import { Document } from "langchain/document";
import { CharacterTextSplitter } from "langchain/text_splitter";
diff --git a/main.js b/main.js
index b3a09c3..087d783 100644
--- a/main.js
+++ b/main.js
@@ -24,7 +24,7 @@ const template = (
prompt
) => `You are an AI chat bot trained on Appwrite Docs. You need to help developers answer Appwrite related
question only. You will be given an input and you need to respond with the appropriate answer from the
-reference docs. For each question show code examples when applicable. Answer in atleast 100 words.
+reference docs. For each question show code examples when applicable. Answer in atleast 200 words.
${prompt}`;
app.post("/", async (req, res) => {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 0b5f4b5..e0ef3c0 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1,4 +1,4 @@
-lockfileVersion: '6.0'
+lockfileVersion: '6.1'
settings:
autoInstallPeers: true
diff --git a/scrape.py b/scrape.py
new file mode 100644
index 0000000..a68ad99
--- /dev/null
+++ b/scrape.py
@@ -0,0 +1,101 @@
+import json
+import os
+from uuid import uuid1
+
+import requests
+from bs4 import BeautifulSoup
+
+
+def get_appwrite_data(path: str):
+ url = f"https://appwrite.io/docs/{path}"
+ data = requests.get(url).text
+ soup = BeautifulSoup(data, 'html.parser')
+
+ content = soup.select('.docs > .row > .col:nth-child(2) > article')[0]
+
+ sections = []
+ current_section = None
+ headings = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']
+ for element in content.findChildren(recursive=False):
+ if element.name not in headings and not current_section:
+ continue
+
+ if element.name in headings:
+ if current_section:
+ sections.append(current_section)
+
+ current_section = {
+ "level": int(element.name[1]),
+ "title": element.text,
+ "body": [],
+ }
+
+ elif current_section != None:
+ current_section['body'].append(element.text)
+ # pp = PrettyPrinter(indent=4)
+ # pp.pprint(sections)
+
+ return dict(
+ page_content=json.dumps(sections),
+ metadata={"source": url},
+ )
+
+
+sources = [
+ get_appwrite_data("getting-started-for-web"),
+ get_appwrite_data("getting-started-for-flutter"),
+ get_appwrite_data("getting-started-for-apple"),
+ get_appwrite_data("getting-started-for-android"),
+ get_appwrite_data("getting-started-for-server"),
+ get_appwrite_data("command-line"),
+ get_appwrite_data("command-line-deployment"),
+ get_appwrite_data("command-line-commands"),
+ get_appwrite_data("command-line-ci"),
+ get_appwrite_data("sdks"),
+ get_appwrite_data("rest"),
+ get_appwrite_data("graphql"),
+ get_appwrite_data("realtime"),
+ get_appwrite_data("client/account"),
+ get_appwrite_data("server/users"),
+ get_appwrite_data("client/teams"),
+ get_appwrite_data("client/databases"),
+ get_appwrite_data("client/storage"),
+ get_appwrite_data("client/functions"),
+ get_appwrite_data("client/locale"),
+ get_appwrite_data("client/avatars"),
+ get_appwrite_data("server/health"),
+ get_appwrite_data("databases"),
+ get_appwrite_data("databases-queries"),
+ get_appwrite_data("databases-pagination"),
+ get_appwrite_data("databases-relationships"),
+ get_appwrite_data("storage"),
+ get_appwrite_data("authentication"),
+ get_appwrite_data("authentication-server"),
+ get_appwrite_data("authentication-security"),
+ get_appwrite_data("functions"),
+ get_appwrite_data("keys"),
+ get_appwrite_data("permissions"),
+ get_appwrite_data("events"),
+ get_appwrite_data("queries"),
+ get_appwrite_data("pagination"),
+ get_appwrite_data("webhooks"),
+ get_appwrite_data("custom-domains"),
+ get_appwrite_data("response-codes"),
+ get_appwrite_data("rate-limits"),
+ get_appwrite_data("self-hosting"),
+ get_appwrite_data("configuration"),
+ get_appwrite_data("environment-variables"),
+ get_appwrite_data("email-delivery"),
+ get_appwrite_data("sms-delivery"),
+ get_appwrite_data("certificates"),
+ get_appwrite_data("debugging"),
+ get_appwrite_data("upgrade"),
+ get_appwrite_data("production"),
+]
+
+# Delete all files in docs
+for filename in os.listdir("docs"):
+ os.remove(f"docs/{filename}")
+
+for source in sources:
+ json.dump(source, open(f"docs/{uuid1()}.json", "w"))
From 781a5dcb4be0aeab94ab73925c04338b076c841a Mon Sep 17 00:00:00 2001
From: tglide <26071571+TGlide@users.noreply.github.com>
Date: Thu, 13 Jul 2023 14:25:06 +0100
Subject: [PATCH 3/3] small updates
---
main.js | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/main.js b/main.js
index 087d783..bb34966 100644
--- a/main.js
+++ b/main.js
@@ -1,7 +1,6 @@
import bodyParser from "body-parser";
import cors from "cors";
import express from "express";
-import { Configuration, OpenAIApi } from "openai-edge";
import { getChain, search_index } from "./embeddings.js";
const app = express();
@@ -14,17 +13,11 @@ app.use(bodyParser.raw({ inflate: true, type: "*/*" }));
const port = 3003;
-// Create an OpenAI API client (that's edge friendly!)
-const config = new Configuration({
- apiKey: process.env.OPENAI_API_KEY,
-});
-const openai = new OpenAIApi(config);
-
const template = (
prompt
) => `You are an AI chat bot trained on Appwrite Docs. You need to help developers answer Appwrite related
question only. You will be given an input and you need to respond with the appropriate answer from the
-reference docs. For each question show code examples when applicable. Answer in atleast 200 words.
+reference docs. For each question show code examples when applicable.
${prompt}`;
app.post("/", async (req, res) => {